diff --git a/.cr/personal/Editor/IntelliRush.xml b/.cr/personal/Editor/IntelliRush.xml index db7ec9fc..e241e096 100644 --- a/.cr/personal/Editor/IntelliRush.xml +++ b/.cr/personal/Editor/IntelliRush.xml @@ -1,7 +1,7 @@ - - - - True - - + + + + True + + \ No newline at end of file diff --git a/.cr/personal/Editor/Right Margin Line/Right Margin Line.xml b/.cr/personal/Editor/Right Margin Line/Right Margin Line.xml index 8ccb8442..4f8bf4f3 100644 --- a/.cr/personal/Editor/Right Margin Line/Right Margin Line.xml +++ b/.cr/personal/Editor/Right Margin Line/Right Margin Line.xml @@ -1,8 +1,8 @@ - - - - True - - 2 - + + + + True + + 2 + \ No newline at end of file diff --git a/.cr/personal/Editor/Spell checker.xml b/.cr/personal/Editor/Spell checker.xml index b2e68807..20c42611 100644 --- a/.cr/personal/Editor/Spell checker.xml +++ b/.cr/personal/Editor/Spell checker.xml @@ -1,6 +1,6 @@ - - - - XmlComments|Comments|Strings|VerbatimStrings|PublicIdentifiers|InternalIdentifiers|ProtectedInternalIdentifiers|ProtectedIdentifiers|PrivateIdentifiers|LocalIdentifiers|FileNames - + + + + XmlComments|Comments|Strings|VerbatimStrings|PublicIdentifiers|InternalIdentifiers|ProtectedInternalIdentifiers|ProtectedIdentifiers|PrivateIdentifiers|LocalIdentifiers|FileNames + \ No newline at end of file diff --git a/.cr/personal/FavoritesList/List.xml b/.cr/personal/FavoritesList/List.xml index b80554cb..a60e5ed6 100644 --- a/.cr/personal/FavoritesList/List.xml +++ b/.cr/personal/FavoritesList/List.xml @@ -1,6 +1,6 @@ - - - - - + + + + + \ No newline at end of file diff --git a/.cr/personal/IDE/BuildEngine.xml b/.cr/personal/IDE/BuildEngine.xml index bb7f83c9..a1af350d 100644 --- a/.cr/personal/IDE/BuildEngine.xml +++ b/.cr/personal/IDE/BuildEngine.xml @@ -1,6 +1,6 @@ - - - - True - + + + + True + \ No newline at end of file diff --git a/.cr/personal/IDE/Shortcuts.xml b/.cr/personal/IDE/Shortcuts.xml index 75819571..5e9c7e1f 100644 --- a/.cr/personal/IDE/Shortcuts.xml +++ b/.cr/personal/IDE/Shortcuts.xml @@ -1,58 +1,58 @@ - - - - - - - - - - - - - - - False - - - - - False - - - - - - - - - - - - - - - - - - - - - - - - False - - - - - - - - - - - - - + + + + + + + + + + + + + + + False + + + + + False + + + + + + + + + + + + + + + + + + + + + + + + False + + + + + + + + + + + + + \ No newline at end of file diff --git a/.cr/team/Editor/Code Templates/Templates.CSharp.xml b/.cr/team/Editor/Code Templates/Templates.CSharp.xml index ab2b150c..ad4ab5d8 100644 --- a/.cr/team/Editor/Code Templates/Templates.CSharp.xml +++ b/.cr/team/Editor/Code Templates/Templates.CSharp.xml @@ -1,93 +1,93 @@ - - - - - - - - - - - //----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="«?FileBase»" -// Project: StgSharp -// AuthorGroup: «?GetUserInfo(Company)» -// Copyright (c) «?GetUserInfo(Company)». 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. -// -// ----------------------------------------------------------------------- -// ----------------------------------------------------------------------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + //----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="«?FileBase»" +// Project: StgSharp +// AuthorGroup: «?GetUserInfo(Company)» +// Copyright (c) «?GetUserInfo(Company)». 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. +// +// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.cr/team/Editor/Formatting/Spaces.CSharp.xml b/.cr/team/Editor/Formatting/Spaces.CSharp.xml index 961a706f..5bb0ae2b 100644 --- a/.cr/team/Editor/Formatting/Spaces.CSharp.xml +++ b/.cr/team/Editor/Formatting/Spaces.CSharp.xml @@ -1,32 +1,32 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - False - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + + + \ No newline at end of file diff --git a/.cr/team/Editor/Formatting/Wrapping.CSharp.xml b/.cr/team/Editor/Formatting/Wrapping.CSharp.xml index be6b9d6b..8b5b7c97 100644 --- a/.cr/team/Editor/Formatting/Wrapping.CSharp.xml +++ b/.cr/team/Editor/Formatting/Wrapping.CSharp.xml @@ -1,38 +1,38 @@ - - - - - - - - - - - - - - - - - - WrapAfter - - 4 - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + WrapAfter + + 4 + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.cr/team/Editor/Right Margin Line/Right Margin Line.xml b/.cr/team/Editor/Right Margin Line/Right Margin Line.xml index 12890bed..ed19c709 100644 --- a/.cr/team/Editor/Right Margin Line/Right Margin Line.xml +++ b/.cr/team/Editor/Right Margin Line/Right Margin Line.xml @@ -1,6 +1,6 @@ - - - - 120 - + + + + 120 + \ No newline at end of file diff --git a/.editorconfig b/.editorconfig index 48b7b7e1..e194fea9 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,126 +1,126 @@ -[*] -end_of_line = lf -charset = utf-8 -insert_final_newline = true -trim_trailing_whitespace = true - -[*.{bat,cmd,ps1}] -end_of_line = crlf - -[*.cs] - -# CS1591: 缺少对公共可见类型或成员的 XML 注释 -dotnet_diagnostic.CS1591.severity = suggestion - -[*.cs] -#### 命名样式 #### - -# 命名规则 - -dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion -dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface -dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i - -dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion -dotnet_naming_rule.types_should_be_pascal_case.symbols = types -dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case - -dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion -dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members -dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case - -# 符号规范 - -dotnet_naming_symbols.interface.applicable_kinds = interface -dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected -dotnet_naming_symbols.interface.required_modifiers = - -dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum -dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected -dotnet_naming_symbols.types.required_modifiers = - -dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method -dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected -dotnet_naming_symbols.non_field_members.required_modifiers = - -# 命名样式 - -dotnet_naming_style.begins_with_i.required_prefix = I -dotnet_naming_style.begins_with_i.required_suffix = -dotnet_naming_style.begins_with_i.word_separator = -dotnet_naming_style.begins_with_i.capitalization = pascal_case - -dotnet_naming_style.pascal_case.required_prefix = -dotnet_naming_style.pascal_case.required_suffix = -dotnet_naming_style.pascal_case.word_separator = -dotnet_naming_style.pascal_case.capitalization = pascal_case - -dotnet_naming_style.pascal_case.required_prefix = -dotnet_naming_style.pascal_case.required_suffix = -dotnet_naming_style.pascal_case.word_separator = -dotnet_naming_style.pascal_case.capitalization = pascal_case -csharp_using_directive_placement = outside_namespace:silent -csharp_style_expression_bodied_methods = false:silent -csharp_style_expression_bodied_constructors = false:silent -csharp_style_expression_bodied_operators = false:silent -csharp_style_expression_bodied_properties = true:silent -csharp_style_expression_bodied_indexers = true:silent -csharp_style_expression_bodied_accessors = true:silent -csharp_style_expression_bodied_lambdas = true:silent -csharp_style_expression_bodied_local_functions = false:silent -csharp_style_conditional_delegate_call = true:suggestion -csharp_style_var_for_built_in_types = false:silent -csharp_style_var_when_type_is_apparent = false:silent -csharp_style_var_elsewhere = false:silent -csharp_prefer_simple_using_statement = false:suggestion -csharp_prefer_braces = true:silent -csharp_style_namespace_declarations = block_scoped:silent -csharp_style_prefer_method_group_conversion = true:silent -csharp_style_prefer_top_level_statements = false:silent -csharp_style_prefer_primary_constructors = true:suggestion -csharp_prefer_static_local_function = true:suggestion -csharp_prefer_static_anonymous_function = true:suggestion -csharp_style_prefer_readonly_struct = true:suggestion -csharp_space_around_binary_operators = before_and_after -csharp_indent_labels = one_less_than_current - -[*.vb] -#### 命名样式 #### - -# 命名规则 - -dotnet_naming_rule.interface_should_be_以_i_开始.severity = suggestion -dotnet_naming_rule.interface_should_be_以_i_开始.symbols = interface -dotnet_naming_rule.interface_should_be_以_i_开始.style = 以_i_开始 - -dotnet_naming_rule.类型_should_be_帕斯卡拼写法.severity = suggestion -dotnet_naming_rule.类型_should_be_帕斯卡拼写法.symbols = 类型 -dotnet_naming_rule.类型_should_be_帕斯卡拼写法.style = 帕斯卡拼写法 - -dotnet_naming_rule.非字段成员_should_be_帕斯卡拼写法.severity = suggestion -dotnet_naming_rule.非字段成员_should_be_帕斯卡拼写法.symbols = 非字段成员 -dotnet_naming_rule.非字段成员_should_be_帕斯卡拼写法.style = 帕斯卡拼写法 - -# 符号规范 - -dotnet_naming_symbols.interface.applicable_kinds = interface -dotnet_naming_symbols.interface.applicable_accessibilities = public, friend, private, protected, protected_friend, private_protected -dotnet_naming_symbols.interface.required_modifiers = - -dotnet_naming_symbols.类型.applicable_kinds = class, struct, interface, enum -dotnet_naming_symbols.类型.applicable_accessibilities = public, friend, private, protected, protected_friend, private_protected -dotnet_naming_symbols.类型.required_modifiers = - -dotnet_naming_symbols.非字段成员.applicable_kinds = property, event, method -dotnet_naming_symbols.非字段成员.applicable_accessibilities = public, friend, private, protected, protected_friend, private_protected -dotnet_naming_symbols.非字段成员.required_modifiers = - -# 命名样式 - -dotnet_naming_style.以_i_开始.required_prefix = I -dotnet_naming_style.以_i_开始.required_suffix = -dotnet_naming_style.以_i_开始.word_separator = -dotnet_naming_style.以_i_开始.capitalization = pascal_case - -dotnet_naming_style.帕斯卡拼写法.required_prefix = +[*] +end_of_line = lf +charset = utf-8 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.{bat,cmd,ps1}] +end_of_line = crlf + +[*.cs] + +# CS1591: 缺少对公共可见类型或成员的 XML 注释 +dotnet_diagnostic.CS1591.severity = suggestion + +[*.cs] +#### 命名样式 #### + +# 命名规则 + +dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion +dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface +dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i + +dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.types_should_be_pascal_case.symbols = types +dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case + +dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members +dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case + +# 符号规范 + +dotnet_naming_symbols.interface.applicable_kinds = interface +dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.interface.required_modifiers = + +dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum +dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.types.required_modifiers = + +dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method +dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.non_field_members.required_modifiers = + +# 命名样式 + +dotnet_naming_style.begins_with_i.required_prefix = I +dotnet_naming_style.begins_with_i.required_suffix = +dotnet_naming_style.begins_with_i.word_separator = +dotnet_naming_style.begins_with_i.capitalization = pascal_case + +dotnet_naming_style.pascal_case.required_prefix = +dotnet_naming_style.pascal_case.required_suffix = +dotnet_naming_style.pascal_case.word_separator = +dotnet_naming_style.pascal_case.capitalization = pascal_case + +dotnet_naming_style.pascal_case.required_prefix = +dotnet_naming_style.pascal_case.required_suffix = +dotnet_naming_style.pascal_case.word_separator = +dotnet_naming_style.pascal_case.capitalization = pascal_case +csharp_using_directive_placement = outside_namespace:silent +csharp_style_expression_bodied_methods = false:silent +csharp_style_expression_bodied_constructors = false:silent +csharp_style_expression_bodied_operators = false:silent +csharp_style_expression_bodied_properties = true:silent +csharp_style_expression_bodied_indexers = true:silent +csharp_style_expression_bodied_accessors = true:silent +csharp_style_expression_bodied_lambdas = true:silent +csharp_style_expression_bodied_local_functions = false:silent +csharp_style_conditional_delegate_call = true:suggestion +csharp_style_var_for_built_in_types = false:silent +csharp_style_var_when_type_is_apparent = false:silent +csharp_style_var_elsewhere = false:silent +csharp_prefer_simple_using_statement = false:suggestion +csharp_prefer_braces = true:silent +csharp_style_namespace_declarations = block_scoped:silent +csharp_style_prefer_method_group_conversion = true:silent +csharp_style_prefer_top_level_statements = false:silent +csharp_style_prefer_primary_constructors = true:suggestion +csharp_prefer_static_local_function = true:suggestion +csharp_prefer_static_anonymous_function = true:suggestion +csharp_style_prefer_readonly_struct = true:suggestion +csharp_space_around_binary_operators = before_and_after +csharp_indent_labels = one_less_than_current + +[*.vb] +#### 命名样式 #### + +# 命名规则 + +dotnet_naming_rule.interface_should_be_以_i_开始.severity = suggestion +dotnet_naming_rule.interface_should_be_以_i_开始.symbols = interface +dotnet_naming_rule.interface_should_be_以_i_开始.style = 以_i_开始 + +dotnet_naming_rule.类型_should_be_帕斯卡拼写法.severity = suggestion +dotnet_naming_rule.类型_should_be_帕斯卡拼写法.symbols = 类型 +dotnet_naming_rule.类型_should_be_帕斯卡拼写法.style = 帕斯卡拼写法 + +dotnet_naming_rule.非字段成员_should_be_帕斯卡拼写法.severity = suggestion +dotnet_naming_rule.非字段成员_should_be_帕斯卡拼写法.symbols = 非字段成员 +dotnet_naming_rule.非字段成员_should_be_帕斯卡拼写法.style = 帕斯卡拼写法 + +# 符号规范 + +dotnet_naming_symbols.interface.applicable_kinds = interface +dotnet_naming_symbols.interface.applicable_accessibilities = public, friend, private, protected, protected_friend, private_protected +dotnet_naming_symbols.interface.required_modifiers = + +dotnet_naming_symbols.类型.applicable_kinds = class, struct, interface, enum +dotnet_naming_symbols.类型.applicable_accessibilities = public, friend, private, protected, protected_friend, private_protected +dotnet_naming_symbols.类型.required_modifiers = + +dotnet_naming_symbols.非字段成员.applicable_kinds = property, event, method +dotnet_naming_symbols.非字段成员.applicable_accessibilities = public, friend, private, protected, protected_friend, private_protected +dotnet_naming_symbols.非字段成员.required_modifiers = + +# 命名样式 + +dotnet_naming_style.以_i_开始.required_prefix = I +dotnet_naming_style.以_i_开始.required_suffix = +dotnet_naming_style.以_i_开始.word_separator = +dotnet_naming_style.以_i_开始.capitalization = pascal_case + +dotnet_naming_style.帕斯卡拼写法.required_prefix = dotenv \ No newline at end of file diff --git a/.filenesting.json b/.filenesting.json index 02e0346e..0b719662 100644 --- a/.filenesting.json +++ b/.filenesting.json @@ -1,3 +1,3 @@ -{ - "help":"https://go.microsoft.com/fwlink/?linkid=866610" +{ + "help":"https://go.microsoft.com/fwlink/?linkid=866610" } \ No newline at end of file diff --git a/.gitignore b/.gitignore index 337546de..26aa3a09 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,14 @@ -/build -/.idea -/.vs -/.vscode -*/obj -*/bin -*/build -*/Debug -*/Release -/TestResults -*/x64 -*/.vs -/StgSharp.Native/lib -obj +/build +/.idea +/.vs +/.vscode +*/obj +*/bin +*/build +*/Debug +*/Release +/TestResults +*/x64 +*/.vs +/StgSharp.Native/lib +obj diff --git a/GenerateGL.sln b/GenerateGL.sln index 33ab9bfb..dc07a6b6 100644 --- a/GenerateGL.sln +++ b/GenerateGL.sln @@ -1,37 +1,37 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.14.36705.20 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GenerateGL", "StgSharp.GenerateGL\GenerateGL.csproj", "{9FD27EE6-E94D-4E64-A13B-5A349DEA215A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StgSharp.Common", "StgSharp.Common\StgSharp.Common.csproj", "{5D646C0E-CCF8-B5B4-7DE8-1C37542E7B4D}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {9FD27EE6-E94D-4E64-A13B-5A349DEA215A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9FD27EE6-E94D-4E64-A13B-5A349DEA215A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9FD27EE6-E94D-4E64-A13B-5A349DEA215A}.Debug|x64.ActiveCfg = Debug|x64 - {9FD27EE6-E94D-4E64-A13B-5A349DEA215A}.Debug|x64.Build.0 = Debug|x64 - {9FD27EE6-E94D-4E64-A13B-5A349DEA215A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9FD27EE6-E94D-4E64-A13B-5A349DEA215A}.Release|Any CPU.Build.0 = Release|Any CPU - {9FD27EE6-E94D-4E64-A13B-5A349DEA215A}.Release|x64.ActiveCfg = Release|x64 - {9FD27EE6-E94D-4E64-A13B-5A349DEA215A}.Release|x64.Build.0 = Release|x64 - {5D646C0E-CCF8-B5B4-7DE8-1C37542E7B4D}.Debug|Any CPU.ActiveCfg = Debug|x64 - {5D646C0E-CCF8-B5B4-7DE8-1C37542E7B4D}.Debug|x64.ActiveCfg = Debug|x64 - {5D646C0E-CCF8-B5B4-7DE8-1C37542E7B4D}.Release|Any CPU.ActiveCfg = Release|x64 - {5D646C0E-CCF8-B5B4-7DE8-1C37542E7B4D}.Release|x64.ActiveCfg = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {AC71C01F-9867-4E43-85AB-4A8A7896B1BC} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.14.36705.20 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GenerateGL", "StgSharp.GenerateGL\GenerateGL.csproj", "{9FD27EE6-E94D-4E64-A13B-5A349DEA215A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StgSharp.Common", "StgSharp.Common\StgSharp.Common.csproj", "{5D646C0E-CCF8-B5B4-7DE8-1C37542E7B4D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9FD27EE6-E94D-4E64-A13B-5A349DEA215A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9FD27EE6-E94D-4E64-A13B-5A349DEA215A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9FD27EE6-E94D-4E64-A13B-5A349DEA215A}.Debug|x64.ActiveCfg = Debug|x64 + {9FD27EE6-E94D-4E64-A13B-5A349DEA215A}.Debug|x64.Build.0 = Debug|x64 + {9FD27EE6-E94D-4E64-A13B-5A349DEA215A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9FD27EE6-E94D-4E64-A13B-5A349DEA215A}.Release|Any CPU.Build.0 = Release|Any CPU + {9FD27EE6-E94D-4E64-A13B-5A349DEA215A}.Release|x64.ActiveCfg = Release|x64 + {9FD27EE6-E94D-4E64-A13B-5A349DEA215A}.Release|x64.Build.0 = Release|x64 + {5D646C0E-CCF8-B5B4-7DE8-1C37542E7B4D}.Debug|Any CPU.ActiveCfg = Debug|x64 + {5D646C0E-CCF8-B5B4-7DE8-1C37542E7B4D}.Debug|x64.ActiveCfg = Debug|x64 + {5D646C0E-CCF8-B5B4-7DE8-1C37542E7B4D}.Release|Any CPU.ActiveCfg = Release|x64 + {5D646C0E-CCF8-B5B4-7DE8-1C37542E7B4D}.Release|x64.ActiveCfg = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {AC71C01F-9867-4E43-85AB-4A8A7896B1BC} + EndGlobalSection +EndGlobal diff --git a/LICENSE b/LICENSE index fde17945..6ca16d5a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,155 +1,155 @@ -MIT License - -Copyright (c) 2024 Nitload StgSharp Team - -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. - -StgSharp program uses the following open source projects, -I'd like to refer to them here and show my sincere appreciation, -while the names are sorted in no particular order - -1. GLFW - - Remote repository on: https://www.glfw.org/ - - License of GLFW: - - Copyright (c) 2002-2006 Marcus Geelnard - - Copyright (c) 2006-2019 Camilla Löwy - - This software is provided 'as-is', - without any express or implied warranty. - In no event will the authors be held liable for - any damages arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it freely, - subject to the following restrictions: - - The origin of this software must not be misrepresented; - you must not claim that you wrote the original software. - If you use this software in a product, an acknowledgment - in the product documentation would be appreciated but is not required. - - Altered source versions must be plainly marked as such, - and must not be misrepresented as being the original software. - - This notice may not be removed or altered from any source distribution. - -2. GLAD, Khronos Specifications and other Specification headers - - Web service available on https://gen.glad.sh/ - - The glad source code: - - The MIT License (MIT) - - Copyright (c) 2013-2022 David Herberth - - 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. - - - The Khronos Specifications: - - Copyright (c) 2013-2020 The Khronos Group Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -3. docs.gl - -4. Terminal.GUI - - Remote repository on: https://github.com/gui-cs/Terminal.Gui - - License of Terminal.GUI: - - Copyright 2007-2011 Novell Inc - Copyright 2017 Microsoft Corp - - 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. - -5. IxMilia.Step - - License of IxMilia.Step: - - The MIT License (MIT) - - Copyright (c) IxMilia. - 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. +MIT License + +Copyright (c) 2024 Nitload StgSharp Team + +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. + +StgSharp program uses the following open source projects, +I'd like to refer to them here and show my sincere appreciation, +while the names are sorted in no particular order + +1. GLFW + + Remote repository on: https://www.glfw.org/ + + License of GLFW: + + Copyright (c) 2002-2006 Marcus Geelnard + + Copyright (c) 2006-2019 Camilla Löwy + + This software is provided 'as-is', + without any express or implied warranty. + In no event will the authors be held liable for + any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it freely, + subject to the following restrictions: + + The origin of this software must not be misrepresented; + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is not required. + + Altered source versions must be plainly marked as such, + and must not be misrepresented as being the original software. + + This notice may not be removed or altered from any source distribution. + +2. GLAD, Khronos Specifications and other Specification headers + + Web service available on https://gen.glad.sh/ + + The glad source code: + + The MIT License (MIT) + + Copyright (c) 2013-2022 David Herberth + + 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. + + + The Khronos Specifications: + + Copyright (c) 2013-2020 The Khronos Group Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +3. docs.gl + +4. Terminal.GUI + + Remote repository on: https://github.com/gui-cs/Terminal.Gui + + License of Terminal.GUI: + + Copyright 2007-2011 Novell Inc + Copyright 2017 Microsoft Corp + + 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. + +5. IxMilia.Step + + License of IxMilia.Step: + + The MIT License (MIT) + + Copyright (c) IxMilia. + 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. diff --git a/ReadMe.md b/ReadMe.md index 8f5fe7ea..e55637af 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,240 +1,240 @@ -# StgSharp - -![StgSharp Logo](STG%23LOGO.png) - -StgSharp is a modern C# framework that combines game engine capabilities with high-performance computing features. Originally designed as a next-generation STG (Shoot 'em Up) game engine, it has evolved to include advanced mathematical libraries, parallel computing capabilities, and comprehensive graphics APIs. - -## Overview - -StgSharp provides both low-level and high-level bindings to OpenGL, multimedia control, and device management, offering everything needed to create STG games and high-performance applications. The framework is built on .NET 8 and supports Windows and Linux platforms. - -## Core Modules - -### StgSharp.Common - -The foundational library containing shared functionality: - -- **Mathematics**: High-performance linear algebra, matrix operations, and mathematical utilities -- **Graphics**: OpenGL bindings, rendering pipeline, and graphics framework -- **High Performance**: SIMD operations, memory management, and parallel computing -- **Collections**: Specialized data structures and containers -- **MVVM**: Model-View-ViewModel framework for UI applications -- **Entities**: Game entity system and behavior management -- **Environment**: Platform abstraction and system integration - -### StgSharp.Mathematics (Numeric) - -Numerics and linear algebra built on top of the core library: - -- **Matrix & Vector Types**: High-performance math primitives -- **Numeric Utilities**: Core numeric helpers and algorithms -- **SIMD-Friendly Kernels**: Data layouts optimized for hardware acceleration - -### StgSharp.RegularAnalysis - -Regular-language and parsing infrastructure (replaces the former Script module): - -- **Regex/Automata Core**: Regular expression processing and automata utilities -- **Parsing Primitives**: Reusable tokenizer and grammar building blocks -- **Analysis Pipeline**: Structured processing for language-like inputs - -### StgSharp.Native - -Native library integration: - -- **GLFW Integration**: Cross-platform window and input management -- **SIMD Operations**: Hardware-accelerated vector operations -- **Matrix Kernels**: Optimized matrix computation routines -- **Context Management**: Graphics context and resource management - -### StgSharp.Device - -Low-level device and port abstractions: - -- **Command Interfaces**: Command shapes and serialization contracts -- **Port Control**: Stream-oriented device access -- **Decoder/Response Models**: Protocol-level data handling - -### StgSharp.TerminalDialogue - -Terminal-based user interface application and components: - -- **Interactive Terminal**: Command-line UI components -- **Dialogue System**: User interaction and input handling -- **Terminal Graphics**: Text-based UI rendering - -> Note: The legacy Script module has been superseded by RegularAnalysis. The Model module is under refactoring and is currently out of the core framework. - -## Key Features - -### High-Performance Computing - -- **Parallel Matrix Operations**: Multi-threaded matrix computations with optimized scheduling -- **SIMD Acceleration**: Hardware-optimized vector operations -- **Memory Management**: Custom allocators including HLSF (Hybrid Layer Segregated Fit) -- **Thread Pool Management**: Efficient task scheduling and execution - -#### HLSF Benchmark Snapshot (BenchmarkDotNet) - -``` - -BenchmarkDotNet v0.14.0, Windows 11 (10.0.26100.7623) -AMD Ryzen 7 6800H with Radeon Graphics, 1 CPU, 16 logical and 8 physical cores -.NET SDK 10.0.102 - [Host] : .NET 8.0.23 (8.0.2325.60607), X64 RyuJIT AVX2 - -Toolchain=InProcessEmitToolchain InvocationCount=2048 UnrollFactor=1 - -``` - -| Method | Mean | Error | StdDev | Ratio | RatioSD | -|------- |-----:|-----:|------:|------:|-------:| -| Hlsf | 76.23 µs | 0.355 µs | 0.315 µs | 0.44 | 0.01 | -| Libc | 172.98 µs | 3.042 µs | 2.988 µs | 1.00 | 0.02 | - -This benchmark measures steady-state small-block allocation throughput (64B–4KB), -which represents the dominant allocation pattern in StgSharp's matrix computation pipeline. -HLSF uses a pre-allocated arena with size-class free lists, avoiding kernel-mode allocation calls. -Under this workload, HLSF achieves ~2.3× throughput over system malloc. This is not a general-purpose allocator comparison. - -### Graphics and Rendering - -- **OpenGL Integration**: Complete OpenGL API coverage -- **Cross-Platform Support**: Windows and Linux compatibility -- **Rendering Pipeline**: Flexible and extensible graphics framework -- **Shader Management**: Dynamic shader compilation and management - -### Game Engine Capabilities - -- **Entity System**: Flexible game object management -- **State Machine**: Game state and behavior management -- **Input Handling**: Comprehensive input and control systems -- **Resource Management**: Efficient asset loading and management - -### Data Processing - -- **STEP File Support**: Industrial data format processing -- **EXPRESS Language**: Domain-specific language compilation -- **Pipeline Processing**: Efficient data transformation workflows - -## Requirements - -- .NET 8.0 or later -- Windows 10/11 or Linux -- x64 or ARM64 architecture -- OpenGL 3.3+ support - -## Installation - -StgSharp is currently in development and requires compilation from source. **NuGet packages are not yet available** - you must build the project from source code. - -### Prerequisites - -- **Windows**: Visual Studio 2022 or later with C++ development tools -- **Linux**: CMake and compatible C++ compiler (planned support) -- .NET 8.0 SDK or later -- Git for source code retrieval - -### Building from Source - -1. **Clone the repository**: - - ```bash - git clone https://github.com/Nitload-NSI/StgSharp.git - cd StgSharp - ``` - -2. **Windows (Recommended)**: - - Open `StgSharp.sln` in Visual Studio - - Build the solution (Debug or Release configuration) - - The native components will be automatically compiled - -3. **Linux (Experimental)**: - - ```bash - # Build .NET components only - # Note: Native components are not yet supported on Linux - dotnet build - ``` - -### Build Configuration - -- **Debug**: Full debugging symbols, unoptimized -- **Release**: Optimized for performance - -### Notes - -- Windows compilation with Visual Studio is fully supported and tested -- Linux support is experimental and limited to .NET components only -- Native components (StgSharp.Native) are currently Windows-only and require MSVC -- CMake support for native components is not yet implemented -- Some features may not be available on all platforms - -## Quick Start - -### Basic Graphics Application - -```csharp - -/*To be implemented*/ - -``` - -### Matrix Operations - -```csharp -using StgSharp.Mathematics; - -// Create matrices -var matrixA = Matrix.Create(4, 4); -var matrixB = Matrix.Create(4, 4); - -// Perform parallel matrix multiplication -var result = matrixA * matrixB; -``` - -### Memory Management - -```csharp -using StgSharp.HighPerformance.Memory; - -// Create high-performance allocator -using var allocator = new HybridLayerSegregatedFitAllocator(64 * 1024 * 1024); - -// Allocate memory -var handle = allocator.Alloc(1024); -// Use allocated memory -allocator.Free(handle); -``` - - -## Documentation - -### Technical Documentation - -- [HLSF Allocator](StgSharp.Common/HighPerformance/Memory/InroductionToHLSF.md) - High-performance memory allocator documentation -- [Native Library Naming](StgSharp.Native/naming.md) - Native library file naming conventions - -## Contributing - -StgSharp is developed by Nitload Space. Contributions are welcome, particularly in: - -- Performance optimizations -- Cross-platform compatibility -- Documentation improvements -- New feature implementations - -## License - -StgSharp is licensed under the MIT License. See [LICENSE](LICENSE) for details. - -## Future Plans - -- **Vulkan Support**: Planned for version 2.0 -- **Enhanced Cross-Platform**: Improved Linux and mobile support -- **Performance Optimizations**: Further SIMD and parallel processing improvements -- **Extended Language Support**: Additional domain-specific languages - -## Support - +# StgSharp + +![StgSharp Logo](STG%23LOGO.png) + +StgSharp is a modern C# framework that combines game engine capabilities with high-performance computing features. Originally designed as a next-generation STG (Shoot 'em Up) game engine, it has evolved to include advanced mathematical libraries, parallel computing capabilities, and comprehensive graphics APIs. + +## Overview + +StgSharp provides both low-level and high-level bindings to OpenGL, multimedia control, and device management, offering everything needed to create STG games and high-performance applications. The framework is built on .NET 8 and supports Windows and Linux platforms. + +## Core Modules + +### StgSharp.Common + +The foundational library containing shared functionality: + +- **Mathematics**: High-performance linear algebra, matrix operations, and mathematical utilities +- **Graphics**: OpenGL bindings, rendering pipeline, and graphics framework +- **High Performance**: SIMD operations, memory management, and parallel computing +- **Collections**: Specialized data structures and containers +- **MVVM**: Model-View-ViewModel framework for UI applications +- **Entities**: Game entity system and behavior management +- **Environment**: Platform abstraction and system integration + +### StgSharp.Mathematics (Numeric) + +Numerics and linear algebra built on top of the core library: + +- **Matrix & Vector Types**: High-performance math primitives +- **Numeric Utilities**: Core numeric helpers and algorithms +- **SIMD-Friendly Kernels**: Data layouts optimized for hardware acceleration + +### StgSharp.RegularAnalysis + +Regular-language and parsing infrastructure (replaces the former Script module): + +- **Regex/Automata Core**: Regular expression processing and automata utilities +- **Parsing Primitives**: Reusable tokenizer and grammar building blocks +- **Analysis Pipeline**: Structured processing for language-like inputs + +### StgSharp.Native + +Native library integration: + +- **GLFW Integration**: Cross-platform window and input management +- **SIMD Operations**: Hardware-accelerated vector operations +- **Matrix Kernels**: Optimized matrix computation routines +- **Context Management**: Graphics context and resource management + +### StgSharp.Device + +Low-level device and port abstractions: + +- **Command Interfaces**: Command shapes and serialization contracts +- **Port Control**: Stream-oriented device access +- **Decoder/Response Models**: Protocol-level data handling + +### StgSharp.TerminalDialogue + +Terminal-based user interface application and components: + +- **Interactive Terminal**: Command-line UI components +- **Dialogue System**: User interaction and input handling +- **Terminal Graphics**: Text-based UI rendering + +> Note: The legacy Script module has been superseded by RegularAnalysis. The Model module is under refactoring and is currently out of the core framework. + +## Key Features + +### High-Performance Computing + +- **Parallel Matrix Operations**: Multi-threaded matrix computations with optimized scheduling +- **SIMD Acceleration**: Hardware-optimized vector operations +- **Memory Management**: Custom allocators including HLSF (Hybrid Layer Segregated Fit) +- **Thread Pool Management**: Efficient task scheduling and execution + +#### HLSF Benchmark Snapshot (BenchmarkDotNet) + +``` + +BenchmarkDotNet v0.14.0, Windows 11 (10.0.26100.7623) +AMD Ryzen 7 6800H with Radeon Graphics, 1 CPU, 16 logical and 8 physical cores +.NET SDK 10.0.102 + [Host] : .NET 8.0.23 (8.0.2325.60607), X64 RyuJIT AVX2 + +Toolchain=InProcessEmitToolchain InvocationCount=2048 UnrollFactor=1 + +``` + +| Method | Mean | Error | StdDev | Ratio | RatioSD | +|------- |-----:|-----:|------:|------:|-------:| +| Hlsf | 76.23 µs | 0.355 µs | 0.315 µs | 0.44 | 0.01 | +| Libc | 172.98 µs | 3.042 µs | 2.988 µs | 1.00 | 0.02 | + +This benchmark measures steady-state small-block allocation throughput (64B–4KB), +which represents the dominant allocation pattern in StgSharp's matrix computation pipeline. +HLSF uses a pre-allocated arena with size-class free lists, avoiding kernel-mode allocation calls. +Under this workload, HLSF achieves ~2.3× throughput over system malloc. This is not a general-purpose allocator comparison. + +### Graphics and Rendering + +- **OpenGL Integration**: Complete OpenGL API coverage +- **Cross-Platform Support**: Windows and Linux compatibility +- **Rendering Pipeline**: Flexible and extensible graphics framework +- **Shader Management**: Dynamic shader compilation and management + +### Game Engine Capabilities + +- **Entity System**: Flexible game object management +- **State Machine**: Game state and behavior management +- **Input Handling**: Comprehensive input and control systems +- **Resource Management**: Efficient asset loading and management + +### Data Processing + +- **STEP File Support**: Industrial data format processing +- **EXPRESS Language**: Domain-specific language compilation +- **Pipeline Processing**: Efficient data transformation workflows + +## Requirements + +- .NET 8.0 or later +- Windows 10/11 or Linux +- x64 or ARM64 architecture +- OpenGL 3.3+ support + +## Installation + +StgSharp is currently in development and requires compilation from source. **NuGet packages are not yet available** - you must build the project from source code. + +### Prerequisites + +- **Windows**: Visual Studio 2022 or later with C++ development tools +- **Linux**: CMake and compatible C++ compiler (planned support) +- .NET 8.0 SDK or later +- Git for source code retrieval + +### Building from Source + +1. **Clone the repository**: + + ```bash + git clone https://github.com/Nitload-NSI/StgSharp.git + cd StgSharp + ``` + +2. **Windows (Recommended)**: + - Open `StgSharp.sln` in Visual Studio + - Build the solution (Debug or Release configuration) + - The native components will be automatically compiled + +3. **Linux (Experimental)**: + + ```bash + # Build .NET components only + # Note: Native components are not yet supported on Linux + dotnet build + ``` + +### Build Configuration + +- **Debug**: Full debugging symbols, unoptimized +- **Release**: Optimized for performance + +### Notes + +- Windows compilation with Visual Studio is fully supported and tested +- Linux support is experimental and limited to .NET components only +- Native components (StgSharp.Native) are currently Windows-only and require MSVC +- CMake support for native components is not yet implemented +- Some features may not be available on all platforms + +## Quick Start + +### Basic Graphics Application + +```csharp + +/*To be implemented*/ + +``` + +### Matrix Operations + +```csharp +using StgSharp.Mathematics; + +// Create matrices +var matrixA = Matrix.Create(4, 4); +var matrixB = Matrix.Create(4, 4); + +// Perform parallel matrix multiplication +var result = matrixA * matrixB; +``` + +### Memory Management + +```csharp +using StgSharp.HighPerformance.Memory; + +// Create high-performance allocator +using var allocator = new HybridLayerSegregatedFitAllocator(64 * 1024 * 1024); + +// Allocate memory +var handle = allocator.Alloc(1024); +// Use allocated memory +allocator.Free(handle); +``` + + +## Documentation + +### Technical Documentation + +- [HLSF Allocator](StgSharp.Common/HighPerformance/Memory/InroductionToHLSF.md) - High-performance memory allocator documentation +- [Native Library Naming](StgSharp.Native/naming.md) - Native library file naming conventions + +## Contributing + +StgSharp is developed by Nitload Space. Contributions are welcome, particularly in: + +- Performance optimizations +- Cross-platform compatibility +- Documentation improvements +- New feature implementations + +## License + +StgSharp is licensed under the MIT License. See [LICENSE](LICENSE) for details. + +## Future Plans + +- **Vulkan Support**: Planned for version 2.0 +- **Enhanced Cross-Platform**: Improved Linux and mobile support +- **Performance Optimizations**: Further SIMD and parallel processing improvements +- **Extended Language Support**: Additional domain-specific languages + +## Support + For questions, issues, or contributions, please refer to the project repository or contact the development team. \ No newline at end of file diff --git a/STgSharpTest/StgSharpTest.csproj b/STgSharpTest/StgSharpTest.csproj index 3fba34d9..1ef69cc8 100644 --- a/STgSharpTest/StgSharpTest.csproj +++ b/STgSharpTest/StgSharpTest.csproj @@ -1,36 +1,36 @@ - - - - net8.0 - enable - enable - preview - false - true - AnyCPU;x64 - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + net8.0 + enable + enable + preview + false + true + AnyCPU;x64 + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/STgSharpTest/UnitTest1.cs b/STgSharpTest/UnitTest1.cs index 289b2eaa..3b842f5b 100644 --- a/STgSharpTest/UnitTest1.cs +++ b/STgSharpTest/UnitTest1.cs @@ -1,118 +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()); - } - } - - -} +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// 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.Benchmark/HlsfAllocatorBench.cs b/StgSharp.Benchmark/HlsfAllocatorBench.cs index 2d38e93b..cf3d09b8 100644 --- a/StgSharp.Benchmark/HlsfAllocatorBench.cs +++ b/StgSharp.Benchmark/HlsfAllocatorBench.cs @@ -1,155 +1,155 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="HlsfAllocatorBench" -// 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 BenchmarkDotNet.Attributes; -using StgSharp.Mathematics.Memory; -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; - -namespace StgSharp.Benchmark -{ - [MemoryDiagnoser] - [InvocationCount(2048)] - public class HlsfAllocatorBench - { - - private const uint Alignment = 64; - - private const int AllocationCount = 2048; - - private static readonly int[] AllocSizes = [ - 64, - 96, - 150, - 200, - 400, - 1024, - 4096 - ]; - private HybridLayerSegregatedFitAllocator _hlsfAllocator = null!; - private readonly List _hlsfLocalList = new(); - private readonly List _libcLocalList = new(); - private Random _random = new(42); - - [GlobalCleanup] - public void Cleanup() - { - _hlsfAllocator?.Dispose(); - _hlsfLocalList.Clear(); - _hlsfLocalList.TrimExcess(); - _libcLocalList.Clear(); - _libcLocalList.TrimExcess(); - } - - [Benchmark] - public void Hlsf() - { - RunHlsf(_hlsfAllocator, FreePolicy.NoCollect); - } - - [IterationSetup] - public void IterationSetup() - { - _hlsfLocalList.Clear(); - _libcLocalList.Clear(); - } - - [Benchmark(Baseline = true)] - public unsafe void Libc() - { - _libcLocalList.Clear(); - - for (int i = 0; i < AllocationCount; i++) - { - uint size = AlignSize(GetNextRandomSize()); - void* allocate = NativeMemory.AlignedAlloc(size, Alignment); - if (allocate == null) { - throw new OutOfMemoryException("NativeMemory.AlignedAlloc returned null."); - } - _libcLocalList.Add((nint)allocate); - } - - for (int i = 0; i < _libcLocalList.Count; i++) { - NativeMemory.AlignedFree((void*)_libcLocalList[i]); - } - } - - [GlobalSetup] - public void Setup() - { - _random = new Random(42); - _hlsfAllocator = new HybridLayerSegregatedFitAllocator(GetArenaBytes(), align:(int)Alignment); - } - - private static uint AlignSize( - uint size - ) - { - uint mask = Alignment - 1; - return (size + mask) & ~mask; - } - - private static nuint GetArenaBytes() - { - const int defaultMb = 512; - const int minMb = 64; - int mb = defaultMb; - - string? env = Environment.GetEnvironmentVariable("HLSF_BENCH_ARENA_MB"); - if (!string.IsNullOrWhiteSpace(env) && - int.TryParse(env, out int parsed) && - parsed >= minMb) { - mb = parsed; - } - - return (nuint)mb * 1024u * 1024u; - } - - private uint GetNextRandomSize() => (uint)AllocSizes[_random.Next(AllocSizes.Length)]; - - private void RunHlsf( - HybridLayerSegregatedFitAllocator allocator, - FreePolicy policy - ) - { - _hlsfLocalList.Clear(); - - for (int i = 0; i < AllocationCount; i++) - { - uint size = AlignSize(GetNextRandomSize()); - HybridLayerSegregatedFitAllocationHandle allocate = allocator.Alloc(size); - _hlsfLocalList.Add(allocate); - } - - for (int i = 0; i < _hlsfLocalList.Count; i++) { - allocator.Free(_hlsfLocalList[i], policy); - } - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="HlsfAllocatorBench" +// 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 BenchmarkDotNet.Attributes; +using StgSharp.Mathematics.Memory; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; + +namespace StgSharp.Benchmark +{ + [MemoryDiagnoser] + [InvocationCount(2048)] + public class HlsfAllocatorBench + { + + private const uint Alignment = 64; + + private const int AllocationCount = 2048; + + private static readonly int[] AllocSizes = [ + 64, + 96, + 150, + 200, + 400, + 1024, + 4096 + ]; + private HybridLayerSegregatedFitAllocator _hlsfAllocator = null!; + private readonly List _hlsfLocalList = new(); + private readonly List _libcLocalList = new(); + private Random _random = new(42); + + [GlobalCleanup] + public void Cleanup() + { + _hlsfAllocator?.Dispose(); + _hlsfLocalList.Clear(); + _hlsfLocalList.TrimExcess(); + _libcLocalList.Clear(); + _libcLocalList.TrimExcess(); + } + + [Benchmark] + public void Hlsf() + { + RunHlsf(_hlsfAllocator, FreePolicy.NoCollect); + } + + [IterationSetup] + public void IterationSetup() + { + _hlsfLocalList.Clear(); + _libcLocalList.Clear(); + } + + [Benchmark(Baseline = true)] + public unsafe void Libc() + { + _libcLocalList.Clear(); + + for (int i = 0; i < AllocationCount; i++) + { + uint size = AlignSize(GetNextRandomSize()); + void* allocate = NativeMemory.AlignedAlloc(size, Alignment); + if (allocate == null) { + throw new OutOfMemoryException("NativeMemory.AlignedAlloc returned null."); + } + _libcLocalList.Add((nint)allocate); + } + + for (int i = 0; i < _libcLocalList.Count; i++) { + NativeMemory.AlignedFree((void*)_libcLocalList[i]); + } + } + + [GlobalSetup] + public void Setup() + { + _random = new Random(42); + _hlsfAllocator = new HybridLayerSegregatedFitAllocator(GetArenaBytes(), align:(int)Alignment); + } + + private static uint AlignSize( + uint size + ) + { + uint mask = Alignment - 1; + return (size + mask) & ~mask; + } + + private static nuint GetArenaBytes() + { + const int defaultMb = 512; + const int minMb = 64; + int mb = defaultMb; + + string? env = Environment.GetEnvironmentVariable("HLSF_BENCH_ARENA_MB"); + if (!string.IsNullOrWhiteSpace(env) && + int.TryParse(env, out int parsed) && + parsed >= minMb) { + mb = parsed; + } + + return (nuint)mb * 1024u * 1024u; + } + + private uint GetNextRandomSize() => (uint)AllocSizes[_random.Next(AllocSizes.Length)]; + + private void RunHlsf( + HybridLayerSegregatedFitAllocator allocator, + FreePolicy policy + ) + { + _hlsfLocalList.Clear(); + + for (int i = 0; i < AllocationCount; i++) + { + uint size = AlignSize(GetNextRandomSize()); + HybridLayerSegregatedFitAllocationHandle allocate = allocator.Alloc(size); + _hlsfLocalList.Add(allocate); + } + + for (int i = 0; i < _hlsfLocalList.Count; i++) { + allocator.Free(_hlsfLocalList[i], policy); + } + } + + } +} diff --git a/StgSharp.Benchmark/Program.cs b/StgSharp.Benchmark/Program.cs index 5082f864..8cb1ddb1 100644 --- a/StgSharp.Benchmark/Program.cs +++ b/StgSharp.Benchmark/Program.cs @@ -1,52 +1,52 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="Program" -// 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 BenchmarkDotNet.Configs; -using BenchmarkDotNet.Jobs; -using BenchmarkDotNet.Loggers; -using BenchmarkDotNet.Running; -using BenchmarkDotNet.Toolchains.InProcess.Emit; -using StgSharp.Benchmark; - -namespace StgSharp.Benchmark -{ - internal static class Program - { - - private static void Main( - string[] args - ) - { - IConfig config = ManualConfig.Create(DefaultConfig.Instance) - .AddLogger(ConsoleLogger.Default) - .AddJob(Job.Default - .WithToolchain(InProcessEmitToolchain.Instance)); - _ = BenchmarkRunner.Run(config); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="Program" +// 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 BenchmarkDotNet.Configs; +using BenchmarkDotNet.Jobs; +using BenchmarkDotNet.Loggers; +using BenchmarkDotNet.Running; +using BenchmarkDotNet.Toolchains.InProcess.Emit; +using StgSharp.Benchmark; + +namespace StgSharp.Benchmark +{ + internal static class Program + { + + private static void Main( + string[] args + ) + { + IConfig config = ManualConfig.Create(DefaultConfig.Instance) + .AddLogger(ConsoleLogger.Default) + .AddJob(Job.Default + .WithToolchain(InProcessEmitToolchain.Instance)); + _ = BenchmarkRunner.Run(config); + } + + } +} diff --git a/StgSharp.Benchmark/StgSharp.Benchmark.csproj b/StgSharp.Benchmark/StgSharp.Benchmark.csproj index 530fc952..47e94ad8 100644 --- a/StgSharp.Benchmark/StgSharp.Benchmark.csproj +++ b/StgSharp.Benchmark/StgSharp.Benchmark.csproj @@ -1,24 +1,24 @@ - - - - $(MSBuildProjectDirectory)\..\ - Exe - - - - - - - - - - - - - - - - - - - + + + + $(MSBuildProjectDirectory)\..\ + Exe + + + + + + + + + + + + + + + + + + + diff --git a/StgSharp.Common/Collections/BidirectionalDictionary.cs b/StgSharp.Common/Collections/BidirectionalDictionary.cs index f49016ac..7969ef15 100644 --- a/StgSharp.Common/Collections/BidirectionalDictionary.cs +++ b/StgSharp.Common/Collections/BidirectionalDictionary.cs @@ -1,194 +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(); - } - - } +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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/CapacityFixedBag.cs b/StgSharp.Common/Collections/CapacityFixedBag.cs index 606bda36..bb1fbd5a 100644 --- a/StgSharp.Common/Collections/CapacityFixedBag.cs +++ b/StgSharp.Common/Collections/CapacityFixedBag.cs @@ -1,92 +1,92 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="CapacityFixedBag" -// 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.Reflection; - -namespace StgSharp.Collections -{ - public sealed class CapacityFixedBag : IEnumerable - { - - private readonly T[] _buffer; - - public CapacityFixedBag(int capacity) - { - _buffer = new T[capacity]; - } - - public int Count { get; set; } - - public int Capacity => _buffer.Length; - - public void Add(T item) - { - if (Count >= _buffer.Length) { - throw new InvalidOperationException("Bag capacity exceeded."); - } - _buffer[Count] = item; - Count++; - } - - public IEnumerator GetEnumerator() - { - for (int i = 0; i < Count; i++) { - yield return _buffer[i]; - } - } - - public void Remove(T item) - { - int index = Array.IndexOf(_buffer, item, 0, Count); - if (index >= 0) - { - _buffer[index] = _buffer[Count - 1]; - _buffer[Count - 1] = default!; - Count--; - } - } - - public void RemoveAt(int index) - { - if (index >= 0) - { - _buffer[index] = _buffer[Count - 1]; - _buffer[Count - 1] = default!; - Count--; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="CapacityFixedBag" +// 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.Reflection; + +namespace StgSharp.Collections +{ + public sealed class CapacityFixedBag : IEnumerable + { + + private readonly T[] _buffer; + + public CapacityFixedBag(int capacity) + { + _buffer = new T[capacity]; + } + + public int Count { get; set; } + + public int Capacity => _buffer.Length; + + public void Add(T item) + { + if (Count >= _buffer.Length) { + throw new InvalidOperationException("Bag capacity exceeded."); + } + _buffer[Count] = item; + Count++; + } + + public IEnumerator GetEnumerator() + { + for (int i = 0; i < Count; i++) { + yield return _buffer[i]; + } + } + + public void Remove(T item) + { + int index = Array.IndexOf(_buffer, item, 0, Count); + if (index >= 0) + { + _buffer[index] = _buffer[Count - 1]; + _buffer[Count - 1] = default!; + Count--; + } + } + + public void RemoveAt(int index) + { + if (index >= 0) + { + _buffer[index] = _buffer[Count - 1]; + _buffer[Count - 1] = default!; + Count--; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + } +} diff --git a/StgSharp.Common/Collections/CapacityFixedList.cs b/StgSharp.Common/Collections/CapacityFixedList.cs index d1531f60..0f350e27 100644 --- a/StgSharp.Common/Collections/CapacityFixedList.cs +++ b/StgSharp.Common/Collections/CapacityFixedList.cs @@ -1,176 +1,176 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="CapacityFixedList" -// 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 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 readonly int _capacity; - private int _index; - - public CapacityFixedList(int size) - { - _values = new T[size]; - _capacity = size; - } - - public CapacityFixedList(ReadOnlySpan values) - { - _values = values.ToArray(); - } - - public T this[int index] - { - get => index < _index ? _values[index] : throw new ArgumentOutOfRangeException(nameof(index)); - set => _values[index] = index < _index ? value : 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 ------------------------------------------ -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="CapacityFixedList" +// 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 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 readonly int _capacity; + private int _index; + + public CapacityFixedList(int size) + { + _values = new T[size]; + _capacity = size; + } + + public CapacityFixedList(ReadOnlySpan values) + { + _values = values.ToArray(); + } + + public T this[int index] + { + get => index < _index ? _values[index] : throw new ArgumentOutOfRangeException(nameof(index)); + set => _values[index] = index < _index ? value : 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/CapacityFixedStack.cs b/StgSharp.Common/Collections/CapacityFixedStack.cs index 64f7b127..c3c7e7e9 100644 --- a/StgSharp.Common/Collections/CapacityFixedStack.cs +++ b/StgSharp.Common/Collections/CapacityFixedStack.cs @@ -1,174 +1,174 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="CapacityFixedStack" -// 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 System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.CompilerServices; -using System.Threading; - -namespace StgSharp.Collections -{ - [CollectionBuilder(typeof(CapacityFixedStackBuilder), nameof(CapacityFixedStackBuilder.Create))] - public class CapacityFixedStack : IEnumerable - { - - private readonly T[] _values; - - // _index points to the next free slot (top empty position). Therefore Count == _index. - private int _index; - - public CapacityFixedStack(int size) - { - ArgumentOutOfRangeException.ThrowIfNegative(size); - _values = new T[size]; - _index = 0; // empty stack - } - - public T? First => Volatile.Read(ref _index) > 0 ? _values[0] : default; - - public bool IsEmpty => Volatile.Read(ref _index) == 0; - - public int Count => Volatile.Read(ref _index); - - public int Capacity => _values.Length; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public ReadOnlySpan AsSpan() - { - return _values.AsSpan(0, _index); - } - - public void Clear() - { - if (_index > 0) - { - Array.Clear(_values, 0, _index); - _index = 0; - } - } - - public IEnumerator GetEnumerator() - { - for (int i = _index - 1; i >= 0; i--) { - yield return _values[i]; - } - } - - public T Peek() - { - if (_index == 0) { - throw new InvalidOperationException("Stack is empty."); - } - return _values[_index - 1]; - } - - public T Pop() - { - if (_index == 0) { - throw new InvalidOperationException("Stack is empty."); - } - _index--; - T item = _values[_index]; - _values[_index] = default!; // Clear reference for GC - return item; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public T[] PopRange(int count) - { - if (count <= 0 || _index == 0) { - return Array.Empty(); - } - int n = Math.Min(count, _index); - int start = _index - n; - T[] ret = new T[n]; - Array.Copy(_values, start, ret, 0, n); - Array.Clear(_values, start, n); - _index -= n; - return ret; - } - - public void Push(T item) - { - if (_index >= _values.Length) { - throw new InvalidOperationException("Stack is full."); - } - _values[_index] = item; - _index++; - } - - public void PushRange(ReadOnlySpan span) - { - if (span.Length == 0) { - return; - } - if (_index + span.Length > _values.Length) { - throw new InvalidOperationException("Not enough space in the stack to push the entire span."); - } - span.CopyTo(_values.AsSpan(_index, span.Length)); - _index += span.Length; - } - - public bool TryPop(out T value) - { - if (_index == 0) - { - value = default!; - return false; - } - _index--; - value = _values[_index]; - _values[_index] = default!; - return true; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal Span GetValueLayout() - { - return _values.AsSpan(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - } - - public static class CapacityFixedStackBuilder - { - - public static CapacityFixedStack Create(ReadOnlySpan values) - { - CapacityFixedStack stack = new(values.Length); - stack.PushRange(values); // Push in order - return stack; - } - - } +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="CapacityFixedStack" +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using System.Threading; + +namespace StgSharp.Collections +{ + [CollectionBuilder(typeof(CapacityFixedStackBuilder), nameof(CapacityFixedStackBuilder.Create))] + public class CapacityFixedStack : IEnumerable + { + + private readonly T[] _values; + + // _index points to the next free slot (top empty position). Therefore Count == _index. + private int _index; + + public CapacityFixedStack(int size) + { + ArgumentOutOfRangeException.ThrowIfNegative(size); + _values = new T[size]; + _index = 0; // empty stack + } + + public T? First => Volatile.Read(ref _index) > 0 ? _values[0] : default; + + public bool IsEmpty => Volatile.Read(ref _index) == 0; + + public int Count => Volatile.Read(ref _index); + + public int Capacity => _values.Length; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ReadOnlySpan AsSpan() + { + return _values.AsSpan(0, _index); + } + + public void Clear() + { + if (_index > 0) + { + Array.Clear(_values, 0, _index); + _index = 0; + } + } + + public IEnumerator GetEnumerator() + { + for (int i = _index - 1; i >= 0; i--) { + yield return _values[i]; + } + } + + public T Peek() + { + if (_index == 0) { + throw new InvalidOperationException("Stack is empty."); + } + return _values[_index - 1]; + } + + public T Pop() + { + if (_index == 0) { + throw new InvalidOperationException("Stack is empty."); + } + _index--; + T item = _values[_index]; + _values[_index] = default!; // Clear reference for GC + return item; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public T[] PopRange(int count) + { + if (count <= 0 || _index == 0) { + return Array.Empty(); + } + int n = Math.Min(count, _index); + int start = _index - n; + T[] ret = new T[n]; + Array.Copy(_values, start, ret, 0, n); + Array.Clear(_values, start, n); + _index -= n; + return ret; + } + + public void Push(T item) + { + if (_index >= _values.Length) { + throw new InvalidOperationException("Stack is full."); + } + _values[_index] = item; + _index++; + } + + public void PushRange(ReadOnlySpan span) + { + if (span.Length == 0) { + return; + } + if (_index + span.Length > _values.Length) { + throw new InvalidOperationException("Not enough space in the stack to push the entire span."); + } + span.CopyTo(_values.AsSpan(_index, span.Length)); + _index += span.Length; + } + + public bool TryPop(out T value) + { + if (_index == 0) + { + value = default!; + return false; + } + _index--; + value = _values[_index]; + _values[_index] = default!; + return true; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal Span GetValueLayout() + { + return _values.AsSpan(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + } + + public static class CapacityFixedStackBuilder + { + + public static CapacityFixedStack Create(ReadOnlySpan values) + { + CapacityFixedStack stack = new(values.Length); + stack.PushRange(values); // Push in order + return stack; + } + + } } \ No newline at end of file diff --git a/StgSharp.Common/Collections/ConcurrentCapacityFixedStack.cs b/StgSharp.Common/Collections/ConcurrentCapacityFixedStack.cs index 7cd2f911..9c62a4ba 100644 --- a/StgSharp.Common/Collections/ConcurrentCapacityFixedStack.cs +++ b/StgSharp.Common/Collections/ConcurrentCapacityFixedStack.cs @@ -1,287 +1,287 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ConcurrentCapacityFixedStack" -// 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 System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.CompilerServices; -using System.Threading; - -namespace StgSharp.Collections -{ - /// - /// Lock-free, fixed-capacity stack implemented on top of an array using atomic index - /// operations. - No linked list; only array slots - Uses CAS on a shared top index to - /// reserve/release slots - Per-slot state flag to safely publish/consume values under races - /// - public class ConcurrentCapacityFixedStack : IEnumerable - { - - private readonly int[] _states; // 0 = empty, 1 = full - private readonly T[] _values; - private readonly int _capacity; - - // Number of full slots (observable count) - private int _count; - - // Next push position (0.._capacity). Only modified via CAS. - private int _top; - - public ConcurrentCapacityFixedStack(int capacity) - { - if (capacity <= 0) { - throw new ArgumentOutOfRangeException(nameof(capacity)); - } - - _capacity = capacity; - _values = new T[capacity]; - _states = new int[capacity]; - _top = 0; - _count = 0; - } - - public bool IsEmpty => Count == 0; - - public int Capacity => _capacity; - - public int Count => Volatile.Read(ref _count); - - public void Clear() - { - // Pop all elements to return slots to empty state - while (TryPop(out _)) { } - } - - public IEnumerator GetEnumerator() - { - T[] snap = ToArraySnapshot(); - for (int i = 0; i < snap.Length; i++) { - yield return snap[i]; - } - } - - public T Peek() - { - if (TryPeek(out T? v)) { - return v; - } - - throw new InvalidOperationException("Stack is empty."); - } - - public T Pop() - { - if (TryPop(out T value)) { - return value; - } - - throw new InvalidOperationException("Stack is empty."); - } - - public T[] PopRange(int count) - { - if (count <= 0) { - return []; - } - - T[] result = new T[count]; - int i = 0; - for (; i < count; i++) - { - if (!TryPop(out result[i])) - { - break; - } - } - if (i == count) { - return result; - } - - if (i == 0) { - return []; - } - - T[] trimmed = new T[i]; - Array.Copy(result, trimmed, i); - return trimmed; - } - - public void Push(T item) - { - SpinWait sw = default; - while (true) - { - int oldTop = Volatile.Read(ref _top); - if (oldTop >= _capacity) { - throw new InvalidOperationException("Stack is full."); - } - - if (Interlocked.CompareExchange(ref _top, oldTop + 1, oldTop) != oldTop) - { - sw.SpinOnce(); - continue; // failed to reserve slot - } - - // We exclusively own slot oldTop. Publish value then state. - _values[oldTop] = item; - Volatile.Write(ref _states[oldTop], 1); // publish - _ = Interlocked.Increment(ref _count); - return; - } - } - - public void PushRange(ReadOnlySpan span) - { - for (int i = 0; i < span.Length; i++) { - Push(span[i]); - } - } - - /// - /// Best-effort snapshot for enumeration; not strongly consistent under concurrent - /// mutations. - /// - public T[] ToArraySnapshot() - { - int expected = Math.Min(Volatile.Read(ref _count), _capacity); - if (expected == 0) { - return Array.Empty(); - } - - T[] snap = new T[expected]; - int copied = 0; - int idx = Volatile.Read(ref _top) - 1; - while (idx >= 0 && copied < expected) - { - if (Volatile.Read(ref _states[idx]) == 1) { - snap[copied++] = _values[idx]; - } - idx--; - } - - if (copied == snap.Length) { - return snap; - } - - T[] trimmed = new T[copied]; - Array.Copy(snap, trimmed, copied); - return trimmed; - } - - public bool TryPeek(out T value) - { - value = default!; - SpinWait sw = default; - - while (true) - { - int top = Volatile.Read(ref _top); - if (top <= 0) { - return false; - } - int idx = top - 1; - - // If not yet published or racing, retry/spin - if (Volatile.Read(ref _states[idx]) == 0) - { - if (Volatile.Read(ref _top) != top) - { - continue; // head moved, retry - } - sw.SpinOnce(); - continue; - } - - T v = _values[idx]; - - // Validate consistency - if (Volatile.Read(ref _top) == top && Volatile.Read(ref _states[idx]) == 1) - { - value = v; - return true; - } - } - } - - public bool TryPop(out T value) - { - value = default!; - SpinWait sw = default; - - while (true) - { - int oldTop = Volatile.Read(ref _top); - if (oldTop <= 0) - { - return false; // empty - } - - int newTop = oldTop - 1; // index to consume - if (Interlocked.CompareExchange(ref _top, newTop, oldTop) != oldTop) - { - sw.SpinOnce(); - continue; // failed to reserve element - } - - // If producer hasn't published yet, roll back our reservation and retry. - if (Volatile.Read(ref _states[newTop]) == 0) - { - // attempt to restore top; ok if it fails due to concurrent operations - _ = Interlocked.CompareExchange(ref _top, newTop + 1, newTop); - sw.SpinOnce(); - continue; - } - - value = _values[newTop]; - _values[newTop] = default!; // avoid ref retention - Volatile.Write(ref _states[newTop], 0); // mark empty - _ = Interlocked.Decrement(ref _count); - return true; - } - } - - public int TryPopRange(Span destination) - { - if (destination.IsEmpty) { - return 0; - } - - int i = 0; - for (; i < destination.Length; i++) - { - if (!TryPop(out destination[i])) - { - break; - } - } - return i; - } - - IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ConcurrentCapacityFixedStack" +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using System.Threading; + +namespace StgSharp.Collections +{ + /// + /// Lock-free, fixed-capacity stack implemented on top of an array using atomic index + /// operations. - No linked list; only array slots - Uses CAS on a shared top index to + /// reserve/release slots - Per-slot state flag to safely publish/consume values under races + /// + public class ConcurrentCapacityFixedStack : IEnumerable + { + + private readonly int[] _states; // 0 = empty, 1 = full + private readonly T[] _values; + private readonly int _capacity; + + // Number of full slots (observable count) + private int _count; + + // Next push position (0.._capacity). Only modified via CAS. + private int _top; + + public ConcurrentCapacityFixedStack(int capacity) + { + if (capacity <= 0) { + throw new ArgumentOutOfRangeException(nameof(capacity)); + } + + _capacity = capacity; + _values = new T[capacity]; + _states = new int[capacity]; + _top = 0; + _count = 0; + } + + public bool IsEmpty => Count == 0; + + public int Capacity => _capacity; + + public int Count => Volatile.Read(ref _count); + + public void Clear() + { + // Pop all elements to return slots to empty state + while (TryPop(out _)) { } + } + + public IEnumerator GetEnumerator() + { + T[] snap = ToArraySnapshot(); + for (int i = 0; i < snap.Length; i++) { + yield return snap[i]; + } + } + + public T Peek() + { + if (TryPeek(out T? v)) { + return v; + } + + throw new InvalidOperationException("Stack is empty."); + } + + public T Pop() + { + if (TryPop(out T value)) { + return value; + } + + throw new InvalidOperationException("Stack is empty."); + } + + public T[] PopRange(int count) + { + if (count <= 0) { + return []; + } + + T[] result = new T[count]; + int i = 0; + for (; i < count; i++) + { + if (!TryPop(out result[i])) + { + break; + } + } + if (i == count) { + return result; + } + + if (i == 0) { + return []; + } + + T[] trimmed = new T[i]; + Array.Copy(result, trimmed, i); + return trimmed; + } + + public void Push(T item) + { + SpinWait sw = default; + while (true) + { + int oldTop = Volatile.Read(ref _top); + if (oldTop >= _capacity) { + throw new InvalidOperationException("Stack is full."); + } + + if (Interlocked.CompareExchange(ref _top, oldTop + 1, oldTop) != oldTop) + { + sw.SpinOnce(); + continue; // failed to reserve slot + } + + // We exclusively own slot oldTop. Publish value then state. + _values[oldTop] = item; + Volatile.Write(ref _states[oldTop], 1); // publish + _ = Interlocked.Increment(ref _count); + return; + } + } + + public void PushRange(ReadOnlySpan span) + { + for (int i = 0; i < span.Length; i++) { + Push(span[i]); + } + } + + /// + /// Best-effort snapshot for enumeration; not strongly consistent under concurrent + /// mutations. + /// + public T[] ToArraySnapshot() + { + int expected = Math.Min(Volatile.Read(ref _count), _capacity); + if (expected == 0) { + return Array.Empty(); + } + + T[] snap = new T[expected]; + int copied = 0; + int idx = Volatile.Read(ref _top) - 1; + while (idx >= 0 && copied < expected) + { + if (Volatile.Read(ref _states[idx]) == 1) { + snap[copied++] = _values[idx]; + } + idx--; + } + + if (copied == snap.Length) { + return snap; + } + + T[] trimmed = new T[copied]; + Array.Copy(snap, trimmed, copied); + return trimmed; + } + + public bool TryPeek(out T value) + { + value = default!; + SpinWait sw = default; + + while (true) + { + int top = Volatile.Read(ref _top); + if (top <= 0) { + return false; + } + int idx = top - 1; + + // If not yet published or racing, retry/spin + if (Volatile.Read(ref _states[idx]) == 0) + { + if (Volatile.Read(ref _top) != top) + { + continue; // head moved, retry + } + sw.SpinOnce(); + continue; + } + + T v = _values[idx]; + + // Validate consistency + if (Volatile.Read(ref _top) == top && Volatile.Read(ref _states[idx]) == 1) + { + value = v; + return true; + } + } + } + + public bool TryPop(out T value) + { + value = default!; + SpinWait sw = default; + + while (true) + { + int oldTop = Volatile.Read(ref _top); + if (oldTop <= 0) + { + return false; // empty + } + + int newTop = oldTop - 1; // index to consume + if (Interlocked.CompareExchange(ref _top, newTop, oldTop) != oldTop) + { + sw.SpinOnce(); + continue; // failed to reserve element + } + + // If producer hasn't published yet, roll back our reservation and retry. + if (Volatile.Read(ref _states[newTop]) == 0) + { + // attempt to restore top; ok if it fails due to concurrent operations + _ = Interlocked.CompareExchange(ref _top, newTop + 1, newTop); + sw.SpinOnce(); + continue; + } + + value = _values[newTop]; + _values[newTop] = default!; // avoid ref retention + Volatile.Write(ref _states[newTop], 0); // mark empty + _ = Interlocked.Decrement(ref _count); + return true; + } + } + + public int TryPopRange(Span destination) + { + if (destination.IsEmpty) { + return 0; + } + + int i = 0; + for (; i < destination.Length; i++) + { + if (!TryPop(out destination[i])) + { + break; + } + } + return i; + } + + IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); + + } +} diff --git a/StgSharp.Common/Collections/IBidirectionalDictionary.cs b/StgSharp.Common/Collections/IBidirectionalDictionary.cs index 5c564001..20bbcc84 100644 --- a/StgSharp.Common/Collections/IBidirectionalDictionary.cs +++ b/StgSharp.Common/Collections/IBidirectionalDictionary.cs @@ -1,84 +1,84 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="IBidirectionalDictionary" -// 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 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 - } +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="IBidirectionalDictionary" +// 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 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 index f8171bba..6f0acde4 100644 --- a/StgSharp.Common/Collections/IHashMultiplexer.cs +++ b/StgSharp.Common/Collections/IHashMultiplexer.cs @@ -1,53 +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); - - } +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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 index 74917c80..1185648d 100644 --- a/StgSharp.Common/Collections/ListSegment.cs +++ b/StgSharp.Common/Collections/ListSegment.cs @@ -1,131 +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(); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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/NotEnumerableList.cs b/StgSharp.Common/Collections/NotEnumerableList.cs index d1589176..2f5e0513 100644 --- a/StgSharp.Common/Collections/NotEnumerableList.cs +++ b/StgSharp.Common/Collections/NotEnumerableList.cs @@ -1,200 +1,200 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="NotEnumerableList.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 System; -using System.Collections.Generic; -using System.Runtime.CompilerServices; - -namespace StgSharp.Collections -{ - public static class LinearBagBuilder - { - - /// - /// Build a from a read-only span. Capacity will exactly fit - /// the input. - /// - public static LinearBag FromSpan(ReadOnlySpan values) - { - if (values.IsEmpty) { - return new LinearBag(4); - } - LinearBag bag = new(values.Length); - for (int i = 0; i < values.Length; i++) { - bag.Add(values[i]); - } - return bag; - } - - } - - /// - /// A very lightweight contiguous storage structure: unordered, not enumerable by design. - /// Provides O(1) Add and O(1) RemoveAt (by swapping with the tail). Intended for high- - /// performance scenarios where element ordering does not matter. NOT thread-safe. - /// - /// - /// Element type. - /// - [CollectionBuilder(typeof(LinearBagBuilder), nameof(LinearBagBuilder.FromSpan))] - public class LinearBag(int capacity = 4) - { - - // Invariant: valid elements occupy indexes [0, Count-1]. Count is the number of live elements. - private T[] _items = new T[Math.Max(0, capacity)]; - - /// - /// Access element by index (0..Count-1). Throws if out of range. - /// - public T this[int index] - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => (uint)index >= (uint)Count ? throw new ArgumentOutOfRangeException(nameof(index)) : _items[index]; - [MethodImpl(MethodImplOptions.AggressiveInlining)] - set - { - if ((uint)index >= (uint)Count) { - throw new ArgumentOutOfRangeException(nameof(index)); - } - - _items[index] = value; - } - } - - /// - /// Total allocated slots. - /// - public int Capacity => _items.Length; - - /// - /// Number of currently stored elements (valid index range 0..Count-1). - /// - public int Count { get; private set; } - - /// - /// Adds an item (unordered). Expands internal array if needed. - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Add(T item) - { - if (Count == _items.Length) { - EnsureCapacity(Count + 1); - } - - _items[Count] = item; - Count++; - } - - /// - /// Returns a span over the live portion of the bag (0..Count-1). - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public Span AsSpan() - { - return new Span(_items, 0, Count); - } - - /// - /// Clears all elements and zeroes out references to avoid retention. Count becomes 0. - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Clear() - { - Array.Clear(_items, 0, Count); - Count = 0; - } - - /// - /// Fast clear: only resets Count (leaves underlying array unchanged). References are NOT - /// released. Use only when you are certain old references can remain. - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void FastClear() - { - Count = 0; - } - - /// - /// Removes the first occurrence of value (unordered). Does nothing if not found. - /// - public void Remove(T value) - { - EqualityComparer comparer = EqualityComparer.Default; - for (int i = 0; i < Count; i++) - { - if (comparer.Equals(_items[i], value)) - { - RemoveAt(i); - return; - } - } - } - - /// - /// Removes element at index by swapping the last element into its slot (unless already - /// last). Preserves O(1) removal at cost of ordering. - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void RemoveAt(int index) - { - if ((uint)index >= (uint)Count) { - throw new ArgumentOutOfRangeException(nameof(index)); - } - - int last = Count - 1; - if (index != last) { - _items[index] = _items[last]; - } - - _items[last] = default!; // release reference / reset value - Count = last; - } - - /// - /// Ensures capacity is at least . Doubles size when growing. - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private void EnsureCapacity(int min) - { - if (_items.Length >= min) { - return; - } - - int newCapacity = _items.Length == 0 ? 4 : _items.Length * 2; - if (newCapacity < min) { - newCapacity = min; - } - - Array.Resize(ref _items, newCapacity); - } - - } -} - +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="NotEnumerableList.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 System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; + +namespace StgSharp.Collections +{ + public static class LinearBagBuilder + { + + /// + /// Build a from a read-only span. Capacity will exactly fit + /// the input. + /// + public static LinearBag FromSpan(ReadOnlySpan values) + { + if (values.IsEmpty) { + return new LinearBag(4); + } + LinearBag bag = new(values.Length); + for (int i = 0; i < values.Length; i++) { + bag.Add(values[i]); + } + return bag; + } + + } + + /// + /// A very lightweight contiguous storage structure: unordered, not enumerable by design. + /// Provides O(1) Add and O(1) RemoveAt (by swapping with the tail). Intended for high- + /// performance scenarios where element ordering does not matter. NOT thread-safe. + /// + /// + /// Element type. + /// + [CollectionBuilder(typeof(LinearBagBuilder), nameof(LinearBagBuilder.FromSpan))] + public class LinearBag(int capacity = 4) + { + + // Invariant: valid elements occupy indexes [0, Count-1]. Count is the number of live elements. + private T[] _items = new T[Math.Max(0, capacity)]; + + /// + /// Access element by index (0..Count-1). Throws if out of range. + /// + public T this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => (uint)index >= (uint)Count ? throw new ArgumentOutOfRangeException(nameof(index)) : _items[index]; + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= (uint)Count) { + throw new ArgumentOutOfRangeException(nameof(index)); + } + + _items[index] = value; + } + } + + /// + /// Total allocated slots. + /// + public int Capacity => _items.Length; + + /// + /// Number of currently stored elements (valid index range 0..Count-1). + /// + public int Count { get; private set; } + + /// + /// Adds an item (unordered). Expands internal array if needed. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Add(T item) + { + if (Count == _items.Length) { + EnsureCapacity(Count + 1); + } + + _items[Count] = item; + Count++; + } + + /// + /// Returns a span over the live portion of the bag (0..Count-1). + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return new Span(_items, 0, Count); + } + + /// + /// Clears all elements and zeroes out references to avoid retention. Count becomes 0. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Clear() + { + Array.Clear(_items, 0, Count); + Count = 0; + } + + /// + /// Fast clear: only resets Count (leaves underlying array unchanged). References are NOT + /// released. Use only when you are certain old references can remain. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void FastClear() + { + Count = 0; + } + + /// + /// Removes the first occurrence of value (unordered). Does nothing if not found. + /// + public void Remove(T value) + { + EqualityComparer comparer = EqualityComparer.Default; + for (int i = 0; i < Count; i++) + { + if (comparer.Equals(_items[i], value)) + { + RemoveAt(i); + return; + } + } + } + + /// + /// Removes element at index by swapping the last element into its slot (unless already + /// last). Preserves O(1) removal at cost of ordering. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void RemoveAt(int index) + { + if ((uint)index >= (uint)Count) { + throw new ArgumentOutOfRangeException(nameof(index)); + } + + int last = Count - 1; + if (index != last) { + _items[index] = _items[last]; + } + + _items[last] = default!; // release reference / reset value + Count = last; + } + + /// + /// Ensures capacity is at least . Doubles size when growing. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private void EnsureCapacity(int min) + { + if (_items.Length >= min) { + return; + } + + int newCapacity = _items.Length == 0 ? 4 : _items.Length * 2; + if (newCapacity < min) { + newCapacity = min; + } + + Array.Resize(ref _items, newCapacity); + } + + } +} + diff --git a/StgSharp.Common/Collections/RandomAccessibleStack.cs b/StgSharp.Common/Collections/RandomAccessibleStack.cs index 8cce6381..fabe52ab 100644 --- a/StgSharp.Common/Collections/RandomAccessibleStack.cs +++ b/StgSharp.Common/Collections/RandomAccessibleStack.cs @@ -1,181 +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(); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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/SwissTable.cs b/StgSharp.Common/Collections/SwissTable.cs index e5917ecd..844839dd 100644 --- a/StgSharp.Common/Collections/SwissTable.cs +++ b/StgSharp.Common/Collections/SwissTable.cs @@ -1,91 +1,91 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="SwissTable" -// 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; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.Arm; -using System.Runtime.Intrinsics.X86; - -namespace StgSharp.Collections +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="SwissTable" +// 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; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics.Arm; +using System.Runtime.Intrinsics.X86; + +namespace StgSharp.Collections { - /// - /// + /// + /// /// - public sealed unsafe partial class SwissTable - { - - private const int BucketCount = 1 << EntryMaskWidth; - private const int BucketSize = 16; - private const uint CrcMagic = 0xffff9961; // Magic number for CRC32C, used in hash computation - private const int EntryMaskWidth = 16; // 65536 entries total, 16 per bucket + public sealed unsafe partial class SwissTable + { + + private const int BucketCount = 1 << EntryMaskWidth; + private const int BucketSize = 16; + private const uint CrcMagic = 0xffff9961; // Magic number for CRC32C, used in hash computation + private const int EntryMaskWidth = 16; // 65536 entries total, 16 per bucket public const int MaxCapacity = BucketCount * BucketSize; // 256 entries per bucket, 1024 buckets - - private readonly Entry* _entries; - - private SwissTable( - Entry* buffer - ) - { - _entries = buffer; - } - - public static SwissTable Create() - { - Entry* buffer = (Entry*)NativeMemory.AlignedAlloc((nuint)Unsafe.SizeOf(), 16); - for (int i = 0; i < BucketCount; i++) - { - // Set all control bytes to 0xFF (empty) - Unsafe.InitBlock(&(*buffer)[i].Control, 0xFF, BucketSize); - } - return new SwissTable(buffer); - } - - public bool TryAddOrSet( - nint key, - nint value, - out bool isNewKey - ) - { - uint hash = BitOperations.Crc32C(CrcMagic, (ulong)key); - ushort entry = (ushort)(hash & (BucketCount - 1)); - Bucket* bucket = &(*_entries)[entry]; - return IBucketScanner.Current.TrySet(key, hash, bucket, value, out isNewKey); - } - - public bool TryGet( - nint key, - out nint value - ) - { - uint hash = BitOperations.Crc32C(CrcMagic, (ulong)key); - ushort entry = (ushort)(hash & (BucketCount - 1)); - Bucket* bucket = &(*_entries)[entry]; + + private readonly Entry* _entries; + + private SwissTable( + Entry* buffer + ) + { + _entries = buffer; + } + + public static SwissTable Create() + { + Entry* buffer = (Entry*)NativeMemory.AlignedAlloc((nuint)Unsafe.SizeOf(), 16); + for (int i = 0; i < BucketCount; i++) + { + // Set all control bytes to 0xFF (empty) + Unsafe.InitBlock(&(*buffer)[i].Control, 0xFF, BucketSize); + } + return new SwissTable(buffer); + } + + public bool TryAddOrSet( + nint key, + nint value, + out bool isNewKey + ) + { + uint hash = BitOperations.Crc32C(CrcMagic, (ulong)key); + ushort entry = (ushort)(hash & (BucketCount - 1)); + Bucket* bucket = &(*_entries)[entry]; + return IBucketScanner.Current.TrySet(key, hash, bucket, value, out isNewKey); + } + + public bool TryGet( + nint key, + out nint value + ) + { + uint hash = BitOperations.Crc32C(CrcMagic, (ulong)key); + ushort entry = (ushort)(hash & (BucketCount - 1)); + Bucket* bucket = &(*_entries)[entry]; return IBucketScanner.Current.TryFind(key, hash, bucket, out value); /* * hash = CRC32 of key @@ -93,108 +93,108 @@ namespace StgSharp.Collections * ctrl = 8-15 of hash * index = rest of hash * find value of hash - */ - } - - public bool TryRemove( - nint key, - out nint value - ) - { - uint hash = BitOperations.Crc32C(CrcMagic, (ulong)key); - ushort entry = (ushort)(hash & (BucketCount - 1)); - Bucket* bucket = &(*_entries)[entry]; - return IBucketScanner.Current.TryRemove(key, hash, bucket, out value); - } - - ~SwissTable() - { - NativeMemory.AlignedFree(_entries); - } - - [InlineArray(BucketCount)] - private struct Entry - { - - public Bucket Bucket; - - } - - private unsafe struct Bucket - { - - public BucketControl Control; - public BucketKeyStorage Keys; - public BucketValueStorage Values; - - } - - private interface IBucketScanner - { - - static IBucketScanner Current { get; } = Create(); - - bool TryFind( - nint key, - uint Hash, - Bucket* bucket, - out nint value - ); - - unsafe bool TryRemove( - nint key, - uint hash, - Bucket* bucket, - out nint value - ); - - bool TrySet( - nint key, - uint hash, - Bucket* bucket, - nint value, - out bool isNewKey - ); - - private static IBucketScanner Create() - { - if (Sse42.IsSupported) - { - return new BucketScannerX86(); - } else if (ArmBase.IsSupported) - { - throw new NotSupportedException("ARM architecture is currently not supported for bucket scanning. Please use an x86 platform."); - } else - { - throw new NotSupportedException("No suitable bucket scanner implementation found for the current platform."); - } - } - - } - - [InlineArray(BucketSize)] - private struct BucketControl - { - - public byte Control; - - } - - [InlineArray(BucketSize)] - private struct BucketKeyStorage - { - - public nint value; - - } - - [InlineArray(BucketSize)] - private struct BucketValueStorage - { - - public nint value; - - } - - } + */ + } + + public bool TryRemove( + nint key, + out nint value + ) + { + uint hash = BitOperations.Crc32C(CrcMagic, (ulong)key); + ushort entry = (ushort)(hash & (BucketCount - 1)); + Bucket* bucket = &(*_entries)[entry]; + return IBucketScanner.Current.TryRemove(key, hash, bucket, out value); + } + + ~SwissTable() + { + NativeMemory.AlignedFree(_entries); + } + + [InlineArray(BucketCount)] + private struct Entry + { + + public Bucket Bucket; + + } + + private unsafe struct Bucket + { + + public BucketControl Control; + public BucketKeyStorage Keys; + public BucketValueStorage Values; + + } + + private interface IBucketScanner + { + + static IBucketScanner Current { get; } = Create(); + + bool TryFind( + nint key, + uint Hash, + Bucket* bucket, + out nint value + ); + + unsafe bool TryRemove( + nint key, + uint hash, + Bucket* bucket, + out nint value + ); + + bool TrySet( + nint key, + uint hash, + Bucket* bucket, + nint value, + out bool isNewKey + ); + + private static IBucketScanner Create() + { + if (Sse42.IsSupported) + { + return new BucketScannerX86(); + } else if (ArmBase.IsSupported) + { + throw new NotSupportedException("ARM architecture is currently not supported for bucket scanning. Please use an x86 platform."); + } else + { + throw new NotSupportedException("No suitable bucket scanner implementation found for the current platform."); + } + } + + } + + [InlineArray(BucketSize)] + private struct BucketControl + { + + public byte Control; + + } + + [InlineArray(BucketSize)] + private struct BucketKeyStorage + { + + public nint value; + + } + + [InlineArray(BucketSize)] + private struct BucketValueStorage + { + + public nint value; + + } + + } } \ No newline at end of file diff --git a/StgSharp.Common/Environment/Dialogue.cs b/StgSharp.Common/Environment/Dialogue.cs index 6f7d3149..3127bb1d 100644 --- a/StgSharp.Common/Environment/Dialogue.cs +++ b/StgSharp.Common/Environment/Dialogue.cs @@ -1,190 +1,190 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// 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 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)) { - return; - } - _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.Empty; - string path = Path.GetDirectoryName(route) ?? string.Empty; - - 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, @"StgSharp.TerminalDialogue", $@"StgSharp.TerminalDialogue{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(); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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 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)) { + return; + } + _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.Empty; + string path = Path.GetDirectoryName(route) ?? string.Empty; + + 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, @"StgSharp.TerminalDialogue", $@"StgSharp.TerminalDialogue{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 index 541a0804..3a668dab 100644 --- a/StgSharp.Common/Environment/ErrorDefine.cs +++ b/StgSharp.Common/Environment/ErrorDefine.cs @@ -1,44 +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}") { } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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 index 13b44656..18b6c199 100644 --- a/StgSharp.Common/Environment/GlobalSetting.cs +++ b/StgSharp.Common/Environment/GlobalSetting.cs @@ -1,98 +1,98 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="GlobalSetting.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 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; - - 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 ---------------------------------------// +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="GlobalSetting.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 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; + + 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/IStaticModule.cs b/StgSharp.Common/Environment/IStaticModule.cs index 71a975aa..a8d6c902 100644 --- a/StgSharp.Common/Environment/IStaticModule.cs +++ b/StgSharp.Common/Environment/IStaticModule.cs @@ -1,284 +1,284 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="IStaticModule" -// 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 System; -using System.Collections; -using System.Collections.Generic; - -namespace StgSharp -{ - /// - /// Represents a statically activated module that can be registered and initialized as part of - /// the application startup sequence, and gracefully torn down on shutdown. - /// - public interface IStaticModule - { - - /// - /// Gets the display name of this module, used for logging and diagnostics. - /// - string ModuleName { get; } - - /// - /// Performs all initialization work for this module using the provided profile. - /// - /// - /// The configuration profile supplied at registration time. Use if no configuration is required. - /// - void InitializeModule(IModuleInitializeProfile profile); - - /// - /// Releases all resources acquired during . Implementations should - /// be idempotent: calling this method more than once must not throw. - /// - void UninitializeModule(); - - } - - /// - /// Marker interface for module initialization configuration. Implementations are plain data - /// carriers; no static factory is required. - /// - public interface IModuleInitializeProfile - { - - /// - /// A shared, allocation-free empty profile for modules that require no configuration. - /// - static readonly IModuleInitializeProfile Empty = EmptyModuleInitializeProfile.Instance; - - private sealed class EmptyModuleInitializeProfile : IModuleInitializeProfile - { - - public static readonly EmptyModuleInitializeProfile Instance = new(); - - private EmptyModuleInitializeProfile() { } - - } - - } - - /// - /// Pairs an with its , - /// ensuring the two are never stored or iterated independently. - /// - /// - /// Using a avoids the boxing overhead that would occur if - /// the pair were stored as two parallel lists of reference types. - /// - public readonly struct ModuleDescriptor - { - - /// - /// Initializes a new using as the profile. - /// - public ModuleDescriptor(IStaticModule module) : this(module, IModuleInitializeProfile.Empty) { } - - /// - /// Initializes a new with an explicit profile. - /// - public ModuleDescriptor(IStaticModule module, IModuleInitializeProfile profile) - { - Module = module; - Profile = profile; - } - - /// - /// Gets the configuration profile associated with the module. - /// - public IModuleInitializeProfile Profile { get; } - - /// - /// Gets the module to be initialized. - /// - public IStaticModule Module { get; } - - /// - /// Calls with the stored profile. - /// - public void Initialize() - { - Module.InitializeModule(Profile); - } - - /// - /// Calls on the stored module. - /// - public void Uninitialize() - { - Module.UninitializeModule(); - } - - } - - /// - /// An ordered collection of modules to be initialized during application startup and - /// uninitialized on shutdown. Supports three registration strategies so that the new() - /// generic constraint is never a hard requirement. - /// - public sealed class ModuleToInitializeCollection : IEnumerable, IStaticModule - { - - private readonly List _descriptors = []; - - internal ModuleToInitializeCollection(World.Initializer i) - { - _descriptors.Add(new ModuleDescriptor(i)); - } - - // ── IEnumerable ─────────────────────────────────────────── - - /// - public IEnumerator GetEnumerator() - { - foreach (ModuleDescriptor d in _descriptors) { - yield return d.Module; - } - } - - // ── Initialization / Uninitialization ──────────────────────────────────── - - /// - /// Initializes all registered modules in the order they were registered. Each module - /// receives the profile that was supplied at registration time. - /// - public void InitializeModule() - { - for (int i = 0; i < _descriptors.Count; i++) { - _descriptors[i].Initialize(); - } - } - - /// - /// Uninitializes all registered modules in reverse registration order, mirroring - /// the typical LIFO teardown convention (e.g., GLFW must be unloaded after all subsystems - /// that depend on it). - /// - public void UninitializeModule() - { - for (int i = _descriptors.Count - 1; i >= 0; i--) { - _descriptors[i].Uninitialize(); - } - } - - // ── Registration API ───────────────────────────────────────────────────── - - /// - /// Registers a module of type using its default constructor. - /// This is the most concise overload for simple modules that expose a public - /// parameterless constructor. - /// - /// - /// A concrete module type that implements and exposes a - /// public parameterless constructor. - /// - /// - /// Optional initialization profile. Defaults to when . - /// - public ModuleToInitializeCollection UseModule(IModuleInitializeProfile? profile = null) - where T: IStaticModule, new() - { - return UseModule(static() => new T(), profile); - } - - /// - /// Registers a module produced by a factory delegate. This overload imposes no generic - /// constraints and supports any construction strategy, including dependency injection and - /// parameterized constructors. - /// - /// - /// A delegate that constructs and returns the module instance. The delegate is invoked - /// once, immediately at registration time. If is or returns , the call is silently ignored - /// and the collection is returned unchanged. - /// - /// - /// Optional initialization profile. Defaults to when . - /// - public ModuleToInitializeCollection UseModule( - Func factory, - IModuleInitializeProfile? profile = null) - { - if (factory is null) { - return this; - } - IStaticModule? mod = factory(); - if (mod is null) { - return this; - } - _descriptors.Add(new ModuleDescriptor( - mod, - profile ?? IModuleInitializeProfile.Empty)); - return this; - } - - /// - /// Registers a pre-existing module instance. Use this overload when the module is - /// provided externally, such as from a DI container, an object pool, or a singleton. - /// - /// - /// The module instance to register. - /// - /// - /// Optional initialization profile. Defaults to when . - /// - public ModuleToInitializeCollection UseModule(IStaticModule module, IModuleInitializeProfile? profile = null) - { - _descriptors.Add(new ModuleDescriptor( - module, - profile ?? IModuleInitializeProfile.Empty)); - return this; - } - - /// - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - // ── IStaticModule explicit implementation ──────────────────────────────── - - /// - /// Explicit implementation. Delegates to , ignoring the supplied profile because each contained module uses - /// its own registered profile. - /// - void IStaticModule.InitializeModule(IModuleInitializeProfile profile) - { - InitializeModule(); - } - - /// - string IStaticModule.ModuleName => "Module Initializer"; - - } +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="IStaticModule" +// 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 System; +using System.Collections; +using System.Collections.Generic; + +namespace StgSharp +{ + /// + /// Represents a statically activated module that can be registered and initialized as part of + /// the application startup sequence, and gracefully torn down on shutdown. + /// + public interface IStaticModule + { + + /// + /// Gets the display name of this module, used for logging and diagnostics. + /// + string ModuleName { get; } + + /// + /// Performs all initialization work for this module using the provided profile. + /// + /// + /// The configuration profile supplied at registration time. Use if no configuration is required. + /// + void InitializeModule(IModuleInitializeProfile profile); + + /// + /// Releases all resources acquired during . Implementations should + /// be idempotent: calling this method more than once must not throw. + /// + void UninitializeModule(); + + } + + /// + /// Marker interface for module initialization configuration. Implementations are plain data + /// carriers; no static factory is required. + /// + public interface IModuleInitializeProfile + { + + /// + /// A shared, allocation-free empty profile for modules that require no configuration. + /// + static readonly IModuleInitializeProfile Empty = EmptyModuleInitializeProfile.Instance; + + private sealed class EmptyModuleInitializeProfile : IModuleInitializeProfile + { + + public static readonly EmptyModuleInitializeProfile Instance = new(); + + private EmptyModuleInitializeProfile() { } + + } + + } + + /// + /// Pairs an with its , + /// ensuring the two are never stored or iterated independently. + /// + /// + /// Using a avoids the boxing overhead that would occur if + /// the pair were stored as two parallel lists of reference types. + /// + public readonly struct ModuleDescriptor + { + + /// + /// Initializes a new using as the profile. + /// + public ModuleDescriptor(IStaticModule module) : this(module, IModuleInitializeProfile.Empty) { } + + /// + /// Initializes a new with an explicit profile. + /// + public ModuleDescriptor(IStaticModule module, IModuleInitializeProfile profile) + { + Module = module; + Profile = profile; + } + + /// + /// Gets the configuration profile associated with the module. + /// + public IModuleInitializeProfile Profile { get; } + + /// + /// Gets the module to be initialized. + /// + public IStaticModule Module { get; } + + /// + /// Calls with the stored profile. + /// + public void Initialize() + { + Module.InitializeModule(Profile); + } + + /// + /// Calls on the stored module. + /// + public void Uninitialize() + { + Module.UninitializeModule(); + } + + } + + /// + /// An ordered collection of modules to be initialized during application startup and + /// uninitialized on shutdown. Supports three registration strategies so that the new() + /// generic constraint is never a hard requirement. + /// + public sealed class ModuleToInitializeCollection : IEnumerable, IStaticModule + { + + private readonly List _descriptors = []; + + internal ModuleToInitializeCollection(World.Initializer i) + { + _descriptors.Add(new ModuleDescriptor(i)); + } + + // ── IEnumerable ─────────────────────────────────────────── + + /// + public IEnumerator GetEnumerator() + { + foreach (ModuleDescriptor d in _descriptors) { + yield return d.Module; + } + } + + // ── Initialization / Uninitialization ──────────────────────────────────── + + /// + /// Initializes all registered modules in the order they were registered. Each module + /// receives the profile that was supplied at registration time. + /// + public void InitializeModule() + { + for (int i = 0; i < _descriptors.Count; i++) { + _descriptors[i].Initialize(); + } + } + + /// + /// Uninitializes all registered modules in reverse registration order, mirroring + /// the typical LIFO teardown convention (e.g., GLFW must be unloaded after all subsystems + /// that depend on it). + /// + public void UninitializeModule() + { + for (int i = _descriptors.Count - 1; i >= 0; i--) { + _descriptors[i].Uninitialize(); + } + } + + // ── Registration API ───────────────────────────────────────────────────── + + /// + /// Registers a module of type using its default constructor. + /// This is the most concise overload for simple modules that expose a public + /// parameterless constructor. + /// + /// + /// A concrete module type that implements and exposes a + /// public parameterless constructor. + /// + /// + /// Optional initialization profile. Defaults to when . + /// + public ModuleToInitializeCollection UseModule(IModuleInitializeProfile? profile = null) + where T: IStaticModule, new() + { + return UseModule(static() => new T(), profile); + } + + /// + /// Registers a module produced by a factory delegate. This overload imposes no generic + /// constraints and supports any construction strategy, including dependency injection and + /// parameterized constructors. + /// + /// + /// A delegate that constructs and returns the module instance. The delegate is invoked + /// once, immediately at registration time. If is or returns , the call is silently ignored + /// and the collection is returned unchanged. + /// + /// + /// Optional initialization profile. Defaults to when . + /// + public ModuleToInitializeCollection UseModule( + Func factory, + IModuleInitializeProfile? profile = null) + { + if (factory is null) { + return this; + } + IStaticModule? mod = factory(); + if (mod is null) { + return this; + } + _descriptors.Add(new ModuleDescriptor( + mod, + profile ?? IModuleInitializeProfile.Empty)); + return this; + } + + /// + /// Registers a pre-existing module instance. Use this overload when the module is + /// provided externally, such as from a DI container, an object pool, or a singleton. + /// + /// + /// The module instance to register. + /// + /// + /// Optional initialization profile. Defaults to when . + /// + public ModuleToInitializeCollection UseModule(IStaticModule module, IModuleInitializeProfile? profile = null) + { + _descriptors.Add(new ModuleDescriptor( + module, + profile ?? IModuleInitializeProfile.Empty)); + return this; + } + + /// + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + // ── IStaticModule explicit implementation ──────────────────────────────── + + /// + /// Explicit implementation. Delegates to , ignoring the supplied profile because each contained module uses + /// its own registered profile. + /// + void IStaticModule.InitializeModule(IModuleInitializeProfile profile) + { + InitializeModule(); + } + + /// + string IStaticModule.ModuleName => "Module Initializer"; + + } } \ No newline at end of file diff --git a/StgSharp.Common/Environment/Platform.cs b/StgSharp.Common/Environment/Platform.cs index 9675be26..e5298b6e 100644 --- a/StgSharp.Common/Environment/Platform.cs +++ b/StgSharp.Common/Environment/Platform.cs @@ -1,237 +1,237 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// 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 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(); - DefaultLog.InternalAppendLog("\n\n\n"); - DefaultLog.InternalWriteLog( - $"Program {Assembly.GetEntryAssembly()!.FullName} on {Environment.MachineName} Started.", LogType.Info); - MainThreadID = System.Environment.CurrentManagedThreadId; - - /**/ - Dialogue.NeedShowWhenStartup = false; - Dialogue.LoadDialogue(); - if (Dialogue.NeedShowWhenStartup) { - Dialogue.CreateDialogueProcessIfNotExist(); - } - /**/ - } - - internal class Initializer : IStaticModule - { - - public string ModuleName => "StgSharpCore"; - - public void InitializeModule( - IModuleInitializeProfile profile - ) - { - World.InternalInitialize(); - } - - public void UninitializeModule() - { - throw new NotImplementedException(); - } - - } - - } +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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 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(); + DefaultLog.InternalAppendLog("\n\n\n"); + DefaultLog.InternalWriteLog( + $"Program {Assembly.GetEntryAssembly()!.FullName} on {Environment.MachineName} Started.", LogType.Info); + MainThreadID = System.Environment.CurrentManagedThreadId; + + /**/ + Dialogue.NeedShowWhenStartup = false; + Dialogue.LoadDialogue(); + if (Dialogue.NeedShowWhenStartup) { + Dialogue.CreateDialogueProcessIfNotExist(); + } + /**/ + } + + internal class Initializer : IStaticModule + { + + public string ModuleName => "StgSharpCore"; + + public void InitializeModule( + IModuleInitializeProfile profile + ) + { + World.InternalInitialize(); + } + + public void UninitializeModule() + { + throw new NotImplementedException(); + } + + } + + } } \ No newline at end of file diff --git a/StgSharp.Common/Global.cs b/StgSharp.Common/Global.cs index 32b3f1a0..18714acc 100644 --- a/StgSharp.Common/Global.cs +++ b/StgSharp.Common/Global.cs @@ -1,37 +1,37 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// 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 System.Diagnostics.CodeAnalysis; -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("StgSharp.Mathematics")] -[assembly: InternalsVisibleTo("StgSharp.RegularAnalysis")] -[assembly: InternalsVisibleTo("StgSharp.Graphics")] -[assembly: InternalsVisibleTo("StgSharpDebug")] +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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 System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("StgSharp.Mathematics")] +[assembly: InternalsVisibleTo("StgSharp.RegularAnalysis")] +[assembly: InternalsVisibleTo("StgSharp.Graphics")] +[assembly: InternalsVisibleTo("StgSharpDebug")] diff --git a/StgSharp.Common/HighPerformance/Memory/BufferStack.cs b/StgSharp.Common/HighPerformance/Memory/BufferStack.cs index b9ec7794..3b992c7d 100644 --- a/StgSharp.Common/HighPerformance/Memory/BufferStack.cs +++ b/StgSharp.Common/HighPerformance/Memory/BufferStack.cs @@ -1,163 +1,163 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="BufferStack" -// 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 System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace StgSharp.Mathematics.Memory -{ - [CollectionBuilder(typeof(BufferStackBuilder), nameof(BufferStackBuilder.Create))] - public unsafe class BufferStack : IDisposable where T: unmanaged - { - - private byte* _buffer; - private ulong _count; - - public BufferStack(int capacity) - { - ArgumentOutOfRangeException.ThrowIfNegativeOrZero(capacity); - - AllocateBuffer(capacity); - } - - public int Count - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => (int)_count; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Clear() - { - ((Header*)_buffer)->Top = 0; - _count = 0; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Dispose() - { - Marshal.FreeHGlobal((nint)_buffer); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public T Pop() - { - Header* header = (Header*)_buffer; - if (header->Top == 0) { - throw new InvalidOperationException("Stack underflow"); - } - - header->Top--; - _count--; - T* dataStart = (T*)(_buffer + sizeof(Header)); - return dataStart[header->Top]; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Push(T item) - { - Header* header = (Header*)_buffer; - if (header->Top >= header->Capacity) - { - Expand(); - header = (Header*)_buffer; - } - - T* dataStart = (T*)(_buffer + sizeof(Header)); - dataStart[header->Top] = item; - header->Top++; - _count++; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public bool TryPop(out T value) - { - Header* header = (Header*)_buffer; - if (header->Top == 0) - { - value = default; - return false; - } - header->Top--; - _count--; - T* dataStart = (T*)(_buffer + sizeof(Header)); - value = dataStart[header->Top]; - return true; - } - - // Internal method for efficient bulk initialization - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal unsafe void InitializeFromSpan(ReadOnlySpan span) - { - if (span.IsEmpty) { - return; - } - - Header* header = (Header*)_buffer; - T* dataStart = (T*)(_buffer + sizeof(Header)); - - fixed (T* sourcePtr = span) { - Buffer.MemoryCopy(sourcePtr, dataStart, header->Capacity * (nuint)sizeof(T), - (nuint)span.Length * (nuint)sizeof(T)); - } - - header->Top = (nuint)span.Length; - _count = (ulong)span.Length; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private void AllocateBuffer(int capacity) - { - nuint size = (nuint)sizeof(Header) + ((nuint)capacity * (nuint)sizeof(T)); - _buffer = (byte*)NativeMemory.Alloc(size); - Header* header = (Header*)_buffer; - header->Top = 0; - header->Capacity = (nuint)capacity; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private void Expand() - { - Header* header = (Header*)_buffer; - nuint newCap = header->Capacity * 2; - nuint newSize = (nuint)sizeof(Header) + (newCap * (nuint)sizeof(T)); - _buffer = (byte*)NativeMemory.Realloc(_buffer, newSize); - header = (Header*)_buffer; - header->Capacity = newCap; - } - - private struct Header - { - - public nuint Capacity; - public nuint Top; - - } - - } +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="BufferStack" +// 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 System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace StgSharp.Mathematics.Memory +{ + [CollectionBuilder(typeof(BufferStackBuilder), nameof(BufferStackBuilder.Create))] + public unsafe class BufferStack : IDisposable where T: unmanaged + { + + private byte* _buffer; + private ulong _count; + + public BufferStack(int capacity) + { + ArgumentOutOfRangeException.ThrowIfNegativeOrZero(capacity); + + AllocateBuffer(capacity); + } + + public int Count + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => (int)_count; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Clear() + { + ((Header*)_buffer)->Top = 0; + _count = 0; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Dispose() + { + Marshal.FreeHGlobal((nint)_buffer); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public T Pop() + { + Header* header = (Header*)_buffer; + if (header->Top == 0) { + throw new InvalidOperationException("Stack underflow"); + } + + header->Top--; + _count--; + T* dataStart = (T*)(_buffer + sizeof(Header)); + return dataStart[header->Top]; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Push(T item) + { + Header* header = (Header*)_buffer; + if (header->Top >= header->Capacity) + { + Expand(); + header = (Header*)_buffer; + } + + T* dataStart = (T*)(_buffer + sizeof(Header)); + dataStart[header->Top] = item; + header->Top++; + _count++; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool TryPop(out T value) + { + Header* header = (Header*)_buffer; + if (header->Top == 0) + { + value = default; + return false; + } + header->Top--; + _count--; + T* dataStart = (T*)(_buffer + sizeof(Header)); + value = dataStart[header->Top]; + return true; + } + + // Internal method for efficient bulk initialization + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal unsafe void InitializeFromSpan(ReadOnlySpan span) + { + if (span.IsEmpty) { + return; + } + + Header* header = (Header*)_buffer; + T* dataStart = (T*)(_buffer + sizeof(Header)); + + fixed (T* sourcePtr = span) { + Buffer.MemoryCopy(sourcePtr, dataStart, header->Capacity * (nuint)sizeof(T), + (nuint)span.Length * (nuint)sizeof(T)); + } + + header->Top = (nuint)span.Length; + _count = (ulong)span.Length; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private void AllocateBuffer(int capacity) + { + nuint size = (nuint)sizeof(Header) + ((nuint)capacity * (nuint)sizeof(T)); + _buffer = (byte*)NativeMemory.Alloc(size); + Header* header = (Header*)_buffer; + header->Top = 0; + header->Capacity = (nuint)capacity; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private void Expand() + { + Header* header = (Header*)_buffer; + nuint newCap = header->Capacity * 2; + nuint newSize = (nuint)sizeof(Header) + (newCap * (nuint)sizeof(T)); + _buffer = (byte*)NativeMemory.Realloc(_buffer, newSize); + header = (Header*)_buffer; + header->Capacity = newCap; + } + + private struct Header + { + + public nuint Capacity; + public nuint Top; + + } + + } } \ No newline at end of file diff --git a/StgSharp.Common/HighPerformance/Memory/ConcurrentBufferStack.cs b/StgSharp.Common/HighPerformance/Memory/ConcurrentBufferStack.cs index a1fd757f..b3988284 100644 --- a/StgSharp.Common/HighPerformance/Memory/ConcurrentBufferStack.cs +++ b/StgSharp.Common/HighPerformance/Memory/ConcurrentBufferStack.cs @@ -1,308 +1,308 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ConcurrentBufferStack" -// 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.Threading; - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Threading; - -namespace StgSharp.Mathematics.Memory -{ - public static class BufferStackBuilder - { - - // For BufferStack collection builder - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static BufferStack Create(ReadOnlySpan span) where T: unmanaged - { - if (span.IsEmpty) - { - return new BufferStack(4); // Default small capacity - } - - BufferStack stack = new(span.Length); - - - // Use internal method for efficient bulk initialization - stack.InitializeFromSpan(span); - - return stack; - } - - // For ConcurrentBufferStack collection builder - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ConcurrentBufferStack CreateConcurrent(ReadOnlySpan span) where T: unmanaged - { - if (span.IsEmpty) - { - return new ConcurrentBufferStack(4); // Default small capacity - } - - ConcurrentBufferStack stack = new(span.Length); - - - // Use internal method for efficient bulk initialization - stack.InitializeFromSpan(span); - - return stack; - } - - } - - [CollectionBuilder(builderType: typeof(BufferStackBuilder), methodName: nameof(BufferStackBuilder.CreateConcurrent))] - public unsafe class ConcurrentBufferStack : IDisposable where T: unmanaged - { - - private byte* _buffer; - private readonly BufferExpansionLock _lock = new(); - private long _count; - - public ConcurrentBufferStack() - { - AllocateBuffer(4); - } - - public ConcurrentBufferStack(int capacity) - { - if (capacity <= 0) { - throw new ArgumentOutOfRangeException(nameof(capacity)); - } - - AllocateBuffer(capacity); - } - - public ulong Count - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => (ulong)Volatile.Read(ref _count); - } - - public void Clear() - { - _lock.EnterExpansionProcess(); - try - { - _lock.EnterBufferCopy(); // exclusive while mutating Top - try - { - Header* header = (Header*)_buffer; - header->Top = 0; - Volatile.Write(ref _count, 0); - } - finally - { - _lock.ExitBufferCopy(); - } - } - finally - { - _lock.ExitExpansionProcess(); - } - } - - public void Dispose() - { - _lock.Dispose(); - NativeMemory.Free(_buffer); - } - - public T Pop() - { - while (true) - { - _lock.EnterBufferRead(); // prevent buffer being reallocated while reading/modifying Top - try - { - Header* header = (Header*)_buffer; - int oldTop = Volatile.Read(ref header->Top); - if (oldTop <= 0) { - throw new InvalidOperationException("Stack underflow"); - } - - if (Interlocked.CompareExchange(ref header->Top, oldTop - 1, oldTop) == oldTop) - { - T* dataStart = (T*)(_buffer + sizeof(Header)); - _ = Interlocked.Decrement(ref _count); - return dataStart[oldTop - 1]; - } - } - finally - { - _lock.ExitBufferRead(); - } - Thread.Sleep(0); - } - } - - public void Push(T item) - { - while (true) - { - // Ensure capacity, expanding if needed - _lock.EnterMetaDataRead(); - try - { - Header* header = (Header*)_buffer; - int topSnapshot = Volatile.Read(ref header->Top); - int cap = Volatile.Read(ref header->Capacity); - if (topSnapshot >= cap) - { - // Need expansion - _lock.ExitMetaDataRead(); - _lock.EnterExpansionProcess(); - try - { - header = (Header*)_buffer; - if (header->Top >= header->Capacity) - { - int newCap = header->Capacity * 2; - nuint newSize = (nuint)sizeof(Header) + ((nuint)newCap * (nuint)sizeof(T)); - - _lock.EnterBufferCopy(); - try - { - _buffer = (byte*)NativeMemory.Realloc(_buffer, newSize); - ((Header*)_buffer)->Capacity = newCap; - } - finally - { - _lock.ExitBufferCopy(); - } - } - } - finally - { - _lock.ExitExpansionProcess(); - } - continue; - } - } - finally - { - if (_lock.IsThreadReadingMetaData) { - _lock.ExitMetaDataRead(); - } - } - - // Reserve and write under exclusive buffer lock to avoid consumers reading unwritten data - _lock.EnterBufferCopy(); - try - { - Header* header = (Header*)_buffer; - int idx = header->Top; // reserve next slot - if (idx >= header->Capacity) - { - // lost race against expander or other producer; retry - continue; - } - - T* dataStart = (T*)(_buffer + sizeof(Header)); - dataStart[idx] = item; // write first - header->Top = idx + 1; // then publish by increasing top - _ = Interlocked.Increment(ref _count); - return; - } - finally - { - _lock.ExitBufferCopy(); - } - } - } - - public bool TryPop(out T value) - { - while (true) - { - _lock.EnterBufferRead(); - try - { - Header* header = (Header*)_buffer; - int oldTop = Volatile.Read(ref header->Top); - if (oldTop <= 0) - { - value = default; - return false; - } - - if (Interlocked.CompareExchange(ref header->Top, oldTop - 1, oldTop) == oldTop) - { - T* dataStart = (T*)(_buffer + sizeof(Header)); - value = dataStart[oldTop - 1]; - _ = Interlocked.Decrement(ref _count); - return true; - } - } - finally - { - _lock.ExitBufferRead(); - } - Thread.Sleep(0); - } - } - - // Internal method for efficient bulk initialization - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal unsafe void InitializeFromSpan(ReadOnlySpan span) - { - if (span.IsEmpty) { - return; - } - - Header* header = (Header*)_buffer; - T* dataStart = (T*)(_buffer + sizeof(Header)); - - fixed (T* sourcePtr = span) { - Buffer.MemoryCopy(sourcePtr, dataStart, (nuint)header->Capacity * (nuint)sizeof(T), - (nuint)span.Length * (nuint)sizeof(T)); - } - - header->Top = span.Length; - Volatile.Write(ref _count, span.Length); - } - - private void AllocateBuffer(int capacity) - { - nuint size = (nuint)sizeof(Header) + (nuint)capacity * (nuint)sizeof(T); - _buffer = (byte*)NativeMemory.Alloc(size); - Header* header = (Header*)_buffer; - header->Top = 0; - header->Capacity = capacity; - } - - private struct Header - { - - public int Capacity; // max capacity of the stack (number of elements) - public int Top; // next available index in the stack - - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ConcurrentBufferStack" +// 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.Threading; + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Threading; + +namespace StgSharp.Mathematics.Memory +{ + public static class BufferStackBuilder + { + + // For BufferStack collection builder + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static BufferStack Create(ReadOnlySpan span) where T: unmanaged + { + if (span.IsEmpty) + { + return new BufferStack(4); // Default small capacity + } + + BufferStack stack = new(span.Length); + + + // Use internal method for efficient bulk initialization + stack.InitializeFromSpan(span); + + return stack; + } + + // For ConcurrentBufferStack collection builder + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ConcurrentBufferStack CreateConcurrent(ReadOnlySpan span) where T: unmanaged + { + if (span.IsEmpty) + { + return new ConcurrentBufferStack(4); // Default small capacity + } + + ConcurrentBufferStack stack = new(span.Length); + + + // Use internal method for efficient bulk initialization + stack.InitializeFromSpan(span); + + return stack; + } + + } + + [CollectionBuilder(builderType: typeof(BufferStackBuilder), methodName: nameof(BufferStackBuilder.CreateConcurrent))] + public unsafe class ConcurrentBufferStack : IDisposable where T: unmanaged + { + + private byte* _buffer; + private readonly BufferExpansionLock _lock = new(); + private long _count; + + public ConcurrentBufferStack() + { + AllocateBuffer(4); + } + + public ConcurrentBufferStack(int capacity) + { + if (capacity <= 0) { + throw new ArgumentOutOfRangeException(nameof(capacity)); + } + + AllocateBuffer(capacity); + } + + public ulong Count + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => (ulong)Volatile.Read(ref _count); + } + + public void Clear() + { + _lock.EnterExpansionProcess(); + try + { + _lock.EnterBufferCopy(); // exclusive while mutating Top + try + { + Header* header = (Header*)_buffer; + header->Top = 0; + Volatile.Write(ref _count, 0); + } + finally + { + _lock.ExitBufferCopy(); + } + } + finally + { + _lock.ExitExpansionProcess(); + } + } + + public void Dispose() + { + _lock.Dispose(); + NativeMemory.Free(_buffer); + } + + public T Pop() + { + while (true) + { + _lock.EnterBufferRead(); // prevent buffer being reallocated while reading/modifying Top + try + { + Header* header = (Header*)_buffer; + int oldTop = Volatile.Read(ref header->Top); + if (oldTop <= 0) { + throw new InvalidOperationException("Stack underflow"); + } + + if (Interlocked.CompareExchange(ref header->Top, oldTop - 1, oldTop) == oldTop) + { + T* dataStart = (T*)(_buffer + sizeof(Header)); + _ = Interlocked.Decrement(ref _count); + return dataStart[oldTop - 1]; + } + } + finally + { + _lock.ExitBufferRead(); + } + Thread.Sleep(0); + } + } + + public void Push(T item) + { + while (true) + { + // Ensure capacity, expanding if needed + _lock.EnterMetaDataRead(); + try + { + Header* header = (Header*)_buffer; + int topSnapshot = Volatile.Read(ref header->Top); + int cap = Volatile.Read(ref header->Capacity); + if (topSnapshot >= cap) + { + // Need expansion + _lock.ExitMetaDataRead(); + _lock.EnterExpansionProcess(); + try + { + header = (Header*)_buffer; + if (header->Top >= header->Capacity) + { + int newCap = header->Capacity * 2; + nuint newSize = (nuint)sizeof(Header) + ((nuint)newCap * (nuint)sizeof(T)); + + _lock.EnterBufferCopy(); + try + { + _buffer = (byte*)NativeMemory.Realloc(_buffer, newSize); + ((Header*)_buffer)->Capacity = newCap; + } + finally + { + _lock.ExitBufferCopy(); + } + } + } + finally + { + _lock.ExitExpansionProcess(); + } + continue; + } + } + finally + { + if (_lock.IsThreadReadingMetaData) { + _lock.ExitMetaDataRead(); + } + } + + // Reserve and write under exclusive buffer lock to avoid consumers reading unwritten data + _lock.EnterBufferCopy(); + try + { + Header* header = (Header*)_buffer; + int idx = header->Top; // reserve next slot + if (idx >= header->Capacity) + { + // lost race against expander or other producer; retry + continue; + } + + T* dataStart = (T*)(_buffer + sizeof(Header)); + dataStart[idx] = item; // write first + header->Top = idx + 1; // then publish by increasing top + _ = Interlocked.Increment(ref _count); + return; + } + finally + { + _lock.ExitBufferCopy(); + } + } + } + + public bool TryPop(out T value) + { + while (true) + { + _lock.EnterBufferRead(); + try + { + Header* header = (Header*)_buffer; + int oldTop = Volatile.Read(ref header->Top); + if (oldTop <= 0) + { + value = default; + return false; + } + + if (Interlocked.CompareExchange(ref header->Top, oldTop - 1, oldTop) == oldTop) + { + T* dataStart = (T*)(_buffer + sizeof(Header)); + value = dataStart[oldTop - 1]; + _ = Interlocked.Decrement(ref _count); + return true; + } + } + finally + { + _lock.ExitBufferRead(); + } + Thread.Sleep(0); + } + } + + // Internal method for efficient bulk initialization + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal unsafe void InitializeFromSpan(ReadOnlySpan span) + { + if (span.IsEmpty) { + return; + } + + Header* header = (Header*)_buffer; + T* dataStart = (T*)(_buffer + sizeof(Header)); + + fixed (T* sourcePtr = span) { + Buffer.MemoryCopy(sourcePtr, dataStart, (nuint)header->Capacity * (nuint)sizeof(T), + (nuint)span.Length * (nuint)sizeof(T)); + } + + header->Top = span.Length; + Volatile.Write(ref _count, span.Length); + } + + private void AllocateBuffer(int capacity) + { + nuint size = (nuint)sizeof(Header) + (nuint)capacity * (nuint)sizeof(T); + _buffer = (byte*)NativeMemory.Alloc(size); + Header* header = (Header*)_buffer; + header->Top = 0; + header->Capacity = capacity; + } + + private struct Header + { + + public int Capacity; // max capacity of the stack (number of elements) + public int Top; // next available index in the stack + + } + + } +} diff --git a/StgSharp.Common/HighPerformance/Memory/HLSFAllocationHandle.cs b/StgSharp.Common/HighPerformance/Memory/HLSFAllocationHandle.cs index 0aea7f4c..4ebe849a 100644 --- a/StgSharp.Common/HighPerformance/Memory/HLSFAllocationHandle.cs +++ b/StgSharp.Common/HighPerformance/Memory/HLSFAllocationHandle.cs @@ -1,114 +1,114 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="HLSFAllocationHandle" -// 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 System; -using System.Collections; -using System.Collections.Generic; -using System.Drawing; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -using Allocator = StgSharp.Mathematics.Memory.HybridLayerSegregatedFitAllocator; - -namespace StgSharp.Mathematics.Memory -{ - public readonly unsafe struct HybridLayerSegregatedFitAllocationHandle - { - - internal readonly Allocator.Entry* EntryHandle; - public readonly long AllocSize; - - internal HybridLayerSegregatedFitAllocationHandle(Allocator.Entry* handle, long s) - { - EntryHandle = handle; - Pointer = (byte*)handle->Position; - AllocSize = s; - - // Console.WriteLine($"{(ulong)handle->PreviousNear}<->{(ulong)handle->NextNear},\t{handle->Size}"); - } - - public readonly ref byte this[uint index] - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(index, AllocSize); - return ref Pointer[index]; - } - } - - public readonly byte* Pointer { get; init; } - - public readonly Span BufferHandle - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => new(Pointer, (int)AllocSize); - } - - public readonly Enumerator GetEnumerator() - { - return new Enumerator(this); - } - - public ref struct Enumerator : IEnumerator - { - - private HybridLayerSegregatedFitAllocationHandle _handle; - - private uint _index = ~0u; - - internal Enumerator(HybridLayerSegregatedFitAllocationHandle span) - { - _handle = span; - Span = span.BufferHandle; - } - - public ref byte RefCurrent => ref _handle[_index]; - - public Span Span { get; init; } - - public readonly void Dispose() { } - - public bool MoveNext() - { - _index++; - return _index < _handle.AllocSize; - } - - public void Reset() - { - _index = 0; - } - - object IEnumerator.Current => RefCurrent; - - byte IEnumerator.Current => RefCurrent; - - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="HLSFAllocationHandle" +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Drawing; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +using Allocator = StgSharp.Mathematics.Memory.HybridLayerSegregatedFitAllocator; + +namespace StgSharp.Mathematics.Memory +{ + public readonly unsafe struct HybridLayerSegregatedFitAllocationHandle + { + + internal readonly Allocator.Entry* EntryHandle; + public readonly long AllocSize; + + internal HybridLayerSegregatedFitAllocationHandle(Allocator.Entry* handle, long s) + { + EntryHandle = handle; + Pointer = (byte*)handle->Position; + AllocSize = s; + + // Console.WriteLine($"{(ulong)handle->PreviousNear}<->{(ulong)handle->NextNear},\t{handle->Size}"); + } + + public readonly ref byte this[uint index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(index, AllocSize); + return ref Pointer[index]; + } + } + + public readonly byte* Pointer { get; init; } + + public readonly Span BufferHandle + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => new(Pointer, (int)AllocSize); + } + + public readonly Enumerator GetEnumerator() + { + return new Enumerator(this); + } + + public ref struct Enumerator : IEnumerator + { + + private HybridLayerSegregatedFitAllocationHandle _handle; + + private uint _index = ~0u; + + internal Enumerator(HybridLayerSegregatedFitAllocationHandle span) + { + _handle = span; + Span = span.BufferHandle; + } + + public ref byte RefCurrent => ref _handle[_index]; + + public Span Span { get; init; } + + public readonly void Dispose() { } + + public bool MoveNext() + { + _index++; + return _index < _handle.AllocSize; + } + + public void Reset() + { + _index = 0; + } + + object IEnumerator.Current => RefCurrent; + + byte IEnumerator.Current => RefCurrent; + + } + + } +} diff --git a/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.Alloc.cs b/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.Alloc.cs index 0030c946..8f5f5884 100644 --- a/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.Alloc.cs +++ b/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.Alloc.cs @@ -1,234 +1,234 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="HLSFAllocator.Alloc" -// 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 System; -using System.Numerics; -using hlsfHandle = StgSharp.Mathematics.Memory.HybridLayerSegregatedFitAllocationHandle; - -namespace StgSharp.Mathematics.Memory -{ - public unsafe partial class HybridLayerSegregatedFitAllocator - { - - public hlsfHandle Alloc(long size) - { - if (size > _maxSize) { - throw new InvalidOperationException("Requested size exceeds maximum allocatable size."); - } - - int level = GetLevelFromSize(size); - int segmentIndex = DetermineSegmentIndex(_levelSizeArray, size, level); - - int i = level, s = segmentIndex; - Entry* handle; - while (!TryPopLevelForAllocation(i, s, out handle)) - { - if (++s >= 3) - { - s = 0; - i++; - } - if (i > MaxLevel) - { - if (TryPopLevelForAllocation(10, 1, out handle)) - { - break; - } else if (TryAllocateNew32MBBlock(out handle)) - { - break; - } - throw new OverflowException("Out of memory: Unable to allocate new 16MB block or find suitable bucket for allocation."); - } - } - - if (handle != null) - { - int requestedOffset = (segmentIndex + 1) * _levelSizeArray[level]; - if (requestedOffset > handle->Size) { - throw new OverflowException("Out of memory: insufficient block size returned from spare memory."); - } - long remainder = handle->Size - requestedOffset; - SetEntryLevel(handle, handle->Position, (uint)requestedOffset); - handle->State = EntryState.Alloc; - if (remainder > 0) { - SliceMemory(handle->NextNear, remainder); - } - } - return new hlsfHandle(handle, size); - } - - /// - /// Slice the memory block into smaller blocks and add them to the appropriate buckets - /// Notice: this method is not responsible for freeing the original BucketNode - /// - /// - /// - /// - /// - /// - /// - private void SliceMemory(Entry* e, long sizeToSlice) - { - Entry* next = e; - long remain = sizeToSlice; // remained size to slice - long offset = (long)e->Position - sizeToSlice - (long)m_Buffer; // offset of buffer to slice - long end = (long)e->Position - (long)m_Buffer; // end offset of buffer to slice - - int i = (BitOperations.TrailingZeroCount(offset) - 6) / 2; - i = int.Min(10, i); - for (; i < _levelSizeArray.Length; i++) - { - int size = _levelSizeArray[i]; - int upper = size * 4; - long edge = (offset + upper - 1) / upper * upper; - int count = (int)((long.Min(edge, end) - offset) / size); - if (count > 0) - { - long newSize = count * size; - - Entry* newEntry = (Entry*)_entries.Allocate(); - InsertEntryBefore(newEntry, next); - SetEntryLevel(newEntry, (nuint)offset + (nuint)m_Buffer, newSize); - newEntry->State = EntryState.Empty; - - BucketNode* b = (BucketNode*)newEntry->Position; - b->EntryRef = newEntry; - PushBucketToLevel(i, count - 1, b); - offset += newSize; - remain -= newSize; - } - if (remain <= 0) { - return; - } - } - - if (i > MaxLevel) - { - int size = _levelSizeArray[^1]; - int upper = size * 4; - long edge = end / upper * upper; - int count = (int)((long.Min(edge, end) - offset) / upper); - if (count > 0) - { - long newSize = (long)count * (long)upper; - - Entry* newEntry = (Entry*)_entries.Allocate(); - InsertEntryBefore(newEntry, next); - SetEntryLevel(newEntry, (nuint)offset + (nuint)m_Buffer, newSize); - newEntry->State = EntryState.Empty; - - BucketNode* b = (BucketNode*)newEntry->Position; - b->EntryRef = newEntry; - PushBucketToLevel(i, count - 1, b); - offset += newSize; - remain -= newSize; - if (remain <= 0) { - return; - } - } - } - - for (i--; i >= 0; i--) - { - int size = _levelSizeArray[i]; - long edge = end / size * size; - int count = (int)((long.Min(edge, end) - offset) / size); - if (count > 0) - { - long newSize = count * size; - - Entry* newEntry = (Entry*)_entries.Allocate(); - InsertEntryBefore(newEntry, next); - SetEntryLevel(newEntry, (nuint)offset + (nuint)m_Buffer, newSize); - newEntry->State = EntryState.Empty; - - BucketNode* b = (BucketNode*)newEntry->Position; - b->EntryRef = newEntry; - b->NextLevel = null; - b->PreviousLevel = null; - PushBucketToLevel(i, count - 1, b); - offset += newSize; - remain -= newSize; - } - if (remain <= 0) { - return; - } - } - } - - /// - /// Try to allocate a new 16MB block when all buckets are empty - /// - /// - /// Output handle to the allocated Entry - /// - /// - /// True if allocation succeeded - /// - private bool TryAllocateNew32MBBlock(out Entry* handle) - { - nuint pos = _spareMemory->Position; - long remain = _spareMemory->Size; - if (remain <= 0) - { - handle = null; - return false; - } - long size = remain > 32 * 1024 * 1024L ? 32 * 1024 * 1024L : remain; - - - // build new entry - Entry* e = (Entry*)_entries.Allocate(); - SetEntryLevel(e, pos, size); - InsertEntryBefore(e, _spareMemory); - e->State = EntryState.Empty; - - // set fields of spare memory - _spareMemory->Size -= size; - _spareMemory->Position += (nuint)size; - - - handle = e; - return true; - } - - /// - /// Helper method for allocation - converts BucketNode to Entry - /// - private bool TryPopLevelForAllocation(int levelIndex, int sizeIndex, out Entry* entry) - { - if (TryPopLevel(levelIndex, sizeIndex, out BucketNode* bucketNode)) - { - entry = bucketNode->EntryRef; - return entry != null; - } - entry = null; - return false; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="HLSFAllocator.Alloc" +// 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 System; +using System.Numerics; +using hlsfHandle = StgSharp.Mathematics.Memory.HybridLayerSegregatedFitAllocationHandle; + +namespace StgSharp.Mathematics.Memory +{ + public unsafe partial class HybridLayerSegregatedFitAllocator + { + + public hlsfHandle Alloc(long size) + { + if (size > _maxSize) { + throw new InvalidOperationException("Requested size exceeds maximum allocatable size."); + } + + int level = GetLevelFromSize(size); + int segmentIndex = DetermineSegmentIndex(_levelSizeArray, size, level); + + int i = level, s = segmentIndex; + Entry* handle; + while (!TryPopLevelForAllocation(i, s, out handle)) + { + if (++s >= 3) + { + s = 0; + i++; + } + if (i > MaxLevel) + { + if (TryPopLevelForAllocation(10, 1, out handle)) + { + break; + } else if (TryAllocateNew32MBBlock(out handle)) + { + break; + } + throw new OverflowException("Out of memory: Unable to allocate new 16MB block or find suitable bucket for allocation."); + } + } + + if (handle != null) + { + int requestedOffset = (segmentIndex + 1) * _levelSizeArray[level]; + if (requestedOffset > handle->Size) { + throw new OverflowException("Out of memory: insufficient block size returned from spare memory."); + } + long remainder = handle->Size - requestedOffset; + SetEntryLevel(handle, handle->Position, (uint)requestedOffset); + handle->State = EntryState.Alloc; + if (remainder > 0) { + SliceMemory(handle->NextNear, remainder); + } + } + return new hlsfHandle(handle, size); + } + + /// + /// Slice the memory block into smaller blocks and add them to the appropriate buckets + /// Notice: this method is not responsible for freeing the original BucketNode + /// + /// + /// + /// + /// + /// + /// + private void SliceMemory(Entry* e, long sizeToSlice) + { + Entry* next = e; + long remain = sizeToSlice; // remained size to slice + long offset = (long)e->Position - sizeToSlice - (long)m_Buffer; // offset of buffer to slice + long end = (long)e->Position - (long)m_Buffer; // end offset of buffer to slice + + int i = (BitOperations.TrailingZeroCount(offset) - 6) / 2; + i = int.Min(10, i); + for (; i < _levelSizeArray.Length; i++) + { + int size = _levelSizeArray[i]; + int upper = size * 4; + long edge = (offset + upper - 1) / upper * upper; + int count = (int)((long.Min(edge, end) - offset) / size); + if (count > 0) + { + long newSize = count * size; + + Entry* newEntry = (Entry*)_entries.Allocate(); + InsertEntryBefore(newEntry, next); + SetEntryLevel(newEntry, (nuint)offset + (nuint)m_Buffer, newSize); + newEntry->State = EntryState.Empty; + + BucketNode* b = (BucketNode*)newEntry->Position; + b->EntryRef = newEntry; + PushBucketToLevel(i, count - 1, b); + offset += newSize; + remain -= newSize; + } + if (remain <= 0) { + return; + } + } + + if (i > MaxLevel) + { + int size = _levelSizeArray[^1]; + int upper = size * 4; + long edge = end / upper * upper; + int count = (int)((long.Min(edge, end) - offset) / upper); + if (count > 0) + { + long newSize = (long)count * (long)upper; + + Entry* newEntry = (Entry*)_entries.Allocate(); + InsertEntryBefore(newEntry, next); + SetEntryLevel(newEntry, (nuint)offset + (nuint)m_Buffer, newSize); + newEntry->State = EntryState.Empty; + + BucketNode* b = (BucketNode*)newEntry->Position; + b->EntryRef = newEntry; + PushBucketToLevel(i, count - 1, b); + offset += newSize; + remain -= newSize; + if (remain <= 0) { + return; + } + } + } + + for (i--; i >= 0; i--) + { + int size = _levelSizeArray[i]; + long edge = end / size * size; + int count = (int)((long.Min(edge, end) - offset) / size); + if (count > 0) + { + long newSize = count * size; + + Entry* newEntry = (Entry*)_entries.Allocate(); + InsertEntryBefore(newEntry, next); + SetEntryLevel(newEntry, (nuint)offset + (nuint)m_Buffer, newSize); + newEntry->State = EntryState.Empty; + + BucketNode* b = (BucketNode*)newEntry->Position; + b->EntryRef = newEntry; + b->NextLevel = null; + b->PreviousLevel = null; + PushBucketToLevel(i, count - 1, b); + offset += newSize; + remain -= newSize; + } + if (remain <= 0) { + return; + } + } + } + + /// + /// Try to allocate a new 16MB block when all buckets are empty + /// + /// + /// Output handle to the allocated Entry + /// + /// + /// True if allocation succeeded + /// + private bool TryAllocateNew32MBBlock(out Entry* handle) + { + nuint pos = _spareMemory->Position; + long remain = _spareMemory->Size; + if (remain <= 0) + { + handle = null; + return false; + } + long size = remain > 32 * 1024 * 1024L ? 32 * 1024 * 1024L : remain; + + + // build new entry + Entry* e = (Entry*)_entries.Allocate(); + SetEntryLevel(e, pos, size); + InsertEntryBefore(e, _spareMemory); + e->State = EntryState.Empty; + + // set fields of spare memory + _spareMemory->Size -= size; + _spareMemory->Position += (nuint)size; + + + handle = e; + return true; + } + + /// + /// Helper method for allocation - converts BucketNode to Entry + /// + private bool TryPopLevelForAllocation(int levelIndex, int sizeIndex, out Entry* entry) + { + if (TryPopLevel(levelIndex, sizeIndex, out BucketNode* bucketNode)) + { + entry = bucketNode->EntryRef; + return entry != null; + } + entry = null; + return false; + } + + } +} diff --git a/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.BucketNode.cs b/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.BucketNode.cs index b5b96588..09e5d6b4 100644 --- a/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.BucketNode.cs +++ b/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.BucketNode.cs @@ -1,171 +1,171 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="HLSFAllocator.BucketNode" -// 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 System; -using System.Reflection.Metadata; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace StgSharp.Mathematics.Memory -{ - public unsafe partial class HybridLayerSegregatedFitAllocator - { - - private void PushBucketToLevel(int levelIndex, int sizeIndex, BucketNode* node) - { - if (node == null || node->EntryRef == null) { - return; - } - - Index index = (levelIndex > MaxLevel) ? ^1 : (3 * levelIndex) + sizeIndex; - if (_bucketHeads[index] is null) - { - _bucketHeads[index] = node; - node->IsInBucket = true; - node->NextLevel = null; - node->PreviousLevel = null; - - // Console.WriteLine($"Push to empty level of {levelIndex} {sizeIndex}, bucket pos {(ulong)node}"); - return; - } else - { - BucketNode* head = _bucketHeads[index]; - node->NextLevel = head; - BucketNode* headNode = head; - node->IsInBucket = true; - _bucketHeads[index] = node; - - // Console.WriteLine($"Push to head of level of {levelIndex} {sizeIndex}, bucket pos {(ulong)node}, previous head is at {head}"); - if (headNode != null) - { - headNode->PreviousLevel = node; - } - return; - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private void RemoveFromBucket(int levelIndex, int sizeIndex, BucketNode* node) - { - Index index = (levelIndex > MaxLevel) ? ^1 : (3 * levelIndex) + sizeIndex; - if (_bucketHeads[index] == node) - { - if (TryPopLevel(levelIndex, sizeIndex, out _)) { - return; - } - } - BucketNode* previous = node->PreviousLevel; - BucketNode* next = node->NextLevel; - - if (previous != null) { - previous->NextLevel = next; - } - if (next != null) { - next->PreviousLevel = previous; - } - - node->NextLevel = (BucketNode*)null; - node->PreviousLevel = (BucketNode*)null; - node->IsInBucket = false; - return; - } - - private bool TryPopLevel(int levelIndex, int sizeIndex, out BucketNode* node) - { - Index index = levelIndex > MaxLevel ? ^1 : (3 * levelIndex) + sizeIndex; - - BucketNode* head = _bucketHeads[index]; - - if (head == null) - { - node = null; - return false; - } - - // Console.WriteLine($"level popped from level {levelIndex} {sizeIndex}, node is at {(ulong)head}"); - BucketNode* next = head->NextLevel; - - if (next == null) - { - _bucketHeads[index] = null; - node = head; - return true; - } - _bucketHeads[index] = head->NextLevel; - node = head; - node->IsInBucket = false; - node->NextLevel = null; - if (next != null) { - next->PreviousLevel = null; - } - return true; - } - - private bool TryRemoveFromBucket(int levelIndex, int sizeIndex, BucketNode* node) - { - Index index = levelIndex > 9 ? ^1 : (3 * levelIndex) + sizeIndex; - if (_bucketHeads[index] == node) - { - bool ok = TryPopLevel(levelIndex, sizeIndex, out _); - return ok; - } - - BucketNode* previous = node->PreviousLevel; - BucketNode* next = node->NextLevel; - - if (previous != null) { - previous->NextLevel = next; - } - if (next != null) { - next->PreviousLevel = previous; - } - - node->NextLevel = null; - node->PreviousLevel = null; - node->IsInBucket = false; - node->EntryRef = null; - return true; - } - - /// - /// BucketNode structure - specialized node for bucket linked lists Stored in main - /// allocation area (user-overwritable region) - /// - [StructLayout(LayoutKind.Explicit)] - internal struct BucketNode - { - - [FieldOffset(0)] internal Entry* EntryRef; // Pointer to corresponding Entry - // [FieldOffset(16)] internal ulong LockBuffer; - [FieldOffset(8)] internal BucketNode* NextLevel; // Bucket stack linked list: next pointer - [FieldOffset(24)] internal BucketNode* PreviousLevel; // Bucket stack linked list: previous pointer - [FieldOffset(32)] internal bool IsInBucket; // Whether in bucket - - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="HLSFAllocator.BucketNode" +// 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 System; +using System.Reflection.Metadata; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace StgSharp.Mathematics.Memory +{ + public unsafe partial class HybridLayerSegregatedFitAllocator + { + + private void PushBucketToLevel(int levelIndex, int sizeIndex, BucketNode* node) + { + if (node == null || node->EntryRef == null) { + return; + } + + Index index = (levelIndex > MaxLevel) ? ^1 : (3 * levelIndex) + sizeIndex; + if (_bucketHeads[index] is null) + { + _bucketHeads[index] = node; + node->IsInBucket = true; + node->NextLevel = null; + node->PreviousLevel = null; + + // Console.WriteLine($"Push to empty level of {levelIndex} {sizeIndex}, bucket pos {(ulong)node}"); + return; + } else + { + BucketNode* head = _bucketHeads[index]; + node->NextLevel = head; + BucketNode* headNode = head; + node->IsInBucket = true; + _bucketHeads[index] = node; + + // Console.WriteLine($"Push to head of level of {levelIndex} {sizeIndex}, bucket pos {(ulong)node}, previous head is at {head}"); + if (headNode != null) + { + headNode->PreviousLevel = node; + } + return; + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private void RemoveFromBucket(int levelIndex, int sizeIndex, BucketNode* node) + { + Index index = (levelIndex > MaxLevel) ? ^1 : (3 * levelIndex) + sizeIndex; + if (_bucketHeads[index] == node) + { + if (TryPopLevel(levelIndex, sizeIndex, out _)) { + return; + } + } + BucketNode* previous = node->PreviousLevel; + BucketNode* next = node->NextLevel; + + if (previous != null) { + previous->NextLevel = next; + } + if (next != null) { + next->PreviousLevel = previous; + } + + node->NextLevel = (BucketNode*)null; + node->PreviousLevel = (BucketNode*)null; + node->IsInBucket = false; + return; + } + + private bool TryPopLevel(int levelIndex, int sizeIndex, out BucketNode* node) + { + Index index = levelIndex > MaxLevel ? ^1 : (3 * levelIndex) + sizeIndex; + + BucketNode* head = _bucketHeads[index]; + + if (head == null) + { + node = null; + return false; + } + + // Console.WriteLine($"level popped from level {levelIndex} {sizeIndex}, node is at {(ulong)head}"); + BucketNode* next = head->NextLevel; + + if (next == null) + { + _bucketHeads[index] = null; + node = head; + return true; + } + _bucketHeads[index] = head->NextLevel; + node = head; + node->IsInBucket = false; + node->NextLevel = null; + if (next != null) { + next->PreviousLevel = null; + } + return true; + } + + private bool TryRemoveFromBucket(int levelIndex, int sizeIndex, BucketNode* node) + { + Index index = levelIndex > 9 ? ^1 : (3 * levelIndex) + sizeIndex; + if (_bucketHeads[index] == node) + { + bool ok = TryPopLevel(levelIndex, sizeIndex, out _); + return ok; + } + + BucketNode* previous = node->PreviousLevel; + BucketNode* next = node->NextLevel; + + if (previous != null) { + previous->NextLevel = next; + } + if (next != null) { + next->PreviousLevel = previous; + } + + node->NextLevel = null; + node->PreviousLevel = null; + node->IsInBucket = false; + node->EntryRef = null; + return true; + } + + /// + /// BucketNode structure - specialized node for bucket linked lists Stored in main + /// allocation area (user-overwritable region) + /// + [StructLayout(LayoutKind.Explicit)] + internal struct BucketNode + { + + [FieldOffset(0)] internal Entry* EntryRef; // Pointer to corresponding Entry + // [FieldOffset(16)] internal ulong LockBuffer; + [FieldOffset(8)] internal BucketNode* NextLevel; // Bucket stack linked list: next pointer + [FieldOffset(24)] internal BucketNode* PreviousLevel; // Bucket stack linked list: previous pointer + [FieldOffset(32)] internal bool IsInBucket; // Whether in bucket + + } + + } +} diff --git a/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.Debug.cs b/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.Debug.cs index 3aaa3fd6..add73691 100644 --- a/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.Debug.cs +++ b/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.Debug.cs @@ -1,122 +1,122 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="HLSFAllocator.Debug" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Mathematics.Memory -{ - public sealed class HLSFPositionChainBreakException : Exception - { - - public HLSFPositionChainBreakException() : base("Position chain of an HLSF allocator is broken") { } - - } - - public unsafe partial class HybridLayerSegregatedFitAllocator - { - - private object _lock = new object(); - - public void DisplayEntryLayout(bool singleStep) - { - lock (_lock) - { - Entry* cur = _spareMemory; - while (cur != null) - { - Console.WriteLine(EntryToString(cur)); - cur = cur->PreviousNear; - if (singleStep) { - Console.ReadKey(); - } - } - } - } - - public void DumpPositionChain(bool singleStep = false, int maxCount = 4096) - { - lock (_lock) - { - try - { - Entry* cur = _spareMemory; - int cnt = 0; - if (cur != null) { - cur = cur->NextNear; - } - Console.WriteLine(EntryToString(_spareMemory)); - while (cur != null && cur != _spareMemory && cnt < maxCount) - { - Console.WriteLine(EntryToString(cur)); - cnt++; - if (singleStep) { - Console.ReadKey(); - } - - cur = cur->NextNear; - } - if (cur == _spareMemory) - { - Console.WriteLine("(reached sentinel)"); - } else if (cnt >= maxCount) { - Console.WriteLine("(stopped at maxCount)"); - } - } - catch (Exception ex) - { - Console.WriteLine($"[DumpPositionChain-forward] Exception: {ex.Message}"); - } - } - } - - public IEnumerable ShowEntryLayout() - { - lock (_lock) - { - Stack layout = []; - Entry* cur = _spareMemory; - while (cur != null) - { - layout.Push(EntryToString(cur)); - cur = cur->PreviousNear; - } - return layout; - } - } - - private static string EntryToString(Entry* e) - { - BucketNode* b = (BucketNode*)e->Position; - return $"{(ulong)e->PreviousNear}<-prev- Position:{(ulong)e} Bucket:{{{(ulong)e->Position},{e->Level},{e->Size}}} -next->{(ulong)e->NextNear}"; - } - - } +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="HLSFAllocator.Debug" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Mathematics.Memory +{ + public sealed class HLSFPositionChainBreakException : Exception + { + + public HLSFPositionChainBreakException() : base("Position chain of an HLSF allocator is broken") { } + + } + + public unsafe partial class HybridLayerSegregatedFitAllocator + { + + private object _lock = new object(); + + public void DisplayEntryLayout(bool singleStep) + { + lock (_lock) + { + Entry* cur = _spareMemory; + while (cur != null) + { + Console.WriteLine(EntryToString(cur)); + cur = cur->PreviousNear; + if (singleStep) { + Console.ReadKey(); + } + } + } + } + + public void DumpPositionChain(bool singleStep = false, int maxCount = 4096) + { + lock (_lock) + { + try + { + Entry* cur = _spareMemory; + int cnt = 0; + if (cur != null) { + cur = cur->NextNear; + } + Console.WriteLine(EntryToString(_spareMemory)); + while (cur != null && cur != _spareMemory && cnt < maxCount) + { + Console.WriteLine(EntryToString(cur)); + cnt++; + if (singleStep) { + Console.ReadKey(); + } + + cur = cur->NextNear; + } + if (cur == _spareMemory) + { + Console.WriteLine("(reached sentinel)"); + } else if (cnt >= maxCount) { + Console.WriteLine("(stopped at maxCount)"); + } + } + catch (Exception ex) + { + Console.WriteLine($"[DumpPositionChain-forward] Exception: {ex.Message}"); + } + } + } + + public IEnumerable ShowEntryLayout() + { + lock (_lock) + { + Stack layout = []; + Entry* cur = _spareMemory; + while (cur != null) + { + layout.Push(EntryToString(cur)); + cur = cur->PreviousNear; + } + return layout; + } + } + + private static string EntryToString(Entry* e) + { + BucketNode* b = (BucketNode*)e->Position; + return $"{(ulong)e->PreviousNear}<-prev- Position:{(ulong)e} Bucket:{{{(ulong)e->Position},{e->Level},{e->Size}}} -next->{(ulong)e->NextNear}"; + } + + } } \ No newline at end of file diff --git a/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.Free.cs b/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.Free.cs index 2e158b4c..cadbfe06 100644 --- a/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.Free.cs +++ b/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.Free.cs @@ -1,129 +1,129 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="HLSFAllocator.Free" -// 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 System; -using System.Buffers; -using System.Collections.Generic; -using System.Drawing; -using System.Linq; -using System.Reflection.Emit; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; - -using hlsfHandle = StgSharp.Mathematics.Memory.HybridLayerSegregatedFitAllocationHandle; - -namespace StgSharp.Mathematics.Memory -{ - public enum FreePolicy - { - - FullCollect, - LazyCollect, - NoCollect - - } - - public unsafe partial class HybridLayerSegregatedFitAllocator - { - - /// - /// Minimal collect: linear scan, merge contiguous empty Blocks into one, push merged head - /// back to bucket. Caller-responsible design: no slicing or redistribution. - /// - public void Collect() - { - Entry* cur = _spareMemory->NextNear; - long size = 0; - while (cur != null && cur != _spareMemory) - { - // cur is not empty, skip - if (cur->State != EntryState.Empty) - { - cur = cur->NextNear; - continue; - } - - // remove cur from bucket - do - { - size += cur->Size; - Entry* next = cur->NextNear; - RemoveFromBucket(cur->Level, DetermineSegmentIndex(_levelSizeArray, cur->Size, cur->Level), (BucketNode*)cur->Position); - RemoveFromPositionChain(cur); - cur = next; - } while (cur != null && cur != _spareMemory && cur->State == EntryState.Empty); - if (size > 0) { - SliceMemory(cur, size); - } - } - } - - /// - /// Free allocated memory block and perform adjacent block merging - /// - /// - /// Handle to the allocated memory block - /// - /// - public void Free(hlsfHandle handle, FreePolicy collectPolicy = FreePolicy.NoCollect) - { - Entry* e = handle.EntryHandle; - if (e == null) { - return; - } - if (e->State != EntryState.Alloc) { - return; - } - - // Mark as empty so it can be merged - e->State = EntryState.Empty; - - // Try merge with adjacent free blocks and remove them from buckets - if (collectPolicy == FreePolicy.LazyCollect) - { - MergeAndRemoveFromBuckets(e); - } - - // Calculate final level and segment for the merged block - long finalSize = e->Size; - int finalLevel = GetLevelFromSize(finalSize); - e->Level = finalLevel; - int finalSegment = DetermineSegmentIndex(_levelSizeArray, finalSize, finalLevel); - - // Push the merged entry back to appropriate bucket - PushBucketToLevel(finalLevel, finalSegment, (BucketNode*)e->Position); - - // Console.WriteLine("one block freed"); - if (collectPolicy == FreePolicy.FullCollect) - { - Collect(); - } - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="HLSFAllocator.Free" +// 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 System; +using System.Buffers; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Reflection.Emit; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; + +using hlsfHandle = StgSharp.Mathematics.Memory.HybridLayerSegregatedFitAllocationHandle; + +namespace StgSharp.Mathematics.Memory +{ + public enum FreePolicy + { + + FullCollect, + LazyCollect, + NoCollect + + } + + public unsafe partial class HybridLayerSegregatedFitAllocator + { + + /// + /// Minimal collect: linear scan, merge contiguous empty Blocks into one, push merged head + /// back to bucket. Caller-responsible design: no slicing or redistribution. + /// + public void Collect() + { + Entry* cur = _spareMemory->NextNear; + long size = 0; + while (cur != null && cur != _spareMemory) + { + // cur is not empty, skip + if (cur->State != EntryState.Empty) + { + cur = cur->NextNear; + continue; + } + + // remove cur from bucket + do + { + size += cur->Size; + Entry* next = cur->NextNear; + RemoveFromBucket(cur->Level, DetermineSegmentIndex(_levelSizeArray, cur->Size, cur->Level), (BucketNode*)cur->Position); + RemoveFromPositionChain(cur); + cur = next; + } while (cur != null && cur != _spareMemory && cur->State == EntryState.Empty); + if (size > 0) { + SliceMemory(cur, size); + } + } + } + + /// + /// Free allocated memory block and perform adjacent block merging + /// + /// + /// Handle to the allocated memory block + /// + /// + public void Free(hlsfHandle handle, FreePolicy collectPolicy = FreePolicy.NoCollect) + { + Entry* e = handle.EntryHandle; + if (e == null) { + return; + } + if (e->State != EntryState.Alloc) { + return; + } + + // Mark as empty so it can be merged + e->State = EntryState.Empty; + + // Try merge with adjacent free blocks and remove them from buckets + if (collectPolicy == FreePolicy.LazyCollect) + { + MergeAndRemoveFromBuckets(e); + } + + // Calculate final level and segment for the merged block + long finalSize = e->Size; + int finalLevel = GetLevelFromSize(finalSize); + e->Level = finalLevel; + int finalSegment = DetermineSegmentIndex(_levelSizeArray, finalSize, finalLevel); + + // Push the merged entry back to appropriate bucket + PushBucketToLevel(finalLevel, finalSegment, (BucketNode*)e->Position); + + // Console.WriteLine("one block freed"); + if (collectPolicy == FreePolicy.FullCollect) + { + Collect(); + } + } + + } +} diff --git a/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.Level.cs b/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.Level.cs index 008acdfb..430625af 100644 --- a/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.Level.cs +++ b/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.Level.cs @@ -1,92 +1,92 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="HLSFAllocator.Level" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Mathematics.Memory -{ - public unsafe partial class HybridLayerSegregatedFitAllocator - { - - private const int MaxLevel = 9; - - private int[] _levelSizeArray = [64, 256, 1024, 4096, 16384, 65536, 262144, 1048576, 4194304, 16777216]; - - public int AlignOfLevel(int bucketLevel) - { - int blockSize = _levelSizeArray[bucketLevel]; - return int.Min(blockSize, _align); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static int GetLevelFromSize(long size) - { - /* - * Level sizes: [64, 256, 1024, 4096, 16384, 65536, 262144, 1048576, 4194304, 16777216, ......] - * Pattern: 64 * 4^level = 2^6 * 2^(2*level) = 2^(6+2*level) - * - * For size S, we need: 2^(6+2*level) >= S - * So: 6+2*level >= log2(S) - * Therefore: level >= (log2(S) - 6) / 2 - * - * We use hardware LZCNT instruction via BitOperations.LeadingZeroCount - * log2(S) = 63 - LeadingZeroCount(S) for 64-bit values - */ - int log2Size = 63 - BitOperations.LeadingZeroCount((ulong)size); - - // Calculate level: level = max(0, (log2Size - 6) / 2) - int level = Math.Max(0, (log2Size - 6) / 2); - - // caller is responsible for ensuring level is within bounds - return level; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static int GetLevelFromSize(uint size) - { - return GetLevelFromSize(size); - } - - } - - public enum CommonMemoryAlign : int - { - - XMMLevel = 16, - YMMLevel = 32, - ZMMLevel = 64, - - ArmNEONLevel = 16, - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="HLSFAllocator.Level" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Mathematics.Memory +{ + public unsafe partial class HybridLayerSegregatedFitAllocator + { + + private const int MaxLevel = 9; + + private int[] _levelSizeArray = [64, 256, 1024, 4096, 16384, 65536, 262144, 1048576, 4194304, 16777216]; + + public int AlignOfLevel(int bucketLevel) + { + int blockSize = _levelSizeArray[bucketLevel]; + return int.Min(blockSize, _align); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static int GetLevelFromSize(long size) + { + /* + * Level sizes: [64, 256, 1024, 4096, 16384, 65536, 262144, 1048576, 4194304, 16777216, ......] + * Pattern: 64 * 4^level = 2^6 * 2^(2*level) = 2^(6+2*level) + * + * For size S, we need: 2^(6+2*level) >= S + * So: 6+2*level >= log2(S) + * Therefore: level >= (log2(S) - 6) / 2 + * + * We use hardware LZCNT instruction via BitOperations.LeadingZeroCount + * log2(S) = 63 - LeadingZeroCount(S) for 64-bit values + */ + int log2Size = 63 - BitOperations.LeadingZeroCount((ulong)size); + + // Calculate level: level = max(0, (log2Size - 6) / 2) + int level = Math.Max(0, (log2Size - 6) / 2); + + // caller is responsible for ensuring level is within bounds + return level; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static int GetLevelFromSize(uint size) + { + return GetLevelFromSize(size); + } + + } + + public enum CommonMemoryAlign : int + { + + XMMLevel = 16, + YMMLevel = 32, + ZMMLevel = 64, + + ArmNEONLevel = 16, + + } +} diff --git a/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.SegmentEntry.cs b/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.SegmentEntry.cs index 3620d76b..9cc2fbf1 100644 --- a/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.SegmentEntry.cs +++ b/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.SegmentEntry.cs @@ -1,208 +1,208 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="HLSFAllocator.SegmentEntry" -// 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 System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace StgSharp.Mathematics.Memory -{ - public unsafe partial class HybridLayerSegregatedFitAllocator - { - - /// - /// Check if two Entries are adjacent in memory - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static bool AssertAdjacentTo(Entry* current, Entry* other) - { - // Only a predicate; never throw here. Callers rely on false to skip merging. - return other->Position + (nuint)other->Size == current->Position || - current->Position + (nuint)current->Size == other->Position; - } - - /// - /// check out if a bucket is within the same higher-level boundary as currentOffset - /// - private bool AssertBoundary(Entry* previous, Entry* current, int level) - { - level = int.Min(level, MaxLevel); - int nextLevelSize = _levelSizeArray[level] * 4; - ulong prevHead = previous->Position - (ulong)m_Buffer, - currHead = current->Position - (ulong)m_Buffer; - return (currHead / (ulong)nextLevelSize) == (prevHead / (ulong)nextLevelSize); - } - - /// - /// Determine segment index based on size and originLevel - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static int DetermineSegmentIndex(int[] levelSizeArray, long size, int level) - { - level = int.Min(level, MaxLevel); - return (int)((size - 1) / levelSizeArray[level]); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static void InsertEntryAfter(Entry* entry, Entry* position) - { - Entry* next = position->NextNear; - entry->NextNear = next; - entry->PreviousNear = position; - next->PreviousNear = entry; - position->NextNear = entry; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static void InsertEntryBefore(Entry* entry, Entry* position) - { - Entry* prev = position->PreviousNear; - entry->NextNear = position; - entry->PreviousNear = prev; - prev->NextNear = entry; - position->PreviousNear = entry; - } - - /// - /// Used in Free operations, efficiently remove from buckets and merge adjacent blocks. - /// Current Entry will serve as the final merged block. The Merge will be in lazy - /// strategy. - /// - private void MergeAndRemoveFromBuckets(Entry* entry) - { - if (entry == null) { - return; - } - - - long size = entry->Size; - int originLevel = entry->Level; - int segment = DetermineSegmentIndex(_levelSizeArray, size, originLevel); - do - { - // previous direction merge - Entry* p = entry->PreviousNear; - if (p == null || - p == _spareMemory || - p->State != EntryState.Empty || - p->Level != entry->Level || - !AssertBoundary(p, entry, originLevel)) - { - break; - } - - // Console.WriteLine($"{(ulong)p->Size} merged to {(ulong)entry->Size} previous"); - entry->Size += p->Size; - entry->Position = p->Position; - RemoveFromBucket(originLevel, DetermineSegmentIndex(_levelSizeArray, p->Size, originLevel), (BucketNode*)p->Position); - RemoveFromPositionChain(p); - } while (true); - - do - { - // next direction merge - Entry* n = entry->NextNear; - if (n == null || - n == _spareMemory || - n->State != EntryState.Empty || - n->Level != entry->Level || - !AssertBoundary(n, entry, originLevel)) - { - break; - } - - // Console.WriteLine($"{(ulong)n->Size} merged to {(ulong)entry->Size} next"); - entry->Size += n->Size; - RemoveFromBucket(originLevel, DetermineSegmentIndex(_levelSizeArray, n->Size, originLevel), (BucketNode*)n->Position); - RemoveFromPositionChain(n); - } while (true); - originLevel = int.Min(9, originLevel); - entry->Level += entry->Size >= _levelSizeArray[originLevel] * 4 ? 1 : 0; - entry->Level &= 15; - - BucketNode* bucket = (BucketNode*)entry->Position; - bucket->EntryRef = entry; - } - - /// - /// Remove node from position linked list, this method does not recycle a BucketNode from - /// size bucket - /// - private void RemoveFromPositionChain(Entry* entry) - { - Entry* prev = entry->PreviousNear; - Entry* next = entry->NextNear; - - prev->NextNear = next; - next->PreviousNear = prev; - - // Clear node pointers - entry->NextNear = null; - entry->PreviousNear = null; - - // Console.WriteLine("entry recycled."); - _entries.Free((nuint)entry); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static void SetEntryLevel(Entry* entry, nuint position, long size) - { - entry ->Position = position; - entry->Size = size; - entry->Level = GetLevelFromSize(size); - } - - /// - /// Entry structure - streamlined version (only position and state information) Stored in - /// external SLAB - /// - [StructLayout(LayoutKind.Explicit, Size = 40)] - internal struct Entry - { - - [FieldOffset(0)] internal Entry* NextNear; // Position linked list: next pointer - [FieldOffset(8)] internal Entry* PreviousNear; // Position linked list: previous pointer - - [FieldOffset(24)] internal int Level; // Level of the block in the allocator - [FieldOffset(16)] internal long Size; // Block size information - [FieldOffset(36)] public EntryState State; - [FieldOffset(28)] public nuint Position; // Memory block position - - } - - internal enum EntryState : uint - { - - Spare, - Empty, - Alloc, - Large - - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="HLSFAllocator.SegmentEntry" +// 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 System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace StgSharp.Mathematics.Memory +{ + public unsafe partial class HybridLayerSegregatedFitAllocator + { + + /// + /// Check if two Entries are adjacent in memory + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static bool AssertAdjacentTo(Entry* current, Entry* other) + { + // Only a predicate; never throw here. Callers rely on false to skip merging. + return other->Position + (nuint)other->Size == current->Position || + current->Position + (nuint)current->Size == other->Position; + } + + /// + /// check out if a bucket is within the same higher-level boundary as currentOffset + /// + private bool AssertBoundary(Entry* previous, Entry* current, int level) + { + level = int.Min(level, MaxLevel); + int nextLevelSize = _levelSizeArray[level] * 4; + ulong prevHead = previous->Position - (ulong)m_Buffer, + currHead = current->Position - (ulong)m_Buffer; + return (currHead / (ulong)nextLevelSize) == (prevHead / (ulong)nextLevelSize); + } + + /// + /// Determine segment index based on size and originLevel + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static int DetermineSegmentIndex(int[] levelSizeArray, long size, int level) + { + level = int.Min(level, MaxLevel); + return (int)((size - 1) / levelSizeArray[level]); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static void InsertEntryAfter(Entry* entry, Entry* position) + { + Entry* next = position->NextNear; + entry->NextNear = next; + entry->PreviousNear = position; + next->PreviousNear = entry; + position->NextNear = entry; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static void InsertEntryBefore(Entry* entry, Entry* position) + { + Entry* prev = position->PreviousNear; + entry->NextNear = position; + entry->PreviousNear = prev; + prev->NextNear = entry; + position->PreviousNear = entry; + } + + /// + /// Used in Free operations, efficiently remove from buckets and merge adjacent blocks. + /// Current Entry will serve as the final merged block. The Merge will be in lazy + /// strategy. + /// + private void MergeAndRemoveFromBuckets(Entry* entry) + { + if (entry == null) { + return; + } + + + long size = entry->Size; + int originLevel = entry->Level; + int segment = DetermineSegmentIndex(_levelSizeArray, size, originLevel); + do + { + // previous direction merge + Entry* p = entry->PreviousNear; + if (p == null || + p == _spareMemory || + p->State != EntryState.Empty || + p->Level != entry->Level || + !AssertBoundary(p, entry, originLevel)) + { + break; + } + + // Console.WriteLine($"{(ulong)p->Size} merged to {(ulong)entry->Size} previous"); + entry->Size += p->Size; + entry->Position = p->Position; + RemoveFromBucket(originLevel, DetermineSegmentIndex(_levelSizeArray, p->Size, originLevel), (BucketNode*)p->Position); + RemoveFromPositionChain(p); + } while (true); + + do + { + // next direction merge + Entry* n = entry->NextNear; + if (n == null || + n == _spareMemory || + n->State != EntryState.Empty || + n->Level != entry->Level || + !AssertBoundary(n, entry, originLevel)) + { + break; + } + + // Console.WriteLine($"{(ulong)n->Size} merged to {(ulong)entry->Size} next"); + entry->Size += n->Size; + RemoveFromBucket(originLevel, DetermineSegmentIndex(_levelSizeArray, n->Size, originLevel), (BucketNode*)n->Position); + RemoveFromPositionChain(n); + } while (true); + originLevel = int.Min(9, originLevel); + entry->Level += entry->Size >= _levelSizeArray[originLevel] * 4 ? 1 : 0; + entry->Level &= 15; + + BucketNode* bucket = (BucketNode*)entry->Position; + bucket->EntryRef = entry; + } + + /// + /// Remove node from position linked list, this method does not recycle a BucketNode from + /// size bucket + /// + private void RemoveFromPositionChain(Entry* entry) + { + Entry* prev = entry->PreviousNear; + Entry* next = entry->NextNear; + + prev->NextNear = next; + next->PreviousNear = prev; + + // Clear node pointers + entry->NextNear = null; + entry->PreviousNear = null; + + // Console.WriteLine("entry recycled."); + _entries.Free((nuint)entry); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static void SetEntryLevel(Entry* entry, nuint position, long size) + { + entry ->Position = position; + entry->Size = size; + entry->Level = GetLevelFromSize(size); + } + + /// + /// Entry structure - streamlined version (only position and state information) Stored in + /// external SLAB + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + internal struct Entry + { + + [FieldOffset(0)] internal Entry* NextNear; // Position linked list: next pointer + [FieldOffset(8)] internal Entry* PreviousNear; // Position linked list: previous pointer + + [FieldOffset(24)] internal int Level; // Level of the block in the allocator + [FieldOffset(16)] internal long Size; // Block size information + [FieldOffset(36)] public EntryState State; + [FieldOffset(28)] public nuint Position; // Memory block position + + } + + internal enum EntryState : uint + { + + Spare, + Empty, + Alloc, + Large + + } + + } +} diff --git a/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.cs b/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.cs index ed2705b7..97b4149e 100644 --- a/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.cs +++ b/StgSharp.Common/HighPerformance/Memory/HLSFAllocator.cs @@ -1,178 +1,178 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="HLSFAllocator" -// 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 System; -using System.Buffers; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Text; - -namespace StgSharp.Mathematics.Memory -{ - public unsafe partial class HybridLayerSegregatedFitAllocator : IDisposable - { - - // Bucket system field - directly in main allocator class - private readonly BucketNode *[] _bucketHeads; - - // _spareMemory is also the beginning position of allocator - private Entry *_spareMemory; - private readonly byte* m_Buffer; - private bool disposedValue; - private readonly int _align; - private readonly long _maxSize; - private readonly nuint _size; - private readonly SlabAllocator _entries; - - public HybridLayerSegregatedFitAllocator(nuint byteSize) - { - if (byteSize < 64) { - throw new InvalidOperationException(); - } - _entries = SlabAllocator.Create(64, SlabBufferLayout.Chunked, false); - _size = byteSize; - m_Buffer = (byte *)NativeMemory.AlignedAlloc(byteSize, 16); - _align = 16; - - _bucketHeads = new BucketNode *[_levelSizeArray.Length * 3 + 1]; - - _spareMemory = (Entry *)_entries.Allocate(); - _spareMemory->State = EntryState.Spare; - _spareMemory->PreviousNear = _spareMemory; - _spareMemory->NextNear = _spareMemory; - _spareMemory->Position = (nuint)m_Buffer; - _spareMemory->Size = (long)byteSize; - - _maxSize = 32U * 1024U * 1024U; - } - - public HybridLayerSegregatedFitAllocator(nuint byteSize, uint maxBlockSize) - { - _entries = SlabAllocator.Create(64, SlabBufferLayout.Chunked, false); - m_Buffer = (byte *)NativeMemory.AlignedAlloc(byteSize, 16); - _align = 16; - _size = byteSize; - - _spareMemory = (Entry *)_entries.Allocate(); - _spareMemory->State = EntryState.Empty; - _spareMemory->PreviousNear = _spareMemory; - _spareMemory->NextNear = _spareMemory; - _spareMemory->Position = (nuint)m_Buffer; - _spareMemory->Size = (long)byteSize; - - int levelCountOrigin = _levelSizeArray.Length; - int levelCount = GetLevelFromSize(maxBlockSize) + 1; - Array.Resize(ref _levelSizeArray, levelCount); - _bucketHeads = new BucketNode *[(levelCount * 3) + 1]; - int size = _levelSizeArray[^1]; - for (int i = levelCountOrigin; i < levelCount; i++) - { - size *= 4; - _levelSizeArray[i] = size; - } - _maxSize = maxBlockSize; - } - - public HybridLayerSegregatedFitAllocator(nuint byteSize, int align) - { - if (align < 16 || (align & (align - 1)) != 0) { - throw new ArgumentException( - "Alignment must be a power of two and at least 16 bytes."); - } - _entries = SlabAllocator.Create(64, SlabBufferLayout.Chunked, false); - m_Buffer = (byte *)NativeMemory.AlignedAlloc(byteSize, (nuint)align); - _align = align; - _size = byteSize; - - _bucketHeads = new BucketNode *[_levelSizeArray.Length * 3 + 1]; - - _spareMemory = (Entry *)_entries.Allocate(); - _spareMemory->State = EntryState.Empty; - _spareMemory->PreviousNear = _spareMemory; - _spareMemory->NextNear = _spareMemory; - _spareMemory->Position = (nuint)m_Buffer; - _spareMemory->Size = (long)byteSize; - - _maxSize = 32U * 1024U * 1024U; - } - - public HybridLayerSegregatedFitAllocator(nuint byteSize, int align, long maxBlockSize) - { - if (align < 16 || (align & (align - 1)) != 0) { - throw new ArgumentException( - "Alignment must be a power of two and at least 16 bytes."); - } - _entries = SlabAllocator.Create(64, SlabBufferLayout.Chunked, false); - m_Buffer = (byte*)NativeMemory.AlignedAlloc(byteSize, (nuint)align); - _align = align; - _size = byteSize; - - _spareMemory = (Entry *)_entries.Allocate(); - _spareMemory->State = EntryState.Empty; - _spareMemory->PreviousNear = _spareMemory; - _spareMemory->NextNear = _spareMemory; - _spareMemory->Position = (nuint)m_Buffer; - _spareMemory->Size = (long)byteSize; - - int levelCountOrigin = _levelSizeArray.Length; - int levelCount = GetLevelFromSize(maxBlockSize) + 1; - Array.Resize(ref _levelSizeArray, levelCount); - _bucketHeads = new BucketNode *[levelCount * 3 + 1]; - int size = _levelSizeArray[^1]; - for (int i = levelCountOrigin; i < levelCount; i++) - { - size *= 4; - _levelSizeArray[i] = size; - } - _maxSize = maxBlockSize; - } - - public void Dispose() - { - Dispose(disposing:true); - GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) - { - if (!disposedValue) - { - if (disposing) { - _entries.Dispose(); - } - NativeMemory.AlignedFree(m_Buffer); - disposedValue = true; - } - } - - ~HybridLayerSegregatedFitAllocator() - { - Dispose(disposing:false); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="HLSFAllocator" +// 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 System; +using System.Buffers; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Text; + +namespace StgSharp.Mathematics.Memory +{ + public unsafe partial class HybridLayerSegregatedFitAllocator : IDisposable + { + + // Bucket system field - directly in main allocator class + private readonly BucketNode *[] _bucketHeads; + + // _spareMemory is also the beginning position of allocator + private Entry *_spareMemory; + private readonly byte* m_Buffer; + private bool disposedValue; + private readonly int _align; + private readonly long _maxSize; + private readonly nuint _size; + private readonly SlabAllocator _entries; + + public HybridLayerSegregatedFitAllocator(nuint byteSize) + { + if (byteSize < 64) { + throw new InvalidOperationException(); + } + _entries = SlabAllocator.Create(64, SlabBufferLayout.Chunked, false); + _size = byteSize; + m_Buffer = (byte *)NativeMemory.AlignedAlloc(byteSize, 16); + _align = 16; + + _bucketHeads = new BucketNode *[_levelSizeArray.Length * 3 + 1]; + + _spareMemory = (Entry *)_entries.Allocate(); + _spareMemory->State = EntryState.Spare; + _spareMemory->PreviousNear = _spareMemory; + _spareMemory->NextNear = _spareMemory; + _spareMemory->Position = (nuint)m_Buffer; + _spareMemory->Size = (long)byteSize; + + _maxSize = 32U * 1024U * 1024U; + } + + public HybridLayerSegregatedFitAllocator(nuint byteSize, uint maxBlockSize) + { + _entries = SlabAllocator.Create(64, SlabBufferLayout.Chunked, false); + m_Buffer = (byte *)NativeMemory.AlignedAlloc(byteSize, 16); + _align = 16; + _size = byteSize; + + _spareMemory = (Entry *)_entries.Allocate(); + _spareMemory->State = EntryState.Empty; + _spareMemory->PreviousNear = _spareMemory; + _spareMemory->NextNear = _spareMemory; + _spareMemory->Position = (nuint)m_Buffer; + _spareMemory->Size = (long)byteSize; + + int levelCountOrigin = _levelSizeArray.Length; + int levelCount = GetLevelFromSize(maxBlockSize) + 1; + Array.Resize(ref _levelSizeArray, levelCount); + _bucketHeads = new BucketNode *[(levelCount * 3) + 1]; + int size = _levelSizeArray[^1]; + for (int i = levelCountOrigin; i < levelCount; i++) + { + size *= 4; + _levelSizeArray[i] = size; + } + _maxSize = maxBlockSize; + } + + public HybridLayerSegregatedFitAllocator(nuint byteSize, int align) + { + if (align < 16 || (align & (align - 1)) != 0) { + throw new ArgumentException( + "Alignment must be a power of two and at least 16 bytes."); + } + _entries = SlabAllocator.Create(64, SlabBufferLayout.Chunked, false); + m_Buffer = (byte *)NativeMemory.AlignedAlloc(byteSize, (nuint)align); + _align = align; + _size = byteSize; + + _bucketHeads = new BucketNode *[_levelSizeArray.Length * 3 + 1]; + + _spareMemory = (Entry *)_entries.Allocate(); + _spareMemory->State = EntryState.Empty; + _spareMemory->PreviousNear = _spareMemory; + _spareMemory->NextNear = _spareMemory; + _spareMemory->Position = (nuint)m_Buffer; + _spareMemory->Size = (long)byteSize; + + _maxSize = 32U * 1024U * 1024U; + } + + public HybridLayerSegregatedFitAllocator(nuint byteSize, int align, long maxBlockSize) + { + if (align < 16 || (align & (align - 1)) != 0) { + throw new ArgumentException( + "Alignment must be a power of two and at least 16 bytes."); + } + _entries = SlabAllocator.Create(64, SlabBufferLayout.Chunked, false); + m_Buffer = (byte*)NativeMemory.AlignedAlloc(byteSize, (nuint)align); + _align = align; + _size = byteSize; + + _spareMemory = (Entry *)_entries.Allocate(); + _spareMemory->State = EntryState.Empty; + _spareMemory->PreviousNear = _spareMemory; + _spareMemory->NextNear = _spareMemory; + _spareMemory->Position = (nuint)m_Buffer; + _spareMemory->Size = (long)byteSize; + + int levelCountOrigin = _levelSizeArray.Length; + int levelCount = GetLevelFromSize(maxBlockSize) + 1; + Array.Resize(ref _levelSizeArray, levelCount); + _bucketHeads = new BucketNode *[levelCount * 3 + 1]; + int size = _levelSizeArray[^1]; + for (int i = levelCountOrigin; i < levelCount; i++) + { + size *= 4; + _levelSizeArray[i] = size; + } + _maxSize = maxBlockSize; + } + + public void Dispose() + { + Dispose(disposing:true); + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) + { + if (!disposedValue) + { + if (disposing) { + _entries.Dispose(); + } + NativeMemory.AlignedFree(m_Buffer); + disposedValue = true; + } + } + + ~HybridLayerSegregatedFitAllocator() + { + Dispose(disposing:false); + } + + } +} diff --git a/StgSharp.Common/HighPerformance/Memory/InroductionToHLSF.md b/StgSharp.Common/HighPerformance/Memory/InroductionToHLSF.md index 58163b2c..3a23d32f 100644 --- a/StgSharp.Common/HighPerformance/Memory/InroductionToHLSF.md +++ b/StgSharp.Common/HighPerformance/Memory/InroductionToHLSF.md @@ -1,137 +1,137 @@ -# HLSF (Hybrid Layer Segregated Fit) Allocator - -A constant-time (O(1)) allocator for real-time, high-throughput scenarios. It uses layered size classes with segmented buckets and stores all metadata externally for clean user memory and better cache locality. - -## Key Points - -- O(1) allocate/free with 10 levels: 64B x 16MB; each level split into 1x/2x/3x segments -- External metadata (`Entry`, `BucketNode`) in dedicated SLABs; user blocks have no headers -- Configurable alignment (>=16B); maximum block size is configurable at construction time via the `maxBlockSize` parameter (default 32MB, 10 levels). The level array and bucket table are dynamically extended when a larger `maxBlockSize` is specified. There is no implicit fallback to `NativeMemory` for oversized requests. -- Single-threaded implementation (external sync required for multi-threaded use) - -## Quick Use - -```csharp -using var hlsf = new HybridLayerSegregatedFitAllocator(64 * 1024 * 1024); -var h = hlsf.Alloc(1024); -Span s = h.BufferHandle; s[0] = 42; -hlsf.Free(h); -``` - -## Core APIs - -### Alloc(uint size) - -- Purpose: Allocate a block of at least `size` bytes. -- Input: `size` in bytes. Must not exceed the `maxBlockSize` configured at construction time (default 32MB). If `size > _maxSize`, an `InvalidOperationException` is thrown. -- Output: `HybridLayerSegregatedFitAllocationHandle` with pointer access and `Span`. -- Behavior: - - Classify into level/segment and pop a matching bucket; escalate segments and levels if empty. - - Fallback to overflow bucket or carve 32MB from spare memory if all buckets are empty. - - Mark selected `Entry` as Alloc; slice any remainder into `Empty` entries and push to buckets. - - There is no implicit fallback to `NativeMemory.AlignedAlloc` for oversized requests — all allocations are served from the pre-allocated arena. The level array and bucket table are dynamically sized based on the `maxBlockSize` parameter. - -### Free(HybridLayerSegregatedFitAllocationHandle handle) - -- Purpose: Free a previously allocated block. -- Behavior: - - Mark the corresponding `Entry` as `Empty`. - - Merge with adjacent `Empty` entries in both directions (boundary and level constraints). - - Remove merged neighbors from buckets, update position chain, and optionally promote level. - - Re-enqueue the final `Entry` into the appropriate bucket. - -### Collect() - -- Purpose: Reclaim and rebalance free entries without touching allocated blocks. -- Behavior: - - Consolidate fragmented regions where possible and improve bucket coverage. - - Intended to be cheap; safe to call between benchmark phases. - -### BenchmarkDotNet (HLSF vs Libc) - -Environment: .NET 8.0.23 (Release), x64 RyuJIT AVX2, Windows 11, AMD Ryzen 7 6800H. - -| Method | Mean | StdDev | Ratio | Allocated | -|------- |-----:|------:|------:|----------:| -| Hlsf | 838.4 µs | 40.6 µs | 1.00 | 64 B | -| Libc | 849.8 µs | 100.2 µs | 1.01 | 64 B | - -Interpretation: HLSF matches libc allocation throughput under the same workload, with slightly tighter dispersion in this run. - -> Note: BenchmarkDotNet also warned that the minimum iteration time was under 1ms; for more stable statistics, increase per-iteration work (e.g., higher `AllocationCount`). - -## Detailed Design (summary) -- -- Size classes: The default level size array is [64, 256, 1024, 4096, 16384, 65536, 262144, 1048576, 4194304, 16777216] (10 levels, 64B × 4^level). When `maxBlockSize` is specified at construction and exceeds the default range, additional levels are appended (each 4× the previous) to cover the requested maximum block size. -- Segments per level: 1x, 2x, 3x -- Buckets: index = 3 * level + segment (overflow bucket for level > 9) -- Metadata: Entry (external SLAB, position chain), BucketNode (user region, bucket chain) -- Position chain: circular doubly linked list anchored by spare sentinel -- Allocation: search buckets by level/segment with escalation; if none, carve 32MB from spare; set Alloc; slice remainder into buckets -- Slicing: align to level boundaries, pack contiguous blocks forward/backward to minimize overhead -- Free/Merge: bidirectional merge under boundary and level constraints; update buckets; optional level promotion -- Alignment: default 16B; internal blocks aligned by slicing/edge calculation -- Complexity: average O(1) with bounded levels and constant-time bucket ops - -- `Entry` (external SLAB): linkage in position chain, `Position`, `Size`, `Level`, `State` - - Invariants: near neighbors must form a consistent double-linked ring; `Level` setter validates size vs. level window -- `BucketNode` (in user region): `EntryRef`, `NextLevel`, `PreviousLevel`, `IsInBucket` -- Position chain: circular doubly linked list anchored by sentinel `_spareMemory` (`State.Spare`) - -### Allocation Flow - -1) Compute `level` and `segment` from requested `size` -2) Try pop bucket (`TryPopLevelForAllocation(level, segment, out entry)`) and escalate: - - Advance `segment` 0��1��2, then `level++`, until `MaxLevel` - - If still empty: try pop from overflow bucket (L=10, seg=1) or `TryAllocateNew32MBBlock` -3) On success: bound-check the slice offset; set `entry` to `Alloc` using `SetEntryLevel` -4) If remainder exists in the source region, call `SliceMemory(entry->NextNear, remainder)` to produce free chunks into buckets - -### Slicing Logic (`SliceMemory`) - -- Inputs: `next` entry position, `sizeToSlice` -- Compute `offset` and `end` relative to base buffer; pick starting level by trailing-zero count of `offset`: - - `i = (BitOperations.TrailingZeroCount(offset) - 6) / 2`, clamped to `�� MaxLevel` -- Three phases to cover [offset, end): - 1) Forward levels i..N-1: for each level size `size` and `upper=size*4`, align to `edge=((offset+upper-1)/upper)*upper`, pack `count = ((min(edge,end) - offset) / size)` blocks - 2) If `i > MaxLevel`: pack in largest upper window on tail - 3) Backward i-1..0: fill remaining tail with smaller sizes -- For each packed region: allocate new `Entry`, insert before `next`, mark `Empty`, and push corresponding `BucketNode` into the `(level, segment)` bucket (`PushBucketToLevel(i, count-1, b)`) - -### Free and Merge (`MergeAndRemoveFromBuckets`) - -- Given an `Entry` to free (turned `Empty` by caller): - - Merge left while neighbor `p` is `Empty`, same `Level`, and within boundary (`AssertBoundary`) - - Remove `p` from bucket (`RemoveFromBucket`), expand current, fix `Position`, unlink `p` - - Merge right with neighbor `n` by the same rule - - Optionally promote `Level` if `Size �� levelSizeArray[originLevel] * 4` - - Ensure `BucketNode.EntryRef` points to the merged entry; caller re-enqueues into the proper bucket - -### Buckets - -- `PushBucketToLevel(level, segment, node)`: push to bucket head, set `IsInBucket`, maintain prev/next -- `TryPopLevel(level, segment, out node)`: pop head; if empty, return false -- `RemoveFromBucket(level, segment, node)`: unlink from middle or use `TryPopLevel` if it is the head - -### Large Allocations and Spare Memory - -- Requests exceeding the configured `maxBlockSize` are rejected with `InvalidOperationException`. All allocations are served from the pre-allocated arena. -- When all buckets are empty, `TryAllocateNew32MBBlock` carves a region (up to 32MB) from `_spareMemory` to replenish the bucket system, builds an `Empty` entry, and advances the spare pointer - -### Alignment - -- Default `_align = 16`; `AlignOfLevel(level)` returns `min(levelSizeArray[level], _align)` -- Internal blocks align to level boundaries by design of slicing/edge calculations - -### Complexity and Invariants - -- Allocate/free are O(1) on average with bounded levels (��10) and constant-time bucket ops -- Invariants guarded by exceptions (e.g., `HLSFPositionChainBreakException`) and pointer consistency checks - -## Profiling (hotspots, current workloads) - -- SliceMemory ~22% (self ~17%) �� slicing and bucket enqueue dominate allocation path -- MergeAndRemoveFromBuckets ~13% (self ~12%) �� merge + removal dominate free path -- Collect ~7.6% (self ~7.5%) �� low overall cost - +# HLSF (Hybrid Layer Segregated Fit) Allocator + +A constant-time (O(1)) allocator for real-time, high-throughput scenarios. It uses layered size classes with segmented buckets and stores all metadata externally for clean user memory and better cache locality. + +## Key Points + +- O(1) allocate/free with 10 levels: 64B x 16MB; each level split into 1x/2x/3x segments +- External metadata (`Entry`, `BucketNode`) in dedicated SLABs; user blocks have no headers +- Configurable alignment (>=16B); maximum block size is configurable at construction time via the `maxBlockSize` parameter (default 32MB, 10 levels). The level array and bucket table are dynamically extended when a larger `maxBlockSize` is specified. There is no implicit fallback to `NativeMemory` for oversized requests. +- Single-threaded implementation (external sync required for multi-threaded use) + +## Quick Use + +```csharp +using var hlsf = new HybridLayerSegregatedFitAllocator(64 * 1024 * 1024); +var h = hlsf.Alloc(1024); +Span s = h.BufferHandle; s[0] = 42; +hlsf.Free(h); +``` + +## Core APIs + +### Alloc(uint size) + +- Purpose: Allocate a block of at least `size` bytes. +- Input: `size` in bytes. Must not exceed the `maxBlockSize` configured at construction time (default 32MB). If `size > _maxSize`, an `InvalidOperationException` is thrown. +- Output: `HybridLayerSegregatedFitAllocationHandle` with pointer access and `Span`. +- Behavior: + - Classify into level/segment and pop a matching bucket; escalate segments and levels if empty. + - Fallback to overflow bucket or carve 32MB from spare memory if all buckets are empty. + - Mark selected `Entry` as Alloc; slice any remainder into `Empty` entries and push to buckets. + - There is no implicit fallback to `NativeMemory.AlignedAlloc` for oversized requests — all allocations are served from the pre-allocated arena. The level array and bucket table are dynamically sized based on the `maxBlockSize` parameter. + +### Free(HybridLayerSegregatedFitAllocationHandle handle) + +- Purpose: Free a previously allocated block. +- Behavior: + - Mark the corresponding `Entry` as `Empty`. + - Merge with adjacent `Empty` entries in both directions (boundary and level constraints). + - Remove merged neighbors from buckets, update position chain, and optionally promote level. + - Re-enqueue the final `Entry` into the appropriate bucket. + +### Collect() + +- Purpose: Reclaim and rebalance free entries without touching allocated blocks. +- Behavior: + - Consolidate fragmented regions where possible and improve bucket coverage. + - Intended to be cheap; safe to call between benchmark phases. + +### BenchmarkDotNet (HLSF vs Libc) + +Environment: .NET 8.0.23 (Release), x64 RyuJIT AVX2, Windows 11, AMD Ryzen 7 6800H. + +| Method | Mean | StdDev | Ratio | Allocated | +|------- |-----:|------:|------:|----------:| +| Hlsf | 838.4 µs | 40.6 µs | 1.00 | 64 B | +| Libc | 849.8 µs | 100.2 µs | 1.01 | 64 B | + +Interpretation: HLSF matches libc allocation throughput under the same workload, with slightly tighter dispersion in this run. + +> Note: BenchmarkDotNet also warned that the minimum iteration time was under 1ms; for more stable statistics, increase per-iteration work (e.g., higher `AllocationCount`). + +## Detailed Design (summary) +- +- Size classes: The default level size array is [64, 256, 1024, 4096, 16384, 65536, 262144, 1048576, 4194304, 16777216] (10 levels, 64B × 4^level). When `maxBlockSize` is specified at construction and exceeds the default range, additional levels are appended (each 4× the previous) to cover the requested maximum block size. +- Segments per level: 1x, 2x, 3x +- Buckets: index = 3 * level + segment (overflow bucket for level > 9) +- Metadata: Entry (external SLAB, position chain), BucketNode (user region, bucket chain) +- Position chain: circular doubly linked list anchored by spare sentinel +- Allocation: search buckets by level/segment with escalation; if none, carve 32MB from spare; set Alloc; slice remainder into buckets +- Slicing: align to level boundaries, pack contiguous blocks forward/backward to minimize overhead +- Free/Merge: bidirectional merge under boundary and level constraints; update buckets; optional level promotion +- Alignment: default 16B; internal blocks aligned by slicing/edge calculation +- Complexity: average O(1) with bounded levels and constant-time bucket ops + +- `Entry` (external SLAB): linkage in position chain, `Position`, `Size`, `Level`, `State` + - Invariants: near neighbors must form a consistent double-linked ring; `Level` setter validates size vs. level window +- `BucketNode` (in user region): `EntryRef`, `NextLevel`, `PreviousLevel`, `IsInBucket` +- Position chain: circular doubly linked list anchored by sentinel `_spareMemory` (`State.Spare`) + +### Allocation Flow + +1) Compute `level` and `segment` from requested `size` +2) Try pop bucket (`TryPopLevelForAllocation(level, segment, out entry)`) and escalate: + - Advance `segment` 0��1��2, then `level++`, until `MaxLevel` + - If still empty: try pop from overflow bucket (L=10, seg=1) or `TryAllocateNew32MBBlock` +3) On success: bound-check the slice offset; set `entry` to `Alloc` using `SetEntryLevel` +4) If remainder exists in the source region, call `SliceMemory(entry->NextNear, remainder)` to produce free chunks into buckets + +### Slicing Logic (`SliceMemory`) + +- Inputs: `next` entry position, `sizeToSlice` +- Compute `offset` and `end` relative to base buffer; pick starting level by trailing-zero count of `offset`: + - `i = (BitOperations.TrailingZeroCount(offset) - 6) / 2`, clamped to `�� MaxLevel` +- Three phases to cover [offset, end): + 1) Forward levels i..N-1: for each level size `size` and `upper=size*4`, align to `edge=((offset+upper-1)/upper)*upper`, pack `count = ((min(edge,end) - offset) / size)` blocks + 2) If `i > MaxLevel`: pack in largest upper window on tail + 3) Backward i-1..0: fill remaining tail with smaller sizes +- For each packed region: allocate new `Entry`, insert before `next`, mark `Empty`, and push corresponding `BucketNode` into the `(level, segment)` bucket (`PushBucketToLevel(i, count-1, b)`) + +### Free and Merge (`MergeAndRemoveFromBuckets`) + +- Given an `Entry` to free (turned `Empty` by caller): + - Merge left while neighbor `p` is `Empty`, same `Level`, and within boundary (`AssertBoundary`) + - Remove `p` from bucket (`RemoveFromBucket`), expand current, fix `Position`, unlink `p` + - Merge right with neighbor `n` by the same rule + - Optionally promote `Level` if `Size �� levelSizeArray[originLevel] * 4` + - Ensure `BucketNode.EntryRef` points to the merged entry; caller re-enqueues into the proper bucket + +### Buckets + +- `PushBucketToLevel(level, segment, node)`: push to bucket head, set `IsInBucket`, maintain prev/next +- `TryPopLevel(level, segment, out node)`: pop head; if empty, return false +- `RemoveFromBucket(level, segment, node)`: unlink from middle or use `TryPopLevel` if it is the head + +### Large Allocations and Spare Memory + +- Requests exceeding the configured `maxBlockSize` are rejected with `InvalidOperationException`. All allocations are served from the pre-allocated arena. +- When all buckets are empty, `TryAllocateNew32MBBlock` carves a region (up to 32MB) from `_spareMemory` to replenish the bucket system, builds an `Empty` entry, and advances the spare pointer + +### Alignment + +- Default `_align = 16`; `AlignOfLevel(level)` returns `min(levelSizeArray[level], _align)` +- Internal blocks align to level boundaries by design of slicing/edge calculations + +### Complexity and Invariants + +- Allocate/free are O(1) on average with bounded levels (��10) and constant-time bucket ops +- Invariants guarded by exceptions (e.g., `HLSFPositionChainBreakException`) and pointer consistency checks + +## Profiling (hotspots, current workloads) + +- SliceMemory ~22% (self ~17%) �� slicing and bucket enqueue dominate allocation path +- MergeAndRemoveFromBuckets ~13% (self ~12%) �� merge + removal dominate free path +- Collect ~7.6% (self ~7.5%) �� low overall cost + Focus: reduce per-slice math and bucket ops; add fast-paths for aligned regions; batch/lazy removals after merges. \ No newline at end of file diff --git a/StgSharp.Common/HighPerformance/Memory/SlabAllocationHandle.cs b/StgSharp.Common/HighPerformance/Memory/SlabAllocationHandle.cs index 57c34ad9..93e46ba7 100644 --- a/StgSharp.Common/HighPerformance/Memory/SlabAllocationHandle.cs +++ b/StgSharp.Common/HighPerformance/Memory/SlabAllocationHandle.cs @@ -1,56 +1,56 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="SlabAllocationHandle" -// 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 System; -using System.Runtime.CompilerServices; - -namespace StgSharp.Mathematics.Memory -{ - public unsafe struct SlabAllocationHandle : IDisposable where T: unmanaged - { - - private readonly SlabAllocator _allocator; - - internal SlabAllocationHandle(SlabAllocator allocator, bool locked) - { - _allocator = allocator; - Locked = locked; - } - - public bool Locked { get; set; } - - public void Dispose() - { - if (Locked) - { - _allocator.ExitBufferReading(); - Locked = false; - } - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="SlabAllocationHandle" +// 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 System; +using System.Runtime.CompilerServices; + +namespace StgSharp.Mathematics.Memory +{ + public unsafe struct SlabAllocationHandle : IDisposable where T: unmanaged + { + + private readonly SlabAllocator _allocator; + + internal SlabAllocationHandle(SlabAllocator allocator, bool locked) + { + _allocator = allocator; + Locked = locked; + } + + public bool Locked { get; set; } + + public void Dispose() + { + if (Locked) + { + _allocator.ExitBufferReading(); + Locked = false; + } + } + + } +} diff --git a/StgSharp.Common/HighPerformance/Memory/SlabAllocator.Chunked.cs b/StgSharp.Common/HighPerformance/Memory/SlabAllocator.Chunked.cs index d1edf4b4..cf31fa0b 100644 --- a/StgSharp.Common/HighPerformance/Memory/SlabAllocator.Chunked.cs +++ b/StgSharp.Common/HighPerformance/Memory/SlabAllocator.Chunked.cs @@ -1,134 +1,134 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="SlabAllocator.Chunked" -// 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.Threading; - -using System; -using System.Collections.Generic; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Threading; - -namespace StgSharp.Mathematics.Memory -{ - internal sealed unsafe class ChunkedSlabAllocator : SlabAllocator where T: unmanaged - { - - private bool _disposed; - - private BufferStack _buffers; - private BufferStack _recycle; - private readonly int _elementSize = Unsafe.SizeOf(); - - private nuint _currentBuffer; - private nuint _currentCapacity, _currentIndex; - - public ChunkedSlabAllocator(nuint count) - { - _currentBuffer = (nuint)NativeMemory.Alloc(count * (nuint)_elementSize); - - _currentCapacity = count; - int initCount = count switch - { - <= 4 => 4, - > 64 => 64, - _ => (int)count - }; - Span span = stackalloc nuint[initCount]; - for (int i = 0; i < initCount; i++) { - span[i] = _currentBuffer + (nuint)(i * _elementSize); - } - _buffers = new(4); - _buffers.Push(_currentBuffer); - _recycle = BufferStackBuilder.Create(span); - _currentCapacity = count; - _currentIndex = (nuint)initCount; - } - - public override nuint Allocate() - { - if (_recycle.TryPop(out nuint handle)) { - return handle; - } - - // nuint bufferHandle = _currentBuffer; - nuint curIndex = _currentIndex; - if (curIndex >= _currentCapacity) - { - nuint cap = _currentCapacity; - nuint newBuffer = (nuint)NativeMemory.Alloc(cap * (nuint)_elementSize); - _buffers.Push(newBuffer); - _currentBuffer = newBuffer; - _currentIndex = 0; - } - curIndex = _currentIndex; - _currentIndex += 1; - return _currentBuffer + ((nuint)_elementSize * curIndex); - } - - public override void Dispose() - { - if (_disposed) { - return; - } - _disposed = true; - - // NativeMemory.Free((void*)_currentBuffer); - while (_buffers.TryPop(out nuint buffer)) - { - NativeMemory.Free((void*)buffer); - } - _buffers.Dispose(); - _recycle.Dispose(); - GC.SuppressFinalize(this); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override void EnterBufferReading() { } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override void ExitBufferReading() { } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override void Free(nuint index) - { - _recycle.Push(index); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override SlabAllocationHandle ReadAllocation() - { - return new SlabAllocationHandle(this, false); - } - - ~ChunkedSlabAllocator() - { - Dispose(); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="SlabAllocator.Chunked" +// 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.Threading; + +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Threading; + +namespace StgSharp.Mathematics.Memory +{ + internal sealed unsafe class ChunkedSlabAllocator : SlabAllocator where T: unmanaged + { + + private bool _disposed; + + private BufferStack _buffers; + private BufferStack _recycle; + private readonly int _elementSize = Unsafe.SizeOf(); + + private nuint _currentBuffer; + private nuint _currentCapacity, _currentIndex; + + public ChunkedSlabAllocator(nuint count) + { + _currentBuffer = (nuint)NativeMemory.Alloc(count * (nuint)_elementSize); + + _currentCapacity = count; + int initCount = count switch + { + <= 4 => 4, + > 64 => 64, + _ => (int)count + }; + Span span = stackalloc nuint[initCount]; + for (int i = 0; i < initCount; i++) { + span[i] = _currentBuffer + (nuint)(i * _elementSize); + } + _buffers = new(4); + _buffers.Push(_currentBuffer); + _recycle = BufferStackBuilder.Create(span); + _currentCapacity = count; + _currentIndex = (nuint)initCount; + } + + public override nuint Allocate() + { + if (_recycle.TryPop(out nuint handle)) { + return handle; + } + + // nuint bufferHandle = _currentBuffer; + nuint curIndex = _currentIndex; + if (curIndex >= _currentCapacity) + { + nuint cap = _currentCapacity; + nuint newBuffer = (nuint)NativeMemory.Alloc(cap * (nuint)_elementSize); + _buffers.Push(newBuffer); + _currentBuffer = newBuffer; + _currentIndex = 0; + } + curIndex = _currentIndex; + _currentIndex += 1; + return _currentBuffer + ((nuint)_elementSize * curIndex); + } + + public override void Dispose() + { + if (_disposed) { + return; + } + _disposed = true; + + // NativeMemory.Free((void*)_currentBuffer); + while (_buffers.TryPop(out nuint buffer)) + { + NativeMemory.Free((void*)buffer); + } + _buffers.Dispose(); + _recycle.Dispose(); + GC.SuppressFinalize(this); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override void EnterBufferReading() { } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override void ExitBufferReading() { } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override void Free(nuint index) + { + _recycle.Push(index); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override SlabAllocationHandle ReadAllocation() + { + return new SlabAllocationHandle(this, false); + } + + ~ChunkedSlabAllocator() + { + Dispose(); + } + + } +} diff --git a/StgSharp.Common/HighPerformance/Memory/SlabAllocator.ChunkedConcurrent.cs b/StgSharp.Common/HighPerformance/Memory/SlabAllocator.ChunkedConcurrent.cs index 7ebb68dd..c51971b2 100644 --- a/StgSharp.Common/HighPerformance/Memory/SlabAllocator.ChunkedConcurrent.cs +++ b/StgSharp.Common/HighPerformance/Memory/SlabAllocator.ChunkedConcurrent.cs @@ -1,157 +1,157 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="SlabAllocator.ChunkedConcurrent" -// 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.Threading; - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - -namespace StgSharp.Mathematics.Memory -{ - internal sealed unsafe class ConcurrentChunkedSlabAllocator : SlabAllocator where T: unmanaged - { - - private bool _disposed; - - private readonly BufferExpansionLock _lock = new(); - private ConcurrentBufferStack _buffers; - private ConcurrentBufferStack _recycle; - private readonly int _elementSize = Unsafe.SizeOf(); - - private nuint _currentBuffer; - private nuint _currentCapacity, _currentIndex; - - public ConcurrentChunkedSlabAllocator(nuint count) - { - _currentBuffer = (nuint)NativeMemory.Alloc(count * (nuint)_elementSize); - _currentCapacity = count; - int initCount = count switch - { - <= 4 => 4, - > 64 => 64, - _ => (int)count - }; - Span span = stackalloc nuint[initCount]; - for (int i = 0; i < initCount; i++) { - span[i] = _currentBuffer + (nuint)(i * _elementSize); - } - _buffers = new(4); - _recycle = BufferStackBuilder.CreateConcurrent(span); - _currentCapacity = count; - _currentIndex = (nuint)initCount; - } - - public override nuint Allocate() - { - if (_recycle.TryPop(out nuint handle)) { - return handle; - } - while (true) - { - nuint bufferHandle = Volatile.Read(ref _currentBuffer); - nuint curIndex = Volatile.Read(ref _currentIndex); - _lock.EnterMetaDataRead(); - try - { - if (curIndex >= _currentCapacity) - { - _lock.ExitMetaDataRead(); - _lock.EnterExpansionProcess(); - try - { - nuint cap = Volatile.Read(ref _currentCapacity); - nuint newBuffer = (nuint)NativeMemory.Alloc(cap * (nuint)_elementSize); - _buffers.Push(bufferHandle); - _ = Interlocked.Exchange(ref _currentBuffer, newBuffer); - _ = Interlocked.Exchange(ref _currentIndex, 0); - } - finally - { - _lock.ExitExpansionProcess(); - } - } - curIndex = Volatile.Read(ref _currentIndex); - _ = Interlocked.Add( - ref Unsafe.As(ref _currentIndex), (ulong)_elementSize); - return _currentBuffer + ((nuint)_elementSize * curIndex); - } - finally - { - if (_lock.IsThreadReadingMetaData) { - _lock.ExitMetaDataRead(); - } - } - } - } - - public override void Dispose() - { - if (_disposed) { - return; - } - _disposed = true; - NativeMemory.Free((void*)_currentBuffer); - while (_buffers.TryPop(out nuint buffer)) { - NativeMemory.Free((void*)buffer); - } - _lock.Dispose(); - _buffers.Dispose(); - _recycle.Dispose(); - GC.SuppressFinalize(this); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override void EnterBufferReading() { } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override void ExitBufferReading() { } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override void Free(nuint index) - { - _recycle.Push(index); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override SlabAllocationHandle ReadAllocation() - { - return new SlabAllocationHandle(this, false); - } - - ~ConcurrentChunkedSlabAllocator() - { - Dispose(); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="SlabAllocator.ChunkedConcurrent" +// 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.Threading; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace StgSharp.Mathematics.Memory +{ + internal sealed unsafe class ConcurrentChunkedSlabAllocator : SlabAllocator where T: unmanaged + { + + private bool _disposed; + + private readonly BufferExpansionLock _lock = new(); + private ConcurrentBufferStack _buffers; + private ConcurrentBufferStack _recycle; + private readonly int _elementSize = Unsafe.SizeOf(); + + private nuint _currentBuffer; + private nuint _currentCapacity, _currentIndex; + + public ConcurrentChunkedSlabAllocator(nuint count) + { + _currentBuffer = (nuint)NativeMemory.Alloc(count * (nuint)_elementSize); + _currentCapacity = count; + int initCount = count switch + { + <= 4 => 4, + > 64 => 64, + _ => (int)count + }; + Span span = stackalloc nuint[initCount]; + for (int i = 0; i < initCount; i++) { + span[i] = _currentBuffer + (nuint)(i * _elementSize); + } + _buffers = new(4); + _recycle = BufferStackBuilder.CreateConcurrent(span); + _currentCapacity = count; + _currentIndex = (nuint)initCount; + } + + public override nuint Allocate() + { + if (_recycle.TryPop(out nuint handle)) { + return handle; + } + while (true) + { + nuint bufferHandle = Volatile.Read(ref _currentBuffer); + nuint curIndex = Volatile.Read(ref _currentIndex); + _lock.EnterMetaDataRead(); + try + { + if (curIndex >= _currentCapacity) + { + _lock.ExitMetaDataRead(); + _lock.EnterExpansionProcess(); + try + { + nuint cap = Volatile.Read(ref _currentCapacity); + nuint newBuffer = (nuint)NativeMemory.Alloc(cap * (nuint)_elementSize); + _buffers.Push(bufferHandle); + _ = Interlocked.Exchange(ref _currentBuffer, newBuffer); + _ = Interlocked.Exchange(ref _currentIndex, 0); + } + finally + { + _lock.ExitExpansionProcess(); + } + } + curIndex = Volatile.Read(ref _currentIndex); + _ = Interlocked.Add( + ref Unsafe.As(ref _currentIndex), (ulong)_elementSize); + return _currentBuffer + ((nuint)_elementSize * curIndex); + } + finally + { + if (_lock.IsThreadReadingMetaData) { + _lock.ExitMetaDataRead(); + } + } + } + } + + public override void Dispose() + { + if (_disposed) { + return; + } + _disposed = true; + NativeMemory.Free((void*)_currentBuffer); + while (_buffers.TryPop(out nuint buffer)) { + NativeMemory.Free((void*)buffer); + } + _lock.Dispose(); + _buffers.Dispose(); + _recycle.Dispose(); + GC.SuppressFinalize(this); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override void EnterBufferReading() { } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override void ExitBufferReading() { } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override void Free(nuint index) + { + _recycle.Push(index); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override SlabAllocationHandle ReadAllocation() + { + return new SlabAllocationHandle(this, false); + } + + ~ConcurrentChunkedSlabAllocator() + { + Dispose(); + } + + } +} diff --git a/StgSharp.Common/HighPerformance/Memory/SlabAllocator.SequencialConcurrent.cs b/StgSharp.Common/HighPerformance/Memory/SlabAllocator.SequencialConcurrent.cs index f10bd41f..664683d7 100644 --- a/StgSharp.Common/HighPerformance/Memory/SlabAllocator.SequencialConcurrent.cs +++ b/StgSharp.Common/HighPerformance/Memory/SlabAllocator.SequencialConcurrent.cs @@ -1,165 +1,165 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="SlabAllocator.SequencialConcurrent" -// 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.Threading; - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Threading; - -namespace StgSharp.Mathematics.Memory -{ - public sealed unsafe class ConcurrentSequentialSlabAllocator : SlabAllocator where T: unmanaged - { - - private T* _buffer; - - private bool _disposed; - - private readonly BufferExpansionLock _lock = new(); - private readonly ConcurrentBufferStack _stack; - private readonly int _elementSize; - private nuint _highestAllocated; - private ulong _capacity; - - public ConcurrentSequentialSlabAllocator(nuint initialCapacity) - { - _elementSize = Unsafe.SizeOf(); - _capacity = initialCapacity; - _highestAllocated = 0; - - _buffer = (T*)NativeMemory.Alloc((nuint)_capacity * (nuint)_elementSize); - int initCount = _capacity switch - { - <= 4 => 4, - > 64 => 64, - _ => (int)_capacity / 4 - }; - Span span = stackalloc nuint[initCount]; - for (int i = 0; i < initCount; i++) { - span[i] = (nuint)i; - } - _stack = BufferStackBuilder.CreateConcurrent(span); - _highestAllocated += (nuint)initCount; - } - - internal T* BasePointer - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => _buffer; - } - - public override nuint Allocate() - { - if (_stack.TryPop(out nuint index)) { - return index; - } - while (true) - { - index = Volatile.Read(ref _highestAllocated); - _lock.EnterMetaDataRead(); - try - { - if (index >= _capacity) - { - _lock.ExitMetaDataRead(); - _lock.EnterExpansionProcess(); - try - { - _capacity = Volatile.Read(ref _capacity) * 2; - nuint newSize = (nuint)_capacity * (nuint)_elementSize; - _lock.EnterBufferCopy(); - try - { - _buffer = (T*)NativeMemory.Realloc(_buffer, newSize); - } - finally - { - _lock.ExitBufferCopy(); - } - } - finally - { - _lock.ExitExpansionProcess(); - } - } - _ = Interlocked.Increment(ref Unsafe.As(ref _highestAllocated)); - return index; - } - finally - { - if (_lock.IsThreadReadingMetaData) { - _lock.ExitMetaDataRead(); - } - } - } - } - - public override void Dispose() - { - if (_disposed) { - return; - } - _disposed = true; - _stack.Dispose(); - NativeMemory.Free(_buffer); - _lock.Dispose(); - GC.SuppressFinalize(this); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override void EnterBufferReading() - { - _lock.EnterBufferRead(); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override void ExitBufferReading() - { - _lock.ExitBufferRead(); - } - - public override void Free(nuint index) - { - _stack.Push(index); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override SlabAllocationHandle ReadAllocation() - { - EnterBufferReading(); - return new SlabAllocationHandle(this, true); - } - - ~ConcurrentSequentialSlabAllocator() - { - Dispose(); - } - - } +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="SlabAllocator.SequencialConcurrent" +// 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.Threading; + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Threading; + +namespace StgSharp.Mathematics.Memory +{ + public sealed unsafe class ConcurrentSequentialSlabAllocator : SlabAllocator where T: unmanaged + { + + private T* _buffer; + + private bool _disposed; + + private readonly BufferExpansionLock _lock = new(); + private readonly ConcurrentBufferStack _stack; + private readonly int _elementSize; + private nuint _highestAllocated; + private ulong _capacity; + + public ConcurrentSequentialSlabAllocator(nuint initialCapacity) + { + _elementSize = Unsafe.SizeOf(); + _capacity = initialCapacity; + _highestAllocated = 0; + + _buffer = (T*)NativeMemory.Alloc((nuint)_capacity * (nuint)_elementSize); + int initCount = _capacity switch + { + <= 4 => 4, + > 64 => 64, + _ => (int)_capacity / 4 + }; + Span span = stackalloc nuint[initCount]; + for (int i = 0; i < initCount; i++) { + span[i] = (nuint)i; + } + _stack = BufferStackBuilder.CreateConcurrent(span); + _highestAllocated += (nuint)initCount; + } + + internal T* BasePointer + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => _buffer; + } + + public override nuint Allocate() + { + if (_stack.TryPop(out nuint index)) { + return index; + } + while (true) + { + index = Volatile.Read(ref _highestAllocated); + _lock.EnterMetaDataRead(); + try + { + if (index >= _capacity) + { + _lock.ExitMetaDataRead(); + _lock.EnterExpansionProcess(); + try + { + _capacity = Volatile.Read(ref _capacity) * 2; + nuint newSize = (nuint)_capacity * (nuint)_elementSize; + _lock.EnterBufferCopy(); + try + { + _buffer = (T*)NativeMemory.Realloc(_buffer, newSize); + } + finally + { + _lock.ExitBufferCopy(); + } + } + finally + { + _lock.ExitExpansionProcess(); + } + } + _ = Interlocked.Increment(ref Unsafe.As(ref _highestAllocated)); + return index; + } + finally + { + if (_lock.IsThreadReadingMetaData) { + _lock.ExitMetaDataRead(); + } + } + } + } + + public override void Dispose() + { + if (_disposed) { + return; + } + _disposed = true; + _stack.Dispose(); + NativeMemory.Free(_buffer); + _lock.Dispose(); + GC.SuppressFinalize(this); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override void EnterBufferReading() + { + _lock.EnterBufferRead(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override void ExitBufferReading() + { + _lock.ExitBufferRead(); + } + + public override void Free(nuint index) + { + _stack.Push(index); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override SlabAllocationHandle ReadAllocation() + { + EnterBufferReading(); + return new SlabAllocationHandle(this, true); + } + + ~ConcurrentSequentialSlabAllocator() + { + Dispose(); + } + + } } \ No newline at end of file diff --git a/StgSharp.Common/HighPerformance/Memory/SlabAllocator.cs b/StgSharp.Common/HighPerformance/Memory/SlabAllocator.cs index 01e91f86..b273b100 100644 --- a/StgSharp.Common/HighPerformance/Memory/SlabAllocator.cs +++ b/StgSharp.Common/HighPerformance/Memory/SlabAllocator.cs @@ -1,118 +1,118 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="SlabAllocator" -// 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 System; - -namespace StgSharp.Mathematics.Memory -{ - public abstract class SlabAllocator : IDisposable where T: unmanaged - { - - public abstract nuint Allocate(); - - /// - /// Creates a new SLAB allocator instance with the specified configuration. - /// - /// - /// Initial number of objects that can be allocated. - /// - /// - /// Memory layout strategy for the SLAB allocator. - /// - /// - /// Whether to enable concurrent access support. - /// - /// - /// A new SLAB allocator instance. - /// - /// - /// Thrown when an invalid layout is specified. - /// - /// - /// Thrown when requesting unsupported configurations. - /// - /// - /// Important Threading Considerations: While SLAB - /// /// allocators themselves may be designed for single-threaded use, allocated objects - /// are /// frequently shared across multiple threads in real-world applications. Due to - /// the /// special implementation of expandable concurrent sequential SLAB allocators, - /// they rely /// on internal expansion locks to ensure that memory buffer expansions - /// (which involve /// copying the entire buffer to a new location) do not occur while - /// other threads are /// reading from allocated regions. - /// Sequential Layout Limitations: ///
Sequential layout SLAB allocators - /// cannot provide a single-threaded /// version because:They use contiguous memory /// layout that requires - /// buffer expansion when capacity is exceeded - /// ///Buffer expansion involves copying all /// - /// existing data to a new memory location /// - /// Without proper synchronization, concurrent access to allocated objects during /// - /// expansion would cause memory corruptionThe - /// /// expansion lock mechanism is essential even if allocation itself is single- /// - /// threaded
Chunked Layout: - /// ///
Chunked layout allocators can optionally provide single-threaded - /// /// versions since they don't require buffer expansion and copying. Each chunk is - /// /// allocated independently, avoiding the memory relocation issues present in - /// sequential /// layouts.
- ///
- public static SlabAllocator Create(nuint count, SlabBufferLayout layout, bool concurrentSupport = true) - { - if (concurrentSupport) { - return layout switch - { - SlabBufferLayout.Sequential => new ConcurrentSequentialSlabAllocator(count), - SlabBufferLayout.Chunked => new ConcurrentChunkedSlabAllocator(count), - _ => throw new ArgumentOutOfRangeException(nameof(layout), layout, null) - }; - } - return layout switch - { - SlabBufferLayout.Sequential => throw new NotSupportedException("Non-concurrent version of sequential layout SLAB is not supported due to expansion lock requirements for memory safety during buffer expansion."), - SlabBufferLayout.Chunked => new ChunkedSlabAllocator(count), - _ => throw new ArgumentOutOfRangeException(nameof(layout), layout, null) - }; - } - - public abstract void Dispose(); - - public abstract void EnterBufferReading(); - - public abstract void ExitBufferReading(); - - public abstract void Free(nuint index); - - public abstract SlabAllocationHandle ReadAllocation(); - - } - - public enum SlabBufferLayout - { - - Sequential, - Chunked - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="SlabAllocator" +// 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 System; + +namespace StgSharp.Mathematics.Memory +{ + public abstract class SlabAllocator : IDisposable where T: unmanaged + { + + public abstract nuint Allocate(); + + /// + /// Creates a new SLAB allocator instance with the specified configuration. + /// + /// + /// Initial number of objects that can be allocated. + /// + /// + /// Memory layout strategy for the SLAB allocator. + /// + /// + /// Whether to enable concurrent access support. + /// + /// + /// A new SLAB allocator instance. + /// + /// + /// Thrown when an invalid layout is specified. + /// + /// + /// Thrown when requesting unsupported configurations. + /// + /// + /// Important Threading Considerations: While SLAB + /// /// allocators themselves may be designed for single-threaded use, allocated objects + /// are /// frequently shared across multiple threads in real-world applications. Due to + /// the /// special implementation of expandable concurrent sequential SLAB allocators, + /// they rely /// on internal expansion locks to ensure that memory buffer expansions + /// (which involve /// copying the entire buffer to a new location) do not occur while + /// other threads are /// reading from allocated regions. + /// Sequential Layout Limitations: ///
Sequential layout SLAB allocators + /// cannot provide a single-threaded /// version because:They use contiguous memory /// layout that requires + /// buffer expansion when capacity is exceeded + /// ///Buffer expansion involves copying all /// + /// existing data to a new memory location /// + /// Without proper synchronization, concurrent access to allocated objects during /// + /// expansion would cause memory corruptionThe + /// /// expansion lock mechanism is essential even if allocation itself is single- /// + /// threaded
Chunked Layout: + /// ///
Chunked layout allocators can optionally provide single-threaded + /// /// versions since they don't require buffer expansion and copying. Each chunk is + /// /// allocated independently, avoiding the memory relocation issues present in + /// sequential /// layouts.
+ ///
+ public static SlabAllocator Create(nuint count, SlabBufferLayout layout, bool concurrentSupport = true) + { + if (concurrentSupport) { + return layout switch + { + SlabBufferLayout.Sequential => new ConcurrentSequentialSlabAllocator(count), + SlabBufferLayout.Chunked => new ConcurrentChunkedSlabAllocator(count), + _ => throw new ArgumentOutOfRangeException(nameof(layout), layout, null) + }; + } + return layout switch + { + SlabBufferLayout.Sequential => throw new NotSupportedException("Non-concurrent version of sequential layout SLAB is not supported due to expansion lock requirements for memory safety during buffer expansion."), + SlabBufferLayout.Chunked => new ChunkedSlabAllocator(count), + _ => throw new ArgumentOutOfRangeException(nameof(layout), layout, null) + }; + } + + public abstract void Dispose(); + + public abstract void EnterBufferReading(); + + public abstract void ExitBufferReading(); + + public abstract void Free(nuint index); + + public abstract SlabAllocationHandle ReadAllocation(); + + } + + public enum SlabBufferLayout + { + + Sequential, + Chunked + + } +} diff --git a/StgSharp.Common/HighPerformance/RegisterAbstraction/IRegisterType.cs b/StgSharp.Common/HighPerformance/RegisterAbstraction/IRegisterType.cs index 93a03881..eefa15c3 100644 --- a/StgSharp.Common/HighPerformance/RegisterAbstraction/IRegisterType.cs +++ b/StgSharp.Common/HighPerformance/RegisterAbstraction/IRegisterType.cs @@ -1,98 +1,98 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="IRegisterType" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Numerics; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Mathematics -{ - /// - /// Abstraction for a wide SIMD register or equivalent packed numeric storage. Provides raw - /// reference access, broadcast initialization and element level access. Typical - /// implementations map to 128/256/512-bit hardware registers or software emulated blocks. - /// - - public interface IRegisterPresentation - { - - /// - /// Gets a reference to the first element of the register reinterpreted as type . - /// - /// - /// Unmanaged numeric element type implementing . - /// - /// - /// Writable reference to element 0 (lowest lane / lowest bits). - /// - /// - /// Intended for treating the register as a contiguous block of elements. The returned reference - /// must remain valid for the lifetime of the register and be identical to with index 0. Caller must choose a type layout compatible with the - /// actual register representation. - /// - ref T AsRef() where T: unmanaged, INumber; - - /// - /// Fills all elements (lanes) of the register with the provided scalar . - /// - /// - /// Unmanaged numeric element type implementing . - /// - /// - /// Scalar value to replicate to every element. - /// - /// - /// Should map to a single broadcast/shuffle instruction where possible. After completion all - /// lanes read back the same value. - /// - void BroadCastFrom(T value) where T: unmanaged, INumber; - - /// - /// Gets a writable reference to the element at the specified . - /// - /// - /// Unmanaged numeric element type implementing . - /// - /// - /// Zero-based lane index (range defined by implementation). - /// - /// - /// Writable reference to the lane. - /// - /// - /// Enables scalar lane edits without unpacking the entire register. Implementations may omit - /// bounds checks for performance. Caller is responsible for passing a valid index. - /// - ref T Member(int index) where T: unmanaged, INumber; - - } +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="IRegisterType" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Mathematics +{ + /// + /// Abstraction for a wide SIMD register or equivalent packed numeric storage. Provides raw + /// reference access, broadcast initialization and element level access. Typical + /// implementations map to 128/256/512-bit hardware registers or software emulated blocks. + /// + + public interface IRegisterPresentation + { + + /// + /// Gets a reference to the first element of the register reinterpreted as type . + /// + /// + /// Unmanaged numeric element type implementing . + /// + /// + /// Writable reference to element 0 (lowest lane / lowest bits). + /// + /// + /// Intended for treating the register as a contiguous block of elements. The returned reference + /// must remain valid for the lifetime of the register and be identical to with index 0. Caller must choose a type layout compatible with the + /// actual register representation. + /// + ref T AsRef() where T: unmanaged, INumber; + + /// + /// Fills all elements (lanes) of the register with the provided scalar . + /// + /// + /// Unmanaged numeric element type implementing . + /// + /// + /// Scalar value to replicate to every element. + /// + /// + /// Should map to a single broadcast/shuffle instruction where possible. After completion all + /// lanes read back the same value. + /// + void BroadCastFrom(T value) where T: unmanaged, INumber; + + /// + /// Gets a writable reference to the element at the specified . + /// + /// + /// Unmanaged numeric element type implementing . + /// + /// + /// Zero-based lane index (range defined by implementation). + /// + /// + /// Writable reference to the lane. + /// + /// + /// Enables scalar lane edits without unpacking the entire register. Implementations may omit + /// bounds checks for performance. Caller is responsible for passing a valid index. + /// + ref T Member(int index) where T: unmanaged, INumber; + + } } \ No newline at end of file diff --git a/StgSharp.Common/HighPerformance/RegisterAbstraction/M128.cs b/StgSharp.Common/HighPerformance/RegisterAbstraction/M128.cs index 43dc2407..a5330a4a 100644 --- a/StgSharp.Common/HighPerformance/RegisterAbstraction/M128.cs +++ b/StgSharp.Common/HighPerformance/RegisterAbstraction/M128.cs @@ -1,120 +1,120 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="M128" -// 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 System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -using System.Text; - -namespace StgSharp.Mathematics -{ - [StructLayout(LayoutKind.Explicit, Pack = 16)] - public unsafe struct M128 : IRegisterPresentation - { - - [FieldOffset(0)] internal fixed byte Buffer[16]; - [FieldOffset(0)] internal Vector128 Vec; - - internal M128(Vector4 v) - { - Unsafe.SkipInit(out this); - Unsafe.SkipInit(out Vec); - Vec = v.AsVector128(); - } - - internal M128(Vector128 v) - { - Unsafe.SkipInit(out this); - Vec = v; - } - - public ref T AsRef() where T: unmanaged, INumber - { - return ref Unsafe.As(ref Buffer[0]); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public readonly Vector4 AsVector4() - { - return Vec.AsVector4(); - } - - public void BroadCastFrom(T value) where T: unmanaged, INumber - { - Vec = Vector128.Create(value).AsSingle(); - } - - public override readonly bool Equals([NotNullWhen(true)] object obj) - { - return obj is M128 other && this == other; - } - - public override readonly int GetHashCode() - { - return Vec.GetHashCode(); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public ref T Member(int index) where T: unmanaged, INumber - { - return ref Unsafe.Add(ref AsRef(), index); - } - - public override string ToString() - { - return string.Empty; - } - - public string ToString(int sample) - { - string str = string.Empty; - for (int i = 15; i >= 0; i--) { - str += $"{Convert.ToString(Buffer[i], sample)} "; - } - return str; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator !=(M128 left, M128 right) - { - return left.Vec != right.Vec; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator ==(M128 left, M128 right) - { - return left.Vec == right.Vec; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="M128" +// 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 System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; + +using System.Text; + +namespace StgSharp.Mathematics +{ + [StructLayout(LayoutKind.Explicit, Pack = 16)] + public unsafe struct M128 : IRegisterPresentation + { + + [FieldOffset(0)] internal fixed byte Buffer[16]; + [FieldOffset(0)] internal Vector128 Vec; + + internal M128(Vector4 v) + { + Unsafe.SkipInit(out this); + Unsafe.SkipInit(out Vec); + Vec = v.AsVector128(); + } + + internal M128(Vector128 v) + { + Unsafe.SkipInit(out this); + Vec = v; + } + + public ref T AsRef() where T: unmanaged, INumber + { + return ref Unsafe.As(ref Buffer[0]); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly Vector4 AsVector4() + { + return Vec.AsVector4(); + } + + public void BroadCastFrom(T value) where T: unmanaged, INumber + { + Vec = Vector128.Create(value).AsSingle(); + } + + public override readonly bool Equals([NotNullWhen(true)] object obj) + { + return obj is M128 other && this == other; + } + + public override readonly int GetHashCode() + { + return Vec.GetHashCode(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ref T Member(int index) where T: unmanaged, INumber + { + return ref Unsafe.Add(ref AsRef(), index); + } + + public override string ToString() + { + return string.Empty; + } + + public string ToString(int sample) + { + string str = string.Empty; + for (int i = 15; i >= 0; i--) { + str += $"{Convert.ToString(Buffer[i], sample)} "; + } + return str; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(M128 left, M128 right) + { + return left.Vec != right.Vec; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(M128 left, M128 right) + { + return left.Vec == right.Vec; + } + + } +} diff --git a/StgSharp.Common/HighPerformance/RegisterAbstraction/M256.cs b/StgSharp.Common/HighPerformance/RegisterAbstraction/M256.cs index d016e937..66bd328b 100644 --- a/StgSharp.Common/HighPerformance/RegisterAbstraction/M256.cs +++ b/StgSharp.Common/HighPerformance/RegisterAbstraction/M256.cs @@ -1,65 +1,65 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="M256" -// 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.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Mathematics -{ - [StructLayout(LayoutKind.Explicit, Pack = 16)] - public unsafe struct M256 : IRegisterPresentation - { - - [FieldOffset(0)] internal fixed byte Buffer[32]; - [FieldOffset(0)] internal Vector256 Vec; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public ref T AsRef() where T: unmanaged, INumber - { - return ref Unsafe.As(ref Buffer[0]); - } - - public void BroadCastFrom(T value) where T: unmanaged, INumber - { - Vec = Vector256.Create(value).AsSingle(); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public ref T Member(int index) where T: unmanaged, INumber - { - return ref Unsafe.Add(ref AsRef(), index); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="M256" +// 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.Numerics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Mathematics +{ + [StructLayout(LayoutKind.Explicit, Pack = 16)] + public unsafe struct M256 : IRegisterPresentation + { + + [FieldOffset(0)] internal fixed byte Buffer[32]; + [FieldOffset(0)] internal Vector256 Vec; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ref T AsRef() where T: unmanaged, INumber + { + return ref Unsafe.As(ref Buffer[0]); + } + + public void BroadCastFrom(T value) where T: unmanaged, INumber + { + Vec = Vector256.Create(value).AsSingle(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ref T Member(int index) where T: unmanaged, INumber + { + return ref Unsafe.Add(ref AsRef(), index); + } + + } +} diff --git a/StgSharp.Common/HighPerformance/RegisterAbstraction/M512.cs b/StgSharp.Common/HighPerformance/RegisterAbstraction/M512.cs index a4cccd23..3f445442 100644 --- a/StgSharp.Common/HighPerformance/RegisterAbstraction/M512.cs +++ b/StgSharp.Common/HighPerformance/RegisterAbstraction/M512.cs @@ -1,63 +1,63 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="M512" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Mathematics -{ - [StructLayout(LayoutKind.Explicit, Size = 64, Pack = 64)] - public unsafe struct M512 : IRegisterPresentation - { - - [FieldOffset(0)] private fixed byte _buffer[64]; - [FieldOffset(0)] private Vector512 Vec; - - public ref T AsRef() where T: unmanaged, INumber - { - return ref Unsafe.As(ref _buffer[0]); - } - - public void BroadCastFrom(T value) where T: unmanaged, INumber - { - Vec = Vector512.Create(value).AsSingle(); - } - - public ref T Member(int index) where T: unmanaged, INumber - { - return ref Unsafe.As(ref _buffer[0]); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="M512" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Mathematics +{ + [StructLayout(LayoutKind.Explicit, Size = 64, Pack = 64)] + public unsafe struct M512 : IRegisterPresentation + { + + [FieldOffset(0)] private fixed byte _buffer[64]; + [FieldOffset(0)] private Vector512 Vec; + + public ref T AsRef() where T: unmanaged, INumber + { + return ref Unsafe.As(ref _buffer[0]); + } + + public void BroadCastFrom(T value) where T: unmanaged, INumber + { + Vec = Vector512.Create(value).AsSingle(); + } + + public ref T Member(int index) where T: unmanaged, INumber + { + return ref Unsafe.As(ref _buffer[0]); + } + + } +} diff --git a/StgSharp.Common/HighPerformance/RegisterAbstraction/M64.cs b/StgSharp.Common/HighPerformance/RegisterAbstraction/M64.cs index 7c2d1de8..e33db646 100644 --- a/StgSharp.Common/HighPerformance/RegisterAbstraction/M64.cs +++ b/StgSharp.Common/HighPerformance/RegisterAbstraction/M64.cs @@ -1,100 +1,100 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="M64" -// 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 System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace StgSharp.Mathematics -{ - [StructLayout(LayoutKind.Explicit, Pack = 8)] - public unsafe struct M64 : IRegisterPresentation - { - - [FieldOffset(0)] private fixed byte buffer[8]; - [FieldOffset(0)] private ulong value; - [FieldOffset(0)] private Vector64 vec; - - public M64() - { - Unsafe.SkipInit(out this); - Unsafe.SkipInit(out vec); - Unsafe.SkipInit(out value); - } - - public ref T AsRef() where T: unmanaged,INumber - { - return ref Unsafe.As(ref buffer[0]); - } - - public void BroadCastFrom(T value) where T: unmanaged, INumber - { - vec = Vector64.Create(value).AsSingle(); - } - - public override bool Equals(object obj) - { - return obj is M64 m64 && this == m64; - } - - public override readonly int GetHashCode() - { - return value.GetHashCode(); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public ref T Member(int index) where T: unmanaged, INumber - { - return ref Unsafe.As(ref buffer[index * sizeof(T)]); - } - - public static bool operator !=(M64 left, M64 right) - { - return !(left == right); - } - - public static M64 operator <<(M64 value, int shift) - { - M64 result = new M64(); - result.value = value.value << shift; - return result; - } - - public static bool operator ==(M64 left, M64 right) - { - return left.value == right.value; - } - public static M64 operator >>(M64 value, int shift) - { - M64 result = new M64(); - result.value = value.value << shift; - return result; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="M64" +// 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 System.Numerics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; + +namespace StgSharp.Mathematics +{ + [StructLayout(LayoutKind.Explicit, Pack = 8)] + public unsafe struct M64 : IRegisterPresentation + { + + [FieldOffset(0)] private fixed byte buffer[8]; + [FieldOffset(0)] private ulong value; + [FieldOffset(0)] private Vector64 vec; + + public M64() + { + Unsafe.SkipInit(out this); + Unsafe.SkipInit(out vec); + Unsafe.SkipInit(out value); + } + + public ref T AsRef() where T: unmanaged,INumber + { + return ref Unsafe.As(ref buffer[0]); + } + + public void BroadCastFrom(T value) where T: unmanaged, INumber + { + vec = Vector64.Create(value).AsSingle(); + } + + public override bool Equals(object obj) + { + return obj is M64 m64 && this == m64; + } + + public override readonly int GetHashCode() + { + return value.GetHashCode(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ref T Member(int index) where T: unmanaged, INumber + { + return ref Unsafe.As(ref buffer[index * sizeof(T)]); + } + + public static bool operator !=(M64 left, M64 right) + { + return !(left == right); + } + + public static M64 operator <<(M64 value, int shift) + { + M64 result = new M64(); + result.value = value.value << shift; + return result; + } + + public static bool operator ==(M64 left, M64 right) + { + return left.value == right.value; + } + public static M64 operator >>(M64 value, int shift) + { + M64 result = new M64(); + result.value = value.value << shift; + return result; + } + + } +} diff --git a/StgSharp.Common/Internal/DefaultLog.cs b/StgSharp.Common/Internal/DefaultLog.cs index 202de945..4241c8c1 100644 --- a/StgSharp.Common/Internal/DefaultLog.cs +++ b/StgSharp.Common/Internal/DefaultLog.cs @@ -1,133 +1,133 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="DefaultLog" -// 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.IO; -using System.Runtime.InteropServices; -using System.Threading; - -namespace StgSharp.Internal -{ - internal static unsafe partial class DefaultLog - { - - private const long MaxLogFileSize = 10 * 1024 * 1024; // 10 MB - - private static LogType _currentLogLevel = LogType.Info; - - internal static readonly GCHandle ssc_logHandle = - GCHandle.Alloc(new byte[512], GCHandleType.Pinned); - - internal static SemaphoreSlim logSyncSemaphore = new(1, 1); - - internal static void InternalAppendLog( - string log - ) - { - if (!File.Exists(Native.LogPath)) - { - FileStream stream = File.Create(Native.LogPath); - stream.Close(); - } - - using (StreamWriter logStream = File.AppendText(Native.LogPath)) { - logStream.WriteLine(log); - } - } - - internal static void InternalWriteLog( - string logLine, - LogType logType - ) - { - if (logType < _currentLogLevel) { - return; - } - - logSyncSemaphore.Wait(); - try - { - RotateLogFile(); - - if (!File.Exists(Native.LogPath)) - { - FileStream stream = File.Create(Native.LogPath); - stream.Close(); - } - - using (StreamWriter logStream = File.AppendText(Native.LogPath)) { - logStream.WriteLine($"[{DateTime.Now:yyyy-MM-dd HH:mm:ss.fff}] [{logType}] {logLine}"); - } - } - finally - { - _ = logSyncSemaphore.Release(); - } - } - - internal static void InternalWriteLog( - string beforeTime, - string logLine, - LogType logType - ) - { - logSyncSemaphore.Wait(); - if (!File.Exists(Native.LogPath)) - { - FileStream stream = File.Create(Native.LogPath); - stream.Close(); - } - - using (StreamWriter logStream = File.AppendText(Native.LogPath)) - { - logStream.WriteLine(beforeTime); - logStream.WriteLine($"[{DateTime.Now:yyyy-MM-dd HH:mm:ss.fff}] [{logType}] {logLine}"); - } - _ = logSyncSemaphore.Release(1); - } - - internal static void SetLogLevel( - LogType logLevel - ) - { - _currentLogLevel = logLevel; - } - - private static void RotateLogFile() - { - if (File.Exists(Native.LogPath) && new FileInfo(Native.LogPath).Length > MaxLogFileSize) - { - string backupFile = Native.LogPath + ".backup"; - if (File.Exists(backupFile)) { - File.Delete(backupFile); - } - File.Move(Native.LogPath, backupFile); - } - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="DefaultLog" +// 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.IO; +using System.Runtime.InteropServices; +using System.Threading; + +namespace StgSharp.Internal +{ + internal static unsafe partial class DefaultLog + { + + private const long MaxLogFileSize = 10 * 1024 * 1024; // 10 MB + + private static LogType _currentLogLevel = LogType.Info; + + internal static readonly GCHandle ssc_logHandle = + GCHandle.Alloc(new byte[512], GCHandleType.Pinned); + + internal static SemaphoreSlim logSyncSemaphore = new(1, 1); + + internal static void InternalAppendLog( + string log + ) + { + if (!File.Exists(Native.LogPath)) + { + FileStream stream = File.Create(Native.LogPath); + stream.Close(); + } + + using (StreamWriter logStream = File.AppendText(Native.LogPath)) { + logStream.WriteLine(log); + } + } + + internal static void InternalWriteLog( + string logLine, + LogType logType + ) + { + if (logType < _currentLogLevel) { + return; + } + + logSyncSemaphore.Wait(); + try + { + RotateLogFile(); + + if (!File.Exists(Native.LogPath)) + { + FileStream stream = File.Create(Native.LogPath); + stream.Close(); + } + + using (StreamWriter logStream = File.AppendText(Native.LogPath)) { + logStream.WriteLine($"[{DateTime.Now:yyyy-MM-dd HH:mm:ss.fff}] [{logType}] {logLine}"); + } + } + finally + { + _ = logSyncSemaphore.Release(); + } + } + + internal static void InternalWriteLog( + string beforeTime, + string logLine, + LogType logType + ) + { + logSyncSemaphore.Wait(); + if (!File.Exists(Native.LogPath)) + { + FileStream stream = File.Create(Native.LogPath); + stream.Close(); + } + + using (StreamWriter logStream = File.AppendText(Native.LogPath)) + { + logStream.WriteLine(beforeTime); + logStream.WriteLine($"[{DateTime.Now:yyyy-MM-dd HH:mm:ss.fff}] [{logType}] {logLine}"); + } + _ = logSyncSemaphore.Release(1); + } + + internal static void SetLogLevel( + LogType logLevel + ) + { + _currentLogLevel = logLevel; + } + + private static void RotateLogFile() + { + if (File.Exists(Native.LogPath) && new FileInfo(Native.LogPath).Length > MaxLogFileSize) + { + string backupFile = Native.LogPath + ".backup"; + if (File.Exists(backupFile)) { + File.Delete(backupFile); + } + File.Move(Native.LogPath, backupFile); + } + } + + } +} diff --git a/StgSharp.Common/Internal/Native.cs b/StgSharp.Common/Internal/Native.cs index 480a6904..2e1cb09d 100644 --- a/StgSharp.Common/Internal/Native.cs +++ b/StgSharp.Common/Internal/Native.cs @@ -1,48 +1,48 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="Native" -// 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 -{ - internal static unsafe partial class Native - { - - internal const string LibName = - "StgSharp.Native"; - - internal const string LogPath = - "SS_error.log"; - - internal static IntPtr _libPtr = IntPtr.Zero; - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="Native" +// 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 +{ + internal static unsafe partial class Native + { + + internal const string LibName = + "StgSharp.Native"; + + internal const string LogPath = + "SS_error.log"; + + internal static IntPtr _libPtr = IntPtr.Zero; + + } +} diff --git a/StgSharp.Common/Internal/public.cs b/StgSharp.Common/Internal/public.cs index b00ccdef..cc575130 100644 --- a/StgSharp.Common/Internal/public.cs +++ b/StgSharp.Common/Internal/public.cs @@ -1,46 +1,46 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="public" -// 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 enum LogType - { - - Error, - Warning, - Info, - InfoError, - InfoWarning, - - } +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="public" +// 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 enum LogType + { + + Error, + Warning, + Info, + InfoError, + InfoWarning, + + } } \ No newline at end of file diff --git a/StgSharp.Common/PipeLine/CrossFramePipelineNode.cs b/StgSharp.Common/PipeLine/CrossFramePipelineNode.cs index 31530d57..5863abb0 100644 --- a/StgSharp.Common/PipeLine/CrossFramePipelineNode.cs +++ b/StgSharp.Common/PipeLine/CrossFramePipelineNode.cs @@ -1,91 +1,91 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="CrossFramePipelineNode" -// 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.PipeLine; - -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - -namespace StgSharp.PipeLine -{ - public class CrossFrameOperation : IConvertableToPipelineNode - { - - private static string[] _inputName = [ "TaskIn" ]; - private static string[] _outputName = [ "TaskOut" ]; - private Action _mainExecution; - private int currentCount; - private readonly int cycleCount; - - public CrossFrameOperation(Action startup, int cycleCount) - { - MainExecution = startup; - this.cycleCount = (cycleCount > 1) ? - cycleCount : - throw new ArgumentException( - $"{$"The {typeof(CrossFrameOperation).Name} crosses only one cycle, "}{$"please use a {typeof(PipelineNode).Name} instead."}"); - this.cycleCount = cycleCount; - currentCount = cycleCount; - } - - public Action MainExecution - { - get => _mainExecution; - private protected set => _mainExecution = value; - } - - public IEnumerable InputPortName => _inputName; - - public IEnumerable OutputPortName => _outputName; - - public PipelineNodeOperation Operation - { - get => NodeMain; - } - - public void NodeMain( - in Dictionary input, - in Dictionary output) - { - if (currentCount < cycleCount) - { - Interlocked.Increment(ref currentCount); - } else - { - Interlocked.Exchange(ref currentCount, 0); - Task.Run(MainExecution); - } - - // Console.WriteLine(currentCount); - PipelineNodeOutPort.SkipAll(output); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="CrossFramePipelineNode" +// 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.PipeLine; + +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace StgSharp.PipeLine +{ + public class CrossFrameOperation : IConvertableToPipelineNode + { + + private static string[] _inputName = [ "TaskIn" ]; + private static string[] _outputName = [ "TaskOut" ]; + private Action _mainExecution; + private int currentCount; + private readonly int cycleCount; + + public CrossFrameOperation(Action startup, int cycleCount) + { + MainExecution = startup; + this.cycleCount = (cycleCount > 1) ? + cycleCount : + throw new ArgumentException( + $"{$"The {typeof(CrossFrameOperation).Name} crosses only one cycle, "}{$"please use a {typeof(PipelineNode).Name} instead."}"); + this.cycleCount = cycleCount; + currentCount = cycleCount; + } + + public Action MainExecution + { + get => _mainExecution; + private protected set => _mainExecution = value; + } + + public IEnumerable InputPortName => _inputName; + + public IEnumerable OutputPortName => _outputName; + + public PipelineNodeOperation Operation + { + get => NodeMain; + } + + public void NodeMain( + in Dictionary input, + in Dictionary output) + { + if (currentCount < cycleCount) + { + Interlocked.Increment(ref currentCount); + } else + { + Interlocked.Exchange(ref currentCount, 0); + Task.Run(MainExecution); + } + + // Console.WriteLine(currentCount); + PipelineNodeOutPort.SkipAll(output); + } + + } +} diff --git a/StgSharp.Common/PipeLine/IConvertableToPipelineNode.cs b/StgSharp.Common/PipeLine/IConvertableToPipelineNode.cs index e9638e23..c220b7c5 100644 --- a/StgSharp.Common/PipeLine/IConvertableToPipelineNode.cs +++ b/StgSharp.Common/PipeLine/IConvertableToPipelineNode.cs @@ -1,82 +1,82 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="IConvertableToPipelineNode" -// 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.Runtime.CompilerServices; -using System.Text; - -namespace StgSharp.PipeLine -{ - public delegate void PipelineNodeOperation( - in Dictionary input, - in Dictionary output); - - public interface IConvertableToPipelineNode - { - - public IEnumerable InputPortName { get; } - - public IEnumerable OutputPortName { get; } - - PipelineNodeOperation Operation { get; } - - void NodeMain( - in Dictionary input, - in Dictionary output); - - } - - internal class DefaultConvertableToBlueprintNode : IConvertableToPipelineNode - { - - private string[] _input; - private string[] _output; - private PipelineNodeOperation _execution; - - public DefaultConvertableToBlueprintNode(PipelineNodeOperation execution, string[] input, string[] output) - { - _input = input; - _output = output; - _execution = execution; - } - - public IEnumerable InputPortName => _input; - - public IEnumerable OutputPortName => _output; - - public PipelineNodeOperation Operation => _execution; - - public void NodeMain( - in Dictionary input, - in Dictionary output) - { - _execution.Invoke(input, output); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="IConvertableToPipelineNode" +// 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.Runtime.CompilerServices; +using System.Text; + +namespace StgSharp.PipeLine +{ + public delegate void PipelineNodeOperation( + in Dictionary input, + in Dictionary output); + + public interface IConvertableToPipelineNode + { + + public IEnumerable InputPortName { get; } + + public IEnumerable OutputPortName { get; } + + PipelineNodeOperation Operation { get; } + + void NodeMain( + in Dictionary input, + in Dictionary output); + + } + + internal class DefaultConvertableToBlueprintNode : IConvertableToPipelineNode + { + + private string[] _input; + private string[] _output; + private PipelineNodeOperation _execution; + + public DefaultConvertableToBlueprintNode(PipelineNodeOperation execution, string[] input, string[] output) + { + _input = input; + _output = output; + _execution = execution; + } + + public IEnumerable InputPortName => _input; + + public IEnumerable OutputPortName => _output; + + public PipelineNodeOperation Operation => _execution; + + public void NodeMain( + in Dictionary input, + in Dictionary output) + { + _execution.Invoke(input, output); + } + + } +} diff --git a/StgSharp.Common/PipeLine/PipeLineRunner.cs b/StgSharp.Common/PipeLine/PipeLineRunner.cs index b2dfc4b6..5dfb7ae1 100644 --- a/StgSharp.Common/PipeLine/PipeLineRunner.cs +++ b/StgSharp.Common/PipeLine/PipeLineRunner.cs @@ -1,242 +1,242 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="PipeLineRunner" -// 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.Threading; - -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Data; -using System.Diagnostics; -using System.Linq; -using System.Text; -using System.Threading; - -using System.Threading.Tasks; - -namespace StgSharp.PipeLine -{ - public static class PipeLineRunner - { - - private static NodeRunner[] allAvailableTask = CreateBlueprintRunnerArray(); - private static CancellationTokenSource cts = new CancellationTokenSource(); - private static ConcurrentStack pipelineInWaiting - = new ConcurrentStack(); - private static int _callingThread; - private static SemaphoreSlim pipelineLock = new SemaphoreSlim(0, 1); - - public static void Run(PipelineScheduler pipeline) - { - // Console.WriteLine(); - if (pipeline == null) - { - return; - } - if (pipeline.IsRunning) { - throw new InvalidOperationException("Attempt to run a blueprint instance twice."); - } - if (!IsValidCalling()) { - pipelineLock.Wait(); - } - if (InterruptAndRunNewPipeline(pipeline)) - { - while (InterruptAndRunNewPipeline(NodeRunner.CurrentPipeline!)) { } - } - pipelineLock.Release(); - Interlocked.Exchange(ref _callingThread, -1); - } - - public static void SetMaxTaskCount(int size) - { - if (size < 1) { - size = 1; - } - if (allAvailableTask.Length >= size) - { - for (int i = size; i < allAvailableTask.Length; i++) - { - if (allAvailableTask[i] != null) { - allAvailableTask[i].Cancel(); - } - } - } - Array.Resize(ref allAvailableTask, size); - } - - public static void Terminate() - { - cts.Cancel(); - if (NodeRunner.CurrentPipeline is null) { - return; - } - NodeRunner.CurrentPipeline.Terminate(); - foreach (NodeRunner task in allAvailableTask) { - task.Cts.Cancel(); - } - foreach (PipelineScheduler bp in pipelineInWaiting) { - bp.Terminate(); - } - pipelineInWaiting.Clear(); - } - - internal static bool InterruptAndRunNewPipeline(PipelineScheduler newPipeline) - { - ArgumentNullException.ThrowIfNull(newPipeline); - if ((newPipeline != NodeRunner.CurrentPipeline) && (NodeRunner.CurrentPipeline != null)) - { - // if a running bp exists - pipelineInWaiting.Push(NodeRunner.CurrentPipeline); - } - - // load new bp to current bp - NodeRunner.CurrentPipeline = newPipeline; - Interlocked.Exchange(ref _callingThread, Environment.CurrentManagedThreadId); - - // run beginning node to init it first. - if (!NodeRunner.CurrentPipeline.IsRunning) - { - (NodeRunner.CurrentPipeline.BeginLayer as BeginningNode)!.Run(); - } - - // refresh all tasks - /* - for( int i = 0; i < allAvailableTask.Length; i++ ) - { - NodeRunner item = allAvailableTask[ i ]; - if( ( item is null ) || item.IsCompleted ) { - allAvailableTask[ i ] = NodeRunner.Run(); - } - } - /**/ - PipelineNode node; - while (!cts.Token.IsCancellationRequested && NodeRunner.CurrentPipeline.RequestNextMainThreadNode(out node)) - { - node.Run(); - if (!NodeRunner.CurrentPipeline.IsRunning) - { - break; - } - } - - while ((NodeRunner.CurrentPipeline != null) && - NodeRunner.CurrentPipeline.IsRunning && - !cts.Token.IsCancellationRequested && - NodeRunner.CurrentPipeline!.RequestNexConcurrentNode(out node)) - { - node.Run(); - if (!NodeRunner.CurrentPipeline!.IsRunning) - { - break; - } - } - (NodeRunner.CurrentPipeline!.EndLayer as EndingNode)!.Run(); - bool isEmpty = pipelineInWaiting.TryPop(out PipelineScheduler? pipeline); - NodeRunner.CurrentPipeline = pipeline!; - return isEmpty; - } - - /// - /// Only the following occasions of calling are valid: 1. no bp is - /// running or the only bp is quitting. 2. calling from the main thread or a - /// thread the current bp is running on. - /// - internal static bool IsValidCalling() - { - if ((NodeRunner.CurrentPipeline == null) || //no bp running at all - ((pipelineInWaiting.IsEmpty) && (NodeRunner.CurrentPipeline.IsRunning == false))) - { - // a bp is quitting - // in case no bp is running - return true; - } - int? id = Task.CurrentId; - if (id is null) - { - // in case calling from main thread and current running bp - return _callingThread == Environment.CurrentManagedThreadId; - } - foreach (NodeRunner item in allAvailableTask) - { - if (item.Id == id) - { - // if calling from any bp running task - return true; - } - } - return false; - } - - private static NodeRunner[] CreateBlueprintRunnerArray() - { - int count = Environment.ProcessorCount; - return new NodeRunner[ count < 2 ? count : count - 2]; - } - - } - - internal class NodeRunner : CancellableTask - { - - private static volatile PipelineScheduler? _current; - - internal NodeRunner() - : base() - { - _startup = InternalRun; - } - - internal static PipelineScheduler? CurrentPipeline - { - get => _current; - set => _current = value; - } - - internal static NodeRunner Run() - { - NodeRunner ret = new NodeRunner - { - _startup = InternalRun - }; - ret._internalTask = Task.Run(ret.InternalAction); - return ret; - } - - private static void InternalRun(CancellationToken token) - { - PipelineNode item; - Console.WriteLine($"Global thread {Environment.CurrentManagedThreadId} starts."); - while ((CurrentPipeline != null) && - CurrentPipeline.IsRunning && - !token.IsCancellationRequested && - CurrentPipeline.RequestNexConcurrentNode(out item)) { - item.Run(); - } - } - - }//------------------------------------- End of Class ------------------------------------------ -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="PipeLineRunner" +// 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.Threading; + +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Data; +using System.Diagnostics; +using System.Linq; +using System.Text; +using System.Threading; + +using System.Threading.Tasks; + +namespace StgSharp.PipeLine +{ + public static class PipeLineRunner + { + + private static NodeRunner[] allAvailableTask = CreateBlueprintRunnerArray(); + private static CancellationTokenSource cts = new CancellationTokenSource(); + private static ConcurrentStack pipelineInWaiting + = new ConcurrentStack(); + private static int _callingThread; + private static SemaphoreSlim pipelineLock = new SemaphoreSlim(0, 1); + + public static void Run(PipelineScheduler pipeline) + { + // Console.WriteLine(); + if (pipeline == null) + { + return; + } + if (pipeline.IsRunning) { + throw new InvalidOperationException("Attempt to run a blueprint instance twice."); + } + if (!IsValidCalling()) { + pipelineLock.Wait(); + } + if (InterruptAndRunNewPipeline(pipeline)) + { + while (InterruptAndRunNewPipeline(NodeRunner.CurrentPipeline!)) { } + } + pipelineLock.Release(); + Interlocked.Exchange(ref _callingThread, -1); + } + + public static void SetMaxTaskCount(int size) + { + if (size < 1) { + size = 1; + } + if (allAvailableTask.Length >= size) + { + for (int i = size; i < allAvailableTask.Length; i++) + { + if (allAvailableTask[i] != null) { + allAvailableTask[i].Cancel(); + } + } + } + Array.Resize(ref allAvailableTask, size); + } + + public static void Terminate() + { + cts.Cancel(); + if (NodeRunner.CurrentPipeline is null) { + return; + } + NodeRunner.CurrentPipeline.Terminate(); + foreach (NodeRunner task in allAvailableTask) { + task.Cts.Cancel(); + } + foreach (PipelineScheduler bp in pipelineInWaiting) { + bp.Terminate(); + } + pipelineInWaiting.Clear(); + } + + internal static bool InterruptAndRunNewPipeline(PipelineScheduler newPipeline) + { + ArgumentNullException.ThrowIfNull(newPipeline); + if ((newPipeline != NodeRunner.CurrentPipeline) && (NodeRunner.CurrentPipeline != null)) + { + // if a running bp exists + pipelineInWaiting.Push(NodeRunner.CurrentPipeline); + } + + // load new bp to current bp + NodeRunner.CurrentPipeline = newPipeline; + Interlocked.Exchange(ref _callingThread, Environment.CurrentManagedThreadId); + + // run beginning node to init it first. + if (!NodeRunner.CurrentPipeline.IsRunning) + { + (NodeRunner.CurrentPipeline.BeginLayer as BeginningNode)!.Run(); + } + + // refresh all tasks + /* + for( int i = 0; i < allAvailableTask.Length; i++ ) + { + NodeRunner item = allAvailableTask[ i ]; + if( ( item is null ) || item.IsCompleted ) { + allAvailableTask[ i ] = NodeRunner.Run(); + } + } + /**/ + PipelineNode node; + while (!cts.Token.IsCancellationRequested && NodeRunner.CurrentPipeline.RequestNextMainThreadNode(out node)) + { + node.Run(); + if (!NodeRunner.CurrentPipeline.IsRunning) + { + break; + } + } + + while ((NodeRunner.CurrentPipeline != null) && + NodeRunner.CurrentPipeline.IsRunning && + !cts.Token.IsCancellationRequested && + NodeRunner.CurrentPipeline!.RequestNexConcurrentNode(out node)) + { + node.Run(); + if (!NodeRunner.CurrentPipeline!.IsRunning) + { + break; + } + } + (NodeRunner.CurrentPipeline!.EndLayer as EndingNode)!.Run(); + bool isEmpty = pipelineInWaiting.TryPop(out PipelineScheduler? pipeline); + NodeRunner.CurrentPipeline = pipeline!; + return isEmpty; + } + + /// + /// Only the following occasions of calling are valid: 1. no bp is + /// running or the only bp is quitting. 2. calling from the main thread or a + /// thread the current bp is running on. + /// + internal static bool IsValidCalling() + { + if ((NodeRunner.CurrentPipeline == null) || //no bp running at all + ((pipelineInWaiting.IsEmpty) && (NodeRunner.CurrentPipeline.IsRunning == false))) + { + // a bp is quitting + // in case no bp is running + return true; + } + int? id = Task.CurrentId; + if (id is null) + { + // in case calling from main thread and current running bp + return _callingThread == Environment.CurrentManagedThreadId; + } + foreach (NodeRunner item in allAvailableTask) + { + if (item.Id == id) + { + // if calling from any bp running task + return true; + } + } + return false; + } + + private static NodeRunner[] CreateBlueprintRunnerArray() + { + int count = Environment.ProcessorCount; + return new NodeRunner[ count < 2 ? count : count - 2]; + } + + } + + internal class NodeRunner : CancellableTask + { + + private static volatile PipelineScheduler? _current; + + internal NodeRunner() + : base() + { + _startup = InternalRun; + } + + internal static PipelineScheduler? CurrentPipeline + { + get => _current; + set => _current = value; + } + + internal static NodeRunner Run() + { + NodeRunner ret = new NodeRunner + { + _startup = InternalRun + }; + ret._internalTask = Task.Run(ret.InternalAction); + return ret; + } + + private static void InternalRun(CancellationToken token) + { + PipelineNode item; + Console.WriteLine($"Global thread {Environment.CurrentManagedThreadId} starts."); + while ((CurrentPipeline != null) && + CurrentPipeline.IsRunning && + !token.IsCancellationRequested && + CurrentPipeline.RequestNexConcurrentNode(out item)) { + item.Run(); + } + } + + }//------------------------------------- End of Class ------------------------------------------ +} diff --git a/StgSharp.Common/PipeLine/PipelineMarshal.cs b/StgSharp.Common/PipeLine/PipelineMarshal.cs index 4a682890..a47cff83 100644 --- a/StgSharp.Common/PipeLine/PipelineMarshal.cs +++ b/StgSharp.Common/PipeLine/PipelineMarshal.cs @@ -1,114 +1,114 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="PipelineMarshal" -// 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.Net.Http; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.PipeLine -{ - public static class PipelineMarshal - { - - public static IEnumerable GetNodeSortedEnumeration(PipelineScheduler scheduler) - { - ArgumentNullException.ThrowIfNull(scheduler); - return new PipelineNodeEnumerator(scheduler) - { - _count = scheduler._allNode.Count, - }; - } - - private class PipelineNodeEnumerator : ICollection - { - - private readonly List> _mt, _c; - - public int _count; - - public PipelineNodeEnumerator(PipelineScheduler scheduler) - { - if (!scheduler.TryGetAllNode(out _mt, out _c)) { - throw new InvalidOperationException("Binded scheduler is not sorted."); - } - } - - public bool IsReadOnly => true; - - public int Count => _count; - - public IEnumerator GetEnumerator() - { - for (int i = 1; i < _mt.Count; i++) - { - foreach (PipelineNode node in _mt[i]) { - yield return node; - } - foreach (PipelineNode node in _c[i]) { - yield return node; - } - } - } - - void ICollection.Add(PipelineNode item) - { - throw new NotSupportedException(); - } - - void ICollection.Clear() - { - throw new NotSupportedException(); - } - - bool ICollection.Contains(PipelineNode item) - { - throw new NotSupportedException(); - } - - void ICollection.CopyTo(PipelineNode[] array, int arrayIndex) - { - throw new NotSupportedException(); - } - - bool ICollection.Remove(PipelineNode item) - { - throw new NotSupportedException(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="PipelineMarshal" +// 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.Net.Http; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.PipeLine +{ + public static class PipelineMarshal + { + + public static IEnumerable GetNodeSortedEnumeration(PipelineScheduler scheduler) + { + ArgumentNullException.ThrowIfNull(scheduler); + return new PipelineNodeEnumerator(scheduler) + { + _count = scheduler._allNode.Count, + }; + } + + private class PipelineNodeEnumerator : ICollection + { + + private readonly List> _mt, _c; + + public int _count; + + public PipelineNodeEnumerator(PipelineScheduler scheduler) + { + if (!scheduler.TryGetAllNode(out _mt, out _c)) { + throw new InvalidOperationException("Binded scheduler is not sorted."); + } + } + + public bool IsReadOnly => true; + + public int Count => _count; + + public IEnumerator GetEnumerator() + { + for (int i = 1; i < _mt.Count; i++) + { + foreach (PipelineNode node in _mt[i]) { + yield return node; + } + foreach (PipelineNode node in _c[i]) { + yield return node; + } + } + } + + void ICollection.Add(PipelineNode item) + { + throw new NotSupportedException(); + } + + void ICollection.Clear() + { + throw new NotSupportedException(); + } + + bool ICollection.Contains(PipelineNode item) + { + throw new NotSupportedException(); + } + + void ICollection.CopyTo(PipelineNode[] array, int arrayIndex) + { + throw new NotSupportedException(); + } + + bool ICollection.Remove(PipelineNode item) + { + throw new NotSupportedException(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + } + + } +} diff --git a/StgSharp.Common/PipeLine/PipelineNode.cs b/StgSharp.Common/PipeLine/PipelineNode.cs index ca3db8d3..30707116 100644 --- a/StgSharp.Common/PipeLine/PipelineNode.cs +++ b/StgSharp.Common/PipeLine/PipelineNode.cs @@ -1,266 +1,266 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="PipelineNode" -// 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.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.Serialization; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - -namespace StgSharp.PipeLine -{ - /// - /// - /// - /// - /// Reset pipeline has risk, this operation is a direct operation to port in current node, the - /// port on the other node cannot get the change. - /// -#pragma warning disable CA1036 - public class PipelineNode - #pragma warning restore CA1036 - { - - private static readonly Dictionary _emptyLayer = []; - private static PipelineNode _emptyNode = new PipelineNode( - PipelineNodeLabel.Empty, null!, false); - private IConvertableToPipelineNode _mainOperation; - private PipelineNodeLabel _label; - private protected bool _nativeRequested; - private protected Dictionary _input; - private protected Dictionary _output; - private protected int _level, _count; - - internal PipelineNode(PipelineNodeLabel label, IConvertableToPipelineNode node, bool isNative) - { - _label = label; - _nativeRequested = isNative; - _mainOperation = node; - InputPorts = new(); - OutputPorts = new(); - foreach (string port in node.InputPortName) { - InputPorts.Add(port, new PipelineNodeInPort(this, port)); - } - foreach (string port in node.OutputPortName) { - OutputPorts.Add(port, new PipelineNodeOutPort(this, port)); - } - } - - #pragma warning disable CS8618 - internal PipelineNode( - PipelineNodeOperation operation, - PipelineNodeLabel name, - bool isNative, - string[] inputNames, - string[] outputNames) - #pragma warning restore CS8618 - { - if ((inputNames == null) || (inputNames.Length == 0)) { - throw new ArgumentNullException(nameof(inputNames)); - } - if ((outputNames == null) || (outputNames.Length == 0)) { - throw new ArgumentNullException(nameof(outputNames)); - } - _label = name; - _nativeRequested = isNative; - if (operation == null) { - operation = DefaultOperation; - } - _mainOperation = new DefaultConvertableToBlueprintNode( - operation, inputNames, outputNames); - InputPorts = new Dictionary(); - OutputPorts = new Dictionary(); - foreach (string port in inputNames) { - InputPorts.Add(port, new PipelineNodeInPort(this, port)); - } - foreach (string port in outputNames) { - OutputPorts.Add(port, new PipelineNodeOutPort(this, port)); - } - } - - public bool IsNative - { - get => _nativeRequested; - internal set => _nativeRequested = value; - } - - public static Dictionary EmptyPortLayer => _emptyLayer; - - public IConvertableToPipelineNode NodeOperation => _mainOperation; - - public int Level - { - get => _level; - private set => _level = value; - } - - public static PipelineNode Empty => _emptyNode; - - public PipelineNodeLabel Label => _label; - - internal Dictionary InputPorts - { - get => _input; - private set => _input = value; - } - - internal Dictionary OutputPorts - { - get => _output; - private set => _output = value; - } - - internal HashSet Previous { get; } = []; - - internal HashSet Next { get; } = []; - - internal IConvertableToPipelineNode Value => _mainOperation; - - internal int RemainingIncreaseCount => Previous.Count - _count; - - public static void Connect(PipelineNode front, string frontNodePort, string backNodePort, PipelineNode back) - { - ArgumentNullException.ThrowIfNull(front); - ArgumentNullException.ThrowIfNull(back); - if (!front.OutputPorts - .TryGetValue(frontNodePort, - out PipelineNodeOutPort? frontPort)) { - throw new ArgumentOutOfRangeException($"Cannot find port named {frontNodePort}"); - } - if (!back.InputPorts.TryGetValue(backNodePort, out PipelineNodeInPort? backPort)) { - throw new ArgumentOutOfRangeException($"Cannot find port named {backNodePort}"); - } - backPort.Connect(frontPort); - frontPort.Connect(backPort); - } - - public IEnumerator GetFormerNodes() - { - foreach (PipelineNodeInPort port in InputPorts.Values) - { - IEnumerator enumerator = port.GetFormerNodes(); - while (enumerator.MoveNext()) { - yield return enumerator.Current; - } - } - } - - public virtual void Run() - { - try - { - // Console.WriteLine(_label); - PipelineNodeInPort.WaitAll(InputPorts); - if (_mainOperation != null) { - _mainOperation.NodeMain(in _input, in _output); - } - } - catch (Exception) - { - throw; - } - } - - internal bool TryIncreaseLevelTo(int level) - { - _count++; - if (_count > Previous.Count) { - return false; - } - Level = int.Max(level, this.Level); - return true; - } - - protected static void DefaultOperation( - in Dictionary input, - in Dictionary output) - { - PipelineNodeOutPort.SkipAll(output); - } - - #region port operation - - public PipelineNodeInPort GetInputPort(string lable) - { - if (!InputPorts.TryGetValue(lable, out PipelineNodeInPort? ret)) { - throw new ArgumentOutOfRangeException( - $"Cannot find the interface named {lable} in node {Label}."); - } - return ret; - } - - public PipelineNodeOutPort GetOutputPort(string lable) - { - if (!OutputPorts.TryGetValue(lable, out PipelineNodeOutPort? ret)) { - throw new ArgumentOutOfRangeException( - $"Cannot find the interface named {lable} in node {Label}."); - } - return ret; - } - - public PipelineNodeInPort? DefineCertainInputPort(string label) - { - if (InputPorts.ContainsKey(label)) { - return null; - } - PipelineNodeInPort port = new(this, label); - InputPorts[label] = port; - return port; - } - - public PipelineNodeOutPort? DefineCertainOutputPort(string label) - { - if (OutputPorts.ContainsKey(label)) { - return null; - } - PipelineNodeOutPort port = new(this, label); - OutputPorts[label] = port; - return port; - } - - #endregion - }//--------------------------------- end of class ----------------------------------- - - public class PipelineNodeRunException : Exception - { - - public PipelineNodeRunException() { } - - public PipelineNodeRunException(Exception ex) : base(string.Empty, ex) { } - - public PipelineNodeRunException(string message) : base(message) { } - - public PipelineNodeRunException(string message, Exception innerException) : base(message, innerException) { } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="PipelineNode" +// 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.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.Serialization; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace StgSharp.PipeLine +{ + /// + /// + /// + /// + /// Reset pipeline has risk, this operation is a direct operation to port in current node, the + /// port on the other node cannot get the change. + /// +#pragma warning disable CA1036 + public class PipelineNode + #pragma warning restore CA1036 + { + + private static readonly Dictionary _emptyLayer = []; + private static PipelineNode _emptyNode = new PipelineNode( + PipelineNodeLabel.Empty, null!, false); + private IConvertableToPipelineNode _mainOperation; + private PipelineNodeLabel _label; + private protected bool _nativeRequested; + private protected Dictionary _input; + private protected Dictionary _output; + private protected int _level, _count; + + internal PipelineNode(PipelineNodeLabel label, IConvertableToPipelineNode node, bool isNative) + { + _label = label; + _nativeRequested = isNative; + _mainOperation = node; + InputPorts = new(); + OutputPorts = new(); + foreach (string port in node.InputPortName) { + InputPorts.Add(port, new PipelineNodeInPort(this, port)); + } + foreach (string port in node.OutputPortName) { + OutputPorts.Add(port, new PipelineNodeOutPort(this, port)); + } + } + + #pragma warning disable CS8618 + internal PipelineNode( + PipelineNodeOperation operation, + PipelineNodeLabel name, + bool isNative, + string[] inputNames, + string[] outputNames) + #pragma warning restore CS8618 + { + if ((inputNames == null) || (inputNames.Length == 0)) { + throw new ArgumentNullException(nameof(inputNames)); + } + if ((outputNames == null) || (outputNames.Length == 0)) { + throw new ArgumentNullException(nameof(outputNames)); + } + _label = name; + _nativeRequested = isNative; + if (operation == null) { + operation = DefaultOperation; + } + _mainOperation = new DefaultConvertableToBlueprintNode( + operation, inputNames, outputNames); + InputPorts = new Dictionary(); + OutputPorts = new Dictionary(); + foreach (string port in inputNames) { + InputPorts.Add(port, new PipelineNodeInPort(this, port)); + } + foreach (string port in outputNames) { + OutputPorts.Add(port, new PipelineNodeOutPort(this, port)); + } + } + + public bool IsNative + { + get => _nativeRequested; + internal set => _nativeRequested = value; + } + + public static Dictionary EmptyPortLayer => _emptyLayer; + + public IConvertableToPipelineNode NodeOperation => _mainOperation; + + public int Level + { + get => _level; + private set => _level = value; + } + + public static PipelineNode Empty => _emptyNode; + + public PipelineNodeLabel Label => _label; + + internal Dictionary InputPorts + { + get => _input; + private set => _input = value; + } + + internal Dictionary OutputPorts + { + get => _output; + private set => _output = value; + } + + internal HashSet Previous { get; } = []; + + internal HashSet Next { get; } = []; + + internal IConvertableToPipelineNode Value => _mainOperation; + + internal int RemainingIncreaseCount => Previous.Count - _count; + + public static void Connect(PipelineNode front, string frontNodePort, string backNodePort, PipelineNode back) + { + ArgumentNullException.ThrowIfNull(front); + ArgumentNullException.ThrowIfNull(back); + if (!front.OutputPorts + .TryGetValue(frontNodePort, + out PipelineNodeOutPort? frontPort)) { + throw new ArgumentOutOfRangeException($"Cannot find port named {frontNodePort}"); + } + if (!back.InputPorts.TryGetValue(backNodePort, out PipelineNodeInPort? backPort)) { + throw new ArgumentOutOfRangeException($"Cannot find port named {backNodePort}"); + } + backPort.Connect(frontPort); + frontPort.Connect(backPort); + } + + public IEnumerator GetFormerNodes() + { + foreach (PipelineNodeInPort port in InputPorts.Values) + { + IEnumerator enumerator = port.GetFormerNodes(); + while (enumerator.MoveNext()) { + yield return enumerator.Current; + } + } + } + + public virtual void Run() + { + try + { + // Console.WriteLine(_label); + PipelineNodeInPort.WaitAll(InputPorts); + if (_mainOperation != null) { + _mainOperation.NodeMain(in _input, in _output); + } + } + catch (Exception) + { + throw; + } + } + + internal bool TryIncreaseLevelTo(int level) + { + _count++; + if (_count > Previous.Count) { + return false; + } + Level = int.Max(level, this.Level); + return true; + } + + protected static void DefaultOperation( + in Dictionary input, + in Dictionary output) + { + PipelineNodeOutPort.SkipAll(output); + } + + #region port operation + + public PipelineNodeInPort GetInputPort(string lable) + { + if (!InputPorts.TryGetValue(lable, out PipelineNodeInPort? ret)) { + throw new ArgumentOutOfRangeException( + $"Cannot find the interface named {lable} in node {Label}."); + } + return ret; + } + + public PipelineNodeOutPort GetOutputPort(string lable) + { + if (!OutputPorts.TryGetValue(lable, out PipelineNodeOutPort? ret)) { + throw new ArgumentOutOfRangeException( + $"Cannot find the interface named {lable} in node {Label}."); + } + return ret; + } + + public PipelineNodeInPort? DefineCertainInputPort(string label) + { + if (InputPorts.ContainsKey(label)) { + return null; + } + PipelineNodeInPort port = new(this, label); + InputPorts[label] = port; + return port; + } + + public PipelineNodeOutPort? DefineCertainOutputPort(string label) + { + if (OutputPorts.ContainsKey(label)) { + return null; + } + PipelineNodeOutPort port = new(this, label); + OutputPorts[label] = port; + return port; + } + + #endregion + }//--------------------------------- end of class ----------------------------------- + + public class PipelineNodeRunException : Exception + { + + public PipelineNodeRunException() { } + + public PipelineNodeRunException(Exception ex) : base(string.Empty, ex) { } + + public PipelineNodeRunException(string message) : base(message) { } + + public PipelineNodeRunException(string message, Exception innerException) : base(message, innerException) { } + + } +} diff --git a/StgSharp.Common/PipeLine/PipelineNodeLabel.cs b/StgSharp.Common/PipeLine/PipelineNodeLabel.cs index 38c13dce..4e64a4dc 100644 --- a/StgSharp.Common/PipeLine/PipelineNodeLabel.cs +++ b/StgSharp.Common/PipeLine/PipelineNodeLabel.cs @@ -1,80 +1,80 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="PipelineNodeLabel" -// 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.PipeLine -{ - public abstract record class PipelineNodeLabel - { - - public static PipelineNodeLabel Empty => PipelineNodeLabelEmpty.Only; - - public abstract int ComputeHashCode(); - - public override int GetHashCode() - { - return ComputeHashCode(); - } - - } - - public record class PipelineNodeStringLabel : PipelineNodeLabel - { - - public PipelineNodeStringLabel(string name) - { - Name = name; - } - - public string Name { get; } - - public override int ComputeHashCode() - { - return string.GetHashCode(Name); - } - - } - - internal record class PipelineNodeLabelEmpty : PipelineNodeLabel - { - - public static PipelineNodeLabelEmpty Only { get; } = new PipelineNodeLabelEmpty(); - - public override int ComputeHashCode() - { - return 0; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="PipelineNodeLabel" +// 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.PipeLine +{ + public abstract record class PipelineNodeLabel + { + + public static PipelineNodeLabel Empty => PipelineNodeLabelEmpty.Only; + + public abstract int ComputeHashCode(); + + public override int GetHashCode() + { + return ComputeHashCode(); + } + + } + + public record class PipelineNodeStringLabel : PipelineNodeLabel + { + + public PipelineNodeStringLabel(string name) + { + Name = name; + } + + public string Name { get; } + + public override int ComputeHashCode() + { + return string.GetHashCode(Name); + } + + } + + internal record class PipelineNodeLabelEmpty : PipelineNodeLabel + { + + public static PipelineNodeLabelEmpty Only { get; } = new PipelineNodeLabelEmpty(); + + public override int ComputeHashCode() + { + return 0; + } + + } +} diff --git a/StgSharp.Common/PipeLine/PipelineNodePort.cs b/StgSharp.Common/PipeLine/PipelineNodePort.cs index ad30452e..f130c012 100644 --- a/StgSharp.Common/PipeLine/PipelineNodePort.cs +++ b/StgSharp.Common/PipeLine/PipelineNodePort.cs @@ -1,187 +1,187 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="PipelineNodePort" -// 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.ExceptionServices; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - -namespace StgSharp.PipeLine -{ - public class PipelineNodeInPort - { - - private HashSet _linkerSet = new HashSet(); - - public PipelineNodeInPort(PipelineNode container, string label) - { - Container = container; - Label = label; - } - - public IEnumerable LinkedPorts => _linkerSet; - - public PipelineNode Container { get; init; } - - public SemaphoreSlim Waiter { get; init; } - - public string Label { get; init; } - - internal HashSet Linkers => _linkerSet; - - public void Connect(PipelineNodeOutPort port) - { - ArgumentNullException.ThrowIfNull(port); - if (_linkerSet.Add(port)) - { - port.Linkers.Add(this); - Container.Previous.Add(port.Container); - port.Container.Next.Add(Container); - } - } - - public IEnumerator GetFormerNodes() - { - foreach (PipelineNodeOutPort port in _linkerSet) { - yield return port.Container; - } - } - - public void Wait() - { - PipelineNodeOutPort.WaitAll(_linkerSet); - } - - public static void WaitAll(IDictionary ports) - { - if (ports is null) { - return; - } - foreach (PipelineNodeInPort port in ports.Values) { - port.Wait(); - } - } - - public static void WaitAll(IEnumerable ports) - { - if (ports is null) { - return; - } - foreach (PipelineNodeInPort port in ports) { - port.Wait(); - } - } - - } - - public class PipelineNodeOutPort - { - - private HashSet _linkerSet = new HashSet(); - private volatile int _passCount; - private SemaphoreSlim formerCompleteSemaphore; - - public PipelineNodeOutPort(PipelineNode container, string label) - { - Container = container; - Label = label; - formerCompleteSemaphore = new SemaphoreSlim(initialCount:0, maxCount:1); - } - - public PipelineNode Container { get; init; } - - public string Label { get; init; } - - internal HashSet Linkers => _linkerSet; - - private SemaphoreSlim Waiter => formerCompleteSemaphore; - - public void Connect(PipelineNodeInPort port) - { - ArgumentNullException.ThrowIfNull(port); - if (_linkerSet.Add(port)) - { - port.Linkers.Add(this); - Container.Next.Add(port.Container); - port.Container.Previous.Add(Container); - } - } - - public void Release() - { - if (_passCount == 0) - { - Waiter.Release(); - } else - { - return; - } - } - - public static void SkipAll(Dictionary ports) - { - if (ports is null) { - return; - } - foreach (PipelineNodeOutPort port in ports.Values) { - port.Release(); - } - } - - public void TransmitValue(IPipeLineConnectionPayload value) - { - foreach (PipelineNodeInPort item in _linkerSet) { } - } - - public static void WaitAll(IEnumerable ports) - { - if (ports is null) { - return; - } - foreach (PipelineNodeOutPort port in ports) { - port.Wait(); - } - } - - internal void Wait() - { - Waiter.Wait(); - if (_passCount >= _linkerSet.Count) - { - Interlocked.Exchange(ref _passCount, 0); - } else - { - Interlocked.Increment(ref _passCount); - Waiter.Release(); - } - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="PipelineNodePort" +// 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.ExceptionServices; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace StgSharp.PipeLine +{ + public class PipelineNodeInPort + { + + private HashSet _linkerSet = new HashSet(); + + public PipelineNodeInPort(PipelineNode container, string label) + { + Container = container; + Label = label; + } + + public IEnumerable LinkedPorts => _linkerSet; + + public PipelineNode Container { get; init; } + + public SemaphoreSlim Waiter { get; init; } + + public string Label { get; init; } + + internal HashSet Linkers => _linkerSet; + + public void Connect(PipelineNodeOutPort port) + { + ArgumentNullException.ThrowIfNull(port); + if (_linkerSet.Add(port)) + { + port.Linkers.Add(this); + Container.Previous.Add(port.Container); + port.Container.Next.Add(Container); + } + } + + public IEnumerator GetFormerNodes() + { + foreach (PipelineNodeOutPort port in _linkerSet) { + yield return port.Container; + } + } + + public void Wait() + { + PipelineNodeOutPort.WaitAll(_linkerSet); + } + + public static void WaitAll(IDictionary ports) + { + if (ports is null) { + return; + } + foreach (PipelineNodeInPort port in ports.Values) { + port.Wait(); + } + } + + public static void WaitAll(IEnumerable ports) + { + if (ports is null) { + return; + } + foreach (PipelineNodeInPort port in ports) { + port.Wait(); + } + } + + } + + public class PipelineNodeOutPort + { + + private HashSet _linkerSet = new HashSet(); + private volatile int _passCount; + private SemaphoreSlim formerCompleteSemaphore; + + public PipelineNodeOutPort(PipelineNode container, string label) + { + Container = container; + Label = label; + formerCompleteSemaphore = new SemaphoreSlim(initialCount:0, maxCount:1); + } + + public PipelineNode Container { get; init; } + + public string Label { get; init; } + + internal HashSet Linkers => _linkerSet; + + private SemaphoreSlim Waiter => formerCompleteSemaphore; + + public void Connect(PipelineNodeInPort port) + { + ArgumentNullException.ThrowIfNull(port); + if (_linkerSet.Add(port)) + { + port.Linkers.Add(this); + Container.Next.Add(port.Container); + port.Container.Previous.Add(Container); + } + } + + public void Release() + { + if (_passCount == 0) + { + Waiter.Release(); + } else + { + return; + } + } + + public static void SkipAll(Dictionary ports) + { + if (ports is null) { + return; + } + foreach (PipelineNodeOutPort port in ports.Values) { + port.Release(); + } + } + + public void TransmitValue(IPipeLineConnectionPayload value) + { + foreach (PipelineNodeInPort item in _linkerSet) { } + } + + public static void WaitAll(IEnumerable ports) + { + if (ports is null) { + return; + } + foreach (PipelineNodeOutPort port in ports) { + port.Wait(); + } + } + + internal void Wait() + { + Waiter.Wait(); + if (_passCount >= _linkerSet.Count) + { + Interlocked.Exchange(ref _passCount, 0); + } else + { + Interlocked.Increment(ref _passCount); + Waiter.Release(); + } + } + + } +} diff --git a/StgSharp.Common/PipeLine/PipelineScheduler.cs b/StgSharp.Common/PipeLine/PipelineScheduler.cs index c3fe201f..c6dc81b1 100644 --- a/StgSharp.Common/PipeLine/PipelineScheduler.cs +++ b/StgSharp.Common/PipeLine/PipelineScheduler.cs @@ -1,295 +1,295 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="PipelineScheduler" -// 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 System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Threading; -using System.Xml; -using System.Xml.Linq; - -namespace StgSharp.PipeLine -{ - /// - /// A sets of complex logic designed for running in multi threads environment. Warning: do not - /// run a instance in multi threads more than once. - /// - public partial class PipelineScheduler : IConvertableToPipelineNode - { - - private BeginningNode _beginning; - private bool _isAvailable = false; - private EndingNode _ending; - - private int mtLevel, cLevel,mtIndex, cIndex; - private List> _concurrentNodes, _mainThreadNodes ; - private SemaphoreSlim runningStat,_concurrentLock = new SemaphoreSlim(1, 1); - internal Dictionary _allNode; - - public PipelineScheduler() - { - _allNode = new Dictionary(); - runningStat = new SemaphoreSlim(1, 1); - _beginning = new BeginningNode(this); - _ending = new EndingNode(this); - } - /**/ - - public PipelineNode this[PipelineNodeLabel label] - { - get { return _allNode[label]; } - } - - public bool IsRunning - { - get => runningStat.CurrentCount == 0; - } - - public IEnumerable InputPortName - { - get => _beginning.InputPorts.Keys; - } - - public IEnumerable OutputPortName - { - get => _beginning.OutputPorts.Keys; - } - - public PipelineNode BeginLayer => _beginning; - - public PipelineNode EndLayer => _ending; - - public PipelineNodeOperation Operation - { - get => (this as IConvertableToPipelineNode).NodeMain; - } - - /**/ - - internal SemaphoreSlim RunningStat - { - get => runningStat; - } - - public void AddNode(PipelineNode node, bool isNative) - { - ArgumentNullException.ThrowIfNull(node); - node.IsNative = isNative; - _allNode.TryAdd(node.Label, node); - } - - public void ArrangeNodes() - { - if (_isAvailable) { - return; - } - int maxLevel = 1; - Queue completedNodes = new Queue(); - foreach (PipelineNode item in _beginning.Next) - { - item.TryIncreaseLevelTo(1); - completedNodes.Enqueue(item); - } - - // calc level of nodes O(V) - while (completedNodes.Count > 0) - { - PipelineNode u = completedNodes.Dequeue(); - foreach (PipelineNode v in u.Next) - { - if (!v.TryIncreaseLevelTo(u.Level + 1)) { - throw new InvalidOperationException("Ring in DAG detected."); - } - if (v.RemainingIncreaseCount == 0) - { - completedNodes.Enqueue(v); - maxLevel = int.Max(maxLevel, v.Level); - } - } - } - - // bucket sort of nodes, O(E) - _concurrentNodes = new List>(maxLevel + 1); - _mainThreadNodes = new List>(maxLevel + 1); - for (int i = 0; i <= maxLevel; i++) - { - _concurrentNodes.Add([]); - _mainThreadNodes.Add([]); - } - foreach (PipelineNode item in _allNode.Values) - { - if (item.IsNative) - { - _mainThreadNodes[item.Level].Add(item); - } else - { - _concurrentNodes[item.Level].Add(item); - } - } - foreach (List item in _concurrentNodes) { - item.TrimExcess(); - } - foreach (List item in _mainThreadNodes) { - item.TrimExcess(); - } - _isAvailable = true; - } - - public PipelineNode Create(PipelineNodeLabel label, [NotNull] IConvertableToPipelineNode body) - { - if (_allNode.TryGetValue(label, out PipelineNode? node)) { - throw new InvalidOperationException("Label has exist in scheduler."); - } - node = new PipelineNode(label, body, false); - _allNode.Add(label, node); - return node; - } - - public PipelineNode GetNode(PipelineNodeLabel label) - { - if (_allNode.TryGetValue(label, out PipelineNode? node)) - { - return node; - } else - { - throw new KeyNotFoundException(); - } - } - - public void LinkToInput(PipelineNodeInPort port) - { - ArgumentNullException.ThrowIfNull(port); - PipelineNodeOutPort p = _beginning.DefaultOut; - p.Connect(port); - } - - public void LinkToInput(PipelineNodeInPort port, string inputPortName) - { - ArgumentNullException.ThrowIfNull(port); - PipelineNodeOutPort p = _beginning.DefineCertainOutputPort(inputPortName); - p.Connect(port); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void SetInput(params (string label, IPipeLineConnectionPayload arg)[] parameters) - { - _beginning.SetInputData(parameters); - } - - public void Terminate() - { - _concurrentLock.Wait(); - (mtLevel, cLevel, mtIndex, cIndex) = (int.MaxValue, int.MaxValue, int.MaxValue, int.MaxValue); - _concurrentLock.Release(); - } - - public bool TryGetAllNode( - out List> mainThreadNodes, - out List> concurrentNodes) - { - if (_isAvailable) - { - mainThreadNodes = _mainThreadNodes; - concurrentNodes = _concurrentNodes; - return true; - } - mainThreadNodes = null; - concurrentNodes = null; - return false; - } - - internal bool RequestNexConcurrentNode(out PipelineNode node) - { - int index, level; - if (cLevel >= _concurrentNodes.Count) - { - node = null!; - return false; - } - _concurrentLock.Wait(); - while (cIndex >= _concurrentNodes[cLevel].Count) - { - Interlocked.Increment(ref cLevel); - Interlocked.Exchange(ref cIndex, 0); - if (cLevel >= _concurrentNodes.Count) - { - node = null!; - return false; - } - } - index = cIndex; - level = cLevel; - Interlocked.Increment(ref cIndex); - _concurrentLock.Release(); - node = _concurrentNodes[level][index]; - return true; - } - - internal bool RequestNextMainThreadNode(out PipelineNode node) - { - if (mtLevel >= _mainThreadNodes.Count) - { - node = null!; - return false; - } - while (mtIndex >= _mainThreadNodes[cLevel].Count) - { - Interlocked.Increment(ref mtLevel); - Interlocked.Exchange(ref mtIndex, 0); - if (mtLevel >= _mainThreadNodes.Count) - { - node = null!; - return false; - } - } - node = _mainThreadNodes[mtLevel][mtIndex]; - return true; - } - - internal void ResetIndex() - { - (mtLevel, cLevel, mtIndex, cIndex) = (0, 0, 0, 0); - _concurrentLock.Release(); - } - - void IConvertableToPipelineNode.NodeMain( - in Dictionary input, - in Dictionary output) - { - PipeLineRunner.Run(this); - PipelineNodeOutPort.SkipAll(output); - } - - ~PipelineScheduler() - { - runningStat.Dispose(); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="PipelineScheduler" +// 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 System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Threading; +using System.Xml; +using System.Xml.Linq; + +namespace StgSharp.PipeLine +{ + /// + /// A sets of complex logic designed for running in multi threads environment. Warning: do not + /// run a instance in multi threads more than once. + /// + public partial class PipelineScheduler : IConvertableToPipelineNode + { + + private BeginningNode _beginning; + private bool _isAvailable = false; + private EndingNode _ending; + + private int mtLevel, cLevel,mtIndex, cIndex; + private List> _concurrentNodes, _mainThreadNodes ; + private SemaphoreSlim runningStat,_concurrentLock = new SemaphoreSlim(1, 1); + internal Dictionary _allNode; + + public PipelineScheduler() + { + _allNode = new Dictionary(); + runningStat = new SemaphoreSlim(1, 1); + _beginning = new BeginningNode(this); + _ending = new EndingNode(this); + } + /**/ + + public PipelineNode this[PipelineNodeLabel label] + { + get { return _allNode[label]; } + } + + public bool IsRunning + { + get => runningStat.CurrentCount == 0; + } + + public IEnumerable InputPortName + { + get => _beginning.InputPorts.Keys; + } + + public IEnumerable OutputPortName + { + get => _beginning.OutputPorts.Keys; + } + + public PipelineNode BeginLayer => _beginning; + + public PipelineNode EndLayer => _ending; + + public PipelineNodeOperation Operation + { + get => (this as IConvertableToPipelineNode).NodeMain; + } + + /**/ + + internal SemaphoreSlim RunningStat + { + get => runningStat; + } + + public void AddNode(PipelineNode node, bool isNative) + { + ArgumentNullException.ThrowIfNull(node); + node.IsNative = isNative; + _allNode.TryAdd(node.Label, node); + } + + public void ArrangeNodes() + { + if (_isAvailable) { + return; + } + int maxLevel = 1; + Queue completedNodes = new Queue(); + foreach (PipelineNode item in _beginning.Next) + { + item.TryIncreaseLevelTo(1); + completedNodes.Enqueue(item); + } + + // calc level of nodes O(V) + while (completedNodes.Count > 0) + { + PipelineNode u = completedNodes.Dequeue(); + foreach (PipelineNode v in u.Next) + { + if (!v.TryIncreaseLevelTo(u.Level + 1)) { + throw new InvalidOperationException("Ring in DAG detected."); + } + if (v.RemainingIncreaseCount == 0) + { + completedNodes.Enqueue(v); + maxLevel = int.Max(maxLevel, v.Level); + } + } + } + + // bucket sort of nodes, O(E) + _concurrentNodes = new List>(maxLevel + 1); + _mainThreadNodes = new List>(maxLevel + 1); + for (int i = 0; i <= maxLevel; i++) + { + _concurrentNodes.Add([]); + _mainThreadNodes.Add([]); + } + foreach (PipelineNode item in _allNode.Values) + { + if (item.IsNative) + { + _mainThreadNodes[item.Level].Add(item); + } else + { + _concurrentNodes[item.Level].Add(item); + } + } + foreach (List item in _concurrentNodes) { + item.TrimExcess(); + } + foreach (List item in _mainThreadNodes) { + item.TrimExcess(); + } + _isAvailable = true; + } + + public PipelineNode Create(PipelineNodeLabel label, [NotNull] IConvertableToPipelineNode body) + { + if (_allNode.TryGetValue(label, out PipelineNode? node)) { + throw new InvalidOperationException("Label has exist in scheduler."); + } + node = new PipelineNode(label, body, false); + _allNode.Add(label, node); + return node; + } + + public PipelineNode GetNode(PipelineNodeLabel label) + { + if (_allNode.TryGetValue(label, out PipelineNode? node)) + { + return node; + } else + { + throw new KeyNotFoundException(); + } + } + + public void LinkToInput(PipelineNodeInPort port) + { + ArgumentNullException.ThrowIfNull(port); + PipelineNodeOutPort p = _beginning.DefaultOut; + p.Connect(port); + } + + public void LinkToInput(PipelineNodeInPort port, string inputPortName) + { + ArgumentNullException.ThrowIfNull(port); + PipelineNodeOutPort p = _beginning.DefineCertainOutputPort(inputPortName); + p.Connect(port); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void SetInput(params (string label, IPipeLineConnectionPayload arg)[] parameters) + { + _beginning.SetInputData(parameters); + } + + public void Terminate() + { + _concurrentLock.Wait(); + (mtLevel, cLevel, mtIndex, cIndex) = (int.MaxValue, int.MaxValue, int.MaxValue, int.MaxValue); + _concurrentLock.Release(); + } + + public bool TryGetAllNode( + out List> mainThreadNodes, + out List> concurrentNodes) + { + if (_isAvailable) + { + mainThreadNodes = _mainThreadNodes; + concurrentNodes = _concurrentNodes; + return true; + } + mainThreadNodes = null; + concurrentNodes = null; + return false; + } + + internal bool RequestNexConcurrentNode(out PipelineNode node) + { + int index, level; + if (cLevel >= _concurrentNodes.Count) + { + node = null!; + return false; + } + _concurrentLock.Wait(); + while (cIndex >= _concurrentNodes[cLevel].Count) + { + Interlocked.Increment(ref cLevel); + Interlocked.Exchange(ref cIndex, 0); + if (cLevel >= _concurrentNodes.Count) + { + node = null!; + return false; + } + } + index = cIndex; + level = cLevel; + Interlocked.Increment(ref cIndex); + _concurrentLock.Release(); + node = _concurrentNodes[level][index]; + return true; + } + + internal bool RequestNextMainThreadNode(out PipelineNode node) + { + if (mtLevel >= _mainThreadNodes.Count) + { + node = null!; + return false; + } + while (mtIndex >= _mainThreadNodes[cLevel].Count) + { + Interlocked.Increment(ref mtLevel); + Interlocked.Exchange(ref mtIndex, 0); + if (mtLevel >= _mainThreadNodes.Count) + { + node = null!; + return false; + } + } + node = _mainThreadNodes[mtLevel][mtIndex]; + return true; + } + + internal void ResetIndex() + { + (mtLevel, cLevel, mtIndex, cIndex) = (0, 0, 0, 0); + _concurrentLock.Release(); + } + + void IConvertableToPipelineNode.NodeMain( + in Dictionary input, + in Dictionary output) + { + PipeLineRunner.Run(this); + PipelineNodeOutPort.SkipAll(output); + } + + ~PipelineScheduler() + { + runningStat.Dispose(); + } + + } +} diff --git a/StgSharp.Common/PipeLine/PortArgs.cs b/StgSharp.Common/PipeLine/PortArgs.cs index 57aac815..0a799c7f 100644 --- a/StgSharp.Common/PipeLine/PortArgs.cs +++ b/StgSharp.Common/PipeLine/PortArgs.cs @@ -1,123 +1,123 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="PortArgs" -// 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.Numerics; -using System.Runtime.CompilerServices; -using System.Security.Authentication.ExtendedProtection; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - -namespace StgSharp.PipeLine -{ - public class PipelineConnector - { - - private protected IPipeLineConnectionPayload args; - private protected PipelineNodeInPort output; - private protected PipelineNodeOutPort input; - private protected SemaphoreSlim formerCompleteSemaphore; - - public PipelineConnector(PipelineNodeOutPort former, PipelineNodeInPort after) - { - this.input = former; - this.output = after; - formerCompleteSemaphore = new SemaphoreSlim(initialCount:0, maxCount:1); - } - - public IPipeLineConnectionPayload Args - { - get => args; - set => args = value; - } - - public PipelineNodeInPort Output => output; - - public PipelineNodeOutPort Input => input; - - public static void SkipAll(Dictionary ports) - { - if (ports == null) { - return; - } - foreach (KeyValuePair item in ports) - { - if (item.Value != null) { - item.Value.CompleteAndSkip(); - } - } - } - - public static void WaitAll(Dictionary ports) - { - if (ports == null) { - return; - } - foreach (KeyValuePair item in ports) - { - if (item.Value != null) { - item.Value.WaitForStart(); - } - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public virtual void WaitForStart() - { - // Console.WriteLine($"Waiting \t{input.ContextName}\t->\t{output.ContextName}"); - formerCompleteSemaphore.Wait(); - } - - ~PipelineConnector() - { - formerCompleteSemaphore.Dispose(); - } - - #region pipline op - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void CompleteAndSkip() - { - // Console.WriteLine($"Complete\t{input.Name}\t->\t{output.Name}"); - formerCompleteSemaphore.Release(); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void CompleteAndWriteData(IPipeLineConnectionPayload args) - { - this.args = args; - CompleteAndSkip(); - } - - #endregion - } - - public abstract class IPipeLineConnectionPayload { } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="PortArgs" +// 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.Numerics; +using System.Runtime.CompilerServices; +using System.Security.Authentication.ExtendedProtection; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace StgSharp.PipeLine +{ + public class PipelineConnector + { + + private protected IPipeLineConnectionPayload args; + private protected PipelineNodeInPort output; + private protected PipelineNodeOutPort input; + private protected SemaphoreSlim formerCompleteSemaphore; + + public PipelineConnector(PipelineNodeOutPort former, PipelineNodeInPort after) + { + this.input = former; + this.output = after; + formerCompleteSemaphore = new SemaphoreSlim(initialCount:0, maxCount:1); + } + + public IPipeLineConnectionPayload Args + { + get => args; + set => args = value; + } + + public PipelineNodeInPort Output => output; + + public PipelineNodeOutPort Input => input; + + public static void SkipAll(Dictionary ports) + { + if (ports == null) { + return; + } + foreach (KeyValuePair item in ports) + { + if (item.Value != null) { + item.Value.CompleteAndSkip(); + } + } + } + + public static void WaitAll(Dictionary ports) + { + if (ports == null) { + return; + } + foreach (KeyValuePair item in ports) + { + if (item.Value != null) { + item.Value.WaitForStart(); + } + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public virtual void WaitForStart() + { + // Console.WriteLine($"Waiting \t{input.ContextName}\t->\t{output.ContextName}"); + formerCompleteSemaphore.Wait(); + } + + ~PipelineConnector() + { + formerCompleteSemaphore.Dispose(); + } + + #region pipline op + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void CompleteAndSkip() + { + // Console.WriteLine($"Complete\t{input.Name}\t->\t{output.Name}"); + formerCompleteSemaphore.Release(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void CompleteAndWriteData(IPipeLineConnectionPayload args) + { + this.args = args; + CompleteAndSkip(); + } + + #endregion + } + + public abstract class IPipeLineConnectionPayload { } +} diff --git a/StgSharp.Common/PipeLine/SideNode.cs b/StgSharp.Common/PipeLine/SideNode.cs index f9fd20e4..bac1eec2 100644 --- a/StgSharp.Common/PipeLine/SideNode.cs +++ b/StgSharp.Common/PipeLine/SideNode.cs @@ -1,93 +1,93 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="SideNode" -// 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.Globalization; -using System.Linq; -using System.Security.Principal; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - -namespace StgSharp.PipeLine -{ - internal sealed class BeginningNode : PipelineNode - { - - public const string OutName = "default"; - - private PipelineScheduler _bp; - - public BeginningNode(PipelineScheduler bp) - : base( - DefaultOperation, new PipelineNodeStringLabel("BeginningNode"), true, [ "default" ],[ OutName ]) - { - _bp = bp; - } - - public PipelineNodeOutPort DefaultOut => OutputPorts[OutName]; - - public override void Run() - { - _bp.RunningStat.Wait(); - PipelineNodeOutPort.SkipAll(_output); - } - - internal void SetInputData(IEnumerable<(string, IPipeLineConnectionPayload)> data) - { - if (data is null) { - return; - } - foreach ((string, IPipeLineConnectionPayload) item in data) { - OutputPorts[item.Item1].TransmitValue(item.Item2); - } - } - - } - - internal sealed class EndingNode : PipelineNode - { - - private PipelineScheduler _bp; - - public EndingNode(PipelineScheduler bp) - : base( - DefaultOperation, name:new PipelineNodeStringLabel("EndingNode"), true, [ "default" ],[ "default" ]) - { - _bp = bp; - } - - public override void Run() - { - PipelineNodeInPort.WaitAll(_input); - _bp.ResetIndex(); - _bp.RunningStat.Release(); - } - - } +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="SideNode" +// 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.Globalization; +using System.Linq; +using System.Security.Principal; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace StgSharp.PipeLine +{ + internal sealed class BeginningNode : PipelineNode + { + + public const string OutName = "default"; + + private PipelineScheduler _bp; + + public BeginningNode(PipelineScheduler bp) + : base( + DefaultOperation, new PipelineNodeStringLabel("BeginningNode"), true, [ "default" ],[ OutName ]) + { + _bp = bp; + } + + public PipelineNodeOutPort DefaultOut => OutputPorts[OutName]; + + public override void Run() + { + _bp.RunningStat.Wait(); + PipelineNodeOutPort.SkipAll(_output); + } + + internal void SetInputData(IEnumerable<(string, IPipeLineConnectionPayload)> data) + { + if (data is null) { + return; + } + foreach ((string, IPipeLineConnectionPayload) item in data) { + OutputPorts[item.Item1].TransmitValue(item.Item2); + } + } + + } + + internal sealed class EndingNode : PipelineNode + { + + private PipelineScheduler _bp; + + public EndingNode(PipelineScheduler bp) + : base( + DefaultOperation, name:new PipelineNodeStringLabel("EndingNode"), true, [ "default" ],[ "default" ]) + { + _bp = bp; + } + + public override void Run() + { + PipelineNodeInPort.WaitAll(_input); + _bp.ResetIndex(); + _bp.RunningStat.Release(); + } + + } } \ No newline at end of file diff --git a/StgSharp.Common/Properties/PublishProfiles/FolderProfile.pubxml b/StgSharp.Common/Properties/PublishProfiles/FolderProfile.pubxml index 3fce3c18..ef52df03 100644 --- a/StgSharp.Common/Properties/PublishProfiles/FolderProfile.pubxml +++ b/StgSharp.Common/Properties/PublishProfiles/FolderProfile.pubxml @@ -1,17 +1,17 @@ - - - - - Release - x64 - C:\Users\Nitlo\OneDrive - MSFT\桌面\新建文件夹 - FileSystem - <_TargetId>Folder - net8.0 - win-x64 - true - true - true - true - + + + + + Release + x64 + C:\Users\Nitlo\OneDrive - MSFT\桌面\新建文件夹 + FileSystem + <_TargetId>Folder + net8.0 + win-x64 + true + true + true + true + \ No newline at end of file diff --git a/StgSharp.Common/Properties/PublishProfiles/FolderProfile.pubxml.user b/StgSharp.Common/Properties/PublishProfiles/FolderProfile.pubxml.user index ea93ebfd..ef53d018 100644 --- a/StgSharp.Common/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/StgSharp.Common/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -1,8 +1,8 @@ - - - - - False|2025-08-24T07:15:39.9650284Z||; - - + + + + + False|2025-08-24T07:15:39.9650284Z||; + + \ No newline at end of file diff --git a/StgSharp.Common/State/ISimpleStateMachine.cs b/StgSharp.Common/State/ISimpleStateMachine.cs index 07c11f52..a6b557fe 100644 --- a/StgSharp.Common/State/ISimpleStateMachine.cs +++ b/StgSharp.Common/State/ISimpleStateMachine.cs @@ -1,56 +1,56 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ISimpleStateMachine" -// 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.Numerics; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.State -{ - public interface ISimpleStateMachine - where TStateNode : SimpleStateMachineNode - where TStateLabel : unmanaged, IEquatable - where TStateContext : StateContext - { - - TStateNode this[ - TStateLabel label - ] { get; } - - ref readonly TStateNode GetCurrentStateNode(); - - void Reset(); - - bool TryMoveNext( - TStateContext ctx - ); - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ISimpleStateMachine" +// 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.Numerics; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.State +{ + public interface ISimpleStateMachine + where TStateNode : SimpleStateMachineNode + where TStateLabel : unmanaged, IEquatable + where TStateContext : StateContext + { + + TStateNode this[ + TStateLabel label + ] { get; } + + ref readonly TStateNode GetCurrentStateNode(); + + void Reset(); + + bool TryMoveNext( + TStateContext ctx + ); + + } +} diff --git a/StgSharp.Common/State/SimpleStateMachineNode.cs b/StgSharp.Common/State/SimpleStateMachineNode.cs index 5f58ff8e..1def67db 100644 --- a/StgSharp.Common/State/SimpleStateMachineNode.cs +++ b/StgSharp.Common/State/SimpleStateMachineNode.cs @@ -1,60 +1,60 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="SimpleStateMachineNode" -// 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.Numerics; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.State -{ - public abstract class SimpleStateMachineNode - where TSelf : SimpleStateMachineNode - where TLabel : unmanaged, IEquatable - where TStateContext : StateContext - { - - private readonly List _jumpTable = []; - - public ReadOnlySpan AvailableNodes => CollectionsMarshal.AsSpan(_jumpTable); - - public abstract bool IsValidateFrom( - TSelf former, - TStateContext context - ); - - public abstract bool TryTransaction( - ReadOnlySpan nodeSpan, - TStateContext context, - out TLabel label - ); - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="SimpleStateMachineNode" +// 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.Numerics; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.State +{ + public abstract class SimpleStateMachineNode + where TSelf : SimpleStateMachineNode + where TLabel : unmanaged, IEquatable + where TStateContext : StateContext + { + + private readonly List _jumpTable = []; + + public ReadOnlySpan AvailableNodes => CollectionsMarshal.AsSpan(_jumpTable); + + public abstract bool IsValidateFrom( + TSelf former, + TStateContext context + ); + + public abstract bool TryTransaction( + ReadOnlySpan nodeSpan, + TStateContext context, + out TLabel label + ); + + } +} diff --git a/StgSharp.Common/State/StateContext.cs b/StgSharp.Common/State/StateContext.cs index 27d4138e..38d1d62f 100644 --- a/StgSharp.Common/State/StateContext.cs +++ b/StgSharp.Common/State/StateContext.cs @@ -1,40 +1,40 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="StateContext.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 System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.State -{ - public abstract class StateContext { } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="StateContext.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 System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.State +{ + public abstract class StateContext { } +} diff --git a/StgSharp.Common/StgSharp.Common.csproj b/StgSharp.Common/StgSharp.Common.csproj index 747ff55a..fe8d2d8d 100644 --- a/StgSharp.Common/StgSharp.Common.csproj +++ b/StgSharp.Common/StgSharp.Common.csproj @@ -1,30 +1,30 @@ - - - - Library - true - - - - - false - true - TargetFramework - - - - - - - - - - - - - - - - - + + + + Library + true + + + + + false + true + TargetFramework + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StgSharp.Common/StgSharp.Common.csproj.user b/StgSharp.Common/StgSharp.Common.csproj.user index 55491b6d..b7511698 100644 --- a/StgSharp.Common/StgSharp.Common.csproj.user +++ b/StgSharp.Common/StgSharp.Common.csproj.user @@ -1,6 +1,6 @@ - - - - <_LastSelectedProfileId>D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.Common\Properties\PublishProfiles\FolderProfile.pubxml - + + + + <_LastSelectedProfileId>D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.Common\Properties\PublishProfiles\FolderProfile.pubxml + \ No newline at end of file diff --git a/StgSharp.Common/Threading/AdaptiveBackoffStrategy.cs b/StgSharp.Common/Threading/AdaptiveBackoffStrategy.cs index a0891724..7ae08707 100644 --- a/StgSharp.Common/Threading/AdaptiveBackoffStrategy.cs +++ b/StgSharp.Common/Threading/AdaptiveBackoffStrategy.cs @@ -1,366 +1,366 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="AdaptiveBackoffStrategy" -// 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.Diagnostics; -using System.Runtime.CompilerServices; -using System.Threading; - -/// -/// Efficient adaptive backoff strategy that dynamically selects optimal backoff methods based on -/// system load and success rate -/// -public struct AdaptiveBackoffStrategy -{ - - private const int EVALUATION_INTERVAL_MS = 2000; // Global re-evaluation interval - private const int EXPLORATION_PROBABILITY = 10; // 10% probability to explore non-optimal strategies - private const int FAST_CONVERGENCE_THRESHOLD = 1000; // Fast convergence threshold - - // Configuration constants - private const int INITIAL_SPINWAIT_THRESHOLD = 8; // Cheap spin count for first few SpinWait iterations - private const int MIN_SAMPLES_FOR_EVALUATION = 100; // Minimum sample count before starting evaluation - - // Global shared state (all threads share learning results) - private static readonly PerformanceStats[] s_globalStats = new PerformanceStats[3]; - private static volatile BackoffMethod s_globalBestMethod; - private static volatile int s_evaluationInProgress; - private static long s_lastGlobalEvaluationTicks; - private BackoffMethod _currentMethod; - private int _consecutiveFailures; - private int _localAttempts; - - // Instance state - private SpinWait _spinWait; - private uint _fastRng; // Lightweight pseudo-random number generator - - // Static constructor: initialize optimal strategy based on system characteristics - static AdaptiveBackoffStrategy() - { - // Based on your benchmark results: - // - Low core count (<= 8): SpinWait has clear advantage - // - Medium core count (<= 16): Close performance, slightly favor SpinWait - // - High core count (>= 20): Sleep0 has significant advantage under high concurrency - int logicalCores = Environment.ProcessorCount; - - if (logicalCores <= 8) - { - s_globalBestMethod = BackoffMethod.SpinWait; - } else if (logicalCores <= 16) - { - s_globalBestMethod = BackoffMethod.SpinWait; // Default conservative choice - } else - { - // High core count systems, based on your 64-thread benchmark results - s_globalBestMethod = BackoffMethod.Sleep0; - } - - s_lastGlobalEvaluationTicks = Environment.TickCount64; - - // Initialize statistics array - for (int i = 0; i < s_globalStats.Length; i++) - { - s_globalStats[i].Reset(); - } - } - - /// - /// Gets the currently used backoff method (for debugging/monitoring) - /// - public readonly BackoffMethod CurrentMethod => _currentMethod; - - /// - /// Gets the globally considered optimal backoff method - /// - public static BackoffMethod GlobalBestMethod => s_globalBestMethod; - - /// - /// Creates a new adaptive backoff strategy instance - /// - public static AdaptiveBackoffStrategy Create() - { - return new AdaptiveBackoffStrategy - { - _spinWait = default, - _currentMethod = s_globalBestMethod, - _consecutiveFailures = 0, - _localAttempts = 0, - _fastRng = (uint)(Environment.TickCount64 ^ Thread.CurrentThread.ManagedThreadId * 0x9E3779B9U) - }; - } - - /// - /// Gets global statistics for the specified strategy (for monitoring) - /// - public static (long attempts, long successes, double successRate) GetGlobalStats(BackoffMethod method) - { - PerformanceStats stats = s_globalStats[(int)method]; - return (stats.Attempts, stats.Successes, stats.SuccessRate); - } - - /// - /// Called after CAS failure, performs backoff and may switch strategies - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void OnFailureAndBackoff() - { - _consecutiveFailures++; - - // Record failure - s_globalStats[(int)_currentMethod].RecordAttempt(success:false); - - // Periodically re-evaluate global optimal strategy - if (ShouldEvaluateGlobalStrategy()) - { - EvaluateAndUpdateGlobalStrategy(); - } - - // Decide whether to switch strategies based on failure count and current strategy - if (_consecutiveFailures >= INITIAL_SPINWAIT_THRESHOLD && ShouldSwitchStrategy()) - { - SwitchToOptimalStrategy(); - } - - // Perform the actual backoff operation - PerformBackoff(); - } - - /// - /// Called after CAS success, resets state - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void OnSuccess() - { - // Record success - s_globalStats[(int)_currentMethod].RecordAttempt(success:true); - - // Reset state - _spinWait = default; - _consecutiveFailures = 0; - - // Fast convergence: tend to keep current strategy when continuously successful - if (_localAttempts < FAST_CONVERGENCE_THRESHOLD) - { - _localAttempts++; - } - } - - /// - /// Evaluates and updates the global optimal strategy - /// - private static void EvaluateAndUpdateGlobalStrategy() - { - // Use CAS to ensure only one thread performs evaluation - if (Interlocked.CompareExchange(ref s_evaluationInProgress, 1, 0) != 0) - { - return; - } - - try - { - long now = Environment.TickCount64; - - // Double-check to avoid duplicate evaluation - if (now - Volatile.Read(ref s_lastGlobalEvaluationTicks) <= EVALUATION_INTERVAL_MS) - { - return; - } - - BackoffMethod bestMethod = s_globalBestMethod; - double bestSuccessRate = -1.0; - - // Find the strategy with the highest success rate - for (int i = 0; i < s_globalStats.Length; i++) - { - PerformanceStats stats = s_globalStats[i]; - if (stats.Attempts >= MIN_SAMPLES_FOR_EVALUATION) - { - double successRate = stats.SuccessRate; - if (successRate > bestSuccessRate) - { - bestSuccessRate = successRate; - bestMethod = (BackoffMethod)i; - } - } - } - - // Update global optimal strategy - s_globalBestMethod = bestMethod; - Volatile.Write(ref s_lastGlobalEvaluationTicks, now); - - // Reset statistics (maintain exploratory behavior) - for (int i = 0; i < s_globalStats.Length; i++) - { - s_globalStats[i].Reset(); - } - } - finally - { - Volatile.Write(ref s_evaluationInProgress, 0); - } - } - - /// - /// Fast pseudo-random number generator (LCG) - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private uint NextRandom() - { - _fastRng = _fastRng * 1103515245U + 12345U; - return _fastRng; - } - - /// - /// Performs the actual backoff operation - /// - [MethodImpl(MethodImplOptions.NoInlining)] // Avoid inlining to reduce hot path code size - private void PerformBackoff() - { - switch (_currentMethod) - { - case BackoffMethod.SpinWait: - if (_consecutiveFailures <= INITIAL_SPINWAIT_THRESHOLD) - { - _spinWait.SpinOnce(sleep1Threshold:-1); - } else if (_spinWait.NextSpinWillYield) - { - int yields = (int)(NextRandom() & 7) + 1; // 1-8 times - for (int i = 0; i < yields; i++) { - _ = Thread.Yield(); - } - } else - { - _spinWait.SpinOnce(sleep1Threshold:-1); - } - break; - - case BackoffMethod.Yield: - _ = Thread.Yield(); - break; - - case BackoffMethod.Sleep0: - Thread.Sleep(0); - break; - default: - break; - } - } - - /// - /// Checks whether global strategy evaluation should be performed - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static bool ShouldEvaluateGlobalStrategy() - { - long now = Environment.TickCount64; - return now - Volatile.Read(ref s_lastGlobalEvaluationTicks) > EVALUATION_INTERVAL_MS; - } - - /// - /// Determines whether strategy should be switched - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private bool ShouldSwitchStrategy() - { - // Fast convergence phase: reduce strategy switching - if (_localAttempts < FAST_CONVERGENCE_THRESHOLD && _consecutiveFailures < 32) - { - return false; - } - - // Small probability exploration: occasionally try other strategies even when current is optimal - return NextRandom() % 100 < EXPLORATION_PROBABILITY || _currentMethod != s_globalBestMethod; - } - - /// - /// Switches to the currently considered optimal strategy - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private void SwitchToOptimalStrategy() - { - BackoffMethod targetMethod; - - // Most of the time choose the globally optimal - if (NextRandom() % 100 >= EXPLORATION_PROBABILITY) - { - targetMethod = s_globalBestMethod; - } else - { - // Small probability random exploration - targetMethod = (BackoffMethod)(NextRandom() % 3); - } - - if (targetMethod != _currentMethod) - { - _currentMethod = targetMethod; - _spinWait = default; // Reset SpinWait state when switching strategies - _localAttempts = 0; - } - } - - public enum BackoffMethod : byte - { - - SpinWait = 0, - Yield = 1, - Sleep0 = 2 - - } - - private struct PerformanceStats - { - - public long Attempts; - public long LastResetTicks; - public long Successes; - - public readonly double SuccessRate - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => Attempts == 0 ? 0.0 : (double)Successes / Attempts; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void RecordAttempt(bool success) - { - _ = Interlocked.Increment(ref Attempts); - if (success) { - _ = Interlocked.Increment(ref Successes); - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Reset() - { - Attempts = 0; - Successes = 0; - LastResetTicks = Environment.TickCount64; - } - - } - +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="AdaptiveBackoffStrategy" +// 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.Diagnostics; +using System.Runtime.CompilerServices; +using System.Threading; + +/// +/// Efficient adaptive backoff strategy that dynamically selects optimal backoff methods based on +/// system load and success rate +/// +public struct AdaptiveBackoffStrategy +{ + + private const int EVALUATION_INTERVAL_MS = 2000; // Global re-evaluation interval + private const int EXPLORATION_PROBABILITY = 10; // 10% probability to explore non-optimal strategies + private const int FAST_CONVERGENCE_THRESHOLD = 1000; // Fast convergence threshold + + // Configuration constants + private const int INITIAL_SPINWAIT_THRESHOLD = 8; // Cheap spin count for first few SpinWait iterations + private const int MIN_SAMPLES_FOR_EVALUATION = 100; // Minimum sample count before starting evaluation + + // Global shared state (all threads share learning results) + private static readonly PerformanceStats[] s_globalStats = new PerformanceStats[3]; + private static volatile BackoffMethod s_globalBestMethod; + private static volatile int s_evaluationInProgress; + private static long s_lastGlobalEvaluationTicks; + private BackoffMethod _currentMethod; + private int _consecutiveFailures; + private int _localAttempts; + + // Instance state + private SpinWait _spinWait; + private uint _fastRng; // Lightweight pseudo-random number generator + + // Static constructor: initialize optimal strategy based on system characteristics + static AdaptiveBackoffStrategy() + { + // Based on your benchmark results: + // - Low core count (<= 8): SpinWait has clear advantage + // - Medium core count (<= 16): Close performance, slightly favor SpinWait + // - High core count (>= 20): Sleep0 has significant advantage under high concurrency + int logicalCores = Environment.ProcessorCount; + + if (logicalCores <= 8) + { + s_globalBestMethod = BackoffMethod.SpinWait; + } else if (logicalCores <= 16) + { + s_globalBestMethod = BackoffMethod.SpinWait; // Default conservative choice + } else + { + // High core count systems, based on your 64-thread benchmark results + s_globalBestMethod = BackoffMethod.Sleep0; + } + + s_lastGlobalEvaluationTicks = Environment.TickCount64; + + // Initialize statistics array + for (int i = 0; i < s_globalStats.Length; i++) + { + s_globalStats[i].Reset(); + } + } + + /// + /// Gets the currently used backoff method (for debugging/monitoring) + /// + public readonly BackoffMethod CurrentMethod => _currentMethod; + + /// + /// Gets the globally considered optimal backoff method + /// + public static BackoffMethod GlobalBestMethod => s_globalBestMethod; + + /// + /// Creates a new adaptive backoff strategy instance + /// + public static AdaptiveBackoffStrategy Create() + { + return new AdaptiveBackoffStrategy + { + _spinWait = default, + _currentMethod = s_globalBestMethod, + _consecutiveFailures = 0, + _localAttempts = 0, + _fastRng = (uint)(Environment.TickCount64 ^ Thread.CurrentThread.ManagedThreadId * 0x9E3779B9U) + }; + } + + /// + /// Gets global statistics for the specified strategy (for monitoring) + /// + public static (long attempts, long successes, double successRate) GetGlobalStats(BackoffMethod method) + { + PerformanceStats stats = s_globalStats[(int)method]; + return (stats.Attempts, stats.Successes, stats.SuccessRate); + } + + /// + /// Called after CAS failure, performs backoff and may switch strategies + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void OnFailureAndBackoff() + { + _consecutiveFailures++; + + // Record failure + s_globalStats[(int)_currentMethod].RecordAttempt(success:false); + + // Periodically re-evaluate global optimal strategy + if (ShouldEvaluateGlobalStrategy()) + { + EvaluateAndUpdateGlobalStrategy(); + } + + // Decide whether to switch strategies based on failure count and current strategy + if (_consecutiveFailures >= INITIAL_SPINWAIT_THRESHOLD && ShouldSwitchStrategy()) + { + SwitchToOptimalStrategy(); + } + + // Perform the actual backoff operation + PerformBackoff(); + } + + /// + /// Called after CAS success, resets state + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void OnSuccess() + { + // Record success + s_globalStats[(int)_currentMethod].RecordAttempt(success:true); + + // Reset state + _spinWait = default; + _consecutiveFailures = 0; + + // Fast convergence: tend to keep current strategy when continuously successful + if (_localAttempts < FAST_CONVERGENCE_THRESHOLD) + { + _localAttempts++; + } + } + + /// + /// Evaluates and updates the global optimal strategy + /// + private static void EvaluateAndUpdateGlobalStrategy() + { + // Use CAS to ensure only one thread performs evaluation + if (Interlocked.CompareExchange(ref s_evaluationInProgress, 1, 0) != 0) + { + return; + } + + try + { + long now = Environment.TickCount64; + + // Double-check to avoid duplicate evaluation + if (now - Volatile.Read(ref s_lastGlobalEvaluationTicks) <= EVALUATION_INTERVAL_MS) + { + return; + } + + BackoffMethod bestMethod = s_globalBestMethod; + double bestSuccessRate = -1.0; + + // Find the strategy with the highest success rate + for (int i = 0; i < s_globalStats.Length; i++) + { + PerformanceStats stats = s_globalStats[i]; + if (stats.Attempts >= MIN_SAMPLES_FOR_EVALUATION) + { + double successRate = stats.SuccessRate; + if (successRate > bestSuccessRate) + { + bestSuccessRate = successRate; + bestMethod = (BackoffMethod)i; + } + } + } + + // Update global optimal strategy + s_globalBestMethod = bestMethod; + Volatile.Write(ref s_lastGlobalEvaluationTicks, now); + + // Reset statistics (maintain exploratory behavior) + for (int i = 0; i < s_globalStats.Length; i++) + { + s_globalStats[i].Reset(); + } + } + finally + { + Volatile.Write(ref s_evaluationInProgress, 0); + } + } + + /// + /// Fast pseudo-random number generator (LCG) + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private uint NextRandom() + { + _fastRng = _fastRng * 1103515245U + 12345U; + return _fastRng; + } + + /// + /// Performs the actual backoff operation + /// + [MethodImpl(MethodImplOptions.NoInlining)] // Avoid inlining to reduce hot path code size + private void PerformBackoff() + { + switch (_currentMethod) + { + case BackoffMethod.SpinWait: + if (_consecutiveFailures <= INITIAL_SPINWAIT_THRESHOLD) + { + _spinWait.SpinOnce(sleep1Threshold:-1); + } else if (_spinWait.NextSpinWillYield) + { + int yields = (int)(NextRandom() & 7) + 1; // 1-8 times + for (int i = 0; i < yields; i++) { + _ = Thread.Yield(); + } + } else + { + _spinWait.SpinOnce(sleep1Threshold:-1); + } + break; + + case BackoffMethod.Yield: + _ = Thread.Yield(); + break; + + case BackoffMethod.Sleep0: + Thread.Sleep(0); + break; + default: + break; + } + } + + /// + /// Checks whether global strategy evaluation should be performed + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static bool ShouldEvaluateGlobalStrategy() + { + long now = Environment.TickCount64; + return now - Volatile.Read(ref s_lastGlobalEvaluationTicks) > EVALUATION_INTERVAL_MS; + } + + /// + /// Determines whether strategy should be switched + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private bool ShouldSwitchStrategy() + { + // Fast convergence phase: reduce strategy switching + if (_localAttempts < FAST_CONVERGENCE_THRESHOLD && _consecutiveFailures < 32) + { + return false; + } + + // Small probability exploration: occasionally try other strategies even when current is optimal + return NextRandom() % 100 < EXPLORATION_PROBABILITY || _currentMethod != s_globalBestMethod; + } + + /// + /// Switches to the currently considered optimal strategy + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private void SwitchToOptimalStrategy() + { + BackoffMethod targetMethod; + + // Most of the time choose the globally optimal + if (NextRandom() % 100 >= EXPLORATION_PROBABILITY) + { + targetMethod = s_globalBestMethod; + } else + { + // Small probability random exploration + targetMethod = (BackoffMethod)(NextRandom() % 3); + } + + if (targetMethod != _currentMethod) + { + _currentMethod = targetMethod; + _spinWait = default; // Reset SpinWait state when switching strategies + _localAttempts = 0; + } + } + + public enum BackoffMethod : byte + { + + SpinWait = 0, + Yield = 1, + Sleep0 = 2 + + } + + private struct PerformanceStats + { + + public long Attempts; + public long LastResetTicks; + public long Successes; + + public readonly double SuccessRate + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => Attempts == 0 ? 0.0 : (double)Successes / Attempts; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void RecordAttempt(bool success) + { + _ = Interlocked.Increment(ref Attempts); + if (success) { + _ = Interlocked.Increment(ref Successes); + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Reset() + { + Attempts = 0; + Successes = 0; + LastResetTicks = Environment.TickCount64; + } + + } + } \ No newline at end of file diff --git a/StgSharp.Common/Threading/BufferExpansionLock.cs b/StgSharp.Common/Threading/BufferExpansionLock.cs index e04e6c7c..df5fbedb 100644 --- a/StgSharp.Common/Threading/BufferExpansionLock.cs +++ b/StgSharp.Common/Threading/BufferExpansionLock.cs @@ -1,125 +1,125 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="BufferExpansionLock" -// 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; -using System.Threading.Tasks; - -namespace StgSharp.Threading -{ - /// - /// Provide a lock for managing concurrent access to a buffer that can be expanded and use a - /// common two-pase-copy expanding mechanism. - /// - public class BufferExpansionLock : IDisposable - { - - private static readonly ThreadLocal Count = new(() => 0); - - private readonly ReaderWriterLockSlim _copyLock; - private readonly ReaderWriterLockSlim _expansionLock; - - public BufferExpansionLock() - { - _expansionLock = new ReaderWriterLockSlim(LockRecursionPolicy.NoRecursion); - _copyLock = new ReaderWriterLockSlim(LockRecursionPolicy.NoRecursion); - } - - public bool IsThreadReadingMetaData - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => _expansionLock.IsReadLockHeld; - } - - public void Dispose() - { - _expansionLock?.Dispose(); - _copyLock?.Dispose(); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void EnterBufferCopy() - { - _copyLock.EnterWriteLock(); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void EnterBufferRead() - { - int c = Count.Value; - if (c == 0) { - _copyLock.EnterReadLock(); - } - Count.Value = c + 1; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void EnterExpansionProcess() - { - _expansionLock.EnterWriteLock(); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void EnterMetaDataRead() - { - _expansionLock.EnterReadLock(); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void ExitBufferCopy() - { - _copyLock.ExitWriteLock(); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void ExitBufferRead() - { - int c = Count.Value - 1; - Count.Value = c; - if (c == 0) { - _copyLock.ExitReadLock(); - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void ExitExpansionProcess() - { - _expansionLock.ExitWriteLock(); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void ExitMetaDataRead() - { - _expansionLock.ExitReadLock(); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="BufferExpansionLock" +// 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; +using System.Threading.Tasks; + +namespace StgSharp.Threading +{ + /// + /// Provide a lock for managing concurrent access to a buffer that can be expanded and use a + /// common two-pase-copy expanding mechanism. + /// + public class BufferExpansionLock : IDisposable + { + + private static readonly ThreadLocal Count = new(() => 0); + + private readonly ReaderWriterLockSlim _copyLock; + private readonly ReaderWriterLockSlim _expansionLock; + + public BufferExpansionLock() + { + _expansionLock = new ReaderWriterLockSlim(LockRecursionPolicy.NoRecursion); + _copyLock = new ReaderWriterLockSlim(LockRecursionPolicy.NoRecursion); + } + + public bool IsThreadReadingMetaData + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => _expansionLock.IsReadLockHeld; + } + + public void Dispose() + { + _expansionLock?.Dispose(); + _copyLock?.Dispose(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void EnterBufferCopy() + { + _copyLock.EnterWriteLock(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void EnterBufferRead() + { + int c = Count.Value; + if (c == 0) { + _copyLock.EnterReadLock(); + } + Count.Value = c + 1; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void EnterExpansionProcess() + { + _expansionLock.EnterWriteLock(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void EnterMetaDataRead() + { + _expansionLock.EnterReadLock(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void ExitBufferCopy() + { + _copyLock.ExitWriteLock(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void ExitBufferRead() + { + int c = Count.Value - 1; + Count.Value = c; + if (c == 0) { + _copyLock.ExitReadLock(); + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void ExitExpansionProcess() + { + _expansionLock.ExitWriteLock(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void ExitMetaDataRead() + { + _expansionLock.ExitReadLock(); + } + + } +} diff --git a/StgSharp.Common/Threading/CancellableTask.cs b/StgSharp.Common/Threading/CancellableTask.cs index 1d385386..18a133f5 100644 --- a/StgSharp.Common/Threading/CancellableTask.cs +++ b/StgSharp.Common/Threading/CancellableTask.cs @@ -1,154 +1,154 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="CancellableTask" -// 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; -using System.Threading.Tasks; - -namespace StgSharp.Threading -{ - public class CancellableTask : IDisposable - { - - private bool disposedValue; - private CancellationTokenSource cts; - private protected Action _startup; - private protected Task _internalTask; - - private protected CancellableTask() - { - cts = new CancellationTokenSource(); - } - - private protected CancellableTask(Action action) - { - _internalTask = new Task(InternalAction); - cts = new CancellationTokenSource(); - } - - public bool IsCompleted - { - get => _internalTask.IsCompleted; - } - - public CancellationTokenSource Cts - { - get => cts; - } - - public int Id - { - get => _internalTask.Id; - } - - public void Cancel() - { - Cts.Cancel(); - } - - public void CancelAndWait() - { - Cts.Cancel(); - _internalTask.Wait(); - } - - // ~CancellableTask() - // { - // Dispose(disposing: false); - // } - - public void Dispose() - { - Dispose(disposing:true); - GC.SuppressFinalize(this); - } - - public static CancellableTask Run(Action startup) - { - CancellableTask ret = new CancellableTask - { - _startup = startup - }; - ret._internalTask = Task.Run(ret.InternalAction); - return ret; - } - - public void Wait() - { - _internalTask.Wait(); - } - - public static void WaitAll(IEnumerable tasks) - { - IEnumerable convertedTasks = tasks.Select( - ct => ct._internalTask); - Task.WaitAll(convertedTasks.ToArray()); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal void InternalAction() - { - _startup(Cts.Token); - } - - protected virtual void Dispose(bool disposing) - { - if (!disposedValue) - { - if (disposing) - { - if (IsCompleted) - { - cts.Dispose(); - _internalTask.Dispose(); - } else - { - throw new InvalidOperationException( - "Cannot dispose a cancellable task before completed"); - } - } - - disposedValue = true; - } - } - - public static implicit operator Task(CancellableTask task) - { - return task._internalTask; - } - - ~CancellableTask() - { - Cts.Dispose(); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="CancellableTask" +// 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; +using System.Threading.Tasks; + +namespace StgSharp.Threading +{ + public class CancellableTask : IDisposable + { + + private bool disposedValue; + private CancellationTokenSource cts; + private protected Action _startup; + private protected Task _internalTask; + + private protected CancellableTask() + { + cts = new CancellationTokenSource(); + } + + private protected CancellableTask(Action action) + { + _internalTask = new Task(InternalAction); + cts = new CancellationTokenSource(); + } + + public bool IsCompleted + { + get => _internalTask.IsCompleted; + } + + public CancellationTokenSource Cts + { + get => cts; + } + + public int Id + { + get => _internalTask.Id; + } + + public void Cancel() + { + Cts.Cancel(); + } + + public void CancelAndWait() + { + Cts.Cancel(); + _internalTask.Wait(); + } + + // ~CancellableTask() + // { + // Dispose(disposing: false); + // } + + public void Dispose() + { + Dispose(disposing:true); + GC.SuppressFinalize(this); + } + + public static CancellableTask Run(Action startup) + { + CancellableTask ret = new CancellableTask + { + _startup = startup + }; + ret._internalTask = Task.Run(ret.InternalAction); + return ret; + } + + public void Wait() + { + _internalTask.Wait(); + } + + public static void WaitAll(IEnumerable tasks) + { + IEnumerable convertedTasks = tasks.Select( + ct => ct._internalTask); + Task.WaitAll(convertedTasks.ToArray()); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal void InternalAction() + { + _startup(Cts.Token); + } + + protected virtual void Dispose(bool disposing) + { + if (!disposedValue) + { + if (disposing) + { + if (IsCompleted) + { + cts.Dispose(); + _internalTask.Dispose(); + } else + { + throw new InvalidOperationException( + "Cannot dispose a cancellable task before completed"); + } + } + + disposedValue = true; + } + } + + public static implicit operator Task(CancellableTask task) + { + return task._internalTask; + } + + ~CancellableTask() + { + Cts.Dispose(); + } + + } +} diff --git a/StgSharp.Common/Threading/EmptyThread.cs b/StgSharp.Common/Threading/EmptyThread.cs index a9824f2d..7863593e 100644 --- a/StgSharp.Common/Threading/EmptyThread.cs +++ b/StgSharp.Common/Threading/EmptyThread.cs @@ -1,58 +1,58 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="EmptyThread" -// 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; -using System.Linq; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - -namespace StgSharp.Threading -{ - public static partial class ThreadHelper - { - - private static readonly Thread _emptyThreadCache = new Thread(() => { }); - - static ThreadHelper() - { - _emptyThreadCache.Start(); - } - - /// - /// An individual thread doing nothing, and its always returns false. - /// - public static Thread EmptyThread - { - get => _emptyThreadCache; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="EmptyThread" +// 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; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace StgSharp.Threading +{ + public static partial class ThreadHelper + { + + private static readonly Thread _emptyThreadCache = new Thread(() => { }); + + static ThreadHelper() + { + _emptyThreadCache.Start(); + } + + /// + /// An individual thread doing nothing, and its always returns false. + /// + public static Thread EmptyThread + { + get => _emptyThreadCache; + } + + } +} diff --git a/StgSharp.Common/Threading/MainThreadAssert.cs b/StgSharp.Common/Threading/MainThreadAssert.cs index d9113ad0..3928ffa6 100644 --- a/StgSharp.Common/Threading/MainThreadAssert.cs +++ b/StgSharp.Common/Threading/MainThreadAssert.cs @@ -1,51 +1,51 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="MainThreadAssert" -// 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.Diagnostics; -using System.Threading; - -namespace StgSharp.Threading -{ - public static partial class ThreadHelper - { - - private static readonly int mainThreadId = Environment.CurrentManagedThreadId; - private static readonly ThreadLocal isNotMainThread = new( - () => Environment.CurrentManagedThreadId != mainThreadId); - - [Conditional("DEBUG")] - internal static void MainThreadAssert() - { - if (isNotMainThread.Value) { - throw new InvalidOperationException( - $"Attempt to call sensitive operation which can be only called from main thread from thread {Environment.CurrentManagedThreadId}."); - } - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="MainThreadAssert" +// 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.Diagnostics; +using System.Threading; + +namespace StgSharp.Threading +{ + public static partial class ThreadHelper + { + + private static readonly int mainThreadId = Environment.CurrentManagedThreadId; + private static readonly ThreadLocal isNotMainThread = new( + () => Environment.CurrentManagedThreadId != mainThreadId); + + [Conditional("DEBUG")] + internal static void MainThreadAssert() + { + if (isNotMainThread.Value) { + throw new InvalidOperationException( + $"Attempt to call sensitive operation which can be only called from main thread from thread {Environment.CurrentManagedThreadId}."); + } + } + + } +} diff --git a/StgSharp.Common/Threading/NumaBuffer.cs b/StgSharp.Common/Threading/NumaBuffer.cs index 90751300..7fff2701 100644 --- a/StgSharp.Common/Threading/NumaBuffer.cs +++ b/StgSharp.Common/Threading/NumaBuffer.cs @@ -1,47 +1,47 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="NumaBuffer" -// 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.Common.Threading -{ - public unsafe struct NumaBuffer where T : unmanaged - { - - public readonly T* Buffers; - public readonly int BufferColumnCapacity; - public readonly int BufferRowCapacity; - - public int CurrentColumnCount; - public int CurrentRowCount; - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="NumaBuffer" +// 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.Common.Threading +{ + public unsafe struct NumaBuffer where T : unmanaged + { + + public readonly T* Buffers; + public readonly int BufferColumnCapacity; + public readonly int BufferRowCapacity; + + public int CurrentColumnCount; + public int CurrentRowCount; + + } +} diff --git a/StgSharp.Common/Threading/SingleConsumerBell.cs b/StgSharp.Common/Threading/SingleConsumerBell.cs index 9e6a6e89..379b2a79 100644 --- a/StgSharp.Common/Threading/SingleConsumerBell.cs +++ b/StgSharp.Common/Threading/SingleConsumerBell.cs @@ -1,175 +1,175 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="SingleConsumerBell" -// 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.Threading; - -namespace StgSharp.Threading -{ - /// - /// A single-consumer bell/signal primitive. - /// - /// - /// Producers can call multiple times to publish signals. The bell - /// keeps a pending count of not-yet-consumed signals. The consumer uses or to consume - /// signals. When a producer increments the pending count from 0 to 1, the - /// internal event is set to wake the consumer. Consuming via - /// or clears the entire pending count - /// (aggregate consumption). If new signals arrive while resetting, the event is set again to - /// avoid missed signals. Ownership: only the specified owner can call - /// the consumer APIs. - /// - public sealed class SingleConsumerBell : IDisposable - { - - private volatile bool _disposed; - private int _pending; // not volatile: used with Interlocked/Volatile APIs to avoid CS0420 - private readonly ManualResetEventSlim _evt; - private readonly object _owner; - - /// - /// Initializes a new instance of . - /// - /// - /// The unique consumer identity; subsequent calls to Wait/TryWait must pass the same - /// reference. - /// - /// - /// Spin count passed to the underlying . - /// - /// - /// Thrown if is null. - /// - public SingleConsumerBell(object owner, int spinCount = 100) - { - _owner = owner ?? throw new ArgumentNullException(nameof(owner)); - _evt = new ManualResetEventSlim(false, spinCount); - } - - /// - /// Disposes the bell, sets the event to wake any waiting consumer, and releases - /// resources. - /// - public void Dispose() - { - _disposed = true; - _evt.Set(); - _evt.Dispose(); - } - - /// - /// Publishes a signal by incrementing the not-yet-consumed count and returns the current - /// pending count. - /// - /// - /// If the pending count transitions from 0 to 1, the event is set to wake the consumer. - /// - /// - /// The current pending count including this call. - /// - public int Set() - { - if (_disposed) { - return Volatile.Read(ref _pending); - } - - // Increment pending; if we transitioned 0 -> 1, set the event to wake the consumer - int newCount = Interlocked.Increment(ref _pending); - if (newCount == 1) { - _evt.Set(); - } - return newCount; - } - - /// - /// Attempts to consume any pending signals without blocking. - /// - /// - /// The consumer object; must be the same reference provided at construction. - /// - /// - /// true if a signal was available (pending or event set); otherwise false - /// . - /// - /// - /// Thrown if is not the owner. - /// - public bool TryWait(object consumer) - { - if (!ReferenceEquals(_owner, consumer)) { - throw new InvalidOperationException("This bell is owned by another consumer."); - } - - if (!_evt.IsSet && Volatile.Read(ref _pending) == 0) { - return false; - } - - // Aggregate consumption: clear pending and reset event - _ = Interlocked.Exchange(ref _pending, 0); - _evt.Reset(); - - // If concurrent Set happened during reset, re-set the event to avoid lost signals - if (Volatile.Read(ref _pending) != 0) - { - _evt.Set(); - } - return true; - } - - /// - /// Blocks until a signal is available, then consumes all pending signals. - /// - /// - /// The consumer object; must be the same reference provided at construction. - /// - /// - /// A token to cancel the wait. - /// - /// - /// Thrown if is not the owner. - /// - public void Wait(object consumer, CancellationToken cancellationToken = default) - { - if (!ReferenceEquals(_owner, consumer)) { - throw new InvalidOperationException("This bell is owned by another consumer."); - } - - _evt.Wait(cancellationToken); - - // Consume this round of signals: clear pending and handle reset/concurrency - _ = Interlocked.Exchange(ref _pending, 0); - - _evt.Reset(); - - if (Volatile.Read(ref _pending) != 0) { - _evt.Set(); - } - } - - } +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="SingleConsumerBell" +// 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.Threading; + +namespace StgSharp.Threading +{ + /// + /// A single-consumer bell/signal primitive. + /// + /// + /// Producers can call multiple times to publish signals. The bell + /// keeps a pending count of not-yet-consumed signals. The consumer uses or to consume + /// signals. When a producer increments the pending count from 0 to 1, the + /// internal event is set to wake the consumer. Consuming via + /// or clears the entire pending count + /// (aggregate consumption). If new signals arrive while resetting, the event is set again to + /// avoid missed signals. Ownership: only the specified owner can call + /// the consumer APIs. + /// + public sealed class SingleConsumerBell : IDisposable + { + + private volatile bool _disposed; + private int _pending; // not volatile: used with Interlocked/Volatile APIs to avoid CS0420 + private readonly ManualResetEventSlim _evt; + private readonly object _owner; + + /// + /// Initializes a new instance of . + /// + /// + /// The unique consumer identity; subsequent calls to Wait/TryWait must pass the same + /// reference. + /// + /// + /// Spin count passed to the underlying . + /// + /// + /// Thrown if is null. + /// + public SingleConsumerBell(object owner, int spinCount = 100) + { + _owner = owner ?? throw new ArgumentNullException(nameof(owner)); + _evt = new ManualResetEventSlim(false, spinCount); + } + + /// + /// Disposes the bell, sets the event to wake any waiting consumer, and releases + /// resources. + /// + public void Dispose() + { + _disposed = true; + _evt.Set(); + _evt.Dispose(); + } + + /// + /// Publishes a signal by incrementing the not-yet-consumed count and returns the current + /// pending count. + /// + /// + /// If the pending count transitions from 0 to 1, the event is set to wake the consumer. + /// + /// + /// The current pending count including this call. + /// + public int Set() + { + if (_disposed) { + return Volatile.Read(ref _pending); + } + + // Increment pending; if we transitioned 0 -> 1, set the event to wake the consumer + int newCount = Interlocked.Increment(ref _pending); + if (newCount == 1) { + _evt.Set(); + } + return newCount; + } + + /// + /// Attempts to consume any pending signals without blocking. + /// + /// + /// The consumer object; must be the same reference provided at construction. + /// + /// + /// true if a signal was available (pending or event set); otherwise false + /// . + /// + /// + /// Thrown if is not the owner. + /// + public bool TryWait(object consumer) + { + if (!ReferenceEquals(_owner, consumer)) { + throw new InvalidOperationException("This bell is owned by another consumer."); + } + + if (!_evt.IsSet && Volatile.Read(ref _pending) == 0) { + return false; + } + + // Aggregate consumption: clear pending and reset event + _ = Interlocked.Exchange(ref _pending, 0); + _evt.Reset(); + + // If concurrent Set happened during reset, re-set the event to avoid lost signals + if (Volatile.Read(ref _pending) != 0) + { + _evt.Set(); + } + return true; + } + + /// + /// Blocks until a signal is available, then consumes all pending signals. + /// + /// + /// The consumer object; must be the same reference provided at construction. + /// + /// + /// A token to cancel the wait. + /// + /// + /// Thrown if is not the owner. + /// + public void Wait(object consumer, CancellationToken cancellationToken = default) + { + if (!ReferenceEquals(_owner, consumer)) { + throw new InvalidOperationException("This bell is owned by another consumer."); + } + + _evt.Wait(cancellationToken); + + // Consume this round of signals: clear pending and handle reset/concurrency + _ = Interlocked.Exchange(ref _pending, 0); + + _evt.Reset(); + + if (Volatile.Read(ref _pending) != 0) { + _evt.Set(); + } + } + + } } \ No newline at end of file diff --git a/StgSharp.Common/Threading/VariableCapacitySemaphore.cs b/StgSharp.Common/Threading/VariableCapacitySemaphore.cs index 7e274dad..fc90f51e 100644 --- a/StgSharp.Common/Threading/VariableCapacitySemaphore.cs +++ b/StgSharp.Common/Threading/VariableCapacitySemaphore.cs @@ -1,316 +1,316 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="VariableCapacitySemaphore" -// Project: StgSharp.Common -// AuthorGroup: Nitload -// License: MIT -// ----------------------------------------------------------------------- -using System; -using System.Runtime.CompilerServices; -using System.Threading; - -namespace StgSharp.Threading -{ - /// - /// A counting semaphore with adjustable maximum capacity at runtime. Implemented using one or - /// more ManualResetEventSlim (MRES) gates and atomic counters to avoid kernel semaphore - /// overhead while supporting high-frequency Release/Wait patterns. Notes: - This is a - /// counting primitive (not a barrier). Permits accumulate up to . - - /// Reducing does not revoke already issued permits; it only clamps - /// future releases. - Striped MRES can reduce contention in highly parallel waits. - /// - public sealed class VariableCapacitySemaphore : IDisposable - { - - // MRES stripes (one gate per stripe). All stripes are set when transitioning 0 -> >0 and reset at >0 -> 0. - private readonly ManualResetEventSlim[] _events; - private volatile int _current; - private volatile int _max; - private readonly int _stripeMask; // for power-of-two stripe counts; otherwise -1 - - /// - /// Create a new variable-capacity semaphore. - /// - /// - /// Initial available permits (clamped to [0, maxPermits]). - /// - /// - /// Logical maximum permits (>= 1). - /// - /// - /// Optional stripe count for MRES (<= 0 to auto choose by CPU). - /// - public VariableCapacitySemaphore(int initialCount = 0, int maxPermits = 1, int stripes = 0) - { - ArgumentOutOfRangeException.ThrowIfLessThan(maxPermits, 1); - ArgumentOutOfRangeException.ThrowIfNegative(initialCount); - - _max = maxPermits; - _current = Math.Min(initialCount, maxPermits); - - int stripeCount = stripes > 0 ? stripes : ClampToPow2(Math.Min(Environment.ProcessorCount, 8)); - _events = new ManualResetEventSlim[stripeCount]; - bool set = _current > 0; - for (int i = 0; i < stripeCount; i++) { - _events[i] = new ManualResetEventSlim(set, 0); - } - - _stripeMask = IsPow2(stripeCount) ? (stripeCount - 1) : -1; - } - - /// - /// Current number of available permits. - /// - public int CurrentCount => Volatile.Read(ref _current); - - /// - /// Logical maximum number of permits. Can be changed at runtime. - /// - public int MaxPermits - { - get => Volatile.Read(ref _max); - set - { - ArgumentOutOfRangeException.ThrowIfLessThan(value, 1); - - Volatile.Write(ref _max, value); - - // Clamp current to not exceed the new max (do not block; let Wait() consume down). - while (true) - { - int cur = Volatile.Read(ref _current); - if (cur <= value) - { - break; - } - - if (Interlocked.CompareExchange(ref _current, value, cur) == cur) - { - break; - } - } - - // Reflect availability to gates - if (Volatile.Read(ref _current) > 0) - { - SetAll(); - } else - { - ResetAll(); - } - } - } - - public void Dispose() - { - foreach (ManualResetEventSlim e in _events) { - e.Dispose(); - } - } - - /// - /// Release a single permit if under . Returns the previous - /// count. - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public int Release() - { - while (true) - { - int cur = Volatile.Read(ref _current); - int max = Volatile.Read(ref _max); - if (cur >= max) { - return cur; - } - - if (Interlocked.CompareExchange(ref _current, cur + 1, cur) == cur) - { - if (cur == 0) { - SetAll(); - } - - return cur; - } - } - } - - /// - /// Release multiple permits (capped by ). Returns the previous - /// count. - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public int Release(int permits) - { - ArgumentOutOfRangeException.ThrowIfNegativeOrZero(permits); - while (true) - { - int cur = Volatile.Read(ref _current); - int max = Volatile.Read(ref _max); - if (cur >= max) { - return cur; - } - - long target = (long)cur + permits; - if (target > max) { - target = max; - } - - if (Interlocked.CompareExchange(ref _current, (int)target, cur) == cur) - { - if (cur == 0) { - SetAll(); - } - - return cur; - } - } - } - - /// - /// Try to take a permit without blocking. Returns true if acquired. - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public bool TryWait() - { - while (true) - { - int cur = Volatile.Read(ref _current); - if (cur == 0) { - return false; - } - - if (Interlocked.CompareExchange(ref _current, cur - 1, cur) == cur) - { - if (cur - 1 == 0) { - ResetAll(); - } - - return true; - } - } - } - - /// - /// Block until a permit is available, then consume one. - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Wait() - { - ManualResetEventSlim gate = GetStripeEvent(); - SpinWait spinner = new SpinWait(); - while (true) - { - int cur = Volatile.Read(ref _current); - if (cur > 0 && Interlocked.CompareExchange(ref _current, cur - 1, cur) == cur) - { - if (cur - 1 == 0) { - ResetAll(); - } - - return; - } - if (!spinner.NextSpinWillYield) - { - spinner.SpinOnce(); - } else - { - gate.Wait(); - } - } - } - - /// - /// Block until a permit is available or canceled, then consume one. - /// - public bool Wait(int millisecondsTimeout, CancellationToken cancellationToken = default) - { - ManualResetEventSlim gate = GetStripeEvent(); - SpinWait spinner = new SpinWait(); - int start = Environment.TickCount; - int remaining = millisecondsTimeout; - while (true) - { - cancellationToken.ThrowIfCancellationRequested(); - int cur = Volatile.Read(ref _current); - if (cur > 0 && Interlocked.CompareExchange(ref _current, cur - 1, cur) == cur) - { - if (cur - 1 == 0) { - ResetAll(); - } - - return true; - } - if (!spinner.NextSpinWillYield) - { - spinner.SpinOnce(); - continue; - } - if (millisecondsTimeout < 0) - { - gate.Wait(cancellationToken); - continue; - } - if (remaining <= 0) { - return false; - } - - if (!gate.Wait(remaining, cancellationToken)) { - return false; - } - - remaining = millisecondsTimeout - (Environment.TickCount - start); - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static int ClampToPow2(int x) - { - if (x < 1) { - x = 1; - } - - if (x > 8) { - x = 8; - } - - int p = 1; - while ((p << 1) <= x) { - p <<= 1; - } - - return p; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private ManualResetEventSlim GetStripeEvent() - { - int id = Environment.CurrentManagedThreadId & 0x7fffffff; - if (_stripeMask != -1) { - return _events[id & _stripeMask]; - } - - int idx = id % _events.Length; - return _events[idx]; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static bool IsPow2(int x) => (x & (x - 1)) == 0; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private void ResetAll() - { - foreach (ManualResetEventSlim e in _events) { - e.Reset(); - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private void SetAll() - { - foreach (ManualResetEventSlim e in _events) { - e.Set(); - } - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="VariableCapacitySemaphore" +// Project: StgSharp.Common +// AuthorGroup: Nitload +// License: MIT +// ----------------------------------------------------------------------- +using System; +using System.Runtime.CompilerServices; +using System.Threading; + +namespace StgSharp.Threading +{ + /// + /// A counting semaphore with adjustable maximum capacity at runtime. Implemented using one or + /// more ManualResetEventSlim (MRES) gates and atomic counters to avoid kernel semaphore + /// overhead while supporting high-frequency Release/Wait patterns. Notes: - This is a + /// counting primitive (not a barrier). Permits accumulate up to . - + /// Reducing does not revoke already issued permits; it only clamps + /// future releases. - Striped MRES can reduce contention in highly parallel waits. + /// + public sealed class VariableCapacitySemaphore : IDisposable + { + + // MRES stripes (one gate per stripe). All stripes are set when transitioning 0 -> >0 and reset at >0 -> 0. + private readonly ManualResetEventSlim[] _events; + private volatile int _current; + private volatile int _max; + private readonly int _stripeMask; // for power-of-two stripe counts; otherwise -1 + + /// + /// Create a new variable-capacity semaphore. + /// + /// + /// Initial available permits (clamped to [0, maxPermits]). + /// + /// + /// Logical maximum permits (>= 1). + /// + /// + /// Optional stripe count for MRES (<= 0 to auto choose by CPU). + /// + public VariableCapacitySemaphore(int initialCount = 0, int maxPermits = 1, int stripes = 0) + { + ArgumentOutOfRangeException.ThrowIfLessThan(maxPermits, 1); + ArgumentOutOfRangeException.ThrowIfNegative(initialCount); + + _max = maxPermits; + _current = Math.Min(initialCount, maxPermits); + + int stripeCount = stripes > 0 ? stripes : ClampToPow2(Math.Min(Environment.ProcessorCount, 8)); + _events = new ManualResetEventSlim[stripeCount]; + bool set = _current > 0; + for (int i = 0; i < stripeCount; i++) { + _events[i] = new ManualResetEventSlim(set, 0); + } + + _stripeMask = IsPow2(stripeCount) ? (stripeCount - 1) : -1; + } + + /// + /// Current number of available permits. + /// + public int CurrentCount => Volatile.Read(ref _current); + + /// + /// Logical maximum number of permits. Can be changed at runtime. + /// + public int MaxPermits + { + get => Volatile.Read(ref _max); + set + { + ArgumentOutOfRangeException.ThrowIfLessThan(value, 1); + + Volatile.Write(ref _max, value); + + // Clamp current to not exceed the new max (do not block; let Wait() consume down). + while (true) + { + int cur = Volatile.Read(ref _current); + if (cur <= value) + { + break; + } + + if (Interlocked.CompareExchange(ref _current, value, cur) == cur) + { + break; + } + } + + // Reflect availability to gates + if (Volatile.Read(ref _current) > 0) + { + SetAll(); + } else + { + ResetAll(); + } + } + } + + public void Dispose() + { + foreach (ManualResetEventSlim e in _events) { + e.Dispose(); + } + } + + /// + /// Release a single permit if under . Returns the previous + /// count. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int Release() + { + while (true) + { + int cur = Volatile.Read(ref _current); + int max = Volatile.Read(ref _max); + if (cur >= max) { + return cur; + } + + if (Interlocked.CompareExchange(ref _current, cur + 1, cur) == cur) + { + if (cur == 0) { + SetAll(); + } + + return cur; + } + } + } + + /// + /// Release multiple permits (capped by ). Returns the previous + /// count. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int Release(int permits) + { + ArgumentOutOfRangeException.ThrowIfNegativeOrZero(permits); + while (true) + { + int cur = Volatile.Read(ref _current); + int max = Volatile.Read(ref _max); + if (cur >= max) { + return cur; + } + + long target = (long)cur + permits; + if (target > max) { + target = max; + } + + if (Interlocked.CompareExchange(ref _current, (int)target, cur) == cur) + { + if (cur == 0) { + SetAll(); + } + + return cur; + } + } + } + + /// + /// Try to take a permit without blocking. Returns true if acquired. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool TryWait() + { + while (true) + { + int cur = Volatile.Read(ref _current); + if (cur == 0) { + return false; + } + + if (Interlocked.CompareExchange(ref _current, cur - 1, cur) == cur) + { + if (cur - 1 == 0) { + ResetAll(); + } + + return true; + } + } + } + + /// + /// Block until a permit is available, then consume one. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Wait() + { + ManualResetEventSlim gate = GetStripeEvent(); + SpinWait spinner = new SpinWait(); + while (true) + { + int cur = Volatile.Read(ref _current); + if (cur > 0 && Interlocked.CompareExchange(ref _current, cur - 1, cur) == cur) + { + if (cur - 1 == 0) { + ResetAll(); + } + + return; + } + if (!spinner.NextSpinWillYield) + { + spinner.SpinOnce(); + } else + { + gate.Wait(); + } + } + } + + /// + /// Block until a permit is available or canceled, then consume one. + /// + public bool Wait(int millisecondsTimeout, CancellationToken cancellationToken = default) + { + ManualResetEventSlim gate = GetStripeEvent(); + SpinWait spinner = new SpinWait(); + int start = Environment.TickCount; + int remaining = millisecondsTimeout; + while (true) + { + cancellationToken.ThrowIfCancellationRequested(); + int cur = Volatile.Read(ref _current); + if (cur > 0 && Interlocked.CompareExchange(ref _current, cur - 1, cur) == cur) + { + if (cur - 1 == 0) { + ResetAll(); + } + + return true; + } + if (!spinner.NextSpinWillYield) + { + spinner.SpinOnce(); + continue; + } + if (millisecondsTimeout < 0) + { + gate.Wait(cancellationToken); + continue; + } + if (remaining <= 0) { + return false; + } + + if (!gate.Wait(remaining, cancellationToken)) { + return false; + } + + remaining = millisecondsTimeout - (Environment.TickCount - start); + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static int ClampToPow2(int x) + { + if (x < 1) { + x = 1; + } + + if (x > 8) { + x = 8; + } + + int p = 1; + while ((p << 1) <= x) { + p <<= 1; + } + + return p; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private ManualResetEventSlim GetStripeEvent() + { + int id = Environment.CurrentManagedThreadId & 0x7fffffff; + if (_stripeMask != -1) { + return _events[id & _stripeMask]; + } + + int idx = id % _events.Length; + return _events[idx]; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static bool IsPow2(int x) => (x & (x - 1)) == 0; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private void ResetAll() + { + foreach (ManualResetEventSlim e in _events) { + e.Reset(); + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private void SetAll() + { + foreach (ManualResetEventSlim e in _events) { + e.Set(); + } + } + + } +} diff --git a/StgSharp.Common/Timing/StgSharpTime.cs b/StgSharp.Common/Timing/StgSharpTime.cs index ae0cbc51..61308443 100644 --- a/StgSharp.Common/Timing/StgSharpTime.cs +++ b/StgSharp.Common/Timing/StgSharpTime.cs @@ -1,135 +1,135 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="StgSharpTime" -// 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.Timing; -using System; -using System.Diagnostics; -using System.Threading; - -namespace StgSharp -{ - public static partial class World - { - - public static TimeSourceProviderBase MainTimeProvider => StgSharpTime.OnlyInstance; - - } - - public sealed class StgSharpTime : TimeSourceProviderBase - { - - private static readonly LinearBag _subscribers = new(); - private static readonly Stopwatch mainProvider = new(); - private static Thread timeProvideThread; - - private StgSharpTime() { } - - // Use Stopwatch frequency as base tick frequency (ticks per second). - public override long Frequency => Stopwatch.Frequency; - - public static StgSharpTime OnlyInstance { get; } = new StgSharpTime(); - - public override long GetCurrentTimeSpanTick() => mainProvider.ElapsedTicks; - - public sealed override void StartProvidingTime() - { - if (mainProvider.IsRunning) { - return; - } - - mainProvider.Start(); - timeProvideThread = new Thread(ProvideTime) - { - IsBackground = true, - Name = "StgSharpTime" - }; - timeProvideThread.Start(); - } - - public override void StopProvidingTime() - { - lock (mainProvider) { - mainProvider.Stop(); - } - } - - public void Terminate() - { - lock (mainProvider) { - mainProvider.Stop(); - } - } - - protected sealed override void AddSubscriberUnsynced(TimeSpanProvider subscriber) - { - _subscribers.Add(subscriber); - } - - protected sealed override void RemoveSubscriberUnsynced(TimeSpanProvider subscriber) - { - _subscribers.Remove(subscriber); - } - - private void ProvideTime() - { - long internalFrequency = Stopwatch.Frequency; // ticks per second - lock (mainProvider) { - mainProvider.Restart(); - } - - while (mainProvider.IsRunning) - { - long elapsedTicks; - lock (mainProvider) { - elapsedTicks = mainProvider.ElapsedTicks; - } - if (_subscribers.Count == 0) - { - Thread.SpinWait(50); - continue; - } - lock (SubscribeLock) - { - for (int i = 0; i < _subscribers.Count; i++) - { - if (!_subscribers[i].OnSpanTick(elapsedTicks)) - { - // Console.WriteLine("removed"); - _subscribers.RemoveAt(i); - i--; // adjust index after removal - } - } - } - - // Optional: brief spin to avoid tight loop if frame lengths are large. - Thread.SpinWait(20); - } - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="StgSharpTime" +// 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.Timing; +using System; +using System.Diagnostics; +using System.Threading; + +namespace StgSharp +{ + public static partial class World + { + + public static TimeSourceProviderBase MainTimeProvider => StgSharpTime.OnlyInstance; + + } + + public sealed class StgSharpTime : TimeSourceProviderBase + { + + private static readonly LinearBag _subscribers = new(); + private static readonly Stopwatch mainProvider = new(); + private static Thread timeProvideThread; + + private StgSharpTime() { } + + // Use Stopwatch frequency as base tick frequency (ticks per second). + public override long Frequency => Stopwatch.Frequency; + + public static StgSharpTime OnlyInstance { get; } = new StgSharpTime(); + + public override long GetCurrentTimeSpanTick() => mainProvider.ElapsedTicks; + + public sealed override void StartProvidingTime() + { + if (mainProvider.IsRunning) { + return; + } + + mainProvider.Start(); + timeProvideThread = new Thread(ProvideTime) + { + IsBackground = true, + Name = "StgSharpTime" + }; + timeProvideThread.Start(); + } + + public override void StopProvidingTime() + { + lock (mainProvider) { + mainProvider.Stop(); + } + } + + public void Terminate() + { + lock (mainProvider) { + mainProvider.Stop(); + } + } + + protected sealed override void AddSubscriberUnsynced(TimeSpanProvider subscriber) + { + _subscribers.Add(subscriber); + } + + protected sealed override void RemoveSubscriberUnsynced(TimeSpanProvider subscriber) + { + _subscribers.Remove(subscriber); + } + + private void ProvideTime() + { + long internalFrequency = Stopwatch.Frequency; // ticks per second + lock (mainProvider) { + mainProvider.Restart(); + } + + while (mainProvider.IsRunning) + { + long elapsedTicks; + lock (mainProvider) { + elapsedTicks = mainProvider.ElapsedTicks; + } + if (_subscribers.Count == 0) + { + Thread.SpinWait(50); + continue; + } + lock (SubscribeLock) + { + for (int i = 0; i < _subscribers.Count; i++) + { + if (!_subscribers[i].OnSpanTick(elapsedTicks)) + { + // Console.WriteLine("removed"); + _subscribers.RemoveAt(i); + i--; // adjust index after removal + } + } + } + + // Optional: brief spin to avoid tight loop if frame lengths are large. + Thread.SpinWait(20); + } + } + + } +} diff --git a/StgSharp.Common/Timing/TimeSequence.cs b/StgSharp.Common/Timing/TimeSequence.cs index 8063d7de..95b06554 100644 --- a/StgSharp.Common/Timing/TimeSequence.cs +++ b/StgSharp.Common/Timing/TimeSequence.cs @@ -1,309 +1,309 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="TimeSequence" -// 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.Timing; -using System; -using System.Runtime.CompilerServices; - -namespace StgSharp.Common.Timing -{ - public abstract class TimeSequence - { - - public long BeginningTick { get; protected set; } - - public long EndingTick { get; protected set; } - - public long PreviousFrameTick { get; protected set; } - - public static TimeSequence CreateLinear( - double totalSeconds, - double frameSeconds - ) - { - if (double.IsPositiveInfinity(totalSeconds)) { - return new InfiniteLinearTimeSequence(frameSeconds); - } - return new LinearTimeSequence(totalSeconds, frameSeconds); - } - - public static TimeSequence CreateLinearInfinite( - double frameSeconds - ) - { - return new InfiniteLinearTimeSequence(frameSeconds); - } - - public static TimeSequence CreateLogarithmic( - double initialSliceSeconds, - double totalSeconds, - double growthMultiplier, - double minSliceSeconds - ) => new LogTimeSequence(initialSliceSeconds, totalSeconds, growthMultiplier, - minSliceSeconds); - - public abstract bool EndsAt( - long currentTick - ); - - public abstract bool IsNextFrameReady( - long currentTick - ); - - public abstract void StartFrom( - TimeSourceProviderBase source - ); - - } - - internal sealed class LinearTimeSequence : TimeSequence - { - - private readonly double _frameSeconds; - private readonly double _totalSeconds; - private long _frameLengthTicks; - - public LinearTimeSequence( - double totalSeconds, - double frameSeconds - ) - { - ArgumentOutOfRangeException.ThrowIfNegativeOrZero(totalSeconds); - ArgumentOutOfRangeException.ThrowIfNegativeOrZero(frameSeconds); - if (frameSeconds > totalSeconds) { - throw new ArgumentException("Frame length greater than total length."); - } - _totalSeconds = totalSeconds; - _frameSeconds = frameSeconds; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override bool EndsAt( - long currentTick - ) => currentTick >= EndingTick; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override bool IsNextFrameReady( - long currentTick - ) - { - long span = currentTick - PreviousFrameTick; - if (span >= _frameLengthTicks && currentTick < EndingTick) - { - PreviousFrameTick += _frameLengthTicks; - return true; - } - return false; - } - - public override void StartFrom( - TimeSourceProviderBase source - ) - { - long f = source?.Frequency ?? throw new ArgumentNullException(nameof(source)); - _frameLengthTicks = (long)Math.Max(1, _frameSeconds * f); - long totalTicks = (long)Math.Max(_frameLengthTicks, Math.Round(_totalSeconds * f, MidpointRounding.AwayFromZero)); - BeginningTick = source.GetCurrentTimeSpanTick(); - EndingTick = BeginningTick + totalTicks; - EndingTick = EndingTick < 0 ? long.MaxValue : EndingTick; - PreviousFrameTick = BeginningTick; - } - - } - - /// - /// Logarithmic time sequence with growth factor and minimum slice length enforcement. - /// - internal sealed class LogTimeSequence : TimeSequence - { - - private bool _finalEmitted; - private readonly double _initialSeconds; - private double _lastBoundarySecondsAdjusted; - private readonly double _minSliceSeconds; - private readonly double _multiplier; - private double _nextBoundarySecondsAdjusted; - private readonly double _totalSeconds; - private int _sliceIndex; - private long _freq; - private long _nextBoundaryTick; - private long _totalTicks; - - public LogTimeSequence( - double initialSliceSeconds, - double totalSeconds, - double growthMultiplier, - double minSliceSeconds - ) - { - ArgumentOutOfRangeException.ThrowIfNegativeOrZero(initialSliceSeconds); - ArgumentOutOfRangeException.ThrowIfNegativeOrZero(totalSeconds); - ArgumentOutOfRangeException.ThrowIfNegativeOrZero(growthMultiplier); - ArgumentOutOfRangeException.ThrowIfNegativeOrZero(minSliceSeconds); - if (growthMultiplier < 1.0) { - throw new ArgumentException("growthMultiplier must be >= 1"); - } - if (initialSliceSeconds > totalSeconds) { - throw new ArgumentException("Initial slice length greater than total length."); - } - _initialSeconds = initialSliceSeconds; - _totalSeconds = totalSeconds; - _multiplier = growthMultiplier; - _minSliceSeconds = minSliceSeconds; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override bool EndsAt( - long currentTick - ) - { - return currentTick >= EndingTick; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override bool IsNextFrameReady( - long currentTick - ) - { - // Emit final once when reaching or passing end. - if (currentTick >= EndingTick) - { - if (_finalEmitted) { - return false; - } - - PreviousFrameTick = EndingTick; - _finalEmitted = true; - return true; - } - - // Not reached end: only when we cross the next boundary tick do we emit. - if (currentTick < _nextBoundaryTick) - { - return false; - } - - // Advance to this boundary. - PreviousFrameTick = _nextBoundaryTick; - _lastBoundarySecondsAdjusted = _nextBoundarySecondsAdjusted; - _sliceIndex++; - - // Compute next cumulative boundary seconds with multiplier, then enforce min-slice and total cap. - double next = _initialSeconds * Math.Pow(_multiplier, _sliceIndex); - if (next > _totalSeconds) { - next = _totalSeconds; - } - - double delta = next - _lastBoundarySecondsAdjusted; - if (delta < _minSliceSeconds) - { - next = _lastBoundarySecondsAdjusted + _minSliceSeconds; - if (next > _totalSeconds) { - next = _totalSeconds; - } - } - - _nextBoundarySecondsAdjusted = next; - _nextBoundaryTick = (_nextBoundarySecondsAdjusted >= _totalSeconds) ? - EndingTick : - BeginningTick + SecondsToTicks(_nextBoundarySecondsAdjusted); - - return true; - } - - public override void StartFrom( - TimeSourceProviderBase source - ) - { - _freq = source?.Frequency ?? throw new ArgumentNullException(nameof(source)); - BeginningTick = source.GetCurrentTimeSpanTick(); - _totalTicks = SecondsToTicks(_totalSeconds); - EndingTick = BeginningTick + _totalTicks; - _sliceIndex = 0; - _lastBoundarySecondsAdjusted = 0.0; - _nextBoundarySecondsAdjusted = _initialSeconds; - _nextBoundaryTick = BeginningTick + SecondsToTicks(_nextBoundarySecondsAdjusted); - PreviousFrameTick = BeginningTick; - _finalEmitted = false; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private long SecondsToTicks( - double seconds - ) => (long)Math.Max(1L, Math.Round(seconds * _freq, MidpointRounding.AwayFromZero)); - - } - - /// - /// Infinite linear time sequence: emits frames at fixed interval and never ends. - /// - internal sealed class InfiniteLinearTimeSequence : TimeSequence - { - - private readonly double _frameSeconds; - private long _frameLengthTicks; - - public InfiniteLinearTimeSequence( - double frameSeconds - ) - { - ArgumentOutOfRangeException.ThrowIfNegativeOrZero(frameSeconds); - _frameSeconds = frameSeconds; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override bool EndsAt( - long currentTick - ) => false; // never ends - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override bool IsNextFrameReady( - long currentTick - ) - { - long span = currentTick - PreviousFrameTick; - if (span >= _frameLengthTicks) - { - PreviousFrameTick += _frameLengthTicks; - return true; - } - return false; - } - - public override void StartFrom( - TimeSourceProviderBase source - ) - { - long f = source?.Frequency ?? throw new ArgumentNullException(nameof(source)); - _frameLengthTicks = (long)Math.Max(1, _frameSeconds * f); - BeginningTick = source.GetCurrentTimeSpanTick(); - EndingTick = long.MaxValue; // sentinel - PreviousFrameTick = BeginningTick; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="TimeSequence" +// 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.Timing; +using System; +using System.Runtime.CompilerServices; + +namespace StgSharp.Common.Timing +{ + public abstract class TimeSequence + { + + public long BeginningTick { get; protected set; } + + public long EndingTick { get; protected set; } + + public long PreviousFrameTick { get; protected set; } + + public static TimeSequence CreateLinear( + double totalSeconds, + double frameSeconds + ) + { + if (double.IsPositiveInfinity(totalSeconds)) { + return new InfiniteLinearTimeSequence(frameSeconds); + } + return new LinearTimeSequence(totalSeconds, frameSeconds); + } + + public static TimeSequence CreateLinearInfinite( + double frameSeconds + ) + { + return new InfiniteLinearTimeSequence(frameSeconds); + } + + public static TimeSequence CreateLogarithmic( + double initialSliceSeconds, + double totalSeconds, + double growthMultiplier, + double minSliceSeconds + ) => new LogTimeSequence(initialSliceSeconds, totalSeconds, growthMultiplier, + minSliceSeconds); + + public abstract bool EndsAt( + long currentTick + ); + + public abstract bool IsNextFrameReady( + long currentTick + ); + + public abstract void StartFrom( + TimeSourceProviderBase source + ); + + } + + internal sealed class LinearTimeSequence : TimeSequence + { + + private readonly double _frameSeconds; + private readonly double _totalSeconds; + private long _frameLengthTicks; + + public LinearTimeSequence( + double totalSeconds, + double frameSeconds + ) + { + ArgumentOutOfRangeException.ThrowIfNegativeOrZero(totalSeconds); + ArgumentOutOfRangeException.ThrowIfNegativeOrZero(frameSeconds); + if (frameSeconds > totalSeconds) { + throw new ArgumentException("Frame length greater than total length."); + } + _totalSeconds = totalSeconds; + _frameSeconds = frameSeconds; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override bool EndsAt( + long currentTick + ) => currentTick >= EndingTick; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override bool IsNextFrameReady( + long currentTick + ) + { + long span = currentTick - PreviousFrameTick; + if (span >= _frameLengthTicks && currentTick < EndingTick) + { + PreviousFrameTick += _frameLengthTicks; + return true; + } + return false; + } + + public override void StartFrom( + TimeSourceProviderBase source + ) + { + long f = source?.Frequency ?? throw new ArgumentNullException(nameof(source)); + _frameLengthTicks = (long)Math.Max(1, _frameSeconds * f); + long totalTicks = (long)Math.Max(_frameLengthTicks, Math.Round(_totalSeconds * f, MidpointRounding.AwayFromZero)); + BeginningTick = source.GetCurrentTimeSpanTick(); + EndingTick = BeginningTick + totalTicks; + EndingTick = EndingTick < 0 ? long.MaxValue : EndingTick; + PreviousFrameTick = BeginningTick; + } + + } + + /// + /// Logarithmic time sequence with growth factor and minimum slice length enforcement. + /// + internal sealed class LogTimeSequence : TimeSequence + { + + private bool _finalEmitted; + private readonly double _initialSeconds; + private double _lastBoundarySecondsAdjusted; + private readonly double _minSliceSeconds; + private readonly double _multiplier; + private double _nextBoundarySecondsAdjusted; + private readonly double _totalSeconds; + private int _sliceIndex; + private long _freq; + private long _nextBoundaryTick; + private long _totalTicks; + + public LogTimeSequence( + double initialSliceSeconds, + double totalSeconds, + double growthMultiplier, + double minSliceSeconds + ) + { + ArgumentOutOfRangeException.ThrowIfNegativeOrZero(initialSliceSeconds); + ArgumentOutOfRangeException.ThrowIfNegativeOrZero(totalSeconds); + ArgumentOutOfRangeException.ThrowIfNegativeOrZero(growthMultiplier); + ArgumentOutOfRangeException.ThrowIfNegativeOrZero(minSliceSeconds); + if (growthMultiplier < 1.0) { + throw new ArgumentException("growthMultiplier must be >= 1"); + } + if (initialSliceSeconds > totalSeconds) { + throw new ArgumentException("Initial slice length greater than total length."); + } + _initialSeconds = initialSliceSeconds; + _totalSeconds = totalSeconds; + _multiplier = growthMultiplier; + _minSliceSeconds = minSliceSeconds; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override bool EndsAt( + long currentTick + ) + { + return currentTick >= EndingTick; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override bool IsNextFrameReady( + long currentTick + ) + { + // Emit final once when reaching or passing end. + if (currentTick >= EndingTick) + { + if (_finalEmitted) { + return false; + } + + PreviousFrameTick = EndingTick; + _finalEmitted = true; + return true; + } + + // Not reached end: only when we cross the next boundary tick do we emit. + if (currentTick < _nextBoundaryTick) + { + return false; + } + + // Advance to this boundary. + PreviousFrameTick = _nextBoundaryTick; + _lastBoundarySecondsAdjusted = _nextBoundarySecondsAdjusted; + _sliceIndex++; + + // Compute next cumulative boundary seconds with multiplier, then enforce min-slice and total cap. + double next = _initialSeconds * Math.Pow(_multiplier, _sliceIndex); + if (next > _totalSeconds) { + next = _totalSeconds; + } + + double delta = next - _lastBoundarySecondsAdjusted; + if (delta < _minSliceSeconds) + { + next = _lastBoundarySecondsAdjusted + _minSliceSeconds; + if (next > _totalSeconds) { + next = _totalSeconds; + } + } + + _nextBoundarySecondsAdjusted = next; + _nextBoundaryTick = (_nextBoundarySecondsAdjusted >= _totalSeconds) ? + EndingTick : + BeginningTick + SecondsToTicks(_nextBoundarySecondsAdjusted); + + return true; + } + + public override void StartFrom( + TimeSourceProviderBase source + ) + { + _freq = source?.Frequency ?? throw new ArgumentNullException(nameof(source)); + BeginningTick = source.GetCurrentTimeSpanTick(); + _totalTicks = SecondsToTicks(_totalSeconds); + EndingTick = BeginningTick + _totalTicks; + _sliceIndex = 0; + _lastBoundarySecondsAdjusted = 0.0; + _nextBoundarySecondsAdjusted = _initialSeconds; + _nextBoundaryTick = BeginningTick + SecondsToTicks(_nextBoundarySecondsAdjusted); + PreviousFrameTick = BeginningTick; + _finalEmitted = false; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private long SecondsToTicks( + double seconds + ) => (long)Math.Max(1L, Math.Round(seconds * _freq, MidpointRounding.AwayFromZero)); + + } + + /// + /// Infinite linear time sequence: emits frames at fixed interval and never ends. + /// + internal sealed class InfiniteLinearTimeSequence : TimeSequence + { + + private readonly double _frameSeconds; + private long _frameLengthTicks; + + public InfiniteLinearTimeSequence( + double frameSeconds + ) + { + ArgumentOutOfRangeException.ThrowIfNegativeOrZero(frameSeconds); + _frameSeconds = frameSeconds; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override bool EndsAt( + long currentTick + ) => false; // never ends + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override bool IsNextFrameReady( + long currentTick + ) + { + long span = currentTick - PreviousFrameTick; + if (span >= _frameLengthTicks) + { + PreviousFrameTick += _frameLengthTicks; + return true; + } + return false; + } + + public override void StartFrom( + TimeSourceProviderBase source + ) + { + long f = source?.Frequency ?? throw new ArgumentNullException(nameof(source)); + _frameLengthTicks = (long)Math.Max(1, _frameSeconds * f); + BeginningTick = source.GetCurrentTimeSpanTick(); + EndingTick = long.MaxValue; // sentinel + PreviousFrameTick = BeginningTick; + } + + } +} diff --git a/StgSharp.Common/Timing/TimeSourceProvider.cs b/StgSharp.Common/Timing/TimeSourceProvider.cs index b2b0f54c..d07c2fdc 100644 --- a/StgSharp.Common/Timing/TimeSourceProvider.cs +++ b/StgSharp.Common/Timing/TimeSourceProvider.cs @@ -1,68 +1,68 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="TimeSourceProvider" -// 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 System; -using System.Linq; -using System.Threading; - -namespace StgSharp.Timing -{ - public abstract class TimeSourceProviderBase - { - - public abstract long Frequency { get; } - - protected object SubscribeLock { get; } = new(); - - public void AddSubscriber(TimeSpanProvider subscriber) - { - lock (SubscribeLock) { - AddSubscriberUnsynced(subscriber); - } - } - - public abstract long GetCurrentTimeSpanTick(); - - public void RemoveSubscriber(TimeSpanProvider subscriber) - { - lock (SubscribeLock) { - RemoveSubscriberUnsynced(subscriber); - } - } - - public abstract void StartProvidingTime(); - - public abstract void StopProvidingTime(); - - protected abstract void AddSubscriberUnsynced(TimeSpanProvider subscriber); - - protected abstract void RemoveSubscriberUnsynced(TimeSpanProvider subscriber); - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="TimeSourceProvider" +// 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 System; +using System.Linq; +using System.Threading; + +namespace StgSharp.Timing +{ + public abstract class TimeSourceProviderBase + { + + public abstract long Frequency { get; } + + protected object SubscribeLock { get; } = new(); + + public void AddSubscriber(TimeSpanProvider subscriber) + { + lock (SubscribeLock) { + AddSubscriberUnsynced(subscriber); + } + } + + public abstract long GetCurrentTimeSpanTick(); + + public void RemoveSubscriber(TimeSpanProvider subscriber) + { + lock (SubscribeLock) { + RemoveSubscriberUnsynced(subscriber); + } + } + + public abstract void StartProvidingTime(); + + public abstract void StopProvidingTime(); + + protected abstract void AddSubscriberUnsynced(TimeSpanProvider subscriber); + + protected abstract void RemoveSubscriberUnsynced(TimeSpanProvider subscriber); + + } +} diff --git a/StgSharp.Common/Timing/TimeSpanProvider.Awaiting.cs b/StgSharp.Common/Timing/TimeSpanProvider.Awaiting.cs index a8366e99..61d33161 100644 --- a/StgSharp.Common/Timing/TimeSpanProvider.Awaiting.cs +++ b/StgSharp.Common/Timing/TimeSpanProvider.Awaiting.cs @@ -1,234 +1,234 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="TimeSpanProvider.Awaiting" -// 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.Mathematics.Memory; - -using System; -using System.Collections.Concurrent; -using System.Runtime.CompilerServices; -using System.Threading; -using System.Threading.Tasks; - -namespace StgSharp.Timing -{ - public partial class TimeSpanProvider - { - - private static readonly ConcurrentBufferStack s_unusedID = new ConcurrentBufferStack(8); - - private static int s_maxID; - - private EventHandler? _refreshHandler, _missHandler; - private int _size, _id; - private long _pendingSpans; // Number of unconsumed span ticks since last Wait. - - private readonly ManualResetEventSlim _event = new(); - private readonly object _participantObject = new(); - - public event EventHandler MissTimeSpanRefreshed - { - add => _missHandler += value; - remove => _missHandler -= value; - } - - public event EventHandler TimeSpanRefreshed - { - add => _refreshHandler += value; - remove => _refreshHandler -= value; - } - - /// - /// True if there is at least one unconsumed span tick (PendingSpanCount > 0). - /// - public bool HasPendingSpan => PendingSpanCount > 0; - - public int TokenID - { - get => _id; - private set => _id = value; - } - - /// - /// Number of span ticks not yet consumed by Wait ( > 0 means last tick not waited). - /// - public long PendingSpanCount => Volatile.Read(ref _pendingSpans); - - internal ManualResetEventSlim AwaitingEvent - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => _event; - } - - public void Dispose() - { - // mark provider as ended so external users can observe terminal state - Volatile.Write(ref _endedFlag, 1); - s_unusedID.Push(TokenID); - _event.Set(); - GC.SuppressFinalize(this); - } - - public override int GetHashCode() => _id; - - public void Participant() - { - lock (_participantObject) - { - // Increase the maximum concurrent consumers for the next tick. - _size++; - } - } - - public void WaitNextSpan() - { - _event.Wait(); - - // Consume one span slot (clamp at 0 so multiple subscribers won't make it negative). - while (true) - { - long cur = Volatile.Read(ref _pendingSpans); - if (cur == 0) { - return; - } - - if (Interlocked.CompareExchange(ref _pendingSpans, cur - 1, cur) == cur) - { - if (cur - 1 == 0) - { - // Last consumer resets the gate for the next tick. - _event.Reset(); - } - return; - } - } - } - - public async Task WaitNextSpanAsync() - { - await Task.Run(() => _event.Wait()).ConfigureAwait(false); - while (true) - { - long cur = Volatile.Read(ref _pendingSpans); - if (cur == 0) - { - break; - } - - if (Interlocked.CompareExchange(ref _pendingSpans, cur - 1, cur) == cur) - { - if (cur - 1 == 0) { - _event.Reset(); - } - - break; - } - } - } - - /// - /// Wait for the next timespan tick, but honor the provided cancellation token. Throws - /// OperationCanceledException when token is cancelled. If the provider is disposed during - /// wait an OperationCanceledException is thrown to indicate end. - /// - public Task WaitNextSpanAsync(CancellationToken ct) - { - // Block the current thread until the event is signaled or cancellation requested. - _event.Wait(ct); - - // consume one pending span (same logic as non-cancellable variant) - while (true) - { - long cur = Volatile.Read(ref _pendingSpans); - if (cur == 0) - { - break; - } - - if (Interlocked.CompareExchange(ref _pendingSpans, cur - 1, cur) == cur) - { - if (cur - 1 == 0) { - _event.Reset(); - } - - break; - } - } - - return Task.CompletedTask; - } - - internal void MissRefresh() => _missHandler?.Invoke(this, EventArgs.Empty); // Legacy compatibility. - - /// - /// - /// - /// - /// Tick passed since binded time source. - /// - /// - /// True if the span provider is working. False if time is over (the sequence ended). - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal bool OnSpanTick(long currentTick) - { - if (_sequence.EndsAt(currentTick)) - { - // mark ended due to sequence timeout, then dispose - Volatile.Write(ref _endedFlag, 1); - - // Console.WriteLine("Time span ended."); - Dispose(); - return false; - } - if (!_sequence.IsNextFrameReady(currentTick)) { - return true; - } - - // Console.WriteLine("Frame hit!"); - - // Fast path: if no pending consumers, initialize the counter to current capacity (_size). - if (Volatile.Read(ref _pendingSpans) == 0) - { - int toIssue = Math.Max(1, Volatile.Read(ref _size)); - if (Interlocked.CompareExchange(ref _pendingSpans, toIssue, 0) == 0) - { - // Open the gate for all current waiters (up to `_size`). - _event.Set(); - _refreshHandler?.Invoke(this, EventArgs.Empty); - } - } else - { - // A tick is already pending (or was just set by another thread): mark as miss. - _missHandler?.Invoke(this, EventArgs.Empty); - } - return true; - } - - ~TimeSpanProvider() => Dispose(); - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="TimeSpanProvider.Awaiting" +// 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.Mathematics.Memory; + +using System; +using System.Collections.Concurrent; +using System.Runtime.CompilerServices; +using System.Threading; +using System.Threading.Tasks; + +namespace StgSharp.Timing +{ + public partial class TimeSpanProvider + { + + private static readonly ConcurrentBufferStack s_unusedID = new ConcurrentBufferStack(8); + + private static int s_maxID; + + private EventHandler? _refreshHandler, _missHandler; + private int _size, _id; + private long _pendingSpans; // Number of unconsumed span ticks since last Wait. + + private readonly ManualResetEventSlim _event = new(); + private readonly object _participantObject = new(); + + public event EventHandler MissTimeSpanRefreshed + { + add => _missHandler += value; + remove => _missHandler -= value; + } + + public event EventHandler TimeSpanRefreshed + { + add => _refreshHandler += value; + remove => _refreshHandler -= value; + } + + /// + /// True if there is at least one unconsumed span tick (PendingSpanCount > 0). + /// + public bool HasPendingSpan => PendingSpanCount > 0; + + public int TokenID + { + get => _id; + private set => _id = value; + } + + /// + /// Number of span ticks not yet consumed by Wait ( > 0 means last tick not waited). + /// + public long PendingSpanCount => Volatile.Read(ref _pendingSpans); + + internal ManualResetEventSlim AwaitingEvent + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => _event; + } + + public void Dispose() + { + // mark provider as ended so external users can observe terminal state + Volatile.Write(ref _endedFlag, 1); + s_unusedID.Push(TokenID); + _event.Set(); + GC.SuppressFinalize(this); + } + + public override int GetHashCode() => _id; + + public void Participant() + { + lock (_participantObject) + { + // Increase the maximum concurrent consumers for the next tick. + _size++; + } + } + + public void WaitNextSpan() + { + _event.Wait(); + + // Consume one span slot (clamp at 0 so multiple subscribers won't make it negative). + while (true) + { + long cur = Volatile.Read(ref _pendingSpans); + if (cur == 0) { + return; + } + + if (Interlocked.CompareExchange(ref _pendingSpans, cur - 1, cur) == cur) + { + if (cur - 1 == 0) + { + // Last consumer resets the gate for the next tick. + _event.Reset(); + } + return; + } + } + } + + public async Task WaitNextSpanAsync() + { + await Task.Run(() => _event.Wait()).ConfigureAwait(false); + while (true) + { + long cur = Volatile.Read(ref _pendingSpans); + if (cur == 0) + { + break; + } + + if (Interlocked.CompareExchange(ref _pendingSpans, cur - 1, cur) == cur) + { + if (cur - 1 == 0) { + _event.Reset(); + } + + break; + } + } + } + + /// + /// Wait for the next timespan tick, but honor the provided cancellation token. Throws + /// OperationCanceledException when token is cancelled. If the provider is disposed during + /// wait an OperationCanceledException is thrown to indicate end. + /// + public Task WaitNextSpanAsync(CancellationToken ct) + { + // Block the current thread until the event is signaled or cancellation requested. + _event.Wait(ct); + + // consume one pending span (same logic as non-cancellable variant) + while (true) + { + long cur = Volatile.Read(ref _pendingSpans); + if (cur == 0) + { + break; + } + + if (Interlocked.CompareExchange(ref _pendingSpans, cur - 1, cur) == cur) + { + if (cur - 1 == 0) { + _event.Reset(); + } + + break; + } + } + + return Task.CompletedTask; + } + + internal void MissRefresh() => _missHandler?.Invoke(this, EventArgs.Empty); // Legacy compatibility. + + /// + /// + /// + /// + /// Tick passed since binded time source. + /// + /// + /// True if the span provider is working. False if time is over (the sequence ended). + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal bool OnSpanTick(long currentTick) + { + if (_sequence.EndsAt(currentTick)) + { + // mark ended due to sequence timeout, then dispose + Volatile.Write(ref _endedFlag, 1); + + // Console.WriteLine("Time span ended."); + Dispose(); + return false; + } + if (!_sequence.IsNextFrameReady(currentTick)) { + return true; + } + + // Console.WriteLine("Frame hit!"); + + // Fast path: if no pending consumers, initialize the counter to current capacity (_size). + if (Volatile.Read(ref _pendingSpans) == 0) + { + int toIssue = Math.Max(1, Volatile.Read(ref _size)); + if (Interlocked.CompareExchange(ref _pendingSpans, toIssue, 0) == 0) + { + // Open the gate for all current waiters (up to `_size`). + _event.Set(); + _refreshHandler?.Invoke(this, EventArgs.Empty); + } + } else + { + // A tick is already pending (or was just set by another thread): mark as miss. + _missHandler?.Invoke(this, EventArgs.Empty); + } + return true; + } + + ~TimeSpanProvider() => Dispose(); + + } +} diff --git a/StgSharp.Common/Timing/TimeSpanProvider.cs b/StgSharp.Common/Timing/TimeSpanProvider.cs index cb0ec623..f847b1f5 100644 --- a/StgSharp.Common/Timing/TimeSpanProvider.cs +++ b/StgSharp.Common/Timing/TimeSpanProvider.cs @@ -1,94 +1,94 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="TimeSpanProvider" -// 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.Common.Timing; -using System; -using System.Runtime.CompilerServices; -using System.Threading; - -namespace StgSharp.Timing -{ - /// - /// TimeSpanProvider: uses a bound TimeSequence and TimeSourceProviderBase to publish span - /// ticks. Each OnSpanTick advances the sequence; when sequence ends provider unsubscribes. - /// - public partial class TimeSpanProvider - { - - // private bool _subscribed; - private int _emittedSpanCount; // legacy counter - - // internal ended flag (0 = running, 1 = ended) - private int _endedFlag; - private readonly TimeSequence _sequence; - private readonly TimeSourceProviderBase _timeSource; - - public TimeSpanProvider( - TimeSequence sequence, - TimeSourceProviderBase provider, - int maxWaitCount = 1) - { - ArgumentNullException.ThrowIfNull(provider); - ArgumentNullException.ThrowIfNull(sequence); - _timeSource = provider; - _sequence = sequence; - _sequence.StartFrom(provider); - provider.AddSubscriber(this); - - // _subscribed = true; - if (!s_unusedID.TryPop(out int id)) - { - id = Interlocked.Increment(ref s_maxID); - } - TokenID = id; - _size = maxWaitCount > 0 ? maxWaitCount : 1; - _event = new ManualResetEventSlim(initialState:false, spinCount:0); - _pendingSpans = 0; - } - - /// - /// True when the provider has reached its end and will not emit further spans. - /// - public bool IsEnded => Volatile.Read(ref _endedFlag) != 0; - - /// - /// Current emitted time in seconds relative to the sequence beginning. - /// - public double CurrentSecond - { - get => (double)(_sequence.PreviousFrameTick - _sequence.BeginningTick) / _timeSource.Frequency; - } - - public int CurrentSpan => _emittedSpanCount; - - public static TimeSourceProviderBase DefaultProvider => World.MainTimeProvider; - - public static explicit operator int(TimeSpanProvider provider) => provider?._emittedSpanCount ?? - 0; - - } +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="TimeSpanProvider" +// 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.Common.Timing; +using System; +using System.Runtime.CompilerServices; +using System.Threading; + +namespace StgSharp.Timing +{ + /// + /// TimeSpanProvider: uses a bound TimeSequence and TimeSourceProviderBase to publish span + /// ticks. Each OnSpanTick advances the sequence; when sequence ends provider unsubscribes. + /// + public partial class TimeSpanProvider + { + + // private bool _subscribed; + private int _emittedSpanCount; // legacy counter + + // internal ended flag (0 = running, 1 = ended) + private int _endedFlag; + private readonly TimeSequence _sequence; + private readonly TimeSourceProviderBase _timeSource; + + public TimeSpanProvider( + TimeSequence sequence, + TimeSourceProviderBase provider, + int maxWaitCount = 1) + { + ArgumentNullException.ThrowIfNull(provider); + ArgumentNullException.ThrowIfNull(sequence); + _timeSource = provider; + _sequence = sequence; + _sequence.StartFrom(provider); + provider.AddSubscriber(this); + + // _subscribed = true; + if (!s_unusedID.TryPop(out int id)) + { + id = Interlocked.Increment(ref s_maxID); + } + TokenID = id; + _size = maxWaitCount > 0 ? maxWaitCount : 1; + _event = new ManualResetEventSlim(initialState:false, spinCount:0); + _pendingSpans = 0; + } + + /// + /// True when the provider has reached its end and will not emit further spans. + /// + public bool IsEnded => Volatile.Read(ref _endedFlag) != 0; + + /// + /// Current emitted time in seconds relative to the sequence beginning. + /// + public double CurrentSecond + { + get => (double)(_sequence.PreviousFrameTick - _sequence.BeginningTick) / _timeSource.Frequency; + } + + public int CurrentSpan => _emittedSpanCount; + + public static TimeSourceProviderBase DefaultProvider => World.MainTimeProvider; + + public static explicit operator int(TimeSpanProvider provider) => provider?._emittedSpanCount ?? + 0; + + } } \ No newline at end of file diff --git a/StgSharp.Device/ICommand.cs b/StgSharp.Device/ICommand.cs index 7ce34683..bae62457 100644 --- a/StgSharp.Device/ICommand.cs +++ b/StgSharp.Device/ICommand.cs @@ -1,8 +1,8 @@ -namespace EM.LowLevel -{ - /// - /// Marker interface for command types that can be built into bytes by an ICommandBuilder. - /// Implement this on record/struct command shapes. - /// - public interface ICommand { } -} +namespace EM.LowLevel +{ + /// + /// Marker interface for command types that can be built into bytes by an ICommandBuilder. + /// Implement this on record/struct command shapes. + /// + public interface ICommand { } +} diff --git a/StgSharp.Device/ICommandBuilder.cs b/StgSharp.Device/ICommandBuilder.cs index bc71e90e..396f7ea1 100644 --- a/StgSharp.Device/ICommandBuilder.cs +++ b/StgSharp.Device/ICommandBuilder.cs @@ -1,30 +1,30 @@ -namespace EM.LowLevel -{ - /// - /// Builds device/peripheral commands from C#-friendly types (enums, records, structs, etc.). - /// - public interface ICommandBuilder - { - - /// - /// Build a command payload (already framed or raw depending on implementation contract) from a - /// strongly-typed command description. - /// - /// - /// Command type (e.g., an enum or a record/struct) - /// - /// - /// Command value to build - /// - /// - /// Command bytes - /// - ReadOnlyMemory Build(TCommand command) where TCommand: notnull; - - /// - /// Try-build variant to avoid throwing and allow buffer reuse strategies. - /// - bool TryBuild(TCommand command, out ReadOnlyMemory bytes) where TCommand: notnull; - - } -} +namespace EM.LowLevel +{ + /// + /// Builds device/peripheral commands from C#-friendly types (enums, records, structs, etc.). + /// + public interface ICommandBuilder + { + + /// + /// Build a command payload (already framed or raw depending on implementation contract) from a + /// strongly-typed command description. + /// + /// + /// Command type (e.g., an enum or a record/struct) + /// + /// + /// Command value to build + /// + /// + /// Command bytes + /// + ReadOnlyMemory Build(TCommand command) where TCommand: notnull; + + /// + /// Try-build variant to avoid throwing and allow buffer reuse strategies. + /// + bool TryBuild(TCommand command, out ReadOnlyMemory bytes) where TCommand: notnull; + + } +} diff --git a/StgSharp.Device/IDataDecoder.cs b/StgSharp.Device/IDataDecoder.cs index fd0f7d14..ae834d8a 100644 --- a/StgSharp.Device/IDataDecoder.cs +++ b/StgSharp.Device/IDataDecoder.cs @@ -1,29 +1,29 @@ -namespace EM.LowLevel -{ - /// - /// Decodes device-specific binary responses into C#-friendly models. - /// - public interface IDataDecoder - { - - /// - /// Decode a response of a known type into a model. - /// - /// - /// Target model type - /// - /// - /// Raw or deframed payload depending on transport contract - /// - /// - /// Decoded model - /// - TModel Decode(ReadOnlySpan payload); - - /// - /// Try-decode variant to avoid throwing on partial/bad frames. - /// - bool TryDecode(ReadOnlySpan payload, out TModel model); - - } -} +namespace EM.LowLevel +{ + /// + /// Decodes device-specific binary responses into C#-friendly models. + /// + public interface IDataDecoder + { + + /// + /// Decode a response of a known type into a model. + /// + /// + /// Target model type + /// + /// + /// Raw or deframed payload depending on transport contract + /// + /// + /// Decoded model + /// + TModel Decode(ReadOnlySpan payload); + + /// + /// Try-decode variant to avoid throwing on partial/bad frames. + /// + bool TryDecode(ReadOnlySpan payload, out TModel model); + + } +} diff --git a/StgSharp.Device/IPortController.cs b/StgSharp.Device/IPortController.cs index 7029a100..53e47ff3 100644 --- a/StgSharp.Device/IPortController.cs +++ b/StgSharp.Device/IPortController.cs @@ -1,54 +1,54 @@ -using System.Threading; -using System.Threading.Tasks; - -namespace EM.LowLevel -{ - /// - /// Generic high-level controller that composes a PortStream, an ICommandBuilder and an - /// IDataDecoder to provide a complete peripheral control workflow. - /// - /// - /// Concrete transport deriving from PortStream - /// - /// - /// Concrete command builder - /// - /// - /// Concrete data decoder - /// - public interface IPortController where TPort: PortStream where TBuilder: ICommandBuilder - where TDecoder: IDataDecoder - { - - TBuilder CommandBuilder { get; } - - TDecoder Decoder { get; } - - TPort Port { get; } - - /// - /// Close the underlying port. - /// - void Close(); - - /// - /// Ensure the underlying port is opened and ready (delegates to Port.OpenAsync). - /// - ValueTask OpenAsync(CancellationToken cancellationToken = default); - - /// - /// Build a command, send it via the port and decode the response into a model. - /// - ValueTask RoundTripAsync( - TCommand command, - CancellationToken cancellationToken = default) - where TCommand: notnull; - - /// - /// Build a command and send it without expecting a typed response. - /// - ValueTask WriteAsync(TCommand command, CancellationToken cancellationToken = default) - where TCommand: notnull; - - } -} +using System.Threading; +using System.Threading.Tasks; + +namespace EM.LowLevel +{ + /// + /// Generic high-level controller that composes a PortStream, an ICommandBuilder and an + /// IDataDecoder to provide a complete peripheral control workflow. + /// + /// + /// Concrete transport deriving from PortStream + /// + /// + /// Concrete command builder + /// + /// + /// Concrete data decoder + /// + public interface IPortController where TPort: PortStream where TBuilder: ICommandBuilder + where TDecoder: IDataDecoder + { + + TBuilder CommandBuilder { get; } + + TDecoder Decoder { get; } + + TPort Port { get; } + + /// + /// Close the underlying port. + /// + void Close(); + + /// + /// Ensure the underlying port is opened and ready (delegates to Port.OpenAsync). + /// + ValueTask OpenAsync(CancellationToken cancellationToken = default); + + /// + /// Build a command, send it via the port and decode the response into a model. + /// + ValueTask RoundTripAsync( + TCommand command, + CancellationToken cancellationToken = default) + where TCommand: notnull; + + /// + /// Build a command and send it without expecting a typed response. + /// + ValueTask WriteAsync(TCommand command, CancellationToken cancellationToken = default) + where TCommand: notnull; + + } +} diff --git a/StgSharp.Device/IResponse.cs b/StgSharp.Device/IResponse.cs index 35f1a994..5a9cc3a2 100644 --- a/StgSharp.Device/IResponse.cs +++ b/StgSharp.Device/IResponse.cs @@ -1,7 +1,7 @@ -namespace EM.LowLevel -{ - /// - /// Marker interface for decoded response models returned by IDataDecoder. - /// - public interface IResponse { } -} +namespace EM.LowLevel +{ + /// + /// Marker interface for decoded response models returned by IDataDecoder. + /// + public interface IResponse { } +} diff --git a/StgSharp.Device/PortStream.cs b/StgSharp.Device/PortStream.cs index 39839a15..ecdc31c0 100644 --- a/StgSharp.Device/PortStream.cs +++ b/StgSharp.Device/PortStream.cs @@ -1,35 +1,35 @@ -using System; -using System.IO; -using System.Threading; -using System.Threading.Tasks; - -namespace EM.LowLevel -{ - /// - /// High-level transport abstraction for device communication. Derives from Stream and - /// encapsulates initialization/handshake and frame (header/tail/checksum) handling as needed - /// by the device. Implementations may wrap SerialPort, Sockets, USB, etc. - /// - public abstract class PortStream : Stream - { - - /// - /// Optional bytes available hint if the transport can provide it. - /// - public virtual long? BytesAvailable => null; - - /// - /// Close the underlying transport and release resources. - /// - public abstract override void Close(); - - /// - /// Ensure the port is opened and ready. Idempotent. May perform device-specific - /// handshakes. - /// - public abstract ValueTask OpenAsync(CancellationToken cancellationToken = default); - - // Concrete transports must implement Stream's abstract members. - // Seek-related members are typically not supported and should throw NotSupportedException. - } -} +using System; +using System.IO; +using System.Threading; +using System.Threading.Tasks; + +namespace EM.LowLevel +{ + /// + /// High-level transport abstraction for device communication. Derives from Stream and + /// encapsulates initialization/handshake and frame (header/tail/checksum) handling as needed + /// by the device. Implementations may wrap SerialPort, Sockets, USB, etc. + /// + public abstract class PortStream : Stream + { + + /// + /// Optional bytes available hint if the transport can provide it. + /// + public virtual long? BytesAvailable => null; + + /// + /// Close the underlying transport and release resources. + /// + public abstract override void Close(); + + /// + /// Ensure the port is opened and ready. Idempotent. May perform device-specific + /// handshakes. + /// + public abstract ValueTask OpenAsync(CancellationToken cancellationToken = default); + + // Concrete transports must implement Stream's abstract members. + // Seek-related members are typically not supported and should throw NotSupportedException. + } +} diff --git a/StgSharp.GenerateGL/CodeGen/CsTypeMapper.cs b/StgSharp.GenerateGL/CodeGen/CsTypeMapper.cs index 5aff7e30..17d9845f 100644 --- a/StgSharp.GenerateGL/CodeGen/CsTypeMapper.cs +++ b/StgSharp.GenerateGL/CodeGen/CsTypeMapper.cs @@ -1,192 +1,192 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="CsTypeMapper" -// 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; - -namespace GenerateGL.CodeGen -{ - internal static class CsTypeMapper - { - - public static string MapDelegateParameter( - GlParam param - ) - { - int pointerLevel = param.PointerLevel; - if (param.CType.Equals("GLchar", StringComparison.Ordinal) && pointerLevel > 0) { - return $"byte{new string('*', pointerLevel)}"; - } - - string mapped = MapType(param.CType, allowVoid:false); - if (pointerLevel > 0) - { - if (mapped == "void") { - return $"void{new string('*', pointerLevel)}"; - } - return $"{mapped}{new string('*', pointerLevel)}"; - } - return mapped; - } - - public static string MapDelegateReturn( - string cType, - int pointerLevel - ) - { - string mapped = MapType(cType, allowVoid:true); - if (pointerLevel > 0) { - return $"{mapped}{new string('*', pointerLevel)}"; - } - return mapped; - } - - public static string MapParameter( - GlParam param - ) - { - if (param.PointerLevel == 0) - { - if (param.CType.Equals("GLenum", StringComparison.Ordinal) && - LooksLikeShaderType(param.Name) && - !param.IsPointer) { - return "ShaderType"; - } - - if (param.CType.Equals("GLuint", StringComparison.Ordinal) && - LooksLikeHandle(param.Name) && - !param.IsPointer) { - return "GlHandle"; - } - } - - int pointerLevel = param.PointerLevel; - if (param.CType.Equals("GLchar", StringComparison.Ordinal) && pointerLevel > 0) { - return $"byte{new string('*', pointerLevel)}"; - } - - string mapped = MapType(param.CType, allowVoid:false); - if (pointerLevel > 0) - { - if (mapped == "void") { - return $"void{new string('*', pointerLevel)}"; - } - return $"{mapped}{new string('*', pointerLevel)}"; - } - return mapped; - } - - public static string MapReturn( - string cType, - int pointerLevel - ) - { - string mapped = MapType(cType, allowVoid:true); - if (pointerLevel > 0) { - return $"{mapped}{new string('*', pointerLevel)}"; - } - return mapped; - } - - public static bool TryMapConstPointerToSpan( - GlParam param, - out string spanElementType - ) - { - spanElementType = string.Empty; - if (!param.IsConst || param.PointerLevel != 1) { - return false; - } - - string mapped = MapType(param.CType, allowVoid:false); - if (mapped is "void") { - return false; - } - - spanElementType = mapped; - return true; - } - - private static bool LooksLikeHandle( - string name - ) - { - if (string.IsNullOrWhiteSpace(name)) { - return false; - } - - return name.Contains("program", StringComparison.OrdinalIgnoreCase) || - name.Contains("shader", StringComparison.OrdinalIgnoreCase) || - name.Contains("buffer", StringComparison.OrdinalIgnoreCase) || - name.Contains("texture", StringComparison.OrdinalIgnoreCase) || - name.Contains("framebuffer", StringComparison.OrdinalIgnoreCase) || - name.Contains("renderbuffer", StringComparison.OrdinalIgnoreCase) || - name.Contains("vertexarray", StringComparison.OrdinalIgnoreCase) || - name.Contains("query", StringComparison.OrdinalIgnoreCase) || - name.Contains("sampler", StringComparison.OrdinalIgnoreCase) || - name.Contains("transformfeedback", StringComparison.OrdinalIgnoreCase); - } - - private static bool LooksLikeShaderType( - string name - ) - { - if (string.IsNullOrWhiteSpace(name)) { - return false; - } - return name.Contains("shadertype", StringComparison.OrdinalIgnoreCase) || - name.Equals("type", StringComparison.OrdinalIgnoreCase); - } - - private static string MapType( - string cType, - bool allowVoid - ) - { - return cType switch - { - "void" when allowVoid => "void", - "GLenum" or "GLbitfield" => "uint", - "GLboolean" => "byte", - "GLuint" or "GLhandleARB" => "uint", - "GLint" or "GLsizei" or "GLfixed" => "int", - "GLshort" => "short", - "GLbyte" => "sbyte", - "GLubyte" => "byte", - "GLushort" => "ushort", - "GLfloat" => "float", - "GLdouble" => "double", - "GLclampf" or "GLclampd" => "float", - "GLintptr" => "nint", - "GLsizeiptr" => "nuint", - "GLchar" => "byte", - "GLsync" => "GLsync", - _ => allowVoid && cType == "void" ? "void" : "IntPtr" - }; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="CsTypeMapper" +// 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; + +namespace GenerateGL.CodeGen +{ + internal static class CsTypeMapper + { + + public static string MapDelegateParameter( + GlParam param + ) + { + int pointerLevel = param.PointerLevel; + if (param.CType.Equals("GLchar", StringComparison.Ordinal) && pointerLevel > 0) { + return $"byte{new string('*', pointerLevel)}"; + } + + string mapped = MapType(param.CType, allowVoid:false); + if (pointerLevel > 0) + { + if (mapped == "void") { + return $"void{new string('*', pointerLevel)}"; + } + return $"{mapped}{new string('*', pointerLevel)}"; + } + return mapped; + } + + public static string MapDelegateReturn( + string cType, + int pointerLevel + ) + { + string mapped = MapType(cType, allowVoid:true); + if (pointerLevel > 0) { + return $"{mapped}{new string('*', pointerLevel)}"; + } + return mapped; + } + + public static string MapParameter( + GlParam param + ) + { + if (param.PointerLevel == 0) + { + if (param.CType.Equals("GLenum", StringComparison.Ordinal) && + LooksLikeShaderType(param.Name) && + !param.IsPointer) { + return "ShaderType"; + } + + if (param.CType.Equals("GLuint", StringComparison.Ordinal) && + LooksLikeHandle(param.Name) && + !param.IsPointer) { + return "GlHandle"; + } + } + + int pointerLevel = param.PointerLevel; + if (param.CType.Equals("GLchar", StringComparison.Ordinal) && pointerLevel > 0) { + return $"byte{new string('*', pointerLevel)}"; + } + + string mapped = MapType(param.CType, allowVoid:false); + if (pointerLevel > 0) + { + if (mapped == "void") { + return $"void{new string('*', pointerLevel)}"; + } + return $"{mapped}{new string('*', pointerLevel)}"; + } + return mapped; + } + + public static string MapReturn( + string cType, + int pointerLevel + ) + { + string mapped = MapType(cType, allowVoid:true); + if (pointerLevel > 0) { + return $"{mapped}{new string('*', pointerLevel)}"; + } + return mapped; + } + + public static bool TryMapConstPointerToSpan( + GlParam param, + out string spanElementType + ) + { + spanElementType = string.Empty; + if (!param.IsConst || param.PointerLevel != 1) { + return false; + } + + string mapped = MapType(param.CType, allowVoid:false); + if (mapped is "void") { + return false; + } + + spanElementType = mapped; + return true; + } + + private static bool LooksLikeHandle( + string name + ) + { + if (string.IsNullOrWhiteSpace(name)) { + return false; + } + + return name.Contains("program", StringComparison.OrdinalIgnoreCase) || + name.Contains("shader", StringComparison.OrdinalIgnoreCase) || + name.Contains("buffer", StringComparison.OrdinalIgnoreCase) || + name.Contains("texture", StringComparison.OrdinalIgnoreCase) || + name.Contains("framebuffer", StringComparison.OrdinalIgnoreCase) || + name.Contains("renderbuffer", StringComparison.OrdinalIgnoreCase) || + name.Contains("vertexarray", StringComparison.OrdinalIgnoreCase) || + name.Contains("query", StringComparison.OrdinalIgnoreCase) || + name.Contains("sampler", StringComparison.OrdinalIgnoreCase) || + name.Contains("transformfeedback", StringComparison.OrdinalIgnoreCase); + } + + private static bool LooksLikeShaderType( + string name + ) + { + if (string.IsNullOrWhiteSpace(name)) { + return false; + } + return name.Contains("shadertype", StringComparison.OrdinalIgnoreCase) || + name.Equals("type", StringComparison.OrdinalIgnoreCase); + } + + private static string MapType( + string cType, + bool allowVoid + ) + { + return cType switch + { + "void" when allowVoid => "void", + "GLenum" or "GLbitfield" => "uint", + "GLboolean" => "byte", + "GLuint" or "GLhandleARB" => "uint", + "GLint" or "GLsizei" or "GLfixed" => "int", + "GLshort" => "short", + "GLbyte" => "sbyte", + "GLubyte" => "byte", + "GLushort" => "ushort", + "GLfloat" => "float", + "GLdouble" => "double", + "GLclampf" or "GLclampd" => "float", + "GLintptr" => "nint", + "GLsizeiptr" => "nuint", + "GLchar" => "byte", + "GLsync" => "GLsync", + _ => allowVoid && cType == "void" ? "void" : "IntPtr" + }; + } + + } +} diff --git a/StgSharp.GenerateGL/CodeGen/Generator.cs b/StgSharp.GenerateGL/CodeGen/Generator.cs index 083d36d7..8a889bd9 100644 --- a/StgSharp.GenerateGL/CodeGen/Generator.cs +++ b/StgSharp.GenerateGL/CodeGen/Generator.cs @@ -1,422 +1,422 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="Generator" -// 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.Frozen; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Text; - -namespace GenerateGL.CodeGen -{ - internal sealed class Generator - { - - private static readonly string[] TargetVersions = { - "3.3", "4.0", "4.1", "4.2", "4.3", "4.4", "4.5", "4.6" - }; - - private static readonly FrozenDictionary ReservedNames = - new Dictionary(StringComparer.Ordinal) { - { "string", "@string" }, { "class", "@class" }, { "namespace", "@namespace" }, { "checked", "@checked" }, { "unchecked", "@unchecked" }, { "ref", "@ref" }, { "out", "@out" }, { "in", "@in" }, { "object", "@object" }, { "event", "@event" }, { "params", "@params" }, { "base", "@base" }, { "this", "@this" }, { "void", "@void" }, { "int", "@int" }, { "uint", "@uint" }, { "long", "@long" }, { "ulong", "@ulong" }, { "short", "@short" }, { "ushort", "@ushort" }, { "float", "@float" }, { "double", "@double" }, { "decimal", "@decimal" }, { "bool", "@bool" }, { "byte", "@byte" }, { "sbyte", "@sbyte" }, { "char", "@char" }, { "struct", "@struct" }, { "public", "@public" }, { "private", "@private" }, { "protected", "@protected" }, { "internal", "@internal" }, { "fixed", "@fixed" } - }.ToFrozenDictionary(StringComparer.Ordinal); - - private readonly IReadOnlyDictionary _commands; - private readonly IReadOnlyList _features; - private readonly string _outputRoot; - - public Generator( - IReadOnlyDictionary commands, - IReadOnlyList features, - string outputRoot - ) - { - _commands = commands; - _features = features; - _outputRoot = outputRoot; - } - - public void Run() - { - if (Directory.Exists(_outputRoot)) { - Directory.Delete(_outputRoot, recursive:true); - } - Directory.CreateDirectory(_outputRoot); - List all = new List(); - HashSet previous = new HashSet(StringComparer.Ordinal); - foreach (string v in TargetVersions) - { - IReadOnlyList cmdsUpTo = CollectCommandsUpToVersion(v); - List versionCmds = cmdsUpTo.Where(c => !previous.Contains(c.Name)) - .ToList(); - foreach (GlCommand cmd in versionCmds) { - previous.Add(cmd.Name); - } - all.AddRange(versionCmds); - WriteOpenGLFunctionFile(v, versionCmds); - WriteGlContextFile(v, versionCmds); - } - WriteMergedGlContextFile(all); - WriteCommandHistoryFile(BuildCommandHistory()); - } - - private IReadOnlyDictionary> BuildCommandHistory() - { - Dictionary> history = new(StringComparer.Ordinal); - - IEnumerable ordered = _features.Where(f => Version.TryParse(f.Version, out _)) - .OrderBy(f => Version.Parse(f.Version)); - - foreach (GlFeature feature in ordered) - { - string version = feature.Version; - - foreach (string name in feature.RequiresCommands.Distinct(StringComparer.Ordinal)) - { - if (!_commands.ContainsKey(name) || ShouldSkip(name)) - { - continue; - } - - if (!history.TryGetValue(name, out List? list)) - { - list = new List(); - history[name] = list; - } - - if (list.Count == 0 || - list[^1].Action != CommandHistoryAction.Added || - list[^1].Version != version) { - list.Add(new CommandHistoryEntry(version, CommandHistoryAction.Added)); - } - } - - foreach (string name in feature.RemovedCommands.Distinct(StringComparer.Ordinal)) - { - if (!_commands.ContainsKey(name) || ShouldSkip(name)) - { - continue; - } - - if (!history.TryGetValue(name, out List? list)) - { - list = new List(); - history[name] = list; - } - - if (list.Count == 0 || - list[^1].Action != CommandHistoryAction.Removed || - list[^1].Version != version) { - list.Add(new CommandHistoryEntry(version, CommandHistoryAction.Removed)); - } - } - } - - return history; - } - - private IReadOnlyList CollectCommandsUpToVersion( - string version - ) - { - Version target = Version.Parse(version); - IEnumerable ordered = _features.Where(f => Version.TryParse(f.Version, out Version? fv) && - fv <= target) - .OrderBy(f => Version.Parse(f.Version)); - - HashSet active = new HashSet(StringComparer.Ordinal); - - foreach (GlFeature feature in ordered) - { - foreach (string name in feature.RequiresCommands.Distinct(StringComparer.Ordinal)) - { - if (_commands.ContainsKey(name)) { - active.Add(name); - } - } - - foreach (string name in feature.RemovedCommands.Distinct(StringComparer.Ordinal)) { - active.Remove(name); - } - } - - return active.Select(name => _commands.TryGetValue(name, out GlCommand? c) ? c : null) - .Where(c => c != null)! - .Cast() - .ToList(); - } - - private static string DelegateSignature( - string ret, - IReadOnlyList paramTypes - ) - { - if (paramTypes.Count == 0) { - return $"delegate*<{ret}>"; - } - return $"delegate*<{string.Join(", ", paramTypes)}, {ret}>"; - } - - private static string SafeName( - string name - ) - { - if (string.IsNullOrWhiteSpace(name)) { - return "arg"; - } - - if (ReservedNames.TryGetValue(name, out string? mapped)) { - return mapped; - } - - return name; - } - - private static bool ShouldSkip( - string name - ) - { - // No skipping; include legacy/fixed-function APIs as well. - return false; - } - - private static string TrimGlPrefix( - string name - ) - { - if (name.StartsWith("gl", StringComparison.Ordinal) && name.Length > 2) { - return name.Substring(2); - } - return name; - } - - private void WriteCommandHistoryFile( - IReadOnlyDictionary> history - ) - { - StringBuilder sb = new StringBuilder(); - sb.AppendLine("// "); - sb.AppendLine($"// Generated by StgSharp.GenerateGL on {DateTime.UtcNow.ToString("u", CultureInfo.InvariantCulture)}"); - sb.AppendLine("// Command availability history"); - sb.AppendLine("// "); - sb.AppendLine("using System;\nusing System.Collections.Frozen;\nusing System.Collections.Generic;\n"); - sb.AppendLine("namespace StgSharp.Graphics.OpenGL"); - sb.AppendLine("{"); - sb.AppendLine(" internal enum CommandHistoryAction { Added, Removed }"); - sb.AppendLine(); - sb.AppendLine(" internal readonly record struct CommandHistoryEntry(string Version, CommandHistoryAction Action);"); - sb.AppendLine(); - sb.AppendLine(" internal static class GlCommandHistory"); - sb.AppendLine(" {"); - sb.AppendLine(" internal static readonly FrozenDictionary History = new Dictionary(StringComparer.Ordinal)"); - sb.AppendLine(" {"); - - foreach (KeyValuePair> kvp in history.OrderBy(k => k.Key, StringComparer.Ordinal)) - { - string events = string.Join(", ", kvp.Value - .OrderBy(v => Version.Parse(v.Version)) - .Select(v => $"new CommandHistoryEntry(\"{v.Version}\", CommandHistoryAction.{v.Action})")); - sb.AppendLine($" {{ \"{kvp.Key}\", new CommandHistoryEntry[] {{ {events} }} }},"); - } - - sb.AppendLine(" }.ToFrozenDictionary(StringComparer.Ordinal);"); - sb.AppendLine(" }"); - sb.AppendLine("}"); - - string fileName = Path.Combine(_outputRoot, "glCommandHistory.cs"); - File.WriteAllText(fileName, sb.ToString(), Encoding.UTF8); - } - - private void WriteGlContextFile( - string version, - IReadOnlyList commands - ) - { - StringBuilder sb = new StringBuilder(); - sb.AppendLine("// "); - sb.AppendLine($"// Generated by StgSharp.GenerateGL on {DateTime.UtcNow.ToString("u", CultureInfo.InvariantCulture)}"); - sb.AppendLine($"// Version: {version}"); - sb.AppendLine("// "); - sb.AppendLine("using System;\nusing System.Runtime.CompilerServices;\n"); - sb.AppendLine("namespace StgSharp.Graphics.OpenGL"); - sb.AppendLine("{"); - sb.AppendLine(" public unsafe partial struct OpenglContext"); - sb.AppendLine(" {"); - foreach (GlCommand cmd in commands.OrderBy(c => c!.Name, StringComparer.Ordinal)) - { - string ret = CsTypeMapper.MapDelegateReturn(cmd.ReturnType, cmd.ReturnPointerLevel); - List paramTypes = new List(); - foreach (GlParam p in cmd.Parameters) - { - string mapped = CsTypeMapper.MapDelegateParameter(p); - paramTypes.Add(mapped); - } - string decl = DelegateSignature(ret, paramTypes); - sb.AppendLine($" internal unsafe {decl} {cmd.Name};"); - } - sb.AppendLine(" }"); - sb.AppendLine("}"); - - string fileName = Path.Combine(_outputRoot, $"glContext.v{version.Replace('.', '_')}.cs"); - File.WriteAllText(fileName, sb.ToString(), Encoding.UTF8); - } - - private void WriteMergedGlContextFile( - IReadOnlyList commands - ) - { - List distinct = commands.Where(c => !ShouldSkip(c.Name)) - .GroupBy(c => c.Name, StringComparer.Ordinal) - .Select(g => g.First()) - .OrderBy(c => c.Name, StringComparer.Ordinal) - .ToList(); - - StringBuilder sb = new StringBuilder(); - sb.AppendLine("// "); - sb.AppendLine($"// Generated by StgSharp.GenerateGL on {DateTime.UtcNow.ToString("u", CultureInfo.InvariantCulture)}"); - sb.AppendLine("// Aggregated GL3+ commands"); - sb.AppendLine("// "); - sb.AppendLine("using System;\nusing System.Runtime.CompilerServices;\n"); - sb.AppendLine("namespace StgSharp.Graphics.OpenGL"); - sb.AppendLine("{"); - sb.AppendLine(" public unsafe partial struct OpenglContext"); - sb.AppendLine(" {"); - foreach (GlCommand cmd in distinct) - { - string ret = CsTypeMapper.MapDelegateReturn(cmd.ReturnType, cmd.ReturnPointerLevel); - List paramTypes = new List(); - foreach (GlParam p in cmd.Parameters) - { - string mapped = CsTypeMapper.MapDelegateParameter(p); - paramTypes.Add(mapped); - } - string decl = DelegateSignature(ret, paramTypes); - sb.AppendLine($" internal unsafe {decl} {cmd.Name};"); - } - sb.AppendLine(" }"); - sb.AppendLine("}"); - - string fileName = Path.Combine(_outputRoot, "glContext.cs"); - File.WriteAllText(fileName, sb.ToString(), Encoding.UTF8); - } - - private void WriteOpenGLFunctionFile( - string version, - IReadOnlyList commands - ) - { - StringBuilder sb = new StringBuilder(); - sb.AppendLine("// "); - sb.AppendLine($"// Generated by StgSharp.GenerateGL on {DateTime.UtcNow.ToString("u", CultureInfo.InvariantCulture)}"); - sb.AppendLine($"// Version: {version}"); - sb.AppendLine("// "); - sb.AppendLine("using System;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\nusing StgSharp.Graphics.OpenGL;\n"); - sb.AppendLine("namespace StgSharp.Graphics.OpenGL"); - sb.AppendLine("{"); - sb.AppendLine(" public unsafe partial class OpenGLFunction"); - sb.AppendLine(" {"); - foreach (GlCommand cmd in commands.OrderBy(c => c!.Name, StringComparer.Ordinal)) - { - string ret = CsTypeMapper.MapReturn(cmd.ReturnType, cmd.ReturnPointerLevel); - string rawName = cmd.Name; // original glXxx - string methodName = TrimGlPrefix(rawName); - List paramList = new List(); - List callArgs = new List(); - List<(string Type,string Name)> pinned = new(); - foreach (GlParam p in cmd.Parameters) - { - string pname = SafeName(p.Name); - if (CsTypeMapper.TryMapConstPointerToSpan(p, out string spanElementType)) - { - paramList.Add($"ReadOnlySpan<{spanElementType}> {pname}"); - pinned.Add((spanElementType, pname)); - callArgs.Add($"{pname}Ptr"); - } else - { - string mapped = CsTypeMapper.MapParameter(p); - paramList.Add($"{mapped} {pname}"); - if (mapped == "GlHandle") - { - callArgs.Add($"{pname}.Value"); - } else - { - callArgs.Add(pname); - } - } - } - string signature = string.Join(", ", paramList); - string call = string.Join(", ", callArgs); - sb.AppendLine($" [MethodImpl(MethodImplOptions.AggressiveInlining)]"); - sb.AppendLine($" public {ret} {methodName}({signature})"); - sb.AppendLine(" {"); - string prefix = ret == "void" ? string.Empty : "return "; - if (pinned.Count == 0) - { - sb.AppendLine($" {prefix}Context.{rawName}({call});"); - } else - { - string indent = " "; - foreach ((string Type, string Name) pin in pinned) - { - sb.AppendLine($"{indent}fixed ({pin.Type}* {pin.Name}Ptr = {pin.Name})"); - sb.AppendLine($"{indent}{{"); - indent += " "; - } - sb.AppendLine($"{indent}{prefix}Context.{rawName}({call});"); - for (int i = 0; i < pinned.Count; i++) - { - indent = indent.Substring(0, indent.Length - 4); - sb.AppendLine($"{indent}}}"); - } - } - sb.AppendLine(" }"); - sb.AppendLine(); - } - sb.AppendLine(" }"); - sb.AppendLine("}"); - - string fileName = Path.Combine(_outputRoot, $"glFunction.v{version.Replace('.', '_')}.cs"); - File.WriteAllText(fileName, sb.ToString(), Encoding.UTF8); - } - - private enum CommandHistoryAction - { - - Added, - Removed - - } - - private readonly record struct CommandHistoryEntry( - string Version, - CommandHistoryAction Action - ); - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="Generator" +// 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.Frozen; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; + +namespace GenerateGL.CodeGen +{ + internal sealed class Generator + { + + private static readonly string[] TargetVersions = { + "3.3", "4.0", "4.1", "4.2", "4.3", "4.4", "4.5", "4.6" + }; + + private static readonly FrozenDictionary ReservedNames = + new Dictionary(StringComparer.Ordinal) { + { "string", "@string" }, { "class", "@class" }, { "namespace", "@namespace" }, { "checked", "@checked" }, { "unchecked", "@unchecked" }, { "ref", "@ref" }, { "out", "@out" }, { "in", "@in" }, { "object", "@object" }, { "event", "@event" }, { "params", "@params" }, { "base", "@base" }, { "this", "@this" }, { "void", "@void" }, { "int", "@int" }, { "uint", "@uint" }, { "long", "@long" }, { "ulong", "@ulong" }, { "short", "@short" }, { "ushort", "@ushort" }, { "float", "@float" }, { "double", "@double" }, { "decimal", "@decimal" }, { "bool", "@bool" }, { "byte", "@byte" }, { "sbyte", "@sbyte" }, { "char", "@char" }, { "struct", "@struct" }, { "public", "@public" }, { "private", "@private" }, { "protected", "@protected" }, { "internal", "@internal" }, { "fixed", "@fixed" } + }.ToFrozenDictionary(StringComparer.Ordinal); + + private readonly IReadOnlyDictionary _commands; + private readonly IReadOnlyList _features; + private readonly string _outputRoot; + + public Generator( + IReadOnlyDictionary commands, + IReadOnlyList features, + string outputRoot + ) + { + _commands = commands; + _features = features; + _outputRoot = outputRoot; + } + + public void Run() + { + if (Directory.Exists(_outputRoot)) { + Directory.Delete(_outputRoot, recursive:true); + } + Directory.CreateDirectory(_outputRoot); + List all = new List(); + HashSet previous = new HashSet(StringComparer.Ordinal); + foreach (string v in TargetVersions) + { + IReadOnlyList cmdsUpTo = CollectCommandsUpToVersion(v); + List versionCmds = cmdsUpTo.Where(c => !previous.Contains(c.Name)) + .ToList(); + foreach (GlCommand cmd in versionCmds) { + previous.Add(cmd.Name); + } + all.AddRange(versionCmds); + WriteOpenGLFunctionFile(v, versionCmds); + WriteGlContextFile(v, versionCmds); + } + WriteMergedGlContextFile(all); + WriteCommandHistoryFile(BuildCommandHistory()); + } + + private IReadOnlyDictionary> BuildCommandHistory() + { + Dictionary> history = new(StringComparer.Ordinal); + + IEnumerable ordered = _features.Where(f => Version.TryParse(f.Version, out _)) + .OrderBy(f => Version.Parse(f.Version)); + + foreach (GlFeature feature in ordered) + { + string version = feature.Version; + + foreach (string name in feature.RequiresCommands.Distinct(StringComparer.Ordinal)) + { + if (!_commands.ContainsKey(name) || ShouldSkip(name)) + { + continue; + } + + if (!history.TryGetValue(name, out List? list)) + { + list = new List(); + history[name] = list; + } + + if (list.Count == 0 || + list[^1].Action != CommandHistoryAction.Added || + list[^1].Version != version) { + list.Add(new CommandHistoryEntry(version, CommandHistoryAction.Added)); + } + } + + foreach (string name in feature.RemovedCommands.Distinct(StringComparer.Ordinal)) + { + if (!_commands.ContainsKey(name) || ShouldSkip(name)) + { + continue; + } + + if (!history.TryGetValue(name, out List? list)) + { + list = new List(); + history[name] = list; + } + + if (list.Count == 0 || + list[^1].Action != CommandHistoryAction.Removed || + list[^1].Version != version) { + list.Add(new CommandHistoryEntry(version, CommandHistoryAction.Removed)); + } + } + } + + return history; + } + + private IReadOnlyList CollectCommandsUpToVersion( + string version + ) + { + Version target = Version.Parse(version); + IEnumerable ordered = _features.Where(f => Version.TryParse(f.Version, out Version? fv) && + fv <= target) + .OrderBy(f => Version.Parse(f.Version)); + + HashSet active = new HashSet(StringComparer.Ordinal); + + foreach (GlFeature feature in ordered) + { + foreach (string name in feature.RequiresCommands.Distinct(StringComparer.Ordinal)) + { + if (_commands.ContainsKey(name)) { + active.Add(name); + } + } + + foreach (string name in feature.RemovedCommands.Distinct(StringComparer.Ordinal)) { + active.Remove(name); + } + } + + return active.Select(name => _commands.TryGetValue(name, out GlCommand? c) ? c : null) + .Where(c => c != null)! + .Cast() + .ToList(); + } + + private static string DelegateSignature( + string ret, + IReadOnlyList paramTypes + ) + { + if (paramTypes.Count == 0) { + return $"delegate*<{ret}>"; + } + return $"delegate*<{string.Join(", ", paramTypes)}, {ret}>"; + } + + private static string SafeName( + string name + ) + { + if (string.IsNullOrWhiteSpace(name)) { + return "arg"; + } + + if (ReservedNames.TryGetValue(name, out string? mapped)) { + return mapped; + } + + return name; + } + + private static bool ShouldSkip( + string name + ) + { + // No skipping; include legacy/fixed-function APIs as well. + return false; + } + + private static string TrimGlPrefix( + string name + ) + { + if (name.StartsWith("gl", StringComparison.Ordinal) && name.Length > 2) { + return name.Substring(2); + } + return name; + } + + private void WriteCommandHistoryFile( + IReadOnlyDictionary> history + ) + { + StringBuilder sb = new StringBuilder(); + sb.AppendLine("// "); + sb.AppendLine($"// Generated by StgSharp.GenerateGL on {DateTime.UtcNow.ToString("u", CultureInfo.InvariantCulture)}"); + sb.AppendLine("// Command availability history"); + sb.AppendLine("// "); + sb.AppendLine("using System;\nusing System.Collections.Frozen;\nusing System.Collections.Generic;\n"); + sb.AppendLine("namespace StgSharp.Graphics.OpenGL"); + sb.AppendLine("{"); + sb.AppendLine(" internal enum CommandHistoryAction { Added, Removed }"); + sb.AppendLine(); + sb.AppendLine(" internal readonly record struct CommandHistoryEntry(string Version, CommandHistoryAction Action);"); + sb.AppendLine(); + sb.AppendLine(" internal static class GlCommandHistory"); + sb.AppendLine(" {"); + sb.AppendLine(" internal static readonly FrozenDictionary History = new Dictionary(StringComparer.Ordinal)"); + sb.AppendLine(" {"); + + foreach (KeyValuePair> kvp in history.OrderBy(k => k.Key, StringComparer.Ordinal)) + { + string events = string.Join(", ", kvp.Value + .OrderBy(v => Version.Parse(v.Version)) + .Select(v => $"new CommandHistoryEntry(\"{v.Version}\", CommandHistoryAction.{v.Action})")); + sb.AppendLine($" {{ \"{kvp.Key}\", new CommandHistoryEntry[] {{ {events} }} }},"); + } + + sb.AppendLine(" }.ToFrozenDictionary(StringComparer.Ordinal);"); + sb.AppendLine(" }"); + sb.AppendLine("}"); + + string fileName = Path.Combine(_outputRoot, "glCommandHistory.cs"); + File.WriteAllText(fileName, sb.ToString(), Encoding.UTF8); + } + + private void WriteGlContextFile( + string version, + IReadOnlyList commands + ) + { + StringBuilder sb = new StringBuilder(); + sb.AppendLine("// "); + sb.AppendLine($"// Generated by StgSharp.GenerateGL on {DateTime.UtcNow.ToString("u", CultureInfo.InvariantCulture)}"); + sb.AppendLine($"// Version: {version}"); + sb.AppendLine("// "); + sb.AppendLine("using System;\nusing System.Runtime.CompilerServices;\n"); + sb.AppendLine("namespace StgSharp.Graphics.OpenGL"); + sb.AppendLine("{"); + sb.AppendLine(" public unsafe partial struct OpenglContext"); + sb.AppendLine(" {"); + foreach (GlCommand cmd in commands.OrderBy(c => c!.Name, StringComparer.Ordinal)) + { + string ret = CsTypeMapper.MapDelegateReturn(cmd.ReturnType, cmd.ReturnPointerLevel); + List paramTypes = new List(); + foreach (GlParam p in cmd.Parameters) + { + string mapped = CsTypeMapper.MapDelegateParameter(p); + paramTypes.Add(mapped); + } + string decl = DelegateSignature(ret, paramTypes); + sb.AppendLine($" internal unsafe {decl} {cmd.Name};"); + } + sb.AppendLine(" }"); + sb.AppendLine("}"); + + string fileName = Path.Combine(_outputRoot, $"glContext.v{version.Replace('.', '_')}.cs"); + File.WriteAllText(fileName, sb.ToString(), Encoding.UTF8); + } + + private void WriteMergedGlContextFile( + IReadOnlyList commands + ) + { + List distinct = commands.Where(c => !ShouldSkip(c.Name)) + .GroupBy(c => c.Name, StringComparer.Ordinal) + .Select(g => g.First()) + .OrderBy(c => c.Name, StringComparer.Ordinal) + .ToList(); + + StringBuilder sb = new StringBuilder(); + sb.AppendLine("// "); + sb.AppendLine($"// Generated by StgSharp.GenerateGL on {DateTime.UtcNow.ToString("u", CultureInfo.InvariantCulture)}"); + sb.AppendLine("// Aggregated GL3+ commands"); + sb.AppendLine("// "); + sb.AppendLine("using System;\nusing System.Runtime.CompilerServices;\n"); + sb.AppendLine("namespace StgSharp.Graphics.OpenGL"); + sb.AppendLine("{"); + sb.AppendLine(" public unsafe partial struct OpenglContext"); + sb.AppendLine(" {"); + foreach (GlCommand cmd in distinct) + { + string ret = CsTypeMapper.MapDelegateReturn(cmd.ReturnType, cmd.ReturnPointerLevel); + List paramTypes = new List(); + foreach (GlParam p in cmd.Parameters) + { + string mapped = CsTypeMapper.MapDelegateParameter(p); + paramTypes.Add(mapped); + } + string decl = DelegateSignature(ret, paramTypes); + sb.AppendLine($" internal unsafe {decl} {cmd.Name};"); + } + sb.AppendLine(" }"); + sb.AppendLine("}"); + + string fileName = Path.Combine(_outputRoot, "glContext.cs"); + File.WriteAllText(fileName, sb.ToString(), Encoding.UTF8); + } + + private void WriteOpenGLFunctionFile( + string version, + IReadOnlyList commands + ) + { + StringBuilder sb = new StringBuilder(); + sb.AppendLine("// "); + sb.AppendLine($"// Generated by StgSharp.GenerateGL on {DateTime.UtcNow.ToString("u", CultureInfo.InvariantCulture)}"); + sb.AppendLine($"// Version: {version}"); + sb.AppendLine("// "); + sb.AppendLine("using System;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\nusing StgSharp.Graphics.OpenGL;\n"); + sb.AppendLine("namespace StgSharp.Graphics.OpenGL"); + sb.AppendLine("{"); + sb.AppendLine(" public unsafe partial class OpenGLFunction"); + sb.AppendLine(" {"); + foreach (GlCommand cmd in commands.OrderBy(c => c!.Name, StringComparer.Ordinal)) + { + string ret = CsTypeMapper.MapReturn(cmd.ReturnType, cmd.ReturnPointerLevel); + string rawName = cmd.Name; // original glXxx + string methodName = TrimGlPrefix(rawName); + List paramList = new List(); + List callArgs = new List(); + List<(string Type,string Name)> pinned = new(); + foreach (GlParam p in cmd.Parameters) + { + string pname = SafeName(p.Name); + if (CsTypeMapper.TryMapConstPointerToSpan(p, out string spanElementType)) + { + paramList.Add($"ReadOnlySpan<{spanElementType}> {pname}"); + pinned.Add((spanElementType, pname)); + callArgs.Add($"{pname}Ptr"); + } else + { + string mapped = CsTypeMapper.MapParameter(p); + paramList.Add($"{mapped} {pname}"); + if (mapped == "GlHandle") + { + callArgs.Add($"{pname}.Value"); + } else + { + callArgs.Add(pname); + } + } + } + string signature = string.Join(", ", paramList); + string call = string.Join(", ", callArgs); + sb.AppendLine($" [MethodImpl(MethodImplOptions.AggressiveInlining)]"); + sb.AppendLine($" public {ret} {methodName}({signature})"); + sb.AppendLine(" {"); + string prefix = ret == "void" ? string.Empty : "return "; + if (pinned.Count == 0) + { + sb.AppendLine($" {prefix}Context.{rawName}({call});"); + } else + { + string indent = " "; + foreach ((string Type, string Name) pin in pinned) + { + sb.AppendLine($"{indent}fixed ({pin.Type}* {pin.Name}Ptr = {pin.Name})"); + sb.AppendLine($"{indent}{{"); + indent += " "; + } + sb.AppendLine($"{indent}{prefix}Context.{rawName}({call});"); + for (int i = 0; i < pinned.Count; i++) + { + indent = indent.Substring(0, indent.Length - 4); + sb.AppendLine($"{indent}}}"); + } + } + sb.AppendLine(" }"); + sb.AppendLine(); + } + sb.AppendLine(" }"); + sb.AppendLine("}"); + + string fileName = Path.Combine(_outputRoot, $"glFunction.v{version.Replace('.', '_')}.cs"); + File.WriteAllText(fileName, sb.ToString(), Encoding.UTF8); + } + + private enum CommandHistoryAction + { + + Added, + Removed + + } + + private readonly record struct CommandHistoryEntry( + string Version, + CommandHistoryAction Action + ); + + } +} diff --git a/StgSharp.GenerateGL/CodeGen/GlXmlParser.cs b/StgSharp.GenerateGL/CodeGen/GlXmlParser.cs index ba4962fc..899fe331 100644 --- a/StgSharp.GenerateGL/CodeGen/GlXmlParser.cs +++ b/StgSharp.GenerateGL/CodeGen/GlXmlParser.cs @@ -1,184 +1,184 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="GlXmlParser" -// 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.Xml.Linq; - -namespace GenerateGL.CodeGen -{ - internal static class GlXmlParser - { - - public static (IReadOnlyDictionary Commands, IReadOnlyList Features) Parse( - string xmlPath - ) - { - XDocument doc = XDocument.Load(xmlPath, LoadOptions.PreserveWhitespace); - Dictionary commands = ParseCommands(doc); - List features = ParseFeatures(doc); - return (commands, features); - } - - private static string BuildCType( - XElement element - ) - { - return BuildCType(element, out _, out _, out _); - } - - private static string BuildCType( - XElement element, - out int pointerLevel, - out bool isPointer, - out bool isConst - ) - { - // CType is usually text parts + - IEnumerable parts = element.Nodes() - .Select(n => n switch - { - XText t => t.Value, - XElement el when el.Name == "ptype" => el.Value, - _ => string.Empty - }); - string raw = string.Concat(parts).Trim(); - pointerLevel = raw.Count(ch => ch == '*'); - isPointer = pointerLevel > 0; - isConst = raw.Contains("const", StringComparison.OrdinalIgnoreCase); - string cleaned = raw.Replace("const", string.Empty, StringComparison.OrdinalIgnoreCase) - .Replace("*", string.Empty) - .Trim(); - return cleaned; - } - - private static Dictionary ParseCommands( - XDocument doc - ) - { - Dictionary dict = new Dictionary(StringComparer.Ordinal); - IEnumerable commandElements = doc.Root?.Element("commands")?.Elements("command") ?? - Enumerable.Empty(); - foreach (XElement cmd in commandElements) - { - XElement? proto = cmd.Element("proto"); - if (proto is null) - { - continue; - } - - string name = proto.Element("name")?.Value ?? string.Empty; - string returnType = BuildCType(proto, out int retPtrLevel, out _, - out bool retIsConst); - - List parameters = new List(); - foreach (XElement p in cmd.Elements("param")) - { - string pName = p.Element("name")?.Value ?? string.Empty; - string cType = BuildCType(p, out int pointerLevel, out _, out bool isConst); - parameters.Add(new GlParam(pName, cType, pointerLevel, isConst)); - } - - if (!string.IsNullOrEmpty(name)) { - dict[name] = new GlCommand(name, returnType, retPtrLevel, retIsConst, - parameters); - } - } - return dict; - } - - private static List ParseFeatures( - XDocument doc - ) - { - List list = new List(); - IEnumerable featureElements = doc.Root?.Elements("feature") ?? - Enumerable.Empty(); - foreach (XElement feature in featureElements) - { - string? api = feature.Attribute("api")?.Value; - if (!string.Equals(api, "gl", StringComparison.Ordinal)) - { - continue; - } - - string? profile = feature.Attribute("profile")?.Value; - - // Only core (or no profile for legacy) to stay aligned with core profile - if (!string.IsNullOrEmpty(profile) && - !string.Equals(profile, "core", StringComparison.Ordinal)) - { - continue; - } - - string version = feature.Attribute("number")?.Value ?? string.Empty; - List requires = new List(); - foreach (XElement req in feature.Elements("require")) - { - string? reqProfile = req.Attribute("profile")?.Value; - if (!string.IsNullOrEmpty(reqProfile) && - !string.Equals(reqProfile, "core", StringComparison.Ordinal)) - { - continue; - } - - foreach (XElement cmd in req.Elements("command")) - { - string? name = cmd.Attribute("name")?.Value; - if (!string.IsNullOrEmpty(name)) { - requires.Add(name); - } - } - } - - List removes = new List(); - foreach (XElement rem in feature.Elements("remove")) - { - string? remProfile = rem.Attribute("profile")?.Value; - if (!string.IsNullOrEmpty(remProfile) && - !string.Equals(remProfile, "core", StringComparison.Ordinal)) - { - continue; - } - - foreach (XElement cmd in rem.Elements("command")) - { - string? name = cmd.Attribute("name")?.Value; - if (!string.IsNullOrEmpty(name)) { - removes.Add(name); - } - } - } - - list.Add(new GlFeature(version, requires, removes)); - } - return list; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="GlXmlParser" +// 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.Xml.Linq; + +namespace GenerateGL.CodeGen +{ + internal static class GlXmlParser + { + + public static (IReadOnlyDictionary Commands, IReadOnlyList Features) Parse( + string xmlPath + ) + { + XDocument doc = XDocument.Load(xmlPath, LoadOptions.PreserveWhitespace); + Dictionary commands = ParseCommands(doc); + List features = ParseFeatures(doc); + return (commands, features); + } + + private static string BuildCType( + XElement element + ) + { + return BuildCType(element, out _, out _, out _); + } + + private static string BuildCType( + XElement element, + out int pointerLevel, + out bool isPointer, + out bool isConst + ) + { + // CType is usually text parts + + IEnumerable parts = element.Nodes() + .Select(n => n switch + { + XText t => t.Value, + XElement el when el.Name == "ptype" => el.Value, + _ => string.Empty + }); + string raw = string.Concat(parts).Trim(); + pointerLevel = raw.Count(ch => ch == '*'); + isPointer = pointerLevel > 0; + isConst = raw.Contains("const", StringComparison.OrdinalIgnoreCase); + string cleaned = raw.Replace("const", string.Empty, StringComparison.OrdinalIgnoreCase) + .Replace("*", string.Empty) + .Trim(); + return cleaned; + } + + private static Dictionary ParseCommands( + XDocument doc + ) + { + Dictionary dict = new Dictionary(StringComparer.Ordinal); + IEnumerable commandElements = doc.Root?.Element("commands")?.Elements("command") ?? + Enumerable.Empty(); + foreach (XElement cmd in commandElements) + { + XElement? proto = cmd.Element("proto"); + if (proto is null) + { + continue; + } + + string name = proto.Element("name")?.Value ?? string.Empty; + string returnType = BuildCType(proto, out int retPtrLevel, out _, + out bool retIsConst); + + List parameters = new List(); + foreach (XElement p in cmd.Elements("param")) + { + string pName = p.Element("name")?.Value ?? string.Empty; + string cType = BuildCType(p, out int pointerLevel, out _, out bool isConst); + parameters.Add(new GlParam(pName, cType, pointerLevel, isConst)); + } + + if (!string.IsNullOrEmpty(name)) { + dict[name] = new GlCommand(name, returnType, retPtrLevel, retIsConst, + parameters); + } + } + return dict; + } + + private static List ParseFeatures( + XDocument doc + ) + { + List list = new List(); + IEnumerable featureElements = doc.Root?.Elements("feature") ?? + Enumerable.Empty(); + foreach (XElement feature in featureElements) + { + string? api = feature.Attribute("api")?.Value; + if (!string.Equals(api, "gl", StringComparison.Ordinal)) + { + continue; + } + + string? profile = feature.Attribute("profile")?.Value; + + // Only core (or no profile for legacy) to stay aligned with core profile + if (!string.IsNullOrEmpty(profile) && + !string.Equals(profile, "core", StringComparison.Ordinal)) + { + continue; + } + + string version = feature.Attribute("number")?.Value ?? string.Empty; + List requires = new List(); + foreach (XElement req in feature.Elements("require")) + { + string? reqProfile = req.Attribute("profile")?.Value; + if (!string.IsNullOrEmpty(reqProfile) && + !string.Equals(reqProfile, "core", StringComparison.Ordinal)) + { + continue; + } + + foreach (XElement cmd in req.Elements("command")) + { + string? name = cmd.Attribute("name")?.Value; + if (!string.IsNullOrEmpty(name)) { + requires.Add(name); + } + } + } + + List removes = new List(); + foreach (XElement rem in feature.Elements("remove")) + { + string? remProfile = rem.Attribute("profile")?.Value; + if (!string.IsNullOrEmpty(remProfile) && + !string.Equals(remProfile, "core", StringComparison.Ordinal)) + { + continue; + } + + foreach (XElement cmd in rem.Elements("command")) + { + string? name = cmd.Attribute("name")?.Value; + if (!string.IsNullOrEmpty(name)) { + removes.Add(name); + } + } + } + + list.Add(new GlFeature(version, requires, removes)); + } + return list; + } + + } +} diff --git a/StgSharp.GenerateGL/CodeGen/Models.cs b/StgSharp.GenerateGL/CodeGen/Models.cs index aa237681..7eb73b34 100644 --- a/StgSharp.GenerateGL/CodeGen/Models.cs +++ b/StgSharp.GenerateGL/CodeGen/Models.cs @@ -1,57 +1,57 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="Models" -// 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 GenerateGL.CodeGen -{ - internal sealed record GlCommand( - string Name, - string ReturnType, - int ReturnPointerLevel, - bool ReturnIsConst, - IReadOnlyList Parameters - ); - - internal sealed record GlParam( - string Name, - string CType, - int PointerLevel, - bool IsConst - ) - { - - public bool IsPointer => PointerLevel > 0; - - } - - internal sealed record GlFeature( - string Version, - IReadOnlyList RequiresCommands, - IReadOnlyList RemovedCommands - ); -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="Models" +// 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 GenerateGL.CodeGen +{ + internal sealed record GlCommand( + string Name, + string ReturnType, + int ReturnPointerLevel, + bool ReturnIsConst, + IReadOnlyList Parameters + ); + + internal sealed record GlParam( + string Name, + string CType, + int PointerLevel, + bool IsConst + ) + { + + public bool IsPointer => PointerLevel > 0; + + } + + internal sealed record GlFeature( + string Version, + IReadOnlyList RequiresCommands, + IReadOnlyList RemovedCommands + ); +} diff --git a/StgSharp.GenerateGL/Docs/SourceGenerator.md b/StgSharp.GenerateGL/Docs/SourceGenerator.md index 010d58a6..73a8b26f 100644 --- a/StgSharp.GenerateGL/Docs/SourceGenerator.md +++ b/StgSharp.GenerateGL/Docs/SourceGenerator.md @@ -1,71 +1,71 @@ -# StgSharp.GenerateGL 源生成器技术文档 - -## 目标与范围 -- **输入**:Khronos OpenGL Registry `gl.xml`(Core Profile 为主,版本 3.3→4.6,可选扩展)。 -- **输出**:分版本 partial `glContext`(`delegate*` 字段)与 `OpenGLFunction` 包装方法(调用 `Context.glXxx`),以及新增常量/枚举补全文件,写入 `StgSharp.Common\Graphics\OpenGL\Generated\`。不改动现有手写文件。 -- **风格**:保持现有函数指针字段 + 薄封装方法模式;兼容现有命名和类型定义(如 `GlHandle`)。 - ---- - -## 阶段 1:输入解析(XML 读取与过滤) -- 将 `gl.xml` 作为 AdditionalFile 或 EmbeddedResource,使用 `XmlReader` 流式解析。 -- 解析节点: - - ``:函数名、返回类型、参数。 - - ``:常量。 - - ``:按 `version` 收录命令/常量。 - - ``:可选扩展(ARB/KHR/EXT/NV)。 -- 过滤策略:仅 Core Profile 且版本 ≥ 3.3(3.3→4.6 递进);扩展按启用列表追加。 - ---- - -## 阶段 2:类型映射与句柄规则 -- 整数:`GLenum`/`GLbitfield`→`uint`;`GLint`/`GLsizei`/`GLfixed`→`int`;`GLuint`→`uint`;`GLboolean`→`byte`(包装层可 bool→byte)。 -- 浮点:`GLfloat`→`float`;`GLdouble`→`double`。 -- 指针与尺寸:`void*`/`const void*`→`void*`;`GLintptr`→`nint`/`IntPtr`;`GLsizeiptr`/`size_t`→`nuint`/`UIntPtr`;`GLsync`→现有 `GLsync`/`IntPtr` 包装。 -- 字符串:`const GLchar*`→`byte*`(UTF-8),包装层可另行提供 string/Span 重载。 -- 调用约定:OpenGL APIENTRY 通常 stdcall(Windows);保持与现有 `glContext` 字段一致(`delegate* unmanaged[Stdcall]` 或 `unmanaged[Cdecl]`,需与 loader 对齐)。 -- 句柄识别:包含 program/shader/buffer/texture/framebuffer/renderbuffer/vertexarray/query/sampler/transformfeedback 等对象名的 `GLuint` 参数 → 包装层使用 `GlHandle`,内部传 `handle.Value`。 -- glGet* 输出:保留指针签名,或另行生成 unsafe Span/stackalloc 适配器;核心先生成指针版。 - ---- - -## 阶段 3:版本分组与文件组织 -- 输出目录:`StgSharp.Common\Graphics\OpenGL\Generated\` -- 每个版本生成独立 partial: - - `glContext.v33.cs`, `glContext.v40.cs`, …, `glContext.v46.cs`:`delegate*` 字段。 - - `OpenGLFunction.v33.cs`, …:包装方法 `public void Foo(...) => Context.glFoo(...);` -- 常量/枚举:`glConst.generated.cs`(或分版本补丁),避免与现有重复,先查已有定义再生成。 -- 命名空间:`StgSharp.Graphics.OpenGL`;类声明:`partial struct/partial class glContext`(按现有定义),`partial class OpenGLFunction`。 - ---- - -## 阶段 4:生成规则(函数表与包装) -- `glContext` 字段:`internal unsafe delegate* glFoo;` -- `OpenGLFunction` 包装:薄封装直接转发;句柄参数用 `GlHandle`,内部传 `handle.Value`;`bool` 参数按底层 `GLboolean` 需要转换为 `byte/uint`。 -- 去重:若同名字段/方法已存在,跳过或比对签名避免重复生成。 - ---- - -## 阶段 5:增量源生成器结构 -- 步骤: - 1. 收集 AdditionalFiles(`gl.xml`)。 - 2. 解析→建模(CommandModel, EnumModel, FeatureModel)。 - 3. 按版本/profile 过滤。 - 4. Emit:分文件输出(`SourceProductionContext.AddSource`)。 -- 配置建议:`LangVersion=preview`(支持 `delegate* unmanaged[Stdcall]`);仅引用必要的 XML 解析库。 - ---- - -## 阶段 6:兼容性与发布注意 -- 不改动现有手写文件,仅追加 partial。 -- 常量值需与现有 `glConst` 保持一致,生成前检查重复。 -- 大 `gl.xml` 使用流式解析避免内存压力。 -- Loader(`wglGetProcAddress/glXGetProcAddress/eglGetProcAddress`)不在本轮生成,字段调用约定需与 loader 对齐。 - ---- - -## 下一步实施建议 -1. 将 `gl.xml` 添加为 AdditionalFile。 -2. 搭建增量生成器骨架:Parse → Filter → Emit。 -3. 先生成 3.3 子集验证编译,再扩展到 4.6。 -4. 按需追加扩展(ARB/KHR),保持可配置启用列表。 +# StgSharp.GenerateGL 源生成器技术文档 + +## 目标与范围 +- **输入**:Khronos OpenGL Registry `gl.xml`(Core Profile 为主,版本 3.3→4.6,可选扩展)。 +- **输出**:分版本 partial `glContext`(`delegate*` 字段)与 `OpenGLFunction` 包装方法(调用 `Context.glXxx`),以及新增常量/枚举补全文件,写入 `StgSharp.Common\Graphics\OpenGL\Generated\`。不改动现有手写文件。 +- **风格**:保持现有函数指针字段 + 薄封装方法模式;兼容现有命名和类型定义(如 `GlHandle`)。 + +--- + +## 阶段 1:输入解析(XML 读取与过滤) +- 将 `gl.xml` 作为 AdditionalFile 或 EmbeddedResource,使用 `XmlReader` 流式解析。 +- 解析节点: + - ``:函数名、返回类型、参数。 + - ``:常量。 + - ``:按 `version` 收录命令/常量。 + - ``:可选扩展(ARB/KHR/EXT/NV)。 +- 过滤策略:仅 Core Profile 且版本 ≥ 3.3(3.3→4.6 递进);扩展按启用列表追加。 + +--- + +## 阶段 2:类型映射与句柄规则 +- 整数:`GLenum`/`GLbitfield`→`uint`;`GLint`/`GLsizei`/`GLfixed`→`int`;`GLuint`→`uint`;`GLboolean`→`byte`(包装层可 bool→byte)。 +- 浮点:`GLfloat`→`float`;`GLdouble`→`double`。 +- 指针与尺寸:`void*`/`const void*`→`void*`;`GLintptr`→`nint`/`IntPtr`;`GLsizeiptr`/`size_t`→`nuint`/`UIntPtr`;`GLsync`→现有 `GLsync`/`IntPtr` 包装。 +- 字符串:`const GLchar*`→`byte*`(UTF-8),包装层可另行提供 string/Span 重载。 +- 调用约定:OpenGL APIENTRY 通常 stdcall(Windows);保持与现有 `glContext` 字段一致(`delegate* unmanaged[Stdcall]` 或 `unmanaged[Cdecl]`,需与 loader 对齐)。 +- 句柄识别:包含 program/shader/buffer/texture/framebuffer/renderbuffer/vertexarray/query/sampler/transformfeedback 等对象名的 `GLuint` 参数 → 包装层使用 `GlHandle`,内部传 `handle.Value`。 +- glGet* 输出:保留指针签名,或另行生成 unsafe Span/stackalloc 适配器;核心先生成指针版。 + +--- + +## 阶段 3:版本分组与文件组织 +- 输出目录:`StgSharp.Common\Graphics\OpenGL\Generated\` +- 每个版本生成独立 partial: + - `glContext.v33.cs`, `glContext.v40.cs`, …, `glContext.v46.cs`:`delegate*` 字段。 + - `OpenGLFunction.v33.cs`, …:包装方法 `public void Foo(...) => Context.glFoo(...);` +- 常量/枚举:`glConst.generated.cs`(或分版本补丁),避免与现有重复,先查已有定义再生成。 +- 命名空间:`StgSharp.Graphics.OpenGL`;类声明:`partial struct/partial class glContext`(按现有定义),`partial class OpenGLFunction`。 + +--- + +## 阶段 4:生成规则(函数表与包装) +- `glContext` 字段:`internal unsafe delegate* glFoo;` +- `OpenGLFunction` 包装:薄封装直接转发;句柄参数用 `GlHandle`,内部传 `handle.Value`;`bool` 参数按底层 `GLboolean` 需要转换为 `byte/uint`。 +- 去重:若同名字段/方法已存在,跳过或比对签名避免重复生成。 + +--- + +## 阶段 5:增量源生成器结构 +- 步骤: + 1. 收集 AdditionalFiles(`gl.xml`)。 + 2. 解析→建模(CommandModel, EnumModel, FeatureModel)。 + 3. 按版本/profile 过滤。 + 4. Emit:分文件输出(`SourceProductionContext.AddSource`)。 +- 配置建议:`LangVersion=preview`(支持 `delegate* unmanaged[Stdcall]`);仅引用必要的 XML 解析库。 + +--- + +## 阶段 6:兼容性与发布注意 +- 不改动现有手写文件,仅追加 partial。 +- 常量值需与现有 `glConst` 保持一致,生成前检查重复。 +- 大 `gl.xml` 使用流式解析避免内存压力。 +- Loader(`wglGetProcAddress/glXGetProcAddress/eglGetProcAddress`)不在本轮生成,字段调用约定需与 loader 对齐。 + +--- + +## 下一步实施建议 +1. 将 `gl.xml` 添加为 AdditionalFile。 +2. 搭建增量生成器骨架:Parse → Filter → Emit。 +3. 先生成 3.3 子集验证编译,再扩展到 4.6。 +4. 按需追加扩展(ARB/KHR),保持可配置启用列表。 diff --git a/StgSharp.GenerateGL/GenerateGL.csproj b/StgSharp.GenerateGL/GenerateGL.csproj index 90481bd0..fbd77c60 100644 --- a/StgSharp.GenerateGL/GenerateGL.csproj +++ b/StgSharp.GenerateGL/GenerateGL.csproj @@ -1,65 +1,65 @@ - - - - Exe - net8.0 - enable - enable - AnyCPU;x64 - - - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - - + + + + Exe + net8.0 + enable + enable + AnyCPU;x64 + + + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + + diff --git a/StgSharp.GenerateGL/Program.cs b/StgSharp.GenerateGL/Program.cs index f7cd92f2..75a7db4d 100644 --- a/StgSharp.GenerateGL/Program.cs +++ b/StgSharp.GenerateGL/Program.cs @@ -1,56 +1,56 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="Program" -// 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 GenerateGL.CodeGen; -using System; -using System.IO; - -namespace GenerateGL -{ - internal class Program - { - - private static void Main( - string[] args - ) - { - string baseDir = AppContext.BaseDirectory; - string xmlPath = Path.GetFullPath(Path.Combine(baseDir, "xml", "gl.xml")); - string outputRoot = Path.GetFullPath(Path.Combine(baseDir, "Generated")); - - Console.WriteLine($"[GenerateGL] Loading registry: {xmlPath}"); - var (commands, features) = GlXmlParser.Parse(xmlPath); - Console.WriteLine($"[GenerateGL] Commands: {commands.Count}, Features: {features.Count}"); - - Generator generator = new Generator(commands, features, outputRoot); - generator.Run(); - - Console.WriteLine($"[GenerateGL] Generated files under: {outputRoot}"); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="Program" +// 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 GenerateGL.CodeGen; +using System; +using System.IO; + +namespace GenerateGL +{ + internal class Program + { + + private static void Main( + string[] args + ) + { + string baseDir = AppContext.BaseDirectory; + string xmlPath = Path.GetFullPath(Path.Combine(baseDir, "xml", "gl.xml")); + string outputRoot = Path.GetFullPath(Path.Combine(baseDir, "Generated")); + + Console.WriteLine($"[GenerateGL] Loading registry: {xmlPath}"); + var (commands, features) = GlXmlParser.Parse(xmlPath); + Console.WriteLine($"[GenerateGL] Commands: {commands.Count}, Features: {features.Count}"); + + Generator generator = new Generator(commands, features, outputRoot); + generator.Run(); + + Console.WriteLine($"[GenerateGL] Generated files under: {outputRoot}"); + } + + } +} diff --git a/StgSharp.GenerateGL/gl.h b/StgSharp.GenerateGL/gl.h index 3374874a..4af0d336 100644 --- a/StgSharp.GenerateGL/gl.h +++ b/StgSharp.GenerateGL/gl.h @@ -1,4248 +1,4248 @@ -/** - * Loader generated by glad 2.0.8 on Tue Dec 30 01:23:04 2025 - * - * SPDX-License-Identifier: (WTFPL OR CC0-1.0) AND Apache-2.0 - * - * Generator: C/C++ - * Specification: gl - * Extensions: 0 - * - * APIs: - * - gl:core=4.6 - * - * Options: - * - ALIAS = False - * - DEBUG = False - * - HEADER_ONLY = True - * - LOADER = False - * - MX = True - * - ON_DEMAND = False - * - * Commandline: - * --api='gl:core=4.6' --extensions='' c --header-only --mx - * - * Online: - * http://glad.sh/#api=gl%3Acore%3D4.6&extensions=&generator=c&options=HEADER_ONLY%2CMX - * - */ - -#ifndef GLAD_GL_H_ -#define GLAD_GL_H_ - -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wreserved-id-macro" -#endif -#ifdef __gl_h_ - #error OpenGL (gl.h) header already included (API: gl), remove previous include! -#endif -#define __gl_h_ 1 -#ifdef __gl3_h_ - #error OpenGL (gl3.h) header already included (API: gl), remove previous include! -#endif -#define __gl3_h_ 1 -#ifdef __glext_h_ - #error OpenGL (glext.h) header already included (API: gl), remove previous include! -#endif -#define __glext_h_ 1 -#ifdef __gl3ext_h_ - #error OpenGL (gl3ext.h) header already included (API: gl), remove previous include! -#endif -#define __gl3ext_h_ 1 -#ifdef __clang__ -#pragma clang diagnostic pop -#endif - -#define GLAD_GL -#define GLAD_OPTION_GL_HEADER_ONLY -#define GLAD_OPTION_GL_MX - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef GLAD_PLATFORM_H_ -#define GLAD_PLATFORM_H_ - -#ifndef GLAD_PLATFORM_WIN32 - #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__) - #define GLAD_PLATFORM_WIN32 1 - #else - #define GLAD_PLATFORM_WIN32 0 - #endif -#endif - -#ifndef GLAD_PLATFORM_APPLE - #ifdef __APPLE__ - #define GLAD_PLATFORM_APPLE 1 - #else - #define GLAD_PLATFORM_APPLE 0 - #endif -#endif - -#ifndef GLAD_PLATFORM_EMSCRIPTEN - #ifdef __EMSCRIPTEN__ - #define GLAD_PLATFORM_EMSCRIPTEN 1 - #else - #define GLAD_PLATFORM_EMSCRIPTEN 0 - #endif -#endif - -#ifndef GLAD_PLATFORM_UWP - #if defined(_MSC_VER) && !defined(GLAD_INTERNAL_HAVE_WINAPIFAMILY) - #ifdef __has_include - #if __has_include() - #define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1 - #endif - #elif _MSC_VER >= 1700 && !_USING_V110_SDK71_ - #define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1 - #endif - #endif - - #ifdef GLAD_INTERNAL_HAVE_WINAPIFAMILY - #include - #if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) - #define GLAD_PLATFORM_UWP 1 - #endif - #endif - - #ifndef GLAD_PLATFORM_UWP - #define GLAD_PLATFORM_UWP 0 - #endif -#endif - -#ifdef __GNUC__ - #define GLAD_GNUC_EXTENSION __extension__ -#else - #define GLAD_GNUC_EXTENSION -#endif - -#define GLAD_UNUSED(x) (void)(x) - -#ifndef GLAD_API_CALL - #if defined(GLAD_API_CALL_EXPORT) - #if GLAD_PLATFORM_WIN32 || defined(__CYGWIN__) - #if defined(GLAD_API_CALL_EXPORT_BUILD) - #if defined(__GNUC__) - #define GLAD_API_CALL __attribute__ ((dllexport)) extern - #else - #define GLAD_API_CALL __declspec(dllexport) extern - #endif - #else - #if defined(__GNUC__) - #define GLAD_API_CALL __attribute__ ((dllimport)) extern - #else - #define GLAD_API_CALL __declspec(dllimport) extern - #endif - #endif - #elif defined(__GNUC__) && defined(GLAD_API_CALL_EXPORT_BUILD) - #define GLAD_API_CALL __attribute__ ((visibility ("default"))) extern - #else - #define GLAD_API_CALL extern - #endif - #else - #define GLAD_API_CALL extern - #endif -#endif - -#ifdef APIENTRY - #define GLAD_API_PTR APIENTRY -#elif GLAD_PLATFORM_WIN32 - #define GLAD_API_PTR __stdcall -#else - #define GLAD_API_PTR -#endif - -#ifndef GLAPI -#define GLAPI GLAD_API_CALL -#endif - -#ifndef GLAPIENTRY -#define GLAPIENTRY GLAD_API_PTR -#endif - -#define GLAD_MAKE_VERSION(major, minor) (major * 10000 + minor) -#define GLAD_VERSION_MAJOR(version) (version / 10000) -#define GLAD_VERSION_MINOR(version) (version % 10000) - -#define GLAD_GENERATOR_VERSION "2.0.8" - -typedef void (*GLADapiproc)(void); - -typedef GLADapiproc (*GLADloadfunc)(const char *name); -typedef GLADapiproc (*GLADuserptrloadfunc)(void *userptr, const char *name); - -typedef void (*GLADprecallback)(const char *name, GLADapiproc apiproc, int len_args, ...); -typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apiproc, int len_args, ...); - -#endif /* GLAD_PLATFORM_H_ */ - -#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9 -#define GL_ACTIVE_ATTRIBUTES 0x8B89 -#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A -#define GL_ACTIVE_PROGRAM 0x8259 -#define GL_ACTIVE_RESOURCES 0x92F5 -#define GL_ACTIVE_SUBROUTINES 0x8DE5 -#define GL_ACTIVE_SUBROUTINE_MAX_LENGTH 0x8E48 -#define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6 -#define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47 -#define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49 -#define GL_ACTIVE_TEXTURE 0x84E0 -#define GL_ACTIVE_UNIFORMS 0x8B86 -#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 -#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 -#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 -#define GL_ACTIVE_VARIABLES 0x9305 -#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E -#define GL_ALL_BARRIER_BITS 0xFFFFFFFF -#define GL_ALL_SHADER_BITS 0xFFFFFFFF -#define GL_ALPHA 0x1906 -#define GL_ALREADY_SIGNALED 0x911A -#define GL_ALWAYS 0x0207 -#define GL_AND 0x1501 -#define GL_AND_INVERTED 0x1504 -#define GL_AND_REVERSE 0x1502 -#define GL_ANY_SAMPLES_PASSED 0x8C2F -#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A -#define GL_ARRAY_BUFFER 0x8892 -#define GL_ARRAY_BUFFER_BINDING 0x8894 -#define GL_ARRAY_SIZE 0x92FB -#define GL_ARRAY_STRIDE 0x92FE -#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000 -#define GL_ATOMIC_COUNTER_BUFFER 0x92C0 -#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5 -#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6 -#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1 -#define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4 -#define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7 -#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3 -#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2 -#define GL_ATTACHED_SHADERS 0x8B85 -#define GL_AUTO_GENERATE_MIPMAP 0x8295 -#define GL_BACK 0x0405 -#define GL_BACK_LEFT 0x0402 -#define GL_BACK_RIGHT 0x0403 -#define GL_BGR 0x80E0 -#define GL_BGRA 0x80E1 -#define GL_BGRA_INTEGER 0x8D9B -#define GL_BGR_INTEGER 0x8D9A -#define GL_BLEND 0x0BE2 -#define GL_BLEND_COLOR 0x8005 -#define GL_BLEND_DST 0x0BE0 -#define GL_BLEND_DST_ALPHA 0x80CA -#define GL_BLEND_DST_RGB 0x80C8 -#define GL_BLEND_EQUATION 0x8009 -#define GL_BLEND_EQUATION_ALPHA 0x883D -#define GL_BLEND_EQUATION_RGB 0x8009 -#define GL_BLEND_SRC 0x0BE1 -#define GL_BLEND_SRC_ALPHA 0x80CB -#define GL_BLEND_SRC_RGB 0x80C9 -#define GL_BLOCK_INDEX 0x92FD -#define GL_BLUE 0x1905 -#define GL_BLUE_INTEGER 0x8D96 -#define GL_BOOL 0x8B56 -#define GL_BOOL_VEC2 0x8B57 -#define GL_BOOL_VEC3 0x8B58 -#define GL_BOOL_VEC4 0x8B59 -#define GL_BUFFER 0x82E0 -#define GL_BUFFER_ACCESS 0x88BB -#define GL_BUFFER_ACCESS_FLAGS 0x911F -#define GL_BUFFER_BINDING 0x9302 -#define GL_BUFFER_DATA_SIZE 0x9303 -#define GL_BUFFER_IMMUTABLE_STORAGE 0x821F -#define GL_BUFFER_MAPPED 0x88BC -#define GL_BUFFER_MAP_LENGTH 0x9120 -#define GL_BUFFER_MAP_OFFSET 0x9121 -#define GL_BUFFER_MAP_POINTER 0x88BD -#define GL_BUFFER_SIZE 0x8764 -#define GL_BUFFER_STORAGE_FLAGS 0x8220 -#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200 -#define GL_BUFFER_USAGE 0x8765 -#define GL_BUFFER_VARIABLE 0x92E5 -#define GL_BYTE 0x1400 -#define GL_CAVEAT_SUPPORT 0x82B8 -#define GL_CCW 0x0901 -#define GL_CLAMP_READ_COLOR 0x891C -#define GL_CLAMP_TO_BORDER 0x812D -#define GL_CLAMP_TO_EDGE 0x812F -#define GL_CLEAR 0x1500 -#define GL_CLEAR_BUFFER 0x82B4 -#define GL_CLEAR_TEXTURE 0x9365 -#define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT 0x00004000 -#define GL_CLIENT_STORAGE_BIT 0x0200 -#define GL_CLIPPING_INPUT_PRIMITIVES 0x82F6 -#define GL_CLIPPING_OUTPUT_PRIMITIVES 0x82F7 -#define GL_CLIP_DEPTH_MODE 0x935D -#define GL_CLIP_DISTANCE0 0x3000 -#define GL_CLIP_DISTANCE1 0x3001 -#define GL_CLIP_DISTANCE2 0x3002 -#define GL_CLIP_DISTANCE3 0x3003 -#define GL_CLIP_DISTANCE4 0x3004 -#define GL_CLIP_DISTANCE5 0x3005 -#define GL_CLIP_DISTANCE6 0x3006 -#define GL_CLIP_DISTANCE7 0x3007 -#define GL_CLIP_ORIGIN 0x935C -#define GL_COLOR 0x1800 -#define GL_COLOR_ATTACHMENT0 0x8CE0 -#define GL_COLOR_ATTACHMENT1 0x8CE1 -#define GL_COLOR_ATTACHMENT10 0x8CEA -#define GL_COLOR_ATTACHMENT11 0x8CEB -#define GL_COLOR_ATTACHMENT12 0x8CEC -#define GL_COLOR_ATTACHMENT13 0x8CED -#define GL_COLOR_ATTACHMENT14 0x8CEE -#define GL_COLOR_ATTACHMENT15 0x8CEF -#define GL_COLOR_ATTACHMENT16 0x8CF0 -#define GL_COLOR_ATTACHMENT17 0x8CF1 -#define GL_COLOR_ATTACHMENT18 0x8CF2 -#define GL_COLOR_ATTACHMENT19 0x8CF3 -#define GL_COLOR_ATTACHMENT2 0x8CE2 -#define GL_COLOR_ATTACHMENT20 0x8CF4 -#define GL_COLOR_ATTACHMENT21 0x8CF5 -#define GL_COLOR_ATTACHMENT22 0x8CF6 -#define GL_COLOR_ATTACHMENT23 0x8CF7 -#define GL_COLOR_ATTACHMENT24 0x8CF8 -#define GL_COLOR_ATTACHMENT25 0x8CF9 -#define GL_COLOR_ATTACHMENT26 0x8CFA -#define GL_COLOR_ATTACHMENT27 0x8CFB -#define GL_COLOR_ATTACHMENT28 0x8CFC -#define GL_COLOR_ATTACHMENT29 0x8CFD -#define GL_COLOR_ATTACHMENT3 0x8CE3 -#define GL_COLOR_ATTACHMENT30 0x8CFE -#define GL_COLOR_ATTACHMENT31 0x8CFF -#define GL_COLOR_ATTACHMENT4 0x8CE4 -#define GL_COLOR_ATTACHMENT5 0x8CE5 -#define GL_COLOR_ATTACHMENT6 0x8CE6 -#define GL_COLOR_ATTACHMENT7 0x8CE7 -#define GL_COLOR_ATTACHMENT8 0x8CE8 -#define GL_COLOR_ATTACHMENT9 0x8CE9 -#define GL_COLOR_BUFFER_BIT 0x00004000 -#define GL_COLOR_CLEAR_VALUE 0x0C22 -#define GL_COLOR_COMPONENTS 0x8283 -#define GL_COLOR_ENCODING 0x8296 -#define GL_COLOR_LOGIC_OP 0x0BF2 -#define GL_COLOR_RENDERABLE 0x8286 -#define GL_COLOR_WRITEMASK 0x0C23 -#define GL_COMMAND_BARRIER_BIT 0x00000040 -#define GL_COMPARE_REF_TO_TEXTURE 0x884E -#define GL_COMPATIBLE_SUBROUTINES 0x8E4B -#define GL_COMPILE_STATUS 0x8B81 -#define GL_COMPRESSED_R11_EAC 0x9270 -#define GL_COMPRESSED_RED 0x8225 -#define GL_COMPRESSED_RED_RGTC1 0x8DBB -#define GL_COMPRESSED_RG 0x8226 -#define GL_COMPRESSED_RG11_EAC 0x9272 -#define GL_COMPRESSED_RGB 0x84ED -#define GL_COMPRESSED_RGB8_ETC2 0x9274 -#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 -#define GL_COMPRESSED_RGBA 0x84EE -#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 -#define GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C -#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E -#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F -#define GL_COMPRESSED_RG_RGTC2 0x8DBD -#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 -#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC -#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 -#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE -#define GL_COMPRESSED_SRGB 0x8C48 -#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 -#define GL_COMPRESSED_SRGB8_ETC2 0x9275 -#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 -#define GL_COMPRESSED_SRGB_ALPHA 0x8C49 -#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D -#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 -#define GL_COMPUTE_SHADER 0x91B9 -#define GL_COMPUTE_SHADER_BIT 0x00000020 -#define GL_COMPUTE_SHADER_INVOCATIONS 0x82F5 -#define GL_COMPUTE_SUBROUTINE 0x92ED -#define GL_COMPUTE_SUBROUTINE_UNIFORM 0x92F3 -#define GL_COMPUTE_TEXTURE 0x82A0 -#define GL_COMPUTE_WORK_GROUP_SIZE 0x8267 -#define GL_CONDITION_SATISFIED 0x911C -#define GL_CONSTANT_ALPHA 0x8003 -#define GL_CONSTANT_COLOR 0x8001 -#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002 -#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001 -#define GL_CONTEXT_FLAGS 0x821E -#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002 -#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001 -#define GL_CONTEXT_FLAG_NO_ERROR_BIT 0x00000008 -#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT 0x00000004 -#define GL_CONTEXT_LOST 0x0507 -#define GL_CONTEXT_PROFILE_MASK 0x9126 -#define GL_CONTEXT_RELEASE_BEHAVIOR 0x82FB -#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82FC -#define GL_COPY 0x1503 -#define GL_COPY_INVERTED 0x150C -#define GL_COPY_READ_BUFFER 0x8F36 -#define GL_COPY_READ_BUFFER_BINDING 0x8F36 -#define GL_COPY_WRITE_BUFFER 0x8F37 -#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 -#define GL_CULL_FACE 0x0B44 -#define GL_CULL_FACE_MODE 0x0B45 -#define GL_CURRENT_PROGRAM 0x8B8D -#define GL_CURRENT_QUERY 0x8865 -#define GL_CURRENT_VERTEX_ATTRIB 0x8626 -#define GL_CW 0x0900 -#define GL_DEBUG_CALLBACK_FUNCTION 0x8244 -#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245 -#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D -#define GL_DEBUG_LOGGED_MESSAGES 0x9145 -#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243 -#define GL_DEBUG_OUTPUT 0x92E0 -#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242 -#define GL_DEBUG_SEVERITY_HIGH 0x9146 -#define GL_DEBUG_SEVERITY_LOW 0x9148 -#define GL_DEBUG_SEVERITY_MEDIUM 0x9147 -#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B -#define GL_DEBUG_SOURCE_API 0x8246 -#define GL_DEBUG_SOURCE_APPLICATION 0x824A -#define GL_DEBUG_SOURCE_OTHER 0x824B -#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248 -#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249 -#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247 -#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D -#define GL_DEBUG_TYPE_ERROR 0x824C -#define GL_DEBUG_TYPE_MARKER 0x8268 -#define GL_DEBUG_TYPE_OTHER 0x8251 -#define GL_DEBUG_TYPE_PERFORMANCE 0x8250 -#define GL_DEBUG_TYPE_POP_GROUP 0x826A -#define GL_DEBUG_TYPE_PORTABILITY 0x824F -#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269 -#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E -#define GL_DECR 0x1E03 -#define GL_DECR_WRAP 0x8508 -#define GL_DELETE_STATUS 0x8B80 -#define GL_DEPTH 0x1801 -#define GL_DEPTH24_STENCIL8 0x88F0 -#define GL_DEPTH32F_STENCIL8 0x8CAD -#define GL_DEPTH_ATTACHMENT 0x8D00 -#define GL_DEPTH_BUFFER_BIT 0x00000100 -#define GL_DEPTH_CLAMP 0x864F -#define GL_DEPTH_CLEAR_VALUE 0x0B73 -#define GL_DEPTH_COMPONENT 0x1902 -#define GL_DEPTH_COMPONENT16 0x81A5 -#define GL_DEPTH_COMPONENT24 0x81A6 -#define GL_DEPTH_COMPONENT32 0x81A7 -#define GL_DEPTH_COMPONENT32F 0x8CAC -#define GL_DEPTH_COMPONENTS 0x8284 -#define GL_DEPTH_FUNC 0x0B74 -#define GL_DEPTH_RANGE 0x0B70 -#define GL_DEPTH_RENDERABLE 0x8287 -#define GL_DEPTH_STENCIL 0x84F9 -#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A -#define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA -#define GL_DEPTH_TEST 0x0B71 -#define GL_DEPTH_WRITEMASK 0x0B72 -#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE -#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF -#define GL_DITHER 0x0BD0 -#define GL_DONT_CARE 0x1100 -#define GL_DOUBLE 0x140A -#define GL_DOUBLEBUFFER 0x0C32 -#define GL_DOUBLE_MAT2 0x8F46 -#define GL_DOUBLE_MAT2x3 0x8F49 -#define GL_DOUBLE_MAT2x4 0x8F4A -#define GL_DOUBLE_MAT3 0x8F47 -#define GL_DOUBLE_MAT3x2 0x8F4B -#define GL_DOUBLE_MAT3x4 0x8F4C -#define GL_DOUBLE_MAT4 0x8F48 -#define GL_DOUBLE_MAT4x2 0x8F4D -#define GL_DOUBLE_MAT4x3 0x8F4E -#define GL_DOUBLE_VEC2 0x8FFC -#define GL_DOUBLE_VEC3 0x8FFD -#define GL_DOUBLE_VEC4 0x8FFE -#define GL_DRAW_BUFFER 0x0C01 -#define GL_DRAW_BUFFER0 0x8825 -#define GL_DRAW_BUFFER1 0x8826 -#define GL_DRAW_BUFFER10 0x882F -#define GL_DRAW_BUFFER11 0x8830 -#define GL_DRAW_BUFFER12 0x8831 -#define GL_DRAW_BUFFER13 0x8832 -#define GL_DRAW_BUFFER14 0x8833 -#define GL_DRAW_BUFFER15 0x8834 -#define GL_DRAW_BUFFER2 0x8827 -#define GL_DRAW_BUFFER3 0x8828 -#define GL_DRAW_BUFFER4 0x8829 -#define GL_DRAW_BUFFER5 0x882A -#define GL_DRAW_BUFFER6 0x882B -#define GL_DRAW_BUFFER7 0x882C -#define GL_DRAW_BUFFER8 0x882D -#define GL_DRAW_BUFFER9 0x882E -#define GL_DRAW_FRAMEBUFFER 0x8CA9 -#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_DRAW_INDIRECT_BUFFER 0x8F3F -#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43 -#define GL_DST_ALPHA 0x0304 -#define GL_DST_COLOR 0x0306 -#define GL_DYNAMIC_COPY 0x88EA -#define GL_DYNAMIC_DRAW 0x88E8 -#define GL_DYNAMIC_READ 0x88E9 -#define GL_DYNAMIC_STORAGE_BIT 0x0100 -#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002 -#define GL_ELEMENT_ARRAY_BUFFER 0x8893 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 -#define GL_EQUAL 0x0202 -#define GL_EQUIV 0x1509 -#define GL_EXTENSIONS 0x1F03 -#define GL_FALSE 0 -#define GL_FASTEST 0x1101 -#define GL_FILL 0x1B02 -#define GL_FILTER 0x829A -#define GL_FIRST_VERTEX_CONVENTION 0x8E4D -#define GL_FIXED 0x140C -#define GL_FIXED_ONLY 0x891D -#define GL_FLOAT 0x1406 -#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD -#define GL_FLOAT_MAT2 0x8B5A -#define GL_FLOAT_MAT2x3 0x8B65 -#define GL_FLOAT_MAT2x4 0x8B66 -#define GL_FLOAT_MAT3 0x8B5B -#define GL_FLOAT_MAT3x2 0x8B67 -#define GL_FLOAT_MAT3x4 0x8B68 -#define GL_FLOAT_MAT4 0x8B5C -#define GL_FLOAT_MAT4x2 0x8B69 -#define GL_FLOAT_MAT4x3 0x8B6A -#define GL_FLOAT_VEC2 0x8B50 -#define GL_FLOAT_VEC3 0x8B51 -#define GL_FLOAT_VEC4 0x8B52 -#define GL_FRACTIONAL_EVEN 0x8E7C -#define GL_FRACTIONAL_ODD 0x8E7B -#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D -#define GL_FRAGMENT_SHADER 0x8B30 -#define GL_FRAGMENT_SHADER_BIT 0x00000002 -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B -#define GL_FRAGMENT_SHADER_INVOCATIONS 0x82F4 -#define GL_FRAGMENT_SUBROUTINE 0x92EC -#define GL_FRAGMENT_SUBROUTINE_UNIFORM 0x92F2 -#define GL_FRAGMENT_TEXTURE 0x829F -#define GL_FRAMEBUFFER 0x8D40 -#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 -#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 -#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 -#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 -#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 -#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 -#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 -#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 -#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400 -#define GL_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_FRAMEBUFFER_BLEND 0x828B -#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 -#define GL_FRAMEBUFFER_DEFAULT 0x8218 -#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314 -#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311 -#define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312 -#define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313 -#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310 -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 -#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC -#define GL_FRAMEBUFFER_RENDERABLE 0x8289 -#define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A -#define GL_FRAMEBUFFER_SRGB 0x8DB9 -#define GL_FRAMEBUFFER_UNDEFINED 0x8219 -#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD -#define GL_FRONT 0x0404 -#define GL_FRONT_AND_BACK 0x0408 -#define GL_FRONT_FACE 0x0B46 -#define GL_FRONT_LEFT 0x0400 -#define GL_FRONT_RIGHT 0x0401 -#define GL_FULL_SUPPORT 0x82B7 -#define GL_FUNC_ADD 0x8006 -#define GL_FUNC_REVERSE_SUBTRACT 0x800B -#define GL_FUNC_SUBTRACT 0x800A -#define GL_GEOMETRY_INPUT_TYPE 0x8917 -#define GL_GEOMETRY_OUTPUT_TYPE 0x8918 -#define GL_GEOMETRY_SHADER 0x8DD9 -#define GL_GEOMETRY_SHADER_BIT 0x00000004 -#define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F -#define GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED 0x82F3 -#define GL_GEOMETRY_SUBROUTINE 0x92EB -#define GL_GEOMETRY_SUBROUTINE_UNIFORM 0x92F1 -#define GL_GEOMETRY_TEXTURE 0x829E -#define GL_GEOMETRY_VERTICES_OUT 0x8916 -#define GL_GEQUAL 0x0206 -#define GL_GET_TEXTURE_IMAGE_FORMAT 0x8291 -#define GL_GET_TEXTURE_IMAGE_TYPE 0x8292 -#define GL_GREATER 0x0204 -#define GL_GREEN 0x1904 -#define GL_GREEN_INTEGER 0x8D95 -#define GL_GUILTY_CONTEXT_RESET 0x8253 -#define GL_HALF_FLOAT 0x140B -#define GL_HIGH_FLOAT 0x8DF2 -#define GL_HIGH_INT 0x8DF5 -#define GL_IMAGE_1D 0x904C -#define GL_IMAGE_1D_ARRAY 0x9052 -#define GL_IMAGE_2D 0x904D -#define GL_IMAGE_2D_ARRAY 0x9053 -#define GL_IMAGE_2D_MULTISAMPLE 0x9055 -#define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056 -#define GL_IMAGE_2D_RECT 0x904F -#define GL_IMAGE_3D 0x904E -#define GL_IMAGE_BINDING_ACCESS 0x8F3E -#define GL_IMAGE_BINDING_FORMAT 0x906E -#define GL_IMAGE_BINDING_LAYER 0x8F3D -#define GL_IMAGE_BINDING_LAYERED 0x8F3C -#define GL_IMAGE_BINDING_LEVEL 0x8F3B -#define GL_IMAGE_BINDING_NAME 0x8F3A -#define GL_IMAGE_BUFFER 0x9051 -#define GL_IMAGE_CLASS_10_10_10_2 0x82C3 -#define GL_IMAGE_CLASS_11_11_10 0x82C2 -#define GL_IMAGE_CLASS_1_X_16 0x82BE -#define GL_IMAGE_CLASS_1_X_32 0x82BB -#define GL_IMAGE_CLASS_1_X_8 0x82C1 -#define GL_IMAGE_CLASS_2_X_16 0x82BD -#define GL_IMAGE_CLASS_2_X_32 0x82BA -#define GL_IMAGE_CLASS_2_X_8 0x82C0 -#define GL_IMAGE_CLASS_4_X_16 0x82BC -#define GL_IMAGE_CLASS_4_X_32 0x82B9 -#define GL_IMAGE_CLASS_4_X_8 0x82BF -#define GL_IMAGE_COMPATIBILITY_CLASS 0x82A8 -#define GL_IMAGE_CUBE 0x9050 -#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054 -#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9 -#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8 -#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7 -#define GL_IMAGE_PIXEL_FORMAT 0x82A9 -#define GL_IMAGE_PIXEL_TYPE 0x82AA -#define GL_IMAGE_TEXEL_SIZE 0x82A7 -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B -#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A -#define GL_INCR 0x1E02 -#define GL_INCR_WRAP 0x8507 -#define GL_INFO_LOG_LENGTH 0x8B84 -#define GL_INNOCENT_CONTEXT_RESET 0x8254 -#define GL_INT 0x1404 -#define GL_INTERLEAVED_ATTRIBS 0x8C8C -#define GL_INTERNALFORMAT_ALPHA_SIZE 0x8274 -#define GL_INTERNALFORMAT_ALPHA_TYPE 0x827B -#define GL_INTERNALFORMAT_BLUE_SIZE 0x8273 -#define GL_INTERNALFORMAT_BLUE_TYPE 0x827A -#define GL_INTERNALFORMAT_DEPTH_SIZE 0x8275 -#define GL_INTERNALFORMAT_DEPTH_TYPE 0x827C -#define GL_INTERNALFORMAT_GREEN_SIZE 0x8272 -#define GL_INTERNALFORMAT_GREEN_TYPE 0x8279 -#define GL_INTERNALFORMAT_PREFERRED 0x8270 -#define GL_INTERNALFORMAT_RED_SIZE 0x8271 -#define GL_INTERNALFORMAT_RED_TYPE 0x8278 -#define GL_INTERNALFORMAT_SHARED_SIZE 0x8277 -#define GL_INTERNALFORMAT_STENCIL_SIZE 0x8276 -#define GL_INTERNALFORMAT_STENCIL_TYPE 0x827D -#define GL_INTERNALFORMAT_SUPPORTED 0x826F -#define GL_INT_2_10_10_10_REV 0x8D9F -#define GL_INT_IMAGE_1D 0x9057 -#define GL_INT_IMAGE_1D_ARRAY 0x905D -#define GL_INT_IMAGE_2D 0x9058 -#define GL_INT_IMAGE_2D_ARRAY 0x905E -#define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060 -#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061 -#define GL_INT_IMAGE_2D_RECT 0x905A -#define GL_INT_IMAGE_3D 0x9059 -#define GL_INT_IMAGE_BUFFER 0x905C -#define GL_INT_IMAGE_CUBE 0x905B -#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F -#define GL_INT_SAMPLER_1D 0x8DC9 -#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE -#define GL_INT_SAMPLER_2D 0x8DCA -#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF -#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109 -#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C -#define GL_INT_SAMPLER_2D_RECT 0x8DCD -#define GL_INT_SAMPLER_3D 0x8DCB -#define GL_INT_SAMPLER_BUFFER 0x8DD0 -#define GL_INT_SAMPLER_CUBE 0x8DCC -#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E -#define GL_INT_VEC2 0x8B53 -#define GL_INT_VEC3 0x8B54 -#define GL_INT_VEC4 0x8B55 -#define GL_INVALID_ENUM 0x0500 -#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 -#define GL_INVALID_INDEX 0xFFFFFFFF -#define GL_INVALID_OPERATION 0x0502 -#define GL_INVALID_VALUE 0x0501 -#define GL_INVERT 0x150A -#define GL_ISOLINES 0x8E7A -#define GL_IS_PER_PATCH 0x92E7 -#define GL_IS_ROW_MAJOR 0x9300 -#define GL_KEEP 0x1E00 -#define GL_LAST_VERTEX_CONVENTION 0x8E4E -#define GL_LAYER_PROVOKING_VERTEX 0x825E -#define GL_LEFT 0x0406 -#define GL_LEQUAL 0x0203 -#define GL_LESS 0x0201 -#define GL_LINE 0x1B01 -#define GL_LINEAR 0x2601 -#define GL_LINEAR_MIPMAP_LINEAR 0x2703 -#define GL_LINEAR_MIPMAP_NEAREST 0x2701 -#define GL_LINES 0x0001 -#define GL_LINES_ADJACENCY 0x000A -#define GL_LINE_LOOP 0x0002 -#define GL_LINE_SMOOTH 0x0B20 -#define GL_LINE_SMOOTH_HINT 0x0C52 -#define GL_LINE_STRIP 0x0003 -#define GL_LINE_STRIP_ADJACENCY 0x000B -#define GL_LINE_WIDTH 0x0B21 -#define GL_LINE_WIDTH_GRANULARITY 0x0B23 -#define GL_LINE_WIDTH_RANGE 0x0B22 -#define GL_LINK_STATUS 0x8B82 -#define GL_LOCATION 0x930E -#define GL_LOCATION_COMPONENT 0x934A -#define GL_LOCATION_INDEX 0x930F -#define GL_LOGIC_OP_MODE 0x0BF0 -#define GL_LOSE_CONTEXT_ON_RESET 0x8252 -#define GL_LOWER_LEFT 0x8CA1 -#define GL_LOW_FLOAT 0x8DF0 -#define GL_LOW_INT 0x8DF3 -#define GL_MAJOR_VERSION 0x821B -#define GL_MANUAL_GENERATE_MIPMAP 0x8294 -#define GL_MAP_COHERENT_BIT 0x0080 -#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 -#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 -#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 -#define GL_MAP_PERSISTENT_BIT 0x0040 -#define GL_MAP_READ_BIT 0x0001 -#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 -#define GL_MAP_WRITE_BIT 0x0002 -#define GL_MATRIX_STRIDE 0x92FF -#define GL_MAX 0x8008 -#define GL_MAX_3D_TEXTURE_SIZE 0x8073 -#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF -#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC -#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8 -#define GL_MAX_CLIP_DISTANCES 0x0D32 -#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF -#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E -#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7 -#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1 -#define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES 0x82FA -#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266 -#define GL_MAX_COMBINED_DIMENSIONS 0x8282 -#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 -#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32 -#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF -#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39 -#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39 -#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC -#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E -#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D -#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E -#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 -#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265 -#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264 -#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD -#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB -#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262 -#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC -#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB -#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263 -#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE -#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB -#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C -#define GL_MAX_CULL_DISTANCES 0x82F9 -#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C -#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144 -#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143 -#define GL_MAX_DEPTH 0x8280 -#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F -#define GL_MAX_DRAW_BUFFERS 0x8824 -#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC -#define GL_MAX_ELEMENTS_INDICES 0x80E9 -#define GL_MAX_ELEMENTS_VERTICES 0x80E8 -#define GL_MAX_ELEMENT_INDEX 0x8D6B -#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6 -#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0 -#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE -#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 -#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C -#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA -#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D -#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 -#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD -#define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316 -#define GL_MAX_FRAMEBUFFER_LAYERS 0x9317 -#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318 -#define GL_MAX_FRAMEBUFFER_WIDTH 0x9315 -#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5 -#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF -#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD -#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123 -#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124 -#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0 -#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A -#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7 -#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29 -#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1 -#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C -#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF -#define GL_MAX_HEIGHT 0x827F -#define GL_MAX_IMAGE_SAMPLES 0x906D -#define GL_MAX_IMAGE_UNITS 0x8F38 -#define GL_MAX_INTEGER_SAMPLES 0x9110 -#define GL_MAX_LABEL_LENGTH 0x82E8 -#define GL_MAX_LAYERS 0x8281 -#define GL_MAX_NAME_LENGTH 0x92F6 -#define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7 -#define GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8 -#define GL_MAX_PATCH_VERTICES 0x8E7D -#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 -#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F -#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8 -#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 -#define GL_MAX_SAMPLES 0x8D57 -#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59 -#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 -#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE -#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD -#define GL_MAX_SUBROUTINES 0x8DE7 -#define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8 -#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3 -#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD -#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB -#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C -#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83 -#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8 -#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81 -#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85 -#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89 -#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F -#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4 -#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE -#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC -#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D -#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86 -#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9 -#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82 -#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A -#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80 -#define GL_MAX_TESS_GEN_LEVEL 0x8E7E -#define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84 -#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B -#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 -#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD -#define GL_MAX_TEXTURE_MAX_ANISOTROPY 0x84FF -#define GL_MAX_TEXTURE_SIZE 0x0D33 -#define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70 -#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 -#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 -#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F -#define GL_MAX_UNIFORM_LOCATIONS 0x826E -#define GL_MAX_VARYING_COMPONENTS 0x8B4B -#define GL_MAX_VARYING_FLOATS 0x8B4B -#define GL_MAX_VARYING_VECTORS 0x8DFC -#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2 -#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC -#define GL_MAX_VERTEX_ATTRIBS 0x8869 -#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA -#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9 -#define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5 -#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA -#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 -#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6 -#define GL_MAX_VERTEX_STREAMS 0x8E71 -#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C -#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B -#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A -#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB -#define GL_MAX_VIEWPORTS 0x825B -#define GL_MAX_VIEWPORT_DIMS 0x0D3A -#define GL_MAX_WIDTH 0x827E -#define GL_MEDIUM_FLOAT 0x8DF1 -#define GL_MEDIUM_INT 0x8DF4 -#define GL_MIN 0x8007 -#define GL_MINOR_VERSION 0x821C -#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B -#define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC -#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 -#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E -#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37 -#define GL_MIPMAP 0x8293 -#define GL_MIRRORED_REPEAT 0x8370 -#define GL_MIRROR_CLAMP_TO_EDGE 0x8743 -#define GL_MULTISAMPLE 0x809D -#define GL_NAME_LENGTH 0x92F9 -#define GL_NAND 0x150E -#define GL_NEAREST 0x2600 -#define GL_NEAREST_MIPMAP_LINEAR 0x2702 -#define GL_NEAREST_MIPMAP_NEAREST 0x2700 -#define GL_NEGATIVE_ONE_TO_ONE 0x935E -#define GL_NEVER 0x0200 -#define GL_NICEST 0x1102 -#define GL_NONE 0 -#define GL_NOOP 0x1505 -#define GL_NOR 0x1508 -#define GL_NOTEQUAL 0x0205 -#define GL_NO_ERROR 0 -#define GL_NO_RESET_NOTIFICATION 0x8261 -#define GL_NUM_ACTIVE_VARIABLES 0x9304 -#define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 -#define GL_NUM_EXTENSIONS 0x821D -#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE -#define GL_NUM_SAMPLE_COUNTS 0x9380 -#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 -#define GL_NUM_SHADING_LANGUAGE_VERSIONS 0x82E9 -#define GL_NUM_SPIR_V_EXTENSIONS 0x9554 -#define GL_OBJECT_TYPE 0x9112 -#define GL_OFFSET 0x92FC -#define GL_ONE 1 -#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 -#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 -#define GL_ONE_MINUS_DST_ALPHA 0x0305 -#define GL_ONE_MINUS_DST_COLOR 0x0307 -#define GL_ONE_MINUS_SRC1_ALPHA 0x88FB -#define GL_ONE_MINUS_SRC1_COLOR 0x88FA -#define GL_ONE_MINUS_SRC_ALPHA 0x0303 -#define GL_ONE_MINUS_SRC_COLOR 0x0301 -#define GL_OR 0x1507 -#define GL_OR_INVERTED 0x150D -#define GL_OR_REVERSE 0x150B -#define GL_OUT_OF_MEMORY 0x0505 -#define GL_PACK_ALIGNMENT 0x0D05 -#define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D -#define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C -#define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E -#define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B -#define GL_PACK_IMAGE_HEIGHT 0x806C -#define GL_PACK_LSB_FIRST 0x0D01 -#define GL_PACK_ROW_LENGTH 0x0D02 -#define GL_PACK_SKIP_IMAGES 0x806B -#define GL_PACK_SKIP_PIXELS 0x0D04 -#define GL_PACK_SKIP_ROWS 0x0D03 -#define GL_PACK_SWAP_BYTES 0x0D00 -#define GL_PARAMETER_BUFFER 0x80EE -#define GL_PARAMETER_BUFFER_BINDING 0x80EF -#define GL_PATCHES 0x000E -#define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73 -#define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74 -#define GL_PATCH_VERTICES 0x8E72 -#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080 -#define GL_PIXEL_PACK_BUFFER 0x88EB -#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED -#define GL_PIXEL_UNPACK_BUFFER 0x88EC -#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF -#define GL_POINT 0x1B00 -#define GL_POINTS 0x0000 -#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 -#define GL_POINT_SIZE 0x0B11 -#define GL_POINT_SIZE_GRANULARITY 0x0B13 -#define GL_POINT_SIZE_RANGE 0x0B12 -#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 -#define GL_POLYGON_MODE 0x0B40 -#define GL_POLYGON_OFFSET_CLAMP 0x8E1B -#define GL_POLYGON_OFFSET_FACTOR 0x8038 -#define GL_POLYGON_OFFSET_FILL 0x8037 -#define GL_POLYGON_OFFSET_LINE 0x2A02 -#define GL_POLYGON_OFFSET_POINT 0x2A01 -#define GL_POLYGON_OFFSET_UNITS 0x2A00 -#define GL_POLYGON_SMOOTH 0x0B41 -#define GL_POLYGON_SMOOTH_HINT 0x0C53 -#define GL_PRIMITIVES_GENERATED 0x8C87 -#define GL_PRIMITIVES_SUBMITTED 0x82EF -#define GL_PRIMITIVE_RESTART 0x8F9D -#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 -#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221 -#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E -#define GL_PROGRAM 0x82E2 -#define GL_PROGRAM_BINARY_FORMATS 0x87FF -#define GL_PROGRAM_BINARY_LENGTH 0x8741 -#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 -#define GL_PROGRAM_INPUT 0x92E3 -#define GL_PROGRAM_OUTPUT 0x92E4 -#define GL_PROGRAM_PIPELINE 0x82E4 -#define GL_PROGRAM_PIPELINE_BINDING 0x825A -#define GL_PROGRAM_POINT_SIZE 0x8642 -#define GL_PROGRAM_SEPARABLE 0x8258 -#define GL_PROVOKING_VERTEX 0x8E4F -#define GL_PROXY_TEXTURE_1D 0x8063 -#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19 -#define GL_PROXY_TEXTURE_2D 0x8064 -#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B -#define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101 -#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103 -#define GL_PROXY_TEXTURE_3D 0x8070 -#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B -#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B -#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7 -#define GL_QUADS 0x0007 -#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C -#define GL_QUERY 0x82E3 -#define GL_QUERY_BUFFER 0x9192 -#define GL_QUERY_BUFFER_BARRIER_BIT 0x00008000 -#define GL_QUERY_BUFFER_BINDING 0x9193 -#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16 -#define GL_QUERY_BY_REGION_NO_WAIT_INVERTED 0x8E1A -#define GL_QUERY_BY_REGION_WAIT 0x8E15 -#define GL_QUERY_BY_REGION_WAIT_INVERTED 0x8E19 -#define GL_QUERY_COUNTER_BITS 0x8864 -#define GL_QUERY_NO_WAIT 0x8E14 -#define GL_QUERY_NO_WAIT_INVERTED 0x8E18 -#define GL_QUERY_RESULT 0x8866 -#define GL_QUERY_RESULT_AVAILABLE 0x8867 -#define GL_QUERY_RESULT_NO_WAIT 0x9194 -#define GL_QUERY_TARGET 0x82EA -#define GL_QUERY_WAIT 0x8E13 -#define GL_QUERY_WAIT_INVERTED 0x8E17 -#define GL_R11F_G11F_B10F 0x8C3A -#define GL_R16 0x822A -#define GL_R16F 0x822D -#define GL_R16I 0x8233 -#define GL_R16UI 0x8234 -#define GL_R16_SNORM 0x8F98 -#define GL_R32F 0x822E -#define GL_R32I 0x8235 -#define GL_R32UI 0x8236 -#define GL_R3_G3_B2 0x2A10 -#define GL_R8 0x8229 -#define GL_R8I 0x8231 -#define GL_R8UI 0x8232 -#define GL_R8_SNORM 0x8F94 -#define GL_RASTERIZER_DISCARD 0x8C89 -#define GL_READ_BUFFER 0x0C02 -#define GL_READ_FRAMEBUFFER 0x8CA8 -#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA -#define GL_READ_ONLY 0x88B8 -#define GL_READ_PIXELS 0x828C -#define GL_READ_PIXELS_FORMAT 0x828D -#define GL_READ_PIXELS_TYPE 0x828E -#define GL_READ_WRITE 0x88BA -#define GL_RED 0x1903 -#define GL_RED_INTEGER 0x8D94 -#define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B -#define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A -#define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309 -#define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307 -#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308 -#define GL_REFERENCED_BY_VERTEX_SHADER 0x9306 -#define GL_RENDERBUFFER 0x8D41 -#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 -#define GL_RENDERBUFFER_BINDING 0x8CA7 -#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 -#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 -#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 -#define GL_RENDERBUFFER_HEIGHT 0x8D43 -#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 -#define GL_RENDERBUFFER_RED_SIZE 0x8D50 -#define GL_RENDERBUFFER_SAMPLES 0x8CAB -#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 -#define GL_RENDERBUFFER_WIDTH 0x8D42 -#define GL_RENDERER 0x1F01 -#define GL_REPEAT 0x2901 -#define GL_REPLACE 0x1E01 -#define GL_RESET_NOTIFICATION_STRATEGY 0x8256 -#define GL_RG 0x8227 -#define GL_RG16 0x822C -#define GL_RG16F 0x822F -#define GL_RG16I 0x8239 -#define GL_RG16UI 0x823A -#define GL_RG16_SNORM 0x8F99 -#define GL_RG32F 0x8230 -#define GL_RG32I 0x823B -#define GL_RG32UI 0x823C -#define GL_RG8 0x822B -#define GL_RG8I 0x8237 -#define GL_RG8UI 0x8238 -#define GL_RG8_SNORM 0x8F95 -#define GL_RGB 0x1907 -#define GL_RGB10 0x8052 -#define GL_RGB10_A2 0x8059 -#define GL_RGB10_A2UI 0x906F -#define GL_RGB12 0x8053 -#define GL_RGB16 0x8054 -#define GL_RGB16F 0x881B -#define GL_RGB16I 0x8D89 -#define GL_RGB16UI 0x8D77 -#define GL_RGB16_SNORM 0x8F9A -#define GL_RGB32F 0x8815 -#define GL_RGB32I 0x8D83 -#define GL_RGB32UI 0x8D71 -#define GL_RGB4 0x804F -#define GL_RGB5 0x8050 -#define GL_RGB565 0x8D62 -#define GL_RGB5_A1 0x8057 -#define GL_RGB8 0x8051 -#define GL_RGB8I 0x8D8F -#define GL_RGB8UI 0x8D7D -#define GL_RGB8_SNORM 0x8F96 -#define GL_RGB9_E5 0x8C3D -#define GL_RGBA 0x1908 -#define GL_RGBA12 0x805A -#define GL_RGBA16 0x805B -#define GL_RGBA16F 0x881A -#define GL_RGBA16I 0x8D88 -#define GL_RGBA16UI 0x8D76 -#define GL_RGBA16_SNORM 0x8F9B -#define GL_RGBA2 0x8055 -#define GL_RGBA32F 0x8814 -#define GL_RGBA32I 0x8D82 -#define GL_RGBA32UI 0x8D70 -#define GL_RGBA4 0x8056 -#define GL_RGBA8 0x8058 -#define GL_RGBA8I 0x8D8E -#define GL_RGBA8UI 0x8D7C -#define GL_RGBA8_SNORM 0x8F97 -#define GL_RGBA_INTEGER 0x8D99 -#define GL_RGB_INTEGER 0x8D98 -#define GL_RG_INTEGER 0x8228 -#define GL_RIGHT 0x0407 -#define GL_SAMPLER 0x82E6 -#define GL_SAMPLER_1D 0x8B5D -#define GL_SAMPLER_1D_ARRAY 0x8DC0 -#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3 -#define GL_SAMPLER_1D_SHADOW 0x8B61 -#define GL_SAMPLER_2D 0x8B5E -#define GL_SAMPLER_2D_ARRAY 0x8DC1 -#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 -#define GL_SAMPLER_2D_MULTISAMPLE 0x9108 -#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B -#define GL_SAMPLER_2D_RECT 0x8B63 -#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64 -#define GL_SAMPLER_2D_SHADOW 0x8B62 -#define GL_SAMPLER_3D 0x8B5F -#define GL_SAMPLER_BINDING 0x8919 -#define GL_SAMPLER_BUFFER 0x8DC2 -#define GL_SAMPLER_CUBE 0x8B60 -#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C -#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D -#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 -#define GL_SAMPLES 0x80A9 -#define GL_SAMPLES_PASSED 0x8914 -#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE 0x809F -#define GL_SAMPLE_BUFFERS 0x80A8 -#define GL_SAMPLE_COVERAGE 0x80A0 -#define GL_SAMPLE_COVERAGE_INVERT 0x80AB -#define GL_SAMPLE_COVERAGE_VALUE 0x80AA -#define GL_SAMPLE_MASK 0x8E51 -#define GL_SAMPLE_MASK_VALUE 0x8E52 -#define GL_SAMPLE_POSITION 0x8E50 -#define GL_SAMPLE_SHADING 0x8C36 -#define GL_SCISSOR_BOX 0x0C10 -#define GL_SCISSOR_TEST 0x0C11 -#define GL_SEPARATE_ATTRIBS 0x8C8D -#define GL_SET 0x150F -#define GL_SHADER 0x82E1 -#define GL_SHADER_BINARY_FORMATS 0x8DF8 -#define GL_SHADER_BINARY_FORMAT_SPIR_V 0x9551 -#define GL_SHADER_COMPILER 0x8DFA -#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020 -#define GL_SHADER_IMAGE_ATOMIC 0x82A6 -#define GL_SHADER_IMAGE_LOAD 0x82A4 -#define GL_SHADER_IMAGE_STORE 0x82A5 -#define GL_SHADER_SOURCE_LENGTH 0x8B88 -#define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000 -#define GL_SHADER_STORAGE_BLOCK 0x92E6 -#define GL_SHADER_STORAGE_BUFFER 0x90D2 -#define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3 -#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF -#define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5 -#define GL_SHADER_STORAGE_BUFFER_START 0x90D4 -#define GL_SHADER_TYPE 0x8B4F -#define GL_SHADING_LANGUAGE_VERSION 0x8B8C -#define GL_SHORT 0x1402 -#define GL_SIGNALED 0x9119 -#define GL_SIGNED_NORMALIZED 0x8F9C -#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC -#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE -#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD -#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF -#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 -#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 -#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 -#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 -#define GL_SPIR_V_BINARY 0x9552 -#define GL_SPIR_V_EXTENSIONS 0x9553 -#define GL_SRC1_ALPHA 0x8589 -#define GL_SRC1_COLOR 0x88F9 -#define GL_SRC_ALPHA 0x0302 -#define GL_SRC_ALPHA_SATURATE 0x0308 -#define GL_SRC_COLOR 0x0300 -#define GL_SRGB 0x8C40 -#define GL_SRGB8 0x8C41 -#define GL_SRGB8_ALPHA8 0x8C43 -#define GL_SRGB_ALPHA 0x8C42 -#define GL_SRGB_READ 0x8297 -#define GL_SRGB_WRITE 0x8298 -#define GL_STACK_OVERFLOW 0x0503 -#define GL_STACK_UNDERFLOW 0x0504 -#define GL_STATIC_COPY 0x88E6 -#define GL_STATIC_DRAW 0x88E4 -#define GL_STATIC_READ 0x88E5 -#define GL_STENCIL 0x1802 -#define GL_STENCIL_ATTACHMENT 0x8D20 -#define GL_STENCIL_BACK_FAIL 0x8801 -#define GL_STENCIL_BACK_FUNC 0x8800 -#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 -#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 -#define GL_STENCIL_BACK_REF 0x8CA3 -#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 -#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 -#define GL_STENCIL_BUFFER_BIT 0x00000400 -#define GL_STENCIL_CLEAR_VALUE 0x0B91 -#define GL_STENCIL_COMPONENTS 0x8285 -#define GL_STENCIL_FAIL 0x0B94 -#define GL_STENCIL_FUNC 0x0B92 -#define GL_STENCIL_INDEX 0x1901 -#define GL_STENCIL_INDEX1 0x8D46 -#define GL_STENCIL_INDEX16 0x8D49 -#define GL_STENCIL_INDEX4 0x8D47 -#define GL_STENCIL_INDEX8 0x8D48 -#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 -#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 -#define GL_STENCIL_REF 0x0B97 -#define GL_STENCIL_RENDERABLE 0x8288 -#define GL_STENCIL_TEST 0x0B90 -#define GL_STENCIL_VALUE_MASK 0x0B93 -#define GL_STENCIL_WRITEMASK 0x0B98 -#define GL_STEREO 0x0C33 -#define GL_STREAM_COPY 0x88E2 -#define GL_STREAM_DRAW 0x88E0 -#define GL_STREAM_READ 0x88E1 -#define GL_SUBPIXEL_BITS 0x0D50 -#define GL_SYNC_CONDITION 0x9113 -#define GL_SYNC_FENCE 0x9116 -#define GL_SYNC_FLAGS 0x9115 -#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 -#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 -#define GL_SYNC_STATUS 0x9114 -#define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75 -#define GL_TESS_CONTROL_SHADER 0x8E88 -#define GL_TESS_CONTROL_SHADER_BIT 0x00000008 -#define GL_TESS_CONTROL_SHADER_PATCHES 0x82F1 -#define GL_TESS_CONTROL_SUBROUTINE 0x92E9 -#define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF -#define GL_TESS_CONTROL_TEXTURE 0x829C -#define GL_TESS_EVALUATION_SHADER 0x8E87 -#define GL_TESS_EVALUATION_SHADER_BIT 0x00000010 -#define GL_TESS_EVALUATION_SHADER_INVOCATIONS 0x82F2 -#define GL_TESS_EVALUATION_SUBROUTINE 0x92EA -#define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0 -#define GL_TESS_EVALUATION_TEXTURE 0x829D -#define GL_TESS_GEN_MODE 0x8E76 -#define GL_TESS_GEN_POINT_MODE 0x8E79 -#define GL_TESS_GEN_SPACING 0x8E77 -#define GL_TESS_GEN_VERTEX_ORDER 0x8E78 -#define GL_TEXTURE 0x1702 -#define GL_TEXTURE0 0x84C0 -#define GL_TEXTURE1 0x84C1 -#define GL_TEXTURE10 0x84CA -#define GL_TEXTURE11 0x84CB -#define GL_TEXTURE12 0x84CC -#define GL_TEXTURE13 0x84CD -#define GL_TEXTURE14 0x84CE -#define GL_TEXTURE15 0x84CF -#define GL_TEXTURE16 0x84D0 -#define GL_TEXTURE17 0x84D1 -#define GL_TEXTURE18 0x84D2 -#define GL_TEXTURE19 0x84D3 -#define GL_TEXTURE2 0x84C2 -#define GL_TEXTURE20 0x84D4 -#define GL_TEXTURE21 0x84D5 -#define GL_TEXTURE22 0x84D6 -#define GL_TEXTURE23 0x84D7 -#define GL_TEXTURE24 0x84D8 -#define GL_TEXTURE25 0x84D9 -#define GL_TEXTURE26 0x84DA -#define GL_TEXTURE27 0x84DB -#define GL_TEXTURE28 0x84DC -#define GL_TEXTURE29 0x84DD -#define GL_TEXTURE3 0x84C3 -#define GL_TEXTURE30 0x84DE -#define GL_TEXTURE31 0x84DF -#define GL_TEXTURE4 0x84C4 -#define GL_TEXTURE5 0x84C5 -#define GL_TEXTURE6 0x84C6 -#define GL_TEXTURE7 0x84C7 -#define GL_TEXTURE8 0x84C8 -#define GL_TEXTURE9 0x84C9 -#define GL_TEXTURE_1D 0x0DE0 -#define GL_TEXTURE_1D_ARRAY 0x8C18 -#define GL_TEXTURE_2D 0x0DE1 -#define GL_TEXTURE_2D_ARRAY 0x8C1A -#define GL_TEXTURE_2D_MULTISAMPLE 0x9100 -#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102 -#define GL_TEXTURE_3D 0x806F -#define GL_TEXTURE_ALPHA_SIZE 0x805F -#define GL_TEXTURE_ALPHA_TYPE 0x8C13 -#define GL_TEXTURE_BASE_LEVEL 0x813C -#define GL_TEXTURE_BINDING_1D 0x8068 -#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C -#define GL_TEXTURE_BINDING_2D 0x8069 -#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D -#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104 -#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105 -#define GL_TEXTURE_BINDING_3D 0x806A -#define GL_TEXTURE_BINDING_BUFFER 0x8C2C -#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 -#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A -#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6 -#define GL_TEXTURE_BLUE_SIZE 0x805E -#define GL_TEXTURE_BLUE_TYPE 0x8C12 -#define GL_TEXTURE_BORDER_COLOR 0x1004 -#define GL_TEXTURE_BUFFER 0x8C2A -#define GL_TEXTURE_BUFFER_BINDING 0x8C2A -#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D -#define GL_TEXTURE_BUFFER_OFFSET 0x919D -#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F -#define GL_TEXTURE_BUFFER_SIZE 0x919E -#define GL_TEXTURE_COMPARE_FUNC 0x884D -#define GL_TEXTURE_COMPARE_MODE 0x884C -#define GL_TEXTURE_COMPRESSED 0x86A1 -#define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2 -#define GL_TEXTURE_COMPRESSED_BLOCK_SIZE 0x82B3 -#define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1 -#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 -#define GL_TEXTURE_COMPRESSION_HINT 0x84EF -#define GL_TEXTURE_CUBE_MAP 0x8513 -#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 -#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F -#define GL_TEXTURE_DEPTH 0x8071 -#define GL_TEXTURE_DEPTH_SIZE 0x884A -#define GL_TEXTURE_DEPTH_TYPE 0x8C16 -#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008 -#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107 -#define GL_TEXTURE_GATHER 0x82A2 -#define GL_TEXTURE_GATHER_SHADOW 0x82A3 -#define GL_TEXTURE_GREEN_SIZE 0x805D -#define GL_TEXTURE_GREEN_TYPE 0x8C11 -#define GL_TEXTURE_HEIGHT 0x1001 -#define GL_TEXTURE_IMAGE_FORMAT 0x828F -#define GL_TEXTURE_IMAGE_TYPE 0x8290 -#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F -#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF -#define GL_TEXTURE_INTERNAL_FORMAT 0x1003 -#define GL_TEXTURE_LOD_BIAS 0x8501 -#define GL_TEXTURE_MAG_FILTER 0x2800 -#define GL_TEXTURE_MAX_ANISOTROPY 0x84FE -#define GL_TEXTURE_MAX_LEVEL 0x813D -#define GL_TEXTURE_MAX_LOD 0x813B -#define GL_TEXTURE_MIN_FILTER 0x2801 -#define GL_TEXTURE_MIN_LOD 0x813A -#define GL_TEXTURE_RECTANGLE 0x84F5 -#define GL_TEXTURE_RED_SIZE 0x805C -#define GL_TEXTURE_RED_TYPE 0x8C10 -#define GL_TEXTURE_SAMPLES 0x9106 -#define GL_TEXTURE_SHADOW 0x82A1 -#define GL_TEXTURE_SHARED_SIZE 0x8C3F -#define GL_TEXTURE_STENCIL_SIZE 0x88F1 -#define GL_TEXTURE_SWIZZLE_A 0x8E45 -#define GL_TEXTURE_SWIZZLE_B 0x8E44 -#define GL_TEXTURE_SWIZZLE_G 0x8E43 -#define GL_TEXTURE_SWIZZLE_R 0x8E42 -#define GL_TEXTURE_SWIZZLE_RGBA 0x8E46 -#define GL_TEXTURE_TARGET 0x1006 -#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100 -#define GL_TEXTURE_VIEW 0x82B5 -#define GL_TEXTURE_VIEW_MIN_LAYER 0x82DD -#define GL_TEXTURE_VIEW_MIN_LEVEL 0x82DB -#define GL_TEXTURE_VIEW_NUM_LAYERS 0x82DE -#define GL_TEXTURE_VIEW_NUM_LEVELS 0x82DC -#define GL_TEXTURE_WIDTH 0x1000 -#define GL_TEXTURE_WRAP_R 0x8072 -#define GL_TEXTURE_WRAP_S 0x2802 -#define GL_TEXTURE_WRAP_T 0x2803 -#define GL_TIMEOUT_EXPIRED 0x911B -#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFF -#define GL_TIMESTAMP 0x8E28 -#define GL_TIME_ELAPSED 0x88BF -#define GL_TOP_LEVEL_ARRAY_SIZE 0x930C -#define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D -#define GL_TRANSFORM_FEEDBACK 0x8E22 -#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 -#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800 -#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 -#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E -#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24 -#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F -#define GL_TRANSFORM_FEEDBACK_BUFFER_INDEX 0x934B -#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F -#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23 -#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 -#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 -#define GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE 0x934C -#define GL_TRANSFORM_FEEDBACK_OVERFLOW 0x82EC -#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 -#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 -#define GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW 0x82ED -#define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4 -#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 -#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 -#define GL_TRIANGLES 0x0004 -#define GL_TRIANGLES_ADJACENCY 0x000C -#define GL_TRIANGLE_FAN 0x0006 -#define GL_TRIANGLE_STRIP 0x0005 -#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D -#define GL_TRUE 1 -#define GL_TYPE 0x92FA -#define GL_UNDEFINED_VERTEX 0x8260 -#define GL_UNIFORM 0x92E1 -#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C -#define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA -#define GL_UNIFORM_BARRIER_BIT 0x00000004 -#define GL_UNIFORM_BLOCK 0x92E2 -#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 -#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 -#define GL_UNIFORM_BLOCK_BINDING 0x8A3F -#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 -#define GL_UNIFORM_BLOCK_INDEX 0x8A3A -#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC -#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 -#define GL_UNIFORM_BUFFER 0x8A11 -#define GL_UNIFORM_BUFFER_BINDING 0x8A28 -#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 -#define GL_UNIFORM_BUFFER_SIZE 0x8A2A -#define GL_UNIFORM_BUFFER_START 0x8A29 -#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E -#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D -#define GL_UNIFORM_NAME_LENGTH 0x8A39 -#define GL_UNIFORM_OFFSET 0x8A3B -#define GL_UNIFORM_SIZE 0x8A38 -#define GL_UNIFORM_TYPE 0x8A37 -#define GL_UNKNOWN_CONTEXT_RESET 0x8255 -#define GL_UNPACK_ALIGNMENT 0x0CF5 -#define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129 -#define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128 -#define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A -#define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127 -#define GL_UNPACK_IMAGE_HEIGHT 0x806E -#define GL_UNPACK_LSB_FIRST 0x0CF1 -#define GL_UNPACK_ROW_LENGTH 0x0CF2 -#define GL_UNPACK_SKIP_IMAGES 0x806D -#define GL_UNPACK_SKIP_PIXELS 0x0CF4 -#define GL_UNPACK_SKIP_ROWS 0x0CF3 -#define GL_UNPACK_SWAP_BYTES 0x0CF0 -#define GL_UNSIGNALED 0x9118 -#define GL_UNSIGNED_BYTE 0x1401 -#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 -#define GL_UNSIGNED_BYTE_3_3_2 0x8032 -#define GL_UNSIGNED_INT 0x1405 -#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B -#define GL_UNSIGNED_INT_10_10_10_2 0x8036 -#define GL_UNSIGNED_INT_24_8 0x84FA -#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 -#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E -#define GL_UNSIGNED_INT_8_8_8_8 0x8035 -#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 -#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB -#define GL_UNSIGNED_INT_IMAGE_1D 0x9062 -#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068 -#define GL_UNSIGNED_INT_IMAGE_2D 0x9063 -#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069 -#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B -#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C -#define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065 -#define GL_UNSIGNED_INT_IMAGE_3D 0x9064 -#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067 -#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066 -#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A -#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1 -#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6 -#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 -#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 -#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A -#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D -#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5 -#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 -#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8 -#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 -#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F -#define GL_UNSIGNED_INT_VEC2 0x8DC6 -#define GL_UNSIGNED_INT_VEC3 0x8DC7 -#define GL_UNSIGNED_INT_VEC4 0x8DC8 -#define GL_UNSIGNED_NORMALIZED 0x8C17 -#define GL_UNSIGNED_SHORT 0x1403 -#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 -#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 -#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 -#define GL_UNSIGNED_SHORT_5_6_5 0x8363 -#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 -#define GL_UPPER_LEFT 0x8CA2 -#define GL_VALIDATE_STATUS 0x8B83 -#define GL_VENDOR 0x1F00 -#define GL_VERSION 0x1F02 -#define GL_VERTEX_ARRAY 0x8074 -#define GL_VERTEX_ARRAY_BINDING 0x85B5 -#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001 -#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F -#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD -#define GL_VERTEX_ATTRIB_ARRAY_LONG 0x874E -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A -#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 -#define GL_VERTEX_ATTRIB_BINDING 0x82D4 -#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5 -#define GL_VERTEX_BINDING_BUFFER 0x8F4F -#define GL_VERTEX_BINDING_DIVISOR 0x82D6 -#define GL_VERTEX_BINDING_OFFSET 0x82D7 -#define GL_VERTEX_BINDING_STRIDE 0x82D8 -#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 -#define GL_VERTEX_SHADER 0x8B31 -#define GL_VERTEX_SHADER_BIT 0x00000001 -#define GL_VERTEX_SHADER_INVOCATIONS 0x82F0 -#define GL_VERTEX_SUBROUTINE 0x92E8 -#define GL_VERTEX_SUBROUTINE_UNIFORM 0x92EE -#define GL_VERTEX_TEXTURE 0x829B -#define GL_VERTICES_SUBMITTED 0x82EE -#define GL_VIEWPORT 0x0BA2 -#define GL_VIEWPORT_BOUNDS_RANGE 0x825D -#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F -#define GL_VIEWPORT_SUBPIXEL_BITS 0x825C -#define GL_VIEW_CLASS_128_BITS 0x82C4 -#define GL_VIEW_CLASS_16_BITS 0x82CA -#define GL_VIEW_CLASS_24_BITS 0x82C9 -#define GL_VIEW_CLASS_32_BITS 0x82C8 -#define GL_VIEW_CLASS_48_BITS 0x82C7 -#define GL_VIEW_CLASS_64_BITS 0x82C6 -#define GL_VIEW_CLASS_8_BITS 0x82CB -#define GL_VIEW_CLASS_96_BITS 0x82C5 -#define GL_VIEW_CLASS_BPTC_FLOAT 0x82D3 -#define GL_VIEW_CLASS_BPTC_UNORM 0x82D2 -#define GL_VIEW_CLASS_RGTC1_RED 0x82D0 -#define GL_VIEW_CLASS_RGTC2_RG 0x82D1 -#define GL_VIEW_CLASS_S3TC_DXT1_RGB 0x82CC -#define GL_VIEW_CLASS_S3TC_DXT1_RGBA 0x82CD -#define GL_VIEW_CLASS_S3TC_DXT3_RGBA 0x82CE -#define GL_VIEW_CLASS_S3TC_DXT5_RGBA 0x82CF -#define GL_VIEW_COMPATIBILITY_CLASS 0x82B6 -#define GL_WAIT_FAILED 0x911D -#define GL_WRITE_ONLY 0x88B9 -#define GL_XOR 0x1506 -#define GL_ZERO 0 -#define GL_ZERO_TO_ONE 0x935F - - -#ifndef __khrplatform_h_ -#define __khrplatform_h_ - -/* -** Copyright (c) 2008-2018 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are 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 Materials. -** -** THE MATERIALS ARE 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 -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ - -/* Khronos platform-specific types and definitions. - * - * The master copy of khrplatform.h is maintained in the Khronos EGL - * Registry repository at https://github.com/KhronosGroup/EGL-Registry - * The last semantic modification to khrplatform.h was at commit ID: - * 67a3e0864c2d75ea5287b9f3d2eb74a745936692 - * - * Adopters may modify this file to suit their platform. Adopters are - * encouraged to submit platform specific modifications to the Khronos - * group so that they can be included in future versions of this file. - * Please submit changes by filing pull requests or issues on - * the EGL Registry repository linked above. - * - * - * See the Implementer's Guidelines for information about where this file - * should be located on your system and for more details of its use: - * http://www.khronos.org/registry/implementers_guide.pdf - * - * This file should be included as - * #include - * by Khronos client API header files that use its types and defines. - * - * The types in khrplatform.h should only be used to define API-specific types. - * - * Types defined in khrplatform.h: - * khronos_int8_t signed 8 bit - * khronos_uint8_t unsigned 8 bit - * khronos_int16_t signed 16 bit - * khronos_uint16_t unsigned 16 bit - * khronos_int32_t signed 32 bit - * khronos_uint32_t unsigned 32 bit - * khronos_int64_t signed 64 bit - * khronos_uint64_t unsigned 64 bit - * khronos_intptr_t signed same number of bits as a pointer - * khronos_uintptr_t unsigned same number of bits as a pointer - * khronos_ssize_t signed size - * khronos_usize_t unsigned size - * khronos_float_t signed 32 bit floating point - * khronos_time_ns_t unsigned 64 bit time in nanoseconds - * khronos_utime_nanoseconds_t unsigned time interval or absolute time in - * nanoseconds - * khronos_stime_nanoseconds_t signed time interval in nanoseconds - * khronos_boolean_enum_t enumerated boolean type. This should - * only be used as a base type when a client API's boolean type is - * an enum. Client APIs which use an integer or other type for - * booleans cannot use this as the base type for their boolean. - * - * Tokens defined in khrplatform.h: - * - * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values. - * - * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0. - * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0. - * - * Calling convention macros defined in this file: - * KHRONOS_APICALL - * KHRONOS_GLAD_API_PTR - * KHRONOS_APIATTRIBUTES - * - * These may be used in function prototypes as: - * - * KHRONOS_APICALL void KHRONOS_GLAD_API_PTR funcname( - * int arg1, - * int arg2) KHRONOS_APIATTRIBUTES; - */ - -#if defined(__SCITECH_SNAP__) && !defined(KHRONOS_STATIC) -# define KHRONOS_STATIC 1 -#endif - -/*------------------------------------------------------------------------- - * Definition of KHRONOS_APICALL - *------------------------------------------------------------------------- - * This precedes the return type of the function in the function prototype. - */ -#if defined(KHRONOS_STATIC) - /* If the preprocessor constant KHRONOS_STATIC is defined, make the - * header compatible with static linking. */ -# define KHRONOS_APICALL -#elif defined(_WIN32) -# define KHRONOS_APICALL __declspec(dllimport) -#elif defined (__SYMBIAN32__) -# define KHRONOS_APICALL IMPORT_C -#elif defined(__ANDROID__) -# define KHRONOS_APICALL __attribute__((visibility("default"))) -#else -# define KHRONOS_APICALL -#endif - -/*------------------------------------------------------------------------- - * Definition of KHRONOS_GLAD_API_PTR - *------------------------------------------------------------------------- - * This follows the return type of the function and precedes the function - * name in the function prototype. - */ -#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) - /* Win32 but not WinCE */ -# define KHRONOS_GLAD_API_PTR __stdcall -#else -# define KHRONOS_GLAD_API_PTR -#endif - -/*------------------------------------------------------------------------- - * Definition of KHRONOS_APIATTRIBUTES - *------------------------------------------------------------------------- - * This follows the closing parenthesis of the function prototype arguments. - */ -#if defined (__ARMCC_2__) -#define KHRONOS_APIATTRIBUTES __softfp -#else -#define KHRONOS_APIATTRIBUTES -#endif - -/*------------------------------------------------------------------------- - * basic type definitions - *-----------------------------------------------------------------------*/ -#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__) - - -/* - * Using - */ -#include -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 -/* - * To support platform where unsigned long cannot be used interchangeably with - * inptr_t (e.g. CHERI-extended ISAs), we can use the stdint.h intptr_t. - * Ideally, we could just use (u)intptr_t everywhere, but this could result in - * ABI breakage if khronos_uintptr_t is changed from unsigned long to - * unsigned long long or similar (this results in different C++ name mangling). - * To avoid changes for existing platforms, we restrict usage of intptr_t to - * platforms where the size of a pointer is larger than the size of long. - */ -#if defined(__SIZEOF_LONG__) && defined(__SIZEOF_POINTER__) -#if __SIZEOF_POINTER__ > __SIZEOF_LONG__ -#define KHRONOS_USE_INTPTR_T -#endif -#endif - -#elif defined(__VMS ) || defined(__sgi) - -/* - * Using - */ -#include -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(_WIN32) && !defined(__SCITECH_SNAP__) - -/* - * Win32 - */ -typedef __int32 khronos_int32_t; -typedef unsigned __int32 khronos_uint32_t; -typedef __int64 khronos_int64_t; -typedef unsigned __int64 khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(__sun__) || defined(__digital__) - -/* - * Sun or Digital - */ -typedef int khronos_int32_t; -typedef unsigned int khronos_uint32_t; -#if defined(__arch64__) || defined(_LP64) -typedef long int khronos_int64_t; -typedef unsigned long int khronos_uint64_t; -#else -typedef long long int khronos_int64_t; -typedef unsigned long long int khronos_uint64_t; -#endif /* __arch64__ */ -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif 0 - -/* - * Hypothetical platform with no float or int64 support - */ -typedef int khronos_int32_t; -typedef unsigned int khronos_uint32_t; -#define KHRONOS_SUPPORT_INT64 0 -#define KHRONOS_SUPPORT_FLOAT 0 - -#else - -/* - * Generic fallback - */ -#include -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#endif - - -/* - * Types that are (so far) the same on all platforms - */ -typedef signed char khronos_int8_t; -typedef unsigned char khronos_uint8_t; -typedef signed short int khronos_int16_t; -typedef unsigned short int khronos_uint16_t; - -/* - * Types that differ between LLP64 and LP64 architectures - in LLP64, - * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears - * to be the only LLP64 architecture in current use. - */ -#ifdef KHRONOS_USE_INTPTR_T -typedef intptr_t khronos_intptr_t; -typedef uintptr_t khronos_uintptr_t; -#elif defined(_WIN64) -typedef signed long long int khronos_intptr_t; -typedef unsigned long long int khronos_uintptr_t; -#else -typedef signed long int khronos_intptr_t; -typedef unsigned long int khronos_uintptr_t; -#endif - -#if defined(_WIN64) -typedef signed long long int khronos_ssize_t; -typedef unsigned long long int khronos_usize_t; -#else -typedef signed long int khronos_ssize_t; -typedef unsigned long int khronos_usize_t; -#endif - -#if KHRONOS_SUPPORT_FLOAT -/* - * Float type - */ -typedef float khronos_float_t; -#endif - -#if KHRONOS_SUPPORT_INT64 -/* Time types - * - * These types can be used to represent a time interval in nanoseconds or - * an absolute Unadjusted System Time. Unadjusted System Time is the number - * of nanoseconds since some arbitrary system event (e.g. since the last - * time the system booted). The Unadjusted System Time is an unsigned - * 64 bit value that wraps back to 0 every 584 years. Time intervals - * may be either signed or unsigned. - */ -typedef khronos_uint64_t khronos_utime_nanoseconds_t; -typedef khronos_int64_t khronos_stime_nanoseconds_t; -#endif - -/* - * Dummy value used to pad enum types to 32 bits. - */ -#ifndef KHRONOS_MAX_ENUM -#define KHRONOS_MAX_ENUM 0x7FFFFFFF -#endif - -/* - * Enumerated boolean type - * - * Values other than zero should be considered to be true. Therefore - * comparisons should not be made against KHRONOS_TRUE. - */ -typedef enum { - KHRONOS_FALSE = 0, - KHRONOS_TRUE = 1, - KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM -} khronos_boolean_enum_t; - -#endif /* __khrplatform_h_ */ -typedef unsigned int GLenum; -typedef unsigned char GLboolean; -typedef unsigned int GLbitfield; -typedef void GLvoid; -typedef khronos_int8_t GLbyte; -typedef khronos_uint8_t GLubyte; -typedef khronos_int16_t GLshort; -typedef khronos_uint16_t GLushort; -typedef int GLint; -typedef unsigned int GLuint; -typedef khronos_int32_t GLclampx; -typedef int GLsizei; -typedef khronos_float_t GLfloat; -typedef khronos_float_t GLclampf; -typedef double GLdouble; -typedef double GLclampd; -typedef void *GLeglClientBufferEXT; -typedef void *GLeglImageOES; -typedef char GLchar; -typedef char GLcharARB; -#ifdef __APPLE__ -typedef void *GLhandleARB; -#else -typedef unsigned int GLhandleARB; -#endif -typedef khronos_uint16_t GLhalf; -typedef khronos_uint16_t GLhalfARB; -typedef khronos_int32_t GLfixed; -#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060) -typedef khronos_intptr_t GLintptr; -#else -typedef khronos_intptr_t GLintptr; -#endif -#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060) -typedef khronos_intptr_t GLintptrARB; -#else -typedef khronos_intptr_t GLintptrARB; -#endif -#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060) -typedef khronos_ssize_t GLsizeiptr; -#else -typedef khronos_ssize_t GLsizeiptr; -#endif -#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060) -typedef khronos_ssize_t GLsizeiptrARB; -#else -typedef khronos_ssize_t GLsizeiptrARB; -#endif -typedef khronos_int64_t GLint64; -typedef khronos_int64_t GLint64EXT; -typedef khronos_uint64_t GLuint64; -typedef khronos_uint64_t GLuint64EXT; -typedef struct __GLsync *GLsync; -struct _cl_context; -struct _cl_event; -typedef void (GLAD_API_PTR *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); -typedef void (GLAD_API_PTR *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); -typedef void (GLAD_API_PTR *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); -typedef void (GLAD_API_PTR *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam); -typedef unsigned short GLhalfNV; -typedef GLintptr GLvdpauSurfaceNV; -typedef void (GLAD_API_PTR *GLVULKANPROCNV)(void); - - -#define GL_VERSION_1_0 1 -#define GL_VERSION_1_1 1 -#define GL_VERSION_1_2 1 -#define GL_VERSION_1_3 1 -#define GL_VERSION_1_4 1 -#define GL_VERSION_1_5 1 -#define GL_VERSION_2_0 1 -#define GL_VERSION_2_1 1 -#define GL_VERSION_3_0 1 -#define GL_VERSION_3_1 1 -#define GL_VERSION_3_2 1 -#define GL_VERSION_3_3 1 -#define GL_VERSION_4_0 1 -#define GL_VERSION_4_1 1 -#define GL_VERSION_4_2 1 -#define GL_VERSION_4_3 1 -#define GL_VERSION_4_4 1 -#define GL_VERSION_4_5 1 -#define GL_VERSION_4_6 1 - - -typedef void (GLAD_API_PTR *PFNGLACTIVESHADERPROGRAMPROC)(GLuint pipeline, GLuint program); -typedef void (GLAD_API_PTR *PFNGLACTIVETEXTUREPROC)(GLenum texture); -typedef void (GLAD_API_PTR *PFNGLATTACHSHADERPROC)(GLuint program, GLuint shader); -typedef void (GLAD_API_PTR *PFNGLBEGINCONDITIONALRENDERPROC)(GLuint id, GLenum mode); -typedef void (GLAD_API_PTR *PFNGLBEGINQUERYPROC)(GLenum target, GLuint id); -typedef void (GLAD_API_PTR *PFNGLBEGINQUERYINDEXEDPROC)(GLenum target, GLuint index, GLuint id); -typedef void (GLAD_API_PTR *PFNGLBEGINTRANSFORMFEEDBACKPROC)(GLenum primitiveMode); -typedef void (GLAD_API_PTR *PFNGLBINDATTRIBLOCATIONPROC)(GLuint program, GLuint index, const GLchar * name); -typedef void (GLAD_API_PTR *PFNGLBINDBUFFERPROC)(GLenum target, GLuint buffer); -typedef void (GLAD_API_PTR *PFNGLBINDBUFFERBASEPROC)(GLenum target, GLuint index, GLuint buffer); -typedef void (GLAD_API_PTR *PFNGLBINDBUFFERRANGEPROC)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (GLAD_API_PTR *PFNGLBINDBUFFERSBASEPROC)(GLenum target, GLuint first, GLsizei count, const GLuint * buffers); -typedef void (GLAD_API_PTR *PFNGLBINDBUFFERSRANGEPROC)(GLenum target, GLuint first, GLsizei count, const GLuint * buffers, const GLintptr * offsets, const GLsizeiptr * sizes); -typedef void (GLAD_API_PTR *PFNGLBINDFRAGDATALOCATIONPROC)(GLuint program, GLuint color, const GLchar * name); -typedef void (GLAD_API_PTR *PFNGLBINDFRAGDATALOCATIONINDEXEDPROC)(GLuint program, GLuint colorNumber, GLuint index, const GLchar * name); -typedef void (GLAD_API_PTR *PFNGLBINDFRAMEBUFFERPROC)(GLenum target, GLuint framebuffer); -typedef void (GLAD_API_PTR *PFNGLBINDIMAGETEXTUREPROC)(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); -typedef void (GLAD_API_PTR *PFNGLBINDIMAGETEXTURESPROC)(GLuint first, GLsizei count, const GLuint * textures); -typedef void (GLAD_API_PTR *PFNGLBINDPROGRAMPIPELINEPROC)(GLuint pipeline); -typedef void (GLAD_API_PTR *PFNGLBINDRENDERBUFFERPROC)(GLenum target, GLuint renderbuffer); -typedef void (GLAD_API_PTR *PFNGLBINDSAMPLERPROC)(GLuint unit, GLuint sampler); -typedef void (GLAD_API_PTR *PFNGLBINDSAMPLERSPROC)(GLuint first, GLsizei count, const GLuint * samplers); -typedef void (GLAD_API_PTR *PFNGLBINDTEXTUREPROC)(GLenum target, GLuint texture); -typedef void (GLAD_API_PTR *PFNGLBINDTEXTUREUNITPROC)(GLuint unit, GLuint texture); -typedef void (GLAD_API_PTR *PFNGLBINDTEXTURESPROC)(GLuint first, GLsizei count, const GLuint * textures); -typedef void (GLAD_API_PTR *PFNGLBINDTRANSFORMFEEDBACKPROC)(GLenum target, GLuint id); -typedef void (GLAD_API_PTR *PFNGLBINDVERTEXARRAYPROC)(GLuint array); -typedef void (GLAD_API_PTR *PFNGLBINDVERTEXBUFFERPROC)(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); -typedef void (GLAD_API_PTR *PFNGLBINDVERTEXBUFFERSPROC)(GLuint first, GLsizei count, const GLuint * buffers, const GLintptr * offsets, const GLsizei * strides); -typedef void (GLAD_API_PTR *PFNGLBLENDCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -typedef void (GLAD_API_PTR *PFNGLBLENDEQUATIONPROC)(GLenum mode); -typedef void (GLAD_API_PTR *PFNGLBLENDEQUATIONSEPARATEPROC)(GLenum modeRGB, GLenum modeAlpha); -typedef void (GLAD_API_PTR *PFNGLBLENDEQUATIONSEPARATEIPROC)(GLuint buf, GLenum modeRGB, GLenum modeAlpha); -typedef void (GLAD_API_PTR *PFNGLBLENDEQUATIONIPROC)(GLuint buf, GLenum mode); -typedef void (GLAD_API_PTR *PFNGLBLENDFUNCPROC)(GLenum sfactor, GLenum dfactor); -typedef void (GLAD_API_PTR *PFNGLBLENDFUNCSEPARATEPROC)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -typedef void (GLAD_API_PTR *PFNGLBLENDFUNCSEPARATEIPROC)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -typedef void (GLAD_API_PTR *PFNGLBLENDFUNCIPROC)(GLuint buf, GLenum src, GLenum dst); -typedef void (GLAD_API_PTR *PFNGLBLITFRAMEBUFFERPROC)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -typedef void (GLAD_API_PTR *PFNGLBLITNAMEDFRAMEBUFFERPROC)(GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -typedef void (GLAD_API_PTR *PFNGLBUFFERDATAPROC)(GLenum target, GLsizeiptr size, const void * data, GLenum usage); -typedef void (GLAD_API_PTR *PFNGLBUFFERSTORAGEPROC)(GLenum target, GLsizeiptr size, const void * data, GLbitfield flags); -typedef void (GLAD_API_PTR *PFNGLBUFFERSUBDATAPROC)(GLenum target, GLintptr offset, GLsizeiptr size, const void * data); -typedef GLenum (GLAD_API_PTR *PFNGLCHECKFRAMEBUFFERSTATUSPROC)(GLenum target); -typedef GLenum (GLAD_API_PTR *PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC)(GLuint framebuffer, GLenum target); -typedef void (GLAD_API_PTR *PFNGLCLAMPCOLORPROC)(GLenum target, GLenum clamp); -typedef void (GLAD_API_PTR *PFNGLCLEARPROC)(GLbitfield mask); -typedef void (GLAD_API_PTR *PFNGLCLEARBUFFERDATAPROC)(GLenum target, GLenum internalformat, GLenum format, GLenum type, const void * data); -typedef void (GLAD_API_PTR *PFNGLCLEARBUFFERSUBDATAPROC)(GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void * data); -typedef void (GLAD_API_PTR *PFNGLCLEARBUFFERFIPROC)(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); -typedef void (GLAD_API_PTR *PFNGLCLEARBUFFERFVPROC)(GLenum buffer, GLint drawbuffer, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLCLEARBUFFERIVPROC)(GLenum buffer, GLint drawbuffer, const GLint * value); -typedef void (GLAD_API_PTR *PFNGLCLEARBUFFERUIVPROC)(GLenum buffer, GLint drawbuffer, const GLuint * value); -typedef void (GLAD_API_PTR *PFNGLCLEARCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -typedef void (GLAD_API_PTR *PFNGLCLEARDEPTHPROC)(GLdouble depth); -typedef void (GLAD_API_PTR *PFNGLCLEARDEPTHFPROC)(GLfloat d); -typedef void (GLAD_API_PTR *PFNGLCLEARNAMEDBUFFERDATAPROC)(GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void * data); -typedef void (GLAD_API_PTR *PFNGLCLEARNAMEDBUFFERSUBDATAPROC)(GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void * data); -typedef void (GLAD_API_PTR *PFNGLCLEARNAMEDFRAMEBUFFERFIPROC)(GLuint framebuffer, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); -typedef void (GLAD_API_PTR *PFNGLCLEARNAMEDFRAMEBUFFERFVPROC)(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLCLEARNAMEDFRAMEBUFFERIVPROC)(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint * value); -typedef void (GLAD_API_PTR *PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC)(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint * value); -typedef void (GLAD_API_PTR *PFNGLCLEARSTENCILPROC)(GLint s); -typedef void (GLAD_API_PTR *PFNGLCLEARTEXIMAGEPROC)(GLuint texture, GLint level, GLenum format, GLenum type, const void * data); -typedef void (GLAD_API_PTR *PFNGLCLEARTEXSUBIMAGEPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); -typedef GLenum (GLAD_API_PTR *PFNGLCLIENTWAITSYNCPROC)(GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (GLAD_API_PTR *PFNGLCLIPCONTROLPROC)(GLenum origin, GLenum depth); -typedef void (GLAD_API_PTR *PFNGLCOLORMASKPROC)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -typedef void (GLAD_API_PTR *PFNGLCOLORMASKIPROC)(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -typedef void (GLAD_API_PTR *PFNGLCOMPILESHADERPROC)(GLuint shader); -typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXIMAGE1DPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void * data); -typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXIMAGE2DPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void * data); -typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXIMAGE3DPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void * data); -typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void * data); -typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void * data); -typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * data); -typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC)(GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void * data); -typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void * data); -typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * data); -typedef void (GLAD_API_PTR *PFNGLCOPYBUFFERSUBDATAPROC)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -typedef void (GLAD_API_PTR *PFNGLCOPYIMAGESUBDATAPROC)(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); -typedef void (GLAD_API_PTR *PFNGLCOPYNAMEDBUFFERSUBDATAPROC)(GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -typedef void (GLAD_API_PTR *PFNGLCOPYTEXIMAGE1DPROC)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -typedef void (GLAD_API_PTR *PFNGLCOPYTEXIMAGE2DPROC)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -typedef void (GLAD_API_PTR *PFNGLCOPYTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -typedef void (GLAD_API_PTR *PFNGLCOPYTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (GLAD_API_PTR *PFNGLCOPYTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (GLAD_API_PTR *PFNGLCOPYTEXTURESUBIMAGE1DPROC)(GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -typedef void (GLAD_API_PTR *PFNGLCOPYTEXTURESUBIMAGE2DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (GLAD_API_PTR *PFNGLCOPYTEXTURESUBIMAGE3DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (GLAD_API_PTR *PFNGLCREATEBUFFERSPROC)(GLsizei n, GLuint * buffers); -typedef void (GLAD_API_PTR *PFNGLCREATEFRAMEBUFFERSPROC)(GLsizei n, GLuint * framebuffers); -typedef GLuint (GLAD_API_PTR *PFNGLCREATEPROGRAMPROC)(void); -typedef void (GLAD_API_PTR *PFNGLCREATEPROGRAMPIPELINESPROC)(GLsizei n, GLuint * pipelines); -typedef void (GLAD_API_PTR *PFNGLCREATEQUERIESPROC)(GLenum target, GLsizei n, GLuint * ids); -typedef void (GLAD_API_PTR *PFNGLCREATERENDERBUFFERSPROC)(GLsizei n, GLuint * renderbuffers); -typedef void (GLAD_API_PTR *PFNGLCREATESAMPLERSPROC)(GLsizei n, GLuint * samplers); -typedef GLuint (GLAD_API_PTR *PFNGLCREATESHADERPROC)(GLenum type); -typedef GLuint (GLAD_API_PTR *PFNGLCREATESHADERPROGRAMVPROC)(GLenum type, GLsizei count, const GLchar *const* strings); -typedef void (GLAD_API_PTR *PFNGLCREATETEXTURESPROC)(GLenum target, GLsizei n, GLuint * textures); -typedef void (GLAD_API_PTR *PFNGLCREATETRANSFORMFEEDBACKSPROC)(GLsizei n, GLuint * ids); -typedef void (GLAD_API_PTR *PFNGLCREATEVERTEXARRAYSPROC)(GLsizei n, GLuint * arrays); -typedef void (GLAD_API_PTR *PFNGLCULLFACEPROC)(GLenum mode); -typedef void (GLAD_API_PTR *PFNGLDEBUGMESSAGECALLBACKPROC)(GLDEBUGPROC callback, const void * userParam); -typedef void (GLAD_API_PTR *PFNGLDEBUGMESSAGECONTROLPROC)(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled); -typedef void (GLAD_API_PTR *PFNGLDEBUGMESSAGEINSERTPROC)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf); -typedef void (GLAD_API_PTR *PFNGLDELETEBUFFERSPROC)(GLsizei n, const GLuint * buffers); -typedef void (GLAD_API_PTR *PFNGLDELETEFRAMEBUFFERSPROC)(GLsizei n, const GLuint * framebuffers); -typedef void (GLAD_API_PTR *PFNGLDELETEPROGRAMPROC)(GLuint program); -typedef void (GLAD_API_PTR *PFNGLDELETEPROGRAMPIPELINESPROC)(GLsizei n, const GLuint * pipelines); -typedef void (GLAD_API_PTR *PFNGLDELETEQUERIESPROC)(GLsizei n, const GLuint * ids); -typedef void (GLAD_API_PTR *PFNGLDELETERENDERBUFFERSPROC)(GLsizei n, const GLuint * renderbuffers); -typedef void (GLAD_API_PTR *PFNGLDELETESAMPLERSPROC)(GLsizei count, const GLuint * samplers); -typedef void (GLAD_API_PTR *PFNGLDELETESHADERPROC)(GLuint shader); -typedef void (GLAD_API_PTR *PFNGLDELETESYNCPROC)(GLsync sync); -typedef void (GLAD_API_PTR *PFNGLDELETETEXTURESPROC)(GLsizei n, const GLuint * textures); -typedef void (GLAD_API_PTR *PFNGLDELETETRANSFORMFEEDBACKSPROC)(GLsizei n, const GLuint * ids); -typedef void (GLAD_API_PTR *PFNGLDELETEVERTEXARRAYSPROC)(GLsizei n, const GLuint * arrays); -typedef void (GLAD_API_PTR *PFNGLDEPTHFUNCPROC)(GLenum func); -typedef void (GLAD_API_PTR *PFNGLDEPTHMASKPROC)(GLboolean flag); -typedef void (GLAD_API_PTR *PFNGLDEPTHRANGEPROC)(GLdouble n, GLdouble f); -typedef void (GLAD_API_PTR *PFNGLDEPTHRANGEARRAYVPROC)(GLuint first, GLsizei count, const GLdouble * v); -typedef void (GLAD_API_PTR *PFNGLDEPTHRANGEINDEXEDPROC)(GLuint index, GLdouble n, GLdouble f); -typedef void (GLAD_API_PTR *PFNGLDEPTHRANGEFPROC)(GLfloat n, GLfloat f); -typedef void (GLAD_API_PTR *PFNGLDETACHSHADERPROC)(GLuint program, GLuint shader); -typedef void (GLAD_API_PTR *PFNGLDISABLEPROC)(GLenum cap); -typedef void (GLAD_API_PTR *PFNGLDISABLEVERTEXARRAYATTRIBPROC)(GLuint vaobj, GLuint index); -typedef void (GLAD_API_PTR *PFNGLDISABLEVERTEXATTRIBARRAYPROC)(GLuint index); -typedef void (GLAD_API_PTR *PFNGLDISABLEIPROC)(GLenum target, GLuint index); -typedef void (GLAD_API_PTR *PFNGLDISPATCHCOMPUTEPROC)(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); -typedef void (GLAD_API_PTR *PFNGLDISPATCHCOMPUTEINDIRECTPROC)(GLintptr indirect); -typedef void (GLAD_API_PTR *PFNGLDRAWARRAYSPROC)(GLenum mode, GLint first, GLsizei count); -typedef void (GLAD_API_PTR *PFNGLDRAWARRAYSINDIRECTPROC)(GLenum mode, const void * indirect); -typedef void (GLAD_API_PTR *PFNGLDRAWARRAYSINSTANCEDPROC)(GLenum mode, GLint first, GLsizei count, GLsizei instancecount); -typedef void (GLAD_API_PTR *PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC)(GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); -typedef void (GLAD_API_PTR *PFNGLDRAWBUFFERPROC)(GLenum buf); -typedef void (GLAD_API_PTR *PFNGLDRAWBUFFERSPROC)(GLsizei n, const GLenum * bufs); -typedef void (GLAD_API_PTR *PFNGLDRAWELEMENTSPROC)(GLenum mode, GLsizei count, GLenum type, const void * indices); -typedef void (GLAD_API_PTR *PFNGLDRAWELEMENTSBASEVERTEXPROC)(GLenum mode, GLsizei count, GLenum type, const void * indices, GLint basevertex); -typedef void (GLAD_API_PTR *PFNGLDRAWELEMENTSINDIRECTPROC)(GLenum mode, GLenum type, const void * indirect); -typedef void (GLAD_API_PTR *PFNGLDRAWELEMENTSINSTANCEDPROC)(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount); -typedef void (GLAD_API_PTR *PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC)(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount, GLuint baseinstance); -typedef void (GLAD_API_PTR *PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC)(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount, GLint basevertex); -typedef void (GLAD_API_PTR *PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC)(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance); -typedef void (GLAD_API_PTR *PFNGLDRAWRANGEELEMENTSPROC)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void * indices); -typedef void (GLAD_API_PTR *PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void * indices, GLint basevertex); -typedef void (GLAD_API_PTR *PFNGLDRAWTRANSFORMFEEDBACKPROC)(GLenum mode, GLuint id); -typedef void (GLAD_API_PTR *PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC)(GLenum mode, GLuint id, GLsizei instancecount); -typedef void (GLAD_API_PTR *PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC)(GLenum mode, GLuint id, GLuint stream); -typedef void (GLAD_API_PTR *PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC)(GLenum mode, GLuint id, GLuint stream, GLsizei instancecount); -typedef void (GLAD_API_PTR *PFNGLENABLEPROC)(GLenum cap); -typedef void (GLAD_API_PTR *PFNGLENABLEVERTEXARRAYATTRIBPROC)(GLuint vaobj, GLuint index); -typedef void (GLAD_API_PTR *PFNGLENABLEVERTEXATTRIBARRAYPROC)(GLuint index); -typedef void (GLAD_API_PTR *PFNGLENABLEIPROC)(GLenum target, GLuint index); -typedef void (GLAD_API_PTR *PFNGLENDCONDITIONALRENDERPROC)(void); -typedef void (GLAD_API_PTR *PFNGLENDQUERYPROC)(GLenum target); -typedef void (GLAD_API_PTR *PFNGLENDQUERYINDEXEDPROC)(GLenum target, GLuint index); -typedef void (GLAD_API_PTR *PFNGLENDTRANSFORMFEEDBACKPROC)(void); -typedef GLsync (GLAD_API_PTR *PFNGLFENCESYNCPROC)(GLenum condition, GLbitfield flags); -typedef void (GLAD_API_PTR *PFNGLFINISHPROC)(void); -typedef void (GLAD_API_PTR *PFNGLFLUSHPROC)(void); -typedef void (GLAD_API_PTR *PFNGLFLUSHMAPPEDBUFFERRANGEPROC)(GLenum target, GLintptr offset, GLsizeiptr length); -typedef void (GLAD_API_PTR *PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC)(GLuint buffer, GLintptr offset, GLsizeiptr length); -typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERPARAMETERIPROC)(GLenum target, GLenum pname, GLint param); -typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERRENDERBUFFERPROC)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTUREPROC)(GLenum target, GLenum attachment, GLuint texture, GLint level); -typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURE1DPROC)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURE2DPROC)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURE3DPROC)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURELAYERPROC)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -typedef void (GLAD_API_PTR *PFNGLFRONTFACEPROC)(GLenum mode); -typedef void (GLAD_API_PTR *PFNGLGENBUFFERSPROC)(GLsizei n, GLuint * buffers); -typedef void (GLAD_API_PTR *PFNGLGENFRAMEBUFFERSPROC)(GLsizei n, GLuint * framebuffers); -typedef void (GLAD_API_PTR *PFNGLGENPROGRAMPIPELINESPROC)(GLsizei n, GLuint * pipelines); -typedef void (GLAD_API_PTR *PFNGLGENQUERIESPROC)(GLsizei n, GLuint * ids); -typedef void (GLAD_API_PTR *PFNGLGENRENDERBUFFERSPROC)(GLsizei n, GLuint * renderbuffers); -typedef void (GLAD_API_PTR *PFNGLGENSAMPLERSPROC)(GLsizei count, GLuint * samplers); -typedef void (GLAD_API_PTR *PFNGLGENTEXTURESPROC)(GLsizei n, GLuint * textures); -typedef void (GLAD_API_PTR *PFNGLGENTRANSFORMFEEDBACKSPROC)(GLsizei n, GLuint * ids); -typedef void (GLAD_API_PTR *PFNGLGENVERTEXARRAYSPROC)(GLsizei n, GLuint * arrays); -typedef void (GLAD_API_PTR *PFNGLGENERATEMIPMAPPROC)(GLenum target); -typedef void (GLAD_API_PTR *PFNGLGENERATETEXTUREMIPMAPPROC)(GLuint texture); -typedef void (GLAD_API_PTR *PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC)(GLuint program, GLuint bufferIndex, GLenum pname, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETACTIVEATTRIBPROC)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name); -typedef void (GLAD_API_PTR *PFNGLGETACTIVESUBROUTINENAMEPROC)(GLuint program, GLenum shadertype, GLuint index, GLsizei bufSize, GLsizei * length, GLchar * name); -typedef void (GLAD_API_PTR *PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC)(GLuint program, GLenum shadertype, GLuint index, GLsizei bufSize, GLsizei * length, GLchar * name); -typedef void (GLAD_API_PTR *PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC)(GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint * values); -typedef void (GLAD_API_PTR *PFNGLGETACTIVEUNIFORMPROC)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name); -typedef void (GLAD_API_PTR *PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC)(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei * length, GLchar * uniformBlockName); -typedef void (GLAD_API_PTR *PFNGLGETACTIVEUNIFORMBLOCKIVPROC)(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETACTIVEUNIFORMNAMEPROC)(GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei * length, GLchar * uniformName); -typedef void (GLAD_API_PTR *PFNGLGETACTIVEUNIFORMSIVPROC)(GLuint program, GLsizei uniformCount, const GLuint * uniformIndices, GLenum pname, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETATTACHEDSHADERSPROC)(GLuint program, GLsizei maxCount, GLsizei * count, GLuint * shaders); -typedef GLint (GLAD_API_PTR *PFNGLGETATTRIBLOCATIONPROC)(GLuint program, const GLchar * name); -typedef void (GLAD_API_PTR *PFNGLGETBOOLEANI_VPROC)(GLenum target, GLuint index, GLboolean * data); -typedef void (GLAD_API_PTR *PFNGLGETBOOLEANVPROC)(GLenum pname, GLboolean * data); -typedef void (GLAD_API_PTR *PFNGLGETBUFFERPARAMETERI64VPROC)(GLenum target, GLenum pname, GLint64 * params); -typedef void (GLAD_API_PTR *PFNGLGETBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETBUFFERPOINTERVPROC)(GLenum target, GLenum pname, void ** params); -typedef void (GLAD_API_PTR *PFNGLGETBUFFERSUBDATAPROC)(GLenum target, GLintptr offset, GLsizeiptr size, void * data); -typedef void (GLAD_API_PTR *PFNGLGETCOMPRESSEDTEXIMAGEPROC)(GLenum target, GLint level, void * img); -typedef void (GLAD_API_PTR *PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC)(GLuint texture, GLint level, GLsizei bufSize, void * pixels); -typedef void (GLAD_API_PTR *PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void * pixels); -typedef GLuint (GLAD_API_PTR *PFNGLGETDEBUGMESSAGELOGPROC)(GLuint count, GLsizei bufSize, GLenum * sources, GLenum * types, GLuint * ids, GLenum * severities, GLsizei * lengths, GLchar * messageLog); -typedef void (GLAD_API_PTR *PFNGLGETDOUBLEI_VPROC)(GLenum target, GLuint index, GLdouble * data); -typedef void (GLAD_API_PTR *PFNGLGETDOUBLEVPROC)(GLenum pname, GLdouble * data); -typedef GLenum (GLAD_API_PTR *PFNGLGETERRORPROC)(void); -typedef void (GLAD_API_PTR *PFNGLGETFLOATI_VPROC)(GLenum target, GLuint index, GLfloat * data); -typedef void (GLAD_API_PTR *PFNGLGETFLOATVPROC)(GLenum pname, GLfloat * data); -typedef GLint (GLAD_API_PTR *PFNGLGETFRAGDATAINDEXPROC)(GLuint program, const GLchar * name); -typedef GLint (GLAD_API_PTR *PFNGLGETFRAGDATALOCATIONPROC)(GLuint program, const GLchar * name); -typedef void (GLAD_API_PTR *PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)(GLenum target, GLenum attachment, GLenum pname, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETFRAMEBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint * params); -typedef GLenum (GLAD_API_PTR *PFNGLGETGRAPHICSRESETSTATUSPROC)(void); -typedef void (GLAD_API_PTR *PFNGLGETINTEGER64I_VPROC)(GLenum target, GLuint index, GLint64 * data); -typedef void (GLAD_API_PTR *PFNGLGETINTEGER64VPROC)(GLenum pname, GLint64 * data); -typedef void (GLAD_API_PTR *PFNGLGETINTEGERI_VPROC)(GLenum target, GLuint index, GLint * data); -typedef void (GLAD_API_PTR *PFNGLGETINTEGERVPROC)(GLenum pname, GLint * data); -typedef void (GLAD_API_PTR *PFNGLGETINTERNALFORMATI64VPROC)(GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint64 * params); -typedef void (GLAD_API_PTR *PFNGLGETINTERNALFORMATIVPROC)(GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETMULTISAMPLEFVPROC)(GLenum pname, GLuint index, GLfloat * val); -typedef void (GLAD_API_PTR *PFNGLGETNAMEDBUFFERPARAMETERI64VPROC)(GLuint buffer, GLenum pname, GLint64 * params); -typedef void (GLAD_API_PTR *PFNGLGETNAMEDBUFFERPARAMETERIVPROC)(GLuint buffer, GLenum pname, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETNAMEDBUFFERPOINTERVPROC)(GLuint buffer, GLenum pname, void ** params); -typedef void (GLAD_API_PTR *PFNGLGETNAMEDBUFFERSUBDATAPROC)(GLuint buffer, GLintptr offset, GLsizeiptr size, void * data); -typedef void (GLAD_API_PTR *PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC)(GLuint framebuffer, GLenum attachment, GLenum pname, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC)(GLuint framebuffer, GLenum pname, GLint * param); -typedef void (GLAD_API_PTR *PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC)(GLuint renderbuffer, GLenum pname, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETOBJECTLABELPROC)(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei * length, GLchar * label); -typedef void (GLAD_API_PTR *PFNGLGETOBJECTPTRLABELPROC)(const void * ptr, GLsizei bufSize, GLsizei * length, GLchar * label); -typedef void (GLAD_API_PTR *PFNGLGETPOINTERVPROC)(GLenum pname, void ** params); -typedef void (GLAD_API_PTR *PFNGLGETPROGRAMBINARYPROC)(GLuint program, GLsizei bufSize, GLsizei * length, GLenum * binaryFormat, void * binary); -typedef void (GLAD_API_PTR *PFNGLGETPROGRAMINFOLOGPROC)(GLuint program, GLsizei bufSize, GLsizei * length, GLchar * infoLog); -typedef void (GLAD_API_PTR *PFNGLGETPROGRAMINTERFACEIVPROC)(GLuint program, GLenum programInterface, GLenum pname, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETPROGRAMPIPELINEINFOLOGPROC)(GLuint pipeline, GLsizei bufSize, GLsizei * length, GLchar * infoLog); -typedef void (GLAD_API_PTR *PFNGLGETPROGRAMPIPELINEIVPROC)(GLuint pipeline, GLenum pname, GLint * params); -typedef GLuint (GLAD_API_PTR *PFNGLGETPROGRAMRESOURCEINDEXPROC)(GLuint program, GLenum programInterface, const GLchar * name); -typedef GLint (GLAD_API_PTR *PFNGLGETPROGRAMRESOURCELOCATIONPROC)(GLuint program, GLenum programInterface, const GLchar * name); -typedef GLint (GLAD_API_PTR *PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC)(GLuint program, GLenum programInterface, const GLchar * name); -typedef void (GLAD_API_PTR *PFNGLGETPROGRAMRESOURCENAMEPROC)(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei * length, GLchar * name); -typedef void (GLAD_API_PTR *PFNGLGETPROGRAMRESOURCEIVPROC)(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum * props, GLsizei count, GLsizei * length, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETPROGRAMSTAGEIVPROC)(GLuint program, GLenum shadertype, GLenum pname, GLint * values); -typedef void (GLAD_API_PTR *PFNGLGETPROGRAMIVPROC)(GLuint program, GLenum pname, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETQUERYBUFFEROBJECTI64VPROC)(GLuint id, GLuint buffer, GLenum pname, GLintptr offset); -typedef void (GLAD_API_PTR *PFNGLGETQUERYBUFFEROBJECTIVPROC)(GLuint id, GLuint buffer, GLenum pname, GLintptr offset); -typedef void (GLAD_API_PTR *PFNGLGETQUERYBUFFEROBJECTUI64VPROC)(GLuint id, GLuint buffer, GLenum pname, GLintptr offset); -typedef void (GLAD_API_PTR *PFNGLGETQUERYBUFFEROBJECTUIVPROC)(GLuint id, GLuint buffer, GLenum pname, GLintptr offset); -typedef void (GLAD_API_PTR *PFNGLGETQUERYINDEXEDIVPROC)(GLenum target, GLuint index, GLenum pname, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETQUERYOBJECTI64VPROC)(GLuint id, GLenum pname, GLint64 * params); -typedef void (GLAD_API_PTR *PFNGLGETQUERYOBJECTIVPROC)(GLuint id, GLenum pname, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETQUERYOBJECTUI64VPROC)(GLuint id, GLenum pname, GLuint64 * params); -typedef void (GLAD_API_PTR *PFNGLGETQUERYOBJECTUIVPROC)(GLuint id, GLenum pname, GLuint * params); -typedef void (GLAD_API_PTR *PFNGLGETQUERYIVPROC)(GLenum target, GLenum pname, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETRENDERBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERIIVPROC)(GLuint sampler, GLenum pname, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERIUIVPROC)(GLuint sampler, GLenum pname, GLuint * params); -typedef void (GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERFVPROC)(GLuint sampler, GLenum pname, GLfloat * params); -typedef void (GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERIVPROC)(GLuint sampler, GLenum pname, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETSHADERINFOLOGPROC)(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * infoLog); -typedef void (GLAD_API_PTR *PFNGLGETSHADERPRECISIONFORMATPROC)(GLenum shadertype, GLenum precisiontype, GLint * range, GLint * precision); -typedef void (GLAD_API_PTR *PFNGLGETSHADERSOURCEPROC)(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * source); -typedef void (GLAD_API_PTR *PFNGLGETSHADERIVPROC)(GLuint shader, GLenum pname, GLint * params); -typedef const GLubyte * (GLAD_API_PTR *PFNGLGETSTRINGPROC)(GLenum name); -typedef const GLubyte * (GLAD_API_PTR *PFNGLGETSTRINGIPROC)(GLenum name, GLuint index); -typedef GLuint (GLAD_API_PTR *PFNGLGETSUBROUTINEINDEXPROC)(GLuint program, GLenum shadertype, const GLchar * name); -typedef GLint (GLAD_API_PTR *PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC)(GLuint program, GLenum shadertype, const GLchar * name); -typedef void (GLAD_API_PTR *PFNGLGETSYNCIVPROC)(GLsync sync, GLenum pname, GLsizei count, GLsizei * length, GLint * values); -typedef void (GLAD_API_PTR *PFNGLGETTEXIMAGEPROC)(GLenum target, GLint level, GLenum format, GLenum type, void * pixels); -typedef void (GLAD_API_PTR *PFNGLGETTEXLEVELPARAMETERFVPROC)(GLenum target, GLint level, GLenum pname, GLfloat * params); -typedef void (GLAD_API_PTR *PFNGLGETTEXLEVELPARAMETERIVPROC)(GLenum target, GLint level, GLenum pname, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETTEXPARAMETERIIVPROC)(GLenum target, GLenum pname, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETTEXPARAMETERIUIVPROC)(GLenum target, GLenum pname, GLuint * params); -typedef void (GLAD_API_PTR *PFNGLGETTEXPARAMETERFVPROC)(GLenum target, GLenum pname, GLfloat * params); -typedef void (GLAD_API_PTR *PFNGLGETTEXPARAMETERIVPROC)(GLenum target, GLenum pname, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETTEXTUREIMAGEPROC)(GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void * pixels); -typedef void (GLAD_API_PTR *PFNGLGETTEXTURELEVELPARAMETERFVPROC)(GLuint texture, GLint level, GLenum pname, GLfloat * params); -typedef void (GLAD_API_PTR *PFNGLGETTEXTURELEVELPARAMETERIVPROC)(GLuint texture, GLint level, GLenum pname, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETTEXTUREPARAMETERIIVPROC)(GLuint texture, GLenum pname, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETTEXTUREPARAMETERIUIVPROC)(GLuint texture, GLenum pname, GLuint * params); -typedef void (GLAD_API_PTR *PFNGLGETTEXTUREPARAMETERFVPROC)(GLuint texture, GLenum pname, GLfloat * params); -typedef void (GLAD_API_PTR *PFNGLGETTEXTUREPARAMETERIVPROC)(GLuint texture, GLenum pname, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETTEXTURESUBIMAGEPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void * pixels); -typedef void (GLAD_API_PTR *PFNGLGETTRANSFORMFEEDBACKVARYINGPROC)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name); -typedef void (GLAD_API_PTR *PFNGLGETTRANSFORMFEEDBACKI64_VPROC)(GLuint xfb, GLenum pname, GLuint index, GLint64 * param); -typedef void (GLAD_API_PTR *PFNGLGETTRANSFORMFEEDBACKI_VPROC)(GLuint xfb, GLenum pname, GLuint index, GLint * param); -typedef void (GLAD_API_PTR *PFNGLGETTRANSFORMFEEDBACKIVPROC)(GLuint xfb, GLenum pname, GLint * param); -typedef GLuint (GLAD_API_PTR *PFNGLGETUNIFORMBLOCKINDEXPROC)(GLuint program, const GLchar * uniformBlockName); -typedef void (GLAD_API_PTR *PFNGLGETUNIFORMINDICESPROC)(GLuint program, GLsizei uniformCount, const GLchar *const* uniformNames, GLuint * uniformIndices); -typedef GLint (GLAD_API_PTR *PFNGLGETUNIFORMLOCATIONPROC)(GLuint program, const GLchar * name); -typedef void (GLAD_API_PTR *PFNGLGETUNIFORMSUBROUTINEUIVPROC)(GLenum shadertype, GLint location, GLuint * params); -typedef void (GLAD_API_PTR *PFNGLGETUNIFORMDVPROC)(GLuint program, GLint location, GLdouble * params); -typedef void (GLAD_API_PTR *PFNGLGETUNIFORMFVPROC)(GLuint program, GLint location, GLfloat * params); -typedef void (GLAD_API_PTR *PFNGLGETUNIFORMIVPROC)(GLuint program, GLint location, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETUNIFORMUIVPROC)(GLuint program, GLint location, GLuint * params); -typedef void (GLAD_API_PTR *PFNGLGETVERTEXARRAYINDEXED64IVPROC)(GLuint vaobj, GLuint index, GLenum pname, GLint64 * param); -typedef void (GLAD_API_PTR *PFNGLGETVERTEXARRAYINDEXEDIVPROC)(GLuint vaobj, GLuint index, GLenum pname, GLint * param); -typedef void (GLAD_API_PTR *PFNGLGETVERTEXARRAYIVPROC)(GLuint vaobj, GLenum pname, GLint * param); -typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBIIVPROC)(GLuint index, GLenum pname, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBIUIVPROC)(GLuint index, GLenum pname, GLuint * params); -typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBLDVPROC)(GLuint index, GLenum pname, GLdouble * params); -typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBPOINTERVPROC)(GLuint index, GLenum pname, void ** pointer); -typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBDVPROC)(GLuint index, GLenum pname, GLdouble * params); -typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBFVPROC)(GLuint index, GLenum pname, GLfloat * params); -typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBIVPROC)(GLuint index, GLenum pname, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETNCOMPRESSEDTEXIMAGEPROC)(GLenum target, GLint lod, GLsizei bufSize, void * pixels); -typedef void (GLAD_API_PTR *PFNGLGETNTEXIMAGEPROC)(GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void * pixels); -typedef void (GLAD_API_PTR *PFNGLGETNUNIFORMDVPROC)(GLuint program, GLint location, GLsizei bufSize, GLdouble * params); -typedef void (GLAD_API_PTR *PFNGLGETNUNIFORMFVPROC)(GLuint program, GLint location, GLsizei bufSize, GLfloat * params); -typedef void (GLAD_API_PTR *PFNGLGETNUNIFORMIVPROC)(GLuint program, GLint location, GLsizei bufSize, GLint * params); -typedef void (GLAD_API_PTR *PFNGLGETNUNIFORMUIVPROC)(GLuint program, GLint location, GLsizei bufSize, GLuint * params); -typedef void (GLAD_API_PTR *PFNGLHINTPROC)(GLenum target, GLenum mode); -typedef void (GLAD_API_PTR *PFNGLINVALIDATEBUFFERDATAPROC)(GLuint buffer); -typedef void (GLAD_API_PTR *PFNGLINVALIDATEBUFFERSUBDATAPROC)(GLuint buffer, GLintptr offset, GLsizeiptr length); -typedef void (GLAD_API_PTR *PFNGLINVALIDATEFRAMEBUFFERPROC)(GLenum target, GLsizei numAttachments, const GLenum * attachments); -typedef void (GLAD_API_PTR *PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC)(GLuint framebuffer, GLsizei numAttachments, const GLenum * attachments); -typedef void (GLAD_API_PTR *PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC)(GLuint framebuffer, GLsizei numAttachments, const GLenum * attachments, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (GLAD_API_PTR *PFNGLINVALIDATESUBFRAMEBUFFERPROC)(GLenum target, GLsizei numAttachments, const GLenum * attachments, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (GLAD_API_PTR *PFNGLINVALIDATETEXIMAGEPROC)(GLuint texture, GLint level); -typedef void (GLAD_API_PTR *PFNGLINVALIDATETEXSUBIMAGEPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth); -typedef GLboolean (GLAD_API_PTR *PFNGLISBUFFERPROC)(GLuint buffer); -typedef GLboolean (GLAD_API_PTR *PFNGLISENABLEDPROC)(GLenum cap); -typedef GLboolean (GLAD_API_PTR *PFNGLISENABLEDIPROC)(GLenum target, GLuint index); -typedef GLboolean (GLAD_API_PTR *PFNGLISFRAMEBUFFERPROC)(GLuint framebuffer); -typedef GLboolean (GLAD_API_PTR *PFNGLISPROGRAMPROC)(GLuint program); -typedef GLboolean (GLAD_API_PTR *PFNGLISPROGRAMPIPELINEPROC)(GLuint pipeline); -typedef GLboolean (GLAD_API_PTR *PFNGLISQUERYPROC)(GLuint id); -typedef GLboolean (GLAD_API_PTR *PFNGLISRENDERBUFFERPROC)(GLuint renderbuffer); -typedef GLboolean (GLAD_API_PTR *PFNGLISSAMPLERPROC)(GLuint sampler); -typedef GLboolean (GLAD_API_PTR *PFNGLISSHADERPROC)(GLuint shader); -typedef GLboolean (GLAD_API_PTR *PFNGLISSYNCPROC)(GLsync sync); -typedef GLboolean (GLAD_API_PTR *PFNGLISTEXTUREPROC)(GLuint texture); -typedef GLboolean (GLAD_API_PTR *PFNGLISTRANSFORMFEEDBACKPROC)(GLuint id); -typedef GLboolean (GLAD_API_PTR *PFNGLISVERTEXARRAYPROC)(GLuint array); -typedef void (GLAD_API_PTR *PFNGLLINEWIDTHPROC)(GLfloat width); -typedef void (GLAD_API_PTR *PFNGLLINKPROGRAMPROC)(GLuint program); -typedef void (GLAD_API_PTR *PFNGLLOGICOPPROC)(GLenum opcode); -typedef void * (GLAD_API_PTR *PFNGLMAPBUFFERPROC)(GLenum target, GLenum access); -typedef void * (GLAD_API_PTR *PFNGLMAPBUFFERRANGEPROC)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -typedef void * (GLAD_API_PTR *PFNGLMAPNAMEDBUFFERPROC)(GLuint buffer, GLenum access); -typedef void * (GLAD_API_PTR *PFNGLMAPNAMEDBUFFERRANGEPROC)(GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); -typedef void (GLAD_API_PTR *PFNGLMEMORYBARRIERPROC)(GLbitfield barriers); -typedef void (GLAD_API_PTR *PFNGLMEMORYBARRIERBYREGIONPROC)(GLbitfield barriers); -typedef void (GLAD_API_PTR *PFNGLMINSAMPLESHADINGPROC)(GLfloat value); -typedef void (GLAD_API_PTR *PFNGLMULTIDRAWARRAYSPROC)(GLenum mode, const GLint * first, const GLsizei * count, GLsizei drawcount); -typedef void (GLAD_API_PTR *PFNGLMULTIDRAWARRAYSINDIRECTPROC)(GLenum mode, const void * indirect, GLsizei drawcount, GLsizei stride); -typedef void (GLAD_API_PTR *PFNGLMULTIDRAWARRAYSINDIRECTCOUNTPROC)(GLenum mode, const void * indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); -typedef void (GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSPROC)(GLenum mode, const GLsizei * count, GLenum type, const void *const* indices, GLsizei drawcount); -typedef void (GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC)(GLenum mode, const GLsizei * count, GLenum type, const void *const* indices, GLsizei drawcount, const GLint * basevertex); -typedef void (GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSINDIRECTPROC)(GLenum mode, GLenum type, const void * indirect, GLsizei drawcount, GLsizei stride); -typedef void (GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTPROC)(GLenum mode, GLenum type, const void * indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); -typedef void (GLAD_API_PTR *PFNGLNAMEDBUFFERDATAPROC)(GLuint buffer, GLsizeiptr size, const void * data, GLenum usage); -typedef void (GLAD_API_PTR *PFNGLNAMEDBUFFERSTORAGEPROC)(GLuint buffer, GLsizeiptr size, const void * data, GLbitfield flags); -typedef void (GLAD_API_PTR *PFNGLNAMEDBUFFERSUBDATAPROC)(GLuint buffer, GLintptr offset, GLsizeiptr size, const void * data); -typedef void (GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC)(GLuint framebuffer, GLenum buf); -typedef void (GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC)(GLuint framebuffer, GLsizei n, const GLenum * bufs); -typedef void (GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC)(GLuint framebuffer, GLenum pname, GLint param); -typedef void (GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC)(GLuint framebuffer, GLenum src); -typedef void (GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC)(GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERTEXTUREPROC)(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); -typedef void (GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC)(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); -typedef void (GLAD_API_PTR *PFNGLNAMEDRENDERBUFFERSTORAGEPROC)(GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GLAD_API_PTR *PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC)(GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GLAD_API_PTR *PFNGLOBJECTLABELPROC)(GLenum identifier, GLuint name, GLsizei length, const GLchar * label); -typedef void (GLAD_API_PTR *PFNGLOBJECTPTRLABELPROC)(const void * ptr, GLsizei length, const GLchar * label); -typedef void (GLAD_API_PTR *PFNGLPATCHPARAMETERFVPROC)(GLenum pname, const GLfloat * values); -typedef void (GLAD_API_PTR *PFNGLPATCHPARAMETERIPROC)(GLenum pname, GLint value); -typedef void (GLAD_API_PTR *PFNGLPAUSETRANSFORMFEEDBACKPROC)(void); -typedef void (GLAD_API_PTR *PFNGLPIXELSTOREFPROC)(GLenum pname, GLfloat param); -typedef void (GLAD_API_PTR *PFNGLPIXELSTOREIPROC)(GLenum pname, GLint param); -typedef void (GLAD_API_PTR *PFNGLPOINTPARAMETERFPROC)(GLenum pname, GLfloat param); -typedef void (GLAD_API_PTR *PFNGLPOINTPARAMETERFVPROC)(GLenum pname, const GLfloat * params); -typedef void (GLAD_API_PTR *PFNGLPOINTPARAMETERIPROC)(GLenum pname, GLint param); -typedef void (GLAD_API_PTR *PFNGLPOINTPARAMETERIVPROC)(GLenum pname, const GLint * params); -typedef void (GLAD_API_PTR *PFNGLPOINTSIZEPROC)(GLfloat size); -typedef void (GLAD_API_PTR *PFNGLPOLYGONMODEPROC)(GLenum face, GLenum mode); -typedef void (GLAD_API_PTR *PFNGLPOLYGONOFFSETPROC)(GLfloat factor, GLfloat units); -typedef void (GLAD_API_PTR *PFNGLPOLYGONOFFSETCLAMPPROC)(GLfloat factor, GLfloat units, GLfloat clamp); -typedef void (GLAD_API_PTR *PFNGLPOPDEBUGGROUPPROC)(void); -typedef void (GLAD_API_PTR *PFNGLPRIMITIVERESTARTINDEXPROC)(GLuint index); -typedef void (GLAD_API_PTR *PFNGLPROGRAMBINARYPROC)(GLuint program, GLenum binaryFormat, const void * binary, GLsizei length); -typedef void (GLAD_API_PTR *PFNGLPROGRAMPARAMETERIPROC)(GLuint program, GLenum pname, GLint value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM1DPROC)(GLuint program, GLint location, GLdouble v0); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM1DVPROC)(GLuint program, GLint location, GLsizei count, const GLdouble * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM1FPROC)(GLuint program, GLint location, GLfloat v0); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM1FVPROC)(GLuint program, GLint location, GLsizei count, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM1IPROC)(GLuint program, GLint location, GLint v0); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM1IVPROC)(GLuint program, GLint location, GLsizei count, const GLint * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM1UIPROC)(GLuint program, GLint location, GLuint v0); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM1UIVPROC)(GLuint program, GLint location, GLsizei count, const GLuint * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM2DPROC)(GLuint program, GLint location, GLdouble v0, GLdouble v1); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM2DVPROC)(GLuint program, GLint location, GLsizei count, const GLdouble * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM2FPROC)(GLuint program, GLint location, GLfloat v0, GLfloat v1); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM2FVPROC)(GLuint program, GLint location, GLsizei count, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM2IPROC)(GLuint program, GLint location, GLint v0, GLint v1); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM2IVPROC)(GLuint program, GLint location, GLsizei count, const GLint * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM2UIPROC)(GLuint program, GLint location, GLuint v0, GLuint v1); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM2UIVPROC)(GLuint program, GLint location, GLsizei count, const GLuint * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM3DPROC)(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM3DVPROC)(GLuint program, GLint location, GLsizei count, const GLdouble * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM3FPROC)(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM3FVPROC)(GLuint program, GLint location, GLsizei count, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM3IPROC)(GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM3IVPROC)(GLuint program, GLint location, GLsizei count, const GLint * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM3UIPROC)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM3UIVPROC)(GLuint program, GLint location, GLsizei count, const GLuint * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM4DPROC)(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM4DVPROC)(GLuint program, GLint location, GLsizei count, const GLdouble * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM4FPROC)(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM4FVPROC)(GLuint program, GLint location, GLsizei count, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM4IPROC)(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM4IVPROC)(GLuint program, GLint location, GLsizei count, const GLint * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM4UIPROC)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM4UIVPROC)(GLuint program, GLint location, GLsizei count, const GLuint * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); -typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLPROVOKINGVERTEXPROC)(GLenum mode); -typedef void (GLAD_API_PTR *PFNGLPUSHDEBUGGROUPPROC)(GLenum source, GLuint id, GLsizei length, const GLchar * message); -typedef void (GLAD_API_PTR *PFNGLQUERYCOUNTERPROC)(GLuint id, GLenum target); -typedef void (GLAD_API_PTR *PFNGLREADBUFFERPROC)(GLenum src); -typedef void (GLAD_API_PTR *PFNGLREADPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void * pixels); -typedef void (GLAD_API_PTR *PFNGLREADNPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void * data); -typedef void (GLAD_API_PTR *PFNGLRELEASESHADERCOMPILERPROC)(void); -typedef void (GLAD_API_PTR *PFNGLRENDERBUFFERSTORAGEPROC)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GLAD_API_PTR *PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GLAD_API_PTR *PFNGLRESUMETRANSFORMFEEDBACKPROC)(void); -typedef void (GLAD_API_PTR *PFNGLSAMPLECOVERAGEPROC)(GLfloat value, GLboolean invert); -typedef void (GLAD_API_PTR *PFNGLSAMPLEMASKIPROC)(GLuint maskNumber, GLbitfield mask); -typedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERIIVPROC)(GLuint sampler, GLenum pname, const GLint * param); -typedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERIUIVPROC)(GLuint sampler, GLenum pname, const GLuint * param); -typedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERFPROC)(GLuint sampler, GLenum pname, GLfloat param); -typedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERFVPROC)(GLuint sampler, GLenum pname, const GLfloat * param); -typedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERIPROC)(GLuint sampler, GLenum pname, GLint param); -typedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERIVPROC)(GLuint sampler, GLenum pname, const GLint * param); -typedef void (GLAD_API_PTR *PFNGLSCISSORPROC)(GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (GLAD_API_PTR *PFNGLSCISSORARRAYVPROC)(GLuint first, GLsizei count, const GLint * v); -typedef void (GLAD_API_PTR *PFNGLSCISSORINDEXEDPROC)(GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); -typedef void (GLAD_API_PTR *PFNGLSCISSORINDEXEDVPROC)(GLuint index, const GLint * v); -typedef void (GLAD_API_PTR *PFNGLSHADERBINARYPROC)(GLsizei count, const GLuint * shaders, GLenum binaryFormat, const void * binary, GLsizei length); -typedef void (GLAD_API_PTR *PFNGLSHADERSOURCEPROC)(GLuint shader, GLsizei count, const GLchar *const* string, const GLint * length); -typedef void (GLAD_API_PTR *PFNGLSHADERSTORAGEBLOCKBINDINGPROC)(GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding); -typedef void (GLAD_API_PTR *PFNGLSPECIALIZESHADERPROC)(GLuint shader, const GLchar * pEntryPoint, GLuint numSpecializationConstants, const GLuint * pConstantIndex, const GLuint * pConstantValue); -typedef void (GLAD_API_PTR *PFNGLSTENCILFUNCPROC)(GLenum func, GLint ref, GLuint mask); -typedef void (GLAD_API_PTR *PFNGLSTENCILFUNCSEPARATEPROC)(GLenum face, GLenum func, GLint ref, GLuint mask); -typedef void (GLAD_API_PTR *PFNGLSTENCILMASKPROC)(GLuint mask); -typedef void (GLAD_API_PTR *PFNGLSTENCILMASKSEPARATEPROC)(GLenum face, GLuint mask); -typedef void (GLAD_API_PTR *PFNGLSTENCILOPPROC)(GLenum fail, GLenum zfail, GLenum zpass); -typedef void (GLAD_API_PTR *PFNGLSTENCILOPSEPARATEPROC)(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -typedef void (GLAD_API_PTR *PFNGLTEXBUFFERPROC)(GLenum target, GLenum internalformat, GLuint buffer); -typedef void (GLAD_API_PTR *PFNGLTEXBUFFERRANGEPROC)(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (GLAD_API_PTR *PFNGLTEXIMAGE1DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void * pixels); -typedef void (GLAD_API_PTR *PFNGLTEXIMAGE2DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void * pixels); -typedef void (GLAD_API_PTR *PFNGLTEXIMAGE2DMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -typedef void (GLAD_API_PTR *PFNGLTEXIMAGE3DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void * pixels); -typedef void (GLAD_API_PTR *PFNGLTEXIMAGE3DMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERIIVPROC)(GLenum target, GLenum pname, const GLint * params); -typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERIUIVPROC)(GLenum target, GLenum pname, const GLuint * params); -typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERFPROC)(GLenum target, GLenum pname, GLfloat param); -typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERFVPROC)(GLenum target, GLenum pname, const GLfloat * params); -typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERIPROC)(GLenum target, GLenum pname, GLint param); -typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERIVPROC)(GLenum target, GLenum pname, const GLint * params); -typedef void (GLAD_API_PTR *PFNGLTEXSTORAGE1DPROC)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -typedef void (GLAD_API_PTR *PFNGLTEXSTORAGE2DPROC)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GLAD_API_PTR *PFNGLTEXSTORAGE2DMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -typedef void (GLAD_API_PTR *PFNGLTEXSTORAGE3DPROC)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -typedef void (GLAD_API_PTR *PFNGLTEXSTORAGE3DMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -typedef void (GLAD_API_PTR *PFNGLTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void * pixels); -typedef void (GLAD_API_PTR *PFNGLTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * pixels); -typedef void (GLAD_API_PTR *PFNGLTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels); -typedef void (GLAD_API_PTR *PFNGLTEXTUREBARRIERPROC)(void); -typedef void (GLAD_API_PTR *PFNGLTEXTUREBUFFERPROC)(GLuint texture, GLenum internalformat, GLuint buffer); -typedef void (GLAD_API_PTR *PFNGLTEXTUREBUFFERRANGEPROC)(GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (GLAD_API_PTR *PFNGLTEXTUREPARAMETERIIVPROC)(GLuint texture, GLenum pname, const GLint * params); -typedef void (GLAD_API_PTR *PFNGLTEXTUREPARAMETERIUIVPROC)(GLuint texture, GLenum pname, const GLuint * params); -typedef void (GLAD_API_PTR *PFNGLTEXTUREPARAMETERFPROC)(GLuint texture, GLenum pname, GLfloat param); -typedef void (GLAD_API_PTR *PFNGLTEXTUREPARAMETERFVPROC)(GLuint texture, GLenum pname, const GLfloat * param); -typedef void (GLAD_API_PTR *PFNGLTEXTUREPARAMETERIPROC)(GLuint texture, GLenum pname, GLint param); -typedef void (GLAD_API_PTR *PFNGLTEXTUREPARAMETERIVPROC)(GLuint texture, GLenum pname, const GLint * param); -typedef void (GLAD_API_PTR *PFNGLTEXTURESTORAGE1DPROC)(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width); -typedef void (GLAD_API_PTR *PFNGLTEXTURESTORAGE2DPROC)(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GLAD_API_PTR *PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC)(GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -typedef void (GLAD_API_PTR *PFNGLTEXTURESTORAGE3DPROC)(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -typedef void (GLAD_API_PTR *PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC)(GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -typedef void (GLAD_API_PTR *PFNGLTEXTURESUBIMAGE1DPROC)(GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void * pixels); -typedef void (GLAD_API_PTR *PFNGLTEXTURESUBIMAGE2DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * pixels); -typedef void (GLAD_API_PTR *PFNGLTEXTURESUBIMAGE3DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels); -typedef void (GLAD_API_PTR *PFNGLTEXTUREVIEWPROC)(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); -typedef void (GLAD_API_PTR *PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC)(GLuint xfb, GLuint index, GLuint buffer); -typedef void (GLAD_API_PTR *PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC)(GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (GLAD_API_PTR *PFNGLTRANSFORMFEEDBACKVARYINGSPROC)(GLuint program, GLsizei count, const GLchar *const* varyings, GLenum bufferMode); -typedef void (GLAD_API_PTR *PFNGLUNIFORM1DPROC)(GLint location, GLdouble x); -typedef void (GLAD_API_PTR *PFNGLUNIFORM1DVPROC)(GLint location, GLsizei count, const GLdouble * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORM1FPROC)(GLint location, GLfloat v0); -typedef void (GLAD_API_PTR *PFNGLUNIFORM1FVPROC)(GLint location, GLsizei count, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORM1IPROC)(GLint location, GLint v0); -typedef void (GLAD_API_PTR *PFNGLUNIFORM1IVPROC)(GLint location, GLsizei count, const GLint * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORM1UIPROC)(GLint location, GLuint v0); -typedef void (GLAD_API_PTR *PFNGLUNIFORM1UIVPROC)(GLint location, GLsizei count, const GLuint * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORM2DPROC)(GLint location, GLdouble x, GLdouble y); -typedef void (GLAD_API_PTR *PFNGLUNIFORM2DVPROC)(GLint location, GLsizei count, const GLdouble * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORM2FPROC)(GLint location, GLfloat v0, GLfloat v1); -typedef void (GLAD_API_PTR *PFNGLUNIFORM2FVPROC)(GLint location, GLsizei count, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORM2IPROC)(GLint location, GLint v0, GLint v1); -typedef void (GLAD_API_PTR *PFNGLUNIFORM2IVPROC)(GLint location, GLsizei count, const GLint * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORM2UIPROC)(GLint location, GLuint v0, GLuint v1); -typedef void (GLAD_API_PTR *PFNGLUNIFORM2UIVPROC)(GLint location, GLsizei count, const GLuint * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORM3DPROC)(GLint location, GLdouble x, GLdouble y, GLdouble z); -typedef void (GLAD_API_PTR *PFNGLUNIFORM3DVPROC)(GLint location, GLsizei count, const GLdouble * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORM3FPROC)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (GLAD_API_PTR *PFNGLUNIFORM3FVPROC)(GLint location, GLsizei count, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORM3IPROC)(GLint location, GLint v0, GLint v1, GLint v2); -typedef void (GLAD_API_PTR *PFNGLUNIFORM3IVPROC)(GLint location, GLsizei count, const GLint * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORM3UIPROC)(GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (GLAD_API_PTR *PFNGLUNIFORM3UIVPROC)(GLint location, GLsizei count, const GLuint * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORM4DPROC)(GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (GLAD_API_PTR *PFNGLUNIFORM4DVPROC)(GLint location, GLsizei count, const GLdouble * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORM4FPROC)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (GLAD_API_PTR *PFNGLUNIFORM4FVPROC)(GLint location, GLsizei count, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORM4IPROC)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (GLAD_API_PTR *PFNGLUNIFORM4IVPROC)(GLint location, GLsizei count, const GLint * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORM4UIPROC)(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (GLAD_API_PTR *PFNGLUNIFORM4UIVPROC)(GLint location, GLsizei count, const GLuint * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORMBLOCKBINDINGPROC)(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); -typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX2DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX2FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX2X3DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX2X3FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX2X4DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX2X4FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX3DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX3FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX3X2DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX3X2FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX3X4DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX3X4FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX4DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX4FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX4X2DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX4X2FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX4X3DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX4X3FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); -typedef void (GLAD_API_PTR *PFNGLUNIFORMSUBROUTINESUIVPROC)(GLenum shadertype, GLsizei count, const GLuint * indices); -typedef GLboolean (GLAD_API_PTR *PFNGLUNMAPBUFFERPROC)(GLenum target); -typedef GLboolean (GLAD_API_PTR *PFNGLUNMAPNAMEDBUFFERPROC)(GLuint buffer); -typedef void (GLAD_API_PTR *PFNGLUSEPROGRAMPROC)(GLuint program); -typedef void (GLAD_API_PTR *PFNGLUSEPROGRAMSTAGESPROC)(GLuint pipeline, GLbitfield stages, GLuint program); -typedef void (GLAD_API_PTR *PFNGLVALIDATEPROGRAMPROC)(GLuint program); -typedef void (GLAD_API_PTR *PFNGLVALIDATEPROGRAMPIPELINEPROC)(GLuint pipeline); -typedef void (GLAD_API_PTR *PFNGLVERTEXARRAYATTRIBBINDINGPROC)(GLuint vaobj, GLuint attribindex, GLuint bindingindex); -typedef void (GLAD_API_PTR *PFNGLVERTEXARRAYATTRIBFORMATPROC)(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); -typedef void (GLAD_API_PTR *PFNGLVERTEXARRAYATTRIBIFORMATPROC)(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -typedef void (GLAD_API_PTR *PFNGLVERTEXARRAYATTRIBLFORMATPROC)(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -typedef void (GLAD_API_PTR *PFNGLVERTEXARRAYBINDINGDIVISORPROC)(GLuint vaobj, GLuint bindingindex, GLuint divisor); -typedef void (GLAD_API_PTR *PFNGLVERTEXARRAYELEMENTBUFFERPROC)(GLuint vaobj, GLuint buffer); -typedef void (GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXBUFFERPROC)(GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); -typedef void (GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXBUFFERSPROC)(GLuint vaobj, GLuint first, GLsizei count, const GLuint * buffers, const GLintptr * offsets, const GLsizei * strides); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1DPROC)(GLuint index, GLdouble x); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1DVPROC)(GLuint index, const GLdouble * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1FPROC)(GLuint index, GLfloat x); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1FVPROC)(GLuint index, const GLfloat * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1SPROC)(GLuint index, GLshort x); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1SVPROC)(GLuint index, const GLshort * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2DPROC)(GLuint index, GLdouble x, GLdouble y); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2DVPROC)(GLuint index, const GLdouble * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2FPROC)(GLuint index, GLfloat x, GLfloat y); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2FVPROC)(GLuint index, const GLfloat * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2SPROC)(GLuint index, GLshort x, GLshort y); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2SVPROC)(GLuint index, const GLshort * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3DPROC)(GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3DVPROC)(GLuint index, const GLdouble * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3FPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3FVPROC)(GLuint index, const GLfloat * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3SPROC)(GLuint index, GLshort x, GLshort y, GLshort z); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3SVPROC)(GLuint index, const GLshort * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NBVPROC)(GLuint index, const GLbyte * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NIVPROC)(GLuint index, const GLint * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NSVPROC)(GLuint index, const GLshort * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NUBPROC)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NUBVPROC)(GLuint index, const GLubyte * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NUIVPROC)(GLuint index, const GLuint * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NUSVPROC)(GLuint index, const GLushort * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4BVPROC)(GLuint index, const GLbyte * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4DPROC)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4DVPROC)(GLuint index, const GLdouble * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4FPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4FVPROC)(GLuint index, const GLfloat * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4IVPROC)(GLuint index, const GLint * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4SPROC)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4SVPROC)(GLuint index, const GLshort * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4UBVPROC)(GLuint index, const GLubyte * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4UIVPROC)(GLuint index, const GLuint * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4USVPROC)(GLuint index, const GLushort * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBBINDINGPROC)(GLuint attribindex, GLuint bindingindex); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBDIVISORPROC)(GLuint index, GLuint divisor); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBFORMATPROC)(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI1IPROC)(GLuint index, GLint x); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI1IVPROC)(GLuint index, const GLint * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI1UIPROC)(GLuint index, GLuint x); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI1UIVPROC)(GLuint index, const GLuint * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI2IPROC)(GLuint index, GLint x, GLint y); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI2IVPROC)(GLuint index, const GLint * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI2UIPROC)(GLuint index, GLuint x, GLuint y); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI2UIVPROC)(GLuint index, const GLuint * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI3IPROC)(GLuint index, GLint x, GLint y, GLint z); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI3IVPROC)(GLuint index, const GLint * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI3UIPROC)(GLuint index, GLuint x, GLuint y, GLuint z); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI3UIVPROC)(GLuint index, const GLuint * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4BVPROC)(GLuint index, const GLbyte * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4IPROC)(GLuint index, GLint x, GLint y, GLint z, GLint w); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4IVPROC)(GLuint index, const GLint * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4SVPROC)(GLuint index, const GLshort * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4UBVPROC)(GLuint index, const GLubyte * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4UIPROC)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4UIVPROC)(GLuint index, const GLuint * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4USVPROC)(GLuint index, const GLushort * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBIFORMATPROC)(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBIPOINTERPROC)(GLuint index, GLint size, GLenum type, GLsizei stride, const void * pointer); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBL1DPROC)(GLuint index, GLdouble x); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBL1DVPROC)(GLuint index, const GLdouble * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBL2DPROC)(GLuint index, GLdouble x, GLdouble y); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBL2DVPROC)(GLuint index, const GLdouble * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBL3DPROC)(GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBL3DVPROC)(GLuint index, const GLdouble * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBL4DPROC)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBL4DVPROC)(GLuint index, const GLdouble * v); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBLFORMATPROC)(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBLPOINTERPROC)(GLuint index, GLint size, GLenum type, GLsizei stride, const void * pointer); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP1UIPROC)(GLuint index, GLenum type, GLboolean normalized, GLuint value); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP1UIVPROC)(GLuint index, GLenum type, GLboolean normalized, const GLuint * value); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP2UIPROC)(GLuint index, GLenum type, GLboolean normalized, GLuint value); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP2UIVPROC)(GLuint index, GLenum type, GLboolean normalized, const GLuint * value); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP3UIPROC)(GLuint index, GLenum type, GLboolean normalized, GLuint value); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP3UIVPROC)(GLuint index, GLenum type, GLboolean normalized, const GLuint * value); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP4UIPROC)(GLuint index, GLenum type, GLboolean normalized, GLuint value); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP4UIVPROC)(GLuint index, GLenum type, GLboolean normalized, const GLuint * value); -typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBPOINTERPROC)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void * pointer); -typedef void (GLAD_API_PTR *PFNGLVERTEXBINDINGDIVISORPROC)(GLuint bindingindex, GLuint divisor); -typedef void (GLAD_API_PTR *PFNGLVIEWPORTPROC)(GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (GLAD_API_PTR *PFNGLVIEWPORTARRAYVPROC)(GLuint first, GLsizei count, const GLfloat * v); -typedef void (GLAD_API_PTR *PFNGLVIEWPORTINDEXEDFPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); -typedef void (GLAD_API_PTR *PFNGLVIEWPORTINDEXEDFVPROC)(GLuint index, const GLfloat * v); -typedef void (GLAD_API_PTR *PFNGLWAITSYNCPROC)(GLsync sync, GLbitfield flags, GLuint64 timeout); - -typedef struct GladGLContext { - void* userptr; - - int VERSION_1_0; - int VERSION_1_1; - int VERSION_1_2; - int VERSION_1_3; - int VERSION_1_4; - int VERSION_1_5; - int VERSION_2_0; - int VERSION_2_1; - int VERSION_3_0; - int VERSION_3_1; - int VERSION_3_2; - int VERSION_3_3; - int VERSION_4_0; - int VERSION_4_1; - int VERSION_4_2; - int VERSION_4_3; - int VERSION_4_4; - int VERSION_4_5; - int VERSION_4_6; - - PFNGLACTIVESHADERPROGRAMPROC ActiveShaderProgram; - PFNGLACTIVETEXTUREPROC ActiveTexture; - PFNGLATTACHSHADERPROC AttachShader; - PFNGLBEGINCONDITIONALRENDERPROC BeginConditionalRender; - PFNGLBEGINQUERYPROC BeginQuery; - PFNGLBEGINQUERYINDEXEDPROC BeginQueryIndexed; - PFNGLBEGINTRANSFORMFEEDBACKPROC BeginTransformFeedback; - PFNGLBINDATTRIBLOCATIONPROC BindAttribLocation; - PFNGLBINDBUFFERPROC BindBuffer; - PFNGLBINDBUFFERBASEPROC BindBufferBase; - PFNGLBINDBUFFERRANGEPROC BindBufferRange; - PFNGLBINDBUFFERSBASEPROC BindBuffersBase; - PFNGLBINDBUFFERSRANGEPROC BindBuffersRange; - PFNGLBINDFRAGDATALOCATIONPROC BindFragDataLocation; - PFNGLBINDFRAGDATALOCATIONINDEXEDPROC BindFragDataLocationIndexed; - PFNGLBINDFRAMEBUFFERPROC BindFramebuffer; - PFNGLBINDIMAGETEXTUREPROC BindImageTexture; - PFNGLBINDIMAGETEXTURESPROC BindImageTextures; - PFNGLBINDPROGRAMPIPELINEPROC BindProgramPipeline; - PFNGLBINDRENDERBUFFERPROC BindRenderbuffer; - PFNGLBINDSAMPLERPROC BindSampler; - PFNGLBINDSAMPLERSPROC BindSamplers; - PFNGLBINDTEXTUREPROC BindTexture; - PFNGLBINDTEXTUREUNITPROC BindTextureUnit; - PFNGLBINDTEXTURESPROC BindTextures; - PFNGLBINDTRANSFORMFEEDBACKPROC BindTransformFeedback; - PFNGLBINDVERTEXARRAYPROC BindVertexArray; - PFNGLBINDVERTEXBUFFERPROC BindVertexBuffer; - PFNGLBINDVERTEXBUFFERSPROC BindVertexBuffers; - PFNGLBLENDCOLORPROC BlendColor; - PFNGLBLENDEQUATIONPROC BlendEquation; - PFNGLBLENDEQUATIONSEPARATEPROC BlendEquationSeparate; - PFNGLBLENDEQUATIONSEPARATEIPROC BlendEquationSeparatei; - PFNGLBLENDEQUATIONIPROC BlendEquationi; - PFNGLBLENDFUNCPROC BlendFunc; - PFNGLBLENDFUNCSEPARATEPROC BlendFuncSeparate; - PFNGLBLENDFUNCSEPARATEIPROC BlendFuncSeparatei; - PFNGLBLENDFUNCIPROC BlendFunci; - PFNGLBLITFRAMEBUFFERPROC BlitFramebuffer; - PFNGLBLITNAMEDFRAMEBUFFERPROC BlitNamedFramebuffer; - PFNGLBUFFERDATAPROC BufferData; - PFNGLBUFFERSTORAGEPROC BufferStorage; - PFNGLBUFFERSUBDATAPROC BufferSubData; - PFNGLCHECKFRAMEBUFFERSTATUSPROC CheckFramebufferStatus; - PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC CheckNamedFramebufferStatus; - PFNGLCLAMPCOLORPROC ClampColor; - PFNGLCLEARPROC Clear; - PFNGLCLEARBUFFERDATAPROC ClearBufferData; - PFNGLCLEARBUFFERSUBDATAPROC ClearBufferSubData; - PFNGLCLEARBUFFERFIPROC ClearBufferfi; - PFNGLCLEARBUFFERFVPROC ClearBufferfv; - PFNGLCLEARBUFFERIVPROC ClearBufferiv; - PFNGLCLEARBUFFERUIVPROC ClearBufferuiv; - PFNGLCLEARCOLORPROC ClearColor; - PFNGLCLEARDEPTHPROC ClearDepth; - PFNGLCLEARDEPTHFPROC ClearDepthf; - PFNGLCLEARNAMEDBUFFERDATAPROC ClearNamedBufferData; - PFNGLCLEARNAMEDBUFFERSUBDATAPROC ClearNamedBufferSubData; - PFNGLCLEARNAMEDFRAMEBUFFERFIPROC ClearNamedFramebufferfi; - PFNGLCLEARNAMEDFRAMEBUFFERFVPROC ClearNamedFramebufferfv; - PFNGLCLEARNAMEDFRAMEBUFFERIVPROC ClearNamedFramebufferiv; - PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC ClearNamedFramebufferuiv; - PFNGLCLEARSTENCILPROC ClearStencil; - PFNGLCLEARTEXIMAGEPROC ClearTexImage; - PFNGLCLEARTEXSUBIMAGEPROC ClearTexSubImage; - PFNGLCLIENTWAITSYNCPROC ClientWaitSync; - PFNGLCLIPCONTROLPROC ClipControl; - PFNGLCOLORMASKPROC ColorMask; - PFNGLCOLORMASKIPROC ColorMaski; - PFNGLCOMPILESHADERPROC CompileShader; - PFNGLCOMPRESSEDTEXIMAGE1DPROC CompressedTexImage1D; - PFNGLCOMPRESSEDTEXIMAGE2DPROC CompressedTexImage2D; - PFNGLCOMPRESSEDTEXIMAGE3DPROC CompressedTexImage3D; - PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC CompressedTexSubImage1D; - PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC CompressedTexSubImage2D; - PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC CompressedTexSubImage3D; - PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC CompressedTextureSubImage1D; - PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC CompressedTextureSubImage2D; - PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC CompressedTextureSubImage3D; - PFNGLCOPYBUFFERSUBDATAPROC CopyBufferSubData; - PFNGLCOPYIMAGESUBDATAPROC CopyImageSubData; - PFNGLCOPYNAMEDBUFFERSUBDATAPROC CopyNamedBufferSubData; - PFNGLCOPYTEXIMAGE1DPROC CopyTexImage1D; - PFNGLCOPYTEXIMAGE2DPROC CopyTexImage2D; - PFNGLCOPYTEXSUBIMAGE1DPROC CopyTexSubImage1D; - PFNGLCOPYTEXSUBIMAGE2DPROC CopyTexSubImage2D; - PFNGLCOPYTEXSUBIMAGE3DPROC CopyTexSubImage3D; - PFNGLCOPYTEXTURESUBIMAGE1DPROC CopyTextureSubImage1D; - PFNGLCOPYTEXTURESUBIMAGE2DPROC CopyTextureSubImage2D; - PFNGLCOPYTEXTURESUBIMAGE3DPROC CopyTextureSubImage3D; - PFNGLCREATEBUFFERSPROC CreateBuffers; - PFNGLCREATEFRAMEBUFFERSPROC CreateFramebuffers; - PFNGLCREATEPROGRAMPROC CreateProgram; - PFNGLCREATEPROGRAMPIPELINESPROC CreateProgramPipelines; - PFNGLCREATEQUERIESPROC CreateQueries; - PFNGLCREATERENDERBUFFERSPROC CreateRenderbuffers; - PFNGLCREATESAMPLERSPROC CreateSamplers; - PFNGLCREATESHADERPROC CreateShader; - PFNGLCREATESHADERPROGRAMVPROC CreateShaderProgramv; - PFNGLCREATETEXTURESPROC CreateTextures; - PFNGLCREATETRANSFORMFEEDBACKSPROC CreateTransformFeedbacks; - PFNGLCREATEVERTEXARRAYSPROC CreateVertexArrays; - PFNGLCULLFACEPROC CullFace; - PFNGLDEBUGMESSAGECALLBACKPROC DebugMessageCallback; - PFNGLDEBUGMESSAGECONTROLPROC DebugMessageControl; - PFNGLDEBUGMESSAGEINSERTPROC DebugMessageInsert; - PFNGLDELETEBUFFERSPROC DeleteBuffers; - PFNGLDELETEFRAMEBUFFERSPROC DeleteFramebuffers; - PFNGLDELETEPROGRAMPROC DeleteProgram; - PFNGLDELETEPROGRAMPIPELINESPROC DeleteProgramPipelines; - PFNGLDELETEQUERIESPROC DeleteQueries; - PFNGLDELETERENDERBUFFERSPROC DeleteRenderbuffers; - PFNGLDELETESAMPLERSPROC DeleteSamplers; - PFNGLDELETESHADERPROC DeleteShader; - PFNGLDELETESYNCPROC DeleteSync; - PFNGLDELETETEXTURESPROC DeleteTextures; - PFNGLDELETETRANSFORMFEEDBACKSPROC DeleteTransformFeedbacks; - PFNGLDELETEVERTEXARRAYSPROC DeleteVertexArrays; - PFNGLDEPTHFUNCPROC DepthFunc; - PFNGLDEPTHMASKPROC DepthMask; - PFNGLDEPTHRANGEPROC DepthRange; - PFNGLDEPTHRANGEARRAYVPROC DepthRangeArrayv; - PFNGLDEPTHRANGEINDEXEDPROC DepthRangeIndexed; - PFNGLDEPTHRANGEFPROC DepthRangef; - PFNGLDETACHSHADERPROC DetachShader; - PFNGLDISABLEPROC Disable; - PFNGLDISABLEVERTEXARRAYATTRIBPROC DisableVertexArrayAttrib; - PFNGLDISABLEVERTEXATTRIBARRAYPROC DisableVertexAttribArray; - PFNGLDISABLEIPROC Disablei; - PFNGLDISPATCHCOMPUTEPROC DispatchCompute; - PFNGLDISPATCHCOMPUTEINDIRECTPROC DispatchComputeIndirect; - PFNGLDRAWARRAYSPROC DrawArrays; - PFNGLDRAWARRAYSINDIRECTPROC DrawArraysIndirect; - PFNGLDRAWARRAYSINSTANCEDPROC DrawArraysInstanced; - PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC DrawArraysInstancedBaseInstance; - PFNGLDRAWBUFFERPROC DrawBuffer; - PFNGLDRAWBUFFERSPROC DrawBuffers; - PFNGLDRAWELEMENTSPROC DrawElements; - PFNGLDRAWELEMENTSBASEVERTEXPROC DrawElementsBaseVertex; - PFNGLDRAWELEMENTSINDIRECTPROC DrawElementsIndirect; - PFNGLDRAWELEMENTSINSTANCEDPROC DrawElementsInstanced; - PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC DrawElementsInstancedBaseInstance; - PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC DrawElementsInstancedBaseVertex; - PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC DrawElementsInstancedBaseVertexBaseInstance; - PFNGLDRAWRANGEELEMENTSPROC DrawRangeElements; - PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC DrawRangeElementsBaseVertex; - PFNGLDRAWTRANSFORMFEEDBACKPROC DrawTransformFeedback; - PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC DrawTransformFeedbackInstanced; - PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC DrawTransformFeedbackStream; - PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC DrawTransformFeedbackStreamInstanced; - PFNGLENABLEPROC Enable; - PFNGLENABLEVERTEXARRAYATTRIBPROC EnableVertexArrayAttrib; - PFNGLENABLEVERTEXATTRIBARRAYPROC EnableVertexAttribArray; - PFNGLENABLEIPROC Enablei; - PFNGLENDCONDITIONALRENDERPROC EndConditionalRender; - PFNGLENDQUERYPROC EndQuery; - PFNGLENDQUERYINDEXEDPROC EndQueryIndexed; - PFNGLENDTRANSFORMFEEDBACKPROC EndTransformFeedback; - PFNGLFENCESYNCPROC FenceSync; - PFNGLFINISHPROC Finish; - PFNGLFLUSHPROC Flush; - PFNGLFLUSHMAPPEDBUFFERRANGEPROC FlushMappedBufferRange; - PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC FlushMappedNamedBufferRange; - PFNGLFRAMEBUFFERPARAMETERIPROC FramebufferParameteri; - PFNGLFRAMEBUFFERRENDERBUFFERPROC FramebufferRenderbuffer; - PFNGLFRAMEBUFFERTEXTUREPROC FramebufferTexture; - PFNGLFRAMEBUFFERTEXTURE1DPROC FramebufferTexture1D; - PFNGLFRAMEBUFFERTEXTURE2DPROC FramebufferTexture2D; - PFNGLFRAMEBUFFERTEXTURE3DPROC FramebufferTexture3D; - PFNGLFRAMEBUFFERTEXTURELAYERPROC FramebufferTextureLayer; - PFNGLFRONTFACEPROC FrontFace; - PFNGLGENBUFFERSPROC GenBuffers; - PFNGLGENFRAMEBUFFERSPROC GenFramebuffers; - PFNGLGENPROGRAMPIPELINESPROC GenProgramPipelines; - PFNGLGENQUERIESPROC GenQueries; - PFNGLGENRENDERBUFFERSPROC GenRenderbuffers; - PFNGLGENSAMPLERSPROC GenSamplers; - PFNGLGENTEXTURESPROC GenTextures; - PFNGLGENTRANSFORMFEEDBACKSPROC GenTransformFeedbacks; - PFNGLGENVERTEXARRAYSPROC GenVertexArrays; - PFNGLGENERATEMIPMAPPROC GenerateMipmap; - PFNGLGENERATETEXTUREMIPMAPPROC GenerateTextureMipmap; - PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC GetActiveAtomicCounterBufferiv; - PFNGLGETACTIVEATTRIBPROC GetActiveAttrib; - PFNGLGETACTIVESUBROUTINENAMEPROC GetActiveSubroutineName; - PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC GetActiveSubroutineUniformName; - PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC GetActiveSubroutineUniformiv; - PFNGLGETACTIVEUNIFORMPROC GetActiveUniform; - PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC GetActiveUniformBlockName; - PFNGLGETACTIVEUNIFORMBLOCKIVPROC GetActiveUniformBlockiv; - PFNGLGETACTIVEUNIFORMNAMEPROC GetActiveUniformName; - PFNGLGETACTIVEUNIFORMSIVPROC GetActiveUniformsiv; - PFNGLGETATTACHEDSHADERSPROC GetAttachedShaders; - PFNGLGETATTRIBLOCATIONPROC GetAttribLocation; - PFNGLGETBOOLEANI_VPROC GetBooleani_v; - PFNGLGETBOOLEANVPROC GetBooleanv; - PFNGLGETBUFFERPARAMETERI64VPROC GetBufferParameteri64v; - PFNGLGETBUFFERPARAMETERIVPROC GetBufferParameteriv; - PFNGLGETBUFFERPOINTERVPROC GetBufferPointerv; - PFNGLGETBUFFERSUBDATAPROC GetBufferSubData; - PFNGLGETCOMPRESSEDTEXIMAGEPROC GetCompressedTexImage; - PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC GetCompressedTextureImage; - PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC GetCompressedTextureSubImage; - PFNGLGETDEBUGMESSAGELOGPROC GetDebugMessageLog; - PFNGLGETDOUBLEI_VPROC GetDoublei_v; - PFNGLGETDOUBLEVPROC GetDoublev; - PFNGLGETERRORPROC GetError; - PFNGLGETFLOATI_VPROC GetFloati_v; - PFNGLGETFLOATVPROC GetFloatv; - PFNGLGETFRAGDATAINDEXPROC GetFragDataIndex; - PFNGLGETFRAGDATALOCATIONPROC GetFragDataLocation; - PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC GetFramebufferAttachmentParameteriv; - PFNGLGETFRAMEBUFFERPARAMETERIVPROC GetFramebufferParameteriv; - PFNGLGETGRAPHICSRESETSTATUSPROC GetGraphicsResetStatus; - PFNGLGETINTEGER64I_VPROC GetInteger64i_v; - PFNGLGETINTEGER64VPROC GetInteger64v; - PFNGLGETINTEGERI_VPROC GetIntegeri_v; - PFNGLGETINTEGERVPROC GetIntegerv; - PFNGLGETINTERNALFORMATI64VPROC GetInternalformati64v; - PFNGLGETINTERNALFORMATIVPROC GetInternalformativ; - PFNGLGETMULTISAMPLEFVPROC GetMultisamplefv; - PFNGLGETNAMEDBUFFERPARAMETERI64VPROC GetNamedBufferParameteri64v; - PFNGLGETNAMEDBUFFERPARAMETERIVPROC GetNamedBufferParameteriv; - PFNGLGETNAMEDBUFFERPOINTERVPROC GetNamedBufferPointerv; - PFNGLGETNAMEDBUFFERSUBDATAPROC GetNamedBufferSubData; - PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC GetNamedFramebufferAttachmentParameteriv; - PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC GetNamedFramebufferParameteriv; - PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC GetNamedRenderbufferParameteriv; - PFNGLGETOBJECTLABELPROC GetObjectLabel; - PFNGLGETOBJECTPTRLABELPROC GetObjectPtrLabel; - PFNGLGETPOINTERVPROC GetPointerv; - PFNGLGETPROGRAMBINARYPROC GetProgramBinary; - PFNGLGETPROGRAMINFOLOGPROC GetProgramInfoLog; - PFNGLGETPROGRAMINTERFACEIVPROC GetProgramInterfaceiv; - PFNGLGETPROGRAMPIPELINEINFOLOGPROC GetProgramPipelineInfoLog; - PFNGLGETPROGRAMPIPELINEIVPROC GetProgramPipelineiv; - PFNGLGETPROGRAMRESOURCEINDEXPROC GetProgramResourceIndex; - PFNGLGETPROGRAMRESOURCELOCATIONPROC GetProgramResourceLocation; - PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC GetProgramResourceLocationIndex; - PFNGLGETPROGRAMRESOURCENAMEPROC GetProgramResourceName; - PFNGLGETPROGRAMRESOURCEIVPROC GetProgramResourceiv; - PFNGLGETPROGRAMSTAGEIVPROC GetProgramStageiv; - PFNGLGETPROGRAMIVPROC GetProgramiv; - PFNGLGETQUERYBUFFEROBJECTI64VPROC GetQueryBufferObjecti64v; - PFNGLGETQUERYBUFFEROBJECTIVPROC GetQueryBufferObjectiv; - PFNGLGETQUERYBUFFEROBJECTUI64VPROC GetQueryBufferObjectui64v; - PFNGLGETQUERYBUFFEROBJECTUIVPROC GetQueryBufferObjectuiv; - PFNGLGETQUERYINDEXEDIVPROC GetQueryIndexediv; - PFNGLGETQUERYOBJECTI64VPROC GetQueryObjecti64v; - PFNGLGETQUERYOBJECTIVPROC GetQueryObjectiv; - PFNGLGETQUERYOBJECTUI64VPROC GetQueryObjectui64v; - PFNGLGETQUERYOBJECTUIVPROC GetQueryObjectuiv; - PFNGLGETQUERYIVPROC GetQueryiv; - PFNGLGETRENDERBUFFERPARAMETERIVPROC GetRenderbufferParameteriv; - PFNGLGETSAMPLERPARAMETERIIVPROC GetSamplerParameterIiv; - PFNGLGETSAMPLERPARAMETERIUIVPROC GetSamplerParameterIuiv; - PFNGLGETSAMPLERPARAMETERFVPROC GetSamplerParameterfv; - PFNGLGETSAMPLERPARAMETERIVPROC GetSamplerParameteriv; - PFNGLGETSHADERINFOLOGPROC GetShaderInfoLog; - PFNGLGETSHADERPRECISIONFORMATPROC GetShaderPrecisionFormat; - PFNGLGETSHADERSOURCEPROC GetShaderSource; - PFNGLGETSHADERIVPROC GetShaderiv; - PFNGLGETSTRINGPROC GetString; - PFNGLGETSTRINGIPROC GetStringi; - PFNGLGETSUBROUTINEINDEXPROC GetSubroutineIndex; - PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC GetSubroutineUniformLocation; - PFNGLGETSYNCIVPROC GetSynciv; - PFNGLGETTEXIMAGEPROC GetTexImage; - PFNGLGETTEXLEVELPARAMETERFVPROC GetTexLevelParameterfv; - PFNGLGETTEXLEVELPARAMETERIVPROC GetTexLevelParameteriv; - PFNGLGETTEXPARAMETERIIVPROC GetTexParameterIiv; - PFNGLGETTEXPARAMETERIUIVPROC GetTexParameterIuiv; - PFNGLGETTEXPARAMETERFVPROC GetTexParameterfv; - PFNGLGETTEXPARAMETERIVPROC GetTexParameteriv; - PFNGLGETTEXTUREIMAGEPROC GetTextureImage; - PFNGLGETTEXTURELEVELPARAMETERFVPROC GetTextureLevelParameterfv; - PFNGLGETTEXTURELEVELPARAMETERIVPROC GetTextureLevelParameteriv; - PFNGLGETTEXTUREPARAMETERIIVPROC GetTextureParameterIiv; - PFNGLGETTEXTUREPARAMETERIUIVPROC GetTextureParameterIuiv; - PFNGLGETTEXTUREPARAMETERFVPROC GetTextureParameterfv; - PFNGLGETTEXTUREPARAMETERIVPROC GetTextureParameteriv; - PFNGLGETTEXTURESUBIMAGEPROC GetTextureSubImage; - PFNGLGETTRANSFORMFEEDBACKVARYINGPROC GetTransformFeedbackVarying; - PFNGLGETTRANSFORMFEEDBACKI64_VPROC GetTransformFeedbacki64_v; - PFNGLGETTRANSFORMFEEDBACKI_VPROC GetTransformFeedbacki_v; - PFNGLGETTRANSFORMFEEDBACKIVPROC GetTransformFeedbackiv; - PFNGLGETUNIFORMBLOCKINDEXPROC GetUniformBlockIndex; - PFNGLGETUNIFORMINDICESPROC GetUniformIndices; - PFNGLGETUNIFORMLOCATIONPROC GetUniformLocation; - PFNGLGETUNIFORMSUBROUTINEUIVPROC GetUniformSubroutineuiv; - PFNGLGETUNIFORMDVPROC GetUniformdv; - PFNGLGETUNIFORMFVPROC GetUniformfv; - PFNGLGETUNIFORMIVPROC GetUniformiv; - PFNGLGETUNIFORMUIVPROC GetUniformuiv; - PFNGLGETVERTEXARRAYINDEXED64IVPROC GetVertexArrayIndexed64iv; - PFNGLGETVERTEXARRAYINDEXEDIVPROC GetVertexArrayIndexediv; - PFNGLGETVERTEXARRAYIVPROC GetVertexArrayiv; - PFNGLGETVERTEXATTRIBIIVPROC GetVertexAttribIiv; - PFNGLGETVERTEXATTRIBIUIVPROC GetVertexAttribIuiv; - PFNGLGETVERTEXATTRIBLDVPROC GetVertexAttribLdv; - PFNGLGETVERTEXATTRIBPOINTERVPROC GetVertexAttribPointerv; - PFNGLGETVERTEXATTRIBDVPROC GetVertexAttribdv; - PFNGLGETVERTEXATTRIBFVPROC GetVertexAttribfv; - PFNGLGETVERTEXATTRIBIVPROC GetVertexAttribiv; - PFNGLGETNCOMPRESSEDTEXIMAGEPROC GetnCompressedTexImage; - PFNGLGETNTEXIMAGEPROC GetnTexImage; - PFNGLGETNUNIFORMDVPROC GetnUniformdv; - PFNGLGETNUNIFORMFVPROC GetnUniformfv; - PFNGLGETNUNIFORMIVPROC GetnUniformiv; - PFNGLGETNUNIFORMUIVPROC GetnUniformuiv; - PFNGLHINTPROC Hint; - PFNGLINVALIDATEBUFFERDATAPROC InvalidateBufferData; - PFNGLINVALIDATEBUFFERSUBDATAPROC InvalidateBufferSubData; - PFNGLINVALIDATEFRAMEBUFFERPROC InvalidateFramebuffer; - PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC InvalidateNamedFramebufferData; - PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC InvalidateNamedFramebufferSubData; - PFNGLINVALIDATESUBFRAMEBUFFERPROC InvalidateSubFramebuffer; - PFNGLINVALIDATETEXIMAGEPROC InvalidateTexImage; - PFNGLINVALIDATETEXSUBIMAGEPROC InvalidateTexSubImage; - PFNGLISBUFFERPROC IsBuffer; - PFNGLISENABLEDPROC IsEnabled; - PFNGLISENABLEDIPROC IsEnabledi; - PFNGLISFRAMEBUFFERPROC IsFramebuffer; - PFNGLISPROGRAMPROC IsProgram; - PFNGLISPROGRAMPIPELINEPROC IsProgramPipeline; - PFNGLISQUERYPROC IsQuery; - PFNGLISRENDERBUFFERPROC IsRenderbuffer; - PFNGLISSAMPLERPROC IsSampler; - PFNGLISSHADERPROC IsShader; - PFNGLISSYNCPROC IsSync; - PFNGLISTEXTUREPROC IsTexture; - PFNGLISTRANSFORMFEEDBACKPROC IsTransformFeedback; - PFNGLISVERTEXARRAYPROC IsVertexArray; - PFNGLLINEWIDTHPROC LineWidth; - PFNGLLINKPROGRAMPROC LinkProgram; - PFNGLLOGICOPPROC LogicOp; - PFNGLMAPBUFFERPROC MapBuffer; - PFNGLMAPBUFFERRANGEPROC MapBufferRange; - PFNGLMAPNAMEDBUFFERPROC MapNamedBuffer; - PFNGLMAPNAMEDBUFFERRANGEPROC MapNamedBufferRange; - PFNGLMEMORYBARRIERPROC MemoryBarrier; - PFNGLMEMORYBARRIERBYREGIONPROC MemoryBarrierByRegion; - PFNGLMINSAMPLESHADINGPROC MinSampleShading; - PFNGLMULTIDRAWARRAYSPROC MultiDrawArrays; - PFNGLMULTIDRAWARRAYSINDIRECTPROC MultiDrawArraysIndirect; - PFNGLMULTIDRAWARRAYSINDIRECTCOUNTPROC MultiDrawArraysIndirectCount; - PFNGLMULTIDRAWELEMENTSPROC MultiDrawElements; - PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC MultiDrawElementsBaseVertex; - PFNGLMULTIDRAWELEMENTSINDIRECTPROC MultiDrawElementsIndirect; - PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTPROC MultiDrawElementsIndirectCount; - PFNGLNAMEDBUFFERDATAPROC NamedBufferData; - PFNGLNAMEDBUFFERSTORAGEPROC NamedBufferStorage; - PFNGLNAMEDBUFFERSUBDATAPROC NamedBufferSubData; - PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC NamedFramebufferDrawBuffer; - PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC NamedFramebufferDrawBuffers; - PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC NamedFramebufferParameteri; - PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC NamedFramebufferReadBuffer; - PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC NamedFramebufferRenderbuffer; - PFNGLNAMEDFRAMEBUFFERTEXTUREPROC NamedFramebufferTexture; - PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC NamedFramebufferTextureLayer; - PFNGLNAMEDRENDERBUFFERSTORAGEPROC NamedRenderbufferStorage; - PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC NamedRenderbufferStorageMultisample; - PFNGLOBJECTLABELPROC ObjectLabel; - PFNGLOBJECTPTRLABELPROC ObjectPtrLabel; - PFNGLPATCHPARAMETERFVPROC PatchParameterfv; - PFNGLPATCHPARAMETERIPROC PatchParameteri; - PFNGLPAUSETRANSFORMFEEDBACKPROC PauseTransformFeedback; - PFNGLPIXELSTOREFPROC PixelStoref; - PFNGLPIXELSTOREIPROC PixelStorei; - PFNGLPOINTPARAMETERFPROC PointParameterf; - PFNGLPOINTPARAMETERFVPROC PointParameterfv; - PFNGLPOINTPARAMETERIPROC PointParameteri; - PFNGLPOINTPARAMETERIVPROC PointParameteriv; - PFNGLPOINTSIZEPROC PointSize; - PFNGLPOLYGONMODEPROC PolygonMode; - PFNGLPOLYGONOFFSETPROC PolygonOffset; - PFNGLPOLYGONOFFSETCLAMPPROC PolygonOffsetClamp; - PFNGLPOPDEBUGGROUPPROC PopDebugGroup; - PFNGLPRIMITIVERESTARTINDEXPROC PrimitiveRestartIndex; - PFNGLPROGRAMBINARYPROC ProgramBinary; - PFNGLPROGRAMPARAMETERIPROC ProgramParameteri; - PFNGLPROGRAMUNIFORM1DPROC ProgramUniform1d; - PFNGLPROGRAMUNIFORM1DVPROC ProgramUniform1dv; - PFNGLPROGRAMUNIFORM1FPROC ProgramUniform1f; - PFNGLPROGRAMUNIFORM1FVPROC ProgramUniform1fv; - PFNGLPROGRAMUNIFORM1IPROC ProgramUniform1i; - PFNGLPROGRAMUNIFORM1IVPROC ProgramUniform1iv; - PFNGLPROGRAMUNIFORM1UIPROC ProgramUniform1ui; - PFNGLPROGRAMUNIFORM1UIVPROC ProgramUniform1uiv; - PFNGLPROGRAMUNIFORM2DPROC ProgramUniform2d; - PFNGLPROGRAMUNIFORM2DVPROC ProgramUniform2dv; - PFNGLPROGRAMUNIFORM2FPROC ProgramUniform2f; - PFNGLPROGRAMUNIFORM2FVPROC ProgramUniform2fv; - PFNGLPROGRAMUNIFORM2IPROC ProgramUniform2i; - PFNGLPROGRAMUNIFORM2IVPROC ProgramUniform2iv; - PFNGLPROGRAMUNIFORM2UIPROC ProgramUniform2ui; - PFNGLPROGRAMUNIFORM2UIVPROC ProgramUniform2uiv; - PFNGLPROGRAMUNIFORM3DPROC ProgramUniform3d; - PFNGLPROGRAMUNIFORM3DVPROC ProgramUniform3dv; - PFNGLPROGRAMUNIFORM3FPROC ProgramUniform3f; - PFNGLPROGRAMUNIFORM3FVPROC ProgramUniform3fv; - PFNGLPROGRAMUNIFORM3IPROC ProgramUniform3i; - PFNGLPROGRAMUNIFORM3IVPROC ProgramUniform3iv; - PFNGLPROGRAMUNIFORM3UIPROC ProgramUniform3ui; - PFNGLPROGRAMUNIFORM3UIVPROC ProgramUniform3uiv; - PFNGLPROGRAMUNIFORM4DPROC ProgramUniform4d; - PFNGLPROGRAMUNIFORM4DVPROC ProgramUniform4dv; - PFNGLPROGRAMUNIFORM4FPROC ProgramUniform4f; - PFNGLPROGRAMUNIFORM4FVPROC ProgramUniform4fv; - PFNGLPROGRAMUNIFORM4IPROC ProgramUniform4i; - PFNGLPROGRAMUNIFORM4IVPROC ProgramUniform4iv; - PFNGLPROGRAMUNIFORM4UIPROC ProgramUniform4ui; - PFNGLPROGRAMUNIFORM4UIVPROC ProgramUniform4uiv; - PFNGLPROGRAMUNIFORMMATRIX2DVPROC ProgramUniformMatrix2dv; - PFNGLPROGRAMUNIFORMMATRIX2FVPROC ProgramUniformMatrix2fv; - PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC ProgramUniformMatrix2x3dv; - PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC ProgramUniformMatrix2x3fv; - PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC ProgramUniformMatrix2x4dv; - PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC ProgramUniformMatrix2x4fv; - PFNGLPROGRAMUNIFORMMATRIX3DVPROC ProgramUniformMatrix3dv; - PFNGLPROGRAMUNIFORMMATRIX3FVPROC ProgramUniformMatrix3fv; - PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC ProgramUniformMatrix3x2dv; - PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC ProgramUniformMatrix3x2fv; - PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC ProgramUniformMatrix3x4dv; - PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC ProgramUniformMatrix3x4fv; - PFNGLPROGRAMUNIFORMMATRIX4DVPROC ProgramUniformMatrix4dv; - PFNGLPROGRAMUNIFORMMATRIX4FVPROC ProgramUniformMatrix4fv; - PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC ProgramUniformMatrix4x2dv; - PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC ProgramUniformMatrix4x2fv; - PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC ProgramUniformMatrix4x3dv; - PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC ProgramUniformMatrix4x3fv; - PFNGLPROVOKINGVERTEXPROC ProvokingVertex; - PFNGLPUSHDEBUGGROUPPROC PushDebugGroup; - PFNGLQUERYCOUNTERPROC QueryCounter; - PFNGLREADBUFFERPROC ReadBuffer; - PFNGLREADPIXELSPROC ReadPixels; - PFNGLREADNPIXELSPROC ReadnPixels; - PFNGLRELEASESHADERCOMPILERPROC ReleaseShaderCompiler; - PFNGLRENDERBUFFERSTORAGEPROC RenderbufferStorage; - PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC RenderbufferStorageMultisample; - PFNGLRESUMETRANSFORMFEEDBACKPROC ResumeTransformFeedback; - PFNGLSAMPLECOVERAGEPROC SampleCoverage; - PFNGLSAMPLEMASKIPROC SampleMaski; - PFNGLSAMPLERPARAMETERIIVPROC SamplerParameterIiv; - PFNGLSAMPLERPARAMETERIUIVPROC SamplerParameterIuiv; - PFNGLSAMPLERPARAMETERFPROC SamplerParameterf; - PFNGLSAMPLERPARAMETERFVPROC SamplerParameterfv; - PFNGLSAMPLERPARAMETERIPROC SamplerParameteri; - PFNGLSAMPLERPARAMETERIVPROC SamplerParameteriv; - PFNGLSCISSORPROC Scissor; - PFNGLSCISSORARRAYVPROC ScissorArrayv; - PFNGLSCISSORINDEXEDPROC ScissorIndexed; - PFNGLSCISSORINDEXEDVPROC ScissorIndexedv; - PFNGLSHADERBINARYPROC ShaderBinary; - PFNGLSHADERSOURCEPROC ShaderSource; - PFNGLSHADERSTORAGEBLOCKBINDINGPROC ShaderStorageBlockBinding; - PFNGLSPECIALIZESHADERPROC SpecializeShader; - PFNGLSTENCILFUNCPROC StencilFunc; - PFNGLSTENCILFUNCSEPARATEPROC StencilFuncSeparate; - PFNGLSTENCILMASKPROC StencilMask; - PFNGLSTENCILMASKSEPARATEPROC StencilMaskSeparate; - PFNGLSTENCILOPPROC StencilOp; - PFNGLSTENCILOPSEPARATEPROC StencilOpSeparate; - PFNGLTEXBUFFERPROC TexBuffer; - PFNGLTEXBUFFERRANGEPROC TexBufferRange; - PFNGLTEXIMAGE1DPROC TexImage1D; - PFNGLTEXIMAGE2DPROC TexImage2D; - PFNGLTEXIMAGE2DMULTISAMPLEPROC TexImage2DMultisample; - PFNGLTEXIMAGE3DPROC TexImage3D; - PFNGLTEXIMAGE3DMULTISAMPLEPROC TexImage3DMultisample; - PFNGLTEXPARAMETERIIVPROC TexParameterIiv; - PFNGLTEXPARAMETERIUIVPROC TexParameterIuiv; - PFNGLTEXPARAMETERFPROC TexParameterf; - PFNGLTEXPARAMETERFVPROC TexParameterfv; - PFNGLTEXPARAMETERIPROC TexParameteri; - PFNGLTEXPARAMETERIVPROC TexParameteriv; - PFNGLTEXSTORAGE1DPROC TexStorage1D; - PFNGLTEXSTORAGE2DPROC TexStorage2D; - PFNGLTEXSTORAGE2DMULTISAMPLEPROC TexStorage2DMultisample; - PFNGLTEXSTORAGE3DPROC TexStorage3D; - PFNGLTEXSTORAGE3DMULTISAMPLEPROC TexStorage3DMultisample; - PFNGLTEXSUBIMAGE1DPROC TexSubImage1D; - PFNGLTEXSUBIMAGE2DPROC TexSubImage2D; - PFNGLTEXSUBIMAGE3DPROC TexSubImage3D; - PFNGLTEXTUREBARRIERPROC TextureBarrier; - PFNGLTEXTUREBUFFERPROC TextureBuffer; - PFNGLTEXTUREBUFFERRANGEPROC TextureBufferRange; - PFNGLTEXTUREPARAMETERIIVPROC TextureParameterIiv; - PFNGLTEXTUREPARAMETERIUIVPROC TextureParameterIuiv; - PFNGLTEXTUREPARAMETERFPROC TextureParameterf; - PFNGLTEXTUREPARAMETERFVPROC TextureParameterfv; - PFNGLTEXTUREPARAMETERIPROC TextureParameteri; - PFNGLTEXTUREPARAMETERIVPROC TextureParameteriv; - PFNGLTEXTURESTORAGE1DPROC TextureStorage1D; - PFNGLTEXTURESTORAGE2DPROC TextureStorage2D; - PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC TextureStorage2DMultisample; - PFNGLTEXTURESTORAGE3DPROC TextureStorage3D; - PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC TextureStorage3DMultisample; - PFNGLTEXTURESUBIMAGE1DPROC TextureSubImage1D; - PFNGLTEXTURESUBIMAGE2DPROC TextureSubImage2D; - PFNGLTEXTURESUBIMAGE3DPROC TextureSubImage3D; - PFNGLTEXTUREVIEWPROC TextureView; - PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC TransformFeedbackBufferBase; - PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC TransformFeedbackBufferRange; - PFNGLTRANSFORMFEEDBACKVARYINGSPROC TransformFeedbackVaryings; - PFNGLUNIFORM1DPROC Uniform1d; - PFNGLUNIFORM1DVPROC Uniform1dv; - PFNGLUNIFORM1FPROC Uniform1f; - PFNGLUNIFORM1FVPROC Uniform1fv; - PFNGLUNIFORM1IPROC Uniform1i; - PFNGLUNIFORM1IVPROC Uniform1iv; - PFNGLUNIFORM1UIPROC Uniform1ui; - PFNGLUNIFORM1UIVPROC Uniform1uiv; - PFNGLUNIFORM2DPROC Uniform2d; - PFNGLUNIFORM2DVPROC Uniform2dv; - PFNGLUNIFORM2FPROC Uniform2f; - PFNGLUNIFORM2FVPROC Uniform2fv; - PFNGLUNIFORM2IPROC Uniform2i; - PFNGLUNIFORM2IVPROC Uniform2iv; - PFNGLUNIFORM2UIPROC Uniform2ui; - PFNGLUNIFORM2UIVPROC Uniform2uiv; - PFNGLUNIFORM3DPROC Uniform3d; - PFNGLUNIFORM3DVPROC Uniform3dv; - PFNGLUNIFORM3FPROC Uniform3f; - PFNGLUNIFORM3FVPROC Uniform3fv; - PFNGLUNIFORM3IPROC Uniform3i; - PFNGLUNIFORM3IVPROC Uniform3iv; - PFNGLUNIFORM3UIPROC Uniform3ui; - PFNGLUNIFORM3UIVPROC Uniform3uiv; - PFNGLUNIFORM4DPROC Uniform4d; - PFNGLUNIFORM4DVPROC Uniform4dv; - PFNGLUNIFORM4FPROC Uniform4f; - PFNGLUNIFORM4FVPROC Uniform4fv; - PFNGLUNIFORM4IPROC Uniform4i; - PFNGLUNIFORM4IVPROC Uniform4iv; - PFNGLUNIFORM4UIPROC Uniform4ui; - PFNGLUNIFORM4UIVPROC Uniform4uiv; - PFNGLUNIFORMBLOCKBINDINGPROC UniformBlockBinding; - PFNGLUNIFORMMATRIX2DVPROC UniformMatrix2dv; - PFNGLUNIFORMMATRIX2FVPROC UniformMatrix2fv; - PFNGLUNIFORMMATRIX2X3DVPROC UniformMatrix2x3dv; - PFNGLUNIFORMMATRIX2X3FVPROC UniformMatrix2x3fv; - PFNGLUNIFORMMATRIX2X4DVPROC UniformMatrix2x4dv; - PFNGLUNIFORMMATRIX2X4FVPROC UniformMatrix2x4fv; - PFNGLUNIFORMMATRIX3DVPROC UniformMatrix3dv; - PFNGLUNIFORMMATRIX3FVPROC UniformMatrix3fv; - PFNGLUNIFORMMATRIX3X2DVPROC UniformMatrix3x2dv; - PFNGLUNIFORMMATRIX3X2FVPROC UniformMatrix3x2fv; - PFNGLUNIFORMMATRIX3X4DVPROC UniformMatrix3x4dv; - PFNGLUNIFORMMATRIX3X4FVPROC UniformMatrix3x4fv; - PFNGLUNIFORMMATRIX4DVPROC UniformMatrix4dv; - PFNGLUNIFORMMATRIX4FVPROC UniformMatrix4fv; - PFNGLUNIFORMMATRIX4X2DVPROC UniformMatrix4x2dv; - PFNGLUNIFORMMATRIX4X2FVPROC UniformMatrix4x2fv; - PFNGLUNIFORMMATRIX4X3DVPROC UniformMatrix4x3dv; - PFNGLUNIFORMMATRIX4X3FVPROC UniformMatrix4x3fv; - PFNGLUNIFORMSUBROUTINESUIVPROC UniformSubroutinesuiv; - PFNGLUNMAPBUFFERPROC UnmapBuffer; - PFNGLUNMAPNAMEDBUFFERPROC UnmapNamedBuffer; - PFNGLUSEPROGRAMPROC UseProgram; - PFNGLUSEPROGRAMSTAGESPROC UseProgramStages; - PFNGLVALIDATEPROGRAMPROC ValidateProgram; - PFNGLVALIDATEPROGRAMPIPELINEPROC ValidateProgramPipeline; - PFNGLVERTEXARRAYATTRIBBINDINGPROC VertexArrayAttribBinding; - PFNGLVERTEXARRAYATTRIBFORMATPROC VertexArrayAttribFormat; - PFNGLVERTEXARRAYATTRIBIFORMATPROC VertexArrayAttribIFormat; - PFNGLVERTEXARRAYATTRIBLFORMATPROC VertexArrayAttribLFormat; - PFNGLVERTEXARRAYBINDINGDIVISORPROC VertexArrayBindingDivisor; - PFNGLVERTEXARRAYELEMENTBUFFERPROC VertexArrayElementBuffer; - PFNGLVERTEXARRAYVERTEXBUFFERPROC VertexArrayVertexBuffer; - PFNGLVERTEXARRAYVERTEXBUFFERSPROC VertexArrayVertexBuffers; - PFNGLVERTEXATTRIB1DPROC VertexAttrib1d; - PFNGLVERTEXATTRIB1DVPROC VertexAttrib1dv; - PFNGLVERTEXATTRIB1FPROC VertexAttrib1f; - PFNGLVERTEXATTRIB1FVPROC VertexAttrib1fv; - PFNGLVERTEXATTRIB1SPROC VertexAttrib1s; - PFNGLVERTEXATTRIB1SVPROC VertexAttrib1sv; - PFNGLVERTEXATTRIB2DPROC VertexAttrib2d; - PFNGLVERTEXATTRIB2DVPROC VertexAttrib2dv; - PFNGLVERTEXATTRIB2FPROC VertexAttrib2f; - PFNGLVERTEXATTRIB2FVPROC VertexAttrib2fv; - PFNGLVERTEXATTRIB2SPROC VertexAttrib2s; - PFNGLVERTEXATTRIB2SVPROC VertexAttrib2sv; - PFNGLVERTEXATTRIB3DPROC VertexAttrib3d; - PFNGLVERTEXATTRIB3DVPROC VertexAttrib3dv; - PFNGLVERTEXATTRIB3FPROC VertexAttrib3f; - PFNGLVERTEXATTRIB3FVPROC VertexAttrib3fv; - PFNGLVERTEXATTRIB3SPROC VertexAttrib3s; - PFNGLVERTEXATTRIB3SVPROC VertexAttrib3sv; - PFNGLVERTEXATTRIB4NBVPROC VertexAttrib4Nbv; - PFNGLVERTEXATTRIB4NIVPROC VertexAttrib4Niv; - PFNGLVERTEXATTRIB4NSVPROC VertexAttrib4Nsv; - PFNGLVERTEXATTRIB4NUBPROC VertexAttrib4Nub; - PFNGLVERTEXATTRIB4NUBVPROC VertexAttrib4Nubv; - PFNGLVERTEXATTRIB4NUIVPROC VertexAttrib4Nuiv; - PFNGLVERTEXATTRIB4NUSVPROC VertexAttrib4Nusv; - PFNGLVERTEXATTRIB4BVPROC VertexAttrib4bv; - PFNGLVERTEXATTRIB4DPROC VertexAttrib4d; - PFNGLVERTEXATTRIB4DVPROC VertexAttrib4dv; - PFNGLVERTEXATTRIB4FPROC VertexAttrib4f; - PFNGLVERTEXATTRIB4FVPROC VertexAttrib4fv; - PFNGLVERTEXATTRIB4IVPROC VertexAttrib4iv; - PFNGLVERTEXATTRIB4SPROC VertexAttrib4s; - PFNGLVERTEXATTRIB4SVPROC VertexAttrib4sv; - PFNGLVERTEXATTRIB4UBVPROC VertexAttrib4ubv; - PFNGLVERTEXATTRIB4UIVPROC VertexAttrib4uiv; - PFNGLVERTEXATTRIB4USVPROC VertexAttrib4usv; - PFNGLVERTEXATTRIBBINDINGPROC VertexAttribBinding; - PFNGLVERTEXATTRIBDIVISORPROC VertexAttribDivisor; - PFNGLVERTEXATTRIBFORMATPROC VertexAttribFormat; - PFNGLVERTEXATTRIBI1IPROC VertexAttribI1i; - PFNGLVERTEXATTRIBI1IVPROC VertexAttribI1iv; - PFNGLVERTEXATTRIBI1UIPROC VertexAttribI1ui; - PFNGLVERTEXATTRIBI1UIVPROC VertexAttribI1uiv; - PFNGLVERTEXATTRIBI2IPROC VertexAttribI2i; - PFNGLVERTEXATTRIBI2IVPROC VertexAttribI2iv; - PFNGLVERTEXATTRIBI2UIPROC VertexAttribI2ui; - PFNGLVERTEXATTRIBI2UIVPROC VertexAttribI2uiv; - PFNGLVERTEXATTRIBI3IPROC VertexAttribI3i; - PFNGLVERTEXATTRIBI3IVPROC VertexAttribI3iv; - PFNGLVERTEXATTRIBI3UIPROC VertexAttribI3ui; - PFNGLVERTEXATTRIBI3UIVPROC VertexAttribI3uiv; - PFNGLVERTEXATTRIBI4BVPROC VertexAttribI4bv; - PFNGLVERTEXATTRIBI4IPROC VertexAttribI4i; - PFNGLVERTEXATTRIBI4IVPROC VertexAttribI4iv; - PFNGLVERTEXATTRIBI4SVPROC VertexAttribI4sv; - PFNGLVERTEXATTRIBI4UBVPROC VertexAttribI4ubv; - PFNGLVERTEXATTRIBI4UIPROC VertexAttribI4ui; - PFNGLVERTEXATTRIBI4UIVPROC VertexAttribI4uiv; - PFNGLVERTEXATTRIBI4USVPROC VertexAttribI4usv; - PFNGLVERTEXATTRIBIFORMATPROC VertexAttribIFormat; - PFNGLVERTEXATTRIBIPOINTERPROC VertexAttribIPointer; - PFNGLVERTEXATTRIBL1DPROC VertexAttribL1d; - PFNGLVERTEXATTRIBL1DVPROC VertexAttribL1dv; - PFNGLVERTEXATTRIBL2DPROC VertexAttribL2d; - PFNGLVERTEXATTRIBL2DVPROC VertexAttribL2dv; - PFNGLVERTEXATTRIBL3DPROC VertexAttribL3d; - PFNGLVERTEXATTRIBL3DVPROC VertexAttribL3dv; - PFNGLVERTEXATTRIBL4DPROC VertexAttribL4d; - PFNGLVERTEXATTRIBL4DVPROC VertexAttribL4dv; - PFNGLVERTEXATTRIBLFORMATPROC VertexAttribLFormat; - PFNGLVERTEXATTRIBLPOINTERPROC VertexAttribLPointer; - PFNGLVERTEXATTRIBP1UIPROC VertexAttribP1ui; - PFNGLVERTEXATTRIBP1UIVPROC VertexAttribP1uiv; - PFNGLVERTEXATTRIBP2UIPROC VertexAttribP2ui; - PFNGLVERTEXATTRIBP2UIVPROC VertexAttribP2uiv; - PFNGLVERTEXATTRIBP3UIPROC VertexAttribP3ui; - PFNGLVERTEXATTRIBP3UIVPROC VertexAttribP3uiv; - PFNGLVERTEXATTRIBP4UIPROC VertexAttribP4ui; - PFNGLVERTEXATTRIBP4UIVPROC VertexAttribP4uiv; - PFNGLVERTEXATTRIBPOINTERPROC VertexAttribPointer; - PFNGLVERTEXBINDINGDIVISORPROC VertexBindingDivisor; - PFNGLVIEWPORTPROC Viewport; - PFNGLVIEWPORTARRAYVPROC ViewportArrayv; - PFNGLVIEWPORTINDEXEDFPROC ViewportIndexedf; - PFNGLVIEWPORTINDEXEDFVPROC ViewportIndexedfv; - PFNGLWAITSYNCPROC WaitSync; - -} GladGLContext; - - - - - - -GLAD_API_CALL int gladLoadGLContextUserPtr(GladGLContext *context, GLADuserptrloadfunc load, void *userptr); -GLAD_API_CALL int gladLoadGLContext(GladGLContext *context, GLADloadfunc load); - - - -#ifdef __cplusplus -} -#endif -#endif - -/* Source */ -#ifdef GLAD_GL_IMPLEMENTATION -/** - * SPDX-License-Identifier: (WTFPL OR CC0-1.0) AND Apache-2.0 - */ -#include -#include -#include - -#ifndef GLAD_IMPL_UTIL_C_ -#define GLAD_IMPL_UTIL_C_ - -#ifdef _MSC_VER -#define GLAD_IMPL_UTIL_SSCANF sscanf_s -#else -#define GLAD_IMPL_UTIL_SSCANF sscanf -#endif - -#endif /* GLAD_IMPL_UTIL_C_ */ - -#ifdef __cplusplus -extern "C" { -#endif - - - - - - - - -static void glad_gl_load_GL_VERSION_1_0(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { - if(!context->VERSION_1_0) return; - context->BlendFunc = (PFNGLBLENDFUNCPROC) load(userptr, "glBlendFunc"); - context->Clear = (PFNGLCLEARPROC) load(userptr, "glClear"); - context->ClearColor = (PFNGLCLEARCOLORPROC) load(userptr, "glClearColor"); - context->ClearDepth = (PFNGLCLEARDEPTHPROC) load(userptr, "glClearDepth"); - context->ClearStencil = (PFNGLCLEARSTENCILPROC) load(userptr, "glClearStencil"); - context->ColorMask = (PFNGLCOLORMASKPROC) load(userptr, "glColorMask"); - context->CullFace = (PFNGLCULLFACEPROC) load(userptr, "glCullFace"); - context->DepthFunc = (PFNGLDEPTHFUNCPROC) load(userptr, "glDepthFunc"); - context->DepthMask = (PFNGLDEPTHMASKPROC) load(userptr, "glDepthMask"); - context->DepthRange = (PFNGLDEPTHRANGEPROC) load(userptr, "glDepthRange"); - context->Disable = (PFNGLDISABLEPROC) load(userptr, "glDisable"); - context->DrawBuffer = (PFNGLDRAWBUFFERPROC) load(userptr, "glDrawBuffer"); - context->Enable = (PFNGLENABLEPROC) load(userptr, "glEnable"); - context->Finish = (PFNGLFINISHPROC) load(userptr, "glFinish"); - context->Flush = (PFNGLFLUSHPROC) load(userptr, "glFlush"); - context->FrontFace = (PFNGLFRONTFACEPROC) load(userptr, "glFrontFace"); - context->GetBooleanv = (PFNGLGETBOOLEANVPROC) load(userptr, "glGetBooleanv"); - context->GetDoublev = (PFNGLGETDOUBLEVPROC) load(userptr, "glGetDoublev"); - context->GetError = (PFNGLGETERRORPROC) load(userptr, "glGetError"); - context->GetFloatv = (PFNGLGETFLOATVPROC) load(userptr, "glGetFloatv"); - context->GetIntegerv = (PFNGLGETINTEGERVPROC) load(userptr, "glGetIntegerv"); - context->GetString = (PFNGLGETSTRINGPROC) load(userptr, "glGetString"); - context->GetTexImage = (PFNGLGETTEXIMAGEPROC) load(userptr, "glGetTexImage"); - context->GetTexLevelParameterfv = (PFNGLGETTEXLEVELPARAMETERFVPROC) load(userptr, "glGetTexLevelParameterfv"); - context->GetTexLevelParameteriv = (PFNGLGETTEXLEVELPARAMETERIVPROC) load(userptr, "glGetTexLevelParameteriv"); - context->GetTexParameterfv = (PFNGLGETTEXPARAMETERFVPROC) load(userptr, "glGetTexParameterfv"); - context->GetTexParameteriv = (PFNGLGETTEXPARAMETERIVPROC) load(userptr, "glGetTexParameteriv"); - context->Hint = (PFNGLHINTPROC) load(userptr, "glHint"); - context->IsEnabled = (PFNGLISENABLEDPROC) load(userptr, "glIsEnabled"); - context->LineWidth = (PFNGLLINEWIDTHPROC) load(userptr, "glLineWidth"); - context->LogicOp = (PFNGLLOGICOPPROC) load(userptr, "glLogicOp"); - context->PixelStoref = (PFNGLPIXELSTOREFPROC) load(userptr, "glPixelStoref"); - context->PixelStorei = (PFNGLPIXELSTOREIPROC) load(userptr, "glPixelStorei"); - context->PointSize = (PFNGLPOINTSIZEPROC) load(userptr, "glPointSize"); - context->PolygonMode = (PFNGLPOLYGONMODEPROC) load(userptr, "glPolygonMode"); - context->ReadBuffer = (PFNGLREADBUFFERPROC) load(userptr, "glReadBuffer"); - context->ReadPixels = (PFNGLREADPIXELSPROC) load(userptr, "glReadPixels"); - context->Scissor = (PFNGLSCISSORPROC) load(userptr, "glScissor"); - context->StencilFunc = (PFNGLSTENCILFUNCPROC) load(userptr, "glStencilFunc"); - context->StencilMask = (PFNGLSTENCILMASKPROC) load(userptr, "glStencilMask"); - context->StencilOp = (PFNGLSTENCILOPPROC) load(userptr, "glStencilOp"); - context->TexImage1D = (PFNGLTEXIMAGE1DPROC) load(userptr, "glTexImage1D"); - context->TexImage2D = (PFNGLTEXIMAGE2DPROC) load(userptr, "glTexImage2D"); - context->TexParameterf = (PFNGLTEXPARAMETERFPROC) load(userptr, "glTexParameterf"); - context->TexParameterfv = (PFNGLTEXPARAMETERFVPROC) load(userptr, "glTexParameterfv"); - context->TexParameteri = (PFNGLTEXPARAMETERIPROC) load(userptr, "glTexParameteri"); - context->TexParameteriv = (PFNGLTEXPARAMETERIVPROC) load(userptr, "glTexParameteriv"); - context->Viewport = (PFNGLVIEWPORTPROC) load(userptr, "glViewport"); -} -static void glad_gl_load_GL_VERSION_1_1(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { - if(!context->VERSION_1_1) return; - context->BindTexture = (PFNGLBINDTEXTUREPROC) load(userptr, "glBindTexture"); - context->CopyTexImage1D = (PFNGLCOPYTEXIMAGE1DPROC) load(userptr, "glCopyTexImage1D"); - context->CopyTexImage2D = (PFNGLCOPYTEXIMAGE2DPROC) load(userptr, "glCopyTexImage2D"); - context->CopyTexSubImage1D = (PFNGLCOPYTEXSUBIMAGE1DPROC) load(userptr, "glCopyTexSubImage1D"); - context->CopyTexSubImage2D = (PFNGLCOPYTEXSUBIMAGE2DPROC) load(userptr, "glCopyTexSubImage2D"); - context->DeleteTextures = (PFNGLDELETETEXTURESPROC) load(userptr, "glDeleteTextures"); - context->DrawArrays = (PFNGLDRAWARRAYSPROC) load(userptr, "glDrawArrays"); - context->DrawElements = (PFNGLDRAWELEMENTSPROC) load(userptr, "glDrawElements"); - context->GenTextures = (PFNGLGENTEXTURESPROC) load(userptr, "glGenTextures"); - context->GetPointerv = (PFNGLGETPOINTERVPROC) load(userptr, "glGetPointerv"); - context->IsTexture = (PFNGLISTEXTUREPROC) load(userptr, "glIsTexture"); - context->PolygonOffset = (PFNGLPOLYGONOFFSETPROC) load(userptr, "glPolygonOffset"); - context->TexSubImage1D = (PFNGLTEXSUBIMAGE1DPROC) load(userptr, "glTexSubImage1D"); - context->TexSubImage2D = (PFNGLTEXSUBIMAGE2DPROC) load(userptr, "glTexSubImage2D"); -} -static void glad_gl_load_GL_VERSION_1_2(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { - if(!context->VERSION_1_2) return; - context->CopyTexSubImage3D = (PFNGLCOPYTEXSUBIMAGE3DPROC) load(userptr, "glCopyTexSubImage3D"); - context->DrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC) load(userptr, "glDrawRangeElements"); - context->TexImage3D = (PFNGLTEXIMAGE3DPROC) load(userptr, "glTexImage3D"); - context->TexSubImage3D = (PFNGLTEXSUBIMAGE3DPROC) load(userptr, "glTexSubImage3D"); -} -static void glad_gl_load_GL_VERSION_1_3(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { - if(!context->VERSION_1_3) return; - context->ActiveTexture = (PFNGLACTIVETEXTUREPROC) load(userptr, "glActiveTexture"); - context->CompressedTexImage1D = (PFNGLCOMPRESSEDTEXIMAGE1DPROC) load(userptr, "glCompressedTexImage1D"); - context->CompressedTexImage2D = (PFNGLCOMPRESSEDTEXIMAGE2DPROC) load(userptr, "glCompressedTexImage2D"); - context->CompressedTexImage3D = (PFNGLCOMPRESSEDTEXIMAGE3DPROC) load(userptr, "glCompressedTexImage3D"); - context->CompressedTexSubImage1D = (PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) load(userptr, "glCompressedTexSubImage1D"); - context->CompressedTexSubImage2D = (PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) load(userptr, "glCompressedTexSubImage2D"); - context->CompressedTexSubImage3D = (PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) load(userptr, "glCompressedTexSubImage3D"); - context->GetCompressedTexImage = (PFNGLGETCOMPRESSEDTEXIMAGEPROC) load(userptr, "glGetCompressedTexImage"); - context->SampleCoverage = (PFNGLSAMPLECOVERAGEPROC) load(userptr, "glSampleCoverage"); -} -static void glad_gl_load_GL_VERSION_1_4(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { - if(!context->VERSION_1_4) return; - context->BlendColor = (PFNGLBLENDCOLORPROC) load(userptr, "glBlendColor"); - context->BlendEquation = (PFNGLBLENDEQUATIONPROC) load(userptr, "glBlendEquation"); - context->BlendFuncSeparate = (PFNGLBLENDFUNCSEPARATEPROC) load(userptr, "glBlendFuncSeparate"); - context->MultiDrawArrays = (PFNGLMULTIDRAWARRAYSPROC) load(userptr, "glMultiDrawArrays"); - context->MultiDrawElements = (PFNGLMULTIDRAWELEMENTSPROC) load(userptr, "glMultiDrawElements"); - context->PointParameterf = (PFNGLPOINTPARAMETERFPROC) load(userptr, "glPointParameterf"); - context->PointParameterfv = (PFNGLPOINTPARAMETERFVPROC) load(userptr, "glPointParameterfv"); - context->PointParameteri = (PFNGLPOINTPARAMETERIPROC) load(userptr, "glPointParameteri"); - context->PointParameteriv = (PFNGLPOINTPARAMETERIVPROC) load(userptr, "glPointParameteriv"); -} -static void glad_gl_load_GL_VERSION_1_5(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { - if(!context->VERSION_1_5) return; - context->BeginQuery = (PFNGLBEGINQUERYPROC) load(userptr, "glBeginQuery"); - context->BindBuffer = (PFNGLBINDBUFFERPROC) load(userptr, "glBindBuffer"); - context->BufferData = (PFNGLBUFFERDATAPROC) load(userptr, "glBufferData"); - context->BufferSubData = (PFNGLBUFFERSUBDATAPROC) load(userptr, "glBufferSubData"); - context->DeleteBuffers = (PFNGLDELETEBUFFERSPROC) load(userptr, "glDeleteBuffers"); - context->DeleteQueries = (PFNGLDELETEQUERIESPROC) load(userptr, "glDeleteQueries"); - context->EndQuery = (PFNGLENDQUERYPROC) load(userptr, "glEndQuery"); - context->GenBuffers = (PFNGLGENBUFFERSPROC) load(userptr, "glGenBuffers"); - context->GenQueries = (PFNGLGENQUERIESPROC) load(userptr, "glGenQueries"); - context->GetBufferParameteriv = (PFNGLGETBUFFERPARAMETERIVPROC) load(userptr, "glGetBufferParameteriv"); - context->GetBufferPointerv = (PFNGLGETBUFFERPOINTERVPROC) load(userptr, "glGetBufferPointerv"); - context->GetBufferSubData = (PFNGLGETBUFFERSUBDATAPROC) load(userptr, "glGetBufferSubData"); - context->GetQueryObjectiv = (PFNGLGETQUERYOBJECTIVPROC) load(userptr, "glGetQueryObjectiv"); - context->GetQueryObjectuiv = (PFNGLGETQUERYOBJECTUIVPROC) load(userptr, "glGetQueryObjectuiv"); - context->GetQueryiv = (PFNGLGETQUERYIVPROC) load(userptr, "glGetQueryiv"); - context->IsBuffer = (PFNGLISBUFFERPROC) load(userptr, "glIsBuffer"); - context->IsQuery = (PFNGLISQUERYPROC) load(userptr, "glIsQuery"); - context->MapBuffer = (PFNGLMAPBUFFERPROC) load(userptr, "glMapBuffer"); - context->UnmapBuffer = (PFNGLUNMAPBUFFERPROC) load(userptr, "glUnmapBuffer"); -} -static void glad_gl_load_GL_VERSION_2_0(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { - if(!context->VERSION_2_0) return; - context->AttachShader = (PFNGLATTACHSHADERPROC) load(userptr, "glAttachShader"); - context->BindAttribLocation = (PFNGLBINDATTRIBLOCATIONPROC) load(userptr, "glBindAttribLocation"); - context->BlendEquationSeparate = (PFNGLBLENDEQUATIONSEPARATEPROC) load(userptr, "glBlendEquationSeparate"); - context->CompileShader = (PFNGLCOMPILESHADERPROC) load(userptr, "glCompileShader"); - context->CreateProgram = (PFNGLCREATEPROGRAMPROC) load(userptr, "glCreateProgram"); - context->CreateShader = (PFNGLCREATESHADERPROC) load(userptr, "glCreateShader"); - context->DeleteProgram = (PFNGLDELETEPROGRAMPROC) load(userptr, "glDeleteProgram"); - context->DeleteShader = (PFNGLDELETESHADERPROC) load(userptr, "glDeleteShader"); - context->DetachShader = (PFNGLDETACHSHADERPROC) load(userptr, "glDetachShader"); - context->DisableVertexAttribArray = (PFNGLDISABLEVERTEXATTRIBARRAYPROC) load(userptr, "glDisableVertexAttribArray"); - context->DrawBuffers = (PFNGLDRAWBUFFERSPROC) load(userptr, "glDrawBuffers"); - context->EnableVertexAttribArray = (PFNGLENABLEVERTEXATTRIBARRAYPROC) load(userptr, "glEnableVertexAttribArray"); - context->GetActiveAttrib = (PFNGLGETACTIVEATTRIBPROC) load(userptr, "glGetActiveAttrib"); - context->GetActiveUniform = (PFNGLGETACTIVEUNIFORMPROC) load(userptr, "glGetActiveUniform"); - context->GetAttachedShaders = (PFNGLGETATTACHEDSHADERSPROC) load(userptr, "glGetAttachedShaders"); - context->GetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC) load(userptr, "glGetAttribLocation"); - context->GetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC) load(userptr, "glGetProgramInfoLog"); - context->GetProgramiv = (PFNGLGETPROGRAMIVPROC) load(userptr, "glGetProgramiv"); - context->GetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC) load(userptr, "glGetShaderInfoLog"); - context->GetShaderSource = (PFNGLGETSHADERSOURCEPROC) load(userptr, "glGetShaderSource"); - context->GetShaderiv = (PFNGLGETSHADERIVPROC) load(userptr, "glGetShaderiv"); - context->GetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC) load(userptr, "glGetUniformLocation"); - context->GetUniformfv = (PFNGLGETUNIFORMFVPROC) load(userptr, "glGetUniformfv"); - context->GetUniformiv = (PFNGLGETUNIFORMIVPROC) load(userptr, "glGetUniformiv"); - context->GetVertexAttribPointerv = (PFNGLGETVERTEXATTRIBPOINTERVPROC) load(userptr, "glGetVertexAttribPointerv"); - context->GetVertexAttribdv = (PFNGLGETVERTEXATTRIBDVPROC) load(userptr, "glGetVertexAttribdv"); - context->GetVertexAttribfv = (PFNGLGETVERTEXATTRIBFVPROC) load(userptr, "glGetVertexAttribfv"); - context->GetVertexAttribiv = (PFNGLGETVERTEXATTRIBIVPROC) load(userptr, "glGetVertexAttribiv"); - context->IsProgram = (PFNGLISPROGRAMPROC) load(userptr, "glIsProgram"); - context->IsShader = (PFNGLISSHADERPROC) load(userptr, "glIsShader"); - context->LinkProgram = (PFNGLLINKPROGRAMPROC) load(userptr, "glLinkProgram"); - context->ShaderSource = (PFNGLSHADERSOURCEPROC) load(userptr, "glShaderSource"); - context->StencilFuncSeparate = (PFNGLSTENCILFUNCSEPARATEPROC) load(userptr, "glStencilFuncSeparate"); - context->StencilMaskSeparate = (PFNGLSTENCILMASKSEPARATEPROC) load(userptr, "glStencilMaskSeparate"); - context->StencilOpSeparate = (PFNGLSTENCILOPSEPARATEPROC) load(userptr, "glStencilOpSeparate"); - context->Uniform1f = (PFNGLUNIFORM1FPROC) load(userptr, "glUniform1f"); - context->Uniform1fv = (PFNGLUNIFORM1FVPROC) load(userptr, "glUniform1fv"); - context->Uniform1i = (PFNGLUNIFORM1IPROC) load(userptr, "glUniform1i"); - context->Uniform1iv = (PFNGLUNIFORM1IVPROC) load(userptr, "glUniform1iv"); - context->Uniform2f = (PFNGLUNIFORM2FPROC) load(userptr, "glUniform2f"); - context->Uniform2fv = (PFNGLUNIFORM2FVPROC) load(userptr, "glUniform2fv"); - context->Uniform2i = (PFNGLUNIFORM2IPROC) load(userptr, "glUniform2i"); - context->Uniform2iv = (PFNGLUNIFORM2IVPROC) load(userptr, "glUniform2iv"); - context->Uniform3f = (PFNGLUNIFORM3FPROC) load(userptr, "glUniform3f"); - context->Uniform3fv = (PFNGLUNIFORM3FVPROC) load(userptr, "glUniform3fv"); - context->Uniform3i = (PFNGLUNIFORM3IPROC) load(userptr, "glUniform3i"); - context->Uniform3iv = (PFNGLUNIFORM3IVPROC) load(userptr, "glUniform3iv"); - context->Uniform4f = (PFNGLUNIFORM4FPROC) load(userptr, "glUniform4f"); - context->Uniform4fv = (PFNGLUNIFORM4FVPROC) load(userptr, "glUniform4fv"); - context->Uniform4i = (PFNGLUNIFORM4IPROC) load(userptr, "glUniform4i"); - context->Uniform4iv = (PFNGLUNIFORM4IVPROC) load(userptr, "glUniform4iv"); - context->UniformMatrix2fv = (PFNGLUNIFORMMATRIX2FVPROC) load(userptr, "glUniformMatrix2fv"); - context->UniformMatrix3fv = (PFNGLUNIFORMMATRIX3FVPROC) load(userptr, "glUniformMatrix3fv"); - context->UniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC) load(userptr, "glUniformMatrix4fv"); - context->UseProgram = (PFNGLUSEPROGRAMPROC) load(userptr, "glUseProgram"); - context->ValidateProgram = (PFNGLVALIDATEPROGRAMPROC) load(userptr, "glValidateProgram"); - context->VertexAttrib1d = (PFNGLVERTEXATTRIB1DPROC) load(userptr, "glVertexAttrib1d"); - context->VertexAttrib1dv = (PFNGLVERTEXATTRIB1DVPROC) load(userptr, "glVertexAttrib1dv"); - context->VertexAttrib1f = (PFNGLVERTEXATTRIB1FPROC) load(userptr, "glVertexAttrib1f"); - context->VertexAttrib1fv = (PFNGLVERTEXATTRIB1FVPROC) load(userptr, "glVertexAttrib1fv"); - context->VertexAttrib1s = (PFNGLVERTEXATTRIB1SPROC) load(userptr, "glVertexAttrib1s"); - context->VertexAttrib1sv = (PFNGLVERTEXATTRIB1SVPROC) load(userptr, "glVertexAttrib1sv"); - context->VertexAttrib2d = (PFNGLVERTEXATTRIB2DPROC) load(userptr, "glVertexAttrib2d"); - context->VertexAttrib2dv = (PFNGLVERTEXATTRIB2DVPROC) load(userptr, "glVertexAttrib2dv"); - context->VertexAttrib2f = (PFNGLVERTEXATTRIB2FPROC) load(userptr, "glVertexAttrib2f"); - context->VertexAttrib2fv = (PFNGLVERTEXATTRIB2FVPROC) load(userptr, "glVertexAttrib2fv"); - context->VertexAttrib2s = (PFNGLVERTEXATTRIB2SPROC) load(userptr, "glVertexAttrib2s"); - context->VertexAttrib2sv = (PFNGLVERTEXATTRIB2SVPROC) load(userptr, "glVertexAttrib2sv"); - context->VertexAttrib3d = (PFNGLVERTEXATTRIB3DPROC) load(userptr, "glVertexAttrib3d"); - context->VertexAttrib3dv = (PFNGLVERTEXATTRIB3DVPROC) load(userptr, "glVertexAttrib3dv"); - context->VertexAttrib3f = (PFNGLVERTEXATTRIB3FPROC) load(userptr, "glVertexAttrib3f"); - context->VertexAttrib3fv = (PFNGLVERTEXATTRIB3FVPROC) load(userptr, "glVertexAttrib3fv"); - context->VertexAttrib3s = (PFNGLVERTEXATTRIB3SPROC) load(userptr, "glVertexAttrib3s"); - context->VertexAttrib3sv = (PFNGLVERTEXATTRIB3SVPROC) load(userptr, "glVertexAttrib3sv"); - context->VertexAttrib4Nbv = (PFNGLVERTEXATTRIB4NBVPROC) load(userptr, "glVertexAttrib4Nbv"); - context->VertexAttrib4Niv = (PFNGLVERTEXATTRIB4NIVPROC) load(userptr, "glVertexAttrib4Niv"); - context->VertexAttrib4Nsv = (PFNGLVERTEXATTRIB4NSVPROC) load(userptr, "glVertexAttrib4Nsv"); - context->VertexAttrib4Nub = (PFNGLVERTEXATTRIB4NUBPROC) load(userptr, "glVertexAttrib4Nub"); - context->VertexAttrib4Nubv = (PFNGLVERTEXATTRIB4NUBVPROC) load(userptr, "glVertexAttrib4Nubv"); - context->VertexAttrib4Nuiv = (PFNGLVERTEXATTRIB4NUIVPROC) load(userptr, "glVertexAttrib4Nuiv"); - context->VertexAttrib4Nusv = (PFNGLVERTEXATTRIB4NUSVPROC) load(userptr, "glVertexAttrib4Nusv"); - context->VertexAttrib4bv = (PFNGLVERTEXATTRIB4BVPROC) load(userptr, "glVertexAttrib4bv"); - context->VertexAttrib4d = (PFNGLVERTEXATTRIB4DPROC) load(userptr, "glVertexAttrib4d"); - context->VertexAttrib4dv = (PFNGLVERTEXATTRIB4DVPROC) load(userptr, "glVertexAttrib4dv"); - context->VertexAttrib4f = (PFNGLVERTEXATTRIB4FPROC) load(userptr, "glVertexAttrib4f"); - context->VertexAttrib4fv = (PFNGLVERTEXATTRIB4FVPROC) load(userptr, "glVertexAttrib4fv"); - context->VertexAttrib4iv = (PFNGLVERTEXATTRIB4IVPROC) load(userptr, "glVertexAttrib4iv"); - context->VertexAttrib4s = (PFNGLVERTEXATTRIB4SPROC) load(userptr, "glVertexAttrib4s"); - context->VertexAttrib4sv = (PFNGLVERTEXATTRIB4SVPROC) load(userptr, "glVertexAttrib4sv"); - context->VertexAttrib4ubv = (PFNGLVERTEXATTRIB4UBVPROC) load(userptr, "glVertexAttrib4ubv"); - context->VertexAttrib4uiv = (PFNGLVERTEXATTRIB4UIVPROC) load(userptr, "glVertexAttrib4uiv"); - context->VertexAttrib4usv = (PFNGLVERTEXATTRIB4USVPROC) load(userptr, "glVertexAttrib4usv"); - context->VertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC) load(userptr, "glVertexAttribPointer"); -} -static void glad_gl_load_GL_VERSION_2_1(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { - if(!context->VERSION_2_1) return; - context->UniformMatrix2x3fv = (PFNGLUNIFORMMATRIX2X3FVPROC) load(userptr, "glUniformMatrix2x3fv"); - context->UniformMatrix2x4fv = (PFNGLUNIFORMMATRIX2X4FVPROC) load(userptr, "glUniformMatrix2x4fv"); - context->UniformMatrix3x2fv = (PFNGLUNIFORMMATRIX3X2FVPROC) load(userptr, "glUniformMatrix3x2fv"); - context->UniformMatrix3x4fv = (PFNGLUNIFORMMATRIX3X4FVPROC) load(userptr, "glUniformMatrix3x4fv"); - context->UniformMatrix4x2fv = (PFNGLUNIFORMMATRIX4X2FVPROC) load(userptr, "glUniformMatrix4x2fv"); - context->UniformMatrix4x3fv = (PFNGLUNIFORMMATRIX4X3FVPROC) load(userptr, "glUniformMatrix4x3fv"); -} -static void glad_gl_load_GL_VERSION_3_0(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { - if(!context->VERSION_3_0) return; - context->BeginConditionalRender = (PFNGLBEGINCONDITIONALRENDERPROC) load(userptr, "glBeginConditionalRender"); - context->BeginTransformFeedback = (PFNGLBEGINTRANSFORMFEEDBACKPROC) load(userptr, "glBeginTransformFeedback"); - context->BindBufferBase = (PFNGLBINDBUFFERBASEPROC) load(userptr, "glBindBufferBase"); - context->BindBufferRange = (PFNGLBINDBUFFERRANGEPROC) load(userptr, "glBindBufferRange"); - context->BindFragDataLocation = (PFNGLBINDFRAGDATALOCATIONPROC) load(userptr, "glBindFragDataLocation"); - context->BindFramebuffer = (PFNGLBINDFRAMEBUFFERPROC) load(userptr, "glBindFramebuffer"); - context->BindRenderbuffer = (PFNGLBINDRENDERBUFFERPROC) load(userptr, "glBindRenderbuffer"); - context->BindVertexArray = (PFNGLBINDVERTEXARRAYPROC) load(userptr, "glBindVertexArray"); - context->BlitFramebuffer = (PFNGLBLITFRAMEBUFFERPROC) load(userptr, "glBlitFramebuffer"); - context->CheckFramebufferStatus = (PFNGLCHECKFRAMEBUFFERSTATUSPROC) load(userptr, "glCheckFramebufferStatus"); - context->ClampColor = (PFNGLCLAMPCOLORPROC) load(userptr, "glClampColor"); - context->ClearBufferfi = (PFNGLCLEARBUFFERFIPROC) load(userptr, "glClearBufferfi"); - context->ClearBufferfv = (PFNGLCLEARBUFFERFVPROC) load(userptr, "glClearBufferfv"); - context->ClearBufferiv = (PFNGLCLEARBUFFERIVPROC) load(userptr, "glClearBufferiv"); - context->ClearBufferuiv = (PFNGLCLEARBUFFERUIVPROC) load(userptr, "glClearBufferuiv"); - context->ColorMaski = (PFNGLCOLORMASKIPROC) load(userptr, "glColorMaski"); - context->DeleteFramebuffers = (PFNGLDELETEFRAMEBUFFERSPROC) load(userptr, "glDeleteFramebuffers"); - context->DeleteRenderbuffers = (PFNGLDELETERENDERBUFFERSPROC) load(userptr, "glDeleteRenderbuffers"); - context->DeleteVertexArrays = (PFNGLDELETEVERTEXARRAYSPROC) load(userptr, "glDeleteVertexArrays"); - context->Disablei = (PFNGLDISABLEIPROC) load(userptr, "glDisablei"); - context->Enablei = (PFNGLENABLEIPROC) load(userptr, "glEnablei"); - context->EndConditionalRender = (PFNGLENDCONDITIONALRENDERPROC) load(userptr, "glEndConditionalRender"); - context->EndTransformFeedback = (PFNGLENDTRANSFORMFEEDBACKPROC) load(userptr, "glEndTransformFeedback"); - context->FlushMappedBufferRange = (PFNGLFLUSHMAPPEDBUFFERRANGEPROC) load(userptr, "glFlushMappedBufferRange"); - context->FramebufferRenderbuffer = (PFNGLFRAMEBUFFERRENDERBUFFERPROC) load(userptr, "glFramebufferRenderbuffer"); - context->FramebufferTexture1D = (PFNGLFRAMEBUFFERTEXTURE1DPROC) load(userptr, "glFramebufferTexture1D"); - context->FramebufferTexture2D = (PFNGLFRAMEBUFFERTEXTURE2DPROC) load(userptr, "glFramebufferTexture2D"); - context->FramebufferTexture3D = (PFNGLFRAMEBUFFERTEXTURE3DPROC) load(userptr, "glFramebufferTexture3D"); - context->FramebufferTextureLayer = (PFNGLFRAMEBUFFERTEXTURELAYERPROC) load(userptr, "glFramebufferTextureLayer"); - context->GenFramebuffers = (PFNGLGENFRAMEBUFFERSPROC) load(userptr, "glGenFramebuffers"); - context->GenRenderbuffers = (PFNGLGENRENDERBUFFERSPROC) load(userptr, "glGenRenderbuffers"); - context->GenVertexArrays = (PFNGLGENVERTEXARRAYSPROC) load(userptr, "glGenVertexArrays"); - context->GenerateMipmap = (PFNGLGENERATEMIPMAPPROC) load(userptr, "glGenerateMipmap"); - context->GetBooleani_v = (PFNGLGETBOOLEANI_VPROC) load(userptr, "glGetBooleani_v"); - context->GetFragDataLocation = (PFNGLGETFRAGDATALOCATIONPROC) load(userptr, "glGetFragDataLocation"); - context->GetFramebufferAttachmentParameteriv = (PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) load(userptr, "glGetFramebufferAttachmentParameteriv"); - context->GetIntegeri_v = (PFNGLGETINTEGERI_VPROC) load(userptr, "glGetIntegeri_v"); - context->GetRenderbufferParameteriv = (PFNGLGETRENDERBUFFERPARAMETERIVPROC) load(userptr, "glGetRenderbufferParameteriv"); - context->GetStringi = (PFNGLGETSTRINGIPROC) load(userptr, "glGetStringi"); - context->GetTexParameterIiv = (PFNGLGETTEXPARAMETERIIVPROC) load(userptr, "glGetTexParameterIiv"); - context->GetTexParameterIuiv = (PFNGLGETTEXPARAMETERIUIVPROC) load(userptr, "glGetTexParameterIuiv"); - context->GetTransformFeedbackVarying = (PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) load(userptr, "glGetTransformFeedbackVarying"); - context->GetUniformuiv = (PFNGLGETUNIFORMUIVPROC) load(userptr, "glGetUniformuiv"); - context->GetVertexAttribIiv = (PFNGLGETVERTEXATTRIBIIVPROC) load(userptr, "glGetVertexAttribIiv"); - context->GetVertexAttribIuiv = (PFNGLGETVERTEXATTRIBIUIVPROC) load(userptr, "glGetVertexAttribIuiv"); - context->IsEnabledi = (PFNGLISENABLEDIPROC) load(userptr, "glIsEnabledi"); - context->IsFramebuffer = (PFNGLISFRAMEBUFFERPROC) load(userptr, "glIsFramebuffer"); - context->IsRenderbuffer = (PFNGLISRENDERBUFFERPROC) load(userptr, "glIsRenderbuffer"); - context->IsVertexArray = (PFNGLISVERTEXARRAYPROC) load(userptr, "glIsVertexArray"); - context->MapBufferRange = (PFNGLMAPBUFFERRANGEPROC) load(userptr, "glMapBufferRange"); - context->RenderbufferStorage = (PFNGLRENDERBUFFERSTORAGEPROC) load(userptr, "glRenderbufferStorage"); - context->RenderbufferStorageMultisample = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) load(userptr, "glRenderbufferStorageMultisample"); - context->TexParameterIiv = (PFNGLTEXPARAMETERIIVPROC) load(userptr, "glTexParameterIiv"); - context->TexParameterIuiv = (PFNGLTEXPARAMETERIUIVPROC) load(userptr, "glTexParameterIuiv"); - context->TransformFeedbackVaryings = (PFNGLTRANSFORMFEEDBACKVARYINGSPROC) load(userptr, "glTransformFeedbackVaryings"); - context->Uniform1ui = (PFNGLUNIFORM1UIPROC) load(userptr, "glUniform1ui"); - context->Uniform1uiv = (PFNGLUNIFORM1UIVPROC) load(userptr, "glUniform1uiv"); - context->Uniform2ui = (PFNGLUNIFORM2UIPROC) load(userptr, "glUniform2ui"); - context->Uniform2uiv = (PFNGLUNIFORM2UIVPROC) load(userptr, "glUniform2uiv"); - context->Uniform3ui = (PFNGLUNIFORM3UIPROC) load(userptr, "glUniform3ui"); - context->Uniform3uiv = (PFNGLUNIFORM3UIVPROC) load(userptr, "glUniform3uiv"); - context->Uniform4ui = (PFNGLUNIFORM4UIPROC) load(userptr, "glUniform4ui"); - context->Uniform4uiv = (PFNGLUNIFORM4UIVPROC) load(userptr, "glUniform4uiv"); - context->VertexAttribI1i = (PFNGLVERTEXATTRIBI1IPROC) load(userptr, "glVertexAttribI1i"); - context->VertexAttribI1iv = (PFNGLVERTEXATTRIBI1IVPROC) load(userptr, "glVertexAttribI1iv"); - context->VertexAttribI1ui = (PFNGLVERTEXATTRIBI1UIPROC) load(userptr, "glVertexAttribI1ui"); - context->VertexAttribI1uiv = (PFNGLVERTEXATTRIBI1UIVPROC) load(userptr, "glVertexAttribI1uiv"); - context->VertexAttribI2i = (PFNGLVERTEXATTRIBI2IPROC) load(userptr, "glVertexAttribI2i"); - context->VertexAttribI2iv = (PFNGLVERTEXATTRIBI2IVPROC) load(userptr, "glVertexAttribI2iv"); - context->VertexAttribI2ui = (PFNGLVERTEXATTRIBI2UIPROC) load(userptr, "glVertexAttribI2ui"); - context->VertexAttribI2uiv = (PFNGLVERTEXATTRIBI2UIVPROC) load(userptr, "glVertexAttribI2uiv"); - context->VertexAttribI3i = (PFNGLVERTEXATTRIBI3IPROC) load(userptr, "glVertexAttribI3i"); - context->VertexAttribI3iv = (PFNGLVERTEXATTRIBI3IVPROC) load(userptr, "glVertexAttribI3iv"); - context->VertexAttribI3ui = (PFNGLVERTEXATTRIBI3UIPROC) load(userptr, "glVertexAttribI3ui"); - context->VertexAttribI3uiv = (PFNGLVERTEXATTRIBI3UIVPROC) load(userptr, "glVertexAttribI3uiv"); - context->VertexAttribI4bv = (PFNGLVERTEXATTRIBI4BVPROC) load(userptr, "glVertexAttribI4bv"); - context->VertexAttribI4i = (PFNGLVERTEXATTRIBI4IPROC) load(userptr, "glVertexAttribI4i"); - context->VertexAttribI4iv = (PFNGLVERTEXATTRIBI4IVPROC) load(userptr, "glVertexAttribI4iv"); - context->VertexAttribI4sv = (PFNGLVERTEXATTRIBI4SVPROC) load(userptr, "glVertexAttribI4sv"); - context->VertexAttribI4ubv = (PFNGLVERTEXATTRIBI4UBVPROC) load(userptr, "glVertexAttribI4ubv"); - context->VertexAttribI4ui = (PFNGLVERTEXATTRIBI4UIPROC) load(userptr, "glVertexAttribI4ui"); - context->VertexAttribI4uiv = (PFNGLVERTEXATTRIBI4UIVPROC) load(userptr, "glVertexAttribI4uiv"); - context->VertexAttribI4usv = (PFNGLVERTEXATTRIBI4USVPROC) load(userptr, "glVertexAttribI4usv"); - context->VertexAttribIPointer = (PFNGLVERTEXATTRIBIPOINTERPROC) load(userptr, "glVertexAttribIPointer"); -} -static void glad_gl_load_GL_VERSION_3_1(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { - if(!context->VERSION_3_1) return; - context->BindBufferBase = (PFNGLBINDBUFFERBASEPROC) load(userptr, "glBindBufferBase"); - context->BindBufferRange = (PFNGLBINDBUFFERRANGEPROC) load(userptr, "glBindBufferRange"); - context->CopyBufferSubData = (PFNGLCOPYBUFFERSUBDATAPROC) load(userptr, "glCopyBufferSubData"); - context->DrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDPROC) load(userptr, "glDrawArraysInstanced"); - context->DrawElementsInstanced = (PFNGLDRAWELEMENTSINSTANCEDPROC) load(userptr, "glDrawElementsInstanced"); - context->GetActiveUniformBlockName = (PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) load(userptr, "glGetActiveUniformBlockName"); - context->GetActiveUniformBlockiv = (PFNGLGETACTIVEUNIFORMBLOCKIVPROC) load(userptr, "glGetActiveUniformBlockiv"); - context->GetActiveUniformName = (PFNGLGETACTIVEUNIFORMNAMEPROC) load(userptr, "glGetActiveUniformName"); - context->GetActiveUniformsiv = (PFNGLGETACTIVEUNIFORMSIVPROC) load(userptr, "glGetActiveUniformsiv"); - context->GetIntegeri_v = (PFNGLGETINTEGERI_VPROC) load(userptr, "glGetIntegeri_v"); - context->GetUniformBlockIndex = (PFNGLGETUNIFORMBLOCKINDEXPROC) load(userptr, "glGetUniformBlockIndex"); - context->GetUniformIndices = (PFNGLGETUNIFORMINDICESPROC) load(userptr, "glGetUniformIndices"); - context->PrimitiveRestartIndex = (PFNGLPRIMITIVERESTARTINDEXPROC) load(userptr, "glPrimitiveRestartIndex"); - context->TexBuffer = (PFNGLTEXBUFFERPROC) load(userptr, "glTexBuffer"); - context->UniformBlockBinding = (PFNGLUNIFORMBLOCKBINDINGPROC) load(userptr, "glUniformBlockBinding"); -} -static void glad_gl_load_GL_VERSION_3_2(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { - if(!context->VERSION_3_2) return; - context->ClientWaitSync = (PFNGLCLIENTWAITSYNCPROC) load(userptr, "glClientWaitSync"); - context->DeleteSync = (PFNGLDELETESYNCPROC) load(userptr, "glDeleteSync"); - context->DrawElementsBaseVertex = (PFNGLDRAWELEMENTSBASEVERTEXPROC) load(userptr, "glDrawElementsBaseVertex"); - context->DrawElementsInstancedBaseVertex = (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) load(userptr, "glDrawElementsInstancedBaseVertex"); - context->DrawRangeElementsBaseVertex = (PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) load(userptr, "glDrawRangeElementsBaseVertex"); - context->FenceSync = (PFNGLFENCESYNCPROC) load(userptr, "glFenceSync"); - context->FramebufferTexture = (PFNGLFRAMEBUFFERTEXTUREPROC) load(userptr, "glFramebufferTexture"); - context->GetBufferParameteri64v = (PFNGLGETBUFFERPARAMETERI64VPROC) load(userptr, "glGetBufferParameteri64v"); - context->GetInteger64i_v = (PFNGLGETINTEGER64I_VPROC) load(userptr, "glGetInteger64i_v"); - context->GetInteger64v = (PFNGLGETINTEGER64VPROC) load(userptr, "glGetInteger64v"); - context->GetMultisamplefv = (PFNGLGETMULTISAMPLEFVPROC) load(userptr, "glGetMultisamplefv"); - context->GetSynciv = (PFNGLGETSYNCIVPROC) load(userptr, "glGetSynciv"); - context->IsSync = (PFNGLISSYNCPROC) load(userptr, "glIsSync"); - context->MultiDrawElementsBaseVertex = (PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) load(userptr, "glMultiDrawElementsBaseVertex"); - context->ProvokingVertex = (PFNGLPROVOKINGVERTEXPROC) load(userptr, "glProvokingVertex"); - context->SampleMaski = (PFNGLSAMPLEMASKIPROC) load(userptr, "glSampleMaski"); - context->TexImage2DMultisample = (PFNGLTEXIMAGE2DMULTISAMPLEPROC) load(userptr, "glTexImage2DMultisample"); - context->TexImage3DMultisample = (PFNGLTEXIMAGE3DMULTISAMPLEPROC) load(userptr, "glTexImage3DMultisample"); - context->WaitSync = (PFNGLWAITSYNCPROC) load(userptr, "glWaitSync"); -} -static void glad_gl_load_GL_VERSION_3_3(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { - if(!context->VERSION_3_3) return; - context->BindFragDataLocationIndexed = (PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) load(userptr, "glBindFragDataLocationIndexed"); - context->BindSampler = (PFNGLBINDSAMPLERPROC) load(userptr, "glBindSampler"); - context->DeleteSamplers = (PFNGLDELETESAMPLERSPROC) load(userptr, "glDeleteSamplers"); - context->GenSamplers = (PFNGLGENSAMPLERSPROC) load(userptr, "glGenSamplers"); - context->GetFragDataIndex = (PFNGLGETFRAGDATAINDEXPROC) load(userptr, "glGetFragDataIndex"); - context->GetQueryObjecti64v = (PFNGLGETQUERYOBJECTI64VPROC) load(userptr, "glGetQueryObjecti64v"); - context->GetQueryObjectui64v = (PFNGLGETQUERYOBJECTUI64VPROC) load(userptr, "glGetQueryObjectui64v"); - context->GetSamplerParameterIiv = (PFNGLGETSAMPLERPARAMETERIIVPROC) load(userptr, "glGetSamplerParameterIiv"); - context->GetSamplerParameterIuiv = (PFNGLGETSAMPLERPARAMETERIUIVPROC) load(userptr, "glGetSamplerParameterIuiv"); - context->GetSamplerParameterfv = (PFNGLGETSAMPLERPARAMETERFVPROC) load(userptr, "glGetSamplerParameterfv"); - context->GetSamplerParameteriv = (PFNGLGETSAMPLERPARAMETERIVPROC) load(userptr, "glGetSamplerParameteriv"); - context->IsSampler = (PFNGLISSAMPLERPROC) load(userptr, "glIsSampler"); - context->QueryCounter = (PFNGLQUERYCOUNTERPROC) load(userptr, "glQueryCounter"); - context->SamplerParameterIiv = (PFNGLSAMPLERPARAMETERIIVPROC) load(userptr, "glSamplerParameterIiv"); - context->SamplerParameterIuiv = (PFNGLSAMPLERPARAMETERIUIVPROC) load(userptr, "glSamplerParameterIuiv"); - context->SamplerParameterf = (PFNGLSAMPLERPARAMETERFPROC) load(userptr, "glSamplerParameterf"); - context->SamplerParameterfv = (PFNGLSAMPLERPARAMETERFVPROC) load(userptr, "glSamplerParameterfv"); - context->SamplerParameteri = (PFNGLSAMPLERPARAMETERIPROC) load(userptr, "glSamplerParameteri"); - context->SamplerParameteriv = (PFNGLSAMPLERPARAMETERIVPROC) load(userptr, "glSamplerParameteriv"); - context->VertexAttribDivisor = (PFNGLVERTEXATTRIBDIVISORPROC) load(userptr, "glVertexAttribDivisor"); - context->VertexAttribP1ui = (PFNGLVERTEXATTRIBP1UIPROC) load(userptr, "glVertexAttribP1ui"); - context->VertexAttribP1uiv = (PFNGLVERTEXATTRIBP1UIVPROC) load(userptr, "glVertexAttribP1uiv"); - context->VertexAttribP2ui = (PFNGLVERTEXATTRIBP2UIPROC) load(userptr, "glVertexAttribP2ui"); - context->VertexAttribP2uiv = (PFNGLVERTEXATTRIBP2UIVPROC) load(userptr, "glVertexAttribP2uiv"); - context->VertexAttribP3ui = (PFNGLVERTEXATTRIBP3UIPROC) load(userptr, "glVertexAttribP3ui"); - context->VertexAttribP3uiv = (PFNGLVERTEXATTRIBP3UIVPROC) load(userptr, "glVertexAttribP3uiv"); - context->VertexAttribP4ui = (PFNGLVERTEXATTRIBP4UIPROC) load(userptr, "glVertexAttribP4ui"); - context->VertexAttribP4uiv = (PFNGLVERTEXATTRIBP4UIVPROC) load(userptr, "glVertexAttribP4uiv"); -} -static void glad_gl_load_GL_VERSION_4_0(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { - if(!context->VERSION_4_0) return; - context->BeginQueryIndexed = (PFNGLBEGINQUERYINDEXEDPROC) load(userptr, "glBeginQueryIndexed"); - context->BindTransformFeedback = (PFNGLBINDTRANSFORMFEEDBACKPROC) load(userptr, "glBindTransformFeedback"); - context->BlendEquationSeparatei = (PFNGLBLENDEQUATIONSEPARATEIPROC) load(userptr, "glBlendEquationSeparatei"); - context->BlendEquationi = (PFNGLBLENDEQUATIONIPROC) load(userptr, "glBlendEquationi"); - context->BlendFuncSeparatei = (PFNGLBLENDFUNCSEPARATEIPROC) load(userptr, "glBlendFuncSeparatei"); - context->BlendFunci = (PFNGLBLENDFUNCIPROC) load(userptr, "glBlendFunci"); - context->DeleteTransformFeedbacks = (PFNGLDELETETRANSFORMFEEDBACKSPROC) load(userptr, "glDeleteTransformFeedbacks"); - context->DrawArraysIndirect = (PFNGLDRAWARRAYSINDIRECTPROC) load(userptr, "glDrawArraysIndirect"); - context->DrawElementsIndirect = (PFNGLDRAWELEMENTSINDIRECTPROC) load(userptr, "glDrawElementsIndirect"); - context->DrawTransformFeedback = (PFNGLDRAWTRANSFORMFEEDBACKPROC) load(userptr, "glDrawTransformFeedback"); - context->DrawTransformFeedbackStream = (PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) load(userptr, "glDrawTransformFeedbackStream"); - context->EndQueryIndexed = (PFNGLENDQUERYINDEXEDPROC) load(userptr, "glEndQueryIndexed"); - context->GenTransformFeedbacks = (PFNGLGENTRANSFORMFEEDBACKSPROC) load(userptr, "glGenTransformFeedbacks"); - context->GetActiveSubroutineName = (PFNGLGETACTIVESUBROUTINENAMEPROC) load(userptr, "glGetActiveSubroutineName"); - context->GetActiveSubroutineUniformName = (PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) load(userptr, "glGetActiveSubroutineUniformName"); - context->GetActiveSubroutineUniformiv = (PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) load(userptr, "glGetActiveSubroutineUniformiv"); - context->GetProgramStageiv = (PFNGLGETPROGRAMSTAGEIVPROC) load(userptr, "glGetProgramStageiv"); - context->GetQueryIndexediv = (PFNGLGETQUERYINDEXEDIVPROC) load(userptr, "glGetQueryIndexediv"); - context->GetSubroutineIndex = (PFNGLGETSUBROUTINEINDEXPROC) load(userptr, "glGetSubroutineIndex"); - context->GetSubroutineUniformLocation = (PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) load(userptr, "glGetSubroutineUniformLocation"); - context->GetUniformSubroutineuiv = (PFNGLGETUNIFORMSUBROUTINEUIVPROC) load(userptr, "glGetUniformSubroutineuiv"); - context->GetUniformdv = (PFNGLGETUNIFORMDVPROC) load(userptr, "glGetUniformdv"); - context->IsTransformFeedback = (PFNGLISTRANSFORMFEEDBACKPROC) load(userptr, "glIsTransformFeedback"); - context->MinSampleShading = (PFNGLMINSAMPLESHADINGPROC) load(userptr, "glMinSampleShading"); - context->PatchParameterfv = (PFNGLPATCHPARAMETERFVPROC) load(userptr, "glPatchParameterfv"); - context->PatchParameteri = (PFNGLPATCHPARAMETERIPROC) load(userptr, "glPatchParameteri"); - context->PauseTransformFeedback = (PFNGLPAUSETRANSFORMFEEDBACKPROC) load(userptr, "glPauseTransformFeedback"); - context->ResumeTransformFeedback = (PFNGLRESUMETRANSFORMFEEDBACKPROC) load(userptr, "glResumeTransformFeedback"); - context->Uniform1d = (PFNGLUNIFORM1DPROC) load(userptr, "glUniform1d"); - context->Uniform1dv = (PFNGLUNIFORM1DVPROC) load(userptr, "glUniform1dv"); - context->Uniform2d = (PFNGLUNIFORM2DPROC) load(userptr, "glUniform2d"); - context->Uniform2dv = (PFNGLUNIFORM2DVPROC) load(userptr, "glUniform2dv"); - context->Uniform3d = (PFNGLUNIFORM3DPROC) load(userptr, "glUniform3d"); - context->Uniform3dv = (PFNGLUNIFORM3DVPROC) load(userptr, "glUniform3dv"); - context->Uniform4d = (PFNGLUNIFORM4DPROC) load(userptr, "glUniform4d"); - context->Uniform4dv = (PFNGLUNIFORM4DVPROC) load(userptr, "glUniform4dv"); - context->UniformMatrix2dv = (PFNGLUNIFORMMATRIX2DVPROC) load(userptr, "glUniformMatrix2dv"); - context->UniformMatrix2x3dv = (PFNGLUNIFORMMATRIX2X3DVPROC) load(userptr, "glUniformMatrix2x3dv"); - context->UniformMatrix2x4dv = (PFNGLUNIFORMMATRIX2X4DVPROC) load(userptr, "glUniformMatrix2x4dv"); - context->UniformMatrix3dv = (PFNGLUNIFORMMATRIX3DVPROC) load(userptr, "glUniformMatrix3dv"); - context->UniformMatrix3x2dv = (PFNGLUNIFORMMATRIX3X2DVPROC) load(userptr, "glUniformMatrix3x2dv"); - context->UniformMatrix3x4dv = (PFNGLUNIFORMMATRIX3X4DVPROC) load(userptr, "glUniformMatrix3x4dv"); - context->UniformMatrix4dv = (PFNGLUNIFORMMATRIX4DVPROC) load(userptr, "glUniformMatrix4dv"); - context->UniformMatrix4x2dv = (PFNGLUNIFORMMATRIX4X2DVPROC) load(userptr, "glUniformMatrix4x2dv"); - context->UniformMatrix4x3dv = (PFNGLUNIFORMMATRIX4X3DVPROC) load(userptr, "glUniformMatrix4x3dv"); - context->UniformSubroutinesuiv = (PFNGLUNIFORMSUBROUTINESUIVPROC) load(userptr, "glUniformSubroutinesuiv"); -} -static void glad_gl_load_GL_VERSION_4_1(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { - if(!context->VERSION_4_1) return; - context->ActiveShaderProgram = (PFNGLACTIVESHADERPROGRAMPROC) load(userptr, "glActiveShaderProgram"); - context->BindProgramPipeline = (PFNGLBINDPROGRAMPIPELINEPROC) load(userptr, "glBindProgramPipeline"); - context->ClearDepthf = (PFNGLCLEARDEPTHFPROC) load(userptr, "glClearDepthf"); - context->CreateShaderProgramv = (PFNGLCREATESHADERPROGRAMVPROC) load(userptr, "glCreateShaderProgramv"); - context->DeleteProgramPipelines = (PFNGLDELETEPROGRAMPIPELINESPROC) load(userptr, "glDeleteProgramPipelines"); - context->DepthRangeArrayv = (PFNGLDEPTHRANGEARRAYVPROC) load(userptr, "glDepthRangeArrayv"); - context->DepthRangeIndexed = (PFNGLDEPTHRANGEINDEXEDPROC) load(userptr, "glDepthRangeIndexed"); - context->DepthRangef = (PFNGLDEPTHRANGEFPROC) load(userptr, "glDepthRangef"); - context->GenProgramPipelines = (PFNGLGENPROGRAMPIPELINESPROC) load(userptr, "glGenProgramPipelines"); - context->GetDoublei_v = (PFNGLGETDOUBLEI_VPROC) load(userptr, "glGetDoublei_v"); - context->GetFloati_v = (PFNGLGETFLOATI_VPROC) load(userptr, "glGetFloati_v"); - context->GetProgramBinary = (PFNGLGETPROGRAMBINARYPROC) load(userptr, "glGetProgramBinary"); - context->GetProgramPipelineInfoLog = (PFNGLGETPROGRAMPIPELINEINFOLOGPROC) load(userptr, "glGetProgramPipelineInfoLog"); - context->GetProgramPipelineiv = (PFNGLGETPROGRAMPIPELINEIVPROC) load(userptr, "glGetProgramPipelineiv"); - context->GetShaderPrecisionFormat = (PFNGLGETSHADERPRECISIONFORMATPROC) load(userptr, "glGetShaderPrecisionFormat"); - context->GetVertexAttribLdv = (PFNGLGETVERTEXATTRIBLDVPROC) load(userptr, "glGetVertexAttribLdv"); - context->IsProgramPipeline = (PFNGLISPROGRAMPIPELINEPROC) load(userptr, "glIsProgramPipeline"); - context->ProgramBinary = (PFNGLPROGRAMBINARYPROC) load(userptr, "glProgramBinary"); - context->ProgramParameteri = (PFNGLPROGRAMPARAMETERIPROC) load(userptr, "glProgramParameteri"); - context->ProgramUniform1d = (PFNGLPROGRAMUNIFORM1DPROC) load(userptr, "glProgramUniform1d"); - context->ProgramUniform1dv = (PFNGLPROGRAMUNIFORM1DVPROC) load(userptr, "glProgramUniform1dv"); - context->ProgramUniform1f = (PFNGLPROGRAMUNIFORM1FPROC) load(userptr, "glProgramUniform1f"); - context->ProgramUniform1fv = (PFNGLPROGRAMUNIFORM1FVPROC) load(userptr, "glProgramUniform1fv"); - context->ProgramUniform1i = (PFNGLPROGRAMUNIFORM1IPROC) load(userptr, "glProgramUniform1i"); - context->ProgramUniform1iv = (PFNGLPROGRAMUNIFORM1IVPROC) load(userptr, "glProgramUniform1iv"); - context->ProgramUniform1ui = (PFNGLPROGRAMUNIFORM1UIPROC) load(userptr, "glProgramUniform1ui"); - context->ProgramUniform1uiv = (PFNGLPROGRAMUNIFORM1UIVPROC) load(userptr, "glProgramUniform1uiv"); - context->ProgramUniform2d = (PFNGLPROGRAMUNIFORM2DPROC) load(userptr, "glProgramUniform2d"); - context->ProgramUniform2dv = (PFNGLPROGRAMUNIFORM2DVPROC) load(userptr, "glProgramUniform2dv"); - context->ProgramUniform2f = (PFNGLPROGRAMUNIFORM2FPROC) load(userptr, "glProgramUniform2f"); - context->ProgramUniform2fv = (PFNGLPROGRAMUNIFORM2FVPROC) load(userptr, "glProgramUniform2fv"); - context->ProgramUniform2i = (PFNGLPROGRAMUNIFORM2IPROC) load(userptr, "glProgramUniform2i"); - context->ProgramUniform2iv = (PFNGLPROGRAMUNIFORM2IVPROC) load(userptr, "glProgramUniform2iv"); - context->ProgramUniform2ui = (PFNGLPROGRAMUNIFORM2UIPROC) load(userptr, "glProgramUniform2ui"); - context->ProgramUniform2uiv = (PFNGLPROGRAMUNIFORM2UIVPROC) load(userptr, "glProgramUniform2uiv"); - context->ProgramUniform3d = (PFNGLPROGRAMUNIFORM3DPROC) load(userptr, "glProgramUniform3d"); - context->ProgramUniform3dv = (PFNGLPROGRAMUNIFORM3DVPROC) load(userptr, "glProgramUniform3dv"); - context->ProgramUniform3f = (PFNGLPROGRAMUNIFORM3FPROC) load(userptr, "glProgramUniform3f"); - context->ProgramUniform3fv = (PFNGLPROGRAMUNIFORM3FVPROC) load(userptr, "glProgramUniform3fv"); - context->ProgramUniform3i = (PFNGLPROGRAMUNIFORM3IPROC) load(userptr, "glProgramUniform3i"); - context->ProgramUniform3iv = (PFNGLPROGRAMUNIFORM3IVPROC) load(userptr, "glProgramUniform3iv"); - context->ProgramUniform3ui = (PFNGLPROGRAMUNIFORM3UIPROC) load(userptr, "glProgramUniform3ui"); - context->ProgramUniform3uiv = (PFNGLPROGRAMUNIFORM3UIVPROC) load(userptr, "glProgramUniform3uiv"); - context->ProgramUniform4d = (PFNGLPROGRAMUNIFORM4DPROC) load(userptr, "glProgramUniform4d"); - context->ProgramUniform4dv = (PFNGLPROGRAMUNIFORM4DVPROC) load(userptr, "glProgramUniform4dv"); - context->ProgramUniform4f = (PFNGLPROGRAMUNIFORM4FPROC) load(userptr, "glProgramUniform4f"); - context->ProgramUniform4fv = (PFNGLPROGRAMUNIFORM4FVPROC) load(userptr, "glProgramUniform4fv"); - context->ProgramUniform4i = (PFNGLPROGRAMUNIFORM4IPROC) load(userptr, "glProgramUniform4i"); - context->ProgramUniform4iv = (PFNGLPROGRAMUNIFORM4IVPROC) load(userptr, "glProgramUniform4iv"); - context->ProgramUniform4ui = (PFNGLPROGRAMUNIFORM4UIPROC) load(userptr, "glProgramUniform4ui"); - context->ProgramUniform4uiv = (PFNGLPROGRAMUNIFORM4UIVPROC) load(userptr, "glProgramUniform4uiv"); - context->ProgramUniformMatrix2dv = (PFNGLPROGRAMUNIFORMMATRIX2DVPROC) load(userptr, "glProgramUniformMatrix2dv"); - context->ProgramUniformMatrix2fv = (PFNGLPROGRAMUNIFORMMATRIX2FVPROC) load(userptr, "glProgramUniformMatrix2fv"); - context->ProgramUniformMatrix2x3dv = (PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) load(userptr, "glProgramUniformMatrix2x3dv"); - context->ProgramUniformMatrix2x3fv = (PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) load(userptr, "glProgramUniformMatrix2x3fv"); - context->ProgramUniformMatrix2x4dv = (PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) load(userptr, "glProgramUniformMatrix2x4dv"); - context->ProgramUniformMatrix2x4fv = (PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) load(userptr, "glProgramUniformMatrix2x4fv"); - context->ProgramUniformMatrix3dv = (PFNGLPROGRAMUNIFORMMATRIX3DVPROC) load(userptr, "glProgramUniformMatrix3dv"); - context->ProgramUniformMatrix3fv = (PFNGLPROGRAMUNIFORMMATRIX3FVPROC) load(userptr, "glProgramUniformMatrix3fv"); - context->ProgramUniformMatrix3x2dv = (PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) load(userptr, "glProgramUniformMatrix3x2dv"); - context->ProgramUniformMatrix3x2fv = (PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) load(userptr, "glProgramUniformMatrix3x2fv"); - context->ProgramUniformMatrix3x4dv = (PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) load(userptr, "glProgramUniformMatrix3x4dv"); - context->ProgramUniformMatrix3x4fv = (PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) load(userptr, "glProgramUniformMatrix3x4fv"); - context->ProgramUniformMatrix4dv = (PFNGLPROGRAMUNIFORMMATRIX4DVPROC) load(userptr, "glProgramUniformMatrix4dv"); - context->ProgramUniformMatrix4fv = (PFNGLPROGRAMUNIFORMMATRIX4FVPROC) load(userptr, "glProgramUniformMatrix4fv"); - context->ProgramUniformMatrix4x2dv = (PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) load(userptr, "glProgramUniformMatrix4x2dv"); - context->ProgramUniformMatrix4x2fv = (PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) load(userptr, "glProgramUniformMatrix4x2fv"); - context->ProgramUniformMatrix4x3dv = (PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) load(userptr, "glProgramUniformMatrix4x3dv"); - context->ProgramUniformMatrix4x3fv = (PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) load(userptr, "glProgramUniformMatrix4x3fv"); - context->ReleaseShaderCompiler = (PFNGLRELEASESHADERCOMPILERPROC) load(userptr, "glReleaseShaderCompiler"); - context->ScissorArrayv = (PFNGLSCISSORARRAYVPROC) load(userptr, "glScissorArrayv"); - context->ScissorIndexed = (PFNGLSCISSORINDEXEDPROC) load(userptr, "glScissorIndexed"); - context->ScissorIndexedv = (PFNGLSCISSORINDEXEDVPROC) load(userptr, "glScissorIndexedv"); - context->ShaderBinary = (PFNGLSHADERBINARYPROC) load(userptr, "glShaderBinary"); - context->UseProgramStages = (PFNGLUSEPROGRAMSTAGESPROC) load(userptr, "glUseProgramStages"); - context->ValidateProgramPipeline = (PFNGLVALIDATEPROGRAMPIPELINEPROC) load(userptr, "glValidateProgramPipeline"); - context->VertexAttribL1d = (PFNGLVERTEXATTRIBL1DPROC) load(userptr, "glVertexAttribL1d"); - context->VertexAttribL1dv = (PFNGLVERTEXATTRIBL1DVPROC) load(userptr, "glVertexAttribL1dv"); - context->VertexAttribL2d = (PFNGLVERTEXATTRIBL2DPROC) load(userptr, "glVertexAttribL2d"); - context->VertexAttribL2dv = (PFNGLVERTEXATTRIBL2DVPROC) load(userptr, "glVertexAttribL2dv"); - context->VertexAttribL3d = (PFNGLVERTEXATTRIBL3DPROC) load(userptr, "glVertexAttribL3d"); - context->VertexAttribL3dv = (PFNGLVERTEXATTRIBL3DVPROC) load(userptr, "glVertexAttribL3dv"); - context->VertexAttribL4d = (PFNGLVERTEXATTRIBL4DPROC) load(userptr, "glVertexAttribL4d"); - context->VertexAttribL4dv = (PFNGLVERTEXATTRIBL4DVPROC) load(userptr, "glVertexAttribL4dv"); - context->VertexAttribLPointer = (PFNGLVERTEXATTRIBLPOINTERPROC) load(userptr, "glVertexAttribLPointer"); - context->ViewportArrayv = (PFNGLVIEWPORTARRAYVPROC) load(userptr, "glViewportArrayv"); - context->ViewportIndexedf = (PFNGLVIEWPORTINDEXEDFPROC) load(userptr, "glViewportIndexedf"); - context->ViewportIndexedfv = (PFNGLVIEWPORTINDEXEDFVPROC) load(userptr, "glViewportIndexedfv"); -} -static void glad_gl_load_GL_VERSION_4_2(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { - if(!context->VERSION_4_2) return; - context->BindImageTexture = (PFNGLBINDIMAGETEXTUREPROC) load(userptr, "glBindImageTexture"); - context->DrawArraysInstancedBaseInstance = (PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) load(userptr, "glDrawArraysInstancedBaseInstance"); - context->DrawElementsInstancedBaseInstance = (PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) load(userptr, "glDrawElementsInstancedBaseInstance"); - context->DrawElementsInstancedBaseVertexBaseInstance = (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) load(userptr, "glDrawElementsInstancedBaseVertexBaseInstance"); - context->DrawTransformFeedbackInstanced = (PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) load(userptr, "glDrawTransformFeedbackInstanced"); - context->DrawTransformFeedbackStreamInstanced = (PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) load(userptr, "glDrawTransformFeedbackStreamInstanced"); - context->GetActiveAtomicCounterBufferiv = (PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC) load(userptr, "glGetActiveAtomicCounterBufferiv"); - context->GetInternalformativ = (PFNGLGETINTERNALFORMATIVPROC) load(userptr, "glGetInternalformativ"); - context->MemoryBarrier = (PFNGLMEMORYBARRIERPROC) load(userptr, "glMemoryBarrier"); - context->TexStorage1D = (PFNGLTEXSTORAGE1DPROC) load(userptr, "glTexStorage1D"); - context->TexStorage2D = (PFNGLTEXSTORAGE2DPROC) load(userptr, "glTexStorage2D"); - context->TexStorage3D = (PFNGLTEXSTORAGE3DPROC) load(userptr, "glTexStorage3D"); -} -static void glad_gl_load_GL_VERSION_4_3(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { - if(!context->VERSION_4_3) return; - context->BindVertexBuffer = (PFNGLBINDVERTEXBUFFERPROC) load(userptr, "glBindVertexBuffer"); - context->ClearBufferData = (PFNGLCLEARBUFFERDATAPROC) load(userptr, "glClearBufferData"); - context->ClearBufferSubData = (PFNGLCLEARBUFFERSUBDATAPROC) load(userptr, "glClearBufferSubData"); - context->CopyImageSubData = (PFNGLCOPYIMAGESUBDATAPROC) load(userptr, "glCopyImageSubData"); - context->DebugMessageCallback = (PFNGLDEBUGMESSAGECALLBACKPROC) load(userptr, "glDebugMessageCallback"); - context->DebugMessageControl = (PFNGLDEBUGMESSAGECONTROLPROC) load(userptr, "glDebugMessageControl"); - context->DebugMessageInsert = (PFNGLDEBUGMESSAGEINSERTPROC) load(userptr, "glDebugMessageInsert"); - context->DispatchCompute = (PFNGLDISPATCHCOMPUTEPROC) load(userptr, "glDispatchCompute"); - context->DispatchComputeIndirect = (PFNGLDISPATCHCOMPUTEINDIRECTPROC) load(userptr, "glDispatchComputeIndirect"); - context->FramebufferParameteri = (PFNGLFRAMEBUFFERPARAMETERIPROC) load(userptr, "glFramebufferParameteri"); - context->GetDebugMessageLog = (PFNGLGETDEBUGMESSAGELOGPROC) load(userptr, "glGetDebugMessageLog"); - context->GetFramebufferParameteriv = (PFNGLGETFRAMEBUFFERPARAMETERIVPROC) load(userptr, "glGetFramebufferParameteriv"); - context->GetInternalformati64v = (PFNGLGETINTERNALFORMATI64VPROC) load(userptr, "glGetInternalformati64v"); - context->GetObjectLabel = (PFNGLGETOBJECTLABELPROC) load(userptr, "glGetObjectLabel"); - context->GetObjectPtrLabel = (PFNGLGETOBJECTPTRLABELPROC) load(userptr, "glGetObjectPtrLabel"); - context->GetPointerv = (PFNGLGETPOINTERVPROC) load(userptr, "glGetPointerv"); - context->GetProgramInterfaceiv = (PFNGLGETPROGRAMINTERFACEIVPROC) load(userptr, "glGetProgramInterfaceiv"); - context->GetProgramResourceIndex = (PFNGLGETPROGRAMRESOURCEINDEXPROC) load(userptr, "glGetProgramResourceIndex"); - context->GetProgramResourceLocation = (PFNGLGETPROGRAMRESOURCELOCATIONPROC) load(userptr, "glGetProgramResourceLocation"); - context->GetProgramResourceLocationIndex = (PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC) load(userptr, "glGetProgramResourceLocationIndex"); - context->GetProgramResourceName = (PFNGLGETPROGRAMRESOURCENAMEPROC) load(userptr, "glGetProgramResourceName"); - context->GetProgramResourceiv = (PFNGLGETPROGRAMRESOURCEIVPROC) load(userptr, "glGetProgramResourceiv"); - context->InvalidateBufferData = (PFNGLINVALIDATEBUFFERDATAPROC) load(userptr, "glInvalidateBufferData"); - context->InvalidateBufferSubData = (PFNGLINVALIDATEBUFFERSUBDATAPROC) load(userptr, "glInvalidateBufferSubData"); - context->InvalidateFramebuffer = (PFNGLINVALIDATEFRAMEBUFFERPROC) load(userptr, "glInvalidateFramebuffer"); - context->InvalidateSubFramebuffer = (PFNGLINVALIDATESUBFRAMEBUFFERPROC) load(userptr, "glInvalidateSubFramebuffer"); - context->InvalidateTexImage = (PFNGLINVALIDATETEXIMAGEPROC) load(userptr, "glInvalidateTexImage"); - context->InvalidateTexSubImage = (PFNGLINVALIDATETEXSUBIMAGEPROC) load(userptr, "glInvalidateTexSubImage"); - context->MultiDrawArraysIndirect = (PFNGLMULTIDRAWARRAYSINDIRECTPROC) load(userptr, "glMultiDrawArraysIndirect"); - context->MultiDrawElementsIndirect = (PFNGLMULTIDRAWELEMENTSINDIRECTPROC) load(userptr, "glMultiDrawElementsIndirect"); - context->ObjectLabel = (PFNGLOBJECTLABELPROC) load(userptr, "glObjectLabel"); - context->ObjectPtrLabel = (PFNGLOBJECTPTRLABELPROC) load(userptr, "glObjectPtrLabel"); - context->PopDebugGroup = (PFNGLPOPDEBUGGROUPPROC) load(userptr, "glPopDebugGroup"); - context->PushDebugGroup = (PFNGLPUSHDEBUGGROUPPROC) load(userptr, "glPushDebugGroup"); - context->ShaderStorageBlockBinding = (PFNGLSHADERSTORAGEBLOCKBINDINGPROC) load(userptr, "glShaderStorageBlockBinding"); - context->TexBufferRange = (PFNGLTEXBUFFERRANGEPROC) load(userptr, "glTexBufferRange"); - context->TexStorage2DMultisample = (PFNGLTEXSTORAGE2DMULTISAMPLEPROC) load(userptr, "glTexStorage2DMultisample"); - context->TexStorage3DMultisample = (PFNGLTEXSTORAGE3DMULTISAMPLEPROC) load(userptr, "glTexStorage3DMultisample"); - context->TextureView = (PFNGLTEXTUREVIEWPROC) load(userptr, "glTextureView"); - context->VertexAttribBinding = (PFNGLVERTEXATTRIBBINDINGPROC) load(userptr, "glVertexAttribBinding"); - context->VertexAttribFormat = (PFNGLVERTEXATTRIBFORMATPROC) load(userptr, "glVertexAttribFormat"); - context->VertexAttribIFormat = (PFNGLVERTEXATTRIBIFORMATPROC) load(userptr, "glVertexAttribIFormat"); - context->VertexAttribLFormat = (PFNGLVERTEXATTRIBLFORMATPROC) load(userptr, "glVertexAttribLFormat"); - context->VertexBindingDivisor = (PFNGLVERTEXBINDINGDIVISORPROC) load(userptr, "glVertexBindingDivisor"); -} -static void glad_gl_load_GL_VERSION_4_4(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { - if(!context->VERSION_4_4) return; - context->BindBuffersBase = (PFNGLBINDBUFFERSBASEPROC) load(userptr, "glBindBuffersBase"); - context->BindBuffersRange = (PFNGLBINDBUFFERSRANGEPROC) load(userptr, "glBindBuffersRange"); - context->BindImageTextures = (PFNGLBINDIMAGETEXTURESPROC) load(userptr, "glBindImageTextures"); - context->BindSamplers = (PFNGLBINDSAMPLERSPROC) load(userptr, "glBindSamplers"); - context->BindTextures = (PFNGLBINDTEXTURESPROC) load(userptr, "glBindTextures"); - context->BindVertexBuffers = (PFNGLBINDVERTEXBUFFERSPROC) load(userptr, "glBindVertexBuffers"); - context->BufferStorage = (PFNGLBUFFERSTORAGEPROC) load(userptr, "glBufferStorage"); - context->ClearTexImage = (PFNGLCLEARTEXIMAGEPROC) load(userptr, "glClearTexImage"); - context->ClearTexSubImage = (PFNGLCLEARTEXSUBIMAGEPROC) load(userptr, "glClearTexSubImage"); -} -static void glad_gl_load_GL_VERSION_4_5(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { - if(!context->VERSION_4_5) return; - context->BindTextureUnit = (PFNGLBINDTEXTUREUNITPROC) load(userptr, "glBindTextureUnit"); - context->BlitNamedFramebuffer = (PFNGLBLITNAMEDFRAMEBUFFERPROC) load(userptr, "glBlitNamedFramebuffer"); - context->CheckNamedFramebufferStatus = (PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC) load(userptr, "glCheckNamedFramebufferStatus"); - context->ClearNamedBufferData = (PFNGLCLEARNAMEDBUFFERDATAPROC) load(userptr, "glClearNamedBufferData"); - context->ClearNamedBufferSubData = (PFNGLCLEARNAMEDBUFFERSUBDATAPROC) load(userptr, "glClearNamedBufferSubData"); - context->ClearNamedFramebufferfi = (PFNGLCLEARNAMEDFRAMEBUFFERFIPROC) load(userptr, "glClearNamedFramebufferfi"); - context->ClearNamedFramebufferfv = (PFNGLCLEARNAMEDFRAMEBUFFERFVPROC) load(userptr, "glClearNamedFramebufferfv"); - context->ClearNamedFramebufferiv = (PFNGLCLEARNAMEDFRAMEBUFFERIVPROC) load(userptr, "glClearNamedFramebufferiv"); - context->ClearNamedFramebufferuiv = (PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC) load(userptr, "glClearNamedFramebufferuiv"); - context->ClipControl = (PFNGLCLIPCONTROLPROC) load(userptr, "glClipControl"); - context->CompressedTextureSubImage1D = (PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC) load(userptr, "glCompressedTextureSubImage1D"); - context->CompressedTextureSubImage2D = (PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC) load(userptr, "glCompressedTextureSubImage2D"); - context->CompressedTextureSubImage3D = (PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC) load(userptr, "glCompressedTextureSubImage3D"); - context->CopyNamedBufferSubData = (PFNGLCOPYNAMEDBUFFERSUBDATAPROC) load(userptr, "glCopyNamedBufferSubData"); - context->CopyTextureSubImage1D = (PFNGLCOPYTEXTURESUBIMAGE1DPROC) load(userptr, "glCopyTextureSubImage1D"); - context->CopyTextureSubImage2D = (PFNGLCOPYTEXTURESUBIMAGE2DPROC) load(userptr, "glCopyTextureSubImage2D"); - context->CopyTextureSubImage3D = (PFNGLCOPYTEXTURESUBIMAGE3DPROC) load(userptr, "glCopyTextureSubImage3D"); - context->CreateBuffers = (PFNGLCREATEBUFFERSPROC) load(userptr, "glCreateBuffers"); - context->CreateFramebuffers = (PFNGLCREATEFRAMEBUFFERSPROC) load(userptr, "glCreateFramebuffers"); - context->CreateProgramPipelines = (PFNGLCREATEPROGRAMPIPELINESPROC) load(userptr, "glCreateProgramPipelines"); - context->CreateQueries = (PFNGLCREATEQUERIESPROC) load(userptr, "glCreateQueries"); - context->CreateRenderbuffers = (PFNGLCREATERENDERBUFFERSPROC) load(userptr, "glCreateRenderbuffers"); - context->CreateSamplers = (PFNGLCREATESAMPLERSPROC) load(userptr, "glCreateSamplers"); - context->CreateTextures = (PFNGLCREATETEXTURESPROC) load(userptr, "glCreateTextures"); - context->CreateTransformFeedbacks = (PFNGLCREATETRANSFORMFEEDBACKSPROC) load(userptr, "glCreateTransformFeedbacks"); - context->CreateVertexArrays = (PFNGLCREATEVERTEXARRAYSPROC) load(userptr, "glCreateVertexArrays"); - context->DisableVertexArrayAttrib = (PFNGLDISABLEVERTEXARRAYATTRIBPROC) load(userptr, "glDisableVertexArrayAttrib"); - context->EnableVertexArrayAttrib = (PFNGLENABLEVERTEXARRAYATTRIBPROC) load(userptr, "glEnableVertexArrayAttrib"); - context->FlushMappedNamedBufferRange = (PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC) load(userptr, "glFlushMappedNamedBufferRange"); - context->GenerateTextureMipmap = (PFNGLGENERATETEXTUREMIPMAPPROC) load(userptr, "glGenerateTextureMipmap"); - context->GetCompressedTextureImage = (PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC) load(userptr, "glGetCompressedTextureImage"); - context->GetCompressedTextureSubImage = (PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC) load(userptr, "glGetCompressedTextureSubImage"); - context->GetGraphicsResetStatus = (PFNGLGETGRAPHICSRESETSTATUSPROC) load(userptr, "glGetGraphicsResetStatus"); - context->GetNamedBufferParameteri64v = (PFNGLGETNAMEDBUFFERPARAMETERI64VPROC) load(userptr, "glGetNamedBufferParameteri64v"); - context->GetNamedBufferParameteriv = (PFNGLGETNAMEDBUFFERPARAMETERIVPROC) load(userptr, "glGetNamedBufferParameteriv"); - context->GetNamedBufferPointerv = (PFNGLGETNAMEDBUFFERPOINTERVPROC) load(userptr, "glGetNamedBufferPointerv"); - context->GetNamedBufferSubData = (PFNGLGETNAMEDBUFFERSUBDATAPROC) load(userptr, "glGetNamedBufferSubData"); - context->GetNamedFramebufferAttachmentParameteriv = (PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC) load(userptr, "glGetNamedFramebufferAttachmentParameteriv"); - context->GetNamedFramebufferParameteriv = (PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC) load(userptr, "glGetNamedFramebufferParameteriv"); - context->GetNamedRenderbufferParameteriv = (PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC) load(userptr, "glGetNamedRenderbufferParameteriv"); - context->GetQueryBufferObjecti64v = (PFNGLGETQUERYBUFFEROBJECTI64VPROC) load(userptr, "glGetQueryBufferObjecti64v"); - context->GetQueryBufferObjectiv = (PFNGLGETQUERYBUFFEROBJECTIVPROC) load(userptr, "glGetQueryBufferObjectiv"); - context->GetQueryBufferObjectui64v = (PFNGLGETQUERYBUFFEROBJECTUI64VPROC) load(userptr, "glGetQueryBufferObjectui64v"); - context->GetQueryBufferObjectuiv = (PFNGLGETQUERYBUFFEROBJECTUIVPROC) load(userptr, "glGetQueryBufferObjectuiv"); - context->GetTextureImage = (PFNGLGETTEXTUREIMAGEPROC) load(userptr, "glGetTextureImage"); - context->GetTextureLevelParameterfv = (PFNGLGETTEXTURELEVELPARAMETERFVPROC) load(userptr, "glGetTextureLevelParameterfv"); - context->GetTextureLevelParameteriv = (PFNGLGETTEXTURELEVELPARAMETERIVPROC) load(userptr, "glGetTextureLevelParameteriv"); - context->GetTextureParameterIiv = (PFNGLGETTEXTUREPARAMETERIIVPROC) load(userptr, "glGetTextureParameterIiv"); - context->GetTextureParameterIuiv = (PFNGLGETTEXTUREPARAMETERIUIVPROC) load(userptr, "glGetTextureParameterIuiv"); - context->GetTextureParameterfv = (PFNGLGETTEXTUREPARAMETERFVPROC) load(userptr, "glGetTextureParameterfv"); - context->GetTextureParameteriv = (PFNGLGETTEXTUREPARAMETERIVPROC) load(userptr, "glGetTextureParameteriv"); - context->GetTextureSubImage = (PFNGLGETTEXTURESUBIMAGEPROC) load(userptr, "glGetTextureSubImage"); - context->GetTransformFeedbacki64_v = (PFNGLGETTRANSFORMFEEDBACKI64_VPROC) load(userptr, "glGetTransformFeedbacki64_v"); - context->GetTransformFeedbacki_v = (PFNGLGETTRANSFORMFEEDBACKI_VPROC) load(userptr, "glGetTransformFeedbacki_v"); - context->GetTransformFeedbackiv = (PFNGLGETTRANSFORMFEEDBACKIVPROC) load(userptr, "glGetTransformFeedbackiv"); - context->GetVertexArrayIndexed64iv = (PFNGLGETVERTEXARRAYINDEXED64IVPROC) load(userptr, "glGetVertexArrayIndexed64iv"); - context->GetVertexArrayIndexediv = (PFNGLGETVERTEXARRAYINDEXEDIVPROC) load(userptr, "glGetVertexArrayIndexediv"); - context->GetVertexArrayiv = (PFNGLGETVERTEXARRAYIVPROC) load(userptr, "glGetVertexArrayiv"); - context->GetnCompressedTexImage = (PFNGLGETNCOMPRESSEDTEXIMAGEPROC) load(userptr, "glGetnCompressedTexImage"); - context->GetnTexImage = (PFNGLGETNTEXIMAGEPROC) load(userptr, "glGetnTexImage"); - context->GetnUniformdv = (PFNGLGETNUNIFORMDVPROC) load(userptr, "glGetnUniformdv"); - context->GetnUniformfv = (PFNGLGETNUNIFORMFVPROC) load(userptr, "glGetnUniformfv"); - context->GetnUniformiv = (PFNGLGETNUNIFORMIVPROC) load(userptr, "glGetnUniformiv"); - context->GetnUniformuiv = (PFNGLGETNUNIFORMUIVPROC) load(userptr, "glGetnUniformuiv"); - context->InvalidateNamedFramebufferData = (PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC) load(userptr, "glInvalidateNamedFramebufferData"); - context->InvalidateNamedFramebufferSubData = (PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC) load(userptr, "glInvalidateNamedFramebufferSubData"); - context->MapNamedBuffer = (PFNGLMAPNAMEDBUFFERPROC) load(userptr, "glMapNamedBuffer"); - context->MapNamedBufferRange = (PFNGLMAPNAMEDBUFFERRANGEPROC) load(userptr, "glMapNamedBufferRange"); - context->MemoryBarrierByRegion = (PFNGLMEMORYBARRIERBYREGIONPROC) load(userptr, "glMemoryBarrierByRegion"); - context->NamedBufferData = (PFNGLNAMEDBUFFERDATAPROC) load(userptr, "glNamedBufferData"); - context->NamedBufferStorage = (PFNGLNAMEDBUFFERSTORAGEPROC) load(userptr, "glNamedBufferStorage"); - context->NamedBufferSubData = (PFNGLNAMEDBUFFERSUBDATAPROC) load(userptr, "glNamedBufferSubData"); - context->NamedFramebufferDrawBuffer = (PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC) load(userptr, "glNamedFramebufferDrawBuffer"); - context->NamedFramebufferDrawBuffers = (PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC) load(userptr, "glNamedFramebufferDrawBuffers"); - context->NamedFramebufferParameteri = (PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC) load(userptr, "glNamedFramebufferParameteri"); - context->NamedFramebufferReadBuffer = (PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC) load(userptr, "glNamedFramebufferReadBuffer"); - context->NamedFramebufferRenderbuffer = (PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC) load(userptr, "glNamedFramebufferRenderbuffer"); - context->NamedFramebufferTexture = (PFNGLNAMEDFRAMEBUFFERTEXTUREPROC) load(userptr, "glNamedFramebufferTexture"); - context->NamedFramebufferTextureLayer = (PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC) load(userptr, "glNamedFramebufferTextureLayer"); - context->NamedRenderbufferStorage = (PFNGLNAMEDRENDERBUFFERSTORAGEPROC) load(userptr, "glNamedRenderbufferStorage"); - context->NamedRenderbufferStorageMultisample = (PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC) load(userptr, "glNamedRenderbufferStorageMultisample"); - context->ReadnPixels = (PFNGLREADNPIXELSPROC) load(userptr, "glReadnPixels"); - context->TextureBarrier = (PFNGLTEXTUREBARRIERPROC) load(userptr, "glTextureBarrier"); - context->TextureBuffer = (PFNGLTEXTUREBUFFERPROC) load(userptr, "glTextureBuffer"); - context->TextureBufferRange = (PFNGLTEXTUREBUFFERRANGEPROC) load(userptr, "glTextureBufferRange"); - context->TextureParameterIiv = (PFNGLTEXTUREPARAMETERIIVPROC) load(userptr, "glTextureParameterIiv"); - context->TextureParameterIuiv = (PFNGLTEXTUREPARAMETERIUIVPROC) load(userptr, "glTextureParameterIuiv"); - context->TextureParameterf = (PFNGLTEXTUREPARAMETERFPROC) load(userptr, "glTextureParameterf"); - context->TextureParameterfv = (PFNGLTEXTUREPARAMETERFVPROC) load(userptr, "glTextureParameterfv"); - context->TextureParameteri = (PFNGLTEXTUREPARAMETERIPROC) load(userptr, "glTextureParameteri"); - context->TextureParameteriv = (PFNGLTEXTUREPARAMETERIVPROC) load(userptr, "glTextureParameteriv"); - context->TextureStorage1D = (PFNGLTEXTURESTORAGE1DPROC) load(userptr, "glTextureStorage1D"); - context->TextureStorage2D = (PFNGLTEXTURESTORAGE2DPROC) load(userptr, "glTextureStorage2D"); - context->TextureStorage2DMultisample = (PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC) load(userptr, "glTextureStorage2DMultisample"); - context->TextureStorage3D = (PFNGLTEXTURESTORAGE3DPROC) load(userptr, "glTextureStorage3D"); - context->TextureStorage3DMultisample = (PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC) load(userptr, "glTextureStorage3DMultisample"); - context->TextureSubImage1D = (PFNGLTEXTURESUBIMAGE1DPROC) load(userptr, "glTextureSubImage1D"); - context->TextureSubImage2D = (PFNGLTEXTURESUBIMAGE2DPROC) load(userptr, "glTextureSubImage2D"); - context->TextureSubImage3D = (PFNGLTEXTURESUBIMAGE3DPROC) load(userptr, "glTextureSubImage3D"); - context->TransformFeedbackBufferBase = (PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC) load(userptr, "glTransformFeedbackBufferBase"); - context->TransformFeedbackBufferRange = (PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC) load(userptr, "glTransformFeedbackBufferRange"); - context->UnmapNamedBuffer = (PFNGLUNMAPNAMEDBUFFERPROC) load(userptr, "glUnmapNamedBuffer"); - context->VertexArrayAttribBinding = (PFNGLVERTEXARRAYATTRIBBINDINGPROC) load(userptr, "glVertexArrayAttribBinding"); - context->VertexArrayAttribFormat = (PFNGLVERTEXARRAYATTRIBFORMATPROC) load(userptr, "glVertexArrayAttribFormat"); - context->VertexArrayAttribIFormat = (PFNGLVERTEXARRAYATTRIBIFORMATPROC) load(userptr, "glVertexArrayAttribIFormat"); - context->VertexArrayAttribLFormat = (PFNGLVERTEXARRAYATTRIBLFORMATPROC) load(userptr, "glVertexArrayAttribLFormat"); - context->VertexArrayBindingDivisor = (PFNGLVERTEXARRAYBINDINGDIVISORPROC) load(userptr, "glVertexArrayBindingDivisor"); - context->VertexArrayElementBuffer = (PFNGLVERTEXARRAYELEMENTBUFFERPROC) load(userptr, "glVertexArrayElementBuffer"); - context->VertexArrayVertexBuffer = (PFNGLVERTEXARRAYVERTEXBUFFERPROC) load(userptr, "glVertexArrayVertexBuffer"); - context->VertexArrayVertexBuffers = (PFNGLVERTEXARRAYVERTEXBUFFERSPROC) load(userptr, "glVertexArrayVertexBuffers"); -} -static void glad_gl_load_GL_VERSION_4_6(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { - if(!context->VERSION_4_6) return; - context->MultiDrawArraysIndirectCount = (PFNGLMULTIDRAWARRAYSINDIRECTCOUNTPROC) load(userptr, "glMultiDrawArraysIndirectCount"); - context->MultiDrawElementsIndirectCount = (PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTPROC) load(userptr, "glMultiDrawElementsIndirectCount"); - context->PolygonOffsetClamp = (PFNGLPOLYGONOFFSETCLAMPPROC) load(userptr, "glPolygonOffsetClamp"); - context->SpecializeShader = (PFNGLSPECIALIZESHADERPROC) load(userptr, "glSpecializeShader"); -} - - - -static void glad_gl_free_extensions(char **exts_i) { - if (exts_i != NULL) { - unsigned int index; - for(index = 0; exts_i[index]; index++) { - free((void *) (exts_i[index])); - } - free((void *)exts_i); - exts_i = NULL; - } -} -static int glad_gl_get_extensions(GladGLContext *context, const char **out_exts, char ***out_exts_i) { -#if defined(GL_ES_VERSION_3_0) || defined(GL_VERSION_3_0) - if (context->GetStringi != NULL && context->GetIntegerv != NULL) { - unsigned int index = 0; - unsigned int num_exts_i = 0; - char **exts_i = NULL; - context->GetIntegerv(GL_NUM_EXTENSIONS, (int*) &num_exts_i); - exts_i = (char **) malloc((num_exts_i + 1) * (sizeof *exts_i)); - if (exts_i == NULL) { - return 0; - } - for(index = 0; index < num_exts_i; index++) { - const char *gl_str_tmp = (const char*) context->GetStringi(GL_EXTENSIONS, index); - size_t len = strlen(gl_str_tmp) + 1; - - char *local_str = (char*) malloc(len * sizeof(char)); - if(local_str == NULL) { - exts_i[index] = NULL; - glad_gl_free_extensions(exts_i); - return 0; - } - - memcpy(local_str, gl_str_tmp, len * sizeof(char)); - exts_i[index] = local_str; - } - exts_i[index] = NULL; - - *out_exts_i = exts_i; - - return 1; - } -#else - GLAD_UNUSED(out_exts_i); -#endif - if (context->GetString == NULL) { - return 0; - } - *out_exts = (const char *)context->GetString(GL_EXTENSIONS); - return 1; -} -static int glad_gl_has_extension(const char *exts, char **exts_i, const char *ext) { - if(exts_i) { - unsigned int index; - for(index = 0; exts_i[index]; index++) { - const char *e = exts_i[index]; - if(strcmp(e, ext) == 0) { - return 1; - } - } - } else { - const char *extensions; - const char *loc; - const char *terminator; - extensions = exts; - if(extensions == NULL || ext == NULL) { - return 0; - } - while(1) { - loc = strstr(extensions, ext); - if(loc == NULL) { - return 0; - } - terminator = loc + strlen(ext); - if((loc == extensions || *(loc - 1) == ' ') && - (*terminator == ' ' || *terminator == '\0')) { - return 1; - } - extensions = terminator; - } - } - return 0; -} - -static GLADapiproc glad_gl_get_proc_from_userptr(void *userptr, const char* name) { - return (GLAD_GNUC_EXTENSION (GLADapiproc (*)(const char *name)) userptr)(name); -} - -static int glad_gl_find_extensions_gl(GladGLContext *context) { - const char *exts = NULL; - char **exts_i = NULL; - if (!glad_gl_get_extensions(context, &exts, &exts_i)) return 0; - - GLAD_UNUSED(&glad_gl_has_extension); - - glad_gl_free_extensions(exts_i); - - return 1; -} - -static int glad_gl_find_core_gl(GladGLContext *context) { - int i; - const char* version; - const char* prefixes[] = { - "OpenGL ES-CM ", - "OpenGL ES-CL ", - "OpenGL ES ", - "OpenGL SC ", - NULL - }; - int major = 0; - int minor = 0; - version = (const char*) context->GetString(GL_VERSION); - if (!version) return 0; - for (i = 0; prefixes[i]; i++) { - const size_t length = strlen(prefixes[i]); - if (strncmp(version, prefixes[i], length) == 0) { - version += length; - break; - } - } - - GLAD_IMPL_UTIL_SSCANF(version, "%d.%d", &major, &minor); - - context->VERSION_1_0 = (major == 1 && minor >= 0) || major > 1; - context->VERSION_1_1 = (major == 1 && minor >= 1) || major > 1; - context->VERSION_1_2 = (major == 1 && minor >= 2) || major > 1; - context->VERSION_1_3 = (major == 1 && minor >= 3) || major > 1; - context->VERSION_1_4 = (major == 1 && minor >= 4) || major > 1; - context->VERSION_1_5 = (major == 1 && minor >= 5) || major > 1; - context->VERSION_2_0 = (major == 2 && minor >= 0) || major > 2; - context->VERSION_2_1 = (major == 2 && minor >= 1) || major > 2; - context->VERSION_3_0 = (major == 3 && minor >= 0) || major > 3; - context->VERSION_3_1 = (major == 3 && minor >= 1) || major > 3; - context->VERSION_3_2 = (major == 3 && minor >= 2) || major > 3; - context->VERSION_3_3 = (major == 3 && minor >= 3) || major > 3; - context->VERSION_4_0 = (major == 4 && minor >= 0) || major > 4; - context->VERSION_4_1 = (major == 4 && minor >= 1) || major > 4; - context->VERSION_4_2 = (major == 4 && minor >= 2) || major > 4; - context->VERSION_4_3 = (major == 4 && minor >= 3) || major > 4; - context->VERSION_4_4 = (major == 4 && minor >= 4) || major > 4; - context->VERSION_4_5 = (major == 4 && minor >= 5) || major > 4; - context->VERSION_4_6 = (major == 4 && minor >= 6) || major > 4; - - return GLAD_MAKE_VERSION(major, minor); -} - -int gladLoadGLContextUserPtr(GladGLContext *context, GLADuserptrloadfunc load, void *userptr) { - int version; - - context->GetString = (PFNGLGETSTRINGPROC) load(userptr, "glGetString"); - if(context->GetString == NULL) return 0; - version = glad_gl_find_core_gl(context); - - glad_gl_load_GL_VERSION_1_0(context, load, userptr); - glad_gl_load_GL_VERSION_1_1(context, load, userptr); - glad_gl_load_GL_VERSION_1_2(context, load, userptr); - glad_gl_load_GL_VERSION_1_3(context, load, userptr); - glad_gl_load_GL_VERSION_1_4(context, load, userptr); - glad_gl_load_GL_VERSION_1_5(context, load, userptr); - glad_gl_load_GL_VERSION_2_0(context, load, userptr); - glad_gl_load_GL_VERSION_2_1(context, load, userptr); - glad_gl_load_GL_VERSION_3_0(context, load, userptr); - glad_gl_load_GL_VERSION_3_1(context, load, userptr); - glad_gl_load_GL_VERSION_3_2(context, load, userptr); - glad_gl_load_GL_VERSION_3_3(context, load, userptr); - glad_gl_load_GL_VERSION_4_0(context, load, userptr); - glad_gl_load_GL_VERSION_4_1(context, load, userptr); - glad_gl_load_GL_VERSION_4_2(context, load, userptr); - glad_gl_load_GL_VERSION_4_3(context, load, userptr); - glad_gl_load_GL_VERSION_4_4(context, load, userptr); - glad_gl_load_GL_VERSION_4_5(context, load, userptr); - glad_gl_load_GL_VERSION_4_6(context, load, userptr); - - if (!glad_gl_find_extensions_gl(context)) return 0; - - - - return version; -} - - -int gladLoadGLContext(GladGLContext *context, GLADloadfunc load) { - return gladLoadGLContextUserPtr(context, glad_gl_get_proc_from_userptr, GLAD_GNUC_EXTENSION (void*) load); -} - - - - - - -#ifdef __cplusplus -} -#endif - -#endif /* GLAD_GL_IMPLEMENTATION */ - +/** + * Loader generated by glad 2.0.8 on Tue Dec 30 01:23:04 2025 + * + * SPDX-License-Identifier: (WTFPL OR CC0-1.0) AND Apache-2.0 + * + * Generator: C/C++ + * Specification: gl + * Extensions: 0 + * + * APIs: + * - gl:core=4.6 + * + * Options: + * - ALIAS = False + * - DEBUG = False + * - HEADER_ONLY = True + * - LOADER = False + * - MX = True + * - ON_DEMAND = False + * + * Commandline: + * --api='gl:core=4.6' --extensions='' c --header-only --mx + * + * Online: + * http://glad.sh/#api=gl%3Acore%3D4.6&extensions=&generator=c&options=HEADER_ONLY%2CMX + * + */ + +#ifndef GLAD_GL_H_ +#define GLAD_GL_H_ + +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreserved-id-macro" +#endif +#ifdef __gl_h_ + #error OpenGL (gl.h) header already included (API: gl), remove previous include! +#endif +#define __gl_h_ 1 +#ifdef __gl3_h_ + #error OpenGL (gl3.h) header already included (API: gl), remove previous include! +#endif +#define __gl3_h_ 1 +#ifdef __glext_h_ + #error OpenGL (glext.h) header already included (API: gl), remove previous include! +#endif +#define __glext_h_ 1 +#ifdef __gl3ext_h_ + #error OpenGL (gl3ext.h) header already included (API: gl), remove previous include! +#endif +#define __gl3ext_h_ 1 +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + +#define GLAD_GL +#define GLAD_OPTION_GL_HEADER_ONLY +#define GLAD_OPTION_GL_MX + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef GLAD_PLATFORM_H_ +#define GLAD_PLATFORM_H_ + +#ifndef GLAD_PLATFORM_WIN32 + #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__) + #define GLAD_PLATFORM_WIN32 1 + #else + #define GLAD_PLATFORM_WIN32 0 + #endif +#endif + +#ifndef GLAD_PLATFORM_APPLE + #ifdef __APPLE__ + #define GLAD_PLATFORM_APPLE 1 + #else + #define GLAD_PLATFORM_APPLE 0 + #endif +#endif + +#ifndef GLAD_PLATFORM_EMSCRIPTEN + #ifdef __EMSCRIPTEN__ + #define GLAD_PLATFORM_EMSCRIPTEN 1 + #else + #define GLAD_PLATFORM_EMSCRIPTEN 0 + #endif +#endif + +#ifndef GLAD_PLATFORM_UWP + #if defined(_MSC_VER) && !defined(GLAD_INTERNAL_HAVE_WINAPIFAMILY) + #ifdef __has_include + #if __has_include() + #define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1 + #endif + #elif _MSC_VER >= 1700 && !_USING_V110_SDK71_ + #define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1 + #endif + #endif + + #ifdef GLAD_INTERNAL_HAVE_WINAPIFAMILY + #include + #if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) + #define GLAD_PLATFORM_UWP 1 + #endif + #endif + + #ifndef GLAD_PLATFORM_UWP + #define GLAD_PLATFORM_UWP 0 + #endif +#endif + +#ifdef __GNUC__ + #define GLAD_GNUC_EXTENSION __extension__ +#else + #define GLAD_GNUC_EXTENSION +#endif + +#define GLAD_UNUSED(x) (void)(x) + +#ifndef GLAD_API_CALL + #if defined(GLAD_API_CALL_EXPORT) + #if GLAD_PLATFORM_WIN32 || defined(__CYGWIN__) + #if defined(GLAD_API_CALL_EXPORT_BUILD) + #if defined(__GNUC__) + #define GLAD_API_CALL __attribute__ ((dllexport)) extern + #else + #define GLAD_API_CALL __declspec(dllexport) extern + #endif + #else + #if defined(__GNUC__) + #define GLAD_API_CALL __attribute__ ((dllimport)) extern + #else + #define GLAD_API_CALL __declspec(dllimport) extern + #endif + #endif + #elif defined(__GNUC__) && defined(GLAD_API_CALL_EXPORT_BUILD) + #define GLAD_API_CALL __attribute__ ((visibility ("default"))) extern + #else + #define GLAD_API_CALL extern + #endif + #else + #define GLAD_API_CALL extern + #endif +#endif + +#ifdef APIENTRY + #define GLAD_API_PTR APIENTRY +#elif GLAD_PLATFORM_WIN32 + #define GLAD_API_PTR __stdcall +#else + #define GLAD_API_PTR +#endif + +#ifndef GLAPI +#define GLAPI GLAD_API_CALL +#endif + +#ifndef GLAPIENTRY +#define GLAPIENTRY GLAD_API_PTR +#endif + +#define GLAD_MAKE_VERSION(major, minor) (major * 10000 + minor) +#define GLAD_VERSION_MAJOR(version) (version / 10000) +#define GLAD_VERSION_MINOR(version) (version % 10000) + +#define GLAD_GENERATOR_VERSION "2.0.8" + +typedef void (*GLADapiproc)(void); + +typedef GLADapiproc (*GLADloadfunc)(const char *name); +typedef GLADapiproc (*GLADuserptrloadfunc)(void *userptr, const char *name); + +typedef void (*GLADprecallback)(const char *name, GLADapiproc apiproc, int len_args, ...); +typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apiproc, int len_args, ...); + +#endif /* GLAD_PLATFORM_H_ */ + +#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9 +#define GL_ACTIVE_ATTRIBUTES 0x8B89 +#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A +#define GL_ACTIVE_PROGRAM 0x8259 +#define GL_ACTIVE_RESOURCES 0x92F5 +#define GL_ACTIVE_SUBROUTINES 0x8DE5 +#define GL_ACTIVE_SUBROUTINE_MAX_LENGTH 0x8E48 +#define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6 +#define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47 +#define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49 +#define GL_ACTIVE_TEXTURE 0x84E0 +#define GL_ACTIVE_UNIFORMS 0x8B86 +#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 +#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 +#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 +#define GL_ACTIVE_VARIABLES 0x9305 +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +#define GL_ALL_BARRIER_BITS 0xFFFFFFFF +#define GL_ALL_SHADER_BITS 0xFFFFFFFF +#define GL_ALPHA 0x1906 +#define GL_ALREADY_SIGNALED 0x911A +#define GL_ALWAYS 0x0207 +#define GL_AND 0x1501 +#define GL_AND_INVERTED 0x1504 +#define GL_AND_REVERSE 0x1502 +#define GL_ANY_SAMPLES_PASSED 0x8C2F +#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ARRAY_SIZE 0x92FB +#define GL_ARRAY_STRIDE 0x92FE +#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000 +#define GL_ATOMIC_COUNTER_BUFFER 0x92C0 +#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5 +#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6 +#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1 +#define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4 +#define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301 +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8 +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9 +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7 +#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3 +#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2 +#define GL_ATTACHED_SHADERS 0x8B85 +#define GL_AUTO_GENERATE_MIPMAP 0x8295 +#define GL_BACK 0x0405 +#define GL_BACK_LEFT 0x0402 +#define GL_BACK_RIGHT 0x0403 +#define GL_BGR 0x80E0 +#define GL_BGRA 0x80E1 +#define GL_BGRA_INTEGER 0x8D9B +#define GL_BGR_INTEGER 0x8D9A +#define GL_BLEND 0x0BE2 +#define GL_BLEND_COLOR 0x8005 +#define GL_BLEND_DST 0x0BE0 +#define GL_BLEND_DST_ALPHA 0x80CA +#define GL_BLEND_DST_RGB 0x80C8 +#define GL_BLEND_EQUATION 0x8009 +#define GL_BLEND_EQUATION_ALPHA 0x883D +#define GL_BLEND_EQUATION_RGB 0x8009 +#define GL_BLEND_SRC 0x0BE1 +#define GL_BLEND_SRC_ALPHA 0x80CB +#define GL_BLEND_SRC_RGB 0x80C9 +#define GL_BLOCK_INDEX 0x92FD +#define GL_BLUE 0x1905 +#define GL_BLUE_INTEGER 0x8D96 +#define GL_BOOL 0x8B56 +#define GL_BOOL_VEC2 0x8B57 +#define GL_BOOL_VEC3 0x8B58 +#define GL_BOOL_VEC4 0x8B59 +#define GL_BUFFER 0x82E0 +#define GL_BUFFER_ACCESS 0x88BB +#define GL_BUFFER_ACCESS_FLAGS 0x911F +#define GL_BUFFER_BINDING 0x9302 +#define GL_BUFFER_DATA_SIZE 0x9303 +#define GL_BUFFER_IMMUTABLE_STORAGE 0x821F +#define GL_BUFFER_MAPPED 0x88BC +#define GL_BUFFER_MAP_LENGTH 0x9120 +#define GL_BUFFER_MAP_OFFSET 0x9121 +#define GL_BUFFER_MAP_POINTER 0x88BD +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_STORAGE_FLAGS 0x8220 +#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200 +#define GL_BUFFER_USAGE 0x8765 +#define GL_BUFFER_VARIABLE 0x92E5 +#define GL_BYTE 0x1400 +#define GL_CAVEAT_SUPPORT 0x82B8 +#define GL_CCW 0x0901 +#define GL_CLAMP_READ_COLOR 0x891C +#define GL_CLAMP_TO_BORDER 0x812D +#define GL_CLAMP_TO_EDGE 0x812F +#define GL_CLEAR 0x1500 +#define GL_CLEAR_BUFFER 0x82B4 +#define GL_CLEAR_TEXTURE 0x9365 +#define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT 0x00004000 +#define GL_CLIENT_STORAGE_BIT 0x0200 +#define GL_CLIPPING_INPUT_PRIMITIVES 0x82F6 +#define GL_CLIPPING_OUTPUT_PRIMITIVES 0x82F7 +#define GL_CLIP_DEPTH_MODE 0x935D +#define GL_CLIP_DISTANCE0 0x3000 +#define GL_CLIP_DISTANCE1 0x3001 +#define GL_CLIP_DISTANCE2 0x3002 +#define GL_CLIP_DISTANCE3 0x3003 +#define GL_CLIP_DISTANCE4 0x3004 +#define GL_CLIP_DISTANCE5 0x3005 +#define GL_CLIP_DISTANCE6 0x3006 +#define GL_CLIP_DISTANCE7 0x3007 +#define GL_CLIP_ORIGIN 0x935C +#define GL_COLOR 0x1800 +#define GL_COLOR_ATTACHMENT0 0x8CE0 +#define GL_COLOR_ATTACHMENT1 0x8CE1 +#define GL_COLOR_ATTACHMENT10 0x8CEA +#define GL_COLOR_ATTACHMENT11 0x8CEB +#define GL_COLOR_ATTACHMENT12 0x8CEC +#define GL_COLOR_ATTACHMENT13 0x8CED +#define GL_COLOR_ATTACHMENT14 0x8CEE +#define GL_COLOR_ATTACHMENT15 0x8CEF +#define GL_COLOR_ATTACHMENT16 0x8CF0 +#define GL_COLOR_ATTACHMENT17 0x8CF1 +#define GL_COLOR_ATTACHMENT18 0x8CF2 +#define GL_COLOR_ATTACHMENT19 0x8CF3 +#define GL_COLOR_ATTACHMENT2 0x8CE2 +#define GL_COLOR_ATTACHMENT20 0x8CF4 +#define GL_COLOR_ATTACHMENT21 0x8CF5 +#define GL_COLOR_ATTACHMENT22 0x8CF6 +#define GL_COLOR_ATTACHMENT23 0x8CF7 +#define GL_COLOR_ATTACHMENT24 0x8CF8 +#define GL_COLOR_ATTACHMENT25 0x8CF9 +#define GL_COLOR_ATTACHMENT26 0x8CFA +#define GL_COLOR_ATTACHMENT27 0x8CFB +#define GL_COLOR_ATTACHMENT28 0x8CFC +#define GL_COLOR_ATTACHMENT29 0x8CFD +#define GL_COLOR_ATTACHMENT3 0x8CE3 +#define GL_COLOR_ATTACHMENT30 0x8CFE +#define GL_COLOR_ATTACHMENT31 0x8CFF +#define GL_COLOR_ATTACHMENT4 0x8CE4 +#define GL_COLOR_ATTACHMENT5 0x8CE5 +#define GL_COLOR_ATTACHMENT6 0x8CE6 +#define GL_COLOR_ATTACHMENT7 0x8CE7 +#define GL_COLOR_ATTACHMENT8 0x8CE8 +#define GL_COLOR_ATTACHMENT9 0x8CE9 +#define GL_COLOR_BUFFER_BIT 0x00004000 +#define GL_COLOR_CLEAR_VALUE 0x0C22 +#define GL_COLOR_COMPONENTS 0x8283 +#define GL_COLOR_ENCODING 0x8296 +#define GL_COLOR_LOGIC_OP 0x0BF2 +#define GL_COLOR_RENDERABLE 0x8286 +#define GL_COLOR_WRITEMASK 0x0C23 +#define GL_COMMAND_BARRIER_BIT 0x00000040 +#define GL_COMPARE_REF_TO_TEXTURE 0x884E +#define GL_COMPATIBLE_SUBROUTINES 0x8E4B +#define GL_COMPILE_STATUS 0x8B81 +#define GL_COMPRESSED_R11_EAC 0x9270 +#define GL_COMPRESSED_RED 0x8225 +#define GL_COMPRESSED_RED_RGTC1 0x8DBB +#define GL_COMPRESSED_RG 0x8226 +#define GL_COMPRESSED_RG11_EAC 0x9272 +#define GL_COMPRESSED_RGB 0x84ED +#define GL_COMPRESSED_RGB8_ETC2 0x9274 +#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 +#define GL_COMPRESSED_RGBA 0x84EE +#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 +#define GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C +#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E +#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F +#define GL_COMPRESSED_RG_RGTC2 0x8DBD +#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 +#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC +#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 +#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE +#define GL_COMPRESSED_SRGB 0x8C48 +#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 +#define GL_COMPRESSED_SRGB8_ETC2 0x9275 +#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 +#define GL_COMPRESSED_SRGB_ALPHA 0x8C49 +#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 +#define GL_COMPUTE_SHADER 0x91B9 +#define GL_COMPUTE_SHADER_BIT 0x00000020 +#define GL_COMPUTE_SHADER_INVOCATIONS 0x82F5 +#define GL_COMPUTE_SUBROUTINE 0x92ED +#define GL_COMPUTE_SUBROUTINE_UNIFORM 0x92F3 +#define GL_COMPUTE_TEXTURE 0x82A0 +#define GL_COMPUTE_WORK_GROUP_SIZE 0x8267 +#define GL_CONDITION_SATISFIED 0x911C +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_CONSTANT_COLOR 0x8001 +#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002 +#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001 +#define GL_CONTEXT_FLAGS 0x821E +#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002 +#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001 +#define GL_CONTEXT_FLAG_NO_ERROR_BIT 0x00000008 +#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT 0x00000004 +#define GL_CONTEXT_LOST 0x0507 +#define GL_CONTEXT_PROFILE_MASK 0x9126 +#define GL_CONTEXT_RELEASE_BEHAVIOR 0x82FB +#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82FC +#define GL_COPY 0x1503 +#define GL_COPY_INVERTED 0x150C +#define GL_COPY_READ_BUFFER 0x8F36 +#define GL_COPY_READ_BUFFER_BINDING 0x8F36 +#define GL_COPY_WRITE_BUFFER 0x8F37 +#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 +#define GL_CULL_FACE 0x0B44 +#define GL_CULL_FACE_MODE 0x0B45 +#define GL_CURRENT_PROGRAM 0x8B8D +#define GL_CURRENT_QUERY 0x8865 +#define GL_CURRENT_VERTEX_ATTRIB 0x8626 +#define GL_CW 0x0900 +#define GL_DEBUG_CALLBACK_FUNCTION 0x8244 +#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245 +#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D +#define GL_DEBUG_LOGGED_MESSAGES 0x9145 +#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243 +#define GL_DEBUG_OUTPUT 0x92E0 +#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242 +#define GL_DEBUG_SEVERITY_HIGH 0x9146 +#define GL_DEBUG_SEVERITY_LOW 0x9148 +#define GL_DEBUG_SEVERITY_MEDIUM 0x9147 +#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B +#define GL_DEBUG_SOURCE_API 0x8246 +#define GL_DEBUG_SOURCE_APPLICATION 0x824A +#define GL_DEBUG_SOURCE_OTHER 0x824B +#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248 +#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249 +#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247 +#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D +#define GL_DEBUG_TYPE_ERROR 0x824C +#define GL_DEBUG_TYPE_MARKER 0x8268 +#define GL_DEBUG_TYPE_OTHER 0x8251 +#define GL_DEBUG_TYPE_PERFORMANCE 0x8250 +#define GL_DEBUG_TYPE_POP_GROUP 0x826A +#define GL_DEBUG_TYPE_PORTABILITY 0x824F +#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269 +#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E +#define GL_DECR 0x1E03 +#define GL_DECR_WRAP 0x8508 +#define GL_DELETE_STATUS 0x8B80 +#define GL_DEPTH 0x1801 +#define GL_DEPTH24_STENCIL8 0x88F0 +#define GL_DEPTH32F_STENCIL8 0x8CAD +#define GL_DEPTH_ATTACHMENT 0x8D00 +#define GL_DEPTH_BUFFER_BIT 0x00000100 +#define GL_DEPTH_CLAMP 0x864F +#define GL_DEPTH_CLEAR_VALUE 0x0B73 +#define GL_DEPTH_COMPONENT 0x1902 +#define GL_DEPTH_COMPONENT16 0x81A5 +#define GL_DEPTH_COMPONENT24 0x81A6 +#define GL_DEPTH_COMPONENT32 0x81A7 +#define GL_DEPTH_COMPONENT32F 0x8CAC +#define GL_DEPTH_COMPONENTS 0x8284 +#define GL_DEPTH_FUNC 0x0B74 +#define GL_DEPTH_RANGE 0x0B70 +#define GL_DEPTH_RENDERABLE 0x8287 +#define GL_DEPTH_STENCIL 0x84F9 +#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A +#define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA +#define GL_DEPTH_TEST 0x0B71 +#define GL_DEPTH_WRITEMASK 0x0B72 +#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE +#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF +#define GL_DITHER 0x0BD0 +#define GL_DONT_CARE 0x1100 +#define GL_DOUBLE 0x140A +#define GL_DOUBLEBUFFER 0x0C32 +#define GL_DOUBLE_MAT2 0x8F46 +#define GL_DOUBLE_MAT2x3 0x8F49 +#define GL_DOUBLE_MAT2x4 0x8F4A +#define GL_DOUBLE_MAT3 0x8F47 +#define GL_DOUBLE_MAT3x2 0x8F4B +#define GL_DOUBLE_MAT3x4 0x8F4C +#define GL_DOUBLE_MAT4 0x8F48 +#define GL_DOUBLE_MAT4x2 0x8F4D +#define GL_DOUBLE_MAT4x3 0x8F4E +#define GL_DOUBLE_VEC2 0x8FFC +#define GL_DOUBLE_VEC3 0x8FFD +#define GL_DOUBLE_VEC4 0x8FFE +#define GL_DRAW_BUFFER 0x0C01 +#define GL_DRAW_BUFFER0 0x8825 +#define GL_DRAW_BUFFER1 0x8826 +#define GL_DRAW_BUFFER10 0x882F +#define GL_DRAW_BUFFER11 0x8830 +#define GL_DRAW_BUFFER12 0x8831 +#define GL_DRAW_BUFFER13 0x8832 +#define GL_DRAW_BUFFER14 0x8833 +#define GL_DRAW_BUFFER15 0x8834 +#define GL_DRAW_BUFFER2 0x8827 +#define GL_DRAW_BUFFER3 0x8828 +#define GL_DRAW_BUFFER4 0x8829 +#define GL_DRAW_BUFFER5 0x882A +#define GL_DRAW_BUFFER6 0x882B +#define GL_DRAW_BUFFER7 0x882C +#define GL_DRAW_BUFFER8 0x882D +#define GL_DRAW_BUFFER9 0x882E +#define GL_DRAW_FRAMEBUFFER 0x8CA9 +#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6 +#define GL_DRAW_INDIRECT_BUFFER 0x8F3F +#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43 +#define GL_DST_ALPHA 0x0304 +#define GL_DST_COLOR 0x0306 +#define GL_DYNAMIC_COPY 0x88EA +#define GL_DYNAMIC_DRAW 0x88E8 +#define GL_DYNAMIC_READ 0x88E9 +#define GL_DYNAMIC_STORAGE_BIT 0x0100 +#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 +#define GL_EQUAL 0x0202 +#define GL_EQUIV 0x1509 +#define GL_EXTENSIONS 0x1F03 +#define GL_FALSE 0 +#define GL_FASTEST 0x1101 +#define GL_FILL 0x1B02 +#define GL_FILTER 0x829A +#define GL_FIRST_VERTEX_CONVENTION 0x8E4D +#define GL_FIXED 0x140C +#define GL_FIXED_ONLY 0x891D +#define GL_FLOAT 0x1406 +#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD +#define GL_FLOAT_MAT2 0x8B5A +#define GL_FLOAT_MAT2x3 0x8B65 +#define GL_FLOAT_MAT2x4 0x8B66 +#define GL_FLOAT_MAT3 0x8B5B +#define GL_FLOAT_MAT3x2 0x8B67 +#define GL_FLOAT_MAT3x4 0x8B68 +#define GL_FLOAT_MAT4 0x8B5C +#define GL_FLOAT_MAT4x2 0x8B69 +#define GL_FLOAT_MAT4x3 0x8B6A +#define GL_FLOAT_VEC2 0x8B50 +#define GL_FLOAT_VEC3 0x8B51 +#define GL_FLOAT_VEC4 0x8B52 +#define GL_FRACTIONAL_EVEN 0x8E7C +#define GL_FRACTIONAL_ODD 0x8E7B +#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D +#define GL_FRAGMENT_SHADER 0x8B30 +#define GL_FRAGMENT_SHADER_BIT 0x00000002 +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B +#define GL_FRAGMENT_SHADER_INVOCATIONS 0x82F4 +#define GL_FRAGMENT_SUBROUTINE 0x92EC +#define GL_FRAGMENT_SUBROUTINE_UNIFORM 0x92F2 +#define GL_FRAGMENT_TEXTURE 0x829F +#define GL_FRAMEBUFFER 0x8D40 +#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 +#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 +#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 +#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 +#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 +#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 +#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 +#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400 +#define GL_FRAMEBUFFER_BINDING 0x8CA6 +#define GL_FRAMEBUFFER_BLEND 0x828B +#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 +#define GL_FRAMEBUFFER_DEFAULT 0x8218 +#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314 +#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311 +#define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312 +#define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313 +#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 +#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC +#define GL_FRAMEBUFFER_RENDERABLE 0x8289 +#define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A +#define GL_FRAMEBUFFER_SRGB 0x8DB9 +#define GL_FRAMEBUFFER_UNDEFINED 0x8219 +#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD +#define GL_FRONT 0x0404 +#define GL_FRONT_AND_BACK 0x0408 +#define GL_FRONT_FACE 0x0B46 +#define GL_FRONT_LEFT 0x0400 +#define GL_FRONT_RIGHT 0x0401 +#define GL_FULL_SUPPORT 0x82B7 +#define GL_FUNC_ADD 0x8006 +#define GL_FUNC_REVERSE_SUBTRACT 0x800B +#define GL_FUNC_SUBTRACT 0x800A +#define GL_GEOMETRY_INPUT_TYPE 0x8917 +#define GL_GEOMETRY_OUTPUT_TYPE 0x8918 +#define GL_GEOMETRY_SHADER 0x8DD9 +#define GL_GEOMETRY_SHADER_BIT 0x00000004 +#define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F +#define GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED 0x82F3 +#define GL_GEOMETRY_SUBROUTINE 0x92EB +#define GL_GEOMETRY_SUBROUTINE_UNIFORM 0x92F1 +#define GL_GEOMETRY_TEXTURE 0x829E +#define GL_GEOMETRY_VERTICES_OUT 0x8916 +#define GL_GEQUAL 0x0206 +#define GL_GET_TEXTURE_IMAGE_FORMAT 0x8291 +#define GL_GET_TEXTURE_IMAGE_TYPE 0x8292 +#define GL_GREATER 0x0204 +#define GL_GREEN 0x1904 +#define GL_GREEN_INTEGER 0x8D95 +#define GL_GUILTY_CONTEXT_RESET 0x8253 +#define GL_HALF_FLOAT 0x140B +#define GL_HIGH_FLOAT 0x8DF2 +#define GL_HIGH_INT 0x8DF5 +#define GL_IMAGE_1D 0x904C +#define GL_IMAGE_1D_ARRAY 0x9052 +#define GL_IMAGE_2D 0x904D +#define GL_IMAGE_2D_ARRAY 0x9053 +#define GL_IMAGE_2D_MULTISAMPLE 0x9055 +#define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056 +#define GL_IMAGE_2D_RECT 0x904F +#define GL_IMAGE_3D 0x904E +#define GL_IMAGE_BINDING_ACCESS 0x8F3E +#define GL_IMAGE_BINDING_FORMAT 0x906E +#define GL_IMAGE_BINDING_LAYER 0x8F3D +#define GL_IMAGE_BINDING_LAYERED 0x8F3C +#define GL_IMAGE_BINDING_LEVEL 0x8F3B +#define GL_IMAGE_BINDING_NAME 0x8F3A +#define GL_IMAGE_BUFFER 0x9051 +#define GL_IMAGE_CLASS_10_10_10_2 0x82C3 +#define GL_IMAGE_CLASS_11_11_10 0x82C2 +#define GL_IMAGE_CLASS_1_X_16 0x82BE +#define GL_IMAGE_CLASS_1_X_32 0x82BB +#define GL_IMAGE_CLASS_1_X_8 0x82C1 +#define GL_IMAGE_CLASS_2_X_16 0x82BD +#define GL_IMAGE_CLASS_2_X_32 0x82BA +#define GL_IMAGE_CLASS_2_X_8 0x82C0 +#define GL_IMAGE_CLASS_4_X_16 0x82BC +#define GL_IMAGE_CLASS_4_X_32 0x82B9 +#define GL_IMAGE_CLASS_4_X_8 0x82BF +#define GL_IMAGE_COMPATIBILITY_CLASS 0x82A8 +#define GL_IMAGE_CUBE 0x9050 +#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054 +#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9 +#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8 +#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7 +#define GL_IMAGE_PIXEL_FORMAT 0x82A9 +#define GL_IMAGE_PIXEL_TYPE 0x82AA +#define GL_IMAGE_TEXEL_SIZE 0x82A7 +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B +#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A +#define GL_INCR 0x1E02 +#define GL_INCR_WRAP 0x8507 +#define GL_INFO_LOG_LENGTH 0x8B84 +#define GL_INNOCENT_CONTEXT_RESET 0x8254 +#define GL_INT 0x1404 +#define GL_INTERLEAVED_ATTRIBS 0x8C8C +#define GL_INTERNALFORMAT_ALPHA_SIZE 0x8274 +#define GL_INTERNALFORMAT_ALPHA_TYPE 0x827B +#define GL_INTERNALFORMAT_BLUE_SIZE 0x8273 +#define GL_INTERNALFORMAT_BLUE_TYPE 0x827A +#define GL_INTERNALFORMAT_DEPTH_SIZE 0x8275 +#define GL_INTERNALFORMAT_DEPTH_TYPE 0x827C +#define GL_INTERNALFORMAT_GREEN_SIZE 0x8272 +#define GL_INTERNALFORMAT_GREEN_TYPE 0x8279 +#define GL_INTERNALFORMAT_PREFERRED 0x8270 +#define GL_INTERNALFORMAT_RED_SIZE 0x8271 +#define GL_INTERNALFORMAT_RED_TYPE 0x8278 +#define GL_INTERNALFORMAT_SHARED_SIZE 0x8277 +#define GL_INTERNALFORMAT_STENCIL_SIZE 0x8276 +#define GL_INTERNALFORMAT_STENCIL_TYPE 0x827D +#define GL_INTERNALFORMAT_SUPPORTED 0x826F +#define GL_INT_2_10_10_10_REV 0x8D9F +#define GL_INT_IMAGE_1D 0x9057 +#define GL_INT_IMAGE_1D_ARRAY 0x905D +#define GL_INT_IMAGE_2D 0x9058 +#define GL_INT_IMAGE_2D_ARRAY 0x905E +#define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060 +#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061 +#define GL_INT_IMAGE_2D_RECT 0x905A +#define GL_INT_IMAGE_3D 0x9059 +#define GL_INT_IMAGE_BUFFER 0x905C +#define GL_INT_IMAGE_CUBE 0x905B +#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F +#define GL_INT_SAMPLER_1D 0x8DC9 +#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE +#define GL_INT_SAMPLER_2D 0x8DCA +#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF +#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109 +#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C +#define GL_INT_SAMPLER_2D_RECT 0x8DCD +#define GL_INT_SAMPLER_3D 0x8DCB +#define GL_INT_SAMPLER_BUFFER 0x8DD0 +#define GL_INT_SAMPLER_CUBE 0x8DCC +#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E +#define GL_INT_VEC2 0x8B53 +#define GL_INT_VEC3 0x8B54 +#define GL_INT_VEC4 0x8B55 +#define GL_INVALID_ENUM 0x0500 +#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 +#define GL_INVALID_INDEX 0xFFFFFFFF +#define GL_INVALID_OPERATION 0x0502 +#define GL_INVALID_VALUE 0x0501 +#define GL_INVERT 0x150A +#define GL_ISOLINES 0x8E7A +#define GL_IS_PER_PATCH 0x92E7 +#define GL_IS_ROW_MAJOR 0x9300 +#define GL_KEEP 0x1E00 +#define GL_LAST_VERTEX_CONVENTION 0x8E4E +#define GL_LAYER_PROVOKING_VERTEX 0x825E +#define GL_LEFT 0x0406 +#define GL_LEQUAL 0x0203 +#define GL_LESS 0x0201 +#define GL_LINE 0x1B01 +#define GL_LINEAR 0x2601 +#define GL_LINEAR_MIPMAP_LINEAR 0x2703 +#define GL_LINEAR_MIPMAP_NEAREST 0x2701 +#define GL_LINES 0x0001 +#define GL_LINES_ADJACENCY 0x000A +#define GL_LINE_LOOP 0x0002 +#define GL_LINE_SMOOTH 0x0B20 +#define GL_LINE_SMOOTH_HINT 0x0C52 +#define GL_LINE_STRIP 0x0003 +#define GL_LINE_STRIP_ADJACENCY 0x000B +#define GL_LINE_WIDTH 0x0B21 +#define GL_LINE_WIDTH_GRANULARITY 0x0B23 +#define GL_LINE_WIDTH_RANGE 0x0B22 +#define GL_LINK_STATUS 0x8B82 +#define GL_LOCATION 0x930E +#define GL_LOCATION_COMPONENT 0x934A +#define GL_LOCATION_INDEX 0x930F +#define GL_LOGIC_OP_MODE 0x0BF0 +#define GL_LOSE_CONTEXT_ON_RESET 0x8252 +#define GL_LOWER_LEFT 0x8CA1 +#define GL_LOW_FLOAT 0x8DF0 +#define GL_LOW_INT 0x8DF3 +#define GL_MAJOR_VERSION 0x821B +#define GL_MANUAL_GENERATE_MIPMAP 0x8294 +#define GL_MAP_COHERENT_BIT 0x0080 +#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 +#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 +#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 +#define GL_MAP_PERSISTENT_BIT 0x0040 +#define GL_MAP_READ_BIT 0x0001 +#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 +#define GL_MAP_WRITE_BIT 0x0002 +#define GL_MATRIX_STRIDE 0x92FF +#define GL_MAX 0x8008 +#define GL_MAX_3D_TEXTURE_SIZE 0x8073 +#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF +#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC +#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8 +#define GL_MAX_CLIP_DISTANCES 0x0D32 +#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF +#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E +#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7 +#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1 +#define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES 0x82FA +#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266 +#define GL_MAX_COMBINED_DIMENSIONS 0x8282 +#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 +#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32 +#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF +#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39 +#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39 +#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC +#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E +#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D +#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E +#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 +#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265 +#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264 +#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD +#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB +#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262 +#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC +#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB +#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263 +#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE +#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB +#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C +#define GL_MAX_CULL_DISTANCES 0x82F9 +#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C +#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144 +#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143 +#define GL_MAX_DEPTH 0x8280 +#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F +#define GL_MAX_DRAW_BUFFERS 0x8824 +#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC +#define GL_MAX_ELEMENTS_INDICES 0x80E9 +#define GL_MAX_ELEMENTS_VERTICES 0x80E8 +#define GL_MAX_ELEMENT_INDEX 0x8D6B +#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6 +#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0 +#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE +#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 +#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C +#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA +#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 +#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD +#define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316 +#define GL_MAX_FRAMEBUFFER_LAYERS 0x9317 +#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318 +#define GL_MAX_FRAMEBUFFER_WIDTH 0x9315 +#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5 +#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF +#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD +#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123 +#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124 +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0 +#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A +#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7 +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1 +#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF +#define GL_MAX_HEIGHT 0x827F +#define GL_MAX_IMAGE_SAMPLES 0x906D +#define GL_MAX_IMAGE_UNITS 0x8F38 +#define GL_MAX_INTEGER_SAMPLES 0x9110 +#define GL_MAX_LABEL_LENGTH 0x82E8 +#define GL_MAX_LAYERS 0x8281 +#define GL_MAX_NAME_LENGTH 0x92F6 +#define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7 +#define GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8 +#define GL_MAX_PATCH_VERTICES 0x8E7D +#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 +#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F +#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8 +#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 +#define GL_MAX_SAMPLES 0x8D57 +#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59 +#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 +#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE +#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD +#define GL_MAX_SUBROUTINES 0x8DE7 +#define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8 +#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3 +#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD +#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB +#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C +#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83 +#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8 +#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81 +#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85 +#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89 +#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F +#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4 +#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE +#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC +#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D +#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86 +#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9 +#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82 +#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A +#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80 +#define GL_MAX_TESS_GEN_LEVEL 0x8E7E +#define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84 +#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B +#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 +#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD +#define GL_MAX_TEXTURE_MAX_ANISOTROPY 0x84FF +#define GL_MAX_TEXTURE_SIZE 0x0D33 +#define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70 +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 +#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 +#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F +#define GL_MAX_UNIFORM_LOCATIONS 0x826E +#define GL_MAX_VARYING_COMPONENTS 0x8B4B +#define GL_MAX_VARYING_FLOATS 0x8B4B +#define GL_MAX_VARYING_VECTORS 0x8DFC +#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2 +#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC +#define GL_MAX_VERTEX_ATTRIBS 0x8869 +#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA +#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9 +#define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5 +#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA +#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 +#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6 +#define GL_MAX_VERTEX_STREAMS 0x8E71 +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C +#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A +#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB +#define GL_MAX_VIEWPORTS 0x825B +#define GL_MAX_VIEWPORT_DIMS 0x0D3A +#define GL_MAX_WIDTH 0x827E +#define GL_MEDIUM_FLOAT 0x8DF1 +#define GL_MEDIUM_INT 0x8DF4 +#define GL_MIN 0x8007 +#define GL_MINOR_VERSION 0x821C +#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B +#define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC +#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 +#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E +#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37 +#define GL_MIPMAP 0x8293 +#define GL_MIRRORED_REPEAT 0x8370 +#define GL_MIRROR_CLAMP_TO_EDGE 0x8743 +#define GL_MULTISAMPLE 0x809D +#define GL_NAME_LENGTH 0x92F9 +#define GL_NAND 0x150E +#define GL_NEAREST 0x2600 +#define GL_NEAREST_MIPMAP_LINEAR 0x2702 +#define GL_NEAREST_MIPMAP_NEAREST 0x2700 +#define GL_NEGATIVE_ONE_TO_ONE 0x935E +#define GL_NEVER 0x0200 +#define GL_NICEST 0x1102 +#define GL_NONE 0 +#define GL_NOOP 0x1505 +#define GL_NOR 0x1508 +#define GL_NOTEQUAL 0x0205 +#define GL_NO_ERROR 0 +#define GL_NO_RESET_NOTIFICATION 0x8261 +#define GL_NUM_ACTIVE_VARIABLES 0x9304 +#define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_NUM_EXTENSIONS 0x821D +#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE +#define GL_NUM_SAMPLE_COUNTS 0x9380 +#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 +#define GL_NUM_SHADING_LANGUAGE_VERSIONS 0x82E9 +#define GL_NUM_SPIR_V_EXTENSIONS 0x9554 +#define GL_OBJECT_TYPE 0x9112 +#define GL_OFFSET 0x92FC +#define GL_ONE 1 +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_ONE_MINUS_DST_ALPHA 0x0305 +#define GL_ONE_MINUS_DST_COLOR 0x0307 +#define GL_ONE_MINUS_SRC1_ALPHA 0x88FB +#define GL_ONE_MINUS_SRC1_COLOR 0x88FA +#define GL_ONE_MINUS_SRC_ALPHA 0x0303 +#define GL_ONE_MINUS_SRC_COLOR 0x0301 +#define GL_OR 0x1507 +#define GL_OR_INVERTED 0x150D +#define GL_OR_REVERSE 0x150B +#define GL_OUT_OF_MEMORY 0x0505 +#define GL_PACK_ALIGNMENT 0x0D05 +#define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D +#define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C +#define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E +#define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B +#define GL_PACK_IMAGE_HEIGHT 0x806C +#define GL_PACK_LSB_FIRST 0x0D01 +#define GL_PACK_ROW_LENGTH 0x0D02 +#define GL_PACK_SKIP_IMAGES 0x806B +#define GL_PACK_SKIP_PIXELS 0x0D04 +#define GL_PACK_SKIP_ROWS 0x0D03 +#define GL_PACK_SWAP_BYTES 0x0D00 +#define GL_PARAMETER_BUFFER 0x80EE +#define GL_PARAMETER_BUFFER_BINDING 0x80EF +#define GL_PATCHES 0x000E +#define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73 +#define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74 +#define GL_PATCH_VERTICES 0x8E72 +#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080 +#define GL_PIXEL_PACK_BUFFER 0x88EB +#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED +#define GL_PIXEL_UNPACK_BUFFER 0x88EC +#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF +#define GL_POINT 0x1B00 +#define GL_POINTS 0x0000 +#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 +#define GL_POINT_SIZE 0x0B11 +#define GL_POINT_SIZE_GRANULARITY 0x0B13 +#define GL_POINT_SIZE_RANGE 0x0B12 +#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 +#define GL_POLYGON_MODE 0x0B40 +#define GL_POLYGON_OFFSET_CLAMP 0x8E1B +#define GL_POLYGON_OFFSET_FACTOR 0x8038 +#define GL_POLYGON_OFFSET_FILL 0x8037 +#define GL_POLYGON_OFFSET_LINE 0x2A02 +#define GL_POLYGON_OFFSET_POINT 0x2A01 +#define GL_POLYGON_OFFSET_UNITS 0x2A00 +#define GL_POLYGON_SMOOTH 0x0B41 +#define GL_POLYGON_SMOOTH_HINT 0x0C53 +#define GL_PRIMITIVES_GENERATED 0x8C87 +#define GL_PRIMITIVES_SUBMITTED 0x82EF +#define GL_PRIMITIVE_RESTART 0x8F9D +#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 +#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221 +#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E +#define GL_PROGRAM 0x82E2 +#define GL_PROGRAM_BINARY_FORMATS 0x87FF +#define GL_PROGRAM_BINARY_LENGTH 0x8741 +#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 +#define GL_PROGRAM_INPUT 0x92E3 +#define GL_PROGRAM_OUTPUT 0x92E4 +#define GL_PROGRAM_PIPELINE 0x82E4 +#define GL_PROGRAM_PIPELINE_BINDING 0x825A +#define GL_PROGRAM_POINT_SIZE 0x8642 +#define GL_PROGRAM_SEPARABLE 0x8258 +#define GL_PROVOKING_VERTEX 0x8E4F +#define GL_PROXY_TEXTURE_1D 0x8063 +#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19 +#define GL_PROXY_TEXTURE_2D 0x8064 +#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B +#define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101 +#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103 +#define GL_PROXY_TEXTURE_3D 0x8070 +#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B +#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B +#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7 +#define GL_QUADS 0x0007 +#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C +#define GL_QUERY 0x82E3 +#define GL_QUERY_BUFFER 0x9192 +#define GL_QUERY_BUFFER_BARRIER_BIT 0x00008000 +#define GL_QUERY_BUFFER_BINDING 0x9193 +#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16 +#define GL_QUERY_BY_REGION_NO_WAIT_INVERTED 0x8E1A +#define GL_QUERY_BY_REGION_WAIT 0x8E15 +#define GL_QUERY_BY_REGION_WAIT_INVERTED 0x8E19 +#define GL_QUERY_COUNTER_BITS 0x8864 +#define GL_QUERY_NO_WAIT 0x8E14 +#define GL_QUERY_NO_WAIT_INVERTED 0x8E18 +#define GL_QUERY_RESULT 0x8866 +#define GL_QUERY_RESULT_AVAILABLE 0x8867 +#define GL_QUERY_RESULT_NO_WAIT 0x9194 +#define GL_QUERY_TARGET 0x82EA +#define GL_QUERY_WAIT 0x8E13 +#define GL_QUERY_WAIT_INVERTED 0x8E17 +#define GL_R11F_G11F_B10F 0x8C3A +#define GL_R16 0x822A +#define GL_R16F 0x822D +#define GL_R16I 0x8233 +#define GL_R16UI 0x8234 +#define GL_R16_SNORM 0x8F98 +#define GL_R32F 0x822E +#define GL_R32I 0x8235 +#define GL_R32UI 0x8236 +#define GL_R3_G3_B2 0x2A10 +#define GL_R8 0x8229 +#define GL_R8I 0x8231 +#define GL_R8UI 0x8232 +#define GL_R8_SNORM 0x8F94 +#define GL_RASTERIZER_DISCARD 0x8C89 +#define GL_READ_BUFFER 0x0C02 +#define GL_READ_FRAMEBUFFER 0x8CA8 +#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA +#define GL_READ_ONLY 0x88B8 +#define GL_READ_PIXELS 0x828C +#define GL_READ_PIXELS_FORMAT 0x828D +#define GL_READ_PIXELS_TYPE 0x828E +#define GL_READ_WRITE 0x88BA +#define GL_RED 0x1903 +#define GL_RED_INTEGER 0x8D94 +#define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B +#define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A +#define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309 +#define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307 +#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308 +#define GL_REFERENCED_BY_VERTEX_SHADER 0x9306 +#define GL_RENDERBUFFER 0x8D41 +#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 +#define GL_RENDERBUFFER_BINDING 0x8CA7 +#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 +#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 +#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 +#define GL_RENDERBUFFER_HEIGHT 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 +#define GL_RENDERBUFFER_RED_SIZE 0x8D50 +#define GL_RENDERBUFFER_SAMPLES 0x8CAB +#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 +#define GL_RENDERBUFFER_WIDTH 0x8D42 +#define GL_RENDERER 0x1F01 +#define GL_REPEAT 0x2901 +#define GL_REPLACE 0x1E01 +#define GL_RESET_NOTIFICATION_STRATEGY 0x8256 +#define GL_RG 0x8227 +#define GL_RG16 0x822C +#define GL_RG16F 0x822F +#define GL_RG16I 0x8239 +#define GL_RG16UI 0x823A +#define GL_RG16_SNORM 0x8F99 +#define GL_RG32F 0x8230 +#define GL_RG32I 0x823B +#define GL_RG32UI 0x823C +#define GL_RG8 0x822B +#define GL_RG8I 0x8237 +#define GL_RG8UI 0x8238 +#define GL_RG8_SNORM 0x8F95 +#define GL_RGB 0x1907 +#define GL_RGB10 0x8052 +#define GL_RGB10_A2 0x8059 +#define GL_RGB10_A2UI 0x906F +#define GL_RGB12 0x8053 +#define GL_RGB16 0x8054 +#define GL_RGB16F 0x881B +#define GL_RGB16I 0x8D89 +#define GL_RGB16UI 0x8D77 +#define GL_RGB16_SNORM 0x8F9A +#define GL_RGB32F 0x8815 +#define GL_RGB32I 0x8D83 +#define GL_RGB32UI 0x8D71 +#define GL_RGB4 0x804F +#define GL_RGB5 0x8050 +#define GL_RGB565 0x8D62 +#define GL_RGB5_A1 0x8057 +#define GL_RGB8 0x8051 +#define GL_RGB8I 0x8D8F +#define GL_RGB8UI 0x8D7D +#define GL_RGB8_SNORM 0x8F96 +#define GL_RGB9_E5 0x8C3D +#define GL_RGBA 0x1908 +#define GL_RGBA12 0x805A +#define GL_RGBA16 0x805B +#define GL_RGBA16F 0x881A +#define GL_RGBA16I 0x8D88 +#define GL_RGBA16UI 0x8D76 +#define GL_RGBA16_SNORM 0x8F9B +#define GL_RGBA2 0x8055 +#define GL_RGBA32F 0x8814 +#define GL_RGBA32I 0x8D82 +#define GL_RGBA32UI 0x8D70 +#define GL_RGBA4 0x8056 +#define GL_RGBA8 0x8058 +#define GL_RGBA8I 0x8D8E +#define GL_RGBA8UI 0x8D7C +#define GL_RGBA8_SNORM 0x8F97 +#define GL_RGBA_INTEGER 0x8D99 +#define GL_RGB_INTEGER 0x8D98 +#define GL_RG_INTEGER 0x8228 +#define GL_RIGHT 0x0407 +#define GL_SAMPLER 0x82E6 +#define GL_SAMPLER_1D 0x8B5D +#define GL_SAMPLER_1D_ARRAY 0x8DC0 +#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3 +#define GL_SAMPLER_1D_SHADOW 0x8B61 +#define GL_SAMPLER_2D 0x8B5E +#define GL_SAMPLER_2D_ARRAY 0x8DC1 +#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 +#define GL_SAMPLER_2D_MULTISAMPLE 0x9108 +#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B +#define GL_SAMPLER_2D_RECT 0x8B63 +#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64 +#define GL_SAMPLER_2D_SHADOW 0x8B62 +#define GL_SAMPLER_3D 0x8B5F +#define GL_SAMPLER_BINDING 0x8919 +#define GL_SAMPLER_BUFFER 0x8DC2 +#define GL_SAMPLER_CUBE 0x8B60 +#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C +#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D +#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLES_PASSED 0x8914 +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE 0x809F +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLE_COVERAGE 0x80A0 +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_MASK 0x8E51 +#define GL_SAMPLE_MASK_VALUE 0x8E52 +#define GL_SAMPLE_POSITION 0x8E50 +#define GL_SAMPLE_SHADING 0x8C36 +#define GL_SCISSOR_BOX 0x0C10 +#define GL_SCISSOR_TEST 0x0C11 +#define GL_SEPARATE_ATTRIBS 0x8C8D +#define GL_SET 0x150F +#define GL_SHADER 0x82E1 +#define GL_SHADER_BINARY_FORMATS 0x8DF8 +#define GL_SHADER_BINARY_FORMAT_SPIR_V 0x9551 +#define GL_SHADER_COMPILER 0x8DFA +#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020 +#define GL_SHADER_IMAGE_ATOMIC 0x82A6 +#define GL_SHADER_IMAGE_LOAD 0x82A4 +#define GL_SHADER_IMAGE_STORE 0x82A5 +#define GL_SHADER_SOURCE_LENGTH 0x8B88 +#define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000 +#define GL_SHADER_STORAGE_BLOCK 0x92E6 +#define GL_SHADER_STORAGE_BUFFER 0x90D2 +#define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3 +#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF +#define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5 +#define GL_SHADER_STORAGE_BUFFER_START 0x90D4 +#define GL_SHADER_TYPE 0x8B4F +#define GL_SHADING_LANGUAGE_VERSION 0x8B8C +#define GL_SHORT 0x1402 +#define GL_SIGNALED 0x9119 +#define GL_SIGNED_NORMALIZED 0x8F9C +#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC +#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE +#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD +#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF +#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 +#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 +#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 +#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 +#define GL_SPIR_V_BINARY 0x9552 +#define GL_SPIR_V_EXTENSIONS 0x9553 +#define GL_SRC1_ALPHA 0x8589 +#define GL_SRC1_COLOR 0x88F9 +#define GL_SRC_ALPHA 0x0302 +#define GL_SRC_ALPHA_SATURATE 0x0308 +#define GL_SRC_COLOR 0x0300 +#define GL_SRGB 0x8C40 +#define GL_SRGB8 0x8C41 +#define GL_SRGB8_ALPHA8 0x8C43 +#define GL_SRGB_ALPHA 0x8C42 +#define GL_SRGB_READ 0x8297 +#define GL_SRGB_WRITE 0x8298 +#define GL_STACK_OVERFLOW 0x0503 +#define GL_STACK_UNDERFLOW 0x0504 +#define GL_STATIC_COPY 0x88E6 +#define GL_STATIC_DRAW 0x88E4 +#define GL_STATIC_READ 0x88E5 +#define GL_STENCIL 0x1802 +#define GL_STENCIL_ATTACHMENT 0x8D20 +#define GL_STENCIL_BACK_FAIL 0x8801 +#define GL_STENCIL_BACK_FUNC 0x8800 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 +#define GL_STENCIL_BACK_REF 0x8CA3 +#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 +#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 +#define GL_STENCIL_BUFFER_BIT 0x00000400 +#define GL_STENCIL_CLEAR_VALUE 0x0B91 +#define GL_STENCIL_COMPONENTS 0x8285 +#define GL_STENCIL_FAIL 0x0B94 +#define GL_STENCIL_FUNC 0x0B92 +#define GL_STENCIL_INDEX 0x1901 +#define GL_STENCIL_INDEX1 0x8D46 +#define GL_STENCIL_INDEX16 0x8D49 +#define GL_STENCIL_INDEX4 0x8D47 +#define GL_STENCIL_INDEX8 0x8D48 +#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 +#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 +#define GL_STENCIL_REF 0x0B97 +#define GL_STENCIL_RENDERABLE 0x8288 +#define GL_STENCIL_TEST 0x0B90 +#define GL_STENCIL_VALUE_MASK 0x0B93 +#define GL_STENCIL_WRITEMASK 0x0B98 +#define GL_STEREO 0x0C33 +#define GL_STREAM_COPY 0x88E2 +#define GL_STREAM_DRAW 0x88E0 +#define GL_STREAM_READ 0x88E1 +#define GL_SUBPIXEL_BITS 0x0D50 +#define GL_SYNC_CONDITION 0x9113 +#define GL_SYNC_FENCE 0x9116 +#define GL_SYNC_FLAGS 0x9115 +#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 +#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 +#define GL_SYNC_STATUS 0x9114 +#define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75 +#define GL_TESS_CONTROL_SHADER 0x8E88 +#define GL_TESS_CONTROL_SHADER_BIT 0x00000008 +#define GL_TESS_CONTROL_SHADER_PATCHES 0x82F1 +#define GL_TESS_CONTROL_SUBROUTINE 0x92E9 +#define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF +#define GL_TESS_CONTROL_TEXTURE 0x829C +#define GL_TESS_EVALUATION_SHADER 0x8E87 +#define GL_TESS_EVALUATION_SHADER_BIT 0x00000010 +#define GL_TESS_EVALUATION_SHADER_INVOCATIONS 0x82F2 +#define GL_TESS_EVALUATION_SUBROUTINE 0x92EA +#define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0 +#define GL_TESS_EVALUATION_TEXTURE 0x829D +#define GL_TESS_GEN_MODE 0x8E76 +#define GL_TESS_GEN_POINT_MODE 0x8E79 +#define GL_TESS_GEN_SPACING 0x8E77 +#define GL_TESS_GEN_VERTEX_ORDER 0x8E78 +#define GL_TEXTURE 0x1702 +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE_1D 0x0DE0 +#define GL_TEXTURE_1D_ARRAY 0x8C18 +#define GL_TEXTURE_2D 0x0DE1 +#define GL_TEXTURE_2D_ARRAY 0x8C1A +#define GL_TEXTURE_2D_MULTISAMPLE 0x9100 +#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102 +#define GL_TEXTURE_3D 0x806F +#define GL_TEXTURE_ALPHA_SIZE 0x805F +#define GL_TEXTURE_ALPHA_TYPE 0x8C13 +#define GL_TEXTURE_BASE_LEVEL 0x813C +#define GL_TEXTURE_BINDING_1D 0x8068 +#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C +#define GL_TEXTURE_BINDING_2D 0x8069 +#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D +#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104 +#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105 +#define GL_TEXTURE_BINDING_3D 0x806A +#define GL_TEXTURE_BINDING_BUFFER 0x8C2C +#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A +#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6 +#define GL_TEXTURE_BLUE_SIZE 0x805E +#define GL_TEXTURE_BLUE_TYPE 0x8C12 +#define GL_TEXTURE_BORDER_COLOR 0x1004 +#define GL_TEXTURE_BUFFER 0x8C2A +#define GL_TEXTURE_BUFFER_BINDING 0x8C2A +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D +#define GL_TEXTURE_BUFFER_OFFSET 0x919D +#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F +#define GL_TEXTURE_BUFFER_SIZE 0x919E +#define GL_TEXTURE_COMPARE_FUNC 0x884D +#define GL_TEXTURE_COMPARE_MODE 0x884C +#define GL_TEXTURE_COMPRESSED 0x86A1 +#define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2 +#define GL_TEXTURE_COMPRESSED_BLOCK_SIZE 0x82B3 +#define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1 +#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 +#define GL_TEXTURE_COMPRESSION_HINT 0x84EF +#define GL_TEXTURE_CUBE_MAP 0x8513 +#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 +#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F +#define GL_TEXTURE_DEPTH 0x8071 +#define GL_TEXTURE_DEPTH_SIZE 0x884A +#define GL_TEXTURE_DEPTH_TYPE 0x8C16 +#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008 +#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107 +#define GL_TEXTURE_GATHER 0x82A2 +#define GL_TEXTURE_GATHER_SHADOW 0x82A3 +#define GL_TEXTURE_GREEN_SIZE 0x805D +#define GL_TEXTURE_GREEN_TYPE 0x8C11 +#define GL_TEXTURE_HEIGHT 0x1001 +#define GL_TEXTURE_IMAGE_FORMAT 0x828F +#define GL_TEXTURE_IMAGE_TYPE 0x8290 +#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F +#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF +#define GL_TEXTURE_INTERNAL_FORMAT 0x1003 +#define GL_TEXTURE_LOD_BIAS 0x8501 +#define GL_TEXTURE_MAG_FILTER 0x2800 +#define GL_TEXTURE_MAX_ANISOTROPY 0x84FE +#define GL_TEXTURE_MAX_LEVEL 0x813D +#define GL_TEXTURE_MAX_LOD 0x813B +#define GL_TEXTURE_MIN_FILTER 0x2801 +#define GL_TEXTURE_MIN_LOD 0x813A +#define GL_TEXTURE_RECTANGLE 0x84F5 +#define GL_TEXTURE_RED_SIZE 0x805C +#define GL_TEXTURE_RED_TYPE 0x8C10 +#define GL_TEXTURE_SAMPLES 0x9106 +#define GL_TEXTURE_SHADOW 0x82A1 +#define GL_TEXTURE_SHARED_SIZE 0x8C3F +#define GL_TEXTURE_STENCIL_SIZE 0x88F1 +#define GL_TEXTURE_SWIZZLE_A 0x8E45 +#define GL_TEXTURE_SWIZZLE_B 0x8E44 +#define GL_TEXTURE_SWIZZLE_G 0x8E43 +#define GL_TEXTURE_SWIZZLE_R 0x8E42 +#define GL_TEXTURE_SWIZZLE_RGBA 0x8E46 +#define GL_TEXTURE_TARGET 0x1006 +#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100 +#define GL_TEXTURE_VIEW 0x82B5 +#define GL_TEXTURE_VIEW_MIN_LAYER 0x82DD +#define GL_TEXTURE_VIEW_MIN_LEVEL 0x82DB +#define GL_TEXTURE_VIEW_NUM_LAYERS 0x82DE +#define GL_TEXTURE_VIEW_NUM_LEVELS 0x82DC +#define GL_TEXTURE_WIDTH 0x1000 +#define GL_TEXTURE_WRAP_R 0x8072 +#define GL_TEXTURE_WRAP_S 0x2802 +#define GL_TEXTURE_WRAP_T 0x2803 +#define GL_TIMEOUT_EXPIRED 0x911B +#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFF +#define GL_TIMESTAMP 0x8E28 +#define GL_TIME_ELAPSED 0x88BF +#define GL_TOP_LEVEL_ARRAY_SIZE 0x930C +#define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D +#define GL_TRANSFORM_FEEDBACK 0x8E22 +#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 +#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800 +#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 +#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24 +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F +#define GL_TRANSFORM_FEEDBACK_BUFFER_INDEX 0x934B +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F +#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 +#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE 0x934C +#define GL_TRANSFORM_FEEDBACK_OVERFLOW 0x82EC +#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 +#define GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW 0x82ED +#define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4 +#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 +#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 +#define GL_TRIANGLES 0x0004 +#define GL_TRIANGLES_ADJACENCY 0x000C +#define GL_TRIANGLE_FAN 0x0006 +#define GL_TRIANGLE_STRIP 0x0005 +#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D +#define GL_TRUE 1 +#define GL_TYPE 0x92FA +#define GL_UNDEFINED_VERTEX 0x8260 +#define GL_UNIFORM 0x92E1 +#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C +#define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA +#define GL_UNIFORM_BARRIER_BIT 0x00000004 +#define GL_UNIFORM_BLOCK 0x92E2 +#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 +#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 +#define GL_UNIFORM_BLOCK_BINDING 0x8A3F +#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 +#define GL_UNIFORM_BLOCK_INDEX 0x8A3A +#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC +#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 +#define GL_UNIFORM_BUFFER 0x8A11 +#define GL_UNIFORM_BUFFER_BINDING 0x8A28 +#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 +#define GL_UNIFORM_BUFFER_SIZE 0x8A2A +#define GL_UNIFORM_BUFFER_START 0x8A29 +#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E +#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D +#define GL_UNIFORM_NAME_LENGTH 0x8A39 +#define GL_UNIFORM_OFFSET 0x8A3B +#define GL_UNIFORM_SIZE 0x8A38 +#define GL_UNIFORM_TYPE 0x8A37 +#define GL_UNKNOWN_CONTEXT_RESET 0x8255 +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129 +#define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128 +#define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A +#define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127 +#define GL_UNPACK_IMAGE_HEIGHT 0x806E +#define GL_UNPACK_LSB_FIRST 0x0CF1 +#define GL_UNPACK_ROW_LENGTH 0x0CF2 +#define GL_UNPACK_SKIP_IMAGES 0x806D +#define GL_UNPACK_SKIP_PIXELS 0x0CF4 +#define GL_UNPACK_SKIP_ROWS 0x0CF3 +#define GL_UNPACK_SWAP_BYTES 0x0CF0 +#define GL_UNSIGNALED 0x9118 +#define GL_UNSIGNED_BYTE 0x1401 +#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 +#define GL_UNSIGNED_BYTE_3_3_2 0x8032 +#define GL_UNSIGNED_INT 0x1405 +#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B +#define GL_UNSIGNED_INT_10_10_10_2 0x8036 +#define GL_UNSIGNED_INT_24_8 0x84FA +#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 +#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E +#define GL_UNSIGNED_INT_8_8_8_8 0x8035 +#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 +#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB +#define GL_UNSIGNED_INT_IMAGE_1D 0x9062 +#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068 +#define GL_UNSIGNED_INT_IMAGE_2D 0x9063 +#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069 +#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B +#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C +#define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065 +#define GL_UNSIGNED_INT_IMAGE_3D 0x9064 +#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067 +#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066 +#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A +#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1 +#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6 +#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 +#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 +#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A +#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D +#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5 +#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 +#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8 +#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 +#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F +#define GL_UNSIGNED_INT_VEC2 0x8DC6 +#define GL_UNSIGNED_INT_VEC3 0x8DC7 +#define GL_UNSIGNED_INT_VEC4 0x8DC8 +#define GL_UNSIGNED_NORMALIZED 0x8C17 +#define GL_UNSIGNED_SHORT 0x1403 +#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 +#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 +#define GL_UPPER_LEFT 0x8CA2 +#define GL_VALIDATE_STATUS 0x8B83 +#define GL_VENDOR 0x1F00 +#define GL_VERSION 0x1F02 +#define GL_VERTEX_ARRAY 0x8074 +#define GL_VERTEX_ARRAY_BINDING 0x85B5 +#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001 +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F +#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD +#define GL_VERTEX_ATTRIB_ARRAY_LONG 0x874E +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A +#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 +#define GL_VERTEX_ATTRIB_BINDING 0x82D4 +#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5 +#define GL_VERTEX_BINDING_BUFFER 0x8F4F +#define GL_VERTEX_BINDING_DIVISOR 0x82D6 +#define GL_VERTEX_BINDING_OFFSET 0x82D7 +#define GL_VERTEX_BINDING_STRIDE 0x82D8 +#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 +#define GL_VERTEX_SHADER 0x8B31 +#define GL_VERTEX_SHADER_BIT 0x00000001 +#define GL_VERTEX_SHADER_INVOCATIONS 0x82F0 +#define GL_VERTEX_SUBROUTINE 0x92E8 +#define GL_VERTEX_SUBROUTINE_UNIFORM 0x92EE +#define GL_VERTEX_TEXTURE 0x829B +#define GL_VERTICES_SUBMITTED 0x82EE +#define GL_VIEWPORT 0x0BA2 +#define GL_VIEWPORT_BOUNDS_RANGE 0x825D +#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F +#define GL_VIEWPORT_SUBPIXEL_BITS 0x825C +#define GL_VIEW_CLASS_128_BITS 0x82C4 +#define GL_VIEW_CLASS_16_BITS 0x82CA +#define GL_VIEW_CLASS_24_BITS 0x82C9 +#define GL_VIEW_CLASS_32_BITS 0x82C8 +#define GL_VIEW_CLASS_48_BITS 0x82C7 +#define GL_VIEW_CLASS_64_BITS 0x82C6 +#define GL_VIEW_CLASS_8_BITS 0x82CB +#define GL_VIEW_CLASS_96_BITS 0x82C5 +#define GL_VIEW_CLASS_BPTC_FLOAT 0x82D3 +#define GL_VIEW_CLASS_BPTC_UNORM 0x82D2 +#define GL_VIEW_CLASS_RGTC1_RED 0x82D0 +#define GL_VIEW_CLASS_RGTC2_RG 0x82D1 +#define GL_VIEW_CLASS_S3TC_DXT1_RGB 0x82CC +#define GL_VIEW_CLASS_S3TC_DXT1_RGBA 0x82CD +#define GL_VIEW_CLASS_S3TC_DXT3_RGBA 0x82CE +#define GL_VIEW_CLASS_S3TC_DXT5_RGBA 0x82CF +#define GL_VIEW_COMPATIBILITY_CLASS 0x82B6 +#define GL_WAIT_FAILED 0x911D +#define GL_WRITE_ONLY 0x88B9 +#define GL_XOR 0x1506 +#define GL_ZERO 0 +#define GL_ZERO_TO_ONE 0x935F + + +#ifndef __khrplatform_h_ +#define __khrplatform_h_ + +/* +** Copyright (c) 2008-2018 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are 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 Materials. +** +** THE MATERIALS ARE 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 +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +/* Khronos platform-specific types and definitions. + * + * The master copy of khrplatform.h is maintained in the Khronos EGL + * Registry repository at https://github.com/KhronosGroup/EGL-Registry + * The last semantic modification to khrplatform.h was at commit ID: + * 67a3e0864c2d75ea5287b9f3d2eb74a745936692 + * + * Adopters may modify this file to suit their platform. Adopters are + * encouraged to submit platform specific modifications to the Khronos + * group so that they can be included in future versions of this file. + * Please submit changes by filing pull requests or issues on + * the EGL Registry repository linked above. + * + * + * See the Implementer's Guidelines for information about where this file + * should be located on your system and for more details of its use: + * http://www.khronos.org/registry/implementers_guide.pdf + * + * This file should be included as + * #include + * by Khronos client API header files that use its types and defines. + * + * The types in khrplatform.h should only be used to define API-specific types. + * + * Types defined in khrplatform.h: + * khronos_int8_t signed 8 bit + * khronos_uint8_t unsigned 8 bit + * khronos_int16_t signed 16 bit + * khronos_uint16_t unsigned 16 bit + * khronos_int32_t signed 32 bit + * khronos_uint32_t unsigned 32 bit + * khronos_int64_t signed 64 bit + * khronos_uint64_t unsigned 64 bit + * khronos_intptr_t signed same number of bits as a pointer + * khronos_uintptr_t unsigned same number of bits as a pointer + * khronos_ssize_t signed size + * khronos_usize_t unsigned size + * khronos_float_t signed 32 bit floating point + * khronos_time_ns_t unsigned 64 bit time in nanoseconds + * khronos_utime_nanoseconds_t unsigned time interval or absolute time in + * nanoseconds + * khronos_stime_nanoseconds_t signed time interval in nanoseconds + * khronos_boolean_enum_t enumerated boolean type. This should + * only be used as a base type when a client API's boolean type is + * an enum. Client APIs which use an integer or other type for + * booleans cannot use this as the base type for their boolean. + * + * Tokens defined in khrplatform.h: + * + * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values. + * + * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0. + * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0. + * + * Calling convention macros defined in this file: + * KHRONOS_APICALL + * KHRONOS_GLAD_API_PTR + * KHRONOS_APIATTRIBUTES + * + * These may be used in function prototypes as: + * + * KHRONOS_APICALL void KHRONOS_GLAD_API_PTR funcname( + * int arg1, + * int arg2) KHRONOS_APIATTRIBUTES; + */ + +#if defined(__SCITECH_SNAP__) && !defined(KHRONOS_STATIC) +# define KHRONOS_STATIC 1 +#endif + +/*------------------------------------------------------------------------- + * Definition of KHRONOS_APICALL + *------------------------------------------------------------------------- + * This precedes the return type of the function in the function prototype. + */ +#if defined(KHRONOS_STATIC) + /* If the preprocessor constant KHRONOS_STATIC is defined, make the + * header compatible with static linking. */ +# define KHRONOS_APICALL +#elif defined(_WIN32) +# define KHRONOS_APICALL __declspec(dllimport) +#elif defined (__SYMBIAN32__) +# define KHRONOS_APICALL IMPORT_C +#elif defined(__ANDROID__) +# define KHRONOS_APICALL __attribute__((visibility("default"))) +#else +# define KHRONOS_APICALL +#endif + +/*------------------------------------------------------------------------- + * Definition of KHRONOS_GLAD_API_PTR + *------------------------------------------------------------------------- + * This follows the return type of the function and precedes the function + * name in the function prototype. + */ +#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) + /* Win32 but not WinCE */ +# define KHRONOS_GLAD_API_PTR __stdcall +#else +# define KHRONOS_GLAD_API_PTR +#endif + +/*------------------------------------------------------------------------- + * Definition of KHRONOS_APIATTRIBUTES + *------------------------------------------------------------------------- + * This follows the closing parenthesis of the function prototype arguments. + */ +#if defined (__ARMCC_2__) +#define KHRONOS_APIATTRIBUTES __softfp +#else +#define KHRONOS_APIATTRIBUTES +#endif + +/*------------------------------------------------------------------------- + * basic type definitions + *-----------------------------------------------------------------------*/ +#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__) + + +/* + * Using + */ +#include +typedef int32_t khronos_int32_t; +typedef uint32_t khronos_uint32_t; +typedef int64_t khronos_int64_t; +typedef uint64_t khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 +/* + * To support platform where unsigned long cannot be used interchangeably with + * inptr_t (e.g. CHERI-extended ISAs), we can use the stdint.h intptr_t. + * Ideally, we could just use (u)intptr_t everywhere, but this could result in + * ABI breakage if khronos_uintptr_t is changed from unsigned long to + * unsigned long long or similar (this results in different C++ name mangling). + * To avoid changes for existing platforms, we restrict usage of intptr_t to + * platforms where the size of a pointer is larger than the size of long. + */ +#if defined(__SIZEOF_LONG__) && defined(__SIZEOF_POINTER__) +#if __SIZEOF_POINTER__ > __SIZEOF_LONG__ +#define KHRONOS_USE_INTPTR_T +#endif +#endif + +#elif defined(__VMS ) || defined(__sgi) + +/* + * Using + */ +#include +typedef int32_t khronos_int32_t; +typedef uint32_t khronos_uint32_t; +typedef int64_t khronos_int64_t; +typedef uint64_t khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif defined(_WIN32) && !defined(__SCITECH_SNAP__) + +/* + * Win32 + */ +typedef __int32 khronos_int32_t; +typedef unsigned __int32 khronos_uint32_t; +typedef __int64 khronos_int64_t; +typedef unsigned __int64 khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif defined(__sun__) || defined(__digital__) + +/* + * Sun or Digital + */ +typedef int khronos_int32_t; +typedef unsigned int khronos_uint32_t; +#if defined(__arch64__) || defined(_LP64) +typedef long int khronos_int64_t; +typedef unsigned long int khronos_uint64_t; +#else +typedef long long int khronos_int64_t; +typedef unsigned long long int khronos_uint64_t; +#endif /* __arch64__ */ +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif 0 + +/* + * Hypothetical platform with no float or int64 support + */ +typedef int khronos_int32_t; +typedef unsigned int khronos_uint32_t; +#define KHRONOS_SUPPORT_INT64 0 +#define KHRONOS_SUPPORT_FLOAT 0 + +#else + +/* + * Generic fallback + */ +#include +typedef int32_t khronos_int32_t; +typedef uint32_t khronos_uint32_t; +typedef int64_t khronos_int64_t; +typedef uint64_t khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#endif + + +/* + * Types that are (so far) the same on all platforms + */ +typedef signed char khronos_int8_t; +typedef unsigned char khronos_uint8_t; +typedef signed short int khronos_int16_t; +typedef unsigned short int khronos_uint16_t; + +/* + * Types that differ between LLP64 and LP64 architectures - in LLP64, + * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears + * to be the only LLP64 architecture in current use. + */ +#ifdef KHRONOS_USE_INTPTR_T +typedef intptr_t khronos_intptr_t; +typedef uintptr_t khronos_uintptr_t; +#elif defined(_WIN64) +typedef signed long long int khronos_intptr_t; +typedef unsigned long long int khronos_uintptr_t; +#else +typedef signed long int khronos_intptr_t; +typedef unsigned long int khronos_uintptr_t; +#endif + +#if defined(_WIN64) +typedef signed long long int khronos_ssize_t; +typedef unsigned long long int khronos_usize_t; +#else +typedef signed long int khronos_ssize_t; +typedef unsigned long int khronos_usize_t; +#endif + +#if KHRONOS_SUPPORT_FLOAT +/* + * Float type + */ +typedef float khronos_float_t; +#endif + +#if KHRONOS_SUPPORT_INT64 +/* Time types + * + * These types can be used to represent a time interval in nanoseconds or + * an absolute Unadjusted System Time. Unadjusted System Time is the number + * of nanoseconds since some arbitrary system event (e.g. since the last + * time the system booted). The Unadjusted System Time is an unsigned + * 64 bit value that wraps back to 0 every 584 years. Time intervals + * may be either signed or unsigned. + */ +typedef khronos_uint64_t khronos_utime_nanoseconds_t; +typedef khronos_int64_t khronos_stime_nanoseconds_t; +#endif + +/* + * Dummy value used to pad enum types to 32 bits. + */ +#ifndef KHRONOS_MAX_ENUM +#define KHRONOS_MAX_ENUM 0x7FFFFFFF +#endif + +/* + * Enumerated boolean type + * + * Values other than zero should be considered to be true. Therefore + * comparisons should not be made against KHRONOS_TRUE. + */ +typedef enum { + KHRONOS_FALSE = 0, + KHRONOS_TRUE = 1, + KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM +} khronos_boolean_enum_t; + +#endif /* __khrplatform_h_ */ +typedef unsigned int GLenum; +typedef unsigned char GLboolean; +typedef unsigned int GLbitfield; +typedef void GLvoid; +typedef khronos_int8_t GLbyte; +typedef khronos_uint8_t GLubyte; +typedef khronos_int16_t GLshort; +typedef khronos_uint16_t GLushort; +typedef int GLint; +typedef unsigned int GLuint; +typedef khronos_int32_t GLclampx; +typedef int GLsizei; +typedef khronos_float_t GLfloat; +typedef khronos_float_t GLclampf; +typedef double GLdouble; +typedef double GLclampd; +typedef void *GLeglClientBufferEXT; +typedef void *GLeglImageOES; +typedef char GLchar; +typedef char GLcharARB; +#ifdef __APPLE__ +typedef void *GLhandleARB; +#else +typedef unsigned int GLhandleARB; +#endif +typedef khronos_uint16_t GLhalf; +typedef khronos_uint16_t GLhalfARB; +typedef khronos_int32_t GLfixed; +#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060) +typedef khronos_intptr_t GLintptr; +#else +typedef khronos_intptr_t GLintptr; +#endif +#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060) +typedef khronos_intptr_t GLintptrARB; +#else +typedef khronos_intptr_t GLintptrARB; +#endif +#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060) +typedef khronos_ssize_t GLsizeiptr; +#else +typedef khronos_ssize_t GLsizeiptr; +#endif +#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060) +typedef khronos_ssize_t GLsizeiptrARB; +#else +typedef khronos_ssize_t GLsizeiptrARB; +#endif +typedef khronos_int64_t GLint64; +typedef khronos_int64_t GLint64EXT; +typedef khronos_uint64_t GLuint64; +typedef khronos_uint64_t GLuint64EXT; +typedef struct __GLsync *GLsync; +struct _cl_context; +struct _cl_event; +typedef void (GLAD_API_PTR *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); +typedef void (GLAD_API_PTR *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); +typedef void (GLAD_API_PTR *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); +typedef void (GLAD_API_PTR *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam); +typedef unsigned short GLhalfNV; +typedef GLintptr GLvdpauSurfaceNV; +typedef void (GLAD_API_PTR *GLVULKANPROCNV)(void); + + +#define GL_VERSION_1_0 1 +#define GL_VERSION_1_1 1 +#define GL_VERSION_1_2 1 +#define GL_VERSION_1_3 1 +#define GL_VERSION_1_4 1 +#define GL_VERSION_1_5 1 +#define GL_VERSION_2_0 1 +#define GL_VERSION_2_1 1 +#define GL_VERSION_3_0 1 +#define GL_VERSION_3_1 1 +#define GL_VERSION_3_2 1 +#define GL_VERSION_3_3 1 +#define GL_VERSION_4_0 1 +#define GL_VERSION_4_1 1 +#define GL_VERSION_4_2 1 +#define GL_VERSION_4_3 1 +#define GL_VERSION_4_4 1 +#define GL_VERSION_4_5 1 +#define GL_VERSION_4_6 1 + + +typedef void (GLAD_API_PTR *PFNGLACTIVESHADERPROGRAMPROC)(GLuint pipeline, GLuint program); +typedef void (GLAD_API_PTR *PFNGLACTIVETEXTUREPROC)(GLenum texture); +typedef void (GLAD_API_PTR *PFNGLATTACHSHADERPROC)(GLuint program, GLuint shader); +typedef void (GLAD_API_PTR *PFNGLBEGINCONDITIONALRENDERPROC)(GLuint id, GLenum mode); +typedef void (GLAD_API_PTR *PFNGLBEGINQUERYPROC)(GLenum target, GLuint id); +typedef void (GLAD_API_PTR *PFNGLBEGINQUERYINDEXEDPROC)(GLenum target, GLuint index, GLuint id); +typedef void (GLAD_API_PTR *PFNGLBEGINTRANSFORMFEEDBACKPROC)(GLenum primitiveMode); +typedef void (GLAD_API_PTR *PFNGLBINDATTRIBLOCATIONPROC)(GLuint program, GLuint index, const GLchar * name); +typedef void (GLAD_API_PTR *PFNGLBINDBUFFERPROC)(GLenum target, GLuint buffer); +typedef void (GLAD_API_PTR *PFNGLBINDBUFFERBASEPROC)(GLenum target, GLuint index, GLuint buffer); +typedef void (GLAD_API_PTR *PFNGLBINDBUFFERRANGEPROC)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (GLAD_API_PTR *PFNGLBINDBUFFERSBASEPROC)(GLenum target, GLuint first, GLsizei count, const GLuint * buffers); +typedef void (GLAD_API_PTR *PFNGLBINDBUFFERSRANGEPROC)(GLenum target, GLuint first, GLsizei count, const GLuint * buffers, const GLintptr * offsets, const GLsizeiptr * sizes); +typedef void (GLAD_API_PTR *PFNGLBINDFRAGDATALOCATIONPROC)(GLuint program, GLuint color, const GLchar * name); +typedef void (GLAD_API_PTR *PFNGLBINDFRAGDATALOCATIONINDEXEDPROC)(GLuint program, GLuint colorNumber, GLuint index, const GLchar * name); +typedef void (GLAD_API_PTR *PFNGLBINDFRAMEBUFFERPROC)(GLenum target, GLuint framebuffer); +typedef void (GLAD_API_PTR *PFNGLBINDIMAGETEXTUREPROC)(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); +typedef void (GLAD_API_PTR *PFNGLBINDIMAGETEXTURESPROC)(GLuint first, GLsizei count, const GLuint * textures); +typedef void (GLAD_API_PTR *PFNGLBINDPROGRAMPIPELINEPROC)(GLuint pipeline); +typedef void (GLAD_API_PTR *PFNGLBINDRENDERBUFFERPROC)(GLenum target, GLuint renderbuffer); +typedef void (GLAD_API_PTR *PFNGLBINDSAMPLERPROC)(GLuint unit, GLuint sampler); +typedef void (GLAD_API_PTR *PFNGLBINDSAMPLERSPROC)(GLuint first, GLsizei count, const GLuint * samplers); +typedef void (GLAD_API_PTR *PFNGLBINDTEXTUREPROC)(GLenum target, GLuint texture); +typedef void (GLAD_API_PTR *PFNGLBINDTEXTUREUNITPROC)(GLuint unit, GLuint texture); +typedef void (GLAD_API_PTR *PFNGLBINDTEXTURESPROC)(GLuint first, GLsizei count, const GLuint * textures); +typedef void (GLAD_API_PTR *PFNGLBINDTRANSFORMFEEDBACKPROC)(GLenum target, GLuint id); +typedef void (GLAD_API_PTR *PFNGLBINDVERTEXARRAYPROC)(GLuint array); +typedef void (GLAD_API_PTR *PFNGLBINDVERTEXBUFFERPROC)(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +typedef void (GLAD_API_PTR *PFNGLBINDVERTEXBUFFERSPROC)(GLuint first, GLsizei count, const GLuint * buffers, const GLintptr * offsets, const GLsizei * strides); +typedef void (GLAD_API_PTR *PFNGLBLENDCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +typedef void (GLAD_API_PTR *PFNGLBLENDEQUATIONPROC)(GLenum mode); +typedef void (GLAD_API_PTR *PFNGLBLENDEQUATIONSEPARATEPROC)(GLenum modeRGB, GLenum modeAlpha); +typedef void (GLAD_API_PTR *PFNGLBLENDEQUATIONSEPARATEIPROC)(GLuint buf, GLenum modeRGB, GLenum modeAlpha); +typedef void (GLAD_API_PTR *PFNGLBLENDEQUATIONIPROC)(GLuint buf, GLenum mode); +typedef void (GLAD_API_PTR *PFNGLBLENDFUNCPROC)(GLenum sfactor, GLenum dfactor); +typedef void (GLAD_API_PTR *PFNGLBLENDFUNCSEPARATEPROC)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +typedef void (GLAD_API_PTR *PFNGLBLENDFUNCSEPARATEIPROC)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +typedef void (GLAD_API_PTR *PFNGLBLENDFUNCIPROC)(GLuint buf, GLenum src, GLenum dst); +typedef void (GLAD_API_PTR *PFNGLBLITFRAMEBUFFERPROC)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +typedef void (GLAD_API_PTR *PFNGLBLITNAMEDFRAMEBUFFERPROC)(GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +typedef void (GLAD_API_PTR *PFNGLBUFFERDATAPROC)(GLenum target, GLsizeiptr size, const void * data, GLenum usage); +typedef void (GLAD_API_PTR *PFNGLBUFFERSTORAGEPROC)(GLenum target, GLsizeiptr size, const void * data, GLbitfield flags); +typedef void (GLAD_API_PTR *PFNGLBUFFERSUBDATAPROC)(GLenum target, GLintptr offset, GLsizeiptr size, const void * data); +typedef GLenum (GLAD_API_PTR *PFNGLCHECKFRAMEBUFFERSTATUSPROC)(GLenum target); +typedef GLenum (GLAD_API_PTR *PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC)(GLuint framebuffer, GLenum target); +typedef void (GLAD_API_PTR *PFNGLCLAMPCOLORPROC)(GLenum target, GLenum clamp); +typedef void (GLAD_API_PTR *PFNGLCLEARPROC)(GLbitfield mask); +typedef void (GLAD_API_PTR *PFNGLCLEARBUFFERDATAPROC)(GLenum target, GLenum internalformat, GLenum format, GLenum type, const void * data); +typedef void (GLAD_API_PTR *PFNGLCLEARBUFFERSUBDATAPROC)(GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void * data); +typedef void (GLAD_API_PTR *PFNGLCLEARBUFFERFIPROC)(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +typedef void (GLAD_API_PTR *PFNGLCLEARBUFFERFVPROC)(GLenum buffer, GLint drawbuffer, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLCLEARBUFFERIVPROC)(GLenum buffer, GLint drawbuffer, const GLint * value); +typedef void (GLAD_API_PTR *PFNGLCLEARBUFFERUIVPROC)(GLenum buffer, GLint drawbuffer, const GLuint * value); +typedef void (GLAD_API_PTR *PFNGLCLEARCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +typedef void (GLAD_API_PTR *PFNGLCLEARDEPTHPROC)(GLdouble depth); +typedef void (GLAD_API_PTR *PFNGLCLEARDEPTHFPROC)(GLfloat d); +typedef void (GLAD_API_PTR *PFNGLCLEARNAMEDBUFFERDATAPROC)(GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void * data); +typedef void (GLAD_API_PTR *PFNGLCLEARNAMEDBUFFERSUBDATAPROC)(GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void * data); +typedef void (GLAD_API_PTR *PFNGLCLEARNAMEDFRAMEBUFFERFIPROC)(GLuint framebuffer, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +typedef void (GLAD_API_PTR *PFNGLCLEARNAMEDFRAMEBUFFERFVPROC)(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLCLEARNAMEDFRAMEBUFFERIVPROC)(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint * value); +typedef void (GLAD_API_PTR *PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC)(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint * value); +typedef void (GLAD_API_PTR *PFNGLCLEARSTENCILPROC)(GLint s); +typedef void (GLAD_API_PTR *PFNGLCLEARTEXIMAGEPROC)(GLuint texture, GLint level, GLenum format, GLenum type, const void * data); +typedef void (GLAD_API_PTR *PFNGLCLEARTEXSUBIMAGEPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); +typedef GLenum (GLAD_API_PTR *PFNGLCLIENTWAITSYNCPROC)(GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void (GLAD_API_PTR *PFNGLCLIPCONTROLPROC)(GLenum origin, GLenum depth); +typedef void (GLAD_API_PTR *PFNGLCOLORMASKPROC)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +typedef void (GLAD_API_PTR *PFNGLCOLORMASKIPROC)(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +typedef void (GLAD_API_PTR *PFNGLCOMPILESHADERPROC)(GLuint shader); +typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXIMAGE1DPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void * data); +typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXIMAGE2DPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void * data); +typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXIMAGE3DPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void * data); +typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void * data); +typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void * data); +typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * data); +typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC)(GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void * data); +typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void * data); +typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * data); +typedef void (GLAD_API_PTR *PFNGLCOPYBUFFERSUBDATAPROC)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +typedef void (GLAD_API_PTR *PFNGLCOPYIMAGESUBDATAPROC)(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); +typedef void (GLAD_API_PTR *PFNGLCOPYNAMEDBUFFERSUBDATAPROC)(GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +typedef void (GLAD_API_PTR *PFNGLCOPYTEXIMAGE1DPROC)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void (GLAD_API_PTR *PFNGLCOPYTEXIMAGE2DPROC)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (GLAD_API_PTR *PFNGLCOPYTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (GLAD_API_PTR *PFNGLCOPYTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (GLAD_API_PTR *PFNGLCOPYTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (GLAD_API_PTR *PFNGLCOPYTEXTURESUBIMAGE1DPROC)(GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (GLAD_API_PTR *PFNGLCOPYTEXTURESUBIMAGE2DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (GLAD_API_PTR *PFNGLCOPYTEXTURESUBIMAGE3DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (GLAD_API_PTR *PFNGLCREATEBUFFERSPROC)(GLsizei n, GLuint * buffers); +typedef void (GLAD_API_PTR *PFNGLCREATEFRAMEBUFFERSPROC)(GLsizei n, GLuint * framebuffers); +typedef GLuint (GLAD_API_PTR *PFNGLCREATEPROGRAMPROC)(void); +typedef void (GLAD_API_PTR *PFNGLCREATEPROGRAMPIPELINESPROC)(GLsizei n, GLuint * pipelines); +typedef void (GLAD_API_PTR *PFNGLCREATEQUERIESPROC)(GLenum target, GLsizei n, GLuint * ids); +typedef void (GLAD_API_PTR *PFNGLCREATERENDERBUFFERSPROC)(GLsizei n, GLuint * renderbuffers); +typedef void (GLAD_API_PTR *PFNGLCREATESAMPLERSPROC)(GLsizei n, GLuint * samplers); +typedef GLuint (GLAD_API_PTR *PFNGLCREATESHADERPROC)(GLenum type); +typedef GLuint (GLAD_API_PTR *PFNGLCREATESHADERPROGRAMVPROC)(GLenum type, GLsizei count, const GLchar *const* strings); +typedef void (GLAD_API_PTR *PFNGLCREATETEXTURESPROC)(GLenum target, GLsizei n, GLuint * textures); +typedef void (GLAD_API_PTR *PFNGLCREATETRANSFORMFEEDBACKSPROC)(GLsizei n, GLuint * ids); +typedef void (GLAD_API_PTR *PFNGLCREATEVERTEXARRAYSPROC)(GLsizei n, GLuint * arrays); +typedef void (GLAD_API_PTR *PFNGLCULLFACEPROC)(GLenum mode); +typedef void (GLAD_API_PTR *PFNGLDEBUGMESSAGECALLBACKPROC)(GLDEBUGPROC callback, const void * userParam); +typedef void (GLAD_API_PTR *PFNGLDEBUGMESSAGECONTROLPROC)(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled); +typedef void (GLAD_API_PTR *PFNGLDEBUGMESSAGEINSERTPROC)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf); +typedef void (GLAD_API_PTR *PFNGLDELETEBUFFERSPROC)(GLsizei n, const GLuint * buffers); +typedef void (GLAD_API_PTR *PFNGLDELETEFRAMEBUFFERSPROC)(GLsizei n, const GLuint * framebuffers); +typedef void (GLAD_API_PTR *PFNGLDELETEPROGRAMPROC)(GLuint program); +typedef void (GLAD_API_PTR *PFNGLDELETEPROGRAMPIPELINESPROC)(GLsizei n, const GLuint * pipelines); +typedef void (GLAD_API_PTR *PFNGLDELETEQUERIESPROC)(GLsizei n, const GLuint * ids); +typedef void (GLAD_API_PTR *PFNGLDELETERENDERBUFFERSPROC)(GLsizei n, const GLuint * renderbuffers); +typedef void (GLAD_API_PTR *PFNGLDELETESAMPLERSPROC)(GLsizei count, const GLuint * samplers); +typedef void (GLAD_API_PTR *PFNGLDELETESHADERPROC)(GLuint shader); +typedef void (GLAD_API_PTR *PFNGLDELETESYNCPROC)(GLsync sync); +typedef void (GLAD_API_PTR *PFNGLDELETETEXTURESPROC)(GLsizei n, const GLuint * textures); +typedef void (GLAD_API_PTR *PFNGLDELETETRANSFORMFEEDBACKSPROC)(GLsizei n, const GLuint * ids); +typedef void (GLAD_API_PTR *PFNGLDELETEVERTEXARRAYSPROC)(GLsizei n, const GLuint * arrays); +typedef void (GLAD_API_PTR *PFNGLDEPTHFUNCPROC)(GLenum func); +typedef void (GLAD_API_PTR *PFNGLDEPTHMASKPROC)(GLboolean flag); +typedef void (GLAD_API_PTR *PFNGLDEPTHRANGEPROC)(GLdouble n, GLdouble f); +typedef void (GLAD_API_PTR *PFNGLDEPTHRANGEARRAYVPROC)(GLuint first, GLsizei count, const GLdouble * v); +typedef void (GLAD_API_PTR *PFNGLDEPTHRANGEINDEXEDPROC)(GLuint index, GLdouble n, GLdouble f); +typedef void (GLAD_API_PTR *PFNGLDEPTHRANGEFPROC)(GLfloat n, GLfloat f); +typedef void (GLAD_API_PTR *PFNGLDETACHSHADERPROC)(GLuint program, GLuint shader); +typedef void (GLAD_API_PTR *PFNGLDISABLEPROC)(GLenum cap); +typedef void (GLAD_API_PTR *PFNGLDISABLEVERTEXARRAYATTRIBPROC)(GLuint vaobj, GLuint index); +typedef void (GLAD_API_PTR *PFNGLDISABLEVERTEXATTRIBARRAYPROC)(GLuint index); +typedef void (GLAD_API_PTR *PFNGLDISABLEIPROC)(GLenum target, GLuint index); +typedef void (GLAD_API_PTR *PFNGLDISPATCHCOMPUTEPROC)(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); +typedef void (GLAD_API_PTR *PFNGLDISPATCHCOMPUTEINDIRECTPROC)(GLintptr indirect); +typedef void (GLAD_API_PTR *PFNGLDRAWARRAYSPROC)(GLenum mode, GLint first, GLsizei count); +typedef void (GLAD_API_PTR *PFNGLDRAWARRAYSINDIRECTPROC)(GLenum mode, const void * indirect); +typedef void (GLAD_API_PTR *PFNGLDRAWARRAYSINSTANCEDPROC)(GLenum mode, GLint first, GLsizei count, GLsizei instancecount); +typedef void (GLAD_API_PTR *PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC)(GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); +typedef void (GLAD_API_PTR *PFNGLDRAWBUFFERPROC)(GLenum buf); +typedef void (GLAD_API_PTR *PFNGLDRAWBUFFERSPROC)(GLsizei n, const GLenum * bufs); +typedef void (GLAD_API_PTR *PFNGLDRAWELEMENTSPROC)(GLenum mode, GLsizei count, GLenum type, const void * indices); +typedef void (GLAD_API_PTR *PFNGLDRAWELEMENTSBASEVERTEXPROC)(GLenum mode, GLsizei count, GLenum type, const void * indices, GLint basevertex); +typedef void (GLAD_API_PTR *PFNGLDRAWELEMENTSINDIRECTPROC)(GLenum mode, GLenum type, const void * indirect); +typedef void (GLAD_API_PTR *PFNGLDRAWELEMENTSINSTANCEDPROC)(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount); +typedef void (GLAD_API_PTR *PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC)(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount, GLuint baseinstance); +typedef void (GLAD_API_PTR *PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC)(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount, GLint basevertex); +typedef void (GLAD_API_PTR *PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC)(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance); +typedef void (GLAD_API_PTR *PFNGLDRAWRANGEELEMENTSPROC)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void * indices); +typedef void (GLAD_API_PTR *PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void * indices, GLint basevertex); +typedef void (GLAD_API_PTR *PFNGLDRAWTRANSFORMFEEDBACKPROC)(GLenum mode, GLuint id); +typedef void (GLAD_API_PTR *PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC)(GLenum mode, GLuint id, GLsizei instancecount); +typedef void (GLAD_API_PTR *PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC)(GLenum mode, GLuint id, GLuint stream); +typedef void (GLAD_API_PTR *PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC)(GLenum mode, GLuint id, GLuint stream, GLsizei instancecount); +typedef void (GLAD_API_PTR *PFNGLENABLEPROC)(GLenum cap); +typedef void (GLAD_API_PTR *PFNGLENABLEVERTEXARRAYATTRIBPROC)(GLuint vaobj, GLuint index); +typedef void (GLAD_API_PTR *PFNGLENABLEVERTEXATTRIBARRAYPROC)(GLuint index); +typedef void (GLAD_API_PTR *PFNGLENABLEIPROC)(GLenum target, GLuint index); +typedef void (GLAD_API_PTR *PFNGLENDCONDITIONALRENDERPROC)(void); +typedef void (GLAD_API_PTR *PFNGLENDQUERYPROC)(GLenum target); +typedef void (GLAD_API_PTR *PFNGLENDQUERYINDEXEDPROC)(GLenum target, GLuint index); +typedef void (GLAD_API_PTR *PFNGLENDTRANSFORMFEEDBACKPROC)(void); +typedef GLsync (GLAD_API_PTR *PFNGLFENCESYNCPROC)(GLenum condition, GLbitfield flags); +typedef void (GLAD_API_PTR *PFNGLFINISHPROC)(void); +typedef void (GLAD_API_PTR *PFNGLFLUSHPROC)(void); +typedef void (GLAD_API_PTR *PFNGLFLUSHMAPPEDBUFFERRANGEPROC)(GLenum target, GLintptr offset, GLsizeiptr length); +typedef void (GLAD_API_PTR *PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC)(GLuint buffer, GLintptr offset, GLsizeiptr length); +typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERPARAMETERIPROC)(GLenum target, GLenum pname, GLint param); +typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERRENDERBUFFERPROC)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTUREPROC)(GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURE1DPROC)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURE2DPROC)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURE3DPROC)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURELAYERPROC)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void (GLAD_API_PTR *PFNGLFRONTFACEPROC)(GLenum mode); +typedef void (GLAD_API_PTR *PFNGLGENBUFFERSPROC)(GLsizei n, GLuint * buffers); +typedef void (GLAD_API_PTR *PFNGLGENFRAMEBUFFERSPROC)(GLsizei n, GLuint * framebuffers); +typedef void (GLAD_API_PTR *PFNGLGENPROGRAMPIPELINESPROC)(GLsizei n, GLuint * pipelines); +typedef void (GLAD_API_PTR *PFNGLGENQUERIESPROC)(GLsizei n, GLuint * ids); +typedef void (GLAD_API_PTR *PFNGLGENRENDERBUFFERSPROC)(GLsizei n, GLuint * renderbuffers); +typedef void (GLAD_API_PTR *PFNGLGENSAMPLERSPROC)(GLsizei count, GLuint * samplers); +typedef void (GLAD_API_PTR *PFNGLGENTEXTURESPROC)(GLsizei n, GLuint * textures); +typedef void (GLAD_API_PTR *PFNGLGENTRANSFORMFEEDBACKSPROC)(GLsizei n, GLuint * ids); +typedef void (GLAD_API_PTR *PFNGLGENVERTEXARRAYSPROC)(GLsizei n, GLuint * arrays); +typedef void (GLAD_API_PTR *PFNGLGENERATEMIPMAPPROC)(GLenum target); +typedef void (GLAD_API_PTR *PFNGLGENERATETEXTUREMIPMAPPROC)(GLuint texture); +typedef void (GLAD_API_PTR *PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC)(GLuint program, GLuint bufferIndex, GLenum pname, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETACTIVEATTRIBPROC)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name); +typedef void (GLAD_API_PTR *PFNGLGETACTIVESUBROUTINENAMEPROC)(GLuint program, GLenum shadertype, GLuint index, GLsizei bufSize, GLsizei * length, GLchar * name); +typedef void (GLAD_API_PTR *PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC)(GLuint program, GLenum shadertype, GLuint index, GLsizei bufSize, GLsizei * length, GLchar * name); +typedef void (GLAD_API_PTR *PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC)(GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint * values); +typedef void (GLAD_API_PTR *PFNGLGETACTIVEUNIFORMPROC)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name); +typedef void (GLAD_API_PTR *PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC)(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei * length, GLchar * uniformBlockName); +typedef void (GLAD_API_PTR *PFNGLGETACTIVEUNIFORMBLOCKIVPROC)(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETACTIVEUNIFORMNAMEPROC)(GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei * length, GLchar * uniformName); +typedef void (GLAD_API_PTR *PFNGLGETACTIVEUNIFORMSIVPROC)(GLuint program, GLsizei uniformCount, const GLuint * uniformIndices, GLenum pname, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETATTACHEDSHADERSPROC)(GLuint program, GLsizei maxCount, GLsizei * count, GLuint * shaders); +typedef GLint (GLAD_API_PTR *PFNGLGETATTRIBLOCATIONPROC)(GLuint program, const GLchar * name); +typedef void (GLAD_API_PTR *PFNGLGETBOOLEANI_VPROC)(GLenum target, GLuint index, GLboolean * data); +typedef void (GLAD_API_PTR *PFNGLGETBOOLEANVPROC)(GLenum pname, GLboolean * data); +typedef void (GLAD_API_PTR *PFNGLGETBUFFERPARAMETERI64VPROC)(GLenum target, GLenum pname, GLint64 * params); +typedef void (GLAD_API_PTR *PFNGLGETBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETBUFFERPOINTERVPROC)(GLenum target, GLenum pname, void ** params); +typedef void (GLAD_API_PTR *PFNGLGETBUFFERSUBDATAPROC)(GLenum target, GLintptr offset, GLsizeiptr size, void * data); +typedef void (GLAD_API_PTR *PFNGLGETCOMPRESSEDTEXIMAGEPROC)(GLenum target, GLint level, void * img); +typedef void (GLAD_API_PTR *PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC)(GLuint texture, GLint level, GLsizei bufSize, void * pixels); +typedef void (GLAD_API_PTR *PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void * pixels); +typedef GLuint (GLAD_API_PTR *PFNGLGETDEBUGMESSAGELOGPROC)(GLuint count, GLsizei bufSize, GLenum * sources, GLenum * types, GLuint * ids, GLenum * severities, GLsizei * lengths, GLchar * messageLog); +typedef void (GLAD_API_PTR *PFNGLGETDOUBLEI_VPROC)(GLenum target, GLuint index, GLdouble * data); +typedef void (GLAD_API_PTR *PFNGLGETDOUBLEVPROC)(GLenum pname, GLdouble * data); +typedef GLenum (GLAD_API_PTR *PFNGLGETERRORPROC)(void); +typedef void (GLAD_API_PTR *PFNGLGETFLOATI_VPROC)(GLenum target, GLuint index, GLfloat * data); +typedef void (GLAD_API_PTR *PFNGLGETFLOATVPROC)(GLenum pname, GLfloat * data); +typedef GLint (GLAD_API_PTR *PFNGLGETFRAGDATAINDEXPROC)(GLuint program, const GLchar * name); +typedef GLint (GLAD_API_PTR *PFNGLGETFRAGDATALOCATIONPROC)(GLuint program, const GLchar * name); +typedef void (GLAD_API_PTR *PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)(GLenum target, GLenum attachment, GLenum pname, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETFRAMEBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint * params); +typedef GLenum (GLAD_API_PTR *PFNGLGETGRAPHICSRESETSTATUSPROC)(void); +typedef void (GLAD_API_PTR *PFNGLGETINTEGER64I_VPROC)(GLenum target, GLuint index, GLint64 * data); +typedef void (GLAD_API_PTR *PFNGLGETINTEGER64VPROC)(GLenum pname, GLint64 * data); +typedef void (GLAD_API_PTR *PFNGLGETINTEGERI_VPROC)(GLenum target, GLuint index, GLint * data); +typedef void (GLAD_API_PTR *PFNGLGETINTEGERVPROC)(GLenum pname, GLint * data); +typedef void (GLAD_API_PTR *PFNGLGETINTERNALFORMATI64VPROC)(GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint64 * params); +typedef void (GLAD_API_PTR *PFNGLGETINTERNALFORMATIVPROC)(GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETMULTISAMPLEFVPROC)(GLenum pname, GLuint index, GLfloat * val); +typedef void (GLAD_API_PTR *PFNGLGETNAMEDBUFFERPARAMETERI64VPROC)(GLuint buffer, GLenum pname, GLint64 * params); +typedef void (GLAD_API_PTR *PFNGLGETNAMEDBUFFERPARAMETERIVPROC)(GLuint buffer, GLenum pname, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETNAMEDBUFFERPOINTERVPROC)(GLuint buffer, GLenum pname, void ** params); +typedef void (GLAD_API_PTR *PFNGLGETNAMEDBUFFERSUBDATAPROC)(GLuint buffer, GLintptr offset, GLsizeiptr size, void * data); +typedef void (GLAD_API_PTR *PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC)(GLuint framebuffer, GLenum attachment, GLenum pname, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC)(GLuint framebuffer, GLenum pname, GLint * param); +typedef void (GLAD_API_PTR *PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC)(GLuint renderbuffer, GLenum pname, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETOBJECTLABELPROC)(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei * length, GLchar * label); +typedef void (GLAD_API_PTR *PFNGLGETOBJECTPTRLABELPROC)(const void * ptr, GLsizei bufSize, GLsizei * length, GLchar * label); +typedef void (GLAD_API_PTR *PFNGLGETPOINTERVPROC)(GLenum pname, void ** params); +typedef void (GLAD_API_PTR *PFNGLGETPROGRAMBINARYPROC)(GLuint program, GLsizei bufSize, GLsizei * length, GLenum * binaryFormat, void * binary); +typedef void (GLAD_API_PTR *PFNGLGETPROGRAMINFOLOGPROC)(GLuint program, GLsizei bufSize, GLsizei * length, GLchar * infoLog); +typedef void (GLAD_API_PTR *PFNGLGETPROGRAMINTERFACEIVPROC)(GLuint program, GLenum programInterface, GLenum pname, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETPROGRAMPIPELINEINFOLOGPROC)(GLuint pipeline, GLsizei bufSize, GLsizei * length, GLchar * infoLog); +typedef void (GLAD_API_PTR *PFNGLGETPROGRAMPIPELINEIVPROC)(GLuint pipeline, GLenum pname, GLint * params); +typedef GLuint (GLAD_API_PTR *PFNGLGETPROGRAMRESOURCEINDEXPROC)(GLuint program, GLenum programInterface, const GLchar * name); +typedef GLint (GLAD_API_PTR *PFNGLGETPROGRAMRESOURCELOCATIONPROC)(GLuint program, GLenum programInterface, const GLchar * name); +typedef GLint (GLAD_API_PTR *PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC)(GLuint program, GLenum programInterface, const GLchar * name); +typedef void (GLAD_API_PTR *PFNGLGETPROGRAMRESOURCENAMEPROC)(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei * length, GLchar * name); +typedef void (GLAD_API_PTR *PFNGLGETPROGRAMRESOURCEIVPROC)(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum * props, GLsizei count, GLsizei * length, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETPROGRAMSTAGEIVPROC)(GLuint program, GLenum shadertype, GLenum pname, GLint * values); +typedef void (GLAD_API_PTR *PFNGLGETPROGRAMIVPROC)(GLuint program, GLenum pname, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETQUERYBUFFEROBJECTI64VPROC)(GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +typedef void (GLAD_API_PTR *PFNGLGETQUERYBUFFEROBJECTIVPROC)(GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +typedef void (GLAD_API_PTR *PFNGLGETQUERYBUFFEROBJECTUI64VPROC)(GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +typedef void (GLAD_API_PTR *PFNGLGETQUERYBUFFEROBJECTUIVPROC)(GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +typedef void (GLAD_API_PTR *PFNGLGETQUERYINDEXEDIVPROC)(GLenum target, GLuint index, GLenum pname, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETQUERYOBJECTI64VPROC)(GLuint id, GLenum pname, GLint64 * params); +typedef void (GLAD_API_PTR *PFNGLGETQUERYOBJECTIVPROC)(GLuint id, GLenum pname, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETQUERYOBJECTUI64VPROC)(GLuint id, GLenum pname, GLuint64 * params); +typedef void (GLAD_API_PTR *PFNGLGETQUERYOBJECTUIVPROC)(GLuint id, GLenum pname, GLuint * params); +typedef void (GLAD_API_PTR *PFNGLGETQUERYIVPROC)(GLenum target, GLenum pname, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETRENDERBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERIIVPROC)(GLuint sampler, GLenum pname, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERIUIVPROC)(GLuint sampler, GLenum pname, GLuint * params); +typedef void (GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERFVPROC)(GLuint sampler, GLenum pname, GLfloat * params); +typedef void (GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERIVPROC)(GLuint sampler, GLenum pname, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETSHADERINFOLOGPROC)(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * infoLog); +typedef void (GLAD_API_PTR *PFNGLGETSHADERPRECISIONFORMATPROC)(GLenum shadertype, GLenum precisiontype, GLint * range, GLint * precision); +typedef void (GLAD_API_PTR *PFNGLGETSHADERSOURCEPROC)(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * source); +typedef void (GLAD_API_PTR *PFNGLGETSHADERIVPROC)(GLuint shader, GLenum pname, GLint * params); +typedef const GLubyte * (GLAD_API_PTR *PFNGLGETSTRINGPROC)(GLenum name); +typedef const GLubyte * (GLAD_API_PTR *PFNGLGETSTRINGIPROC)(GLenum name, GLuint index); +typedef GLuint (GLAD_API_PTR *PFNGLGETSUBROUTINEINDEXPROC)(GLuint program, GLenum shadertype, const GLchar * name); +typedef GLint (GLAD_API_PTR *PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC)(GLuint program, GLenum shadertype, const GLchar * name); +typedef void (GLAD_API_PTR *PFNGLGETSYNCIVPROC)(GLsync sync, GLenum pname, GLsizei count, GLsizei * length, GLint * values); +typedef void (GLAD_API_PTR *PFNGLGETTEXIMAGEPROC)(GLenum target, GLint level, GLenum format, GLenum type, void * pixels); +typedef void (GLAD_API_PTR *PFNGLGETTEXLEVELPARAMETERFVPROC)(GLenum target, GLint level, GLenum pname, GLfloat * params); +typedef void (GLAD_API_PTR *PFNGLGETTEXLEVELPARAMETERIVPROC)(GLenum target, GLint level, GLenum pname, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETTEXPARAMETERIIVPROC)(GLenum target, GLenum pname, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETTEXPARAMETERIUIVPROC)(GLenum target, GLenum pname, GLuint * params); +typedef void (GLAD_API_PTR *PFNGLGETTEXPARAMETERFVPROC)(GLenum target, GLenum pname, GLfloat * params); +typedef void (GLAD_API_PTR *PFNGLGETTEXPARAMETERIVPROC)(GLenum target, GLenum pname, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETTEXTUREIMAGEPROC)(GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void * pixels); +typedef void (GLAD_API_PTR *PFNGLGETTEXTURELEVELPARAMETERFVPROC)(GLuint texture, GLint level, GLenum pname, GLfloat * params); +typedef void (GLAD_API_PTR *PFNGLGETTEXTURELEVELPARAMETERIVPROC)(GLuint texture, GLint level, GLenum pname, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETTEXTUREPARAMETERIIVPROC)(GLuint texture, GLenum pname, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETTEXTUREPARAMETERIUIVPROC)(GLuint texture, GLenum pname, GLuint * params); +typedef void (GLAD_API_PTR *PFNGLGETTEXTUREPARAMETERFVPROC)(GLuint texture, GLenum pname, GLfloat * params); +typedef void (GLAD_API_PTR *PFNGLGETTEXTUREPARAMETERIVPROC)(GLuint texture, GLenum pname, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETTEXTURESUBIMAGEPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void * pixels); +typedef void (GLAD_API_PTR *PFNGLGETTRANSFORMFEEDBACKVARYINGPROC)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name); +typedef void (GLAD_API_PTR *PFNGLGETTRANSFORMFEEDBACKI64_VPROC)(GLuint xfb, GLenum pname, GLuint index, GLint64 * param); +typedef void (GLAD_API_PTR *PFNGLGETTRANSFORMFEEDBACKI_VPROC)(GLuint xfb, GLenum pname, GLuint index, GLint * param); +typedef void (GLAD_API_PTR *PFNGLGETTRANSFORMFEEDBACKIVPROC)(GLuint xfb, GLenum pname, GLint * param); +typedef GLuint (GLAD_API_PTR *PFNGLGETUNIFORMBLOCKINDEXPROC)(GLuint program, const GLchar * uniformBlockName); +typedef void (GLAD_API_PTR *PFNGLGETUNIFORMINDICESPROC)(GLuint program, GLsizei uniformCount, const GLchar *const* uniformNames, GLuint * uniformIndices); +typedef GLint (GLAD_API_PTR *PFNGLGETUNIFORMLOCATIONPROC)(GLuint program, const GLchar * name); +typedef void (GLAD_API_PTR *PFNGLGETUNIFORMSUBROUTINEUIVPROC)(GLenum shadertype, GLint location, GLuint * params); +typedef void (GLAD_API_PTR *PFNGLGETUNIFORMDVPROC)(GLuint program, GLint location, GLdouble * params); +typedef void (GLAD_API_PTR *PFNGLGETUNIFORMFVPROC)(GLuint program, GLint location, GLfloat * params); +typedef void (GLAD_API_PTR *PFNGLGETUNIFORMIVPROC)(GLuint program, GLint location, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETUNIFORMUIVPROC)(GLuint program, GLint location, GLuint * params); +typedef void (GLAD_API_PTR *PFNGLGETVERTEXARRAYINDEXED64IVPROC)(GLuint vaobj, GLuint index, GLenum pname, GLint64 * param); +typedef void (GLAD_API_PTR *PFNGLGETVERTEXARRAYINDEXEDIVPROC)(GLuint vaobj, GLuint index, GLenum pname, GLint * param); +typedef void (GLAD_API_PTR *PFNGLGETVERTEXARRAYIVPROC)(GLuint vaobj, GLenum pname, GLint * param); +typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBIIVPROC)(GLuint index, GLenum pname, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBIUIVPROC)(GLuint index, GLenum pname, GLuint * params); +typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBLDVPROC)(GLuint index, GLenum pname, GLdouble * params); +typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBPOINTERVPROC)(GLuint index, GLenum pname, void ** pointer); +typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBDVPROC)(GLuint index, GLenum pname, GLdouble * params); +typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBFVPROC)(GLuint index, GLenum pname, GLfloat * params); +typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBIVPROC)(GLuint index, GLenum pname, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETNCOMPRESSEDTEXIMAGEPROC)(GLenum target, GLint lod, GLsizei bufSize, void * pixels); +typedef void (GLAD_API_PTR *PFNGLGETNTEXIMAGEPROC)(GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void * pixels); +typedef void (GLAD_API_PTR *PFNGLGETNUNIFORMDVPROC)(GLuint program, GLint location, GLsizei bufSize, GLdouble * params); +typedef void (GLAD_API_PTR *PFNGLGETNUNIFORMFVPROC)(GLuint program, GLint location, GLsizei bufSize, GLfloat * params); +typedef void (GLAD_API_PTR *PFNGLGETNUNIFORMIVPROC)(GLuint program, GLint location, GLsizei bufSize, GLint * params); +typedef void (GLAD_API_PTR *PFNGLGETNUNIFORMUIVPROC)(GLuint program, GLint location, GLsizei bufSize, GLuint * params); +typedef void (GLAD_API_PTR *PFNGLHINTPROC)(GLenum target, GLenum mode); +typedef void (GLAD_API_PTR *PFNGLINVALIDATEBUFFERDATAPROC)(GLuint buffer); +typedef void (GLAD_API_PTR *PFNGLINVALIDATEBUFFERSUBDATAPROC)(GLuint buffer, GLintptr offset, GLsizeiptr length); +typedef void (GLAD_API_PTR *PFNGLINVALIDATEFRAMEBUFFERPROC)(GLenum target, GLsizei numAttachments, const GLenum * attachments); +typedef void (GLAD_API_PTR *PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC)(GLuint framebuffer, GLsizei numAttachments, const GLenum * attachments); +typedef void (GLAD_API_PTR *PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC)(GLuint framebuffer, GLsizei numAttachments, const GLenum * attachments, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (GLAD_API_PTR *PFNGLINVALIDATESUBFRAMEBUFFERPROC)(GLenum target, GLsizei numAttachments, const GLenum * attachments, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (GLAD_API_PTR *PFNGLINVALIDATETEXIMAGEPROC)(GLuint texture, GLint level); +typedef void (GLAD_API_PTR *PFNGLINVALIDATETEXSUBIMAGEPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth); +typedef GLboolean (GLAD_API_PTR *PFNGLISBUFFERPROC)(GLuint buffer); +typedef GLboolean (GLAD_API_PTR *PFNGLISENABLEDPROC)(GLenum cap); +typedef GLboolean (GLAD_API_PTR *PFNGLISENABLEDIPROC)(GLenum target, GLuint index); +typedef GLboolean (GLAD_API_PTR *PFNGLISFRAMEBUFFERPROC)(GLuint framebuffer); +typedef GLboolean (GLAD_API_PTR *PFNGLISPROGRAMPROC)(GLuint program); +typedef GLboolean (GLAD_API_PTR *PFNGLISPROGRAMPIPELINEPROC)(GLuint pipeline); +typedef GLboolean (GLAD_API_PTR *PFNGLISQUERYPROC)(GLuint id); +typedef GLboolean (GLAD_API_PTR *PFNGLISRENDERBUFFERPROC)(GLuint renderbuffer); +typedef GLboolean (GLAD_API_PTR *PFNGLISSAMPLERPROC)(GLuint sampler); +typedef GLboolean (GLAD_API_PTR *PFNGLISSHADERPROC)(GLuint shader); +typedef GLboolean (GLAD_API_PTR *PFNGLISSYNCPROC)(GLsync sync); +typedef GLboolean (GLAD_API_PTR *PFNGLISTEXTUREPROC)(GLuint texture); +typedef GLboolean (GLAD_API_PTR *PFNGLISTRANSFORMFEEDBACKPROC)(GLuint id); +typedef GLboolean (GLAD_API_PTR *PFNGLISVERTEXARRAYPROC)(GLuint array); +typedef void (GLAD_API_PTR *PFNGLLINEWIDTHPROC)(GLfloat width); +typedef void (GLAD_API_PTR *PFNGLLINKPROGRAMPROC)(GLuint program); +typedef void (GLAD_API_PTR *PFNGLLOGICOPPROC)(GLenum opcode); +typedef void * (GLAD_API_PTR *PFNGLMAPBUFFERPROC)(GLenum target, GLenum access); +typedef void * (GLAD_API_PTR *PFNGLMAPBUFFERRANGEPROC)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void * (GLAD_API_PTR *PFNGLMAPNAMEDBUFFERPROC)(GLuint buffer, GLenum access); +typedef void * (GLAD_API_PTR *PFNGLMAPNAMEDBUFFERRANGEPROC)(GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void (GLAD_API_PTR *PFNGLMEMORYBARRIERPROC)(GLbitfield barriers); +typedef void (GLAD_API_PTR *PFNGLMEMORYBARRIERBYREGIONPROC)(GLbitfield barriers); +typedef void (GLAD_API_PTR *PFNGLMINSAMPLESHADINGPROC)(GLfloat value); +typedef void (GLAD_API_PTR *PFNGLMULTIDRAWARRAYSPROC)(GLenum mode, const GLint * first, const GLsizei * count, GLsizei drawcount); +typedef void (GLAD_API_PTR *PFNGLMULTIDRAWARRAYSINDIRECTPROC)(GLenum mode, const void * indirect, GLsizei drawcount, GLsizei stride); +typedef void (GLAD_API_PTR *PFNGLMULTIDRAWARRAYSINDIRECTCOUNTPROC)(GLenum mode, const void * indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +typedef void (GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSPROC)(GLenum mode, const GLsizei * count, GLenum type, const void *const* indices, GLsizei drawcount); +typedef void (GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC)(GLenum mode, const GLsizei * count, GLenum type, const void *const* indices, GLsizei drawcount, const GLint * basevertex); +typedef void (GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSINDIRECTPROC)(GLenum mode, GLenum type, const void * indirect, GLsizei drawcount, GLsizei stride); +typedef void (GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTPROC)(GLenum mode, GLenum type, const void * indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +typedef void (GLAD_API_PTR *PFNGLNAMEDBUFFERDATAPROC)(GLuint buffer, GLsizeiptr size, const void * data, GLenum usage); +typedef void (GLAD_API_PTR *PFNGLNAMEDBUFFERSTORAGEPROC)(GLuint buffer, GLsizeiptr size, const void * data, GLbitfield flags); +typedef void (GLAD_API_PTR *PFNGLNAMEDBUFFERSUBDATAPROC)(GLuint buffer, GLintptr offset, GLsizeiptr size, const void * data); +typedef void (GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC)(GLuint framebuffer, GLenum buf); +typedef void (GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC)(GLuint framebuffer, GLsizei n, const GLenum * bufs); +typedef void (GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC)(GLuint framebuffer, GLenum pname, GLint param); +typedef void (GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC)(GLuint framebuffer, GLenum src); +typedef void (GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC)(GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERTEXTUREPROC)(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +typedef void (GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC)(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void (GLAD_API_PTR *PFNGLNAMEDRENDERBUFFERSTORAGEPROC)(GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GLAD_API_PTR *PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC)(GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GLAD_API_PTR *PFNGLOBJECTLABELPROC)(GLenum identifier, GLuint name, GLsizei length, const GLchar * label); +typedef void (GLAD_API_PTR *PFNGLOBJECTPTRLABELPROC)(const void * ptr, GLsizei length, const GLchar * label); +typedef void (GLAD_API_PTR *PFNGLPATCHPARAMETERFVPROC)(GLenum pname, const GLfloat * values); +typedef void (GLAD_API_PTR *PFNGLPATCHPARAMETERIPROC)(GLenum pname, GLint value); +typedef void (GLAD_API_PTR *PFNGLPAUSETRANSFORMFEEDBACKPROC)(void); +typedef void (GLAD_API_PTR *PFNGLPIXELSTOREFPROC)(GLenum pname, GLfloat param); +typedef void (GLAD_API_PTR *PFNGLPIXELSTOREIPROC)(GLenum pname, GLint param); +typedef void (GLAD_API_PTR *PFNGLPOINTPARAMETERFPROC)(GLenum pname, GLfloat param); +typedef void (GLAD_API_PTR *PFNGLPOINTPARAMETERFVPROC)(GLenum pname, const GLfloat * params); +typedef void (GLAD_API_PTR *PFNGLPOINTPARAMETERIPROC)(GLenum pname, GLint param); +typedef void (GLAD_API_PTR *PFNGLPOINTPARAMETERIVPROC)(GLenum pname, const GLint * params); +typedef void (GLAD_API_PTR *PFNGLPOINTSIZEPROC)(GLfloat size); +typedef void (GLAD_API_PTR *PFNGLPOLYGONMODEPROC)(GLenum face, GLenum mode); +typedef void (GLAD_API_PTR *PFNGLPOLYGONOFFSETPROC)(GLfloat factor, GLfloat units); +typedef void (GLAD_API_PTR *PFNGLPOLYGONOFFSETCLAMPPROC)(GLfloat factor, GLfloat units, GLfloat clamp); +typedef void (GLAD_API_PTR *PFNGLPOPDEBUGGROUPPROC)(void); +typedef void (GLAD_API_PTR *PFNGLPRIMITIVERESTARTINDEXPROC)(GLuint index); +typedef void (GLAD_API_PTR *PFNGLPROGRAMBINARYPROC)(GLuint program, GLenum binaryFormat, const void * binary, GLsizei length); +typedef void (GLAD_API_PTR *PFNGLPROGRAMPARAMETERIPROC)(GLuint program, GLenum pname, GLint value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM1DPROC)(GLuint program, GLint location, GLdouble v0); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM1DVPROC)(GLuint program, GLint location, GLsizei count, const GLdouble * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM1FPROC)(GLuint program, GLint location, GLfloat v0); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM1FVPROC)(GLuint program, GLint location, GLsizei count, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM1IPROC)(GLuint program, GLint location, GLint v0); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM1IVPROC)(GLuint program, GLint location, GLsizei count, const GLint * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM1UIPROC)(GLuint program, GLint location, GLuint v0); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM1UIVPROC)(GLuint program, GLint location, GLsizei count, const GLuint * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM2DPROC)(GLuint program, GLint location, GLdouble v0, GLdouble v1); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM2DVPROC)(GLuint program, GLint location, GLsizei count, const GLdouble * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM2FPROC)(GLuint program, GLint location, GLfloat v0, GLfloat v1); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM2FVPROC)(GLuint program, GLint location, GLsizei count, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM2IPROC)(GLuint program, GLint location, GLint v0, GLint v1); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM2IVPROC)(GLuint program, GLint location, GLsizei count, const GLint * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM2UIPROC)(GLuint program, GLint location, GLuint v0, GLuint v1); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM2UIVPROC)(GLuint program, GLint location, GLsizei count, const GLuint * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM3DPROC)(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM3DVPROC)(GLuint program, GLint location, GLsizei count, const GLdouble * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM3FPROC)(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM3FVPROC)(GLuint program, GLint location, GLsizei count, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM3IPROC)(GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM3IVPROC)(GLuint program, GLint location, GLsizei count, const GLint * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM3UIPROC)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM3UIVPROC)(GLuint program, GLint location, GLsizei count, const GLuint * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM4DPROC)(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM4DVPROC)(GLuint program, GLint location, GLsizei count, const GLdouble * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM4FPROC)(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM4FVPROC)(GLuint program, GLint location, GLsizei count, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM4IPROC)(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM4IVPROC)(GLuint program, GLint location, GLsizei count, const GLint * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM4UIPROC)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM4UIVPROC)(GLuint program, GLint location, GLsizei count, const GLuint * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLPROVOKINGVERTEXPROC)(GLenum mode); +typedef void (GLAD_API_PTR *PFNGLPUSHDEBUGGROUPPROC)(GLenum source, GLuint id, GLsizei length, const GLchar * message); +typedef void (GLAD_API_PTR *PFNGLQUERYCOUNTERPROC)(GLuint id, GLenum target); +typedef void (GLAD_API_PTR *PFNGLREADBUFFERPROC)(GLenum src); +typedef void (GLAD_API_PTR *PFNGLREADPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void * pixels); +typedef void (GLAD_API_PTR *PFNGLREADNPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void * data); +typedef void (GLAD_API_PTR *PFNGLRELEASESHADERCOMPILERPROC)(void); +typedef void (GLAD_API_PTR *PFNGLRENDERBUFFERSTORAGEPROC)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GLAD_API_PTR *PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GLAD_API_PTR *PFNGLRESUMETRANSFORMFEEDBACKPROC)(void); +typedef void (GLAD_API_PTR *PFNGLSAMPLECOVERAGEPROC)(GLfloat value, GLboolean invert); +typedef void (GLAD_API_PTR *PFNGLSAMPLEMASKIPROC)(GLuint maskNumber, GLbitfield mask); +typedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERIIVPROC)(GLuint sampler, GLenum pname, const GLint * param); +typedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERIUIVPROC)(GLuint sampler, GLenum pname, const GLuint * param); +typedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERFPROC)(GLuint sampler, GLenum pname, GLfloat param); +typedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERFVPROC)(GLuint sampler, GLenum pname, const GLfloat * param); +typedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERIPROC)(GLuint sampler, GLenum pname, GLint param); +typedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERIVPROC)(GLuint sampler, GLenum pname, const GLint * param); +typedef void (GLAD_API_PTR *PFNGLSCISSORPROC)(GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (GLAD_API_PTR *PFNGLSCISSORARRAYVPROC)(GLuint first, GLsizei count, const GLint * v); +typedef void (GLAD_API_PTR *PFNGLSCISSORINDEXEDPROC)(GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +typedef void (GLAD_API_PTR *PFNGLSCISSORINDEXEDVPROC)(GLuint index, const GLint * v); +typedef void (GLAD_API_PTR *PFNGLSHADERBINARYPROC)(GLsizei count, const GLuint * shaders, GLenum binaryFormat, const void * binary, GLsizei length); +typedef void (GLAD_API_PTR *PFNGLSHADERSOURCEPROC)(GLuint shader, GLsizei count, const GLchar *const* string, const GLint * length); +typedef void (GLAD_API_PTR *PFNGLSHADERSTORAGEBLOCKBINDINGPROC)(GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding); +typedef void (GLAD_API_PTR *PFNGLSPECIALIZESHADERPROC)(GLuint shader, const GLchar * pEntryPoint, GLuint numSpecializationConstants, const GLuint * pConstantIndex, const GLuint * pConstantValue); +typedef void (GLAD_API_PTR *PFNGLSTENCILFUNCPROC)(GLenum func, GLint ref, GLuint mask); +typedef void (GLAD_API_PTR *PFNGLSTENCILFUNCSEPARATEPROC)(GLenum face, GLenum func, GLint ref, GLuint mask); +typedef void (GLAD_API_PTR *PFNGLSTENCILMASKPROC)(GLuint mask); +typedef void (GLAD_API_PTR *PFNGLSTENCILMASKSEPARATEPROC)(GLenum face, GLuint mask); +typedef void (GLAD_API_PTR *PFNGLSTENCILOPPROC)(GLenum fail, GLenum zfail, GLenum zpass); +typedef void (GLAD_API_PTR *PFNGLSTENCILOPSEPARATEPROC)(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void (GLAD_API_PTR *PFNGLTEXBUFFERPROC)(GLenum target, GLenum internalformat, GLuint buffer); +typedef void (GLAD_API_PTR *PFNGLTEXBUFFERRANGEPROC)(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (GLAD_API_PTR *PFNGLTEXIMAGE1DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void * pixels); +typedef void (GLAD_API_PTR *PFNGLTEXIMAGE2DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void * pixels); +typedef void (GLAD_API_PTR *PFNGLTEXIMAGE2DMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +typedef void (GLAD_API_PTR *PFNGLTEXIMAGE3DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void * pixels); +typedef void (GLAD_API_PTR *PFNGLTEXIMAGE3DMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERIIVPROC)(GLenum target, GLenum pname, const GLint * params); +typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERIUIVPROC)(GLenum target, GLenum pname, const GLuint * params); +typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERFPROC)(GLenum target, GLenum pname, GLfloat param); +typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERFVPROC)(GLenum target, GLenum pname, const GLfloat * params); +typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERIPROC)(GLenum target, GLenum pname, GLint param); +typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERIVPROC)(GLenum target, GLenum pname, const GLint * params); +typedef void (GLAD_API_PTR *PFNGLTEXSTORAGE1DPROC)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +typedef void (GLAD_API_PTR *PFNGLTEXSTORAGE2DPROC)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GLAD_API_PTR *PFNGLTEXSTORAGE2DMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +typedef void (GLAD_API_PTR *PFNGLTEXSTORAGE3DPROC)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +typedef void (GLAD_API_PTR *PFNGLTEXSTORAGE3DMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +typedef void (GLAD_API_PTR *PFNGLTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void * pixels); +typedef void (GLAD_API_PTR *PFNGLTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * pixels); +typedef void (GLAD_API_PTR *PFNGLTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels); +typedef void (GLAD_API_PTR *PFNGLTEXTUREBARRIERPROC)(void); +typedef void (GLAD_API_PTR *PFNGLTEXTUREBUFFERPROC)(GLuint texture, GLenum internalformat, GLuint buffer); +typedef void (GLAD_API_PTR *PFNGLTEXTUREBUFFERRANGEPROC)(GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (GLAD_API_PTR *PFNGLTEXTUREPARAMETERIIVPROC)(GLuint texture, GLenum pname, const GLint * params); +typedef void (GLAD_API_PTR *PFNGLTEXTUREPARAMETERIUIVPROC)(GLuint texture, GLenum pname, const GLuint * params); +typedef void (GLAD_API_PTR *PFNGLTEXTUREPARAMETERFPROC)(GLuint texture, GLenum pname, GLfloat param); +typedef void (GLAD_API_PTR *PFNGLTEXTUREPARAMETERFVPROC)(GLuint texture, GLenum pname, const GLfloat * param); +typedef void (GLAD_API_PTR *PFNGLTEXTUREPARAMETERIPROC)(GLuint texture, GLenum pname, GLint param); +typedef void (GLAD_API_PTR *PFNGLTEXTUREPARAMETERIVPROC)(GLuint texture, GLenum pname, const GLint * param); +typedef void (GLAD_API_PTR *PFNGLTEXTURESTORAGE1DPROC)(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width); +typedef void (GLAD_API_PTR *PFNGLTEXTURESTORAGE2DPROC)(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GLAD_API_PTR *PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC)(GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +typedef void (GLAD_API_PTR *PFNGLTEXTURESTORAGE3DPROC)(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +typedef void (GLAD_API_PTR *PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC)(GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +typedef void (GLAD_API_PTR *PFNGLTEXTURESUBIMAGE1DPROC)(GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void * pixels); +typedef void (GLAD_API_PTR *PFNGLTEXTURESUBIMAGE2DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * pixels); +typedef void (GLAD_API_PTR *PFNGLTEXTURESUBIMAGE3DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels); +typedef void (GLAD_API_PTR *PFNGLTEXTUREVIEWPROC)(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); +typedef void (GLAD_API_PTR *PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC)(GLuint xfb, GLuint index, GLuint buffer); +typedef void (GLAD_API_PTR *PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC)(GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (GLAD_API_PTR *PFNGLTRANSFORMFEEDBACKVARYINGSPROC)(GLuint program, GLsizei count, const GLchar *const* varyings, GLenum bufferMode); +typedef void (GLAD_API_PTR *PFNGLUNIFORM1DPROC)(GLint location, GLdouble x); +typedef void (GLAD_API_PTR *PFNGLUNIFORM1DVPROC)(GLint location, GLsizei count, const GLdouble * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORM1FPROC)(GLint location, GLfloat v0); +typedef void (GLAD_API_PTR *PFNGLUNIFORM1FVPROC)(GLint location, GLsizei count, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORM1IPROC)(GLint location, GLint v0); +typedef void (GLAD_API_PTR *PFNGLUNIFORM1IVPROC)(GLint location, GLsizei count, const GLint * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORM1UIPROC)(GLint location, GLuint v0); +typedef void (GLAD_API_PTR *PFNGLUNIFORM1UIVPROC)(GLint location, GLsizei count, const GLuint * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORM2DPROC)(GLint location, GLdouble x, GLdouble y); +typedef void (GLAD_API_PTR *PFNGLUNIFORM2DVPROC)(GLint location, GLsizei count, const GLdouble * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORM2FPROC)(GLint location, GLfloat v0, GLfloat v1); +typedef void (GLAD_API_PTR *PFNGLUNIFORM2FVPROC)(GLint location, GLsizei count, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORM2IPROC)(GLint location, GLint v0, GLint v1); +typedef void (GLAD_API_PTR *PFNGLUNIFORM2IVPROC)(GLint location, GLsizei count, const GLint * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORM2UIPROC)(GLint location, GLuint v0, GLuint v1); +typedef void (GLAD_API_PTR *PFNGLUNIFORM2UIVPROC)(GLint location, GLsizei count, const GLuint * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORM3DPROC)(GLint location, GLdouble x, GLdouble y, GLdouble z); +typedef void (GLAD_API_PTR *PFNGLUNIFORM3DVPROC)(GLint location, GLsizei count, const GLdouble * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORM3FPROC)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (GLAD_API_PTR *PFNGLUNIFORM3FVPROC)(GLint location, GLsizei count, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORM3IPROC)(GLint location, GLint v0, GLint v1, GLint v2); +typedef void (GLAD_API_PTR *PFNGLUNIFORM3IVPROC)(GLint location, GLsizei count, const GLint * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORM3UIPROC)(GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (GLAD_API_PTR *PFNGLUNIFORM3UIVPROC)(GLint location, GLsizei count, const GLuint * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORM4DPROC)(GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (GLAD_API_PTR *PFNGLUNIFORM4DVPROC)(GLint location, GLsizei count, const GLdouble * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORM4FPROC)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (GLAD_API_PTR *PFNGLUNIFORM4FVPROC)(GLint location, GLsizei count, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORM4IPROC)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (GLAD_API_PTR *PFNGLUNIFORM4IVPROC)(GLint location, GLsizei count, const GLint * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORM4UIPROC)(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (GLAD_API_PTR *PFNGLUNIFORM4UIVPROC)(GLint location, GLsizei count, const GLuint * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORMBLOCKBINDINGPROC)(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); +typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX2DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX2FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX2X3DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX2X3FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX2X4DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX2X4FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX3DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX3FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX3X2DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX3X2FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX3X4DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX3X4FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX4DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX4FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX4X2DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX4X2FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX4X3DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX4X3FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (GLAD_API_PTR *PFNGLUNIFORMSUBROUTINESUIVPROC)(GLenum shadertype, GLsizei count, const GLuint * indices); +typedef GLboolean (GLAD_API_PTR *PFNGLUNMAPBUFFERPROC)(GLenum target); +typedef GLboolean (GLAD_API_PTR *PFNGLUNMAPNAMEDBUFFERPROC)(GLuint buffer); +typedef void (GLAD_API_PTR *PFNGLUSEPROGRAMPROC)(GLuint program); +typedef void (GLAD_API_PTR *PFNGLUSEPROGRAMSTAGESPROC)(GLuint pipeline, GLbitfield stages, GLuint program); +typedef void (GLAD_API_PTR *PFNGLVALIDATEPROGRAMPROC)(GLuint program); +typedef void (GLAD_API_PTR *PFNGLVALIDATEPROGRAMPIPELINEPROC)(GLuint pipeline); +typedef void (GLAD_API_PTR *PFNGLVERTEXARRAYATTRIBBINDINGPROC)(GLuint vaobj, GLuint attribindex, GLuint bindingindex); +typedef void (GLAD_API_PTR *PFNGLVERTEXARRAYATTRIBFORMATPROC)(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +typedef void (GLAD_API_PTR *PFNGLVERTEXARRAYATTRIBIFORMATPROC)(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (GLAD_API_PTR *PFNGLVERTEXARRAYATTRIBLFORMATPROC)(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (GLAD_API_PTR *PFNGLVERTEXARRAYBINDINGDIVISORPROC)(GLuint vaobj, GLuint bindingindex, GLuint divisor); +typedef void (GLAD_API_PTR *PFNGLVERTEXARRAYELEMENTBUFFERPROC)(GLuint vaobj, GLuint buffer); +typedef void (GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXBUFFERPROC)(GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +typedef void (GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXBUFFERSPROC)(GLuint vaobj, GLuint first, GLsizei count, const GLuint * buffers, const GLintptr * offsets, const GLsizei * strides); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1DPROC)(GLuint index, GLdouble x); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1DVPROC)(GLuint index, const GLdouble * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1FPROC)(GLuint index, GLfloat x); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1FVPROC)(GLuint index, const GLfloat * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1SPROC)(GLuint index, GLshort x); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1SVPROC)(GLuint index, const GLshort * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2DPROC)(GLuint index, GLdouble x, GLdouble y); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2DVPROC)(GLuint index, const GLdouble * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2FPROC)(GLuint index, GLfloat x, GLfloat y); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2FVPROC)(GLuint index, const GLfloat * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2SPROC)(GLuint index, GLshort x, GLshort y); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2SVPROC)(GLuint index, const GLshort * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3DPROC)(GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3DVPROC)(GLuint index, const GLdouble * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3FPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3FVPROC)(GLuint index, const GLfloat * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3SPROC)(GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3SVPROC)(GLuint index, const GLshort * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NBVPROC)(GLuint index, const GLbyte * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NIVPROC)(GLuint index, const GLint * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NSVPROC)(GLuint index, const GLshort * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NUBPROC)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NUBVPROC)(GLuint index, const GLubyte * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NUIVPROC)(GLuint index, const GLuint * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NUSVPROC)(GLuint index, const GLushort * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4BVPROC)(GLuint index, const GLbyte * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4DPROC)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4DVPROC)(GLuint index, const GLdouble * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4FPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4FVPROC)(GLuint index, const GLfloat * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4IVPROC)(GLuint index, const GLint * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4SPROC)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4SVPROC)(GLuint index, const GLshort * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4UBVPROC)(GLuint index, const GLubyte * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4UIVPROC)(GLuint index, const GLuint * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4USVPROC)(GLuint index, const GLushort * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBBINDINGPROC)(GLuint attribindex, GLuint bindingindex); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBDIVISORPROC)(GLuint index, GLuint divisor); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBFORMATPROC)(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI1IPROC)(GLuint index, GLint x); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI1IVPROC)(GLuint index, const GLint * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI1UIPROC)(GLuint index, GLuint x); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI1UIVPROC)(GLuint index, const GLuint * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI2IPROC)(GLuint index, GLint x, GLint y); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI2IVPROC)(GLuint index, const GLint * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI2UIPROC)(GLuint index, GLuint x, GLuint y); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI2UIVPROC)(GLuint index, const GLuint * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI3IPROC)(GLuint index, GLint x, GLint y, GLint z); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI3IVPROC)(GLuint index, const GLint * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI3UIPROC)(GLuint index, GLuint x, GLuint y, GLuint z); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI3UIVPROC)(GLuint index, const GLuint * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4BVPROC)(GLuint index, const GLbyte * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4IPROC)(GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4IVPROC)(GLuint index, const GLint * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4SVPROC)(GLuint index, const GLshort * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4UBVPROC)(GLuint index, const GLubyte * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4UIPROC)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4UIVPROC)(GLuint index, const GLuint * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4USVPROC)(GLuint index, const GLushort * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBIFORMATPROC)(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBIPOINTERPROC)(GLuint index, GLint size, GLenum type, GLsizei stride, const void * pointer); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBL1DPROC)(GLuint index, GLdouble x); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBL1DVPROC)(GLuint index, const GLdouble * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBL2DPROC)(GLuint index, GLdouble x, GLdouble y); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBL2DVPROC)(GLuint index, const GLdouble * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBL3DPROC)(GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBL3DVPROC)(GLuint index, const GLdouble * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBL4DPROC)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBL4DVPROC)(GLuint index, const GLdouble * v); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBLFORMATPROC)(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBLPOINTERPROC)(GLuint index, GLint size, GLenum type, GLsizei stride, const void * pointer); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP1UIPROC)(GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP1UIVPROC)(GLuint index, GLenum type, GLboolean normalized, const GLuint * value); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP2UIPROC)(GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP2UIVPROC)(GLuint index, GLenum type, GLboolean normalized, const GLuint * value); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP3UIPROC)(GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP3UIVPROC)(GLuint index, GLenum type, GLboolean normalized, const GLuint * value); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP4UIPROC)(GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP4UIVPROC)(GLuint index, GLenum type, GLboolean normalized, const GLuint * value); +typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBPOINTERPROC)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void * pointer); +typedef void (GLAD_API_PTR *PFNGLVERTEXBINDINGDIVISORPROC)(GLuint bindingindex, GLuint divisor); +typedef void (GLAD_API_PTR *PFNGLVIEWPORTPROC)(GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (GLAD_API_PTR *PFNGLVIEWPORTARRAYVPROC)(GLuint first, GLsizei count, const GLfloat * v); +typedef void (GLAD_API_PTR *PFNGLVIEWPORTINDEXEDFPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +typedef void (GLAD_API_PTR *PFNGLVIEWPORTINDEXEDFVPROC)(GLuint index, const GLfloat * v); +typedef void (GLAD_API_PTR *PFNGLWAITSYNCPROC)(GLsync sync, GLbitfield flags, GLuint64 timeout); + +typedef struct GladGLContext { + void* userptr; + + int VERSION_1_0; + int VERSION_1_1; + int VERSION_1_2; + int VERSION_1_3; + int VERSION_1_4; + int VERSION_1_5; + int VERSION_2_0; + int VERSION_2_1; + int VERSION_3_0; + int VERSION_3_1; + int VERSION_3_2; + int VERSION_3_3; + int VERSION_4_0; + int VERSION_4_1; + int VERSION_4_2; + int VERSION_4_3; + int VERSION_4_4; + int VERSION_4_5; + int VERSION_4_6; + + PFNGLACTIVESHADERPROGRAMPROC ActiveShaderProgram; + PFNGLACTIVETEXTUREPROC ActiveTexture; + PFNGLATTACHSHADERPROC AttachShader; + PFNGLBEGINCONDITIONALRENDERPROC BeginConditionalRender; + PFNGLBEGINQUERYPROC BeginQuery; + PFNGLBEGINQUERYINDEXEDPROC BeginQueryIndexed; + PFNGLBEGINTRANSFORMFEEDBACKPROC BeginTransformFeedback; + PFNGLBINDATTRIBLOCATIONPROC BindAttribLocation; + PFNGLBINDBUFFERPROC BindBuffer; + PFNGLBINDBUFFERBASEPROC BindBufferBase; + PFNGLBINDBUFFERRANGEPROC BindBufferRange; + PFNGLBINDBUFFERSBASEPROC BindBuffersBase; + PFNGLBINDBUFFERSRANGEPROC BindBuffersRange; + PFNGLBINDFRAGDATALOCATIONPROC BindFragDataLocation; + PFNGLBINDFRAGDATALOCATIONINDEXEDPROC BindFragDataLocationIndexed; + PFNGLBINDFRAMEBUFFERPROC BindFramebuffer; + PFNGLBINDIMAGETEXTUREPROC BindImageTexture; + PFNGLBINDIMAGETEXTURESPROC BindImageTextures; + PFNGLBINDPROGRAMPIPELINEPROC BindProgramPipeline; + PFNGLBINDRENDERBUFFERPROC BindRenderbuffer; + PFNGLBINDSAMPLERPROC BindSampler; + PFNGLBINDSAMPLERSPROC BindSamplers; + PFNGLBINDTEXTUREPROC BindTexture; + PFNGLBINDTEXTUREUNITPROC BindTextureUnit; + PFNGLBINDTEXTURESPROC BindTextures; + PFNGLBINDTRANSFORMFEEDBACKPROC BindTransformFeedback; + PFNGLBINDVERTEXARRAYPROC BindVertexArray; + PFNGLBINDVERTEXBUFFERPROC BindVertexBuffer; + PFNGLBINDVERTEXBUFFERSPROC BindVertexBuffers; + PFNGLBLENDCOLORPROC BlendColor; + PFNGLBLENDEQUATIONPROC BlendEquation; + PFNGLBLENDEQUATIONSEPARATEPROC BlendEquationSeparate; + PFNGLBLENDEQUATIONSEPARATEIPROC BlendEquationSeparatei; + PFNGLBLENDEQUATIONIPROC BlendEquationi; + PFNGLBLENDFUNCPROC BlendFunc; + PFNGLBLENDFUNCSEPARATEPROC BlendFuncSeparate; + PFNGLBLENDFUNCSEPARATEIPROC BlendFuncSeparatei; + PFNGLBLENDFUNCIPROC BlendFunci; + PFNGLBLITFRAMEBUFFERPROC BlitFramebuffer; + PFNGLBLITNAMEDFRAMEBUFFERPROC BlitNamedFramebuffer; + PFNGLBUFFERDATAPROC BufferData; + PFNGLBUFFERSTORAGEPROC BufferStorage; + PFNGLBUFFERSUBDATAPROC BufferSubData; + PFNGLCHECKFRAMEBUFFERSTATUSPROC CheckFramebufferStatus; + PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC CheckNamedFramebufferStatus; + PFNGLCLAMPCOLORPROC ClampColor; + PFNGLCLEARPROC Clear; + PFNGLCLEARBUFFERDATAPROC ClearBufferData; + PFNGLCLEARBUFFERSUBDATAPROC ClearBufferSubData; + PFNGLCLEARBUFFERFIPROC ClearBufferfi; + PFNGLCLEARBUFFERFVPROC ClearBufferfv; + PFNGLCLEARBUFFERIVPROC ClearBufferiv; + PFNGLCLEARBUFFERUIVPROC ClearBufferuiv; + PFNGLCLEARCOLORPROC ClearColor; + PFNGLCLEARDEPTHPROC ClearDepth; + PFNGLCLEARDEPTHFPROC ClearDepthf; + PFNGLCLEARNAMEDBUFFERDATAPROC ClearNamedBufferData; + PFNGLCLEARNAMEDBUFFERSUBDATAPROC ClearNamedBufferSubData; + PFNGLCLEARNAMEDFRAMEBUFFERFIPROC ClearNamedFramebufferfi; + PFNGLCLEARNAMEDFRAMEBUFFERFVPROC ClearNamedFramebufferfv; + PFNGLCLEARNAMEDFRAMEBUFFERIVPROC ClearNamedFramebufferiv; + PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC ClearNamedFramebufferuiv; + PFNGLCLEARSTENCILPROC ClearStencil; + PFNGLCLEARTEXIMAGEPROC ClearTexImage; + PFNGLCLEARTEXSUBIMAGEPROC ClearTexSubImage; + PFNGLCLIENTWAITSYNCPROC ClientWaitSync; + PFNGLCLIPCONTROLPROC ClipControl; + PFNGLCOLORMASKPROC ColorMask; + PFNGLCOLORMASKIPROC ColorMaski; + PFNGLCOMPILESHADERPROC CompileShader; + PFNGLCOMPRESSEDTEXIMAGE1DPROC CompressedTexImage1D; + PFNGLCOMPRESSEDTEXIMAGE2DPROC CompressedTexImage2D; + PFNGLCOMPRESSEDTEXIMAGE3DPROC CompressedTexImage3D; + PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC CompressedTexSubImage1D; + PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC CompressedTexSubImage2D; + PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC CompressedTexSubImage3D; + PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC CompressedTextureSubImage1D; + PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC CompressedTextureSubImage2D; + PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC CompressedTextureSubImage3D; + PFNGLCOPYBUFFERSUBDATAPROC CopyBufferSubData; + PFNGLCOPYIMAGESUBDATAPROC CopyImageSubData; + PFNGLCOPYNAMEDBUFFERSUBDATAPROC CopyNamedBufferSubData; + PFNGLCOPYTEXIMAGE1DPROC CopyTexImage1D; + PFNGLCOPYTEXIMAGE2DPROC CopyTexImage2D; + PFNGLCOPYTEXSUBIMAGE1DPROC CopyTexSubImage1D; + PFNGLCOPYTEXSUBIMAGE2DPROC CopyTexSubImage2D; + PFNGLCOPYTEXSUBIMAGE3DPROC CopyTexSubImage3D; + PFNGLCOPYTEXTURESUBIMAGE1DPROC CopyTextureSubImage1D; + PFNGLCOPYTEXTURESUBIMAGE2DPROC CopyTextureSubImage2D; + PFNGLCOPYTEXTURESUBIMAGE3DPROC CopyTextureSubImage3D; + PFNGLCREATEBUFFERSPROC CreateBuffers; + PFNGLCREATEFRAMEBUFFERSPROC CreateFramebuffers; + PFNGLCREATEPROGRAMPROC CreateProgram; + PFNGLCREATEPROGRAMPIPELINESPROC CreateProgramPipelines; + PFNGLCREATEQUERIESPROC CreateQueries; + PFNGLCREATERENDERBUFFERSPROC CreateRenderbuffers; + PFNGLCREATESAMPLERSPROC CreateSamplers; + PFNGLCREATESHADERPROC CreateShader; + PFNGLCREATESHADERPROGRAMVPROC CreateShaderProgramv; + PFNGLCREATETEXTURESPROC CreateTextures; + PFNGLCREATETRANSFORMFEEDBACKSPROC CreateTransformFeedbacks; + PFNGLCREATEVERTEXARRAYSPROC CreateVertexArrays; + PFNGLCULLFACEPROC CullFace; + PFNGLDEBUGMESSAGECALLBACKPROC DebugMessageCallback; + PFNGLDEBUGMESSAGECONTROLPROC DebugMessageControl; + PFNGLDEBUGMESSAGEINSERTPROC DebugMessageInsert; + PFNGLDELETEBUFFERSPROC DeleteBuffers; + PFNGLDELETEFRAMEBUFFERSPROC DeleteFramebuffers; + PFNGLDELETEPROGRAMPROC DeleteProgram; + PFNGLDELETEPROGRAMPIPELINESPROC DeleteProgramPipelines; + PFNGLDELETEQUERIESPROC DeleteQueries; + PFNGLDELETERENDERBUFFERSPROC DeleteRenderbuffers; + PFNGLDELETESAMPLERSPROC DeleteSamplers; + PFNGLDELETESHADERPROC DeleteShader; + PFNGLDELETESYNCPROC DeleteSync; + PFNGLDELETETEXTURESPROC DeleteTextures; + PFNGLDELETETRANSFORMFEEDBACKSPROC DeleteTransformFeedbacks; + PFNGLDELETEVERTEXARRAYSPROC DeleteVertexArrays; + PFNGLDEPTHFUNCPROC DepthFunc; + PFNGLDEPTHMASKPROC DepthMask; + PFNGLDEPTHRANGEPROC DepthRange; + PFNGLDEPTHRANGEARRAYVPROC DepthRangeArrayv; + PFNGLDEPTHRANGEINDEXEDPROC DepthRangeIndexed; + PFNGLDEPTHRANGEFPROC DepthRangef; + PFNGLDETACHSHADERPROC DetachShader; + PFNGLDISABLEPROC Disable; + PFNGLDISABLEVERTEXARRAYATTRIBPROC DisableVertexArrayAttrib; + PFNGLDISABLEVERTEXATTRIBARRAYPROC DisableVertexAttribArray; + PFNGLDISABLEIPROC Disablei; + PFNGLDISPATCHCOMPUTEPROC DispatchCompute; + PFNGLDISPATCHCOMPUTEINDIRECTPROC DispatchComputeIndirect; + PFNGLDRAWARRAYSPROC DrawArrays; + PFNGLDRAWARRAYSINDIRECTPROC DrawArraysIndirect; + PFNGLDRAWARRAYSINSTANCEDPROC DrawArraysInstanced; + PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC DrawArraysInstancedBaseInstance; + PFNGLDRAWBUFFERPROC DrawBuffer; + PFNGLDRAWBUFFERSPROC DrawBuffers; + PFNGLDRAWELEMENTSPROC DrawElements; + PFNGLDRAWELEMENTSBASEVERTEXPROC DrawElementsBaseVertex; + PFNGLDRAWELEMENTSINDIRECTPROC DrawElementsIndirect; + PFNGLDRAWELEMENTSINSTANCEDPROC DrawElementsInstanced; + PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC DrawElementsInstancedBaseInstance; + PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC DrawElementsInstancedBaseVertex; + PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC DrawElementsInstancedBaseVertexBaseInstance; + PFNGLDRAWRANGEELEMENTSPROC DrawRangeElements; + PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC DrawRangeElementsBaseVertex; + PFNGLDRAWTRANSFORMFEEDBACKPROC DrawTransformFeedback; + PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC DrawTransformFeedbackInstanced; + PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC DrawTransformFeedbackStream; + PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC DrawTransformFeedbackStreamInstanced; + PFNGLENABLEPROC Enable; + PFNGLENABLEVERTEXARRAYATTRIBPROC EnableVertexArrayAttrib; + PFNGLENABLEVERTEXATTRIBARRAYPROC EnableVertexAttribArray; + PFNGLENABLEIPROC Enablei; + PFNGLENDCONDITIONALRENDERPROC EndConditionalRender; + PFNGLENDQUERYPROC EndQuery; + PFNGLENDQUERYINDEXEDPROC EndQueryIndexed; + PFNGLENDTRANSFORMFEEDBACKPROC EndTransformFeedback; + PFNGLFENCESYNCPROC FenceSync; + PFNGLFINISHPROC Finish; + PFNGLFLUSHPROC Flush; + PFNGLFLUSHMAPPEDBUFFERRANGEPROC FlushMappedBufferRange; + PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC FlushMappedNamedBufferRange; + PFNGLFRAMEBUFFERPARAMETERIPROC FramebufferParameteri; + PFNGLFRAMEBUFFERRENDERBUFFERPROC FramebufferRenderbuffer; + PFNGLFRAMEBUFFERTEXTUREPROC FramebufferTexture; + PFNGLFRAMEBUFFERTEXTURE1DPROC FramebufferTexture1D; + PFNGLFRAMEBUFFERTEXTURE2DPROC FramebufferTexture2D; + PFNGLFRAMEBUFFERTEXTURE3DPROC FramebufferTexture3D; + PFNGLFRAMEBUFFERTEXTURELAYERPROC FramebufferTextureLayer; + PFNGLFRONTFACEPROC FrontFace; + PFNGLGENBUFFERSPROC GenBuffers; + PFNGLGENFRAMEBUFFERSPROC GenFramebuffers; + PFNGLGENPROGRAMPIPELINESPROC GenProgramPipelines; + PFNGLGENQUERIESPROC GenQueries; + PFNGLGENRENDERBUFFERSPROC GenRenderbuffers; + PFNGLGENSAMPLERSPROC GenSamplers; + PFNGLGENTEXTURESPROC GenTextures; + PFNGLGENTRANSFORMFEEDBACKSPROC GenTransformFeedbacks; + PFNGLGENVERTEXARRAYSPROC GenVertexArrays; + PFNGLGENERATEMIPMAPPROC GenerateMipmap; + PFNGLGENERATETEXTUREMIPMAPPROC GenerateTextureMipmap; + PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC GetActiveAtomicCounterBufferiv; + PFNGLGETACTIVEATTRIBPROC GetActiveAttrib; + PFNGLGETACTIVESUBROUTINENAMEPROC GetActiveSubroutineName; + PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC GetActiveSubroutineUniformName; + PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC GetActiveSubroutineUniformiv; + PFNGLGETACTIVEUNIFORMPROC GetActiveUniform; + PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC GetActiveUniformBlockName; + PFNGLGETACTIVEUNIFORMBLOCKIVPROC GetActiveUniformBlockiv; + PFNGLGETACTIVEUNIFORMNAMEPROC GetActiveUniformName; + PFNGLGETACTIVEUNIFORMSIVPROC GetActiveUniformsiv; + PFNGLGETATTACHEDSHADERSPROC GetAttachedShaders; + PFNGLGETATTRIBLOCATIONPROC GetAttribLocation; + PFNGLGETBOOLEANI_VPROC GetBooleani_v; + PFNGLGETBOOLEANVPROC GetBooleanv; + PFNGLGETBUFFERPARAMETERI64VPROC GetBufferParameteri64v; + PFNGLGETBUFFERPARAMETERIVPROC GetBufferParameteriv; + PFNGLGETBUFFERPOINTERVPROC GetBufferPointerv; + PFNGLGETBUFFERSUBDATAPROC GetBufferSubData; + PFNGLGETCOMPRESSEDTEXIMAGEPROC GetCompressedTexImage; + PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC GetCompressedTextureImage; + PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC GetCompressedTextureSubImage; + PFNGLGETDEBUGMESSAGELOGPROC GetDebugMessageLog; + PFNGLGETDOUBLEI_VPROC GetDoublei_v; + PFNGLGETDOUBLEVPROC GetDoublev; + PFNGLGETERRORPROC GetError; + PFNGLGETFLOATI_VPROC GetFloati_v; + PFNGLGETFLOATVPROC GetFloatv; + PFNGLGETFRAGDATAINDEXPROC GetFragDataIndex; + PFNGLGETFRAGDATALOCATIONPROC GetFragDataLocation; + PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC GetFramebufferAttachmentParameteriv; + PFNGLGETFRAMEBUFFERPARAMETERIVPROC GetFramebufferParameteriv; + PFNGLGETGRAPHICSRESETSTATUSPROC GetGraphicsResetStatus; + PFNGLGETINTEGER64I_VPROC GetInteger64i_v; + PFNGLGETINTEGER64VPROC GetInteger64v; + PFNGLGETINTEGERI_VPROC GetIntegeri_v; + PFNGLGETINTEGERVPROC GetIntegerv; + PFNGLGETINTERNALFORMATI64VPROC GetInternalformati64v; + PFNGLGETINTERNALFORMATIVPROC GetInternalformativ; + PFNGLGETMULTISAMPLEFVPROC GetMultisamplefv; + PFNGLGETNAMEDBUFFERPARAMETERI64VPROC GetNamedBufferParameteri64v; + PFNGLGETNAMEDBUFFERPARAMETERIVPROC GetNamedBufferParameteriv; + PFNGLGETNAMEDBUFFERPOINTERVPROC GetNamedBufferPointerv; + PFNGLGETNAMEDBUFFERSUBDATAPROC GetNamedBufferSubData; + PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC GetNamedFramebufferAttachmentParameteriv; + PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC GetNamedFramebufferParameteriv; + PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC GetNamedRenderbufferParameteriv; + PFNGLGETOBJECTLABELPROC GetObjectLabel; + PFNGLGETOBJECTPTRLABELPROC GetObjectPtrLabel; + PFNGLGETPOINTERVPROC GetPointerv; + PFNGLGETPROGRAMBINARYPROC GetProgramBinary; + PFNGLGETPROGRAMINFOLOGPROC GetProgramInfoLog; + PFNGLGETPROGRAMINTERFACEIVPROC GetProgramInterfaceiv; + PFNGLGETPROGRAMPIPELINEINFOLOGPROC GetProgramPipelineInfoLog; + PFNGLGETPROGRAMPIPELINEIVPROC GetProgramPipelineiv; + PFNGLGETPROGRAMRESOURCEINDEXPROC GetProgramResourceIndex; + PFNGLGETPROGRAMRESOURCELOCATIONPROC GetProgramResourceLocation; + PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC GetProgramResourceLocationIndex; + PFNGLGETPROGRAMRESOURCENAMEPROC GetProgramResourceName; + PFNGLGETPROGRAMRESOURCEIVPROC GetProgramResourceiv; + PFNGLGETPROGRAMSTAGEIVPROC GetProgramStageiv; + PFNGLGETPROGRAMIVPROC GetProgramiv; + PFNGLGETQUERYBUFFEROBJECTI64VPROC GetQueryBufferObjecti64v; + PFNGLGETQUERYBUFFEROBJECTIVPROC GetQueryBufferObjectiv; + PFNGLGETQUERYBUFFEROBJECTUI64VPROC GetQueryBufferObjectui64v; + PFNGLGETQUERYBUFFEROBJECTUIVPROC GetQueryBufferObjectuiv; + PFNGLGETQUERYINDEXEDIVPROC GetQueryIndexediv; + PFNGLGETQUERYOBJECTI64VPROC GetQueryObjecti64v; + PFNGLGETQUERYOBJECTIVPROC GetQueryObjectiv; + PFNGLGETQUERYOBJECTUI64VPROC GetQueryObjectui64v; + PFNGLGETQUERYOBJECTUIVPROC GetQueryObjectuiv; + PFNGLGETQUERYIVPROC GetQueryiv; + PFNGLGETRENDERBUFFERPARAMETERIVPROC GetRenderbufferParameteriv; + PFNGLGETSAMPLERPARAMETERIIVPROC GetSamplerParameterIiv; + PFNGLGETSAMPLERPARAMETERIUIVPROC GetSamplerParameterIuiv; + PFNGLGETSAMPLERPARAMETERFVPROC GetSamplerParameterfv; + PFNGLGETSAMPLERPARAMETERIVPROC GetSamplerParameteriv; + PFNGLGETSHADERINFOLOGPROC GetShaderInfoLog; + PFNGLGETSHADERPRECISIONFORMATPROC GetShaderPrecisionFormat; + PFNGLGETSHADERSOURCEPROC GetShaderSource; + PFNGLGETSHADERIVPROC GetShaderiv; + PFNGLGETSTRINGPROC GetString; + PFNGLGETSTRINGIPROC GetStringi; + PFNGLGETSUBROUTINEINDEXPROC GetSubroutineIndex; + PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC GetSubroutineUniformLocation; + PFNGLGETSYNCIVPROC GetSynciv; + PFNGLGETTEXIMAGEPROC GetTexImage; + PFNGLGETTEXLEVELPARAMETERFVPROC GetTexLevelParameterfv; + PFNGLGETTEXLEVELPARAMETERIVPROC GetTexLevelParameteriv; + PFNGLGETTEXPARAMETERIIVPROC GetTexParameterIiv; + PFNGLGETTEXPARAMETERIUIVPROC GetTexParameterIuiv; + PFNGLGETTEXPARAMETERFVPROC GetTexParameterfv; + PFNGLGETTEXPARAMETERIVPROC GetTexParameteriv; + PFNGLGETTEXTUREIMAGEPROC GetTextureImage; + PFNGLGETTEXTURELEVELPARAMETERFVPROC GetTextureLevelParameterfv; + PFNGLGETTEXTURELEVELPARAMETERIVPROC GetTextureLevelParameteriv; + PFNGLGETTEXTUREPARAMETERIIVPROC GetTextureParameterIiv; + PFNGLGETTEXTUREPARAMETERIUIVPROC GetTextureParameterIuiv; + PFNGLGETTEXTUREPARAMETERFVPROC GetTextureParameterfv; + PFNGLGETTEXTUREPARAMETERIVPROC GetTextureParameteriv; + PFNGLGETTEXTURESUBIMAGEPROC GetTextureSubImage; + PFNGLGETTRANSFORMFEEDBACKVARYINGPROC GetTransformFeedbackVarying; + PFNGLGETTRANSFORMFEEDBACKI64_VPROC GetTransformFeedbacki64_v; + PFNGLGETTRANSFORMFEEDBACKI_VPROC GetTransformFeedbacki_v; + PFNGLGETTRANSFORMFEEDBACKIVPROC GetTransformFeedbackiv; + PFNGLGETUNIFORMBLOCKINDEXPROC GetUniformBlockIndex; + PFNGLGETUNIFORMINDICESPROC GetUniformIndices; + PFNGLGETUNIFORMLOCATIONPROC GetUniformLocation; + PFNGLGETUNIFORMSUBROUTINEUIVPROC GetUniformSubroutineuiv; + PFNGLGETUNIFORMDVPROC GetUniformdv; + PFNGLGETUNIFORMFVPROC GetUniformfv; + PFNGLGETUNIFORMIVPROC GetUniformiv; + PFNGLGETUNIFORMUIVPROC GetUniformuiv; + PFNGLGETVERTEXARRAYINDEXED64IVPROC GetVertexArrayIndexed64iv; + PFNGLGETVERTEXARRAYINDEXEDIVPROC GetVertexArrayIndexediv; + PFNGLGETVERTEXARRAYIVPROC GetVertexArrayiv; + PFNGLGETVERTEXATTRIBIIVPROC GetVertexAttribIiv; + PFNGLGETVERTEXATTRIBIUIVPROC GetVertexAttribIuiv; + PFNGLGETVERTEXATTRIBLDVPROC GetVertexAttribLdv; + PFNGLGETVERTEXATTRIBPOINTERVPROC GetVertexAttribPointerv; + PFNGLGETVERTEXATTRIBDVPROC GetVertexAttribdv; + PFNGLGETVERTEXATTRIBFVPROC GetVertexAttribfv; + PFNGLGETVERTEXATTRIBIVPROC GetVertexAttribiv; + PFNGLGETNCOMPRESSEDTEXIMAGEPROC GetnCompressedTexImage; + PFNGLGETNTEXIMAGEPROC GetnTexImage; + PFNGLGETNUNIFORMDVPROC GetnUniformdv; + PFNGLGETNUNIFORMFVPROC GetnUniformfv; + PFNGLGETNUNIFORMIVPROC GetnUniformiv; + PFNGLGETNUNIFORMUIVPROC GetnUniformuiv; + PFNGLHINTPROC Hint; + PFNGLINVALIDATEBUFFERDATAPROC InvalidateBufferData; + PFNGLINVALIDATEBUFFERSUBDATAPROC InvalidateBufferSubData; + PFNGLINVALIDATEFRAMEBUFFERPROC InvalidateFramebuffer; + PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC InvalidateNamedFramebufferData; + PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC InvalidateNamedFramebufferSubData; + PFNGLINVALIDATESUBFRAMEBUFFERPROC InvalidateSubFramebuffer; + PFNGLINVALIDATETEXIMAGEPROC InvalidateTexImage; + PFNGLINVALIDATETEXSUBIMAGEPROC InvalidateTexSubImage; + PFNGLISBUFFERPROC IsBuffer; + PFNGLISENABLEDPROC IsEnabled; + PFNGLISENABLEDIPROC IsEnabledi; + PFNGLISFRAMEBUFFERPROC IsFramebuffer; + PFNGLISPROGRAMPROC IsProgram; + PFNGLISPROGRAMPIPELINEPROC IsProgramPipeline; + PFNGLISQUERYPROC IsQuery; + PFNGLISRENDERBUFFERPROC IsRenderbuffer; + PFNGLISSAMPLERPROC IsSampler; + PFNGLISSHADERPROC IsShader; + PFNGLISSYNCPROC IsSync; + PFNGLISTEXTUREPROC IsTexture; + PFNGLISTRANSFORMFEEDBACKPROC IsTransformFeedback; + PFNGLISVERTEXARRAYPROC IsVertexArray; + PFNGLLINEWIDTHPROC LineWidth; + PFNGLLINKPROGRAMPROC LinkProgram; + PFNGLLOGICOPPROC LogicOp; + PFNGLMAPBUFFERPROC MapBuffer; + PFNGLMAPBUFFERRANGEPROC MapBufferRange; + PFNGLMAPNAMEDBUFFERPROC MapNamedBuffer; + PFNGLMAPNAMEDBUFFERRANGEPROC MapNamedBufferRange; + PFNGLMEMORYBARRIERPROC MemoryBarrier; + PFNGLMEMORYBARRIERBYREGIONPROC MemoryBarrierByRegion; + PFNGLMINSAMPLESHADINGPROC MinSampleShading; + PFNGLMULTIDRAWARRAYSPROC MultiDrawArrays; + PFNGLMULTIDRAWARRAYSINDIRECTPROC MultiDrawArraysIndirect; + PFNGLMULTIDRAWARRAYSINDIRECTCOUNTPROC MultiDrawArraysIndirectCount; + PFNGLMULTIDRAWELEMENTSPROC MultiDrawElements; + PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC MultiDrawElementsBaseVertex; + PFNGLMULTIDRAWELEMENTSINDIRECTPROC MultiDrawElementsIndirect; + PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTPROC MultiDrawElementsIndirectCount; + PFNGLNAMEDBUFFERDATAPROC NamedBufferData; + PFNGLNAMEDBUFFERSTORAGEPROC NamedBufferStorage; + PFNGLNAMEDBUFFERSUBDATAPROC NamedBufferSubData; + PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC NamedFramebufferDrawBuffer; + PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC NamedFramebufferDrawBuffers; + PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC NamedFramebufferParameteri; + PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC NamedFramebufferReadBuffer; + PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC NamedFramebufferRenderbuffer; + PFNGLNAMEDFRAMEBUFFERTEXTUREPROC NamedFramebufferTexture; + PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC NamedFramebufferTextureLayer; + PFNGLNAMEDRENDERBUFFERSTORAGEPROC NamedRenderbufferStorage; + PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC NamedRenderbufferStorageMultisample; + PFNGLOBJECTLABELPROC ObjectLabel; + PFNGLOBJECTPTRLABELPROC ObjectPtrLabel; + PFNGLPATCHPARAMETERFVPROC PatchParameterfv; + PFNGLPATCHPARAMETERIPROC PatchParameteri; + PFNGLPAUSETRANSFORMFEEDBACKPROC PauseTransformFeedback; + PFNGLPIXELSTOREFPROC PixelStoref; + PFNGLPIXELSTOREIPROC PixelStorei; + PFNGLPOINTPARAMETERFPROC PointParameterf; + PFNGLPOINTPARAMETERFVPROC PointParameterfv; + PFNGLPOINTPARAMETERIPROC PointParameteri; + PFNGLPOINTPARAMETERIVPROC PointParameteriv; + PFNGLPOINTSIZEPROC PointSize; + PFNGLPOLYGONMODEPROC PolygonMode; + PFNGLPOLYGONOFFSETPROC PolygonOffset; + PFNGLPOLYGONOFFSETCLAMPPROC PolygonOffsetClamp; + PFNGLPOPDEBUGGROUPPROC PopDebugGroup; + PFNGLPRIMITIVERESTARTINDEXPROC PrimitiveRestartIndex; + PFNGLPROGRAMBINARYPROC ProgramBinary; + PFNGLPROGRAMPARAMETERIPROC ProgramParameteri; + PFNGLPROGRAMUNIFORM1DPROC ProgramUniform1d; + PFNGLPROGRAMUNIFORM1DVPROC ProgramUniform1dv; + PFNGLPROGRAMUNIFORM1FPROC ProgramUniform1f; + PFNGLPROGRAMUNIFORM1FVPROC ProgramUniform1fv; + PFNGLPROGRAMUNIFORM1IPROC ProgramUniform1i; + PFNGLPROGRAMUNIFORM1IVPROC ProgramUniform1iv; + PFNGLPROGRAMUNIFORM1UIPROC ProgramUniform1ui; + PFNGLPROGRAMUNIFORM1UIVPROC ProgramUniform1uiv; + PFNGLPROGRAMUNIFORM2DPROC ProgramUniform2d; + PFNGLPROGRAMUNIFORM2DVPROC ProgramUniform2dv; + PFNGLPROGRAMUNIFORM2FPROC ProgramUniform2f; + PFNGLPROGRAMUNIFORM2FVPROC ProgramUniform2fv; + PFNGLPROGRAMUNIFORM2IPROC ProgramUniform2i; + PFNGLPROGRAMUNIFORM2IVPROC ProgramUniform2iv; + PFNGLPROGRAMUNIFORM2UIPROC ProgramUniform2ui; + PFNGLPROGRAMUNIFORM2UIVPROC ProgramUniform2uiv; + PFNGLPROGRAMUNIFORM3DPROC ProgramUniform3d; + PFNGLPROGRAMUNIFORM3DVPROC ProgramUniform3dv; + PFNGLPROGRAMUNIFORM3FPROC ProgramUniform3f; + PFNGLPROGRAMUNIFORM3FVPROC ProgramUniform3fv; + PFNGLPROGRAMUNIFORM3IPROC ProgramUniform3i; + PFNGLPROGRAMUNIFORM3IVPROC ProgramUniform3iv; + PFNGLPROGRAMUNIFORM3UIPROC ProgramUniform3ui; + PFNGLPROGRAMUNIFORM3UIVPROC ProgramUniform3uiv; + PFNGLPROGRAMUNIFORM4DPROC ProgramUniform4d; + PFNGLPROGRAMUNIFORM4DVPROC ProgramUniform4dv; + PFNGLPROGRAMUNIFORM4FPROC ProgramUniform4f; + PFNGLPROGRAMUNIFORM4FVPROC ProgramUniform4fv; + PFNGLPROGRAMUNIFORM4IPROC ProgramUniform4i; + PFNGLPROGRAMUNIFORM4IVPROC ProgramUniform4iv; + PFNGLPROGRAMUNIFORM4UIPROC ProgramUniform4ui; + PFNGLPROGRAMUNIFORM4UIVPROC ProgramUniform4uiv; + PFNGLPROGRAMUNIFORMMATRIX2DVPROC ProgramUniformMatrix2dv; + PFNGLPROGRAMUNIFORMMATRIX2FVPROC ProgramUniformMatrix2fv; + PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC ProgramUniformMatrix2x3dv; + PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC ProgramUniformMatrix2x3fv; + PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC ProgramUniformMatrix2x4dv; + PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC ProgramUniformMatrix2x4fv; + PFNGLPROGRAMUNIFORMMATRIX3DVPROC ProgramUniformMatrix3dv; + PFNGLPROGRAMUNIFORMMATRIX3FVPROC ProgramUniformMatrix3fv; + PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC ProgramUniformMatrix3x2dv; + PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC ProgramUniformMatrix3x2fv; + PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC ProgramUniformMatrix3x4dv; + PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC ProgramUniformMatrix3x4fv; + PFNGLPROGRAMUNIFORMMATRIX4DVPROC ProgramUniformMatrix4dv; + PFNGLPROGRAMUNIFORMMATRIX4FVPROC ProgramUniformMatrix4fv; + PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC ProgramUniformMatrix4x2dv; + PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC ProgramUniformMatrix4x2fv; + PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC ProgramUniformMatrix4x3dv; + PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC ProgramUniformMatrix4x3fv; + PFNGLPROVOKINGVERTEXPROC ProvokingVertex; + PFNGLPUSHDEBUGGROUPPROC PushDebugGroup; + PFNGLQUERYCOUNTERPROC QueryCounter; + PFNGLREADBUFFERPROC ReadBuffer; + PFNGLREADPIXELSPROC ReadPixels; + PFNGLREADNPIXELSPROC ReadnPixels; + PFNGLRELEASESHADERCOMPILERPROC ReleaseShaderCompiler; + PFNGLRENDERBUFFERSTORAGEPROC RenderbufferStorage; + PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC RenderbufferStorageMultisample; + PFNGLRESUMETRANSFORMFEEDBACKPROC ResumeTransformFeedback; + PFNGLSAMPLECOVERAGEPROC SampleCoverage; + PFNGLSAMPLEMASKIPROC SampleMaski; + PFNGLSAMPLERPARAMETERIIVPROC SamplerParameterIiv; + PFNGLSAMPLERPARAMETERIUIVPROC SamplerParameterIuiv; + PFNGLSAMPLERPARAMETERFPROC SamplerParameterf; + PFNGLSAMPLERPARAMETERFVPROC SamplerParameterfv; + PFNGLSAMPLERPARAMETERIPROC SamplerParameteri; + PFNGLSAMPLERPARAMETERIVPROC SamplerParameteriv; + PFNGLSCISSORPROC Scissor; + PFNGLSCISSORARRAYVPROC ScissorArrayv; + PFNGLSCISSORINDEXEDPROC ScissorIndexed; + PFNGLSCISSORINDEXEDVPROC ScissorIndexedv; + PFNGLSHADERBINARYPROC ShaderBinary; + PFNGLSHADERSOURCEPROC ShaderSource; + PFNGLSHADERSTORAGEBLOCKBINDINGPROC ShaderStorageBlockBinding; + PFNGLSPECIALIZESHADERPROC SpecializeShader; + PFNGLSTENCILFUNCPROC StencilFunc; + PFNGLSTENCILFUNCSEPARATEPROC StencilFuncSeparate; + PFNGLSTENCILMASKPROC StencilMask; + PFNGLSTENCILMASKSEPARATEPROC StencilMaskSeparate; + PFNGLSTENCILOPPROC StencilOp; + PFNGLSTENCILOPSEPARATEPROC StencilOpSeparate; + PFNGLTEXBUFFERPROC TexBuffer; + PFNGLTEXBUFFERRANGEPROC TexBufferRange; + PFNGLTEXIMAGE1DPROC TexImage1D; + PFNGLTEXIMAGE2DPROC TexImage2D; + PFNGLTEXIMAGE2DMULTISAMPLEPROC TexImage2DMultisample; + PFNGLTEXIMAGE3DPROC TexImage3D; + PFNGLTEXIMAGE3DMULTISAMPLEPROC TexImage3DMultisample; + PFNGLTEXPARAMETERIIVPROC TexParameterIiv; + PFNGLTEXPARAMETERIUIVPROC TexParameterIuiv; + PFNGLTEXPARAMETERFPROC TexParameterf; + PFNGLTEXPARAMETERFVPROC TexParameterfv; + PFNGLTEXPARAMETERIPROC TexParameteri; + PFNGLTEXPARAMETERIVPROC TexParameteriv; + PFNGLTEXSTORAGE1DPROC TexStorage1D; + PFNGLTEXSTORAGE2DPROC TexStorage2D; + PFNGLTEXSTORAGE2DMULTISAMPLEPROC TexStorage2DMultisample; + PFNGLTEXSTORAGE3DPROC TexStorage3D; + PFNGLTEXSTORAGE3DMULTISAMPLEPROC TexStorage3DMultisample; + PFNGLTEXSUBIMAGE1DPROC TexSubImage1D; + PFNGLTEXSUBIMAGE2DPROC TexSubImage2D; + PFNGLTEXSUBIMAGE3DPROC TexSubImage3D; + PFNGLTEXTUREBARRIERPROC TextureBarrier; + PFNGLTEXTUREBUFFERPROC TextureBuffer; + PFNGLTEXTUREBUFFERRANGEPROC TextureBufferRange; + PFNGLTEXTUREPARAMETERIIVPROC TextureParameterIiv; + PFNGLTEXTUREPARAMETERIUIVPROC TextureParameterIuiv; + PFNGLTEXTUREPARAMETERFPROC TextureParameterf; + PFNGLTEXTUREPARAMETERFVPROC TextureParameterfv; + PFNGLTEXTUREPARAMETERIPROC TextureParameteri; + PFNGLTEXTUREPARAMETERIVPROC TextureParameteriv; + PFNGLTEXTURESTORAGE1DPROC TextureStorage1D; + PFNGLTEXTURESTORAGE2DPROC TextureStorage2D; + PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC TextureStorage2DMultisample; + PFNGLTEXTURESTORAGE3DPROC TextureStorage3D; + PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC TextureStorage3DMultisample; + PFNGLTEXTURESUBIMAGE1DPROC TextureSubImage1D; + PFNGLTEXTURESUBIMAGE2DPROC TextureSubImage2D; + PFNGLTEXTURESUBIMAGE3DPROC TextureSubImage3D; + PFNGLTEXTUREVIEWPROC TextureView; + PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC TransformFeedbackBufferBase; + PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC TransformFeedbackBufferRange; + PFNGLTRANSFORMFEEDBACKVARYINGSPROC TransformFeedbackVaryings; + PFNGLUNIFORM1DPROC Uniform1d; + PFNGLUNIFORM1DVPROC Uniform1dv; + PFNGLUNIFORM1FPROC Uniform1f; + PFNGLUNIFORM1FVPROC Uniform1fv; + PFNGLUNIFORM1IPROC Uniform1i; + PFNGLUNIFORM1IVPROC Uniform1iv; + PFNGLUNIFORM1UIPROC Uniform1ui; + PFNGLUNIFORM1UIVPROC Uniform1uiv; + PFNGLUNIFORM2DPROC Uniform2d; + PFNGLUNIFORM2DVPROC Uniform2dv; + PFNGLUNIFORM2FPROC Uniform2f; + PFNGLUNIFORM2FVPROC Uniform2fv; + PFNGLUNIFORM2IPROC Uniform2i; + PFNGLUNIFORM2IVPROC Uniform2iv; + PFNGLUNIFORM2UIPROC Uniform2ui; + PFNGLUNIFORM2UIVPROC Uniform2uiv; + PFNGLUNIFORM3DPROC Uniform3d; + PFNGLUNIFORM3DVPROC Uniform3dv; + PFNGLUNIFORM3FPROC Uniform3f; + PFNGLUNIFORM3FVPROC Uniform3fv; + PFNGLUNIFORM3IPROC Uniform3i; + PFNGLUNIFORM3IVPROC Uniform3iv; + PFNGLUNIFORM3UIPROC Uniform3ui; + PFNGLUNIFORM3UIVPROC Uniform3uiv; + PFNGLUNIFORM4DPROC Uniform4d; + PFNGLUNIFORM4DVPROC Uniform4dv; + PFNGLUNIFORM4FPROC Uniform4f; + PFNGLUNIFORM4FVPROC Uniform4fv; + PFNGLUNIFORM4IPROC Uniform4i; + PFNGLUNIFORM4IVPROC Uniform4iv; + PFNGLUNIFORM4UIPROC Uniform4ui; + PFNGLUNIFORM4UIVPROC Uniform4uiv; + PFNGLUNIFORMBLOCKBINDINGPROC UniformBlockBinding; + PFNGLUNIFORMMATRIX2DVPROC UniformMatrix2dv; + PFNGLUNIFORMMATRIX2FVPROC UniformMatrix2fv; + PFNGLUNIFORMMATRIX2X3DVPROC UniformMatrix2x3dv; + PFNGLUNIFORMMATRIX2X3FVPROC UniformMatrix2x3fv; + PFNGLUNIFORMMATRIX2X4DVPROC UniformMatrix2x4dv; + PFNGLUNIFORMMATRIX2X4FVPROC UniformMatrix2x4fv; + PFNGLUNIFORMMATRIX3DVPROC UniformMatrix3dv; + PFNGLUNIFORMMATRIX3FVPROC UniformMatrix3fv; + PFNGLUNIFORMMATRIX3X2DVPROC UniformMatrix3x2dv; + PFNGLUNIFORMMATRIX3X2FVPROC UniformMatrix3x2fv; + PFNGLUNIFORMMATRIX3X4DVPROC UniformMatrix3x4dv; + PFNGLUNIFORMMATRIX3X4FVPROC UniformMatrix3x4fv; + PFNGLUNIFORMMATRIX4DVPROC UniformMatrix4dv; + PFNGLUNIFORMMATRIX4FVPROC UniformMatrix4fv; + PFNGLUNIFORMMATRIX4X2DVPROC UniformMatrix4x2dv; + PFNGLUNIFORMMATRIX4X2FVPROC UniformMatrix4x2fv; + PFNGLUNIFORMMATRIX4X3DVPROC UniformMatrix4x3dv; + PFNGLUNIFORMMATRIX4X3FVPROC UniformMatrix4x3fv; + PFNGLUNIFORMSUBROUTINESUIVPROC UniformSubroutinesuiv; + PFNGLUNMAPBUFFERPROC UnmapBuffer; + PFNGLUNMAPNAMEDBUFFERPROC UnmapNamedBuffer; + PFNGLUSEPROGRAMPROC UseProgram; + PFNGLUSEPROGRAMSTAGESPROC UseProgramStages; + PFNGLVALIDATEPROGRAMPROC ValidateProgram; + PFNGLVALIDATEPROGRAMPIPELINEPROC ValidateProgramPipeline; + PFNGLVERTEXARRAYATTRIBBINDINGPROC VertexArrayAttribBinding; + PFNGLVERTEXARRAYATTRIBFORMATPROC VertexArrayAttribFormat; + PFNGLVERTEXARRAYATTRIBIFORMATPROC VertexArrayAttribIFormat; + PFNGLVERTEXARRAYATTRIBLFORMATPROC VertexArrayAttribLFormat; + PFNGLVERTEXARRAYBINDINGDIVISORPROC VertexArrayBindingDivisor; + PFNGLVERTEXARRAYELEMENTBUFFERPROC VertexArrayElementBuffer; + PFNGLVERTEXARRAYVERTEXBUFFERPROC VertexArrayVertexBuffer; + PFNGLVERTEXARRAYVERTEXBUFFERSPROC VertexArrayVertexBuffers; + PFNGLVERTEXATTRIB1DPROC VertexAttrib1d; + PFNGLVERTEXATTRIB1DVPROC VertexAttrib1dv; + PFNGLVERTEXATTRIB1FPROC VertexAttrib1f; + PFNGLVERTEXATTRIB1FVPROC VertexAttrib1fv; + PFNGLVERTEXATTRIB1SPROC VertexAttrib1s; + PFNGLVERTEXATTRIB1SVPROC VertexAttrib1sv; + PFNGLVERTEXATTRIB2DPROC VertexAttrib2d; + PFNGLVERTEXATTRIB2DVPROC VertexAttrib2dv; + PFNGLVERTEXATTRIB2FPROC VertexAttrib2f; + PFNGLVERTEXATTRIB2FVPROC VertexAttrib2fv; + PFNGLVERTEXATTRIB2SPROC VertexAttrib2s; + PFNGLVERTEXATTRIB2SVPROC VertexAttrib2sv; + PFNGLVERTEXATTRIB3DPROC VertexAttrib3d; + PFNGLVERTEXATTRIB3DVPROC VertexAttrib3dv; + PFNGLVERTEXATTRIB3FPROC VertexAttrib3f; + PFNGLVERTEXATTRIB3FVPROC VertexAttrib3fv; + PFNGLVERTEXATTRIB3SPROC VertexAttrib3s; + PFNGLVERTEXATTRIB3SVPROC VertexAttrib3sv; + PFNGLVERTEXATTRIB4NBVPROC VertexAttrib4Nbv; + PFNGLVERTEXATTRIB4NIVPROC VertexAttrib4Niv; + PFNGLVERTEXATTRIB4NSVPROC VertexAttrib4Nsv; + PFNGLVERTEXATTRIB4NUBPROC VertexAttrib4Nub; + PFNGLVERTEXATTRIB4NUBVPROC VertexAttrib4Nubv; + PFNGLVERTEXATTRIB4NUIVPROC VertexAttrib4Nuiv; + PFNGLVERTEXATTRIB4NUSVPROC VertexAttrib4Nusv; + PFNGLVERTEXATTRIB4BVPROC VertexAttrib4bv; + PFNGLVERTEXATTRIB4DPROC VertexAttrib4d; + PFNGLVERTEXATTRIB4DVPROC VertexAttrib4dv; + PFNGLVERTEXATTRIB4FPROC VertexAttrib4f; + PFNGLVERTEXATTRIB4FVPROC VertexAttrib4fv; + PFNGLVERTEXATTRIB4IVPROC VertexAttrib4iv; + PFNGLVERTEXATTRIB4SPROC VertexAttrib4s; + PFNGLVERTEXATTRIB4SVPROC VertexAttrib4sv; + PFNGLVERTEXATTRIB4UBVPROC VertexAttrib4ubv; + PFNGLVERTEXATTRIB4UIVPROC VertexAttrib4uiv; + PFNGLVERTEXATTRIB4USVPROC VertexAttrib4usv; + PFNGLVERTEXATTRIBBINDINGPROC VertexAttribBinding; + PFNGLVERTEXATTRIBDIVISORPROC VertexAttribDivisor; + PFNGLVERTEXATTRIBFORMATPROC VertexAttribFormat; + PFNGLVERTEXATTRIBI1IPROC VertexAttribI1i; + PFNGLVERTEXATTRIBI1IVPROC VertexAttribI1iv; + PFNGLVERTEXATTRIBI1UIPROC VertexAttribI1ui; + PFNGLVERTEXATTRIBI1UIVPROC VertexAttribI1uiv; + PFNGLVERTEXATTRIBI2IPROC VertexAttribI2i; + PFNGLVERTEXATTRIBI2IVPROC VertexAttribI2iv; + PFNGLVERTEXATTRIBI2UIPROC VertexAttribI2ui; + PFNGLVERTEXATTRIBI2UIVPROC VertexAttribI2uiv; + PFNGLVERTEXATTRIBI3IPROC VertexAttribI3i; + PFNGLVERTEXATTRIBI3IVPROC VertexAttribI3iv; + PFNGLVERTEXATTRIBI3UIPROC VertexAttribI3ui; + PFNGLVERTEXATTRIBI3UIVPROC VertexAttribI3uiv; + PFNGLVERTEXATTRIBI4BVPROC VertexAttribI4bv; + PFNGLVERTEXATTRIBI4IPROC VertexAttribI4i; + PFNGLVERTEXATTRIBI4IVPROC VertexAttribI4iv; + PFNGLVERTEXATTRIBI4SVPROC VertexAttribI4sv; + PFNGLVERTEXATTRIBI4UBVPROC VertexAttribI4ubv; + PFNGLVERTEXATTRIBI4UIPROC VertexAttribI4ui; + PFNGLVERTEXATTRIBI4UIVPROC VertexAttribI4uiv; + PFNGLVERTEXATTRIBI4USVPROC VertexAttribI4usv; + PFNGLVERTEXATTRIBIFORMATPROC VertexAttribIFormat; + PFNGLVERTEXATTRIBIPOINTERPROC VertexAttribIPointer; + PFNGLVERTEXATTRIBL1DPROC VertexAttribL1d; + PFNGLVERTEXATTRIBL1DVPROC VertexAttribL1dv; + PFNGLVERTEXATTRIBL2DPROC VertexAttribL2d; + PFNGLVERTEXATTRIBL2DVPROC VertexAttribL2dv; + PFNGLVERTEXATTRIBL3DPROC VertexAttribL3d; + PFNGLVERTEXATTRIBL3DVPROC VertexAttribL3dv; + PFNGLVERTEXATTRIBL4DPROC VertexAttribL4d; + PFNGLVERTEXATTRIBL4DVPROC VertexAttribL4dv; + PFNGLVERTEXATTRIBLFORMATPROC VertexAttribLFormat; + PFNGLVERTEXATTRIBLPOINTERPROC VertexAttribLPointer; + PFNGLVERTEXATTRIBP1UIPROC VertexAttribP1ui; + PFNGLVERTEXATTRIBP1UIVPROC VertexAttribP1uiv; + PFNGLVERTEXATTRIBP2UIPROC VertexAttribP2ui; + PFNGLVERTEXATTRIBP2UIVPROC VertexAttribP2uiv; + PFNGLVERTEXATTRIBP3UIPROC VertexAttribP3ui; + PFNGLVERTEXATTRIBP3UIVPROC VertexAttribP3uiv; + PFNGLVERTEXATTRIBP4UIPROC VertexAttribP4ui; + PFNGLVERTEXATTRIBP4UIVPROC VertexAttribP4uiv; + PFNGLVERTEXATTRIBPOINTERPROC VertexAttribPointer; + PFNGLVERTEXBINDINGDIVISORPROC VertexBindingDivisor; + PFNGLVIEWPORTPROC Viewport; + PFNGLVIEWPORTARRAYVPROC ViewportArrayv; + PFNGLVIEWPORTINDEXEDFPROC ViewportIndexedf; + PFNGLVIEWPORTINDEXEDFVPROC ViewportIndexedfv; + PFNGLWAITSYNCPROC WaitSync; + +} GladGLContext; + + + + + + +GLAD_API_CALL int gladLoadGLContextUserPtr(GladGLContext *context, GLADuserptrloadfunc load, void *userptr); +GLAD_API_CALL int gladLoadGLContext(GladGLContext *context, GLADloadfunc load); + + + +#ifdef __cplusplus +} +#endif +#endif + +/* Source */ +#ifdef GLAD_GL_IMPLEMENTATION +/** + * SPDX-License-Identifier: (WTFPL OR CC0-1.0) AND Apache-2.0 + */ +#include +#include +#include + +#ifndef GLAD_IMPL_UTIL_C_ +#define GLAD_IMPL_UTIL_C_ + +#ifdef _MSC_VER +#define GLAD_IMPL_UTIL_SSCANF sscanf_s +#else +#define GLAD_IMPL_UTIL_SSCANF sscanf +#endif + +#endif /* GLAD_IMPL_UTIL_C_ */ + +#ifdef __cplusplus +extern "C" { +#endif + + + + + + + + +static void glad_gl_load_GL_VERSION_1_0(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { + if(!context->VERSION_1_0) return; + context->BlendFunc = (PFNGLBLENDFUNCPROC) load(userptr, "glBlendFunc"); + context->Clear = (PFNGLCLEARPROC) load(userptr, "glClear"); + context->ClearColor = (PFNGLCLEARCOLORPROC) load(userptr, "glClearColor"); + context->ClearDepth = (PFNGLCLEARDEPTHPROC) load(userptr, "glClearDepth"); + context->ClearStencil = (PFNGLCLEARSTENCILPROC) load(userptr, "glClearStencil"); + context->ColorMask = (PFNGLCOLORMASKPROC) load(userptr, "glColorMask"); + context->CullFace = (PFNGLCULLFACEPROC) load(userptr, "glCullFace"); + context->DepthFunc = (PFNGLDEPTHFUNCPROC) load(userptr, "glDepthFunc"); + context->DepthMask = (PFNGLDEPTHMASKPROC) load(userptr, "glDepthMask"); + context->DepthRange = (PFNGLDEPTHRANGEPROC) load(userptr, "glDepthRange"); + context->Disable = (PFNGLDISABLEPROC) load(userptr, "glDisable"); + context->DrawBuffer = (PFNGLDRAWBUFFERPROC) load(userptr, "glDrawBuffer"); + context->Enable = (PFNGLENABLEPROC) load(userptr, "glEnable"); + context->Finish = (PFNGLFINISHPROC) load(userptr, "glFinish"); + context->Flush = (PFNGLFLUSHPROC) load(userptr, "glFlush"); + context->FrontFace = (PFNGLFRONTFACEPROC) load(userptr, "glFrontFace"); + context->GetBooleanv = (PFNGLGETBOOLEANVPROC) load(userptr, "glGetBooleanv"); + context->GetDoublev = (PFNGLGETDOUBLEVPROC) load(userptr, "glGetDoublev"); + context->GetError = (PFNGLGETERRORPROC) load(userptr, "glGetError"); + context->GetFloatv = (PFNGLGETFLOATVPROC) load(userptr, "glGetFloatv"); + context->GetIntegerv = (PFNGLGETINTEGERVPROC) load(userptr, "glGetIntegerv"); + context->GetString = (PFNGLGETSTRINGPROC) load(userptr, "glGetString"); + context->GetTexImage = (PFNGLGETTEXIMAGEPROC) load(userptr, "glGetTexImage"); + context->GetTexLevelParameterfv = (PFNGLGETTEXLEVELPARAMETERFVPROC) load(userptr, "glGetTexLevelParameterfv"); + context->GetTexLevelParameteriv = (PFNGLGETTEXLEVELPARAMETERIVPROC) load(userptr, "glGetTexLevelParameteriv"); + context->GetTexParameterfv = (PFNGLGETTEXPARAMETERFVPROC) load(userptr, "glGetTexParameterfv"); + context->GetTexParameteriv = (PFNGLGETTEXPARAMETERIVPROC) load(userptr, "glGetTexParameteriv"); + context->Hint = (PFNGLHINTPROC) load(userptr, "glHint"); + context->IsEnabled = (PFNGLISENABLEDPROC) load(userptr, "glIsEnabled"); + context->LineWidth = (PFNGLLINEWIDTHPROC) load(userptr, "glLineWidth"); + context->LogicOp = (PFNGLLOGICOPPROC) load(userptr, "glLogicOp"); + context->PixelStoref = (PFNGLPIXELSTOREFPROC) load(userptr, "glPixelStoref"); + context->PixelStorei = (PFNGLPIXELSTOREIPROC) load(userptr, "glPixelStorei"); + context->PointSize = (PFNGLPOINTSIZEPROC) load(userptr, "glPointSize"); + context->PolygonMode = (PFNGLPOLYGONMODEPROC) load(userptr, "glPolygonMode"); + context->ReadBuffer = (PFNGLREADBUFFERPROC) load(userptr, "glReadBuffer"); + context->ReadPixels = (PFNGLREADPIXELSPROC) load(userptr, "glReadPixels"); + context->Scissor = (PFNGLSCISSORPROC) load(userptr, "glScissor"); + context->StencilFunc = (PFNGLSTENCILFUNCPROC) load(userptr, "glStencilFunc"); + context->StencilMask = (PFNGLSTENCILMASKPROC) load(userptr, "glStencilMask"); + context->StencilOp = (PFNGLSTENCILOPPROC) load(userptr, "glStencilOp"); + context->TexImage1D = (PFNGLTEXIMAGE1DPROC) load(userptr, "glTexImage1D"); + context->TexImage2D = (PFNGLTEXIMAGE2DPROC) load(userptr, "glTexImage2D"); + context->TexParameterf = (PFNGLTEXPARAMETERFPROC) load(userptr, "glTexParameterf"); + context->TexParameterfv = (PFNGLTEXPARAMETERFVPROC) load(userptr, "glTexParameterfv"); + context->TexParameteri = (PFNGLTEXPARAMETERIPROC) load(userptr, "glTexParameteri"); + context->TexParameteriv = (PFNGLTEXPARAMETERIVPROC) load(userptr, "glTexParameteriv"); + context->Viewport = (PFNGLVIEWPORTPROC) load(userptr, "glViewport"); +} +static void glad_gl_load_GL_VERSION_1_1(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { + if(!context->VERSION_1_1) return; + context->BindTexture = (PFNGLBINDTEXTUREPROC) load(userptr, "glBindTexture"); + context->CopyTexImage1D = (PFNGLCOPYTEXIMAGE1DPROC) load(userptr, "glCopyTexImage1D"); + context->CopyTexImage2D = (PFNGLCOPYTEXIMAGE2DPROC) load(userptr, "glCopyTexImage2D"); + context->CopyTexSubImage1D = (PFNGLCOPYTEXSUBIMAGE1DPROC) load(userptr, "glCopyTexSubImage1D"); + context->CopyTexSubImage2D = (PFNGLCOPYTEXSUBIMAGE2DPROC) load(userptr, "glCopyTexSubImage2D"); + context->DeleteTextures = (PFNGLDELETETEXTURESPROC) load(userptr, "glDeleteTextures"); + context->DrawArrays = (PFNGLDRAWARRAYSPROC) load(userptr, "glDrawArrays"); + context->DrawElements = (PFNGLDRAWELEMENTSPROC) load(userptr, "glDrawElements"); + context->GenTextures = (PFNGLGENTEXTURESPROC) load(userptr, "glGenTextures"); + context->GetPointerv = (PFNGLGETPOINTERVPROC) load(userptr, "glGetPointerv"); + context->IsTexture = (PFNGLISTEXTUREPROC) load(userptr, "glIsTexture"); + context->PolygonOffset = (PFNGLPOLYGONOFFSETPROC) load(userptr, "glPolygonOffset"); + context->TexSubImage1D = (PFNGLTEXSUBIMAGE1DPROC) load(userptr, "glTexSubImage1D"); + context->TexSubImage2D = (PFNGLTEXSUBIMAGE2DPROC) load(userptr, "glTexSubImage2D"); +} +static void glad_gl_load_GL_VERSION_1_2(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { + if(!context->VERSION_1_2) return; + context->CopyTexSubImage3D = (PFNGLCOPYTEXSUBIMAGE3DPROC) load(userptr, "glCopyTexSubImage3D"); + context->DrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC) load(userptr, "glDrawRangeElements"); + context->TexImage3D = (PFNGLTEXIMAGE3DPROC) load(userptr, "glTexImage3D"); + context->TexSubImage3D = (PFNGLTEXSUBIMAGE3DPROC) load(userptr, "glTexSubImage3D"); +} +static void glad_gl_load_GL_VERSION_1_3(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { + if(!context->VERSION_1_3) return; + context->ActiveTexture = (PFNGLACTIVETEXTUREPROC) load(userptr, "glActiveTexture"); + context->CompressedTexImage1D = (PFNGLCOMPRESSEDTEXIMAGE1DPROC) load(userptr, "glCompressedTexImage1D"); + context->CompressedTexImage2D = (PFNGLCOMPRESSEDTEXIMAGE2DPROC) load(userptr, "glCompressedTexImage2D"); + context->CompressedTexImage3D = (PFNGLCOMPRESSEDTEXIMAGE3DPROC) load(userptr, "glCompressedTexImage3D"); + context->CompressedTexSubImage1D = (PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) load(userptr, "glCompressedTexSubImage1D"); + context->CompressedTexSubImage2D = (PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) load(userptr, "glCompressedTexSubImage2D"); + context->CompressedTexSubImage3D = (PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) load(userptr, "glCompressedTexSubImage3D"); + context->GetCompressedTexImage = (PFNGLGETCOMPRESSEDTEXIMAGEPROC) load(userptr, "glGetCompressedTexImage"); + context->SampleCoverage = (PFNGLSAMPLECOVERAGEPROC) load(userptr, "glSampleCoverage"); +} +static void glad_gl_load_GL_VERSION_1_4(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { + if(!context->VERSION_1_4) return; + context->BlendColor = (PFNGLBLENDCOLORPROC) load(userptr, "glBlendColor"); + context->BlendEquation = (PFNGLBLENDEQUATIONPROC) load(userptr, "glBlendEquation"); + context->BlendFuncSeparate = (PFNGLBLENDFUNCSEPARATEPROC) load(userptr, "glBlendFuncSeparate"); + context->MultiDrawArrays = (PFNGLMULTIDRAWARRAYSPROC) load(userptr, "glMultiDrawArrays"); + context->MultiDrawElements = (PFNGLMULTIDRAWELEMENTSPROC) load(userptr, "glMultiDrawElements"); + context->PointParameterf = (PFNGLPOINTPARAMETERFPROC) load(userptr, "glPointParameterf"); + context->PointParameterfv = (PFNGLPOINTPARAMETERFVPROC) load(userptr, "glPointParameterfv"); + context->PointParameteri = (PFNGLPOINTPARAMETERIPROC) load(userptr, "glPointParameteri"); + context->PointParameteriv = (PFNGLPOINTPARAMETERIVPROC) load(userptr, "glPointParameteriv"); +} +static void glad_gl_load_GL_VERSION_1_5(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { + if(!context->VERSION_1_5) return; + context->BeginQuery = (PFNGLBEGINQUERYPROC) load(userptr, "glBeginQuery"); + context->BindBuffer = (PFNGLBINDBUFFERPROC) load(userptr, "glBindBuffer"); + context->BufferData = (PFNGLBUFFERDATAPROC) load(userptr, "glBufferData"); + context->BufferSubData = (PFNGLBUFFERSUBDATAPROC) load(userptr, "glBufferSubData"); + context->DeleteBuffers = (PFNGLDELETEBUFFERSPROC) load(userptr, "glDeleteBuffers"); + context->DeleteQueries = (PFNGLDELETEQUERIESPROC) load(userptr, "glDeleteQueries"); + context->EndQuery = (PFNGLENDQUERYPROC) load(userptr, "glEndQuery"); + context->GenBuffers = (PFNGLGENBUFFERSPROC) load(userptr, "glGenBuffers"); + context->GenQueries = (PFNGLGENQUERIESPROC) load(userptr, "glGenQueries"); + context->GetBufferParameteriv = (PFNGLGETBUFFERPARAMETERIVPROC) load(userptr, "glGetBufferParameteriv"); + context->GetBufferPointerv = (PFNGLGETBUFFERPOINTERVPROC) load(userptr, "glGetBufferPointerv"); + context->GetBufferSubData = (PFNGLGETBUFFERSUBDATAPROC) load(userptr, "glGetBufferSubData"); + context->GetQueryObjectiv = (PFNGLGETQUERYOBJECTIVPROC) load(userptr, "glGetQueryObjectiv"); + context->GetQueryObjectuiv = (PFNGLGETQUERYOBJECTUIVPROC) load(userptr, "glGetQueryObjectuiv"); + context->GetQueryiv = (PFNGLGETQUERYIVPROC) load(userptr, "glGetQueryiv"); + context->IsBuffer = (PFNGLISBUFFERPROC) load(userptr, "glIsBuffer"); + context->IsQuery = (PFNGLISQUERYPROC) load(userptr, "glIsQuery"); + context->MapBuffer = (PFNGLMAPBUFFERPROC) load(userptr, "glMapBuffer"); + context->UnmapBuffer = (PFNGLUNMAPBUFFERPROC) load(userptr, "glUnmapBuffer"); +} +static void glad_gl_load_GL_VERSION_2_0(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { + if(!context->VERSION_2_0) return; + context->AttachShader = (PFNGLATTACHSHADERPROC) load(userptr, "glAttachShader"); + context->BindAttribLocation = (PFNGLBINDATTRIBLOCATIONPROC) load(userptr, "glBindAttribLocation"); + context->BlendEquationSeparate = (PFNGLBLENDEQUATIONSEPARATEPROC) load(userptr, "glBlendEquationSeparate"); + context->CompileShader = (PFNGLCOMPILESHADERPROC) load(userptr, "glCompileShader"); + context->CreateProgram = (PFNGLCREATEPROGRAMPROC) load(userptr, "glCreateProgram"); + context->CreateShader = (PFNGLCREATESHADERPROC) load(userptr, "glCreateShader"); + context->DeleteProgram = (PFNGLDELETEPROGRAMPROC) load(userptr, "glDeleteProgram"); + context->DeleteShader = (PFNGLDELETESHADERPROC) load(userptr, "glDeleteShader"); + context->DetachShader = (PFNGLDETACHSHADERPROC) load(userptr, "glDetachShader"); + context->DisableVertexAttribArray = (PFNGLDISABLEVERTEXATTRIBARRAYPROC) load(userptr, "glDisableVertexAttribArray"); + context->DrawBuffers = (PFNGLDRAWBUFFERSPROC) load(userptr, "glDrawBuffers"); + context->EnableVertexAttribArray = (PFNGLENABLEVERTEXATTRIBARRAYPROC) load(userptr, "glEnableVertexAttribArray"); + context->GetActiveAttrib = (PFNGLGETACTIVEATTRIBPROC) load(userptr, "glGetActiveAttrib"); + context->GetActiveUniform = (PFNGLGETACTIVEUNIFORMPROC) load(userptr, "glGetActiveUniform"); + context->GetAttachedShaders = (PFNGLGETATTACHEDSHADERSPROC) load(userptr, "glGetAttachedShaders"); + context->GetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC) load(userptr, "glGetAttribLocation"); + context->GetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC) load(userptr, "glGetProgramInfoLog"); + context->GetProgramiv = (PFNGLGETPROGRAMIVPROC) load(userptr, "glGetProgramiv"); + context->GetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC) load(userptr, "glGetShaderInfoLog"); + context->GetShaderSource = (PFNGLGETSHADERSOURCEPROC) load(userptr, "glGetShaderSource"); + context->GetShaderiv = (PFNGLGETSHADERIVPROC) load(userptr, "glGetShaderiv"); + context->GetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC) load(userptr, "glGetUniformLocation"); + context->GetUniformfv = (PFNGLGETUNIFORMFVPROC) load(userptr, "glGetUniformfv"); + context->GetUniformiv = (PFNGLGETUNIFORMIVPROC) load(userptr, "glGetUniformiv"); + context->GetVertexAttribPointerv = (PFNGLGETVERTEXATTRIBPOINTERVPROC) load(userptr, "glGetVertexAttribPointerv"); + context->GetVertexAttribdv = (PFNGLGETVERTEXATTRIBDVPROC) load(userptr, "glGetVertexAttribdv"); + context->GetVertexAttribfv = (PFNGLGETVERTEXATTRIBFVPROC) load(userptr, "glGetVertexAttribfv"); + context->GetVertexAttribiv = (PFNGLGETVERTEXATTRIBIVPROC) load(userptr, "glGetVertexAttribiv"); + context->IsProgram = (PFNGLISPROGRAMPROC) load(userptr, "glIsProgram"); + context->IsShader = (PFNGLISSHADERPROC) load(userptr, "glIsShader"); + context->LinkProgram = (PFNGLLINKPROGRAMPROC) load(userptr, "glLinkProgram"); + context->ShaderSource = (PFNGLSHADERSOURCEPROC) load(userptr, "glShaderSource"); + context->StencilFuncSeparate = (PFNGLSTENCILFUNCSEPARATEPROC) load(userptr, "glStencilFuncSeparate"); + context->StencilMaskSeparate = (PFNGLSTENCILMASKSEPARATEPROC) load(userptr, "glStencilMaskSeparate"); + context->StencilOpSeparate = (PFNGLSTENCILOPSEPARATEPROC) load(userptr, "glStencilOpSeparate"); + context->Uniform1f = (PFNGLUNIFORM1FPROC) load(userptr, "glUniform1f"); + context->Uniform1fv = (PFNGLUNIFORM1FVPROC) load(userptr, "glUniform1fv"); + context->Uniform1i = (PFNGLUNIFORM1IPROC) load(userptr, "glUniform1i"); + context->Uniform1iv = (PFNGLUNIFORM1IVPROC) load(userptr, "glUniform1iv"); + context->Uniform2f = (PFNGLUNIFORM2FPROC) load(userptr, "glUniform2f"); + context->Uniform2fv = (PFNGLUNIFORM2FVPROC) load(userptr, "glUniform2fv"); + context->Uniform2i = (PFNGLUNIFORM2IPROC) load(userptr, "glUniform2i"); + context->Uniform2iv = (PFNGLUNIFORM2IVPROC) load(userptr, "glUniform2iv"); + context->Uniform3f = (PFNGLUNIFORM3FPROC) load(userptr, "glUniform3f"); + context->Uniform3fv = (PFNGLUNIFORM3FVPROC) load(userptr, "glUniform3fv"); + context->Uniform3i = (PFNGLUNIFORM3IPROC) load(userptr, "glUniform3i"); + context->Uniform3iv = (PFNGLUNIFORM3IVPROC) load(userptr, "glUniform3iv"); + context->Uniform4f = (PFNGLUNIFORM4FPROC) load(userptr, "glUniform4f"); + context->Uniform4fv = (PFNGLUNIFORM4FVPROC) load(userptr, "glUniform4fv"); + context->Uniform4i = (PFNGLUNIFORM4IPROC) load(userptr, "glUniform4i"); + context->Uniform4iv = (PFNGLUNIFORM4IVPROC) load(userptr, "glUniform4iv"); + context->UniformMatrix2fv = (PFNGLUNIFORMMATRIX2FVPROC) load(userptr, "glUniformMatrix2fv"); + context->UniformMatrix3fv = (PFNGLUNIFORMMATRIX3FVPROC) load(userptr, "glUniformMatrix3fv"); + context->UniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC) load(userptr, "glUniformMatrix4fv"); + context->UseProgram = (PFNGLUSEPROGRAMPROC) load(userptr, "glUseProgram"); + context->ValidateProgram = (PFNGLVALIDATEPROGRAMPROC) load(userptr, "glValidateProgram"); + context->VertexAttrib1d = (PFNGLVERTEXATTRIB1DPROC) load(userptr, "glVertexAttrib1d"); + context->VertexAttrib1dv = (PFNGLVERTEXATTRIB1DVPROC) load(userptr, "glVertexAttrib1dv"); + context->VertexAttrib1f = (PFNGLVERTEXATTRIB1FPROC) load(userptr, "glVertexAttrib1f"); + context->VertexAttrib1fv = (PFNGLVERTEXATTRIB1FVPROC) load(userptr, "glVertexAttrib1fv"); + context->VertexAttrib1s = (PFNGLVERTEXATTRIB1SPROC) load(userptr, "glVertexAttrib1s"); + context->VertexAttrib1sv = (PFNGLVERTEXATTRIB1SVPROC) load(userptr, "glVertexAttrib1sv"); + context->VertexAttrib2d = (PFNGLVERTEXATTRIB2DPROC) load(userptr, "glVertexAttrib2d"); + context->VertexAttrib2dv = (PFNGLVERTEXATTRIB2DVPROC) load(userptr, "glVertexAttrib2dv"); + context->VertexAttrib2f = (PFNGLVERTEXATTRIB2FPROC) load(userptr, "glVertexAttrib2f"); + context->VertexAttrib2fv = (PFNGLVERTEXATTRIB2FVPROC) load(userptr, "glVertexAttrib2fv"); + context->VertexAttrib2s = (PFNGLVERTEXATTRIB2SPROC) load(userptr, "glVertexAttrib2s"); + context->VertexAttrib2sv = (PFNGLVERTEXATTRIB2SVPROC) load(userptr, "glVertexAttrib2sv"); + context->VertexAttrib3d = (PFNGLVERTEXATTRIB3DPROC) load(userptr, "glVertexAttrib3d"); + context->VertexAttrib3dv = (PFNGLVERTEXATTRIB3DVPROC) load(userptr, "glVertexAttrib3dv"); + context->VertexAttrib3f = (PFNGLVERTEXATTRIB3FPROC) load(userptr, "glVertexAttrib3f"); + context->VertexAttrib3fv = (PFNGLVERTEXATTRIB3FVPROC) load(userptr, "glVertexAttrib3fv"); + context->VertexAttrib3s = (PFNGLVERTEXATTRIB3SPROC) load(userptr, "glVertexAttrib3s"); + context->VertexAttrib3sv = (PFNGLVERTEXATTRIB3SVPROC) load(userptr, "glVertexAttrib3sv"); + context->VertexAttrib4Nbv = (PFNGLVERTEXATTRIB4NBVPROC) load(userptr, "glVertexAttrib4Nbv"); + context->VertexAttrib4Niv = (PFNGLVERTEXATTRIB4NIVPROC) load(userptr, "glVertexAttrib4Niv"); + context->VertexAttrib4Nsv = (PFNGLVERTEXATTRIB4NSVPROC) load(userptr, "glVertexAttrib4Nsv"); + context->VertexAttrib4Nub = (PFNGLVERTEXATTRIB4NUBPROC) load(userptr, "glVertexAttrib4Nub"); + context->VertexAttrib4Nubv = (PFNGLVERTEXATTRIB4NUBVPROC) load(userptr, "glVertexAttrib4Nubv"); + context->VertexAttrib4Nuiv = (PFNGLVERTEXATTRIB4NUIVPROC) load(userptr, "glVertexAttrib4Nuiv"); + context->VertexAttrib4Nusv = (PFNGLVERTEXATTRIB4NUSVPROC) load(userptr, "glVertexAttrib4Nusv"); + context->VertexAttrib4bv = (PFNGLVERTEXATTRIB4BVPROC) load(userptr, "glVertexAttrib4bv"); + context->VertexAttrib4d = (PFNGLVERTEXATTRIB4DPROC) load(userptr, "glVertexAttrib4d"); + context->VertexAttrib4dv = (PFNGLVERTEXATTRIB4DVPROC) load(userptr, "glVertexAttrib4dv"); + context->VertexAttrib4f = (PFNGLVERTEXATTRIB4FPROC) load(userptr, "glVertexAttrib4f"); + context->VertexAttrib4fv = (PFNGLVERTEXATTRIB4FVPROC) load(userptr, "glVertexAttrib4fv"); + context->VertexAttrib4iv = (PFNGLVERTEXATTRIB4IVPROC) load(userptr, "glVertexAttrib4iv"); + context->VertexAttrib4s = (PFNGLVERTEXATTRIB4SPROC) load(userptr, "glVertexAttrib4s"); + context->VertexAttrib4sv = (PFNGLVERTEXATTRIB4SVPROC) load(userptr, "glVertexAttrib4sv"); + context->VertexAttrib4ubv = (PFNGLVERTEXATTRIB4UBVPROC) load(userptr, "glVertexAttrib4ubv"); + context->VertexAttrib4uiv = (PFNGLVERTEXATTRIB4UIVPROC) load(userptr, "glVertexAttrib4uiv"); + context->VertexAttrib4usv = (PFNGLVERTEXATTRIB4USVPROC) load(userptr, "glVertexAttrib4usv"); + context->VertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC) load(userptr, "glVertexAttribPointer"); +} +static void glad_gl_load_GL_VERSION_2_1(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { + if(!context->VERSION_2_1) return; + context->UniformMatrix2x3fv = (PFNGLUNIFORMMATRIX2X3FVPROC) load(userptr, "glUniformMatrix2x3fv"); + context->UniformMatrix2x4fv = (PFNGLUNIFORMMATRIX2X4FVPROC) load(userptr, "glUniformMatrix2x4fv"); + context->UniformMatrix3x2fv = (PFNGLUNIFORMMATRIX3X2FVPROC) load(userptr, "glUniformMatrix3x2fv"); + context->UniformMatrix3x4fv = (PFNGLUNIFORMMATRIX3X4FVPROC) load(userptr, "glUniformMatrix3x4fv"); + context->UniformMatrix4x2fv = (PFNGLUNIFORMMATRIX4X2FVPROC) load(userptr, "glUniformMatrix4x2fv"); + context->UniformMatrix4x3fv = (PFNGLUNIFORMMATRIX4X3FVPROC) load(userptr, "glUniformMatrix4x3fv"); +} +static void glad_gl_load_GL_VERSION_3_0(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { + if(!context->VERSION_3_0) return; + context->BeginConditionalRender = (PFNGLBEGINCONDITIONALRENDERPROC) load(userptr, "glBeginConditionalRender"); + context->BeginTransformFeedback = (PFNGLBEGINTRANSFORMFEEDBACKPROC) load(userptr, "glBeginTransformFeedback"); + context->BindBufferBase = (PFNGLBINDBUFFERBASEPROC) load(userptr, "glBindBufferBase"); + context->BindBufferRange = (PFNGLBINDBUFFERRANGEPROC) load(userptr, "glBindBufferRange"); + context->BindFragDataLocation = (PFNGLBINDFRAGDATALOCATIONPROC) load(userptr, "glBindFragDataLocation"); + context->BindFramebuffer = (PFNGLBINDFRAMEBUFFERPROC) load(userptr, "glBindFramebuffer"); + context->BindRenderbuffer = (PFNGLBINDRENDERBUFFERPROC) load(userptr, "glBindRenderbuffer"); + context->BindVertexArray = (PFNGLBINDVERTEXARRAYPROC) load(userptr, "glBindVertexArray"); + context->BlitFramebuffer = (PFNGLBLITFRAMEBUFFERPROC) load(userptr, "glBlitFramebuffer"); + context->CheckFramebufferStatus = (PFNGLCHECKFRAMEBUFFERSTATUSPROC) load(userptr, "glCheckFramebufferStatus"); + context->ClampColor = (PFNGLCLAMPCOLORPROC) load(userptr, "glClampColor"); + context->ClearBufferfi = (PFNGLCLEARBUFFERFIPROC) load(userptr, "glClearBufferfi"); + context->ClearBufferfv = (PFNGLCLEARBUFFERFVPROC) load(userptr, "glClearBufferfv"); + context->ClearBufferiv = (PFNGLCLEARBUFFERIVPROC) load(userptr, "glClearBufferiv"); + context->ClearBufferuiv = (PFNGLCLEARBUFFERUIVPROC) load(userptr, "glClearBufferuiv"); + context->ColorMaski = (PFNGLCOLORMASKIPROC) load(userptr, "glColorMaski"); + context->DeleteFramebuffers = (PFNGLDELETEFRAMEBUFFERSPROC) load(userptr, "glDeleteFramebuffers"); + context->DeleteRenderbuffers = (PFNGLDELETERENDERBUFFERSPROC) load(userptr, "glDeleteRenderbuffers"); + context->DeleteVertexArrays = (PFNGLDELETEVERTEXARRAYSPROC) load(userptr, "glDeleteVertexArrays"); + context->Disablei = (PFNGLDISABLEIPROC) load(userptr, "glDisablei"); + context->Enablei = (PFNGLENABLEIPROC) load(userptr, "glEnablei"); + context->EndConditionalRender = (PFNGLENDCONDITIONALRENDERPROC) load(userptr, "glEndConditionalRender"); + context->EndTransformFeedback = (PFNGLENDTRANSFORMFEEDBACKPROC) load(userptr, "glEndTransformFeedback"); + context->FlushMappedBufferRange = (PFNGLFLUSHMAPPEDBUFFERRANGEPROC) load(userptr, "glFlushMappedBufferRange"); + context->FramebufferRenderbuffer = (PFNGLFRAMEBUFFERRENDERBUFFERPROC) load(userptr, "glFramebufferRenderbuffer"); + context->FramebufferTexture1D = (PFNGLFRAMEBUFFERTEXTURE1DPROC) load(userptr, "glFramebufferTexture1D"); + context->FramebufferTexture2D = (PFNGLFRAMEBUFFERTEXTURE2DPROC) load(userptr, "glFramebufferTexture2D"); + context->FramebufferTexture3D = (PFNGLFRAMEBUFFERTEXTURE3DPROC) load(userptr, "glFramebufferTexture3D"); + context->FramebufferTextureLayer = (PFNGLFRAMEBUFFERTEXTURELAYERPROC) load(userptr, "glFramebufferTextureLayer"); + context->GenFramebuffers = (PFNGLGENFRAMEBUFFERSPROC) load(userptr, "glGenFramebuffers"); + context->GenRenderbuffers = (PFNGLGENRENDERBUFFERSPROC) load(userptr, "glGenRenderbuffers"); + context->GenVertexArrays = (PFNGLGENVERTEXARRAYSPROC) load(userptr, "glGenVertexArrays"); + context->GenerateMipmap = (PFNGLGENERATEMIPMAPPROC) load(userptr, "glGenerateMipmap"); + context->GetBooleani_v = (PFNGLGETBOOLEANI_VPROC) load(userptr, "glGetBooleani_v"); + context->GetFragDataLocation = (PFNGLGETFRAGDATALOCATIONPROC) load(userptr, "glGetFragDataLocation"); + context->GetFramebufferAttachmentParameteriv = (PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) load(userptr, "glGetFramebufferAttachmentParameteriv"); + context->GetIntegeri_v = (PFNGLGETINTEGERI_VPROC) load(userptr, "glGetIntegeri_v"); + context->GetRenderbufferParameteriv = (PFNGLGETRENDERBUFFERPARAMETERIVPROC) load(userptr, "glGetRenderbufferParameteriv"); + context->GetStringi = (PFNGLGETSTRINGIPROC) load(userptr, "glGetStringi"); + context->GetTexParameterIiv = (PFNGLGETTEXPARAMETERIIVPROC) load(userptr, "glGetTexParameterIiv"); + context->GetTexParameterIuiv = (PFNGLGETTEXPARAMETERIUIVPROC) load(userptr, "glGetTexParameterIuiv"); + context->GetTransformFeedbackVarying = (PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) load(userptr, "glGetTransformFeedbackVarying"); + context->GetUniformuiv = (PFNGLGETUNIFORMUIVPROC) load(userptr, "glGetUniformuiv"); + context->GetVertexAttribIiv = (PFNGLGETVERTEXATTRIBIIVPROC) load(userptr, "glGetVertexAttribIiv"); + context->GetVertexAttribIuiv = (PFNGLGETVERTEXATTRIBIUIVPROC) load(userptr, "glGetVertexAttribIuiv"); + context->IsEnabledi = (PFNGLISENABLEDIPROC) load(userptr, "glIsEnabledi"); + context->IsFramebuffer = (PFNGLISFRAMEBUFFERPROC) load(userptr, "glIsFramebuffer"); + context->IsRenderbuffer = (PFNGLISRENDERBUFFERPROC) load(userptr, "glIsRenderbuffer"); + context->IsVertexArray = (PFNGLISVERTEXARRAYPROC) load(userptr, "glIsVertexArray"); + context->MapBufferRange = (PFNGLMAPBUFFERRANGEPROC) load(userptr, "glMapBufferRange"); + context->RenderbufferStorage = (PFNGLRENDERBUFFERSTORAGEPROC) load(userptr, "glRenderbufferStorage"); + context->RenderbufferStorageMultisample = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) load(userptr, "glRenderbufferStorageMultisample"); + context->TexParameterIiv = (PFNGLTEXPARAMETERIIVPROC) load(userptr, "glTexParameterIiv"); + context->TexParameterIuiv = (PFNGLTEXPARAMETERIUIVPROC) load(userptr, "glTexParameterIuiv"); + context->TransformFeedbackVaryings = (PFNGLTRANSFORMFEEDBACKVARYINGSPROC) load(userptr, "glTransformFeedbackVaryings"); + context->Uniform1ui = (PFNGLUNIFORM1UIPROC) load(userptr, "glUniform1ui"); + context->Uniform1uiv = (PFNGLUNIFORM1UIVPROC) load(userptr, "glUniform1uiv"); + context->Uniform2ui = (PFNGLUNIFORM2UIPROC) load(userptr, "glUniform2ui"); + context->Uniform2uiv = (PFNGLUNIFORM2UIVPROC) load(userptr, "glUniform2uiv"); + context->Uniform3ui = (PFNGLUNIFORM3UIPROC) load(userptr, "glUniform3ui"); + context->Uniform3uiv = (PFNGLUNIFORM3UIVPROC) load(userptr, "glUniform3uiv"); + context->Uniform4ui = (PFNGLUNIFORM4UIPROC) load(userptr, "glUniform4ui"); + context->Uniform4uiv = (PFNGLUNIFORM4UIVPROC) load(userptr, "glUniform4uiv"); + context->VertexAttribI1i = (PFNGLVERTEXATTRIBI1IPROC) load(userptr, "glVertexAttribI1i"); + context->VertexAttribI1iv = (PFNGLVERTEXATTRIBI1IVPROC) load(userptr, "glVertexAttribI1iv"); + context->VertexAttribI1ui = (PFNGLVERTEXATTRIBI1UIPROC) load(userptr, "glVertexAttribI1ui"); + context->VertexAttribI1uiv = (PFNGLVERTEXATTRIBI1UIVPROC) load(userptr, "glVertexAttribI1uiv"); + context->VertexAttribI2i = (PFNGLVERTEXATTRIBI2IPROC) load(userptr, "glVertexAttribI2i"); + context->VertexAttribI2iv = (PFNGLVERTEXATTRIBI2IVPROC) load(userptr, "glVertexAttribI2iv"); + context->VertexAttribI2ui = (PFNGLVERTEXATTRIBI2UIPROC) load(userptr, "glVertexAttribI2ui"); + context->VertexAttribI2uiv = (PFNGLVERTEXATTRIBI2UIVPROC) load(userptr, "glVertexAttribI2uiv"); + context->VertexAttribI3i = (PFNGLVERTEXATTRIBI3IPROC) load(userptr, "glVertexAttribI3i"); + context->VertexAttribI3iv = (PFNGLVERTEXATTRIBI3IVPROC) load(userptr, "glVertexAttribI3iv"); + context->VertexAttribI3ui = (PFNGLVERTEXATTRIBI3UIPROC) load(userptr, "glVertexAttribI3ui"); + context->VertexAttribI3uiv = (PFNGLVERTEXATTRIBI3UIVPROC) load(userptr, "glVertexAttribI3uiv"); + context->VertexAttribI4bv = (PFNGLVERTEXATTRIBI4BVPROC) load(userptr, "glVertexAttribI4bv"); + context->VertexAttribI4i = (PFNGLVERTEXATTRIBI4IPROC) load(userptr, "glVertexAttribI4i"); + context->VertexAttribI4iv = (PFNGLVERTEXATTRIBI4IVPROC) load(userptr, "glVertexAttribI4iv"); + context->VertexAttribI4sv = (PFNGLVERTEXATTRIBI4SVPROC) load(userptr, "glVertexAttribI4sv"); + context->VertexAttribI4ubv = (PFNGLVERTEXATTRIBI4UBVPROC) load(userptr, "glVertexAttribI4ubv"); + context->VertexAttribI4ui = (PFNGLVERTEXATTRIBI4UIPROC) load(userptr, "glVertexAttribI4ui"); + context->VertexAttribI4uiv = (PFNGLVERTEXATTRIBI4UIVPROC) load(userptr, "glVertexAttribI4uiv"); + context->VertexAttribI4usv = (PFNGLVERTEXATTRIBI4USVPROC) load(userptr, "glVertexAttribI4usv"); + context->VertexAttribIPointer = (PFNGLVERTEXATTRIBIPOINTERPROC) load(userptr, "glVertexAttribIPointer"); +} +static void glad_gl_load_GL_VERSION_3_1(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { + if(!context->VERSION_3_1) return; + context->BindBufferBase = (PFNGLBINDBUFFERBASEPROC) load(userptr, "glBindBufferBase"); + context->BindBufferRange = (PFNGLBINDBUFFERRANGEPROC) load(userptr, "glBindBufferRange"); + context->CopyBufferSubData = (PFNGLCOPYBUFFERSUBDATAPROC) load(userptr, "glCopyBufferSubData"); + context->DrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDPROC) load(userptr, "glDrawArraysInstanced"); + context->DrawElementsInstanced = (PFNGLDRAWELEMENTSINSTANCEDPROC) load(userptr, "glDrawElementsInstanced"); + context->GetActiveUniformBlockName = (PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) load(userptr, "glGetActiveUniformBlockName"); + context->GetActiveUniformBlockiv = (PFNGLGETACTIVEUNIFORMBLOCKIVPROC) load(userptr, "glGetActiveUniformBlockiv"); + context->GetActiveUniformName = (PFNGLGETACTIVEUNIFORMNAMEPROC) load(userptr, "glGetActiveUniformName"); + context->GetActiveUniformsiv = (PFNGLGETACTIVEUNIFORMSIVPROC) load(userptr, "glGetActiveUniformsiv"); + context->GetIntegeri_v = (PFNGLGETINTEGERI_VPROC) load(userptr, "glGetIntegeri_v"); + context->GetUniformBlockIndex = (PFNGLGETUNIFORMBLOCKINDEXPROC) load(userptr, "glGetUniformBlockIndex"); + context->GetUniformIndices = (PFNGLGETUNIFORMINDICESPROC) load(userptr, "glGetUniformIndices"); + context->PrimitiveRestartIndex = (PFNGLPRIMITIVERESTARTINDEXPROC) load(userptr, "glPrimitiveRestartIndex"); + context->TexBuffer = (PFNGLTEXBUFFERPROC) load(userptr, "glTexBuffer"); + context->UniformBlockBinding = (PFNGLUNIFORMBLOCKBINDINGPROC) load(userptr, "glUniformBlockBinding"); +} +static void glad_gl_load_GL_VERSION_3_2(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { + if(!context->VERSION_3_2) return; + context->ClientWaitSync = (PFNGLCLIENTWAITSYNCPROC) load(userptr, "glClientWaitSync"); + context->DeleteSync = (PFNGLDELETESYNCPROC) load(userptr, "glDeleteSync"); + context->DrawElementsBaseVertex = (PFNGLDRAWELEMENTSBASEVERTEXPROC) load(userptr, "glDrawElementsBaseVertex"); + context->DrawElementsInstancedBaseVertex = (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) load(userptr, "glDrawElementsInstancedBaseVertex"); + context->DrawRangeElementsBaseVertex = (PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) load(userptr, "glDrawRangeElementsBaseVertex"); + context->FenceSync = (PFNGLFENCESYNCPROC) load(userptr, "glFenceSync"); + context->FramebufferTexture = (PFNGLFRAMEBUFFERTEXTUREPROC) load(userptr, "glFramebufferTexture"); + context->GetBufferParameteri64v = (PFNGLGETBUFFERPARAMETERI64VPROC) load(userptr, "glGetBufferParameteri64v"); + context->GetInteger64i_v = (PFNGLGETINTEGER64I_VPROC) load(userptr, "glGetInteger64i_v"); + context->GetInteger64v = (PFNGLGETINTEGER64VPROC) load(userptr, "glGetInteger64v"); + context->GetMultisamplefv = (PFNGLGETMULTISAMPLEFVPROC) load(userptr, "glGetMultisamplefv"); + context->GetSynciv = (PFNGLGETSYNCIVPROC) load(userptr, "glGetSynciv"); + context->IsSync = (PFNGLISSYNCPROC) load(userptr, "glIsSync"); + context->MultiDrawElementsBaseVertex = (PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) load(userptr, "glMultiDrawElementsBaseVertex"); + context->ProvokingVertex = (PFNGLPROVOKINGVERTEXPROC) load(userptr, "glProvokingVertex"); + context->SampleMaski = (PFNGLSAMPLEMASKIPROC) load(userptr, "glSampleMaski"); + context->TexImage2DMultisample = (PFNGLTEXIMAGE2DMULTISAMPLEPROC) load(userptr, "glTexImage2DMultisample"); + context->TexImage3DMultisample = (PFNGLTEXIMAGE3DMULTISAMPLEPROC) load(userptr, "glTexImage3DMultisample"); + context->WaitSync = (PFNGLWAITSYNCPROC) load(userptr, "glWaitSync"); +} +static void glad_gl_load_GL_VERSION_3_3(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { + if(!context->VERSION_3_3) return; + context->BindFragDataLocationIndexed = (PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) load(userptr, "glBindFragDataLocationIndexed"); + context->BindSampler = (PFNGLBINDSAMPLERPROC) load(userptr, "glBindSampler"); + context->DeleteSamplers = (PFNGLDELETESAMPLERSPROC) load(userptr, "glDeleteSamplers"); + context->GenSamplers = (PFNGLGENSAMPLERSPROC) load(userptr, "glGenSamplers"); + context->GetFragDataIndex = (PFNGLGETFRAGDATAINDEXPROC) load(userptr, "glGetFragDataIndex"); + context->GetQueryObjecti64v = (PFNGLGETQUERYOBJECTI64VPROC) load(userptr, "glGetQueryObjecti64v"); + context->GetQueryObjectui64v = (PFNGLGETQUERYOBJECTUI64VPROC) load(userptr, "glGetQueryObjectui64v"); + context->GetSamplerParameterIiv = (PFNGLGETSAMPLERPARAMETERIIVPROC) load(userptr, "glGetSamplerParameterIiv"); + context->GetSamplerParameterIuiv = (PFNGLGETSAMPLERPARAMETERIUIVPROC) load(userptr, "glGetSamplerParameterIuiv"); + context->GetSamplerParameterfv = (PFNGLGETSAMPLERPARAMETERFVPROC) load(userptr, "glGetSamplerParameterfv"); + context->GetSamplerParameteriv = (PFNGLGETSAMPLERPARAMETERIVPROC) load(userptr, "glGetSamplerParameteriv"); + context->IsSampler = (PFNGLISSAMPLERPROC) load(userptr, "glIsSampler"); + context->QueryCounter = (PFNGLQUERYCOUNTERPROC) load(userptr, "glQueryCounter"); + context->SamplerParameterIiv = (PFNGLSAMPLERPARAMETERIIVPROC) load(userptr, "glSamplerParameterIiv"); + context->SamplerParameterIuiv = (PFNGLSAMPLERPARAMETERIUIVPROC) load(userptr, "glSamplerParameterIuiv"); + context->SamplerParameterf = (PFNGLSAMPLERPARAMETERFPROC) load(userptr, "glSamplerParameterf"); + context->SamplerParameterfv = (PFNGLSAMPLERPARAMETERFVPROC) load(userptr, "glSamplerParameterfv"); + context->SamplerParameteri = (PFNGLSAMPLERPARAMETERIPROC) load(userptr, "glSamplerParameteri"); + context->SamplerParameteriv = (PFNGLSAMPLERPARAMETERIVPROC) load(userptr, "glSamplerParameteriv"); + context->VertexAttribDivisor = (PFNGLVERTEXATTRIBDIVISORPROC) load(userptr, "glVertexAttribDivisor"); + context->VertexAttribP1ui = (PFNGLVERTEXATTRIBP1UIPROC) load(userptr, "glVertexAttribP1ui"); + context->VertexAttribP1uiv = (PFNGLVERTEXATTRIBP1UIVPROC) load(userptr, "glVertexAttribP1uiv"); + context->VertexAttribP2ui = (PFNGLVERTEXATTRIBP2UIPROC) load(userptr, "glVertexAttribP2ui"); + context->VertexAttribP2uiv = (PFNGLVERTEXATTRIBP2UIVPROC) load(userptr, "glVertexAttribP2uiv"); + context->VertexAttribP3ui = (PFNGLVERTEXATTRIBP3UIPROC) load(userptr, "glVertexAttribP3ui"); + context->VertexAttribP3uiv = (PFNGLVERTEXATTRIBP3UIVPROC) load(userptr, "glVertexAttribP3uiv"); + context->VertexAttribP4ui = (PFNGLVERTEXATTRIBP4UIPROC) load(userptr, "glVertexAttribP4ui"); + context->VertexAttribP4uiv = (PFNGLVERTEXATTRIBP4UIVPROC) load(userptr, "glVertexAttribP4uiv"); +} +static void glad_gl_load_GL_VERSION_4_0(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { + if(!context->VERSION_4_0) return; + context->BeginQueryIndexed = (PFNGLBEGINQUERYINDEXEDPROC) load(userptr, "glBeginQueryIndexed"); + context->BindTransformFeedback = (PFNGLBINDTRANSFORMFEEDBACKPROC) load(userptr, "glBindTransformFeedback"); + context->BlendEquationSeparatei = (PFNGLBLENDEQUATIONSEPARATEIPROC) load(userptr, "glBlendEquationSeparatei"); + context->BlendEquationi = (PFNGLBLENDEQUATIONIPROC) load(userptr, "glBlendEquationi"); + context->BlendFuncSeparatei = (PFNGLBLENDFUNCSEPARATEIPROC) load(userptr, "glBlendFuncSeparatei"); + context->BlendFunci = (PFNGLBLENDFUNCIPROC) load(userptr, "glBlendFunci"); + context->DeleteTransformFeedbacks = (PFNGLDELETETRANSFORMFEEDBACKSPROC) load(userptr, "glDeleteTransformFeedbacks"); + context->DrawArraysIndirect = (PFNGLDRAWARRAYSINDIRECTPROC) load(userptr, "glDrawArraysIndirect"); + context->DrawElementsIndirect = (PFNGLDRAWELEMENTSINDIRECTPROC) load(userptr, "glDrawElementsIndirect"); + context->DrawTransformFeedback = (PFNGLDRAWTRANSFORMFEEDBACKPROC) load(userptr, "glDrawTransformFeedback"); + context->DrawTransformFeedbackStream = (PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) load(userptr, "glDrawTransformFeedbackStream"); + context->EndQueryIndexed = (PFNGLENDQUERYINDEXEDPROC) load(userptr, "glEndQueryIndexed"); + context->GenTransformFeedbacks = (PFNGLGENTRANSFORMFEEDBACKSPROC) load(userptr, "glGenTransformFeedbacks"); + context->GetActiveSubroutineName = (PFNGLGETACTIVESUBROUTINENAMEPROC) load(userptr, "glGetActiveSubroutineName"); + context->GetActiveSubroutineUniformName = (PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) load(userptr, "glGetActiveSubroutineUniformName"); + context->GetActiveSubroutineUniformiv = (PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) load(userptr, "glGetActiveSubroutineUniformiv"); + context->GetProgramStageiv = (PFNGLGETPROGRAMSTAGEIVPROC) load(userptr, "glGetProgramStageiv"); + context->GetQueryIndexediv = (PFNGLGETQUERYINDEXEDIVPROC) load(userptr, "glGetQueryIndexediv"); + context->GetSubroutineIndex = (PFNGLGETSUBROUTINEINDEXPROC) load(userptr, "glGetSubroutineIndex"); + context->GetSubroutineUniformLocation = (PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) load(userptr, "glGetSubroutineUniformLocation"); + context->GetUniformSubroutineuiv = (PFNGLGETUNIFORMSUBROUTINEUIVPROC) load(userptr, "glGetUniformSubroutineuiv"); + context->GetUniformdv = (PFNGLGETUNIFORMDVPROC) load(userptr, "glGetUniformdv"); + context->IsTransformFeedback = (PFNGLISTRANSFORMFEEDBACKPROC) load(userptr, "glIsTransformFeedback"); + context->MinSampleShading = (PFNGLMINSAMPLESHADINGPROC) load(userptr, "glMinSampleShading"); + context->PatchParameterfv = (PFNGLPATCHPARAMETERFVPROC) load(userptr, "glPatchParameterfv"); + context->PatchParameteri = (PFNGLPATCHPARAMETERIPROC) load(userptr, "glPatchParameteri"); + context->PauseTransformFeedback = (PFNGLPAUSETRANSFORMFEEDBACKPROC) load(userptr, "glPauseTransformFeedback"); + context->ResumeTransformFeedback = (PFNGLRESUMETRANSFORMFEEDBACKPROC) load(userptr, "glResumeTransformFeedback"); + context->Uniform1d = (PFNGLUNIFORM1DPROC) load(userptr, "glUniform1d"); + context->Uniform1dv = (PFNGLUNIFORM1DVPROC) load(userptr, "glUniform1dv"); + context->Uniform2d = (PFNGLUNIFORM2DPROC) load(userptr, "glUniform2d"); + context->Uniform2dv = (PFNGLUNIFORM2DVPROC) load(userptr, "glUniform2dv"); + context->Uniform3d = (PFNGLUNIFORM3DPROC) load(userptr, "glUniform3d"); + context->Uniform3dv = (PFNGLUNIFORM3DVPROC) load(userptr, "glUniform3dv"); + context->Uniform4d = (PFNGLUNIFORM4DPROC) load(userptr, "glUniform4d"); + context->Uniform4dv = (PFNGLUNIFORM4DVPROC) load(userptr, "glUniform4dv"); + context->UniformMatrix2dv = (PFNGLUNIFORMMATRIX2DVPROC) load(userptr, "glUniformMatrix2dv"); + context->UniformMatrix2x3dv = (PFNGLUNIFORMMATRIX2X3DVPROC) load(userptr, "glUniformMatrix2x3dv"); + context->UniformMatrix2x4dv = (PFNGLUNIFORMMATRIX2X4DVPROC) load(userptr, "glUniformMatrix2x4dv"); + context->UniformMatrix3dv = (PFNGLUNIFORMMATRIX3DVPROC) load(userptr, "glUniformMatrix3dv"); + context->UniformMatrix3x2dv = (PFNGLUNIFORMMATRIX3X2DVPROC) load(userptr, "glUniformMatrix3x2dv"); + context->UniformMatrix3x4dv = (PFNGLUNIFORMMATRIX3X4DVPROC) load(userptr, "glUniformMatrix3x4dv"); + context->UniformMatrix4dv = (PFNGLUNIFORMMATRIX4DVPROC) load(userptr, "glUniformMatrix4dv"); + context->UniformMatrix4x2dv = (PFNGLUNIFORMMATRIX4X2DVPROC) load(userptr, "glUniformMatrix4x2dv"); + context->UniformMatrix4x3dv = (PFNGLUNIFORMMATRIX4X3DVPROC) load(userptr, "glUniformMatrix4x3dv"); + context->UniformSubroutinesuiv = (PFNGLUNIFORMSUBROUTINESUIVPROC) load(userptr, "glUniformSubroutinesuiv"); +} +static void glad_gl_load_GL_VERSION_4_1(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { + if(!context->VERSION_4_1) return; + context->ActiveShaderProgram = (PFNGLACTIVESHADERPROGRAMPROC) load(userptr, "glActiveShaderProgram"); + context->BindProgramPipeline = (PFNGLBINDPROGRAMPIPELINEPROC) load(userptr, "glBindProgramPipeline"); + context->ClearDepthf = (PFNGLCLEARDEPTHFPROC) load(userptr, "glClearDepthf"); + context->CreateShaderProgramv = (PFNGLCREATESHADERPROGRAMVPROC) load(userptr, "glCreateShaderProgramv"); + context->DeleteProgramPipelines = (PFNGLDELETEPROGRAMPIPELINESPROC) load(userptr, "glDeleteProgramPipelines"); + context->DepthRangeArrayv = (PFNGLDEPTHRANGEARRAYVPROC) load(userptr, "glDepthRangeArrayv"); + context->DepthRangeIndexed = (PFNGLDEPTHRANGEINDEXEDPROC) load(userptr, "glDepthRangeIndexed"); + context->DepthRangef = (PFNGLDEPTHRANGEFPROC) load(userptr, "glDepthRangef"); + context->GenProgramPipelines = (PFNGLGENPROGRAMPIPELINESPROC) load(userptr, "glGenProgramPipelines"); + context->GetDoublei_v = (PFNGLGETDOUBLEI_VPROC) load(userptr, "glGetDoublei_v"); + context->GetFloati_v = (PFNGLGETFLOATI_VPROC) load(userptr, "glGetFloati_v"); + context->GetProgramBinary = (PFNGLGETPROGRAMBINARYPROC) load(userptr, "glGetProgramBinary"); + context->GetProgramPipelineInfoLog = (PFNGLGETPROGRAMPIPELINEINFOLOGPROC) load(userptr, "glGetProgramPipelineInfoLog"); + context->GetProgramPipelineiv = (PFNGLGETPROGRAMPIPELINEIVPROC) load(userptr, "glGetProgramPipelineiv"); + context->GetShaderPrecisionFormat = (PFNGLGETSHADERPRECISIONFORMATPROC) load(userptr, "glGetShaderPrecisionFormat"); + context->GetVertexAttribLdv = (PFNGLGETVERTEXATTRIBLDVPROC) load(userptr, "glGetVertexAttribLdv"); + context->IsProgramPipeline = (PFNGLISPROGRAMPIPELINEPROC) load(userptr, "glIsProgramPipeline"); + context->ProgramBinary = (PFNGLPROGRAMBINARYPROC) load(userptr, "glProgramBinary"); + context->ProgramParameteri = (PFNGLPROGRAMPARAMETERIPROC) load(userptr, "glProgramParameteri"); + context->ProgramUniform1d = (PFNGLPROGRAMUNIFORM1DPROC) load(userptr, "glProgramUniform1d"); + context->ProgramUniform1dv = (PFNGLPROGRAMUNIFORM1DVPROC) load(userptr, "glProgramUniform1dv"); + context->ProgramUniform1f = (PFNGLPROGRAMUNIFORM1FPROC) load(userptr, "glProgramUniform1f"); + context->ProgramUniform1fv = (PFNGLPROGRAMUNIFORM1FVPROC) load(userptr, "glProgramUniform1fv"); + context->ProgramUniform1i = (PFNGLPROGRAMUNIFORM1IPROC) load(userptr, "glProgramUniform1i"); + context->ProgramUniform1iv = (PFNGLPROGRAMUNIFORM1IVPROC) load(userptr, "glProgramUniform1iv"); + context->ProgramUniform1ui = (PFNGLPROGRAMUNIFORM1UIPROC) load(userptr, "glProgramUniform1ui"); + context->ProgramUniform1uiv = (PFNGLPROGRAMUNIFORM1UIVPROC) load(userptr, "glProgramUniform1uiv"); + context->ProgramUniform2d = (PFNGLPROGRAMUNIFORM2DPROC) load(userptr, "glProgramUniform2d"); + context->ProgramUniform2dv = (PFNGLPROGRAMUNIFORM2DVPROC) load(userptr, "glProgramUniform2dv"); + context->ProgramUniform2f = (PFNGLPROGRAMUNIFORM2FPROC) load(userptr, "glProgramUniform2f"); + context->ProgramUniform2fv = (PFNGLPROGRAMUNIFORM2FVPROC) load(userptr, "glProgramUniform2fv"); + context->ProgramUniform2i = (PFNGLPROGRAMUNIFORM2IPROC) load(userptr, "glProgramUniform2i"); + context->ProgramUniform2iv = (PFNGLPROGRAMUNIFORM2IVPROC) load(userptr, "glProgramUniform2iv"); + context->ProgramUniform2ui = (PFNGLPROGRAMUNIFORM2UIPROC) load(userptr, "glProgramUniform2ui"); + context->ProgramUniform2uiv = (PFNGLPROGRAMUNIFORM2UIVPROC) load(userptr, "glProgramUniform2uiv"); + context->ProgramUniform3d = (PFNGLPROGRAMUNIFORM3DPROC) load(userptr, "glProgramUniform3d"); + context->ProgramUniform3dv = (PFNGLPROGRAMUNIFORM3DVPROC) load(userptr, "glProgramUniform3dv"); + context->ProgramUniform3f = (PFNGLPROGRAMUNIFORM3FPROC) load(userptr, "glProgramUniform3f"); + context->ProgramUniform3fv = (PFNGLPROGRAMUNIFORM3FVPROC) load(userptr, "glProgramUniform3fv"); + context->ProgramUniform3i = (PFNGLPROGRAMUNIFORM3IPROC) load(userptr, "glProgramUniform3i"); + context->ProgramUniform3iv = (PFNGLPROGRAMUNIFORM3IVPROC) load(userptr, "glProgramUniform3iv"); + context->ProgramUniform3ui = (PFNGLPROGRAMUNIFORM3UIPROC) load(userptr, "glProgramUniform3ui"); + context->ProgramUniform3uiv = (PFNGLPROGRAMUNIFORM3UIVPROC) load(userptr, "glProgramUniform3uiv"); + context->ProgramUniform4d = (PFNGLPROGRAMUNIFORM4DPROC) load(userptr, "glProgramUniform4d"); + context->ProgramUniform4dv = (PFNGLPROGRAMUNIFORM4DVPROC) load(userptr, "glProgramUniform4dv"); + context->ProgramUniform4f = (PFNGLPROGRAMUNIFORM4FPROC) load(userptr, "glProgramUniform4f"); + context->ProgramUniform4fv = (PFNGLPROGRAMUNIFORM4FVPROC) load(userptr, "glProgramUniform4fv"); + context->ProgramUniform4i = (PFNGLPROGRAMUNIFORM4IPROC) load(userptr, "glProgramUniform4i"); + context->ProgramUniform4iv = (PFNGLPROGRAMUNIFORM4IVPROC) load(userptr, "glProgramUniform4iv"); + context->ProgramUniform4ui = (PFNGLPROGRAMUNIFORM4UIPROC) load(userptr, "glProgramUniform4ui"); + context->ProgramUniform4uiv = (PFNGLPROGRAMUNIFORM4UIVPROC) load(userptr, "glProgramUniform4uiv"); + context->ProgramUniformMatrix2dv = (PFNGLPROGRAMUNIFORMMATRIX2DVPROC) load(userptr, "glProgramUniformMatrix2dv"); + context->ProgramUniformMatrix2fv = (PFNGLPROGRAMUNIFORMMATRIX2FVPROC) load(userptr, "glProgramUniformMatrix2fv"); + context->ProgramUniformMatrix2x3dv = (PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) load(userptr, "glProgramUniformMatrix2x3dv"); + context->ProgramUniformMatrix2x3fv = (PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) load(userptr, "glProgramUniformMatrix2x3fv"); + context->ProgramUniformMatrix2x4dv = (PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) load(userptr, "glProgramUniformMatrix2x4dv"); + context->ProgramUniformMatrix2x4fv = (PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) load(userptr, "glProgramUniformMatrix2x4fv"); + context->ProgramUniformMatrix3dv = (PFNGLPROGRAMUNIFORMMATRIX3DVPROC) load(userptr, "glProgramUniformMatrix3dv"); + context->ProgramUniformMatrix3fv = (PFNGLPROGRAMUNIFORMMATRIX3FVPROC) load(userptr, "glProgramUniformMatrix3fv"); + context->ProgramUniformMatrix3x2dv = (PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) load(userptr, "glProgramUniformMatrix3x2dv"); + context->ProgramUniformMatrix3x2fv = (PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) load(userptr, "glProgramUniformMatrix3x2fv"); + context->ProgramUniformMatrix3x4dv = (PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) load(userptr, "glProgramUniformMatrix3x4dv"); + context->ProgramUniformMatrix3x4fv = (PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) load(userptr, "glProgramUniformMatrix3x4fv"); + context->ProgramUniformMatrix4dv = (PFNGLPROGRAMUNIFORMMATRIX4DVPROC) load(userptr, "glProgramUniformMatrix4dv"); + context->ProgramUniformMatrix4fv = (PFNGLPROGRAMUNIFORMMATRIX4FVPROC) load(userptr, "glProgramUniformMatrix4fv"); + context->ProgramUniformMatrix4x2dv = (PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) load(userptr, "glProgramUniformMatrix4x2dv"); + context->ProgramUniformMatrix4x2fv = (PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) load(userptr, "glProgramUniformMatrix4x2fv"); + context->ProgramUniformMatrix4x3dv = (PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) load(userptr, "glProgramUniformMatrix4x3dv"); + context->ProgramUniformMatrix4x3fv = (PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) load(userptr, "glProgramUniformMatrix4x3fv"); + context->ReleaseShaderCompiler = (PFNGLRELEASESHADERCOMPILERPROC) load(userptr, "glReleaseShaderCompiler"); + context->ScissorArrayv = (PFNGLSCISSORARRAYVPROC) load(userptr, "glScissorArrayv"); + context->ScissorIndexed = (PFNGLSCISSORINDEXEDPROC) load(userptr, "glScissorIndexed"); + context->ScissorIndexedv = (PFNGLSCISSORINDEXEDVPROC) load(userptr, "glScissorIndexedv"); + context->ShaderBinary = (PFNGLSHADERBINARYPROC) load(userptr, "glShaderBinary"); + context->UseProgramStages = (PFNGLUSEPROGRAMSTAGESPROC) load(userptr, "glUseProgramStages"); + context->ValidateProgramPipeline = (PFNGLVALIDATEPROGRAMPIPELINEPROC) load(userptr, "glValidateProgramPipeline"); + context->VertexAttribL1d = (PFNGLVERTEXATTRIBL1DPROC) load(userptr, "glVertexAttribL1d"); + context->VertexAttribL1dv = (PFNGLVERTEXATTRIBL1DVPROC) load(userptr, "glVertexAttribL1dv"); + context->VertexAttribL2d = (PFNGLVERTEXATTRIBL2DPROC) load(userptr, "glVertexAttribL2d"); + context->VertexAttribL2dv = (PFNGLVERTEXATTRIBL2DVPROC) load(userptr, "glVertexAttribL2dv"); + context->VertexAttribL3d = (PFNGLVERTEXATTRIBL3DPROC) load(userptr, "glVertexAttribL3d"); + context->VertexAttribL3dv = (PFNGLVERTEXATTRIBL3DVPROC) load(userptr, "glVertexAttribL3dv"); + context->VertexAttribL4d = (PFNGLVERTEXATTRIBL4DPROC) load(userptr, "glVertexAttribL4d"); + context->VertexAttribL4dv = (PFNGLVERTEXATTRIBL4DVPROC) load(userptr, "glVertexAttribL4dv"); + context->VertexAttribLPointer = (PFNGLVERTEXATTRIBLPOINTERPROC) load(userptr, "glVertexAttribLPointer"); + context->ViewportArrayv = (PFNGLVIEWPORTARRAYVPROC) load(userptr, "glViewportArrayv"); + context->ViewportIndexedf = (PFNGLVIEWPORTINDEXEDFPROC) load(userptr, "glViewportIndexedf"); + context->ViewportIndexedfv = (PFNGLVIEWPORTINDEXEDFVPROC) load(userptr, "glViewportIndexedfv"); +} +static void glad_gl_load_GL_VERSION_4_2(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { + if(!context->VERSION_4_2) return; + context->BindImageTexture = (PFNGLBINDIMAGETEXTUREPROC) load(userptr, "glBindImageTexture"); + context->DrawArraysInstancedBaseInstance = (PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) load(userptr, "glDrawArraysInstancedBaseInstance"); + context->DrawElementsInstancedBaseInstance = (PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) load(userptr, "glDrawElementsInstancedBaseInstance"); + context->DrawElementsInstancedBaseVertexBaseInstance = (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) load(userptr, "glDrawElementsInstancedBaseVertexBaseInstance"); + context->DrawTransformFeedbackInstanced = (PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) load(userptr, "glDrawTransformFeedbackInstanced"); + context->DrawTransformFeedbackStreamInstanced = (PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) load(userptr, "glDrawTransformFeedbackStreamInstanced"); + context->GetActiveAtomicCounterBufferiv = (PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC) load(userptr, "glGetActiveAtomicCounterBufferiv"); + context->GetInternalformativ = (PFNGLGETINTERNALFORMATIVPROC) load(userptr, "glGetInternalformativ"); + context->MemoryBarrier = (PFNGLMEMORYBARRIERPROC) load(userptr, "glMemoryBarrier"); + context->TexStorage1D = (PFNGLTEXSTORAGE1DPROC) load(userptr, "glTexStorage1D"); + context->TexStorage2D = (PFNGLTEXSTORAGE2DPROC) load(userptr, "glTexStorage2D"); + context->TexStorage3D = (PFNGLTEXSTORAGE3DPROC) load(userptr, "glTexStorage3D"); +} +static void glad_gl_load_GL_VERSION_4_3(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { + if(!context->VERSION_4_3) return; + context->BindVertexBuffer = (PFNGLBINDVERTEXBUFFERPROC) load(userptr, "glBindVertexBuffer"); + context->ClearBufferData = (PFNGLCLEARBUFFERDATAPROC) load(userptr, "glClearBufferData"); + context->ClearBufferSubData = (PFNGLCLEARBUFFERSUBDATAPROC) load(userptr, "glClearBufferSubData"); + context->CopyImageSubData = (PFNGLCOPYIMAGESUBDATAPROC) load(userptr, "glCopyImageSubData"); + context->DebugMessageCallback = (PFNGLDEBUGMESSAGECALLBACKPROC) load(userptr, "glDebugMessageCallback"); + context->DebugMessageControl = (PFNGLDEBUGMESSAGECONTROLPROC) load(userptr, "glDebugMessageControl"); + context->DebugMessageInsert = (PFNGLDEBUGMESSAGEINSERTPROC) load(userptr, "glDebugMessageInsert"); + context->DispatchCompute = (PFNGLDISPATCHCOMPUTEPROC) load(userptr, "glDispatchCompute"); + context->DispatchComputeIndirect = (PFNGLDISPATCHCOMPUTEINDIRECTPROC) load(userptr, "glDispatchComputeIndirect"); + context->FramebufferParameteri = (PFNGLFRAMEBUFFERPARAMETERIPROC) load(userptr, "glFramebufferParameteri"); + context->GetDebugMessageLog = (PFNGLGETDEBUGMESSAGELOGPROC) load(userptr, "glGetDebugMessageLog"); + context->GetFramebufferParameteriv = (PFNGLGETFRAMEBUFFERPARAMETERIVPROC) load(userptr, "glGetFramebufferParameteriv"); + context->GetInternalformati64v = (PFNGLGETINTERNALFORMATI64VPROC) load(userptr, "glGetInternalformati64v"); + context->GetObjectLabel = (PFNGLGETOBJECTLABELPROC) load(userptr, "glGetObjectLabel"); + context->GetObjectPtrLabel = (PFNGLGETOBJECTPTRLABELPROC) load(userptr, "glGetObjectPtrLabel"); + context->GetPointerv = (PFNGLGETPOINTERVPROC) load(userptr, "glGetPointerv"); + context->GetProgramInterfaceiv = (PFNGLGETPROGRAMINTERFACEIVPROC) load(userptr, "glGetProgramInterfaceiv"); + context->GetProgramResourceIndex = (PFNGLGETPROGRAMRESOURCEINDEXPROC) load(userptr, "glGetProgramResourceIndex"); + context->GetProgramResourceLocation = (PFNGLGETPROGRAMRESOURCELOCATIONPROC) load(userptr, "glGetProgramResourceLocation"); + context->GetProgramResourceLocationIndex = (PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC) load(userptr, "glGetProgramResourceLocationIndex"); + context->GetProgramResourceName = (PFNGLGETPROGRAMRESOURCENAMEPROC) load(userptr, "glGetProgramResourceName"); + context->GetProgramResourceiv = (PFNGLGETPROGRAMRESOURCEIVPROC) load(userptr, "glGetProgramResourceiv"); + context->InvalidateBufferData = (PFNGLINVALIDATEBUFFERDATAPROC) load(userptr, "glInvalidateBufferData"); + context->InvalidateBufferSubData = (PFNGLINVALIDATEBUFFERSUBDATAPROC) load(userptr, "glInvalidateBufferSubData"); + context->InvalidateFramebuffer = (PFNGLINVALIDATEFRAMEBUFFERPROC) load(userptr, "glInvalidateFramebuffer"); + context->InvalidateSubFramebuffer = (PFNGLINVALIDATESUBFRAMEBUFFERPROC) load(userptr, "glInvalidateSubFramebuffer"); + context->InvalidateTexImage = (PFNGLINVALIDATETEXIMAGEPROC) load(userptr, "glInvalidateTexImage"); + context->InvalidateTexSubImage = (PFNGLINVALIDATETEXSUBIMAGEPROC) load(userptr, "glInvalidateTexSubImage"); + context->MultiDrawArraysIndirect = (PFNGLMULTIDRAWARRAYSINDIRECTPROC) load(userptr, "glMultiDrawArraysIndirect"); + context->MultiDrawElementsIndirect = (PFNGLMULTIDRAWELEMENTSINDIRECTPROC) load(userptr, "glMultiDrawElementsIndirect"); + context->ObjectLabel = (PFNGLOBJECTLABELPROC) load(userptr, "glObjectLabel"); + context->ObjectPtrLabel = (PFNGLOBJECTPTRLABELPROC) load(userptr, "glObjectPtrLabel"); + context->PopDebugGroup = (PFNGLPOPDEBUGGROUPPROC) load(userptr, "glPopDebugGroup"); + context->PushDebugGroup = (PFNGLPUSHDEBUGGROUPPROC) load(userptr, "glPushDebugGroup"); + context->ShaderStorageBlockBinding = (PFNGLSHADERSTORAGEBLOCKBINDINGPROC) load(userptr, "glShaderStorageBlockBinding"); + context->TexBufferRange = (PFNGLTEXBUFFERRANGEPROC) load(userptr, "glTexBufferRange"); + context->TexStorage2DMultisample = (PFNGLTEXSTORAGE2DMULTISAMPLEPROC) load(userptr, "glTexStorage2DMultisample"); + context->TexStorage3DMultisample = (PFNGLTEXSTORAGE3DMULTISAMPLEPROC) load(userptr, "glTexStorage3DMultisample"); + context->TextureView = (PFNGLTEXTUREVIEWPROC) load(userptr, "glTextureView"); + context->VertexAttribBinding = (PFNGLVERTEXATTRIBBINDINGPROC) load(userptr, "glVertexAttribBinding"); + context->VertexAttribFormat = (PFNGLVERTEXATTRIBFORMATPROC) load(userptr, "glVertexAttribFormat"); + context->VertexAttribIFormat = (PFNGLVERTEXATTRIBIFORMATPROC) load(userptr, "glVertexAttribIFormat"); + context->VertexAttribLFormat = (PFNGLVERTEXATTRIBLFORMATPROC) load(userptr, "glVertexAttribLFormat"); + context->VertexBindingDivisor = (PFNGLVERTEXBINDINGDIVISORPROC) load(userptr, "glVertexBindingDivisor"); +} +static void glad_gl_load_GL_VERSION_4_4(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { + if(!context->VERSION_4_4) return; + context->BindBuffersBase = (PFNGLBINDBUFFERSBASEPROC) load(userptr, "glBindBuffersBase"); + context->BindBuffersRange = (PFNGLBINDBUFFERSRANGEPROC) load(userptr, "glBindBuffersRange"); + context->BindImageTextures = (PFNGLBINDIMAGETEXTURESPROC) load(userptr, "glBindImageTextures"); + context->BindSamplers = (PFNGLBINDSAMPLERSPROC) load(userptr, "glBindSamplers"); + context->BindTextures = (PFNGLBINDTEXTURESPROC) load(userptr, "glBindTextures"); + context->BindVertexBuffers = (PFNGLBINDVERTEXBUFFERSPROC) load(userptr, "glBindVertexBuffers"); + context->BufferStorage = (PFNGLBUFFERSTORAGEPROC) load(userptr, "glBufferStorage"); + context->ClearTexImage = (PFNGLCLEARTEXIMAGEPROC) load(userptr, "glClearTexImage"); + context->ClearTexSubImage = (PFNGLCLEARTEXSUBIMAGEPROC) load(userptr, "glClearTexSubImage"); +} +static void glad_gl_load_GL_VERSION_4_5(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { + if(!context->VERSION_4_5) return; + context->BindTextureUnit = (PFNGLBINDTEXTUREUNITPROC) load(userptr, "glBindTextureUnit"); + context->BlitNamedFramebuffer = (PFNGLBLITNAMEDFRAMEBUFFERPROC) load(userptr, "glBlitNamedFramebuffer"); + context->CheckNamedFramebufferStatus = (PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC) load(userptr, "glCheckNamedFramebufferStatus"); + context->ClearNamedBufferData = (PFNGLCLEARNAMEDBUFFERDATAPROC) load(userptr, "glClearNamedBufferData"); + context->ClearNamedBufferSubData = (PFNGLCLEARNAMEDBUFFERSUBDATAPROC) load(userptr, "glClearNamedBufferSubData"); + context->ClearNamedFramebufferfi = (PFNGLCLEARNAMEDFRAMEBUFFERFIPROC) load(userptr, "glClearNamedFramebufferfi"); + context->ClearNamedFramebufferfv = (PFNGLCLEARNAMEDFRAMEBUFFERFVPROC) load(userptr, "glClearNamedFramebufferfv"); + context->ClearNamedFramebufferiv = (PFNGLCLEARNAMEDFRAMEBUFFERIVPROC) load(userptr, "glClearNamedFramebufferiv"); + context->ClearNamedFramebufferuiv = (PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC) load(userptr, "glClearNamedFramebufferuiv"); + context->ClipControl = (PFNGLCLIPCONTROLPROC) load(userptr, "glClipControl"); + context->CompressedTextureSubImage1D = (PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC) load(userptr, "glCompressedTextureSubImage1D"); + context->CompressedTextureSubImage2D = (PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC) load(userptr, "glCompressedTextureSubImage2D"); + context->CompressedTextureSubImage3D = (PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC) load(userptr, "glCompressedTextureSubImage3D"); + context->CopyNamedBufferSubData = (PFNGLCOPYNAMEDBUFFERSUBDATAPROC) load(userptr, "glCopyNamedBufferSubData"); + context->CopyTextureSubImage1D = (PFNGLCOPYTEXTURESUBIMAGE1DPROC) load(userptr, "glCopyTextureSubImage1D"); + context->CopyTextureSubImage2D = (PFNGLCOPYTEXTURESUBIMAGE2DPROC) load(userptr, "glCopyTextureSubImage2D"); + context->CopyTextureSubImage3D = (PFNGLCOPYTEXTURESUBIMAGE3DPROC) load(userptr, "glCopyTextureSubImage3D"); + context->CreateBuffers = (PFNGLCREATEBUFFERSPROC) load(userptr, "glCreateBuffers"); + context->CreateFramebuffers = (PFNGLCREATEFRAMEBUFFERSPROC) load(userptr, "glCreateFramebuffers"); + context->CreateProgramPipelines = (PFNGLCREATEPROGRAMPIPELINESPROC) load(userptr, "glCreateProgramPipelines"); + context->CreateQueries = (PFNGLCREATEQUERIESPROC) load(userptr, "glCreateQueries"); + context->CreateRenderbuffers = (PFNGLCREATERENDERBUFFERSPROC) load(userptr, "glCreateRenderbuffers"); + context->CreateSamplers = (PFNGLCREATESAMPLERSPROC) load(userptr, "glCreateSamplers"); + context->CreateTextures = (PFNGLCREATETEXTURESPROC) load(userptr, "glCreateTextures"); + context->CreateTransformFeedbacks = (PFNGLCREATETRANSFORMFEEDBACKSPROC) load(userptr, "glCreateTransformFeedbacks"); + context->CreateVertexArrays = (PFNGLCREATEVERTEXARRAYSPROC) load(userptr, "glCreateVertexArrays"); + context->DisableVertexArrayAttrib = (PFNGLDISABLEVERTEXARRAYATTRIBPROC) load(userptr, "glDisableVertexArrayAttrib"); + context->EnableVertexArrayAttrib = (PFNGLENABLEVERTEXARRAYATTRIBPROC) load(userptr, "glEnableVertexArrayAttrib"); + context->FlushMappedNamedBufferRange = (PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC) load(userptr, "glFlushMappedNamedBufferRange"); + context->GenerateTextureMipmap = (PFNGLGENERATETEXTUREMIPMAPPROC) load(userptr, "glGenerateTextureMipmap"); + context->GetCompressedTextureImage = (PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC) load(userptr, "glGetCompressedTextureImage"); + context->GetCompressedTextureSubImage = (PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC) load(userptr, "glGetCompressedTextureSubImage"); + context->GetGraphicsResetStatus = (PFNGLGETGRAPHICSRESETSTATUSPROC) load(userptr, "glGetGraphicsResetStatus"); + context->GetNamedBufferParameteri64v = (PFNGLGETNAMEDBUFFERPARAMETERI64VPROC) load(userptr, "glGetNamedBufferParameteri64v"); + context->GetNamedBufferParameteriv = (PFNGLGETNAMEDBUFFERPARAMETERIVPROC) load(userptr, "glGetNamedBufferParameteriv"); + context->GetNamedBufferPointerv = (PFNGLGETNAMEDBUFFERPOINTERVPROC) load(userptr, "glGetNamedBufferPointerv"); + context->GetNamedBufferSubData = (PFNGLGETNAMEDBUFFERSUBDATAPROC) load(userptr, "glGetNamedBufferSubData"); + context->GetNamedFramebufferAttachmentParameteriv = (PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC) load(userptr, "glGetNamedFramebufferAttachmentParameteriv"); + context->GetNamedFramebufferParameteriv = (PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC) load(userptr, "glGetNamedFramebufferParameteriv"); + context->GetNamedRenderbufferParameteriv = (PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC) load(userptr, "glGetNamedRenderbufferParameteriv"); + context->GetQueryBufferObjecti64v = (PFNGLGETQUERYBUFFEROBJECTI64VPROC) load(userptr, "glGetQueryBufferObjecti64v"); + context->GetQueryBufferObjectiv = (PFNGLGETQUERYBUFFEROBJECTIVPROC) load(userptr, "glGetQueryBufferObjectiv"); + context->GetQueryBufferObjectui64v = (PFNGLGETQUERYBUFFEROBJECTUI64VPROC) load(userptr, "glGetQueryBufferObjectui64v"); + context->GetQueryBufferObjectuiv = (PFNGLGETQUERYBUFFEROBJECTUIVPROC) load(userptr, "glGetQueryBufferObjectuiv"); + context->GetTextureImage = (PFNGLGETTEXTUREIMAGEPROC) load(userptr, "glGetTextureImage"); + context->GetTextureLevelParameterfv = (PFNGLGETTEXTURELEVELPARAMETERFVPROC) load(userptr, "glGetTextureLevelParameterfv"); + context->GetTextureLevelParameteriv = (PFNGLGETTEXTURELEVELPARAMETERIVPROC) load(userptr, "glGetTextureLevelParameteriv"); + context->GetTextureParameterIiv = (PFNGLGETTEXTUREPARAMETERIIVPROC) load(userptr, "glGetTextureParameterIiv"); + context->GetTextureParameterIuiv = (PFNGLGETTEXTUREPARAMETERIUIVPROC) load(userptr, "glGetTextureParameterIuiv"); + context->GetTextureParameterfv = (PFNGLGETTEXTUREPARAMETERFVPROC) load(userptr, "glGetTextureParameterfv"); + context->GetTextureParameteriv = (PFNGLGETTEXTUREPARAMETERIVPROC) load(userptr, "glGetTextureParameteriv"); + context->GetTextureSubImage = (PFNGLGETTEXTURESUBIMAGEPROC) load(userptr, "glGetTextureSubImage"); + context->GetTransformFeedbacki64_v = (PFNGLGETTRANSFORMFEEDBACKI64_VPROC) load(userptr, "glGetTransformFeedbacki64_v"); + context->GetTransformFeedbacki_v = (PFNGLGETTRANSFORMFEEDBACKI_VPROC) load(userptr, "glGetTransformFeedbacki_v"); + context->GetTransformFeedbackiv = (PFNGLGETTRANSFORMFEEDBACKIVPROC) load(userptr, "glGetTransformFeedbackiv"); + context->GetVertexArrayIndexed64iv = (PFNGLGETVERTEXARRAYINDEXED64IVPROC) load(userptr, "glGetVertexArrayIndexed64iv"); + context->GetVertexArrayIndexediv = (PFNGLGETVERTEXARRAYINDEXEDIVPROC) load(userptr, "glGetVertexArrayIndexediv"); + context->GetVertexArrayiv = (PFNGLGETVERTEXARRAYIVPROC) load(userptr, "glGetVertexArrayiv"); + context->GetnCompressedTexImage = (PFNGLGETNCOMPRESSEDTEXIMAGEPROC) load(userptr, "glGetnCompressedTexImage"); + context->GetnTexImage = (PFNGLGETNTEXIMAGEPROC) load(userptr, "glGetnTexImage"); + context->GetnUniformdv = (PFNGLGETNUNIFORMDVPROC) load(userptr, "glGetnUniformdv"); + context->GetnUniformfv = (PFNGLGETNUNIFORMFVPROC) load(userptr, "glGetnUniformfv"); + context->GetnUniformiv = (PFNGLGETNUNIFORMIVPROC) load(userptr, "glGetnUniformiv"); + context->GetnUniformuiv = (PFNGLGETNUNIFORMUIVPROC) load(userptr, "glGetnUniformuiv"); + context->InvalidateNamedFramebufferData = (PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC) load(userptr, "glInvalidateNamedFramebufferData"); + context->InvalidateNamedFramebufferSubData = (PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC) load(userptr, "glInvalidateNamedFramebufferSubData"); + context->MapNamedBuffer = (PFNGLMAPNAMEDBUFFERPROC) load(userptr, "glMapNamedBuffer"); + context->MapNamedBufferRange = (PFNGLMAPNAMEDBUFFERRANGEPROC) load(userptr, "glMapNamedBufferRange"); + context->MemoryBarrierByRegion = (PFNGLMEMORYBARRIERBYREGIONPROC) load(userptr, "glMemoryBarrierByRegion"); + context->NamedBufferData = (PFNGLNAMEDBUFFERDATAPROC) load(userptr, "glNamedBufferData"); + context->NamedBufferStorage = (PFNGLNAMEDBUFFERSTORAGEPROC) load(userptr, "glNamedBufferStorage"); + context->NamedBufferSubData = (PFNGLNAMEDBUFFERSUBDATAPROC) load(userptr, "glNamedBufferSubData"); + context->NamedFramebufferDrawBuffer = (PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC) load(userptr, "glNamedFramebufferDrawBuffer"); + context->NamedFramebufferDrawBuffers = (PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC) load(userptr, "glNamedFramebufferDrawBuffers"); + context->NamedFramebufferParameteri = (PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC) load(userptr, "glNamedFramebufferParameteri"); + context->NamedFramebufferReadBuffer = (PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC) load(userptr, "glNamedFramebufferReadBuffer"); + context->NamedFramebufferRenderbuffer = (PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC) load(userptr, "glNamedFramebufferRenderbuffer"); + context->NamedFramebufferTexture = (PFNGLNAMEDFRAMEBUFFERTEXTUREPROC) load(userptr, "glNamedFramebufferTexture"); + context->NamedFramebufferTextureLayer = (PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC) load(userptr, "glNamedFramebufferTextureLayer"); + context->NamedRenderbufferStorage = (PFNGLNAMEDRENDERBUFFERSTORAGEPROC) load(userptr, "glNamedRenderbufferStorage"); + context->NamedRenderbufferStorageMultisample = (PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC) load(userptr, "glNamedRenderbufferStorageMultisample"); + context->ReadnPixels = (PFNGLREADNPIXELSPROC) load(userptr, "glReadnPixels"); + context->TextureBarrier = (PFNGLTEXTUREBARRIERPROC) load(userptr, "glTextureBarrier"); + context->TextureBuffer = (PFNGLTEXTUREBUFFERPROC) load(userptr, "glTextureBuffer"); + context->TextureBufferRange = (PFNGLTEXTUREBUFFERRANGEPROC) load(userptr, "glTextureBufferRange"); + context->TextureParameterIiv = (PFNGLTEXTUREPARAMETERIIVPROC) load(userptr, "glTextureParameterIiv"); + context->TextureParameterIuiv = (PFNGLTEXTUREPARAMETERIUIVPROC) load(userptr, "glTextureParameterIuiv"); + context->TextureParameterf = (PFNGLTEXTUREPARAMETERFPROC) load(userptr, "glTextureParameterf"); + context->TextureParameterfv = (PFNGLTEXTUREPARAMETERFVPROC) load(userptr, "glTextureParameterfv"); + context->TextureParameteri = (PFNGLTEXTUREPARAMETERIPROC) load(userptr, "glTextureParameteri"); + context->TextureParameteriv = (PFNGLTEXTUREPARAMETERIVPROC) load(userptr, "glTextureParameteriv"); + context->TextureStorage1D = (PFNGLTEXTURESTORAGE1DPROC) load(userptr, "glTextureStorage1D"); + context->TextureStorage2D = (PFNGLTEXTURESTORAGE2DPROC) load(userptr, "glTextureStorage2D"); + context->TextureStorage2DMultisample = (PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC) load(userptr, "glTextureStorage2DMultisample"); + context->TextureStorage3D = (PFNGLTEXTURESTORAGE3DPROC) load(userptr, "glTextureStorage3D"); + context->TextureStorage3DMultisample = (PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC) load(userptr, "glTextureStorage3DMultisample"); + context->TextureSubImage1D = (PFNGLTEXTURESUBIMAGE1DPROC) load(userptr, "glTextureSubImage1D"); + context->TextureSubImage2D = (PFNGLTEXTURESUBIMAGE2DPROC) load(userptr, "glTextureSubImage2D"); + context->TextureSubImage3D = (PFNGLTEXTURESUBIMAGE3DPROC) load(userptr, "glTextureSubImage3D"); + context->TransformFeedbackBufferBase = (PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC) load(userptr, "glTransformFeedbackBufferBase"); + context->TransformFeedbackBufferRange = (PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC) load(userptr, "glTransformFeedbackBufferRange"); + context->UnmapNamedBuffer = (PFNGLUNMAPNAMEDBUFFERPROC) load(userptr, "glUnmapNamedBuffer"); + context->VertexArrayAttribBinding = (PFNGLVERTEXARRAYATTRIBBINDINGPROC) load(userptr, "glVertexArrayAttribBinding"); + context->VertexArrayAttribFormat = (PFNGLVERTEXARRAYATTRIBFORMATPROC) load(userptr, "glVertexArrayAttribFormat"); + context->VertexArrayAttribIFormat = (PFNGLVERTEXARRAYATTRIBIFORMATPROC) load(userptr, "glVertexArrayAttribIFormat"); + context->VertexArrayAttribLFormat = (PFNGLVERTEXARRAYATTRIBLFORMATPROC) load(userptr, "glVertexArrayAttribLFormat"); + context->VertexArrayBindingDivisor = (PFNGLVERTEXARRAYBINDINGDIVISORPROC) load(userptr, "glVertexArrayBindingDivisor"); + context->VertexArrayElementBuffer = (PFNGLVERTEXARRAYELEMENTBUFFERPROC) load(userptr, "glVertexArrayElementBuffer"); + context->VertexArrayVertexBuffer = (PFNGLVERTEXARRAYVERTEXBUFFERPROC) load(userptr, "glVertexArrayVertexBuffer"); + context->VertexArrayVertexBuffers = (PFNGLVERTEXARRAYVERTEXBUFFERSPROC) load(userptr, "glVertexArrayVertexBuffers"); +} +static void glad_gl_load_GL_VERSION_4_6(GladGLContext *context, GLADuserptrloadfunc load, void* userptr) { + if(!context->VERSION_4_6) return; + context->MultiDrawArraysIndirectCount = (PFNGLMULTIDRAWARRAYSINDIRECTCOUNTPROC) load(userptr, "glMultiDrawArraysIndirectCount"); + context->MultiDrawElementsIndirectCount = (PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTPROC) load(userptr, "glMultiDrawElementsIndirectCount"); + context->PolygonOffsetClamp = (PFNGLPOLYGONOFFSETCLAMPPROC) load(userptr, "glPolygonOffsetClamp"); + context->SpecializeShader = (PFNGLSPECIALIZESHADERPROC) load(userptr, "glSpecializeShader"); +} + + + +static void glad_gl_free_extensions(char **exts_i) { + if (exts_i != NULL) { + unsigned int index; + for(index = 0; exts_i[index]; index++) { + free((void *) (exts_i[index])); + } + free((void *)exts_i); + exts_i = NULL; + } +} +static int glad_gl_get_extensions(GladGLContext *context, const char **out_exts, char ***out_exts_i) { +#if defined(GL_ES_VERSION_3_0) || defined(GL_VERSION_3_0) + if (context->GetStringi != NULL && context->GetIntegerv != NULL) { + unsigned int index = 0; + unsigned int num_exts_i = 0; + char **exts_i = NULL; + context->GetIntegerv(GL_NUM_EXTENSIONS, (int*) &num_exts_i); + exts_i = (char **) malloc((num_exts_i + 1) * (sizeof *exts_i)); + if (exts_i == NULL) { + return 0; + } + for(index = 0; index < num_exts_i; index++) { + const char *gl_str_tmp = (const char*) context->GetStringi(GL_EXTENSIONS, index); + size_t len = strlen(gl_str_tmp) + 1; + + char *local_str = (char*) malloc(len * sizeof(char)); + if(local_str == NULL) { + exts_i[index] = NULL; + glad_gl_free_extensions(exts_i); + return 0; + } + + memcpy(local_str, gl_str_tmp, len * sizeof(char)); + exts_i[index] = local_str; + } + exts_i[index] = NULL; + + *out_exts_i = exts_i; + + return 1; + } +#else + GLAD_UNUSED(out_exts_i); +#endif + if (context->GetString == NULL) { + return 0; + } + *out_exts = (const char *)context->GetString(GL_EXTENSIONS); + return 1; +} +static int glad_gl_has_extension(const char *exts, char **exts_i, const char *ext) { + if(exts_i) { + unsigned int index; + for(index = 0; exts_i[index]; index++) { + const char *e = exts_i[index]; + if(strcmp(e, ext) == 0) { + return 1; + } + } + } else { + const char *extensions; + const char *loc; + const char *terminator; + extensions = exts; + if(extensions == NULL || ext == NULL) { + return 0; + } + while(1) { + loc = strstr(extensions, ext); + if(loc == NULL) { + return 0; + } + terminator = loc + strlen(ext); + if((loc == extensions || *(loc - 1) == ' ') && + (*terminator == ' ' || *terminator == '\0')) { + return 1; + } + extensions = terminator; + } + } + return 0; +} + +static GLADapiproc glad_gl_get_proc_from_userptr(void *userptr, const char* name) { + return (GLAD_GNUC_EXTENSION (GLADapiproc (*)(const char *name)) userptr)(name); +} + +static int glad_gl_find_extensions_gl(GladGLContext *context) { + const char *exts = NULL; + char **exts_i = NULL; + if (!glad_gl_get_extensions(context, &exts, &exts_i)) return 0; + + GLAD_UNUSED(&glad_gl_has_extension); + + glad_gl_free_extensions(exts_i); + + return 1; +} + +static int glad_gl_find_core_gl(GladGLContext *context) { + int i; + const char* version; + const char* prefixes[] = { + "OpenGL ES-CM ", + "OpenGL ES-CL ", + "OpenGL ES ", + "OpenGL SC ", + NULL + }; + int major = 0; + int minor = 0; + version = (const char*) context->GetString(GL_VERSION); + if (!version) return 0; + for (i = 0; prefixes[i]; i++) { + const size_t length = strlen(prefixes[i]); + if (strncmp(version, prefixes[i], length) == 0) { + version += length; + break; + } + } + + GLAD_IMPL_UTIL_SSCANF(version, "%d.%d", &major, &minor); + + context->VERSION_1_0 = (major == 1 && minor >= 0) || major > 1; + context->VERSION_1_1 = (major == 1 && minor >= 1) || major > 1; + context->VERSION_1_2 = (major == 1 && minor >= 2) || major > 1; + context->VERSION_1_3 = (major == 1 && minor >= 3) || major > 1; + context->VERSION_1_4 = (major == 1 && minor >= 4) || major > 1; + context->VERSION_1_5 = (major == 1 && minor >= 5) || major > 1; + context->VERSION_2_0 = (major == 2 && minor >= 0) || major > 2; + context->VERSION_2_1 = (major == 2 && minor >= 1) || major > 2; + context->VERSION_3_0 = (major == 3 && minor >= 0) || major > 3; + context->VERSION_3_1 = (major == 3 && minor >= 1) || major > 3; + context->VERSION_3_2 = (major == 3 && minor >= 2) || major > 3; + context->VERSION_3_3 = (major == 3 && minor >= 3) || major > 3; + context->VERSION_4_0 = (major == 4 && minor >= 0) || major > 4; + context->VERSION_4_1 = (major == 4 && minor >= 1) || major > 4; + context->VERSION_4_2 = (major == 4 && minor >= 2) || major > 4; + context->VERSION_4_3 = (major == 4 && minor >= 3) || major > 4; + context->VERSION_4_4 = (major == 4 && minor >= 4) || major > 4; + context->VERSION_4_5 = (major == 4 && minor >= 5) || major > 4; + context->VERSION_4_6 = (major == 4 && minor >= 6) || major > 4; + + return GLAD_MAKE_VERSION(major, minor); +} + +int gladLoadGLContextUserPtr(GladGLContext *context, GLADuserptrloadfunc load, void *userptr) { + int version; + + context->GetString = (PFNGLGETSTRINGPROC) load(userptr, "glGetString"); + if(context->GetString == NULL) return 0; + version = glad_gl_find_core_gl(context); + + glad_gl_load_GL_VERSION_1_0(context, load, userptr); + glad_gl_load_GL_VERSION_1_1(context, load, userptr); + glad_gl_load_GL_VERSION_1_2(context, load, userptr); + glad_gl_load_GL_VERSION_1_3(context, load, userptr); + glad_gl_load_GL_VERSION_1_4(context, load, userptr); + glad_gl_load_GL_VERSION_1_5(context, load, userptr); + glad_gl_load_GL_VERSION_2_0(context, load, userptr); + glad_gl_load_GL_VERSION_2_1(context, load, userptr); + glad_gl_load_GL_VERSION_3_0(context, load, userptr); + glad_gl_load_GL_VERSION_3_1(context, load, userptr); + glad_gl_load_GL_VERSION_3_2(context, load, userptr); + glad_gl_load_GL_VERSION_3_3(context, load, userptr); + glad_gl_load_GL_VERSION_4_0(context, load, userptr); + glad_gl_load_GL_VERSION_4_1(context, load, userptr); + glad_gl_load_GL_VERSION_4_2(context, load, userptr); + glad_gl_load_GL_VERSION_4_3(context, load, userptr); + glad_gl_load_GL_VERSION_4_4(context, load, userptr); + glad_gl_load_GL_VERSION_4_5(context, load, userptr); + glad_gl_load_GL_VERSION_4_6(context, load, userptr); + + if (!glad_gl_find_extensions_gl(context)) return 0; + + + + return version; +} + + +int gladLoadGLContext(GladGLContext *context, GLADloadfunc load) { + return gladLoadGLContextUserPtr(context, glad_gl_get_proc_from_userptr, GLAD_GNUC_EXTENSION (void*) load); +} + + + + + + +#ifdef __cplusplus +} +#endif + +#endif /* GLAD_GL_IMPLEMENTATION */ + diff --git a/StgSharp.GenerateGL/xml/Genglvnd b/StgSharp.GenerateGL/xml/Genglvnd index b5705ea4..14d4060b 100644 --- a/StgSharp.GenerateGL/xml/Genglvnd +++ b/StgSharp.GenerateGL/xml/Genglvnd @@ -1,4 +1,4 @@ -#!/bin/sh -for header in glcorearb.h glext.h gl.h ; do - ./genglvnd.py -registry drafts/GL/gl.xml drafts/GL/$header -done +#!/bin/sh +for header in glcorearb.h glext.h gl.h ; do + ./genglvnd.py -registry drafts/GL/gl.xml drafts/GL/$header +done diff --git a/StgSharp.GenerateGL/xml/Makefile b/StgSharp.GenerateGL/xml/Makefile index c1715e94..2cf9db25 100644 --- a/StgSharp.GenerateGL/xml/Makefile +++ b/StgSharp.GenerateGL/xml/Makefile @@ -1,74 +1,74 @@ -# Copyright 2013-2025 The Khronos Group Inc. -# SPDX-License-Identifier: Apache-2.0 - -# Generator scripts and options -# GENOPTS can be e.g. '-noprotect' - -PYFILES = genheaders.py reg.py -GENOPTS = -GENHEADERS = ./genheaders.py $(GENOPTS) - -# Generate all headers for GL / GLES / WGL / GLX -# Different headers depend on different XML registry files -# The $(GENHEADERS) script has targets for the additional headers -# $(API)/GL/gl.h -# $(API)/GL/glx.h -# $(API)/GL/wgl.h -# but these are experimental and not supported by Khronos. OpenGL -# drivers and SDKs provided by OS vendors and IHVs include their own -# platform-specific versions of these headers, where appropriate. - -API = ../api -GLHEADERS = $(API)/GL/glext.h \ - $(API)/GL/glcorearb.h \ - $(API)/GLES/gl.h \ - $(API)/GLES/glext.h \ - $(API)/GLES2/gl2.h \ - $(API)/GLES2/gl2ext.h \ - $(API)/GLES3/gl3.h \ - $(API)/GLSC2/glsc2.h \ - $(API)/GLSC2/glsc2ext.h - -GLXHEADERS = $(API)/GL/glxext.h -WGLHEADERS = $(API)/GL/wglext.h \ - $(API)/GL/wgl.h -ALLHEADERS = $(GLHEADERS) $(GLXHEADERS) $(WGLHEADERS) - -# Generated files to clean up -TEXDIRT = readme.aux readme.idx readme.ilg readme.ind readme.log readme.toc readme.out -PYDIRT = diag.txt dumpReg.txt errwarn.txt reg.pyc - -default: $(ALLHEADERS) - -$(GLHEADERS): gl.xml $(PYFILES) - $(GENHEADERS) $@ - -$(GLXHEADERS): glx.xml $(PYFILES) - $(GENHEADERS) $@ -registry glx.xml - -$(WGLHEADERS): wgl.xml $(PYFILES) - $(GENHEADERS) $@ -registry wgl.xml - -# Generate Relax NG XML schema from Compact schema - -registry.rng: registry.rnc - trang registry.rnc registry.rng - -# Verify all registry XML files against the schema - -validate: - jing -c registry.rnc gl.xml - jing -c registry.rnc glx.xml - jing -c registry.rnc wgl.xml - -# Documentation target - -readme.pdf: readme.tex - touch readme.ind - pdflatex readme.tex - pdflatex readme.tex - makeindex readme.idx - pdflatex readme.tex - -clean: - -rm -f $(PYDIRT) $(TEXDIRT) +# Copyright 2013-2025 The Khronos Group Inc. +# SPDX-License-Identifier: Apache-2.0 + +# Generator scripts and options +# GENOPTS can be e.g. '-noprotect' + +PYFILES = genheaders.py reg.py +GENOPTS = +GENHEADERS = ./genheaders.py $(GENOPTS) + +# Generate all headers for GL / GLES / WGL / GLX +# Different headers depend on different XML registry files +# The $(GENHEADERS) script has targets for the additional headers +# $(API)/GL/gl.h +# $(API)/GL/glx.h +# $(API)/GL/wgl.h +# but these are experimental and not supported by Khronos. OpenGL +# drivers and SDKs provided by OS vendors and IHVs include their own +# platform-specific versions of these headers, where appropriate. + +API = ../api +GLHEADERS = $(API)/GL/glext.h \ + $(API)/GL/glcorearb.h \ + $(API)/GLES/gl.h \ + $(API)/GLES/glext.h \ + $(API)/GLES2/gl2.h \ + $(API)/GLES2/gl2ext.h \ + $(API)/GLES3/gl3.h \ + $(API)/GLSC2/glsc2.h \ + $(API)/GLSC2/glsc2ext.h + +GLXHEADERS = $(API)/GL/glxext.h +WGLHEADERS = $(API)/GL/wglext.h \ + $(API)/GL/wgl.h +ALLHEADERS = $(GLHEADERS) $(GLXHEADERS) $(WGLHEADERS) + +# Generated files to clean up +TEXDIRT = readme.aux readme.idx readme.ilg readme.ind readme.log readme.toc readme.out +PYDIRT = diag.txt dumpReg.txt errwarn.txt reg.pyc + +default: $(ALLHEADERS) + +$(GLHEADERS): gl.xml $(PYFILES) + $(GENHEADERS) $@ + +$(GLXHEADERS): glx.xml $(PYFILES) + $(GENHEADERS) $@ -registry glx.xml + +$(WGLHEADERS): wgl.xml $(PYFILES) + $(GENHEADERS) $@ -registry wgl.xml + +# Generate Relax NG XML schema from Compact schema + +registry.rng: registry.rnc + trang registry.rnc registry.rng + +# Verify all registry XML files against the schema + +validate: + jing -c registry.rnc gl.xml + jing -c registry.rnc glx.xml + jing -c registry.rnc wgl.xml + +# Documentation target + +readme.pdf: readme.tex + touch readme.ind + pdflatex readme.tex + pdflatex readme.tex + makeindex readme.idx + pdflatex readme.tex + +clean: + -rm -f $(PYDIRT) $(TEXDIRT) diff --git a/StgSharp.GenerateGL/xml/README.adoc b/StgSharp.GenerateGL/xml/README.adoc index 2fc68208..d6c4cbe8 100644 --- a/StgSharp.GenerateGL/xml/README.adoc +++ b/StgSharp.GenerateGL/xml/README.adoc @@ -1,25 +1,25 @@ -// Copyright 2017-2021 The Khronos Group Inc. -// SPDX-License-Identifier: CC-BY-4.0 - -# OpenGL XML API Registry - -This directory contains the OpenGL, GLX, and WGL XML API registries, in -gl.xml, glx.xml, and wgl.xml respectively. They are used to reserve -enumerant ranges for vendors working on new extensions, to register -extension interfaces when an extension is published, and to generate the -Khronos-supplied header files in ../api . - -The canonical versions are always found in the master branch of the github -repository at https://github.com/KhronosGroup/OpenGL-Registry - -The 'validate' Makefile target uses the 'jing' tool to confirm that each XML -file is structurally valid and conforms to the registry schema in -registry.rnc. The schema is described in detail in readme.pdf. - -The 'default' Makefile target generates updated headers in ../api/ from the -XML files. - -Note that while there are targets for ../api/{gl.h,glx.h,wgl.h} in -genglvnd.py and genheaders.py, these targets are not generated by default -and are experimental. At present, you should use the versions of these -headers shipped with your OS or IHV SDK. +// Copyright 2017-2021 The Khronos Group Inc. +// SPDX-License-Identifier: CC-BY-4.0 + +# OpenGL XML API Registry + +This directory contains the OpenGL, GLX, and WGL XML API registries, in +gl.xml, glx.xml, and wgl.xml respectively. They are used to reserve +enumerant ranges for vendors working on new extensions, to register +extension interfaces when an extension is published, and to generate the +Khronos-supplied header files in ../api . + +The canonical versions are always found in the master branch of the github +repository at https://github.com/KhronosGroup/OpenGL-Registry + +The 'validate' Makefile target uses the 'jing' tool to confirm that each XML +file is structurally valid and conforms to the registry schema in +registry.rnc. The schema is described in detail in readme.pdf. + +The 'default' Makefile target generates updated headers in ../api/ from the +XML files. + +Note that while there are targets for ../api/{gl.h,glx.h,wgl.h} in +genglvnd.py and genheaders.py, these targets are not generated by default +and are experimental. At present, you should use the versions of these +headers shipped with your OS or IHV SDK. diff --git a/StgSharp.GenerateGL/xml/genglvnd.py b/StgSharp.GenerateGL/xml/genglvnd.py index 09160c9f..d73f9e47 100644 --- a/StgSharp.GenerateGL/xml/genglvnd.py +++ b/StgSharp.GenerateGL/xml/genglvnd.py @@ -1,628 +1,628 @@ -#!/usr/bin/env python -# -# Copyright 2013-2025 The Khronos Group Inc. -# SPDX-License-Identifier: Apache-2.0 - -import sys, time, pdb, string, cProfile -from reg import * - -# debug - start header generation in debugger -# dump - dump registry after loading -# profile - enable Python profiling -# protect - whether to use #ifndef protections -# registry - use specified XML registry instead of gl.xml -# target - string name of target header, or all targets if None -# timeit - time length of registry loading & header generation -# validate - validate return & parameter group tags against -debug = False -dump = False -profile = False -protect = True -target = None -timeit = False -validate= False -# Default input / log files -errFilename = None -diagFilename = 'diag.txt' -regFilename = 'gl.xml' - -if __name__ == '__main__': - i = 1 - while (i < len(sys.argv)): - arg = sys.argv[i] - i = i + 1 - if (arg == '-debug'): - write('Enabling debug (-debug)', file=sys.stderr) - debug = True - elif (arg == '-dump'): - write('Enabling dump (-dump)', file=sys.stderr) - dump = True - elif (arg == '-noprotect'): - write('Disabling inclusion protection in output headers', file=sys.stderr) - protect = False - elif (arg == '-profile'): - write('Enabling profiling (-profile)', file=sys.stderr) - profile = True - elif (arg == '-registry'): - regFilename = sys.argv[i] - i = i+1 - write('Using registry ', regFilename, file=sys.stderr) - elif (arg == '-time'): - write('Enabling timing (-time)', file=sys.stderr) - timeit = True - elif (arg == '-validate'): - write('Enabling group validation (-validate)', file=sys.stderr) - validate = True - elif (arg[0:1] == '-'): - write('Unrecognized argument:', arg, file=sys.stderr) - exit(1) - else: - target = arg - write('Using target', target, file=sys.stderr) - -# Simple timer functions -startTime = None -def startTimer(): - global startTime - startTime = time.process_time() -def endTimer(msg): - global startTime - endTime = time.process_time() - if (timeit): - write(msg, endTime - startTime) - startTime = None - -# Load & parse registry -reg = Registry() - -startTimer() -tree = etree.parse(regFilename) -endTimer('Time to make ElementTree =') - -startTimer() -reg.loadElementTree(tree) -endTimer('Time to parse ElementTree =') - -if (validate): - reg.validateGroups() - -if (dump): - write('***************************************') - write('Performing Registry dump to regdump.txt') - write('***************************************') - reg.dumpReg(filehandle = open('regdump.txt','w')) - -# Turn a list of strings into a regexp string matching exactly those strings -def makeREstring(list): - return '^(' + '|'.join(list) + ')$' - -# These are "mandatory" OpenGL ES 1 extensions, to -# be included in the core GLES/gl.h header. -es1CoreList = [ - 'GL_OES_read_format', - 'GL_OES_compressed_paletted_texture', - 'GL_OES_point_size_array', - 'GL_OES_point_sprite' -] - -# These are extensions to be included in the libglvnd GL/gl.h header. -glVndList = [ - 'GL_ARB_imaging', - 'GL_ARB_multitexture' -] - -# Descriptive names for various regexp patterns used to select -# versions and extensions - -allVersions = allExtensions = '.*' -noVersions = noExtensions = None -gl13Pat = r'1\.[0-3]' -gl12andLaterPat = r'1\.[2-9]|[234]\.[0-9]' -gles2onlyPat = r'2\.[0-9]' -gles2through30Pat = r'2\.[0-9]|3\.0' -gles2through31Pat = r'2\.[0-9]|3\.[01]' -gles2through32Pat = r'2\.[0-9]|3\.[012]' -es1CorePat = makeREstring(es1CoreList) -glVndPat = makeREstring(glVndList) - -# Extensions in old glcorearb.h but not yet tagged accordingly in gl.xml -glCoreARBPat = None -glx13andLaterPat = r'1\.[3-9]' - -# Copyright text prefixing all headers (list of strings). -prefixStrings = [ - '/*', - '** Copyright 2013-2025 The Khronos Group Inc.', - '** SPDX-' + 'License-Identifier: MIT', - '**', - '** This header is generated from the Khronos OpenGL / OpenGL ES XML', - '** API Registry. The current version of the Registry, generator scripts', - '** used to make the header, and the header can be found at', - '** https://github.com/KhronosGroup/OpenGL-Registry', - '*/', - '' -] - -# glext.h / glcorearb.h define calling conventions inline (no GL *platform.h) -glExtPlatformStrings = [ - '#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)', - '#ifndef WIN32_LEAN_AND_MEAN', - '#define WIN32_LEAN_AND_MEAN 1', - '#endif', - '#include ', - '#endif', - '', - '#ifndef APIENTRY', - '#define APIENTRY', - '#endif', - '#ifndef APIENTRYP', - '#define APIENTRYP APIENTRY *', - '#endif', - '#ifndef GLAPI', - '#define GLAPI extern', - '#endif', - '' -] - -glCorearbPlatformStrings = glExtPlatformStrings + [ - '/* glcorearb.h is for use with OpenGL core profile implementations.', - '** It should should be placed in the same directory as gl.h and', - '** included as .', - '**', - '** glcorearb.h includes only APIs in the latest OpenGL core profile', - '** implementation together with APIs in newer ARB extensions which ', - '** can be supported by the core profile. It does not, and never will', - '** include functionality removed from the core profile, such as', - '** fixed-function vertex and fragment processing.', - '**', - '** Do not #include both and either of or', - '** in the same source file.', - '*/', - '' -] - -# wglext.h needs Windows include -wglPlatformStrings = [ - '#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)', - '#define WIN32_LEAN_AND_MEAN 1', - '#include ', - '#endif', - '', -] - -# Different APIs use different *platform.h files to define calling -# conventions -glPlatformStrings = [ '#include ', '' ] -gles1PlatformStrings = [ '#include ', '' ] -gles2PlatformStrings = [ '#include ', '' ] -gles3PlatformStrings = [ '#include ', '' ] -glsc2PlatformStrings = [ '#include ', '' ] -eglPlatformStrings = [ '#include ', '' ] - -# GLES headers have a small addition to calling convention headers for function pointer typedefs -apiEntryPrefixStrings = [ - '#ifndef GL_APIENTRYP', - '#define GL_APIENTRYP GL_APIENTRY*', - '#endif', - '' -] - -# Insert generation date in a comment for headers not having *GLEXT_VERSION macros -genDateCommentString = [ - format("/* Generated on date %s */" % time.strftime("%Y%m%d")), - '' -] - -# GL_GLEXT_VERSION is defined only in glext.h and gl2ext.h -glextVersionStrings = [ - format("#define GL_GLEXT_VERSION %s" % time.strftime("%Y%m%d")), - '' -] -# WGL_WGLEXT_VERSION is defined only in wglext.h -wglextVersionStrings = [ - format("#define WGL_WGLEXT_VERSION %s" % time.strftime("%Y%m%d")), - '' -] -# GLX_GLXEXT_VERSION is defined only in glxext.h -glxextVersionStrings = [ - format("#define GLX_GLXEXT_VERSION %s" % time.strftime("%Y%m%d")), - '' -] -# EGL_EGLEXT_VERSION is defined only in eglext.h -eglextVersionStrings = [ - format("#define EGL_EGLEXT_VERSION %s" % time.strftime("%Y%m%d")), - '' -] - -# Defaults for generating re-inclusion protection wrappers (or not) -protectFile = protect -protectFeature = protect -protectProto = protect - -buildList = [ - # GL API 1.2+ + extensions - GL/glext.h - CGeneratorOptions( - filename = 'drafts/GL/glext.h', - apiname = 'gl', - profile = 'compatibility', - versions = allVersions, - emitversions = gl12andLaterPat, - defaultExtensions = 'gl', # Default extensions for GL - addExtensions = None, - removeExtensions = None, - prefixText = prefixStrings + glExtPlatformStrings + glextVersionStrings, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = protectProto, - protectProtoStr = 'GL_GLEXT_PROTOTYPES', - apicall = 'GLAPI ', - apientry = 'APIENTRY ', - apientryp = 'APIENTRYP '), - # GL compatibility profile through GL 1.3 (for libglvnd) - GL/gl.h - CGeneratorOptions( - filename = 'drafts/GL/gl.h', - apiname = 'gl', - profile = 'compatibility', - versions = allVersions, - emitversions = gl13Pat, - defaultExtensions = None, # No extensions for gl.h - addExtensions = glVndPat, - removeExtensions = None, - prefixText = prefixStrings + glPlatformStrings, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = False, # gl.h always includes prototypes - protectProtoStr = 'GL_GLEXT_PROTOTYPES', - apicall = 'GLAPI ', - apientry = 'APIENTRY ', - apientryp = 'APIENTRYP '), - # GL core profile + extensions - GL/glcorearb.h - CGeneratorOptions( - filename = 'drafts/GL/glcorearb.h', - apiname = 'gl', - profile = 'core', - versions = allVersions, - emitversions = allVersions, - defaultExtensions = 'glcore', # Default extensions for GL core profile (only) - addExtensions = glCoreARBPat, - removeExtensions = None, - prefixText = prefixStrings + glCorearbPlatformStrings, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = protectProto, - protectProtoStr = 'GL_GLEXT_PROTOTYPES', - apicall = 'GLAPI ', - apientry = 'APIENTRY ', - apientryp = 'APIENTRYP '), - # GLES 1.x API + mandatory extensions - GLES/gl.h (no function pointers) - CGeneratorOptions( - filename = 'GLES/gl.h', - apiname = 'gles1', - profile = 'common', - versions = allVersions, - emitversions = allVersions, - defaultExtensions = None, # No default extensions - addExtensions = es1CorePat, # Add mandatory ES1 extensions in GLES1/gl.h - removeExtensions = None, - prefixText = prefixStrings + gles1PlatformStrings + genDateCommentString, - genFuncPointers = False, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = False, # Core ES API functions are in the static link libraries - protectProtoStr = 'GL_GLEXT_PROTOTYPES', - apicall = 'GL_API ', - apientry = 'GL_APIENTRY ', - apientryp = 'GL_APIENTRYP '), - # GLES 1.x extensions - GLES/glext.h - CGeneratorOptions( - filename = 'GLES/glext.h', - apiname = 'gles1', - profile = 'common', - versions = allVersions, - emitversions = noVersions, - defaultExtensions = 'gles1', # Default extensions for GLES 1 - addExtensions = None, - removeExtensions = es1CorePat, # Remove mandatory ES1 extensions in GLES1/glext.h - prefixText = prefixStrings + apiEntryPrefixStrings + genDateCommentString, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = protectProto, - protectProtoStr = 'GL_GLEXT_PROTOTYPES', - apicall = 'GL_API ', - apientry = 'GL_APIENTRY ', - apientryp = 'GL_APIENTRYP '), - # GLES 2.0 API - GLES2/gl2.h (now with function pointers) - CGeneratorOptions( - filename = 'GLES2/gl2.h', - apiname = 'gles2', - profile = 'common', - versions = gles2onlyPat, - emitversions = allVersions, - defaultExtensions = None, # No default extensions - addExtensions = None, - removeExtensions = None, - prefixText = prefixStrings + gles2PlatformStrings + apiEntryPrefixStrings + genDateCommentString, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = protectProto, # Core ES API functions are in the static link libraries - protectProtoStr = 'GL_GLEXT_PROTOTYPES', - apicall = 'GL_APICALL ', - apientry = 'GL_APIENTRY ', - apientryp = 'GL_APIENTRYP '), - # GLES 3.1 / 3.0 / 2.0 extensions - GLES2/gl2ext.h - CGeneratorOptions( - filename = 'GLES2/gl2ext.h', - apiname = 'gles2', - profile = 'common', - versions = gles2onlyPat, - emitversions = None, - defaultExtensions = 'gles2', # Default extensions for GLES 2 - addExtensions = None, - removeExtensions = None, - prefixText = prefixStrings + apiEntryPrefixStrings + glextVersionStrings, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = protectProto, - protectProtoStr = 'GL_GLEXT_PROTOTYPES', - apicall = 'GL_APICALL ', - apientry = 'GL_APIENTRY ', - apientryp = 'GL_APIENTRYP '), - # GLES 3.2 API - GLES3/gl32.h (now with function pointers) - CGeneratorOptions( - filename = 'GLES3/gl32.h', - apiname = 'gles2', - profile = 'common', - versions = gles2through32Pat, - emitversions = allVersions, - defaultExtensions = None, # No default extensions - addExtensions = None, - removeExtensions = None, - prefixText = prefixStrings + gles3PlatformStrings + apiEntryPrefixStrings + genDateCommentString, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = protectProto, # Core ES API functions are in the static link libraries - protectProtoStr = 'GL_GLEXT_PROTOTYPES', - apicall = 'GL_APICALL ', - apientry = 'GL_APIENTRY ', - apientryp = 'GL_APIENTRYP '), - # GLES 3.1 API - GLES3/gl31.h (now with function pointers) - CGeneratorOptions( - filename = 'GLES3/gl31.h', - apiname = 'gles2', - profile = 'common', - versions = gles2through31Pat, - emitversions = allVersions, - defaultExtensions = None, # No default extensions - addExtensions = None, - removeExtensions = None, - prefixText = prefixStrings + gles3PlatformStrings + apiEntryPrefixStrings + genDateCommentString, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = protectProto, # Core ES API functions are in the static link libraries - protectProtoStr = 'GL_GLEXT_PROTOTYPES', - apicall = 'GL_APICALL ', - apientry = 'GL_APIENTRY ', - apientryp = 'GL_APIENTRYP '), - # GLES 3.0 API - GLES3/gl3.h (now with function pointers) - CGeneratorOptions( - filename = 'GLES3/gl3.h', - apiname = 'gles2', - profile = 'common', - versions = gles2through30Pat, - emitversions = allVersions, - defaultExtensions = None, # No default extensions - addExtensions = None, - removeExtensions = None, - prefixText = prefixStrings + gles3PlatformStrings + apiEntryPrefixStrings + genDateCommentString, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = protectProto, # Core ES API functions are in the static link libraries - protectProtoStr = 'GL_GLEXT_PROTOTYPES', - apicall = 'GL_APICALL ', - apientry = 'GL_APIENTRY ', - apientryp = 'GL_APIENTRYP '), - # GLSC 2.0 API - GLSC2/glsc2.h - CGeneratorOptions( - filename = 'GLSC2/glsc2.h', - apiname = 'glsc2', - profile = 'common', - versions = gles2onlyPat, - emitversions = allVersions, - defaultExtensions = None, # No default extensions - addExtensions = None, - removeExtensions = None, - prefixText = prefixStrings + glsc2PlatformStrings + apiEntryPrefixStrings + genDateCommentString, - genFuncPointers = False, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = False, - protectProtoStr = 'GL_GLEXT_PROTOTYPES', - apicall = 'GL_APICALL ', - apientry = 'GL_APIENTRY ', - apientryp = 'GL_APIENTRYP '), - # GLSC 2.0 extensions - GLSC2/gl2ext.h - CGeneratorOptions( - filename = 'GLSC2/glsc2ext.h', - apiname = 'glsc2', - profile = 'common', - versions = gles2onlyPat, - emitversions = None, - defaultExtensions = 'glsc2', # Default extensions for GLSC 2 - addExtensions = None, - removeExtensions = None, - prefixText = prefixStrings + apiEntryPrefixStrings + genDateCommentString, - genFuncPointers = False, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = False, - protectProtoStr = 'GL_GLEXT_PROTOTYPES', - apicall = 'GL_APICALL ', - apientry = 'GL_APIENTRY ', - apientryp = 'GL_APIENTRYP '), - # EGL API - EGL/egl.h (no function pointers, yet @@@) - CGeneratorOptions( - filename = 'EGL/egl.h', - apiname = 'egl', - profile = None, - versions = allVersions, - emitversions = allVersions, - defaultExtensions = None, # No default extensions - addExtensions = None, - removeExtensions = None, - prefixText = prefixStrings + eglPlatformStrings + genDateCommentString, - genFuncPointers = False, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = False, - protectProtoStr = 'EGL_EGLEXT_PROTOTYPES', - apicall = 'EGLAPI ', - apientry = 'EGLAPIENTRY ', - apientryp = 'EGLAPIENTRYP '), - # EGL extensions - EGL/eglext.h (no function pointers, yet @@@) - CGeneratorOptions( - filename = 'EGL/eglext.h', - apiname = 'egl', - profile = None, - versions = allVersions, - emitversions = None, - defaultExtensions = 'egl', # Default extensions for EGL - addExtensions = None, - removeExtensions = None, - prefixText = prefixStrings + eglPlatformStrings + eglextVersionStrings, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = protectProto, - protectProtoStr = 'EGL_EGLEXT_PROTOTYPES', - apicall = 'EGLAPI ', - apientry = 'EGLAPIENTRY ', - apientryp = 'EGLAPIENTRYP '), - # GLX 1.* API - GL/glx.h - CGeneratorOptions( - filename = 'GL/glx.h', - apiname = 'glx', - profile = None, - versions = allVersions, - emitversions = allVersions, - defaultExtensions = None, # No default extensions - addExtensions = None, - removeExtensions = None, - # add glXPlatformStrings? - prefixText = prefixStrings + genDateCommentString, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = protectProto, - protectProtoStr = 'GLX_GLXEXT_PROTOTYPES', - apicall = '', - apientry = '', - apientryp = ' *'), - # GLX 1.3+ API + extensions - GL/glxext.h (no function pointers, yet @@@) - CGeneratorOptions( - filename = 'GL/glxext.h', - apiname = 'glx', - profile = None, - versions = allVersions, - emitversions = glx13andLaterPat, - defaultExtensions = 'glx', # Default extensions for GLX - addExtensions = None, - removeExtensions = None, - # add glXPlatformStrings? - prefixText = prefixStrings + glxextVersionStrings, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = protectProto, - protectProtoStr = 'GLX_GLXEXT_PROTOTYPES', - apicall = '', - apientry = '', - apientryp = ' *'), - # WGL API + extensions - GL/wgl.h (no function pointers, yet @@@) - CGeneratorOptions( - filename = 'GL/wgl.h', - apiname = 'wgl', - profile = None, - versions = allVersions, - emitversions = allVersions, - defaultExtensions = 'wgl', # Default extensions for WGL - addExtensions = None, - removeExtensions = None, - prefixText = prefixStrings + wglPlatformStrings + genDateCommentString, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = protectProto, - protectProtoStr = 'WGL_WGLEXT_PROTOTYPES', - apicall = '', - apientry = 'WINAPI ', - apientryp = 'WINAPI * '), - # WGL extensions - GL/wglext.h (no function pointers, yet @@@) - CGeneratorOptions( - filename = 'GL/wglext.h', - apiname = 'wgl', - profile = None, - versions = allVersions, - emitversions = None, - defaultExtensions = 'wgl', # Default extensions for WGL - addExtensions = None, - removeExtensions = None, - prefixText = prefixStrings + wglPlatformStrings + wglextVersionStrings, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = protectProto, - protectProtoStr = 'WGL_WGLEXT_PROTOTYPES', - apicall = '', - apientry = 'WINAPI ', - apientryp = 'WINAPI * '), - # End of list - None -] - -# create error/warning & diagnostic files -if (errFilename): - errWarn = open(errFilename,'w') -else: - errWarn = sys.stderr -diag = open(diagFilename, 'w') - -def genHeaders(): - # Loop over targets, building each - generated = 0 - for genOpts in buildList: - if (genOpts == None): - break - if (target and target != genOpts.filename): - # write('*** Skipping', genOpts.filename) - continue - write('*** Building', genOpts.filename) - generated = generated + 1 - startTimer() - gen = COutputGenerator(errFile=errWarn, - warnFile=errWarn, - diagFile=diag) - reg.setGenerator(gen) - reg.apiGen(genOpts) - write('** Generated', genOpts.filename) - endTimer('Time to generate ' + genOpts.filename + ' =') - if (target and generated == 0): - write('Failed to generate target:', target) - -if (debug): - pdb.run('genHeaders()') -elif (profile): - import cProfile, pstats - cProfile.run('genHeaders()', 'profile.txt') - p = pstats.Stats('profile.txt') - p.strip_dirs().sort_stats('time').print_stats(50) -else: - genHeaders() +#!/usr/bin/env python +# +# Copyright 2013-2025 The Khronos Group Inc. +# SPDX-License-Identifier: Apache-2.0 + +import sys, time, pdb, string, cProfile +from reg import * + +# debug - start header generation in debugger +# dump - dump registry after loading +# profile - enable Python profiling +# protect - whether to use #ifndef protections +# registry - use specified XML registry instead of gl.xml +# target - string name of target header, or all targets if None +# timeit - time length of registry loading & header generation +# validate - validate return & parameter group tags against +debug = False +dump = False +profile = False +protect = True +target = None +timeit = False +validate= False +# Default input / log files +errFilename = None +diagFilename = 'diag.txt' +regFilename = 'gl.xml' + +if __name__ == '__main__': + i = 1 + while (i < len(sys.argv)): + arg = sys.argv[i] + i = i + 1 + if (arg == '-debug'): + write('Enabling debug (-debug)', file=sys.stderr) + debug = True + elif (arg == '-dump'): + write('Enabling dump (-dump)', file=sys.stderr) + dump = True + elif (arg == '-noprotect'): + write('Disabling inclusion protection in output headers', file=sys.stderr) + protect = False + elif (arg == '-profile'): + write('Enabling profiling (-profile)', file=sys.stderr) + profile = True + elif (arg == '-registry'): + regFilename = sys.argv[i] + i = i+1 + write('Using registry ', regFilename, file=sys.stderr) + elif (arg == '-time'): + write('Enabling timing (-time)', file=sys.stderr) + timeit = True + elif (arg == '-validate'): + write('Enabling group validation (-validate)', file=sys.stderr) + validate = True + elif (arg[0:1] == '-'): + write('Unrecognized argument:', arg, file=sys.stderr) + exit(1) + else: + target = arg + write('Using target', target, file=sys.stderr) + +# Simple timer functions +startTime = None +def startTimer(): + global startTime + startTime = time.process_time() +def endTimer(msg): + global startTime + endTime = time.process_time() + if (timeit): + write(msg, endTime - startTime) + startTime = None + +# Load & parse registry +reg = Registry() + +startTimer() +tree = etree.parse(regFilename) +endTimer('Time to make ElementTree =') + +startTimer() +reg.loadElementTree(tree) +endTimer('Time to parse ElementTree =') + +if (validate): + reg.validateGroups() + +if (dump): + write('***************************************') + write('Performing Registry dump to regdump.txt') + write('***************************************') + reg.dumpReg(filehandle = open('regdump.txt','w')) + +# Turn a list of strings into a regexp string matching exactly those strings +def makeREstring(list): + return '^(' + '|'.join(list) + ')$' + +# These are "mandatory" OpenGL ES 1 extensions, to +# be included in the core GLES/gl.h header. +es1CoreList = [ + 'GL_OES_read_format', + 'GL_OES_compressed_paletted_texture', + 'GL_OES_point_size_array', + 'GL_OES_point_sprite' +] + +# These are extensions to be included in the libglvnd GL/gl.h header. +glVndList = [ + 'GL_ARB_imaging', + 'GL_ARB_multitexture' +] + +# Descriptive names for various regexp patterns used to select +# versions and extensions + +allVersions = allExtensions = '.*' +noVersions = noExtensions = None +gl13Pat = r'1\.[0-3]' +gl12andLaterPat = r'1\.[2-9]|[234]\.[0-9]' +gles2onlyPat = r'2\.[0-9]' +gles2through30Pat = r'2\.[0-9]|3\.0' +gles2through31Pat = r'2\.[0-9]|3\.[01]' +gles2through32Pat = r'2\.[0-9]|3\.[012]' +es1CorePat = makeREstring(es1CoreList) +glVndPat = makeREstring(glVndList) + +# Extensions in old glcorearb.h but not yet tagged accordingly in gl.xml +glCoreARBPat = None +glx13andLaterPat = r'1\.[3-9]' + +# Copyright text prefixing all headers (list of strings). +prefixStrings = [ + '/*', + '** Copyright 2013-2025 The Khronos Group Inc.', + '** SPDX-' + 'License-Identifier: MIT', + '**', + '** This header is generated from the Khronos OpenGL / OpenGL ES XML', + '** API Registry. The current version of the Registry, generator scripts', + '** used to make the header, and the header can be found at', + '** https://github.com/KhronosGroup/OpenGL-Registry', + '*/', + '' +] + +# glext.h / glcorearb.h define calling conventions inline (no GL *platform.h) +glExtPlatformStrings = [ + '#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)', + '#ifndef WIN32_LEAN_AND_MEAN', + '#define WIN32_LEAN_AND_MEAN 1', + '#endif', + '#include ', + '#endif', + '', + '#ifndef APIENTRY', + '#define APIENTRY', + '#endif', + '#ifndef APIENTRYP', + '#define APIENTRYP APIENTRY *', + '#endif', + '#ifndef GLAPI', + '#define GLAPI extern', + '#endif', + '' +] + +glCorearbPlatformStrings = glExtPlatformStrings + [ + '/* glcorearb.h is for use with OpenGL core profile implementations.', + '** It should should be placed in the same directory as gl.h and', + '** included as .', + '**', + '** glcorearb.h includes only APIs in the latest OpenGL core profile', + '** implementation together with APIs in newer ARB extensions which ', + '** can be supported by the core profile. It does not, and never will', + '** include functionality removed from the core profile, such as', + '** fixed-function vertex and fragment processing.', + '**', + '** Do not #include both and either of or', + '** in the same source file.', + '*/', + '' +] + +# wglext.h needs Windows include +wglPlatformStrings = [ + '#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)', + '#define WIN32_LEAN_AND_MEAN 1', + '#include ', + '#endif', + '', +] + +# Different APIs use different *platform.h files to define calling +# conventions +glPlatformStrings = [ '#include ', '' ] +gles1PlatformStrings = [ '#include ', '' ] +gles2PlatformStrings = [ '#include ', '' ] +gles3PlatformStrings = [ '#include ', '' ] +glsc2PlatformStrings = [ '#include ', '' ] +eglPlatformStrings = [ '#include ', '' ] + +# GLES headers have a small addition to calling convention headers for function pointer typedefs +apiEntryPrefixStrings = [ + '#ifndef GL_APIENTRYP', + '#define GL_APIENTRYP GL_APIENTRY*', + '#endif', + '' +] + +# Insert generation date in a comment for headers not having *GLEXT_VERSION macros +genDateCommentString = [ + format("/* Generated on date %s */" % time.strftime("%Y%m%d")), + '' +] + +# GL_GLEXT_VERSION is defined only in glext.h and gl2ext.h +glextVersionStrings = [ + format("#define GL_GLEXT_VERSION %s" % time.strftime("%Y%m%d")), + '' +] +# WGL_WGLEXT_VERSION is defined only in wglext.h +wglextVersionStrings = [ + format("#define WGL_WGLEXT_VERSION %s" % time.strftime("%Y%m%d")), + '' +] +# GLX_GLXEXT_VERSION is defined only in glxext.h +glxextVersionStrings = [ + format("#define GLX_GLXEXT_VERSION %s" % time.strftime("%Y%m%d")), + '' +] +# EGL_EGLEXT_VERSION is defined only in eglext.h +eglextVersionStrings = [ + format("#define EGL_EGLEXT_VERSION %s" % time.strftime("%Y%m%d")), + '' +] + +# Defaults for generating re-inclusion protection wrappers (or not) +protectFile = protect +protectFeature = protect +protectProto = protect + +buildList = [ + # GL API 1.2+ + extensions - GL/glext.h + CGeneratorOptions( + filename = 'drafts/GL/glext.h', + apiname = 'gl', + profile = 'compatibility', + versions = allVersions, + emitversions = gl12andLaterPat, + defaultExtensions = 'gl', # Default extensions for GL + addExtensions = None, + removeExtensions = None, + prefixText = prefixStrings + glExtPlatformStrings + glextVersionStrings, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = protectProto, + protectProtoStr = 'GL_GLEXT_PROTOTYPES', + apicall = 'GLAPI ', + apientry = 'APIENTRY ', + apientryp = 'APIENTRYP '), + # GL compatibility profile through GL 1.3 (for libglvnd) - GL/gl.h + CGeneratorOptions( + filename = 'drafts/GL/gl.h', + apiname = 'gl', + profile = 'compatibility', + versions = allVersions, + emitversions = gl13Pat, + defaultExtensions = None, # No extensions for gl.h + addExtensions = glVndPat, + removeExtensions = None, + prefixText = prefixStrings + glPlatformStrings, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = False, # gl.h always includes prototypes + protectProtoStr = 'GL_GLEXT_PROTOTYPES', + apicall = 'GLAPI ', + apientry = 'APIENTRY ', + apientryp = 'APIENTRYP '), + # GL core profile + extensions - GL/glcorearb.h + CGeneratorOptions( + filename = 'drafts/GL/glcorearb.h', + apiname = 'gl', + profile = 'core', + versions = allVersions, + emitversions = allVersions, + defaultExtensions = 'glcore', # Default extensions for GL core profile (only) + addExtensions = glCoreARBPat, + removeExtensions = None, + prefixText = prefixStrings + glCorearbPlatformStrings, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = protectProto, + protectProtoStr = 'GL_GLEXT_PROTOTYPES', + apicall = 'GLAPI ', + apientry = 'APIENTRY ', + apientryp = 'APIENTRYP '), + # GLES 1.x API + mandatory extensions - GLES/gl.h (no function pointers) + CGeneratorOptions( + filename = 'GLES/gl.h', + apiname = 'gles1', + profile = 'common', + versions = allVersions, + emitversions = allVersions, + defaultExtensions = None, # No default extensions + addExtensions = es1CorePat, # Add mandatory ES1 extensions in GLES1/gl.h + removeExtensions = None, + prefixText = prefixStrings + gles1PlatformStrings + genDateCommentString, + genFuncPointers = False, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = False, # Core ES API functions are in the static link libraries + protectProtoStr = 'GL_GLEXT_PROTOTYPES', + apicall = 'GL_API ', + apientry = 'GL_APIENTRY ', + apientryp = 'GL_APIENTRYP '), + # GLES 1.x extensions - GLES/glext.h + CGeneratorOptions( + filename = 'GLES/glext.h', + apiname = 'gles1', + profile = 'common', + versions = allVersions, + emitversions = noVersions, + defaultExtensions = 'gles1', # Default extensions for GLES 1 + addExtensions = None, + removeExtensions = es1CorePat, # Remove mandatory ES1 extensions in GLES1/glext.h + prefixText = prefixStrings + apiEntryPrefixStrings + genDateCommentString, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = protectProto, + protectProtoStr = 'GL_GLEXT_PROTOTYPES', + apicall = 'GL_API ', + apientry = 'GL_APIENTRY ', + apientryp = 'GL_APIENTRYP '), + # GLES 2.0 API - GLES2/gl2.h (now with function pointers) + CGeneratorOptions( + filename = 'GLES2/gl2.h', + apiname = 'gles2', + profile = 'common', + versions = gles2onlyPat, + emitversions = allVersions, + defaultExtensions = None, # No default extensions + addExtensions = None, + removeExtensions = None, + prefixText = prefixStrings + gles2PlatformStrings + apiEntryPrefixStrings + genDateCommentString, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = protectProto, # Core ES API functions are in the static link libraries + protectProtoStr = 'GL_GLEXT_PROTOTYPES', + apicall = 'GL_APICALL ', + apientry = 'GL_APIENTRY ', + apientryp = 'GL_APIENTRYP '), + # GLES 3.1 / 3.0 / 2.0 extensions - GLES2/gl2ext.h + CGeneratorOptions( + filename = 'GLES2/gl2ext.h', + apiname = 'gles2', + profile = 'common', + versions = gles2onlyPat, + emitversions = None, + defaultExtensions = 'gles2', # Default extensions for GLES 2 + addExtensions = None, + removeExtensions = None, + prefixText = prefixStrings + apiEntryPrefixStrings + glextVersionStrings, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = protectProto, + protectProtoStr = 'GL_GLEXT_PROTOTYPES', + apicall = 'GL_APICALL ', + apientry = 'GL_APIENTRY ', + apientryp = 'GL_APIENTRYP '), + # GLES 3.2 API - GLES3/gl32.h (now with function pointers) + CGeneratorOptions( + filename = 'GLES3/gl32.h', + apiname = 'gles2', + profile = 'common', + versions = gles2through32Pat, + emitversions = allVersions, + defaultExtensions = None, # No default extensions + addExtensions = None, + removeExtensions = None, + prefixText = prefixStrings + gles3PlatformStrings + apiEntryPrefixStrings + genDateCommentString, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = protectProto, # Core ES API functions are in the static link libraries + protectProtoStr = 'GL_GLEXT_PROTOTYPES', + apicall = 'GL_APICALL ', + apientry = 'GL_APIENTRY ', + apientryp = 'GL_APIENTRYP '), + # GLES 3.1 API - GLES3/gl31.h (now with function pointers) + CGeneratorOptions( + filename = 'GLES3/gl31.h', + apiname = 'gles2', + profile = 'common', + versions = gles2through31Pat, + emitversions = allVersions, + defaultExtensions = None, # No default extensions + addExtensions = None, + removeExtensions = None, + prefixText = prefixStrings + gles3PlatformStrings + apiEntryPrefixStrings + genDateCommentString, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = protectProto, # Core ES API functions are in the static link libraries + protectProtoStr = 'GL_GLEXT_PROTOTYPES', + apicall = 'GL_APICALL ', + apientry = 'GL_APIENTRY ', + apientryp = 'GL_APIENTRYP '), + # GLES 3.0 API - GLES3/gl3.h (now with function pointers) + CGeneratorOptions( + filename = 'GLES3/gl3.h', + apiname = 'gles2', + profile = 'common', + versions = gles2through30Pat, + emitversions = allVersions, + defaultExtensions = None, # No default extensions + addExtensions = None, + removeExtensions = None, + prefixText = prefixStrings + gles3PlatformStrings + apiEntryPrefixStrings + genDateCommentString, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = protectProto, # Core ES API functions are in the static link libraries + protectProtoStr = 'GL_GLEXT_PROTOTYPES', + apicall = 'GL_APICALL ', + apientry = 'GL_APIENTRY ', + apientryp = 'GL_APIENTRYP '), + # GLSC 2.0 API - GLSC2/glsc2.h + CGeneratorOptions( + filename = 'GLSC2/glsc2.h', + apiname = 'glsc2', + profile = 'common', + versions = gles2onlyPat, + emitversions = allVersions, + defaultExtensions = None, # No default extensions + addExtensions = None, + removeExtensions = None, + prefixText = prefixStrings + glsc2PlatformStrings + apiEntryPrefixStrings + genDateCommentString, + genFuncPointers = False, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = False, + protectProtoStr = 'GL_GLEXT_PROTOTYPES', + apicall = 'GL_APICALL ', + apientry = 'GL_APIENTRY ', + apientryp = 'GL_APIENTRYP '), + # GLSC 2.0 extensions - GLSC2/gl2ext.h + CGeneratorOptions( + filename = 'GLSC2/glsc2ext.h', + apiname = 'glsc2', + profile = 'common', + versions = gles2onlyPat, + emitversions = None, + defaultExtensions = 'glsc2', # Default extensions for GLSC 2 + addExtensions = None, + removeExtensions = None, + prefixText = prefixStrings + apiEntryPrefixStrings + genDateCommentString, + genFuncPointers = False, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = False, + protectProtoStr = 'GL_GLEXT_PROTOTYPES', + apicall = 'GL_APICALL ', + apientry = 'GL_APIENTRY ', + apientryp = 'GL_APIENTRYP '), + # EGL API - EGL/egl.h (no function pointers, yet @@@) + CGeneratorOptions( + filename = 'EGL/egl.h', + apiname = 'egl', + profile = None, + versions = allVersions, + emitversions = allVersions, + defaultExtensions = None, # No default extensions + addExtensions = None, + removeExtensions = None, + prefixText = prefixStrings + eglPlatformStrings + genDateCommentString, + genFuncPointers = False, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = False, + protectProtoStr = 'EGL_EGLEXT_PROTOTYPES', + apicall = 'EGLAPI ', + apientry = 'EGLAPIENTRY ', + apientryp = 'EGLAPIENTRYP '), + # EGL extensions - EGL/eglext.h (no function pointers, yet @@@) + CGeneratorOptions( + filename = 'EGL/eglext.h', + apiname = 'egl', + profile = None, + versions = allVersions, + emitversions = None, + defaultExtensions = 'egl', # Default extensions for EGL + addExtensions = None, + removeExtensions = None, + prefixText = prefixStrings + eglPlatformStrings + eglextVersionStrings, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = protectProto, + protectProtoStr = 'EGL_EGLEXT_PROTOTYPES', + apicall = 'EGLAPI ', + apientry = 'EGLAPIENTRY ', + apientryp = 'EGLAPIENTRYP '), + # GLX 1.* API - GL/glx.h + CGeneratorOptions( + filename = 'GL/glx.h', + apiname = 'glx', + profile = None, + versions = allVersions, + emitversions = allVersions, + defaultExtensions = None, # No default extensions + addExtensions = None, + removeExtensions = None, + # add glXPlatformStrings? + prefixText = prefixStrings + genDateCommentString, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = protectProto, + protectProtoStr = 'GLX_GLXEXT_PROTOTYPES', + apicall = '', + apientry = '', + apientryp = ' *'), + # GLX 1.3+ API + extensions - GL/glxext.h (no function pointers, yet @@@) + CGeneratorOptions( + filename = 'GL/glxext.h', + apiname = 'glx', + profile = None, + versions = allVersions, + emitversions = glx13andLaterPat, + defaultExtensions = 'glx', # Default extensions for GLX + addExtensions = None, + removeExtensions = None, + # add glXPlatformStrings? + prefixText = prefixStrings + glxextVersionStrings, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = protectProto, + protectProtoStr = 'GLX_GLXEXT_PROTOTYPES', + apicall = '', + apientry = '', + apientryp = ' *'), + # WGL API + extensions - GL/wgl.h (no function pointers, yet @@@) + CGeneratorOptions( + filename = 'GL/wgl.h', + apiname = 'wgl', + profile = None, + versions = allVersions, + emitversions = allVersions, + defaultExtensions = 'wgl', # Default extensions for WGL + addExtensions = None, + removeExtensions = None, + prefixText = prefixStrings + wglPlatformStrings + genDateCommentString, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = protectProto, + protectProtoStr = 'WGL_WGLEXT_PROTOTYPES', + apicall = '', + apientry = 'WINAPI ', + apientryp = 'WINAPI * '), + # WGL extensions - GL/wglext.h (no function pointers, yet @@@) + CGeneratorOptions( + filename = 'GL/wglext.h', + apiname = 'wgl', + profile = None, + versions = allVersions, + emitversions = None, + defaultExtensions = 'wgl', # Default extensions for WGL + addExtensions = None, + removeExtensions = None, + prefixText = prefixStrings + wglPlatformStrings + wglextVersionStrings, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = protectProto, + protectProtoStr = 'WGL_WGLEXT_PROTOTYPES', + apicall = '', + apientry = 'WINAPI ', + apientryp = 'WINAPI * '), + # End of list + None +] + +# create error/warning & diagnostic files +if (errFilename): + errWarn = open(errFilename,'w') +else: + errWarn = sys.stderr +diag = open(diagFilename, 'w') + +def genHeaders(): + # Loop over targets, building each + generated = 0 + for genOpts in buildList: + if (genOpts == None): + break + if (target and target != genOpts.filename): + # write('*** Skipping', genOpts.filename) + continue + write('*** Building', genOpts.filename) + generated = generated + 1 + startTimer() + gen = COutputGenerator(errFile=errWarn, + warnFile=errWarn, + diagFile=diag) + reg.setGenerator(gen) + reg.apiGen(genOpts) + write('** Generated', genOpts.filename) + endTimer('Time to generate ' + genOpts.filename + ' =') + if (target and generated == 0): + write('Failed to generate target:', target) + +if (debug): + pdb.run('genHeaders()') +elif (profile): + import cProfile, pstats + cProfile.run('genHeaders()', 'profile.txt') + p = pstats.Stats('profile.txt') + p.strip_dirs().sort_stats('time').print_stats(50) +else: + genHeaders() diff --git a/StgSharp.GenerateGL/xml/genheaders.py b/StgSharp.GenerateGL/xml/genheaders.py index 61d3999a..909a8ef0 100644 --- a/StgSharp.GenerateGL/xml/genheaders.py +++ b/StgSharp.GenerateGL/xml/genheaders.py @@ -1,577 +1,577 @@ -#!/usr/bin/env python3 -# -# Copyright 2013-2025 The Khronos Group Inc. -# SPDX-License-Identifier: Apache-2.0 - -import sys, time, pdb, string, cProfile -from reg import * - -# debug - start header generation in debugger -# dump - dump registry after loading -# profile - enable Python profiling -# protect - whether to use #ifndef protections -# registry - use specified XML registry instead of gl.xml -# target - string name of target header, or all targets if None -# timeit - time length of registry loading & header generation -# validate - validate return & parameter group tags against -debug = False -dump = False -profile = False -protect = True -target = None -timeit = False -validate= False -# Default input / log files -errFilename = None -diagFilename = 'diag.txt' -regFilename = 'gl.xml' - -# Simple timer functions -startTime = None -def startTimer(): - global startTime - startTime = time.process_time() -def endTimer(msg): - global startTime - endTime = time.process_time() - if (timeit): - write(msg, endTime - startTime) - startTime = None - -# Turn a list of strings into a regexp string matching exactly those strings -def makeREstring(list): - return '^(' + '|'.join(list) + ')$' - -# These are "mandatory" OpenGL ES 1 extensions, to -# be included in the core GLES/gl.h header. -es1CoreList = [ - 'GL_OES_read_format', - 'GL_OES_compressed_paletted_texture', - 'GL_OES_point_size_array', - 'GL_OES_point_sprite' -] - -# Descriptive names for various regexp patterns used to select -# versions and extensions - -allVersions = allExtensions = '.*' -noVersions = noExtensions = None -gl12andLaterPat = r'1\.[2-9]|[234]\.[0-9]' -gles2onlyPat = r'2\.[0-9]' -gles2through30Pat = r'2\.[0-9]|3\.0' -gles2through31Pat = r'2\.[0-9]|3\.[01]' -gles2through32Pat = r'2\.[0-9]|3\.[012]' -es1CorePat = makeREstring(es1CoreList) -# Extensions in old glcorearb.h but not yet tagged accordingly in gl.xml -glCoreARBPat = None -glx13andLaterPat = r'1\.[3-9]' - -# Copyright text prefixing all headers (list of strings). -prefixStrings = [ - '/*', - '** Copyright 2013-2025 The Khronos Group Inc.', - '** SPDX-' + 'License-Identifier: MIT', - '**', - '** This header is generated from the Khronos OpenGL / OpenGL ES XML', - '** API Registry. The current version of the Registry, generator scripts', - '** used to make the header, and the header can be found at', - '** https://github.com/KhronosGroup/OpenGL-Registry', - '*/', - '' -] - -# glext.h / glcorearb.h define calling conventions inline (no GL *platform.h) -glExtPlatformStrings = [ - '#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)', - '#ifndef WIN32_LEAN_AND_MEAN', - '#define WIN32_LEAN_AND_MEAN 1', - '#endif', - '#include ', - '#endif', - '', - '#ifndef APIENTRY', - '#define APIENTRY', - '#endif', - '#ifndef APIENTRYP', - '#define APIENTRYP APIENTRY *', - '#endif', - '#ifndef GLAPI', - '#define GLAPI extern', - '#endif', - '' -] - -glCorearbPlatformStrings = glExtPlatformStrings + [ - '/* glcorearb.h is for use with OpenGL core profile implementations.', - '** It should should be placed in the same directory as gl.h and', - '** included as .', - '**', - '** glcorearb.h includes only APIs in the latest OpenGL core profile', - '** implementation together with APIs in newer ARB extensions which ', - '** can be supported by the core profile. It does not, and never will', - '** include functionality removed from the core profile, such as', - '** fixed-function vertex and fragment processing.', - '**', - '** Do not #include both and either of or', - '** in the same source file.', - '*/', - '' -] - -# wglext.h needs Windows include -wglPlatformStrings = [ - '#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)', - '#define WIN32_LEAN_AND_MEAN 1', - '#include ', - '#endif', - '', -] - -# Different APIs use different *platform.h files to define calling -# conventions -gles1PlatformStrings = [ '#include ', '' ] -gles2PlatformStrings = [ '#include ', '' ] -gles3PlatformStrings = [ '#include ', '' ] -glsc2PlatformStrings = [ '#include ', '' ] -eglPlatformStrings = [ '#include ', '' ] - -# GLES headers have a small addition to calling convention headers for function pointer typedefs -apiEntryPrefixStrings = [ - '#ifndef GL_APIENTRYP', - '#define GL_APIENTRYP GL_APIENTRY*', - '#endif', - '' -] - -# GLES 2/3 core API headers use a different protection mechanism for -# prototypes, per bug 14206. -glesProtoPrefixStrings = [ - '#ifndef GL_GLES_PROTOTYPES', - '#define GL_GLES_PROTOTYPES 1', - '#endif', - '' -] - -# Insert generation date in a comment for headers not having *GLEXT_VERSION macros -genDateCommentString = [ - format('/* Generated on date %s */' % time.strftime('%Y%m%d')), - '' -] - -# GL_GLEXT_VERSION is defined only in glext.h and gl2ext.h -glextVersionStrings = [ - format('#define GL_GLEXT_VERSION %s' % time.strftime('%Y%m%d')), - '' -] -# WGL_WGLEXT_VERSION is defined only in wglext.h -wglextVersionStrings = [ - format('#define WGL_WGLEXT_VERSION %s' % time.strftime('%Y%m%d')), - '' -] -# GLX_GLXEXT_VERSION is defined only in glxext.h -glxextVersionStrings = [ - format('#define GLX_GLXEXT_VERSION %s' % time.strftime('%Y%m%d')), - '' -] -# This is a bad but functional workaround for a structural problem in the scripts -# identified in https://github.com/KhronosGroup/OpenGL-Registry/pull/186#issuecomment-416196246 -glextKHRplatformStrings = [ - '#include ', - '' -] -# EGL_EGLEXT_VERSION is defined only in eglext.h -eglextVersionStrings = [ - format('#define EGL_EGLEXT_VERSION %s' % time.strftime('%Y%m%d')), - '' -] - -# Defaults for generating re-inclusion protection wrappers (or not) -protectFile = protect -protectFeature = protect -protectProto = protect - -buildList = [ - # GL API 1.2+ + extensions - GL/glext.h - CGeneratorOptions( - filename = '../api/GL/glext.h', - apiname = 'gl', - profile = 'compatibility', - versions = allVersions, - emitversions = gl12andLaterPat, - defaultExtensions = 'gl', # Default extensions for GL - addExtensions = None, - removeExtensions = None, - prefixText = prefixStrings + glExtPlatformStrings + glextVersionStrings + glextKHRplatformStrings, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = protectProto, - protectProtoStr = 'GL_GLEXT_PROTOTYPES', - apicall = 'GLAPI ', - apientry = 'APIENTRY ', - apientryp = 'APIENTRYP '), - # GL core profile + extensions - GL/glcorearb.h - CGeneratorOptions( - filename = '../api/GL/glcorearb.h', - apiname = 'gl', - profile = 'core', - versions = allVersions, - emitversions = allVersions, - defaultExtensions = 'glcore', # Default extensions for GL core profile (only) - addExtensions = glCoreARBPat, - removeExtensions = None, - prefixText = prefixStrings + glCorearbPlatformStrings, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = protectProto, - protectProtoStr = 'GL_GLEXT_PROTOTYPES', - apicall = 'GLAPI ', - apientry = 'APIENTRY ', - apientryp = 'APIENTRYP '), - # GLES 1.x API + mandatory extensions - GLES/gl.h (no function pointers) - CGeneratorOptions( - filename = '../api/GLES/gl.h', - apiname = 'gles1', - profile = 'common', - versions = allVersions, - emitversions = allVersions, - defaultExtensions = None, # No default extensions - addExtensions = es1CorePat, # Add mandatory ES1 extensions in GLES1/gl.h - removeExtensions = None, - prefixText = prefixStrings + gles1PlatformStrings + genDateCommentString, - genFuncPointers = False, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = False, # Core ES API functions are in the static link libraries - protectProtoStr = 'GL_GLEXT_PROTOTYPES', - apicall = 'GL_API ', - apientry = 'GL_APIENTRY ', - apientryp = 'GL_APIENTRYP '), - # GLES 1.x extensions - GLES/glext.h - CGeneratorOptions( - filename = '../api/GLES/glext.h', - apiname = 'gles1', - profile = 'common', - versions = allVersions, - emitversions = noVersions, - defaultExtensions = 'gles1', # Default extensions for GLES 1 - addExtensions = None, - removeExtensions = es1CorePat, # Remove mandatory ES1 extensions in GLES1/glext.h - prefixText = prefixStrings + apiEntryPrefixStrings + genDateCommentString, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = protectProto, - protectProtoStr = 'GL_GLEXT_PROTOTYPES', - apicall = 'GL_API ', - apientry = 'GL_APIENTRY ', - apientryp = 'GL_APIENTRYP '), - # GLES 2.0 API - GLES2/gl2.h (now with function pointers) - CGeneratorOptions( - filename = '../api/GLES2/gl2.h', - apiname = 'gles2', - profile = 'common', - versions = gles2onlyPat, - emitversions = allVersions, - defaultExtensions = None, # No default extensions - addExtensions = None, - removeExtensions = None, - prefixText = prefixStrings + gles2PlatformStrings + apiEntryPrefixStrings + glesProtoPrefixStrings + genDateCommentString, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = 'nonzero', # Core ES API functions are in the static link libraries - protectProtoStr = 'GL_GLES_PROTOTYPES', - apicall = 'GL_APICALL ', - apientry = 'GL_APIENTRY ', - apientryp = 'GL_APIENTRYP '), - # GLES 3.1 / 3.0 / 2.0 extensions - GLES2/gl2ext.h - CGeneratorOptions( - filename = '../api/GLES2/gl2ext.h', - apiname = 'gles2', - profile = 'common', - versions = gles2onlyPat, - emitversions = None, - defaultExtensions = 'gles2', # Default extensions for GLES 2 - addExtensions = None, - removeExtensions = None, - prefixText = prefixStrings + apiEntryPrefixStrings + glextVersionStrings, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = protectProto, - protectProtoStr = 'GL_GLEXT_PROTOTYPES', - apicall = 'GL_APICALL ', - apientry = 'GL_APIENTRY ', - apientryp = 'GL_APIENTRYP '), - # GLES 3.2 API - GLES3/gl32.h (now with function pointers) - CGeneratorOptions( - filename = '../api/GLES3/gl32.h', - apiname = 'gles2', - profile = 'common', - versions = gles2through32Pat, - emitversions = allVersions, - defaultExtensions = None, # No default extensions - addExtensions = None, - removeExtensions = None, - prefixText = prefixStrings + gles3PlatformStrings + apiEntryPrefixStrings + glesProtoPrefixStrings + genDateCommentString, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = 'nonzero', # Core ES API functions are in the static link libraries - protectProtoStr = 'GL_GLES_PROTOTYPES', - apicall = 'GL_APICALL ', - apientry = 'GL_APIENTRY ', - apientryp = 'GL_APIENTRYP '), - # GLES 3.1 API - GLES3/gl31.h (now with function pointers) - CGeneratorOptions( - filename = '../api/GLES3/gl31.h', - apiname = 'gles2', - profile = 'common', - versions = gles2through31Pat, - emitversions = allVersions, - defaultExtensions = None, # No default extensions - addExtensions = None, - removeExtensions = None, - prefixText = prefixStrings + gles3PlatformStrings + apiEntryPrefixStrings + glesProtoPrefixStrings + genDateCommentString, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = 'nonzero', # Core ES API functions are in the static link libraries - protectProtoStr = 'GL_GLES_PROTOTYPES', - apicall = 'GL_APICALL ', - apientry = 'GL_APIENTRY ', - apientryp = 'GL_APIENTRYP '), - # GLES 3.0 API - GLES3/gl3.h (now with function pointers) - CGeneratorOptions( - filename = '../api/GLES3/gl3.h', - apiname = 'gles2', - profile = 'common', - versions = gles2through30Pat, - emitversions = allVersions, - defaultExtensions = None, # No default extensions - addExtensions = None, - removeExtensions = None, - prefixText = prefixStrings + gles3PlatformStrings + apiEntryPrefixStrings + glesProtoPrefixStrings + genDateCommentString, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = 'nonzero', # Core ES API functions are in the static link libraries - protectProtoStr = 'GL_GLES_PROTOTYPES', - apicall = 'GL_APICALL ', - apientry = 'GL_APIENTRY ', - apientryp = 'GL_APIENTRYP '), - # GLSC 2.0 API - GLSC2/glsc2.h - CGeneratorOptions( - filename = '../api/GLSC2/glsc2.h', - apiname = 'glsc2', - profile = 'common', - versions = gles2onlyPat, - emitversions = allVersions, - defaultExtensions = None, # No default extensions - addExtensions = None, - removeExtensions = None, - prefixText = prefixStrings + glsc2PlatformStrings + apiEntryPrefixStrings + genDateCommentString, - genFuncPointers = False, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = False, - protectProtoStr = 'GL_GLEXT_PROTOTYPES', - apicall = 'GL_APICALL ', - apientry = 'GL_APIENTRY ', - apientryp = 'GL_APIENTRYP '), - # GLSC 2.0 extensions - GLSC2/gl2ext.h - CGeneratorOptions( - filename = '../api/GLSC2/glsc2ext.h', - apiname = 'glsc2', - profile = 'common', - versions = gles2onlyPat, - emitversions = None, - defaultExtensions = 'glsc2', # Default extensions for GLSC 2 - addExtensions = None, - removeExtensions = None, - prefixText = prefixStrings + apiEntryPrefixStrings + genDateCommentString, - genFuncPointers = False, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = False, - protectProtoStr = 'GL_GLEXT_PROTOTYPES', - apicall = 'GL_APICALL ', - apientry = 'GL_APIENTRY ', - apientryp = 'GL_APIENTRYP '), - # GLX 1.* API - GL/glx.h (experimental) - CGeneratorOptions( - filename = '../api/GL/glx.h', - apiname = 'glx', - profile = None, - versions = allVersions, - emitversions = allVersions, - defaultExtensions = None, # No default extensions - addExtensions = None, - removeExtensions = None, - # add glXPlatformStrings? - prefixText = prefixStrings + genDateCommentString, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = protectProto, - protectProtoStr = 'GLX_GLXEXT_PROTOTYPES', - apicall = '', - apientry = '', - apientryp = ' *'), - # GLX 1.3+ API + extensions - GL/glxext.h (no function pointers, yet @@@) - CGeneratorOptions( - filename = '../api/GL/glxext.h', - apiname = 'glx', - profile = None, - versions = allVersions, - emitversions = glx13andLaterPat, - defaultExtensions = 'glx', # Default extensions for GLX - addExtensions = None, - removeExtensions = None, - # add glXPlatformStrings? - prefixText = prefixStrings + glxextVersionStrings, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = protectProto, - protectProtoStr = 'GLX_GLXEXT_PROTOTYPES', - apicall = '', - apientry = '', - apientryp = ' *'), - # WGL API + extensions - GL/wgl.h (experimenta; no function pointers, yet @@@) - CGeneratorOptions( - filename = '../api/GL/wgl.h', - apiname = 'wgl', - profile = None, - versions = allVersions, - emitversions = allVersions, - defaultExtensions = 'wgl', # Default extensions for WGL - addExtensions = None, - removeExtensions = None, - prefixText = prefixStrings + wglPlatformStrings + genDateCommentString, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = protectProto, - protectProtoStr = 'WGL_WGLEXT_PROTOTYPES', - apicall = '', - apientry = 'WINAPI ', - apientryp = 'WINAPI * '), - # WGL extensions - GL/wglext.h (no function pointers, yet @@@) - CGeneratorOptions( - filename = '../api/GL/wglext.h', - apiname = 'wgl', - profile = None, - versions = allVersions, - emitversions = None, - defaultExtensions = 'wgl', # Default extensions for WGL - addExtensions = None, - removeExtensions = None, - prefixText = prefixStrings + wglPlatformStrings + wglextVersionStrings, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = protectFeature, - protectProto = protectProto, - protectProtoStr = 'WGL_WGLEXT_PROTOTYPES', - apicall = '', - apientry = 'WINAPI ', - apientryp = 'WINAPI * '), - # End of list - None -] - -def genHeaders(): - # Loop over targets, building each - generated = 0 - for genOpts in buildList: - if (genOpts == None): - break - if (target and target != genOpts.filename): - # write('*** Skipping', genOpts.filename) - continue - write('*** Building', genOpts.filename) - generated = generated + 1 - startTimer() - gen = COutputGenerator(errFile=errWarn, - warnFile=errWarn, - diagFile=diag) - reg.setGenerator(gen) - reg.apiGen(genOpts) - write('** Generated', genOpts.filename) - endTimer('Time to generate ' + genOpts.filename + ' =') - if (target and generated == 0): - write('Failed to generate target:', target) - - -if __name__ == '__main__': - i = 1 - while (i < len(sys.argv)): - arg = sys.argv[i] - i = i + 1 - if (arg == '-debug'): - write('Enabling debug (-debug)', file=sys.stderr) - debug = True - elif (arg == '-dump'): - write('Enabling dump (-dump)', file=sys.stderr) - dump = True - elif (arg == '-noprotect'): - write('Disabling inclusion protection in output headers', file=sys.stderr) - protect = False - elif (arg == '-profile'): - write('Enabling profiling (-profile)', file=sys.stderr) - profile = True - elif (arg == '-registry'): - regFilename = sys.argv[i] - i = i+1 - write('Using registry ', regFilename, file=sys.stderr) - elif (arg == '-time'): - write('Enabling timing (-time)', file=sys.stderr) - timeit = True - elif (arg == '-validate'): - write('Enabling group validation (-validate)', file=sys.stderr) - validate = True - elif (arg[0:1] == '-'): - write('Unrecognized argument:', arg, file=sys.stderr) - exit(1) - else: - target = arg - write('Using target', target, file=sys.stderr) - - # Load & parse registry - reg = Registry() - - startTimer() - tree = etree.parse(regFilename) - endTimer('Time to make ElementTree =') - - startTimer() - reg.loadElementTree(tree) - endTimer('Time to parse ElementTree =') - - if (validate): - reg.validateGroups() - - if (dump): - write('***************************************') - write('Performing Registry dump to regdump.txt') - write('***************************************') - reg.dumpReg(filehandle = open('regdump.txt','w')) - - # create error/warning & diagnostic files - if (errFilename): - errWarn = open(errFilename,'w') - else: - errWarn = sys.stderr - diag = open(diagFilename, 'w') - - if (debug): - pdb.run('genHeaders()') - elif (profile): - import cProfile, pstats - cProfile.run('genHeaders()', 'profile.txt') - p = pstats.Stats('profile.txt') - p.strip_dirs().sort_stats('time').print_stats(50) - else: - genHeaders() +#!/usr/bin/env python3 +# +# Copyright 2013-2025 The Khronos Group Inc. +# SPDX-License-Identifier: Apache-2.0 + +import sys, time, pdb, string, cProfile +from reg import * + +# debug - start header generation in debugger +# dump - dump registry after loading +# profile - enable Python profiling +# protect - whether to use #ifndef protections +# registry - use specified XML registry instead of gl.xml +# target - string name of target header, or all targets if None +# timeit - time length of registry loading & header generation +# validate - validate return & parameter group tags against +debug = False +dump = False +profile = False +protect = True +target = None +timeit = False +validate= False +# Default input / log files +errFilename = None +diagFilename = 'diag.txt' +regFilename = 'gl.xml' + +# Simple timer functions +startTime = None +def startTimer(): + global startTime + startTime = time.process_time() +def endTimer(msg): + global startTime + endTime = time.process_time() + if (timeit): + write(msg, endTime - startTime) + startTime = None + +# Turn a list of strings into a regexp string matching exactly those strings +def makeREstring(list): + return '^(' + '|'.join(list) + ')$' + +# These are "mandatory" OpenGL ES 1 extensions, to +# be included in the core GLES/gl.h header. +es1CoreList = [ + 'GL_OES_read_format', + 'GL_OES_compressed_paletted_texture', + 'GL_OES_point_size_array', + 'GL_OES_point_sprite' +] + +# Descriptive names for various regexp patterns used to select +# versions and extensions + +allVersions = allExtensions = '.*' +noVersions = noExtensions = None +gl12andLaterPat = r'1\.[2-9]|[234]\.[0-9]' +gles2onlyPat = r'2\.[0-9]' +gles2through30Pat = r'2\.[0-9]|3\.0' +gles2through31Pat = r'2\.[0-9]|3\.[01]' +gles2through32Pat = r'2\.[0-9]|3\.[012]' +es1CorePat = makeREstring(es1CoreList) +# Extensions in old glcorearb.h but not yet tagged accordingly in gl.xml +glCoreARBPat = None +glx13andLaterPat = r'1\.[3-9]' + +# Copyright text prefixing all headers (list of strings). +prefixStrings = [ + '/*', + '** Copyright 2013-2025 The Khronos Group Inc.', + '** SPDX-' + 'License-Identifier: MIT', + '**', + '** This header is generated from the Khronos OpenGL / OpenGL ES XML', + '** API Registry. The current version of the Registry, generator scripts', + '** used to make the header, and the header can be found at', + '** https://github.com/KhronosGroup/OpenGL-Registry', + '*/', + '' +] + +# glext.h / glcorearb.h define calling conventions inline (no GL *platform.h) +glExtPlatformStrings = [ + '#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)', + '#ifndef WIN32_LEAN_AND_MEAN', + '#define WIN32_LEAN_AND_MEAN 1', + '#endif', + '#include ', + '#endif', + '', + '#ifndef APIENTRY', + '#define APIENTRY', + '#endif', + '#ifndef APIENTRYP', + '#define APIENTRYP APIENTRY *', + '#endif', + '#ifndef GLAPI', + '#define GLAPI extern', + '#endif', + '' +] + +glCorearbPlatformStrings = glExtPlatformStrings + [ + '/* glcorearb.h is for use with OpenGL core profile implementations.', + '** It should should be placed in the same directory as gl.h and', + '** included as .', + '**', + '** glcorearb.h includes only APIs in the latest OpenGL core profile', + '** implementation together with APIs in newer ARB extensions which ', + '** can be supported by the core profile. It does not, and never will', + '** include functionality removed from the core profile, such as', + '** fixed-function vertex and fragment processing.', + '**', + '** Do not #include both and either of or', + '** in the same source file.', + '*/', + '' +] + +# wglext.h needs Windows include +wglPlatformStrings = [ + '#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)', + '#define WIN32_LEAN_AND_MEAN 1', + '#include ', + '#endif', + '', +] + +# Different APIs use different *platform.h files to define calling +# conventions +gles1PlatformStrings = [ '#include ', '' ] +gles2PlatformStrings = [ '#include ', '' ] +gles3PlatformStrings = [ '#include ', '' ] +glsc2PlatformStrings = [ '#include ', '' ] +eglPlatformStrings = [ '#include ', '' ] + +# GLES headers have a small addition to calling convention headers for function pointer typedefs +apiEntryPrefixStrings = [ + '#ifndef GL_APIENTRYP', + '#define GL_APIENTRYP GL_APIENTRY*', + '#endif', + '' +] + +# GLES 2/3 core API headers use a different protection mechanism for +# prototypes, per bug 14206. +glesProtoPrefixStrings = [ + '#ifndef GL_GLES_PROTOTYPES', + '#define GL_GLES_PROTOTYPES 1', + '#endif', + '' +] + +# Insert generation date in a comment for headers not having *GLEXT_VERSION macros +genDateCommentString = [ + format('/* Generated on date %s */' % time.strftime('%Y%m%d')), + '' +] + +# GL_GLEXT_VERSION is defined only in glext.h and gl2ext.h +glextVersionStrings = [ + format('#define GL_GLEXT_VERSION %s' % time.strftime('%Y%m%d')), + '' +] +# WGL_WGLEXT_VERSION is defined only in wglext.h +wglextVersionStrings = [ + format('#define WGL_WGLEXT_VERSION %s' % time.strftime('%Y%m%d')), + '' +] +# GLX_GLXEXT_VERSION is defined only in glxext.h +glxextVersionStrings = [ + format('#define GLX_GLXEXT_VERSION %s' % time.strftime('%Y%m%d')), + '' +] +# This is a bad but functional workaround for a structural problem in the scripts +# identified in https://github.com/KhronosGroup/OpenGL-Registry/pull/186#issuecomment-416196246 +glextKHRplatformStrings = [ + '#include ', + '' +] +# EGL_EGLEXT_VERSION is defined only in eglext.h +eglextVersionStrings = [ + format('#define EGL_EGLEXT_VERSION %s' % time.strftime('%Y%m%d')), + '' +] + +# Defaults for generating re-inclusion protection wrappers (or not) +protectFile = protect +protectFeature = protect +protectProto = protect + +buildList = [ + # GL API 1.2+ + extensions - GL/glext.h + CGeneratorOptions( + filename = '../api/GL/glext.h', + apiname = 'gl', + profile = 'compatibility', + versions = allVersions, + emitversions = gl12andLaterPat, + defaultExtensions = 'gl', # Default extensions for GL + addExtensions = None, + removeExtensions = None, + prefixText = prefixStrings + glExtPlatformStrings + glextVersionStrings + glextKHRplatformStrings, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = protectProto, + protectProtoStr = 'GL_GLEXT_PROTOTYPES', + apicall = 'GLAPI ', + apientry = 'APIENTRY ', + apientryp = 'APIENTRYP '), + # GL core profile + extensions - GL/glcorearb.h + CGeneratorOptions( + filename = '../api/GL/glcorearb.h', + apiname = 'gl', + profile = 'core', + versions = allVersions, + emitversions = allVersions, + defaultExtensions = 'glcore', # Default extensions for GL core profile (only) + addExtensions = glCoreARBPat, + removeExtensions = None, + prefixText = prefixStrings + glCorearbPlatformStrings, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = protectProto, + protectProtoStr = 'GL_GLEXT_PROTOTYPES', + apicall = 'GLAPI ', + apientry = 'APIENTRY ', + apientryp = 'APIENTRYP '), + # GLES 1.x API + mandatory extensions - GLES/gl.h (no function pointers) + CGeneratorOptions( + filename = '../api/GLES/gl.h', + apiname = 'gles1', + profile = 'common', + versions = allVersions, + emitversions = allVersions, + defaultExtensions = None, # No default extensions + addExtensions = es1CorePat, # Add mandatory ES1 extensions in GLES1/gl.h + removeExtensions = None, + prefixText = prefixStrings + gles1PlatformStrings + genDateCommentString, + genFuncPointers = False, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = False, # Core ES API functions are in the static link libraries + protectProtoStr = 'GL_GLEXT_PROTOTYPES', + apicall = 'GL_API ', + apientry = 'GL_APIENTRY ', + apientryp = 'GL_APIENTRYP '), + # GLES 1.x extensions - GLES/glext.h + CGeneratorOptions( + filename = '../api/GLES/glext.h', + apiname = 'gles1', + profile = 'common', + versions = allVersions, + emitversions = noVersions, + defaultExtensions = 'gles1', # Default extensions for GLES 1 + addExtensions = None, + removeExtensions = es1CorePat, # Remove mandatory ES1 extensions in GLES1/glext.h + prefixText = prefixStrings + apiEntryPrefixStrings + genDateCommentString, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = protectProto, + protectProtoStr = 'GL_GLEXT_PROTOTYPES', + apicall = 'GL_API ', + apientry = 'GL_APIENTRY ', + apientryp = 'GL_APIENTRYP '), + # GLES 2.0 API - GLES2/gl2.h (now with function pointers) + CGeneratorOptions( + filename = '../api/GLES2/gl2.h', + apiname = 'gles2', + profile = 'common', + versions = gles2onlyPat, + emitversions = allVersions, + defaultExtensions = None, # No default extensions + addExtensions = None, + removeExtensions = None, + prefixText = prefixStrings + gles2PlatformStrings + apiEntryPrefixStrings + glesProtoPrefixStrings + genDateCommentString, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = 'nonzero', # Core ES API functions are in the static link libraries + protectProtoStr = 'GL_GLES_PROTOTYPES', + apicall = 'GL_APICALL ', + apientry = 'GL_APIENTRY ', + apientryp = 'GL_APIENTRYP '), + # GLES 3.1 / 3.0 / 2.0 extensions - GLES2/gl2ext.h + CGeneratorOptions( + filename = '../api/GLES2/gl2ext.h', + apiname = 'gles2', + profile = 'common', + versions = gles2onlyPat, + emitversions = None, + defaultExtensions = 'gles2', # Default extensions for GLES 2 + addExtensions = None, + removeExtensions = None, + prefixText = prefixStrings + apiEntryPrefixStrings + glextVersionStrings, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = protectProto, + protectProtoStr = 'GL_GLEXT_PROTOTYPES', + apicall = 'GL_APICALL ', + apientry = 'GL_APIENTRY ', + apientryp = 'GL_APIENTRYP '), + # GLES 3.2 API - GLES3/gl32.h (now with function pointers) + CGeneratorOptions( + filename = '../api/GLES3/gl32.h', + apiname = 'gles2', + profile = 'common', + versions = gles2through32Pat, + emitversions = allVersions, + defaultExtensions = None, # No default extensions + addExtensions = None, + removeExtensions = None, + prefixText = prefixStrings + gles3PlatformStrings + apiEntryPrefixStrings + glesProtoPrefixStrings + genDateCommentString, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = 'nonzero', # Core ES API functions are in the static link libraries + protectProtoStr = 'GL_GLES_PROTOTYPES', + apicall = 'GL_APICALL ', + apientry = 'GL_APIENTRY ', + apientryp = 'GL_APIENTRYP '), + # GLES 3.1 API - GLES3/gl31.h (now with function pointers) + CGeneratorOptions( + filename = '../api/GLES3/gl31.h', + apiname = 'gles2', + profile = 'common', + versions = gles2through31Pat, + emitversions = allVersions, + defaultExtensions = None, # No default extensions + addExtensions = None, + removeExtensions = None, + prefixText = prefixStrings + gles3PlatformStrings + apiEntryPrefixStrings + glesProtoPrefixStrings + genDateCommentString, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = 'nonzero', # Core ES API functions are in the static link libraries + protectProtoStr = 'GL_GLES_PROTOTYPES', + apicall = 'GL_APICALL ', + apientry = 'GL_APIENTRY ', + apientryp = 'GL_APIENTRYP '), + # GLES 3.0 API - GLES3/gl3.h (now with function pointers) + CGeneratorOptions( + filename = '../api/GLES3/gl3.h', + apiname = 'gles2', + profile = 'common', + versions = gles2through30Pat, + emitversions = allVersions, + defaultExtensions = None, # No default extensions + addExtensions = None, + removeExtensions = None, + prefixText = prefixStrings + gles3PlatformStrings + apiEntryPrefixStrings + glesProtoPrefixStrings + genDateCommentString, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = 'nonzero', # Core ES API functions are in the static link libraries + protectProtoStr = 'GL_GLES_PROTOTYPES', + apicall = 'GL_APICALL ', + apientry = 'GL_APIENTRY ', + apientryp = 'GL_APIENTRYP '), + # GLSC 2.0 API - GLSC2/glsc2.h + CGeneratorOptions( + filename = '../api/GLSC2/glsc2.h', + apiname = 'glsc2', + profile = 'common', + versions = gles2onlyPat, + emitversions = allVersions, + defaultExtensions = None, # No default extensions + addExtensions = None, + removeExtensions = None, + prefixText = prefixStrings + glsc2PlatformStrings + apiEntryPrefixStrings + genDateCommentString, + genFuncPointers = False, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = False, + protectProtoStr = 'GL_GLEXT_PROTOTYPES', + apicall = 'GL_APICALL ', + apientry = 'GL_APIENTRY ', + apientryp = 'GL_APIENTRYP '), + # GLSC 2.0 extensions - GLSC2/gl2ext.h + CGeneratorOptions( + filename = '../api/GLSC2/glsc2ext.h', + apiname = 'glsc2', + profile = 'common', + versions = gles2onlyPat, + emitversions = None, + defaultExtensions = 'glsc2', # Default extensions for GLSC 2 + addExtensions = None, + removeExtensions = None, + prefixText = prefixStrings + apiEntryPrefixStrings + genDateCommentString, + genFuncPointers = False, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = False, + protectProtoStr = 'GL_GLEXT_PROTOTYPES', + apicall = 'GL_APICALL ', + apientry = 'GL_APIENTRY ', + apientryp = 'GL_APIENTRYP '), + # GLX 1.* API - GL/glx.h (experimental) + CGeneratorOptions( + filename = '../api/GL/glx.h', + apiname = 'glx', + profile = None, + versions = allVersions, + emitversions = allVersions, + defaultExtensions = None, # No default extensions + addExtensions = None, + removeExtensions = None, + # add glXPlatformStrings? + prefixText = prefixStrings + genDateCommentString, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = protectProto, + protectProtoStr = 'GLX_GLXEXT_PROTOTYPES', + apicall = '', + apientry = '', + apientryp = ' *'), + # GLX 1.3+ API + extensions - GL/glxext.h (no function pointers, yet @@@) + CGeneratorOptions( + filename = '../api/GL/glxext.h', + apiname = 'glx', + profile = None, + versions = allVersions, + emitversions = glx13andLaterPat, + defaultExtensions = 'glx', # Default extensions for GLX + addExtensions = None, + removeExtensions = None, + # add glXPlatformStrings? + prefixText = prefixStrings + glxextVersionStrings, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = protectProto, + protectProtoStr = 'GLX_GLXEXT_PROTOTYPES', + apicall = '', + apientry = '', + apientryp = ' *'), + # WGL API + extensions - GL/wgl.h (experimenta; no function pointers, yet @@@) + CGeneratorOptions( + filename = '../api/GL/wgl.h', + apiname = 'wgl', + profile = None, + versions = allVersions, + emitversions = allVersions, + defaultExtensions = 'wgl', # Default extensions for WGL + addExtensions = None, + removeExtensions = None, + prefixText = prefixStrings + wglPlatformStrings + genDateCommentString, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = protectProto, + protectProtoStr = 'WGL_WGLEXT_PROTOTYPES', + apicall = '', + apientry = 'WINAPI ', + apientryp = 'WINAPI * '), + # WGL extensions - GL/wglext.h (no function pointers, yet @@@) + CGeneratorOptions( + filename = '../api/GL/wglext.h', + apiname = 'wgl', + profile = None, + versions = allVersions, + emitversions = None, + defaultExtensions = 'wgl', # Default extensions for WGL + addExtensions = None, + removeExtensions = None, + prefixText = prefixStrings + wglPlatformStrings + wglextVersionStrings, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = protectFeature, + protectProto = protectProto, + protectProtoStr = 'WGL_WGLEXT_PROTOTYPES', + apicall = '', + apientry = 'WINAPI ', + apientryp = 'WINAPI * '), + # End of list + None +] + +def genHeaders(): + # Loop over targets, building each + generated = 0 + for genOpts in buildList: + if (genOpts == None): + break + if (target and target != genOpts.filename): + # write('*** Skipping', genOpts.filename) + continue + write('*** Building', genOpts.filename) + generated = generated + 1 + startTimer() + gen = COutputGenerator(errFile=errWarn, + warnFile=errWarn, + diagFile=diag) + reg.setGenerator(gen) + reg.apiGen(genOpts) + write('** Generated', genOpts.filename) + endTimer('Time to generate ' + genOpts.filename + ' =') + if (target and generated == 0): + write('Failed to generate target:', target) + + +if __name__ == '__main__': + i = 1 + while (i < len(sys.argv)): + arg = sys.argv[i] + i = i + 1 + if (arg == '-debug'): + write('Enabling debug (-debug)', file=sys.stderr) + debug = True + elif (arg == '-dump'): + write('Enabling dump (-dump)', file=sys.stderr) + dump = True + elif (arg == '-noprotect'): + write('Disabling inclusion protection in output headers', file=sys.stderr) + protect = False + elif (arg == '-profile'): + write('Enabling profiling (-profile)', file=sys.stderr) + profile = True + elif (arg == '-registry'): + regFilename = sys.argv[i] + i = i+1 + write('Using registry ', regFilename, file=sys.stderr) + elif (arg == '-time'): + write('Enabling timing (-time)', file=sys.stderr) + timeit = True + elif (arg == '-validate'): + write('Enabling group validation (-validate)', file=sys.stderr) + validate = True + elif (arg[0:1] == '-'): + write('Unrecognized argument:', arg, file=sys.stderr) + exit(1) + else: + target = arg + write('Using target', target, file=sys.stderr) + + # Load & parse registry + reg = Registry() + + startTimer() + tree = etree.parse(regFilename) + endTimer('Time to make ElementTree =') + + startTimer() + reg.loadElementTree(tree) + endTimer('Time to parse ElementTree =') + + if (validate): + reg.validateGroups() + + if (dump): + write('***************************************') + write('Performing Registry dump to regdump.txt') + write('***************************************') + reg.dumpReg(filehandle = open('regdump.txt','w')) + + # create error/warning & diagnostic files + if (errFilename): + errWarn = open(errFilename,'w') + else: + errWarn = sys.stderr + diag = open(diagFilename, 'w') + + if (debug): + pdb.run('genHeaders()') + elif (profile): + import cProfile, pstats + cProfile.run('genHeaders()', 'profile.txt') + p = pstats.Stats('profile.txt') + p.strip_dirs().sort_stats('time').print_stats(50) + else: + genHeaders() diff --git a/StgSharp.GenerateGL/xml/gl.xml b/StgSharp.GenerateGL/xml/gl.xml index 0a6d2709..aabe69ea 100644 --- a/StgSharp.GenerateGL/xml/gl.xml +++ b/StgSharp.GenerateGL/xml/gl.xml @@ -1,47736 +1,47736 @@ - - - -Copyright 2013-2025 The Khronos Group Inc. -SPDX-License-Identifier: Apache-2.0 - -This file, gl.xml, is the OpenGL and OpenGL API Registry. The canonical -version of the registry, together with documentation, schema, and Python -generator scripts used to generate C header files for OpenGL and OpenGL ES, -can always be found in the Khronos Registry at -https://github.com/KhronosGroup/OpenGL-Registry - - - - - - #include <KHR/khrplatform.h> - - typedef unsigned int GLenum; - typedef unsigned char GLboolean; - typedef unsigned int GLbitfield; - typedef void GLvoid; - typedef khronos_int8_t GLbyte; - typedef khronos_uint8_t GLubyte; - typedef khronos_int16_t GLshort; - typedef khronos_uint16_t GLushort; - typedef int GLint; - typedef unsigned int GLuint; - typedef khronos_int32_t GLclampx; - typedef int GLsizei; - typedef khronos_float_t GLfloat; - typedef khronos_float_t GLclampf; - typedef double GLdouble; - typedef double GLclampd; - typedef void *GLeglClientBufferEXT; - typedef void *GLeglImageOES; - typedef char GLchar; - typedef char GLcharARB; - #ifdef __APPLE__ -typedef void *GLhandleARB; -#else -typedef unsigned int GLhandleARB; -#endif - typedef khronos_uint16_t GLhalf; - typedef khronos_uint16_t GLhalfARB; - typedef khronos_int32_t GLfixed; - typedef khronos_intptr_t GLintptr; - typedef khronos_intptr_t GLintptrARB; - typedef khronos_ssize_t GLsizeiptr; - typedef khronos_ssize_t GLsizeiptrARB; - typedef khronos_int64_t GLint64; - typedef khronos_int64_t GLint64EXT; - typedef khronos_uint64_t GLuint64; - typedef khronos_uint64_t GLuint64EXT; - typedef struct __GLsync *GLsync; - struct _cl_context; - struct _cl_event; - typedef void ( *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); - typedef void ( *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); - typedef void ( *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); - - - typedef void ( *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam); - typedef unsigned short GLhalfNV; - typedef GLintptr GLvdpauSurfaceNV; - typedef void ( *GLVULKANPROCNV)(void); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void glAccum - GLenum op - GLfloat value - - - - void glAccumxOES - GLenum op - GLfixed value - - - void glActiveProgramEXT - GLuint program - - - void glActiveShaderProgram - GLuint pipeline - GLuint program - - - void glActiveShaderProgramEXT - GLuint pipeline - GLuint program - - - void glActiveStencilFaceEXT - GLenum face - - - - void glActiveTexture - GLenum texture - - - - void glActiveTextureARB - GLenum texture - - - - - void glActiveVaryingNV - GLuint program - const GLchar *name - - - void glAlphaFragmentOp1ATI - GLenum op - GLuint dst - GLuint dstMod - GLuint arg1 - GLuint arg1Rep - GLuint arg1Mod - - - void glAlphaFragmentOp2ATI - GLenum op - GLuint dst - GLuint dstMod - GLuint arg1 - GLuint arg1Rep - GLuint arg1Mod - GLuint arg2 - GLuint arg2Rep - GLuint arg2Mod - - - void glAlphaFragmentOp3ATI - GLenum op - GLuint dst - GLuint dstMod - GLuint arg1 - GLuint arg1Rep - GLuint arg1Mod - GLuint arg2 - GLuint arg2Rep - GLuint arg2Mod - GLuint arg3 - GLuint arg3Rep - GLuint arg3Mod - - - void glAlphaFunc - GLenum func - GLfloat ref - - - - void glAlphaFuncQCOM - GLenum func - GLclampf ref - - - void glAlphaFuncx - GLenum func - GLfixed ref - - - void glAlphaFuncxOES - GLenum func - GLfixed ref - - - void glAlphaToCoverageDitherControlNV - GLenum mode - - - void glApplyFramebufferAttachmentCMAAINTEL - - - void glApplyTextureEXT - GLenum mode - - - GLboolean glAcquireKeyedMutexWin32EXT - GLuint memory - GLuint64 key - GLuint timeout - - - GLboolean glAreProgramsResidentNV - GLsizei n - const GLuint *programs - GLboolean *residences - - - - GLboolean glAreTexturesResident - GLsizei n - const GLuint *textures - GLboolean *residences - - - - GLboolean glAreTexturesResidentEXT - GLsizei n - const GLuint *textures - GLboolean *residences - - - - void glArrayElement - GLint i - - - void glArrayElementEXT - GLint i - - - - void glArrayObjectATI - GLenum array - GLint size - GLenum type - GLsizei stride - GLuint buffer - GLuint offset - - - GLuint glAsyncCopyBufferSubDataNVX - GLsizei waitSemaphoreCount - const GLuint *waitSemaphoreArray - const GLuint64 *fenceValueArray - GLuint readGpu - GLbitfield writeGpuMask - GLuint readBuffer - GLuint writeBuffer - GLintptr readOffset - GLintptr writeOffset - GLsizeiptr size - GLsizei signalSemaphoreCount - const GLuint *signalSemaphoreArray - const GLuint64 *signalValueArray - - - GLuint glAsyncCopyImageSubDataNVX - GLsizei waitSemaphoreCount - const GLuint *waitSemaphoreArray - const GLuint64 *waitValueArray - GLuint srcGpu - GLbitfield dstGpuMask - GLuint srcName - GLenum srcTarget - GLint srcLevel - GLint srcX - GLint srcY - GLint srcZ - GLuint dstName - GLenum dstTarget - GLint dstLevel - GLint dstX - GLint dstY - GLint dstZ - GLsizei srcWidth - GLsizei srcHeight - GLsizei srcDepth - GLsizei signalSemaphoreCount - const GLuint *signalSemaphoreArray - const GLuint64 *signalValueArray - - - void glAsyncMarkerSGIX - GLuint marker - - - void glAttachObjectARB - GLhandleARB containerObj - GLhandleARB obj - - - - void glAttachShader - GLuint program - GLuint shader - - - void glBegin - GLenum mode - - - - void glBeginConditionalRender - GLuint id - GLenum mode - - - void glBeginConditionalRenderNV - GLuint id - GLenum mode - - - - - void glBeginConditionalRenderNVX - GLuint id - - - void glBeginFragmentShaderATI - - - void glBeginOcclusionQueryNV - GLuint id - - - void glBeginPerfMonitorAMD - GLuint monitor - - - void glBeginPerfQueryINTEL - GLuint queryHandle - - - void glBeginQuery - GLenum target - GLuint id - - - - void glBeginQueryARB - GLenum target - GLuint id - - - - void glBeginQueryEXT - GLenum target - GLuint id - - - void glBeginQueryIndexed - GLenum target - GLuint index - GLuint id - - - void glBeginTransformFeedback - GLenum primitiveMode - - - - void glBeginTransformFeedbackEXT - GLenum primitiveMode - - - - void glBeginTransformFeedbackNV - GLenum primitiveMode - - - - void glBeginVertexShaderEXT - - - void glBeginVideoCaptureNV - GLuint video_capture_slot - - - void glBindAttribLocation - GLuint program - GLuint index - const GLchar *name - - - void glBindAttribLocationARB - GLhandleARB programObj - GLuint index - const GLcharARB *name - - - - void glBindBuffer - GLenum target - GLuint buffer - - - void glBindBufferARB - GLenum target - GLuint buffer - - - - void glBindBufferBase - GLenum target - GLuint index - GLuint buffer - - - - void glBindBufferBaseEXT - GLenum target - GLuint index - GLuint buffer - - - - void glBindBufferBaseNV - GLenum target - GLuint index - GLuint buffer - - - - void glBindBufferOffsetEXT - GLenum target - GLuint index - GLuint buffer - GLintptr offset - - - void glBindBufferOffsetNV - GLenum target - GLuint index - GLuint buffer - GLintptr offset - - - - void glBindBufferRange - GLenum target - GLuint index - GLuint buffer - GLintptr offset - GLsizeiptr size - - - - void glBindBufferRangeEXT - GLenum target - GLuint index - GLuint buffer - GLintptr offset - GLsizeiptr size - - - - void glBindBufferRangeNV - GLenum target - GLuint index - GLuint buffer - GLintptr offset - GLsizeiptr size - - - - void glBindBuffersBase - GLenum target - GLuint first - GLsizei count - const GLuint *buffers - - - void glBindBuffersRange - GLenum target - GLuint first - GLsizei count - const GLuint *buffers - const GLintptr *offsets - const GLsizeiptr *sizes - - - void glBindFragDataLocation - GLuint program - GLuint color - const GLchar *name - - - void glBindFragDataLocationEXT - GLuint program - GLuint color - const GLchar *name - - - - void glBindFragDataLocationIndexed - GLuint program - GLuint colorNumber - GLuint index - const GLchar *name - - - void glBindFragDataLocationIndexedEXT - GLuint program - GLuint colorNumber - GLuint index - const GLchar *name - - - - void glBindFragmentShaderATI - GLuint id - - - void glBindFramebuffer - GLenum target - GLuint framebuffer - - - - void glBindFramebufferEXT - GLenum target - GLuint framebuffer - - - - void glBindFramebufferOES - GLenum target - GLuint framebuffer - - - void glBindImageTexture - GLuint unit - GLuint texture - GLint level - GLboolean layered - GLint layer - GLenum access - GLenum format - - - void glBindImageTextureEXT - GLuint index - GLuint texture - GLint level - GLboolean layered - GLint layer - GLenum access - GLint format - - - void glBindImageTextures - GLuint first - GLsizei count - const GLuint *textures - - - GLuint glBindLightParameterEXT - GLenum light - GLenum value - - - GLuint glBindMaterialParameterEXT - GLenum face - GLenum value - - - void glBindMultiTextureEXT - GLenum texunit - GLenum target - GLuint texture - - - GLuint glBindParameterEXT - GLenum value - - - void glBindProgramARB - GLenum target - GLuint program - - - - void glBindProgramNV - GLenum target - GLuint id - - - - - void glBindProgramPipeline - GLuint pipeline - - - void glBindProgramPipelineEXT - GLuint pipeline - - - void glBindRenderbuffer - GLenum target - GLuint renderbuffer - - - - void glBindRenderbufferEXT - GLenum target - GLuint renderbuffer - - - - void glBindRenderbufferOES - GLenum target - GLuint renderbuffer - - - void glBindSampler - GLuint unit - GLuint sampler - - - void glBindSamplers - GLuint first - GLsizei count - const GLuint *samplers - - - void glBindShadingRateImageNV - GLuint texture - - - GLuint glBindTexGenParameterEXT - GLenum unit - GLenum coord - GLenum value - - - void glBindTexture - GLenum target - GLuint texture - - - - void glBindTextureEXT - GLenum target - GLuint texture - - - - - void glBindTextureUnit - GLuint unit - GLuint texture - - - GLuint glBindTextureUnitParameterEXT - GLenum unit - GLenum value - - - void glBindTextures - GLuint first - GLsizei count - const GLuint *textures - - - void glBindTransformFeedback - GLenum target - GLuint id - - - void glBindTransformFeedbackNV - GLenum target - GLuint id - - - void glBindVertexArray - GLuint array - - - - void glBindVertexArrayAPPLE - GLuint array - - - void glBindVertexArrayOES - GLuint array - - - - void glBindVertexBuffer - GLuint bindingindex - GLuint buffer - GLintptr offset - GLsizei stride - - - void glBindVertexBuffers - GLuint first - GLsizei count - const GLuint *buffers - const GLintptr *offsets - const GLsizei *strides - - - void glBindVertexShaderEXT - GLuint id - - - void glBindVideoCaptureStreamBufferNV - GLuint video_capture_slot - GLuint stream - GLenum frame_region - GLintptrARB offset - - - void glBindVideoCaptureStreamTextureNV - GLuint video_capture_slot - GLuint stream - GLenum frame_region - GLenum target - GLuint texture - - - void glBinormal3bEXT - GLbyte bx - GLbyte by - GLbyte bz - - - - void glBinormal3bvEXT - const GLbyte *v - - - void glBinormal3dEXT - GLdouble bx - GLdouble by - GLdouble bz - - - - void glBinormal3dvEXT - const GLdouble *v - - - void glBinormal3fEXT - GLfloat bx - GLfloat by - GLfloat bz - - - - void glBinormal3fvEXT - const GLfloat *v - - - void glBinormal3iEXT - GLint bx - GLint by - GLint bz - - - - void glBinormal3ivEXT - const GLint *v - - - void glBinormal3sEXT - GLshort bx - GLshort by - GLshort bz - - - - void glBinormal3svEXT - const GLshort *v - - - void glBinormalPointerEXT - GLenum type - GLsizei stride - const void *pointer - - - void glBitmap - GLsizei width - GLsizei height - GLfloat xorig - GLfloat yorig - GLfloat xmove - GLfloat ymove - const GLubyte *bitmap - - - - - void glBitmapxOES - GLsizei width - GLsizei height - GLfixed xorig - GLfixed yorig - GLfixed xmove - GLfixed ymove - const GLubyte *bitmap - - - void glBlendBarrier - - - void glBlendBarrierKHR - - - - void glBlendBarrierNV - - - - void glBlendColor - GLfloat red - GLfloat green - GLfloat blue - GLfloat alpha - - - - void glBlendColorEXT - GLfloat red - GLfloat green - GLfloat blue - GLfloat alpha - - - - - void glBlendColorxOES - GLfixed red - GLfixed green - GLfixed blue - GLfixed alpha - - - void glBlendEquation - GLenum mode - - - - void glBlendEquationEXT - GLenum mode - - - - - void glBlendEquationIndexedAMD - GLuint buf - GLenum mode - - - - void glBlendEquationOES - GLenum mode - - - void glBlendEquationSeparate - GLenum modeRGB - GLenum modeAlpha - - - - void glBlendEquationSeparateEXT - GLenum modeRGB - GLenum modeAlpha - - - - - void glBlendEquationSeparateIndexedAMD - GLuint buf - GLenum modeRGB - GLenum modeAlpha - - - - void glBlendEquationSeparateOES - GLenum modeRGB - GLenum modeAlpha - - - void glBlendEquationSeparatei - GLuint buf - GLenum modeRGB - GLenum modeAlpha - - - void glBlendEquationSeparateiARB - GLuint buf - GLenum modeRGB - GLenum modeAlpha - - - - void glBlendEquationSeparateiEXT - GLuint buf - GLenum modeRGB - GLenum modeAlpha - - - - void glBlendEquationSeparateiOES - GLuint buf - GLenum modeRGB - GLenum modeAlpha - - - - void glBlendEquationi - GLuint buf - GLenum mode - - - void glBlendEquationiARB - GLuint buf - GLenum mode - - - - void glBlendEquationiEXT - GLuint buf - GLenum mode - - - - void glBlendEquationiOES - GLuint buf - GLenum mode - - - - void glBlendFunc - GLenum sfactor - GLenum dfactor - - - - void glBlendFuncIndexedAMD - GLuint buf - GLenum src - GLenum dst - - - - void glBlendFuncSeparate - GLenum sfactorRGB - GLenum dfactorRGB - GLenum sfactorAlpha - GLenum dfactorAlpha - - - - void glBlendFuncSeparateEXT - GLenum sfactorRGB - GLenum dfactorRGB - GLenum sfactorAlpha - GLenum dfactorAlpha - - - - - void glBlendFuncSeparateINGR - GLenum sfactorRGB - GLenum dfactorRGB - GLenum sfactorAlpha - GLenum dfactorAlpha - - - - - void glBlendFuncSeparateIndexedAMD - GLuint buf - GLenum srcRGB - GLenum dstRGB - GLenum srcAlpha - GLenum dstAlpha - - - - void glBlendFuncSeparateOES - GLenum srcRGB - GLenum dstRGB - GLenum srcAlpha - GLenum dstAlpha - - - void glBlendFuncSeparatei - GLuint buf - GLenum srcRGB - GLenum dstRGB - GLenum srcAlpha - GLenum dstAlpha - - - void glBlendFuncSeparateiARB - GLuint buf - GLenum srcRGB - GLenum dstRGB - GLenum srcAlpha - GLenum dstAlpha - - - - void glBlendFuncSeparateiEXT - GLuint buf - GLenum srcRGB - GLenum dstRGB - GLenum srcAlpha - GLenum dstAlpha - - - - void glBlendFuncSeparateiOES - GLuint buf - GLenum srcRGB - GLenum dstRGB - GLenum srcAlpha - GLenum dstAlpha - - - - void glBlendFunci - GLuint buf - GLenum src - GLenum dst - - - void glBlendFunciARB - GLuint buf - GLenum src - GLenum dst - - - - void glBlendFunciEXT - GLuint buf - GLenum src - GLenum dst - - - - void glBlendFunciOES - GLuint buf - GLenum src - GLenum dst - - - - void glBlendParameteriNV - GLenum pname - GLint value - - - void glBlitFramebuffer - GLint srcX0 - GLint srcY0 - GLint srcX1 - GLint srcY1 - GLint dstX0 - GLint dstY0 - GLint dstX1 - GLint dstY1 - GLbitfield mask - GLenum filter - - - - void glBlitFramebufferANGLE - GLint srcX0 - GLint srcY0 - GLint srcX1 - GLint srcY1 - GLint dstX0 - GLint dstY0 - GLint dstX1 - GLint dstY1 - GLbitfield mask - GLenum filter - - - void glBlitFramebufferEXT - GLint srcX0 - GLint srcY0 - GLint srcX1 - GLint srcY1 - GLint dstX0 - GLint dstY0 - GLint dstX1 - GLint dstY1 - GLbitfield mask - GLenum filter - - - - - void glBlitFramebufferLayerEXT - GLint srcX0 - GLint srcY0 - GLint srcX1 - GLint srcY1 - GLint srcLayer - GLint dstX0 - GLint dstY0 - GLint dstX1 - GLint dstY1 - GLint dstLayer - GLbitfield mask - GLenum filter - - - void glBlitFramebufferLayersEXT - GLint srcX0 - GLint srcY0 - GLint srcX1 - GLint srcY1 - GLint dstX0 - GLint dstY0 - GLint dstX1 - GLint dstY1 - GLbitfield mask - GLenum filter - - - void glBlitFramebufferNV - GLint srcX0 - GLint srcY0 - GLint srcX1 - GLint srcY1 - GLint dstX0 - GLint dstY0 - GLint dstX1 - GLint dstY1 - GLbitfield mask - GLenum filter - - - - void glBlitNamedFramebuffer - GLuint readFramebuffer - GLuint drawFramebuffer - GLint srcX0 - GLint srcY0 - GLint srcX1 - GLint srcY1 - GLint dstX0 - GLint dstY0 - GLint dstX1 - GLint dstY1 - GLbitfield mask - GLenum filter - - - void glBufferAddressRangeNV - GLenum pname - GLuint index - GLuint64EXT address - GLsizeiptr length - - - void glBufferAttachMemoryNV - GLenum target - GLuint memory - GLuint64 offset - - - void glBufferData - GLenum target - GLsizeiptr size - const void *data - GLenum usage - - - void glBufferDataARB - GLenum target - GLsizeiptrARB size - const void *data - GLenum usage - - - - void glBufferPageCommitmentARB - GLenum target - GLintptr offset - GLsizeiptr size - GLboolean commit - - - void glBufferPageCommitmentMemNV - GLenum target - GLintptr offset - GLsizeiptr size - GLuint memory - GLuint64 memOffset - GLboolean commit - - - void glBufferParameteriAPPLE - GLenum target - GLenum pname - GLint param - - - void glBufferStorage - GLenum target - GLsizeiptr size - const void *data - GLbitfield flags - - - void glBufferStorageEXT - GLenum target - GLsizeiptr size - const void *data - GLbitfield flags - - - - void glBufferStorageExternalEXT - GLenum target - GLintptr offset - GLsizeiptr size - GLeglClientBufferEXT clientBuffer - GLbitfield flags - - - void glBufferStorageMemEXT - GLenum target - GLsizeiptr size - GLuint memory - GLuint64 offset - - - void glBufferSubData - GLenum target - GLintptr offset - GLsizeiptr size - const void *data - - - void glBufferSubDataARB - GLenum target - GLintptrARB offset - GLsizeiptrARB size - const void *data - - - - void glCallCommandListNV - GLuint list - - - void glCallList - GLuint list - - - - void glCallLists - GLsizei n - GLenum type - const void *lists - - - - GLenum glCheckFramebufferStatus - GLenum target - - - - GLenum glCheckFramebufferStatusEXT - GLenum target - - - - - GLenum glCheckFramebufferStatusOES - GLenum target - - - GLenum glCheckNamedFramebufferStatus - GLuint framebuffer - GLenum target - - - GLenum glCheckNamedFramebufferStatusEXT - GLuint framebuffer - GLenum target - - - void glClampColor - GLenum target - GLenum clamp - - - - void glClampColorARB - GLenum target - GLenum clamp - - - - - void glClear - GLbitfield mask - - - - void glClearAccum - GLfloat red - GLfloat green - GLfloat blue - GLfloat alpha - - - - void glClearAccumxOES - GLfixed red - GLfixed green - GLfixed blue - GLfixed alpha - - - void glClearBufferData - GLenum target - GLenum internalformat - GLenum format - GLenum type - const void *data - - - void glClearBufferSubData - GLenum target - GLenum internalformat - GLintptr offset - GLsizeiptr size - GLenum format - GLenum type - const void *data - - - void glClearBufferfi - GLenum buffer - GLint drawbuffer - GLfloat depth - GLint stencil - - - - void glClearBufferfv - GLenum buffer - GLint drawbuffer - const GLfloat *value - - - - void glClearBufferiv - GLenum buffer - GLint drawbuffer - const GLint *value - - - - void glClearBufferuiv - GLenum buffer - GLint drawbuffer - const GLuint *value - - - - void glClearColor - GLfloat red - GLfloat green - GLfloat blue - GLfloat alpha - - - - void glClearColorIiEXT - GLint red - GLint green - GLint blue - GLint alpha - - - - void glClearColorIuiEXT - GLuint red - GLuint green - GLuint blue - GLuint alpha - - - - void glClearColorx - GLfixed red - GLfixed green - GLfixed blue - GLfixed alpha - - - void glClearColorxOES - GLfixed red - GLfixed green - GLfixed blue - GLfixed alpha - - - void glClearDepth - GLdouble depth - - - - void glClearDepthdNV - GLdouble depth - - - - void glClearDepthf - GLfloat d - - - void glClearDepthfOES - GLclampf depth - - - - - void glClearDepthx - GLfixed depth - - - void glClearDepthxOES - GLfixed depth - - - void glClearIndex - GLfloat c - - - - void glClearNamedBufferData - GLuint buffer - GLenum internalformat - GLenum format - GLenum type - const void *data - - - void glClearNamedBufferDataEXT - GLuint buffer - GLenum internalformat - GLenum format - GLenum type - const void *data - - - void glClearNamedBufferSubData - GLuint buffer - GLenum internalformat - GLintptr offset - GLsizeiptr size - GLenum format - GLenum type - const void *data - - - void glClearNamedBufferSubDataEXT - GLuint buffer - GLenum internalformat - GLsizeiptr offset - GLsizeiptr size - GLenum format - GLenum type - const void *data - - - void glClearNamedFramebufferfi - GLuint framebuffer - GLenum buffer - GLint drawbuffer - GLfloat depth - GLint stencil - - - void glClearNamedFramebufferfv - GLuint framebuffer - GLenum buffer - GLint drawbuffer - const GLfloat *value - - - void glClearNamedFramebufferiv - GLuint framebuffer - GLenum buffer - GLint drawbuffer - const GLint *value - - - void glClearNamedFramebufferuiv - GLuint framebuffer - GLenum buffer - GLint drawbuffer - const GLuint *value - - - void glClearPixelLocalStorageuiEXT - GLsizei offset - GLsizei n - const GLuint *values - - - void glClearStencil - GLint s - - - - void glClearTexImage - GLuint texture - GLint level - GLenum format - GLenum type - const void *data - - - void glClearTexImageEXT - GLuint texture - GLint level - GLenum format - GLenum type - const void *data - - - - void glClearTexSubImage - GLuint texture - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLsizei width - GLsizei height - GLsizei depth - GLenum format - GLenum type - const void *data - - - void glClearTexSubImageEXT - GLuint texture - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLsizei width - GLsizei height - GLsizei depth - GLenum format - GLenum type - const void *data - - - - void glClientActiveTexture - GLenum texture - - - void glClientActiveTextureARB - GLenum texture - - - - void glClientActiveVertexStreamATI - GLenum stream - - - void glClientAttribDefaultEXT - GLbitfield mask - - - void glClientWaitSemaphoreui64NVX - GLsizei fenceObjectCount - const GLuint *semaphoreArray - const GLuint64 *fenceValueArray - - - GLenum glClientWaitSync - GLsync sync - GLbitfield flags - GLuint64 timeout - - - GLenum glClientWaitSyncAPPLE - GLsync sync - GLbitfield flags - GLuint64 timeout - - - - void glClipControl - GLenum origin - GLenum depth - - - void glClipControlEXT - GLenum origin - GLenum depth - - - - void glClipPlane - GLenum plane - const GLdouble *equation - - - - void glClipPlanef - GLenum p - const GLfloat *eqn - - - void glClipPlanefIMG - GLenum p - const GLfloat *eqn - - - void glClipPlanefOES - GLenum plane - const GLfloat *equation - - - - void glClipPlanex - GLenum plane - const GLfixed *equation - - - void glClipPlanexIMG - GLenum p - const GLfixed *eqn - - - void glClipPlanexOES - GLenum plane - const GLfixed *equation - - - void glColor3b - GLbyte red - GLbyte green - GLbyte blue - - - - void glColor3bv - const GLbyte *v - - - - void glColor3d - GLdouble red - GLdouble green - GLdouble blue - - - - void glColor3dv - const GLdouble *v - - - - void glColor3f - GLfloat red - GLfloat green - GLfloat blue - - - - void glColor3fVertex3fSUN - GLfloat r - GLfloat g - GLfloat b - GLfloat x - GLfloat y - GLfloat z - - - void glColor3fVertex3fvSUN - const GLfloat *c - const GLfloat *v - - - void glColor3fv - const GLfloat *v - - - - void glColor3hNV - GLhalfNV red - GLhalfNV green - GLhalfNV blue - - - - void glColor3hvNV - const GLhalfNV *v - - - - void glColor3i - GLint red - GLint green - GLint blue - - - - void glColor3iv - const GLint *v - - - - void glColor3s - GLshort red - GLshort green - GLshort blue - - - - void glColor3sv - const GLshort *v - - - - void glColor3ub - GLubyte red - GLubyte green - GLubyte blue - - - - void glColor3ubv - const GLubyte *v - - - - void glColor3ui - GLuint red - GLuint green - GLuint blue - - - - void glColor3uiv - const GLuint *v - - - - void glColor3us - GLushort red - GLushort green - GLushort blue - - - - void glColor3usv - const GLushort *v - - - - void glColor3xOES - GLfixed red - GLfixed green - GLfixed blue - - - void glColor3xvOES - const GLfixed *components - - - void glColor4b - GLbyte red - GLbyte green - GLbyte blue - GLbyte alpha - - - - void glColor4bv - const GLbyte *v - - - - void glColor4d - GLdouble red - GLdouble green - GLdouble blue - GLdouble alpha - - - - void glColor4dv - const GLdouble *v - - - - void glColor4f - GLfloat red - GLfloat green - GLfloat blue - GLfloat alpha - - - - void glColor4fNormal3fVertex3fSUN - GLfloat r - GLfloat g - GLfloat b - GLfloat a - GLfloat nx - GLfloat ny - GLfloat nz - GLfloat x - GLfloat y - GLfloat z - - - void glColor4fNormal3fVertex3fvSUN - const GLfloat *c - const GLfloat *n - const GLfloat *v - - - void glColor4fv - const GLfloat *v - - - - void glColor4hNV - GLhalfNV red - GLhalfNV green - GLhalfNV blue - GLhalfNV alpha - - - - void glColor4hvNV - const GLhalfNV *v - - - - void glColor4i - GLint red - GLint green - GLint blue - GLint alpha - - - - void glColor4iv - const GLint *v - - - - void glColor4s - GLshort red - GLshort green - GLshort blue - GLshort alpha - - - - void glColor4sv - const GLshort *v - - - - void glColor4ub - GLubyte red - GLubyte green - GLubyte blue - GLubyte alpha - - - - void glColor4ubVertex2fSUN - GLubyte r - GLubyte g - GLubyte b - GLubyte a - GLfloat x - GLfloat y - - - void glColor4ubVertex2fvSUN - const GLubyte *c - const GLfloat *v - - - void glColor4ubVertex3fSUN - GLubyte r - GLubyte g - GLubyte b - GLubyte a - GLfloat x - GLfloat y - GLfloat z - - - void glColor4ubVertex3fvSUN - const GLubyte *c - const GLfloat *v - - - void glColor4ubv - const GLubyte *v - - - - void glColor4ui - GLuint red - GLuint green - GLuint blue - GLuint alpha - - - - void glColor4uiv - const GLuint *v - - - - void glColor4us - GLushort red - GLushort green - GLushort blue - GLushort alpha - - - - void glColor4usv - const GLushort *v - - - - void glColor4x - GLfixed red - GLfixed green - GLfixed blue - GLfixed alpha - - - void glColor4xOES - GLfixed red - GLfixed green - GLfixed blue - GLfixed alpha - - - void glColor4xvOES - const GLfixed *components - - - void glColorFormatNV - GLint size - GLenum type - GLsizei stride - - - void glColorFragmentOp1ATI - GLenum op - GLuint dst - GLuint dstMask - GLuint dstMod - GLuint arg1 - GLuint arg1Rep - GLuint arg1Mod - - - void glColorFragmentOp2ATI - GLenum op - GLuint dst - GLuint dstMask - GLuint dstMod - GLuint arg1 - GLuint arg1Rep - GLuint arg1Mod - GLuint arg2 - GLuint arg2Rep - GLuint arg2Mod - - - void glColorFragmentOp3ATI - GLenum op - GLuint dst - GLuint dstMask - GLuint dstMod - GLuint arg1 - GLuint arg1Rep - GLuint arg1Mod - GLuint arg2 - GLuint arg2Rep - GLuint arg2Mod - GLuint arg3 - GLuint arg3Rep - GLuint arg3Mod - - - void glColorMask - GLboolean red - GLboolean green - GLboolean blue - GLboolean alpha - - - - void glColorMaskIndexedEXT - GLuint index - GLboolean r - GLboolean g - GLboolean b - GLboolean a - - - - - void glColorMaski - GLuint index - GLboolean r - GLboolean g - GLboolean b - GLboolean a - - - void glColorMaskiEXT - GLuint index - GLboolean r - GLboolean g - GLboolean b - GLboolean a - - - - void glColorMaskiOES - GLuint index - GLboolean r - GLboolean g - GLboolean b - GLboolean a - - - - void glColorMaterial - GLenum face - GLenum mode - - - - void glColorP3ui - GLenum type - GLuint color - - - void glColorP3uiv - GLenum type - const GLuint *color - - - void glColorP4ui - GLenum type - GLuint color - - - void glColorP4uiv - GLenum type - const GLuint *color - - - void glColorPointer - GLint size - GLenum type - GLsizei stride - const void *pointer - - - void glColorPointerEXT - GLint size - GLenum type - GLsizei stride - GLsizei count - const void *pointer - - - void glColorPointerListIBM - GLint size - GLenum type - GLint stride - const void **pointer - GLint ptrstride - - - void glColorPointervINTEL - GLint size - GLenum type - const void **pointer - - - void glColorSubTable - GLenum target - GLsizei start - GLsizei count - GLenum format - GLenum type - const void *data - - - - - void glColorSubTableEXT - GLenum target - GLsizei start - GLsizei count - GLenum format - GLenum type - const void *data - - - - void glColorTable - GLenum target - GLenum internalformat - GLsizei width - GLenum format - GLenum type - const void *table - - - - - void glColorTableEXT - GLenum target - GLenum internalFormat - GLsizei width - GLenum format - GLenum type - const void *table - - - - void glColorTableParameterfv - GLenum target - GLenum pname - const GLfloat *params - - - - void glColorTableParameterfvSGI - GLenum target - GLenum pname - const GLfloat *params - - - - - void glColorTableParameteriv - GLenum target - GLenum pname - const GLint *params - - - - void glColorTableParameterivSGI - GLenum target - GLenum pname - const GLint *params - - - - - void glColorTableSGI - GLenum target - GLenum internalformat - GLsizei width - GLenum format - GLenum type - const void *table - - - - - void glCombinerInputNV - GLenum stage - GLenum portion - GLenum variable - GLenum input - GLenum mapping - GLenum componentUsage - - - - void glCombinerOutputNV - GLenum stage - GLenum portion - GLenum abOutput - GLenum cdOutput - GLenum sumOutput - GLenum scale - GLenum bias - GLboolean abDotProduct - GLboolean cdDotProduct - GLboolean muxSum - - - - void glCombinerParameterfNV - GLenum pname - GLfloat param - - - - void glCombinerParameterfvNV - GLenum pname - const GLfloat *params - - - - void glCombinerParameteriNV - GLenum pname - GLint param - - - - void glCombinerParameterivNV - GLenum pname - const GLint *params - - - - void glCombinerStageParameterfvNV - GLenum stage - GLenum pname - const GLfloat *params - - - void glCommandListSegmentsNV - GLuint list - GLuint segments - - - void glCompileCommandListNV - GLuint list - - - void glCompileShader - GLuint shader - - - void glCompileShaderARB - GLhandleARB shaderObj - - - - void glCompileShaderIncludeARB - GLuint shader - GLsizei count - const GLchar *const*path - const GLint *length - - - void glCompressedMultiTexImage1DEXT - GLenum texunit - GLenum target - GLint level - GLenum internalformat - GLsizei width - GLint border - GLsizei imageSize - const void *bits - - - void glCompressedMultiTexImage2DEXT - GLenum texunit - GLenum target - GLint level - GLenum internalformat - GLsizei width - GLsizei height - GLint border - GLsizei imageSize - const void *bits - - - void glCompressedMultiTexImage3DEXT - GLenum texunit - GLenum target - GLint level - GLenum internalformat - GLsizei width - GLsizei height - GLsizei depth - GLint border - GLsizei imageSize - const void *bits - - - void glCompressedMultiTexSubImage1DEXT - GLenum texunit - GLenum target - GLint level - GLint xoffset - GLsizei width - GLenum format - GLsizei imageSize - const void *bits - - - void glCompressedMultiTexSubImage2DEXT - GLenum texunit - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLsizei width - GLsizei height - GLenum format - GLsizei imageSize - const void *bits - - - void glCompressedMultiTexSubImage3DEXT - GLenum texunit - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLsizei width - GLsizei height - GLsizei depth - GLenum format - GLsizei imageSize - const void *bits - - - void glCompressedTexImage1D - GLenum target - GLint level - GLenum internalformat - GLsizei width - GLint border - GLsizei imageSize - const void *data - - - - - void glCompressedTexImage1DARB - GLenum target - GLint level - GLenum internalformat - GLsizei width - GLint border - GLsizei imageSize - const void *data - - - - - void glCompressedTexImage2D - GLenum target - GLint level - GLenum internalformat - GLsizei width - GLsizei height - GLint border - GLsizei imageSize - const void *data - - - - - void glCompressedTexImage2DARB - GLenum target - GLint level - GLenum internalformat - GLsizei width - GLsizei height - GLint border - GLsizei imageSize - const void *data - - - - - void glCompressedTexImage3D - GLenum target - GLint level - GLenum internalformat - GLsizei width - GLsizei height - GLsizei depth - GLint border - GLsizei imageSize - const void *data - - - - - void glCompressedTexImage3DARB - GLenum target - GLint level - GLenum internalformat - GLsizei width - GLsizei height - GLsizei depth - GLint border - GLsizei imageSize - const void *data - - - - - void glCompressedTexImage3DOES - GLenum target - GLint level - GLenum internalformat - GLsizei width - GLsizei height - GLsizei depth - GLint border - GLsizei imageSize - const void *data - - - void glCompressedTexSubImage1D - GLenum target - GLint level - GLint xoffset - GLsizei width - GLenum format - GLsizei imageSize - const void *data - - - - - void glCompressedTexSubImage1DARB - GLenum target - GLint level - GLint xoffset - GLsizei width - GLenum format - GLsizei imageSize - const void *data - - - - - void glCompressedTexSubImage2D - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLsizei width - GLsizei height - GLenum format - GLsizei imageSize - const void *data - - - - - void glCompressedTexSubImage2DARB - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLsizei width - GLsizei height - GLenum format - GLsizei imageSize - const void *data - - - - - void glCompressedTexSubImage3D - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLsizei width - GLsizei height - GLsizei depth - GLenum format - GLsizei imageSize - const void *data - - - - - void glCompressedTexSubImage3DARB - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLsizei width - GLsizei height - GLsizei depth - GLenum format - GLsizei imageSize - const void *data - - - - - void glCompressedTexSubImage3DOES - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLsizei width - GLsizei height - GLsizei depth - GLenum format - GLsizei imageSize - const void *data - - - void glCompressedTextureImage1DEXT - GLuint texture - GLenum target - GLint level - GLenum internalformat - GLsizei width - GLint border - GLsizei imageSize - const void *bits - - - void glCompressedTextureImage2DEXT - GLuint texture - GLenum target - GLint level - GLenum internalformat - GLsizei width - GLsizei height - GLint border - GLsizei imageSize - const void *bits - - - void glCompressedTextureImage3DEXT - GLuint texture - GLenum target - GLint level - GLenum internalformat - GLsizei width - GLsizei height - GLsizei depth - GLint border - GLsizei imageSize - const void *bits - - - void glCompressedTextureSubImage1D - GLuint texture - GLint level - GLint xoffset - GLsizei width - GLenum format - GLsizei imageSize - const void *data - - - void glCompressedTextureSubImage1DEXT - GLuint texture - GLenum target - GLint level - GLint xoffset - GLsizei width - GLenum format - GLsizei imageSize - const void *bits - - - void glCompressedTextureSubImage2D - GLuint texture - GLint level - GLint xoffset - GLint yoffset - GLsizei width - GLsizei height - GLenum format - GLsizei imageSize - const void *data - - - void glCompressedTextureSubImage2DEXT - GLuint texture - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLsizei width - GLsizei height - GLenum format - GLsizei imageSize - const void *bits - - - void glCompressedTextureSubImage3D - GLuint texture - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLsizei width - GLsizei height - GLsizei depth - GLenum format - GLsizei imageSize - const void *data - - - void glCompressedTextureSubImage3DEXT - GLuint texture - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLsizei width - GLsizei height - GLsizei depth - GLenum format - GLsizei imageSize - const void *bits - - - void glConservativeRasterParameterfNV - GLenum pname - GLfloat value - - - void glConservativeRasterParameteriNV - GLenum pname - GLint param - - - void glConvolutionFilter1D - GLenum target - GLenum internalformat - GLsizei width - GLenum format - GLenum type - const void *image - - - - - void glConvolutionFilter1DEXT - GLenum target - GLenum internalformat - GLsizei width - GLenum format - GLenum type - const void *image - - - - - void glConvolutionFilter2D - GLenum target - GLenum internalformat - GLsizei width - GLsizei height - GLenum format - GLenum type - const void *image - - - - - void glConvolutionFilter2DEXT - GLenum target - GLenum internalformat - GLsizei width - GLsizei height - GLenum format - GLenum type - const void *image - - - - - void glConvolutionParameterf - GLenum target - GLenum pname - GLfloat params - - - - void glConvolutionParameterfEXT - GLenum target - GLenum pname - GLfloat params - - - - - void glConvolutionParameterfv - GLenum target - GLenum pname - const GLfloat *params - - - - void glConvolutionParameterfvEXT - GLenum target - GLenum pname - const GLfloat *params - - - - - void glConvolutionParameteri - GLenum target - GLenum pname - GLint params - - - - void glConvolutionParameteriEXT - GLenum target - GLenum pname - GLint params - - - - - void glConvolutionParameteriv - GLenum target - GLenum pname - const GLint *params - - - - void glConvolutionParameterivEXT - GLenum target - GLenum pname - const GLint *params - - - - - void glConvolutionParameterxOES - GLenum target - GLenum pname - GLfixed param - - - void glConvolutionParameterxvOES - GLenum target - GLenum pname - const GLfixed *params - - - void glCopyBufferSubData - GLenum readTarget - GLenum writeTarget - GLintptr readOffset - GLintptr writeOffset - GLsizeiptr size - - - - void glCopyBufferSubDataNV - GLenum readTarget - GLenum writeTarget - GLintptr readOffset - GLintptr writeOffset - GLsizeiptr size - - - - void glCopyColorSubTable - GLenum target - GLsizei start - GLint x - GLint y - GLsizei width - - - - void glCopyColorSubTableEXT - GLenum target - GLsizei start - GLint x - GLint y - GLsizei width - - - - void glCopyColorTable - GLenum target - GLenum internalformat - GLint x - GLint y - GLsizei width - - - - void glCopyColorTableSGI - GLenum target - GLenum internalformat - GLint x - GLint y - GLsizei width - - - - - void glCopyConvolutionFilter1D - GLenum target - GLenum internalformat - GLint x - GLint y - GLsizei width - - - - void glCopyConvolutionFilter1DEXT - GLenum target - GLenum internalformat - GLint x - GLint y - GLsizei width - - - - - void glCopyConvolutionFilter2D - GLenum target - GLenum internalformat - GLint x - GLint y - GLsizei width - GLsizei height - - - - void glCopyConvolutionFilter2DEXT - GLenum target - GLenum internalformat - GLint x - GLint y - GLsizei width - GLsizei height - - - - - void glCopyImageSubData - GLuint srcName - GLenum srcTarget - GLint srcLevel - GLint srcX - GLint srcY - GLint srcZ - GLuint dstName - GLenum dstTarget - GLint dstLevel - GLint dstX - GLint dstY - GLint dstZ - GLsizei srcWidth - GLsizei srcHeight - GLsizei srcDepth - - - void glCopyImageSubDataEXT - GLuint srcName - GLenum srcTarget - GLint srcLevel - GLint srcX - GLint srcY - GLint srcZ - GLuint dstName - GLenum dstTarget - GLint dstLevel - GLint dstX - GLint dstY - GLint dstZ - GLsizei srcWidth - GLsizei srcHeight - GLsizei srcDepth - - - - void glCopyImageSubDataNV - GLuint srcName - GLenum srcTarget - GLint srcLevel - GLint srcX - GLint srcY - GLint srcZ - GLuint dstName - GLenum dstTarget - GLint dstLevel - GLint dstX - GLint dstY - GLint dstZ - GLsizei width - GLsizei height - GLsizei depth - - - - void glCopyImageSubDataOES - GLuint srcName - GLenum srcTarget - GLint srcLevel - GLint srcX - GLint srcY - GLint srcZ - GLuint dstName - GLenum dstTarget - GLint dstLevel - GLint dstX - GLint dstY - GLint dstZ - GLsizei srcWidth - GLsizei srcHeight - GLsizei srcDepth - - - - void glCopyMultiTexImage1DEXT - GLenum texunit - GLenum target - GLint level - GLenum internalformat - GLint x - GLint y - GLsizei width - GLint border - - - void glCopyMultiTexImage2DEXT - GLenum texunit - GLenum target - GLint level - GLenum internalformat - GLint x - GLint y - GLsizei width - GLsizei height - GLint border - - - void glCopyMultiTexSubImage1DEXT - GLenum texunit - GLenum target - GLint level - GLint xoffset - GLint x - GLint y - GLsizei width - - - void glCopyMultiTexSubImage2DEXT - GLenum texunit - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLint x - GLint y - GLsizei width - GLsizei height - - - void glCopyMultiTexSubImage3DEXT - GLenum texunit - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLint x - GLint y - GLsizei width - GLsizei height - - - void glCopyNamedBufferSubData - GLuint readBuffer - GLuint writeBuffer - GLintptr readOffset - GLintptr writeOffset - GLsizeiptr size - - - void glCopyPathNV - GLuint resultPath - GLuint srcPath - - - void glCopyPixels - GLint x - GLint y - GLsizei width - GLsizei height - GLenum type - - - - void glCopyTexImage1D - GLenum target - GLint level - GLenum internalformat - GLint x - GLint y - GLsizei width - GLint border - - - - void glCopyTexImage1DEXT - GLenum target - GLint level - GLenum internalformat - GLint x - GLint y - GLsizei width - GLint border - - - - - void glCopyTexImage2D - GLenum target - GLint level - GLenum internalformat - GLint x - GLint y - GLsizei width - GLsizei height - GLint border - - - - void glCopyTexImage2DEXT - GLenum target - GLint level - GLenum internalformat - GLint x - GLint y - GLsizei width - GLsizei height - GLint border - - - - - void glCopyTexSubImage1D - GLenum target - GLint level - GLint xoffset - GLint x - GLint y - GLsizei width - - - - void glCopyTexSubImage1DEXT - GLenum target - GLint level - GLint xoffset - GLint x - GLint y - GLsizei width - - - - - void glCopyTexSubImage2D - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLint x - GLint y - GLsizei width - GLsizei height - - - - void glCopyTexSubImage2DEXT - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLint x - GLint y - GLsizei width - GLsizei height - - - - - void glCopyTexSubImage3D - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLint x - GLint y - GLsizei width - GLsizei height - - - - void glCopyTexSubImage3DEXT - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLint x - GLint y - GLsizei width - GLsizei height - - - - - void glCopyTexSubImage3DOES - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLint x - GLint y - GLsizei width - GLsizei height - - - void glCopyTextureImage1DEXT - GLuint texture - GLenum target - GLint level - GLenum internalformat - GLint x - GLint y - GLsizei width - GLint border - - - void glCopyTextureImage2DEXT - GLuint texture - GLenum target - GLint level - GLenum internalformat - GLint x - GLint y - GLsizei width - GLsizei height - GLint border - - - void glCopyTextureLevelsAPPLE - GLuint destinationTexture - GLuint sourceTexture - GLint sourceBaseLevel - GLsizei sourceLevelCount - - - void glCopyTextureSubImage1D - GLuint texture - GLint level - GLint xoffset - GLint x - GLint y - GLsizei width - - - void glCopyTextureSubImage1DEXT - GLuint texture - GLenum target - GLint level - GLint xoffset - GLint x - GLint y - GLsizei width - - - void glCopyTextureSubImage2D - GLuint texture - GLint level - GLint xoffset - GLint yoffset - GLint x - GLint y - GLsizei width - GLsizei height - - - void glCopyTextureSubImage2DEXT - GLuint texture - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLint x - GLint y - GLsizei width - GLsizei height - - - void glCopyTextureSubImage3D - GLuint texture - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLint x - GLint y - GLsizei width - GLsizei height - - - void glCopyTextureSubImage3DEXT - GLuint texture - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLint x - GLint y - GLsizei width - GLsizei height - - - void glCoverFillPathInstancedNV - GLsizei numPaths - GLenum pathNameType - const void *paths - GLuint pathBase - GLenum coverMode - GLenum transformType - const GLfloat *transformValues - - - void glCoverFillPathNV - GLuint path - GLenum coverMode - - - void glCoverStrokePathInstancedNV - GLsizei numPaths - GLenum pathNameType - const void *paths - GLuint pathBase - GLenum coverMode - GLenum transformType - const GLfloat *transformValues - - - void glCoverStrokePathNV - GLuint path - GLenum coverMode - - - void glCoverageMaskNV - GLboolean mask - - - void glCoverageModulationNV - GLenum components - - - void glCoverageModulationTableNV - GLsizei n - const GLfloat *v - - - void glCoverageOperationNV - GLenum operation - - - void glCreateBuffers - GLsizei n - GLuint *buffers - - - void glCreateCommandListsNV - GLsizei n - GLuint *lists - - - void glCreateFramebuffers - GLsizei n - GLuint *framebuffers - - - void glCreateMemoryObjectsEXT - GLsizei n - GLuint *memoryObjects - - - void glCreatePerfQueryINTEL - GLuint queryId - GLuint *queryHandle - - - GLuint glCreateProgram - - - GLhandleARB glCreateProgramObjectARB - - - - void glCreateProgramPipelines - GLsizei n - GLuint *pipelines - - - GLuint glCreateProgressFenceNVX - - - void glCreateQueries - GLenum target - GLsizei n - GLuint *ids - - - void glCreateRenderbuffers - GLsizei n - GLuint *renderbuffers - - - void glCreateSamplers - GLsizei n - GLuint *samplers - - - void glCreateSemaphoresNV - GLsizei n - GLuint *semaphores - - - GLuint glCreateShader - GLenum type - - - GLhandleARB glCreateShaderObjectARB - GLenum shaderType - - - - GLuint glCreateShaderProgramEXT - GLenum type - const GLchar *string - - - GLuint glCreateShaderProgramv - GLenum type - GLsizei count - const GLchar *const*strings - - - GLuint glCreateShaderProgramvEXT - GLenum type - GLsizei count - const GLchar *const*strings - - - void glCreateStatesNV - GLsizei n - GLuint *states - - - GLsync glCreateSyncFromCLeventARB - struct _cl_context *context - struct _cl_event *event - GLbitfield flags - - - void glCreateTextures - GLenum target - GLsizei n - GLuint *textures - - - void glCreateTransformFeedbacks - GLsizei n - GLuint *ids - - - void glCreateVertexArrays - GLsizei n - GLuint *arrays - - - void glCullFace - GLenum mode - - - - void glCullParameterdvEXT - GLenum pname - GLdouble *params - - - void glCullParameterfvEXT - GLenum pname - GLfloat *params - - - void glCurrentPaletteMatrixARB - GLint index - - - - void glCurrentPaletteMatrixOES - GLuint matrixpaletteindex - - - void glDebugMessageCallback - GLDEBUGPROC callback - const void *userParam - - - void glDebugMessageCallbackAMD - GLDEBUGPROCAMD callback - void *userParam - - - void glDebugMessageCallbackARB - GLDEBUGPROCARB callback - const void *userParam - - - - void glDebugMessageCallbackKHR - GLDEBUGPROCKHR callback - const void *userParam - - - - void glDebugMessageControl - GLenum source - GLenum type - GLenum severity - GLsizei count - const GLuint *ids - GLboolean enabled - - - void glDebugMessageControlARB - GLenum source - GLenum type - GLenum severity - GLsizei count - const GLuint *ids - GLboolean enabled - - - - void glDebugMessageControlKHR - GLenum source - GLenum type - GLenum severity - GLsizei count - const GLuint *ids - GLboolean enabled - - - - void glDebugMessageEnableAMD - GLenum category - GLenum severity - GLsizei count - const GLuint *ids - GLboolean enabled - - - void glDebugMessageInsert - GLenum source - GLenum type - GLuint id - GLenum severity - GLsizei length - const GLchar *buf - - - void glDebugMessageInsertAMD - GLenum category - GLenum severity - GLuint id - GLsizei length - const GLchar *buf - - - void glDebugMessageInsertARB - GLenum source - GLenum type - GLuint id - GLenum severity - GLsizei length - const GLchar *buf - - - - void glDebugMessageInsertKHR - GLenum source - GLenum type - GLuint id - GLenum severity - GLsizei length - const GLchar *buf - - - - void glDeformSGIX - GLbitfield mask - - - - void glDeformationMap3dSGIX - GLenum target - GLdouble u1 - GLdouble u2 - GLint ustride - GLint uorder - GLdouble v1 - GLdouble v2 - GLint vstride - GLint vorder - GLdouble w1 - GLdouble w2 - GLint wstride - GLint worder - const GLdouble *points - - - - void glDeformationMap3fSGIX - GLenum target - GLfloat u1 - GLfloat u2 - GLint ustride - GLint uorder - GLfloat v1 - GLfloat v2 - GLint vstride - GLint vorder - GLfloat w1 - GLfloat w2 - GLint wstride - GLint worder - const GLfloat *points - - - - void glDeleteAsyncMarkersSGIX - GLuint marker - GLsizei range - - - void glDeleteBuffers - GLsizei n - const GLuint *buffers - - - void glDeleteBuffersARB - GLsizei n - const GLuint *buffers - - - - void glDeleteCommandListsNV - GLsizei n - const GLuint *lists - - - void glDeleteFencesAPPLE - GLsizei n - const GLuint *fences - - - void glDeleteFencesNV - GLsizei n - const GLuint *fences - - - - void glDeleteFragmentShaderATI - GLuint id - - - void glDeleteFramebuffers - GLsizei n - const GLuint *framebuffers - - - - void glDeleteFramebuffersEXT - GLsizei n - const GLuint *framebuffers - - - - - void glDeleteFramebuffersOES - GLsizei n - const GLuint *framebuffers - - - void glDeleteLists - GLuint list - GLsizei range - - - - void glDeleteMemoryObjectsEXT - GLsizei n - const GLuint *memoryObjects - - - void glDeleteNamedStringARB - GLint namelen - const GLchar *name - - - void glDeleteNamesAMD - GLenum identifier - GLuint num - const GLuint *names - - - void glDeleteObjectARB - GLhandleARB obj - - - void glDeleteOcclusionQueriesNV - GLsizei n - const GLuint *ids - - - void glDeletePathsNV - GLuint path - GLsizei range - - - void glDeletePerfMonitorsAMD - GLsizei n - GLuint *monitors - - - void glDeletePerfQueryINTEL - GLuint queryHandle - - - void glDeleteProgram - GLuint program - - - - void glDeleteProgramPipelines - GLsizei n - const GLuint *pipelines - - - void glDeleteProgramPipelinesEXT - GLsizei n - const GLuint *pipelines - - - void glDeleteProgramsARB - GLsizei n - const GLuint *programs - - - - void glDeleteProgramsNV - GLsizei n - const GLuint *programs - - - - - void glDeleteQueries - GLsizei n - const GLuint *ids - - - - void glDeleteQueriesARB - GLsizei n - const GLuint *ids - - - - void glDeleteQueriesEXT - GLsizei n - const GLuint *ids - - - void glDeleteQueryResourceTagNV - GLsizei n - const GLint *tagIds - - - void glDeleteRenderbuffers - GLsizei n - const GLuint *renderbuffers - - - - void glDeleteRenderbuffersEXT - GLsizei n - const GLuint *renderbuffers - - - - - void glDeleteRenderbuffersOES - GLsizei n - const GLuint *renderbuffers - - - void glDeleteSamplers - GLsizei count - const GLuint *samplers - - - void glDeleteSemaphoresEXT - GLsizei n - const GLuint *semaphores - - - void glDeleteShader - GLuint shader - - - - void glDeleteStatesNV - GLsizei n - const GLuint *states - - - void glDeleteSync - GLsync sync - - - void glDeleteSyncAPPLE - GLsync sync - - - - void glDeleteTextures - GLsizei n - const GLuint *textures - - - - void glDeleteTexturesEXT - GLsizei n - const GLuint *textures - - - - void glDeleteTransformFeedbacks - GLsizei n - const GLuint *ids - - - void glDeleteTransformFeedbacksNV - GLsizei n - const GLuint *ids - - - - void glDeleteVertexArrays - GLsizei n - const GLuint *arrays - - - - void glDeleteVertexArraysAPPLE - GLsizei n - const GLuint *arrays - - - - void glDeleteVertexArraysOES - GLsizei n - const GLuint *arrays - - - - void glDeleteVertexShaderEXT - GLuint id - - - void glDepthBoundsEXT - GLclampd zmin - GLclampd zmax - - - - void glDepthBoundsdNV - GLdouble zmin - GLdouble zmax - - - - void glDepthFunc - GLenum func - - - - void glDepthMask - GLboolean flag - - - - void glDepthRange - GLdouble n - GLdouble f - - - - void glDepthRangeArraydvNV - GLuint first - GLsizei count - const GLdouble *v - - - void glDepthRangeArrayfvNV - GLuint first - GLsizei count - const GLfloat *v - - - void glDepthRangeArrayfvOES - GLuint first - GLsizei count - const GLfloat *v - - - void glDepthRangeArrayv - GLuint first - GLsizei count - const GLdouble *v - - - void glDepthRangeIndexed - GLuint index - GLdouble n - GLdouble f - - - void glDepthRangeIndexeddNV - GLuint index - GLdouble n - GLdouble f - - - void glDepthRangeIndexedfNV - GLuint index - GLfloat n - GLfloat f - - - void glDepthRangeIndexedfOES - GLuint index - GLfloat n - GLfloat f - - - void glDepthRangedNV - GLdouble zNear - GLdouble zFar - - - - void glDepthRangef - GLfloat n - GLfloat f - - - void glDepthRangefOES - GLclampf n - GLclampf f - - - - - void glDepthRangex - GLfixed n - GLfixed f - - - void glDepthRangexOES - GLfixed n - GLfixed f - - - void glDetachObjectARB - GLhandleARB containerObj - GLhandleARB attachedObj - - - - void glDetachShader - GLuint program - GLuint shader - - - void glDetailTexFuncSGIS - GLenum target - GLsizei n - const GLfloat *points - - - - void glDisable - GLenum cap - - - - void glDisableClientState - GLenum array - - - void glDisableClientStateIndexedEXT - GLenum array - GLuint index - - - void glDisableClientStateiEXT - GLenum array - GLuint index - - - void glDisableDriverControlQCOM - GLuint driverControl - - - void glDisableIndexedEXT - GLenum target - GLuint index - - - - - void glDisableVariantClientStateEXT - GLuint id - - - void glDisableVertexArrayAttrib - GLuint vaobj - GLuint index - - - void glDisableVertexArrayAttribEXT - GLuint vaobj - GLuint index - - - void glDisableVertexArrayEXT - GLuint vaobj - GLenum array - - - void glDisableVertexAttribAPPLE - GLuint index - GLenum pname - - - void glDisableVertexAttribArray - GLuint index - - - void glDisableVertexAttribArrayARB - GLuint index - - - - void glDisablei - GLenum target - GLuint index - - - void glDisableiEXT - GLenum target - GLuint index - - - - void glDisableiNV - GLenum target - GLuint index - - - - void glDisableiOES - GLenum target - GLuint index - - - - void glDiscardFramebufferEXT - GLenum target - GLsizei numAttachments - const GLenum *attachments - - - void glDispatchCompute - GLuint num_groups_x - GLuint num_groups_y - GLuint num_groups_z - - - void glDispatchComputeGroupSizeARB - GLuint num_groups_x - GLuint num_groups_y - GLuint num_groups_z - GLuint group_size_x - GLuint group_size_y - GLuint group_size_z - - - void glDispatchComputeIndirect - GLintptr indirect - - - void glDrawArrays - GLenum mode - GLint first - GLsizei count - - - - void glDrawArraysEXT - GLenum mode - GLint first - GLsizei count - - - - - void glDrawArraysIndirect - GLenum mode - const void *indirect - - - void glDrawArraysInstanced - GLenum mode - GLint first - GLsizei count - GLsizei instancecount - - - void glDrawArraysInstancedANGLE - GLenum mode - GLint first - GLsizei count - GLsizei primcount - - - - void glDrawArraysInstancedARB - GLenum mode - GLint first - GLsizei count - GLsizei primcount - - - - void glDrawArraysInstancedBaseInstance - GLenum mode - GLint first - GLsizei count - GLsizei instancecount - GLuint baseinstance - - - void glDrawArraysInstancedBaseInstanceEXT - GLenum mode - GLint first - GLsizei count - GLsizei instancecount - GLuint baseinstance - - - - void glDrawArraysInstancedEXT - GLenum mode - GLint start - GLsizei count - GLsizei primcount - - - - void glDrawArraysInstancedNV - GLenum mode - GLint first - GLsizei count - GLsizei primcount - - - - void glDrawBuffer - GLenum buf - - - - void glDrawBuffers - GLsizei n - const GLenum *bufs - - - - void glDrawBuffersARB - GLsizei n - const GLenum *bufs - - - - void glDrawBuffersATI - GLsizei n - const GLenum *bufs - - - - - void glDrawBuffersEXT - GLsizei n - const GLenum *bufs - - - - void glDrawBuffersIndexedEXT - GLint n - const GLenum *location - const GLint *indices - - - void glDrawBuffersNV - GLsizei n - const GLenum *bufs - - - void glDrawCommandsAddressNV - GLenum primitiveMode - const GLuint64 *indirects - const GLsizei *sizes - GLuint count - - - void glDrawCommandsNV - GLenum primitiveMode - GLuint buffer - const GLintptr *indirects - const GLsizei *sizes - GLuint count - - - void glDrawCommandsStatesAddressNV - const GLuint64 *indirects - const GLsizei *sizes - const GLuint *states - const GLuint *fbos - GLuint count - - - void glDrawCommandsStatesNV - GLuint buffer - const GLintptr *indirects - const GLsizei *sizes - const GLuint *states - const GLuint *fbos - GLuint count - - - void glDrawElementArrayAPPLE - GLenum mode - GLint first - GLsizei count - - - void glDrawElementArrayATI - GLenum mode - GLsizei count - - - void glDrawElements - GLenum mode - GLsizei count - GLenum type - const void *indices - - - void glDrawElementsBaseVertex - GLenum mode - GLsizei count - GLenum type - const void *indices - GLint basevertex - - - void glDrawElementsBaseVertexEXT - GLenum mode - GLsizei count - GLenum type - const void *indices - GLint basevertex - - - - void glDrawElementsBaseVertexOES - GLenum mode - GLsizei count - GLenum type - const void *indices - GLint basevertex - - - - void glDrawElementsIndirect - GLenum mode - GLenum type - const void *indirect - - - void glDrawElementsInstanced - GLenum mode - GLsizei count - GLenum type - const void *indices - GLsizei instancecount - - - void glDrawElementsInstancedANGLE - GLenum mode - GLsizei count - GLenum type - const void *indices - GLsizei primcount - - - - void glDrawElementsInstancedARB - GLenum mode - GLsizei count - GLenum type - const void *indices - GLsizei primcount - - - - void glDrawElementsInstancedBaseInstance - GLenum mode - GLsizei count - GLenum type - const void *indices - GLsizei instancecount - GLuint baseinstance - - - void glDrawElementsInstancedBaseInstanceEXT - GLenum mode - GLsizei count - GLenum type - const void *indices - GLsizei instancecount - GLuint baseinstance - - - - void glDrawElementsInstancedBaseVertex - GLenum mode - GLsizei count - GLenum type - const void *indices - GLsizei instancecount - GLint basevertex - - - void glDrawElementsInstancedBaseVertexBaseInstance - GLenum mode - GLsizei count - GLenum type - const void *indices - GLsizei instancecount - GLint basevertex - GLuint baseinstance - - - void glDrawElementsInstancedBaseVertexBaseInstanceEXT - GLenum mode - GLsizei count - GLenum type - const void *indices - GLsizei instancecount - GLint basevertex - GLuint baseinstance - - - - void glDrawElementsInstancedBaseVertexEXT - GLenum mode - GLsizei count - GLenum type - const void *indices - GLsizei instancecount - GLint basevertex - - - - void glDrawElementsInstancedBaseVertexOES - GLenum mode - GLsizei count - GLenum type - const void *indices - GLsizei instancecount - GLint basevertex - - - - void glDrawElementsInstancedEXT - GLenum mode - GLsizei count - GLenum type - const void *indices - GLsizei primcount - - - - void glDrawElementsInstancedNV - GLenum mode - GLsizei count - GLenum type - const void *indices - GLsizei primcount - - - - void glDrawMeshArraysSUN - GLenum mode - GLint first - GLsizei count - GLsizei width - - - void glDrawMeshTasksEXT - GLuint num_groups_x - GLuint num_groups_y - GLuint num_groups_z - - - void glDrawMeshTasksNV - GLuint first - GLuint count - - - void glDrawMeshTasksIndirectEXT - GLintptr indirect - - - void glDrawMeshTasksIndirectNV - GLintptr indirect - - - void glDrawPixels - GLsizei width - GLsizei height - GLenum format - GLenum type - const void *pixels - - - - - void glDrawRangeElementArrayAPPLE - GLenum mode - GLuint start - GLuint end - GLint first - GLsizei count - - - void glDrawRangeElementArrayATI - GLenum mode - GLuint start - GLuint end - GLsizei count - - - void glDrawRangeElements - GLenum mode - GLuint start - GLuint end - GLsizei count - GLenum type - const void *indices - - - void glDrawRangeElementsBaseVertex - GLenum mode - GLuint start - GLuint end - GLsizei count - GLenum type - const void *indices - GLint basevertex - - - void glDrawRangeElementsBaseVertexEXT - GLenum mode - GLuint start - GLuint end - GLsizei count - GLenum type - const void *indices - GLint basevertex - - - - void glDrawRangeElementsBaseVertexOES - GLenum mode - GLuint start - GLuint end - GLsizei count - GLenum type - const void *indices - GLint basevertex - - - - void glDrawRangeElementsEXT - GLenum mode - GLuint start - GLuint end - GLsizei count - GLenum type - const void *indices - - - - void glDrawTexfOES - GLfloat x - GLfloat y - GLfloat z - GLfloat width - GLfloat height - - - - void glDrawTexfvOES - const GLfloat *coords - - - void glDrawTexiOES - GLint x - GLint y - GLint z - GLint width - GLint height - - - - void glDrawTexivOES - const GLint *coords - - - void glDrawTexsOES - GLshort x - GLshort y - GLshort z - GLshort width - GLshort height - - - - void glDrawTexsvOES - const GLshort *coords - - - void glDrawTextureNV - GLuint texture - GLuint sampler - GLfloat x0 - GLfloat y0 - GLfloat x1 - GLfloat y1 - GLfloat z - GLfloat s0 - GLfloat t0 - GLfloat s1 - GLfloat t1 - - - void glDrawTexxOES - GLfixed x - GLfixed y - GLfixed z - GLfixed width - GLfixed height - - - - void glDrawTexxvOES - const GLfixed *coords - - - void glDrawTransformFeedback - GLenum mode - GLuint id - - - void glDrawTransformFeedbackEXT - GLenum mode - GLuint id - - - - void glDrawTransformFeedbackInstanced - GLenum mode - GLuint id - GLsizei instancecount - - - void glDrawTransformFeedbackInstancedEXT - GLenum mode - GLuint id - GLsizei instancecount - - - - void glDrawTransformFeedbackNV - GLenum mode - GLuint id - - - - void glDrawTransformFeedbackStream - GLenum mode - GLuint id - GLuint stream - - - void glDrawTransformFeedbackStreamInstanced - GLenum mode - GLuint id - GLuint stream - GLsizei instancecount - - - void glEGLImageTargetRenderbufferStorageOES - GLenum target - GLeglImageOES image - - - void glEGLImageTargetTexStorageEXT - GLenum target - GLeglImageOES image - const GLint* attrib_list - - - void glEGLImageTargetTexture2DOES - GLenum target - GLeglImageOES image - - - void glEGLImageTargetTextureStorageEXT - GLuint texture - GLeglImageOES image - const GLint* attrib_list - - - void glEdgeFlag - GLboolean flag - - - - void glEdgeFlagFormatNV - GLsizei stride - - - void glEdgeFlagPointer - GLsizei stride - const void *pointer - - - void glEdgeFlagPointerEXT - GLsizei stride - GLsizei count - const GLboolean *pointer - - - void glEdgeFlagPointerListIBM - GLint stride - const GLboolean **pointer - GLint ptrstride - - - void glEdgeFlagv - const GLboolean *flag - - - - void glElementPointerAPPLE - GLenum type - const void *pointer - - - void glElementPointerATI - GLenum type - const void *pointer - - - void glEnable - GLenum cap - - - - void glEnableClientState - GLenum array - - - void glEnableClientStateIndexedEXT - GLenum array - GLuint index - - - void glEnableClientStateiEXT - GLenum array - GLuint index - - - void glEnableDriverControlQCOM - GLuint driverControl - - - void glEnableIndexedEXT - GLenum target - GLuint index - - - - - void glEnableVariantClientStateEXT - GLuint id - - - void glEnableVertexArrayAttrib - GLuint vaobj - GLuint index - - - void glEnableVertexArrayAttribEXT - GLuint vaobj - GLuint index - - - void glEnableVertexArrayEXT - GLuint vaobj - GLenum array - - - void glEnableVertexAttribAPPLE - GLuint index - GLenum pname - - - void glEnableVertexAttribArray - GLuint index - - - void glEnableVertexAttribArrayARB - GLuint index - - - - void glEnablei - GLenum target - GLuint index - - - void glEnableiEXT - GLenum target - GLuint index - - - - void glEnableiNV - GLenum target - GLuint index - - - - void glEnableiOES - GLenum target - GLuint index - - - - void glEnd - - - - void glEndConditionalRender - - - - void glEndConditionalRenderNV - - - - void glEndConditionalRenderNVX - - - - void glEndFragmentShaderATI - - - void glEndList - - - - void glEndOcclusionQueryNV - - - void glEndPerfMonitorAMD - GLuint monitor - - - void glEndPerfQueryINTEL - GLuint queryHandle - - - void glEndQuery - GLenum target - - - - void glEndQueryARB - GLenum target - - - - void glEndQueryEXT - GLenum target - - - void glEndQueryIndexed - GLenum target - GLuint index - - - void glEndTilingQCOM - GLbitfield preserveMask - - - void glEndTransformFeedback - - - - void glEndTransformFeedbackEXT - - - - void glEndTransformFeedbackNV - - - - void glEndVertexShaderEXT - - - void glEndVideoCaptureNV - GLuint video_capture_slot - - - void glEvalCoord1d - GLdouble u - - - - void glEvalCoord1dv - const GLdouble *u - - - - void glEvalCoord1f - GLfloat u - - - - void glEvalCoord1fv - const GLfloat *u - - - - void glEvalCoord1xOES - GLfixed u - - - void glEvalCoord1xvOES - const GLfixed *coords - - - void glEvalCoord2d - GLdouble u - GLdouble v - - - - void glEvalCoord2dv - const GLdouble *u - - - - void glEvalCoord2f - GLfloat u - GLfloat v - - - - void glEvalCoord2fv - const GLfloat *u - - - - void glEvalCoord2xOES - GLfixed u - GLfixed v - - - void glEvalCoord2xvOES - const GLfixed *coords - - - void glEvalMapsNV - GLenum target - GLenum mode - - - void glEvalMesh1 - GLenum mode - GLint i1 - GLint i2 - - - - void glEvalMesh2 - GLenum mode - GLint i1 - GLint i2 - GLint j1 - GLint j2 - - - - void glEvalPoint1 - GLint i - - - - void glEvalPoint2 - GLint i - GLint j - - - - void glEvaluateDepthValuesARB - - - void glExecuteProgramNV - GLenum target - GLuint id - const GLfloat *params - - - - void glExtGetBufferPointervQCOM - GLenum target - void **params - - - void glExtGetBuffersQCOM - GLuint *buffers - GLint maxBuffers - GLint *numBuffers - - - void glExtGetFramebuffersQCOM - GLuint *framebuffers - GLint maxFramebuffers - GLint *numFramebuffers - - - void glExtGetProgramBinarySourceQCOM - GLuint program - GLenum shadertype - GLchar *source - GLint *length - - - void glExtGetProgramsQCOM - GLuint *programs - GLint maxPrograms - GLint *numPrograms - - - void glExtGetRenderbuffersQCOM - GLuint *renderbuffers - GLint maxRenderbuffers - GLint *numRenderbuffers - - - void glExtGetShadersQCOM - GLuint *shaders - GLint maxShaders - GLint *numShaders - - - void glExtGetTexLevelParameterivQCOM - GLuint texture - GLenum face - GLint level - GLenum pname - GLint *params - - - void glExtGetTexSubImageQCOM - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLsizei width - GLsizei height - GLsizei depth - GLenum format - GLenum type - void *texels - - - void glExtGetTexturesQCOM - GLuint *textures - GLint maxTextures - GLint *numTextures - - - GLboolean glExtIsProgramBinaryQCOM - GLuint program - - - void glExtTexObjectStateOverrideiQCOM - GLenum target - GLenum pname - GLint param - - - void glExtractComponentEXT - GLuint res - GLuint src - GLuint num - - - void glFeedbackBuffer - GLsizei size - GLenum type - GLfloat *buffer - - - - void glFeedbackBufferxOES - GLsizei n - GLenum type - const GLfixed *buffer - - - GLsync glFenceSync - GLenum condition - GLbitfield flags - - - GLsync glFenceSyncAPPLE - GLenum condition - GLbitfield flags - - - - void glFinalCombinerInputNV - GLenum variable - GLenum input - GLenum mapping - GLenum componentUsage - - - - void glFinish - - - - GLint glFinishAsyncSGIX - GLuint *markerp - - - void glFinishFenceAPPLE - GLuint fence - - - void glFinishFenceNV - GLuint fence - - - - void glFinishObjectAPPLE - GLenum object - GLint name - - - void glFinishTextureSUNX - - - void glFlush - - - - void glFlushMappedBufferRange - GLenum target - GLintptr offset - GLsizeiptr length - - - void glFlushMappedBufferRangeAPPLE - GLenum target - GLintptr offset - GLsizeiptr size - - - - void glFlushMappedBufferRangeEXT - GLenum target - GLintptr offset - GLsizeiptr length - - - - void glFlushMappedNamedBufferRange - GLuint buffer - GLintptr offset - GLsizeiptr length - - - void glFlushMappedNamedBufferRangeEXT - GLuint buffer - GLintptr offset - GLsizeiptr length - - - void glFlushPixelDataRangeNV - GLenum target - - - void glFlushRasterSGIX - - - - void glFlushStaticDataIBM - GLenum target - - - void glFlushVertexArrayRangeAPPLE - GLsizei length - void *pointer - - - void glFlushVertexArrayRangeNV - - - void glFogCoordFormatNV - GLenum type - GLsizei stride - - - void glFogCoordPointer - GLenum type - GLsizei stride - const void *pointer - - - void glFogCoordPointerEXT - GLenum type - GLsizei stride - const void *pointer - - - - void glFogCoordPointerListIBM - GLenum type - GLint stride - const void **pointer - GLint ptrstride - - - void glFogCoordd - GLdouble coord - - - - void glFogCoorddEXT - GLdouble coord - - - - - void glFogCoorddv - const GLdouble *coord - - - - void glFogCoorddvEXT - const GLdouble *coord - - - - - void glFogCoordf - GLfloat coord - - - - void glFogCoordfEXT - GLfloat coord - - - - - void glFogCoordfv - const GLfloat *coord - - - - void glFogCoordfvEXT - const GLfloat *coord - - - - - void glFogCoordhNV - GLhalfNV fog - - - - void glFogCoordhvNV - const GLhalfNV *fog - - - - void glFogFuncSGIS - GLsizei n - const GLfloat *points - - - - void glFogf - GLenum pname - GLfloat param - - - - void glFogfv - GLenum pname - const GLfloat *params - - - - void glFogi - GLenum pname - GLint param - - - - void glFogiv - GLenum pname - const GLint *params - - - - void glFogx - GLenum pname - GLfixed param - - - void glFogxOES - GLenum pname - GLfixed param - - - void glFogxv - GLenum pname - const GLfixed *param - - - void glFogxvOES - GLenum pname - const GLfixed *param - - - void glFragmentColorMaterialSGIX - GLenum face - GLenum mode - - - void glFragmentCoverageColorNV - GLuint color - - - void glFragmentLightModelfSGIX - GLenum pname - GLfloat param - - - void glFragmentLightModelfvSGIX - GLenum pname - const GLfloat *params - - - void glFragmentLightModeliSGIX - GLenum pname - GLint param - - - void glFragmentLightModelivSGIX - GLenum pname - const GLint *params - - - void glFragmentLightfSGIX - GLenum light - GLenum pname - GLfloat param - - - void glFragmentLightfvSGIX - GLenum light - GLenum pname - const GLfloat *params - - - void glFragmentLightiSGIX - GLenum light - GLenum pname - GLint param - - - void glFragmentLightivSGIX - GLenum light - GLenum pname - const GLint *params - - - void glFragmentMaterialfSGIX - GLenum face - GLenum pname - GLfloat param - - - void glFragmentMaterialfvSGIX - GLenum face - GLenum pname - const GLfloat *params - - - void glFragmentMaterialiSGIX - GLenum face - GLenum pname - GLint param - - - void glFragmentMaterialivSGIX - GLenum face - GLenum pname - const GLint *params - - - void glFrameTerminatorGREMEDY - - - void glFrameZoomSGIX - GLint factor - - - - void glFramebufferDrawBufferEXT - GLuint framebuffer - GLenum mode - - - void glFramebufferDrawBuffersEXT - GLuint framebuffer - GLsizei n - const GLenum *bufs - - - void glFramebufferFetchBarrierEXT - - - void glFramebufferFetchBarrierQCOM - - - void glFramebufferFoveationConfigQCOM - GLuint framebuffer - GLuint numLayers - GLuint focalPointsPerLayer - GLuint requestedFeatures - GLuint *providedFeatures - - - void glFramebufferFoveationParametersQCOM - GLuint framebuffer - GLuint layer - GLuint focalPoint - GLfloat focalX - GLfloat focalY - GLfloat gainX - GLfloat gainY - GLfloat foveaArea - - - void glFramebufferParameteri - GLenum target - GLenum pname - GLint param - - - void glFramebufferPixelLocalStorageSizeEXT - GLuint target - GLsizei size - - - void glFramebufferReadBufferEXT - GLuint framebuffer - GLenum mode - - - void glFramebufferRenderbuffer - GLenum target - GLenum attachment - GLenum renderbuffertarget - GLuint renderbuffer - - - - void glFramebufferRenderbufferEXT - GLenum target - GLenum attachment - GLenum renderbuffertarget - GLuint renderbuffer - - - - - void glFramebufferRenderbufferOES - GLenum target - GLenum attachment - GLenum renderbuffertarget - GLuint renderbuffer - - - void glFramebufferSampleLocationsfvARB - GLenum target - GLuint start - GLsizei count - const GLfloat *v - - - void glFramebufferSampleLocationsfvNV - GLenum target - GLuint start - GLsizei count - const GLfloat *v - - - void glFramebufferSamplePositionsfvAMD - GLenum target - GLuint numsamples - GLuint pixelindex - const GLfloat *values - - - void glFramebufferShadingRateEXT - GLenum target - GLenum attachment - GLuint texture - GLint baseLayer - GLsizei numLayers - GLsizei texelWidth - GLsizei texelHeight - - - void glFramebufferTexture - GLenum target - GLenum attachment - GLuint texture - GLint level - - - void glFramebufferTexture1D - GLenum target - GLenum attachment - GLenum textarget - GLuint texture - GLint level - - - - void glFramebufferTexture1DEXT - GLenum target - GLenum attachment - GLenum textarget - GLuint texture - GLint level - - - - - void glFramebufferTexture2D - GLenum target - GLenum attachment - GLenum textarget - GLuint texture - GLint level - - - - void glFramebufferTexture2DEXT - GLenum target - GLenum attachment - GLenum textarget - GLuint texture - GLint level - - - - - void glFramebufferTexture2DDownsampleIMG - GLenum target - GLenum attachment - GLenum textarget - GLuint texture - GLint level - GLint xscale - GLint yscale - - - void glFramebufferTexture2DMultisampleEXT - GLenum target - GLenum attachment - GLenum textarget - GLuint texture - GLint level - GLsizei samples - - - void glFramebufferTexture2DMultisampleIMG - GLenum target - GLenum attachment - GLenum textarget - GLuint texture - GLint level - GLsizei samples - - - void glFramebufferTexture2DOES - GLenum target - GLenum attachment - GLenum textarget - GLuint texture - GLint level - - - void glFramebufferTexture3D - GLenum target - GLenum attachment - GLenum textarget - GLuint texture - GLint level - GLint zoffset - - - - void glFramebufferTexture3DEXT - GLenum target - GLenum attachment - GLenum textarget - GLuint texture - GLint level - GLint zoffset - - - - - void glFramebufferTexture3DOES - GLenum target - GLenum attachment - GLenum textarget - GLuint texture - GLint level - GLint zoffset - - - void glFramebufferTextureARB - GLenum target - GLenum attachment - GLuint texture - GLint level - - - - void glFramebufferTextureEXT - GLenum target - GLenum attachment - GLuint texture - GLint level - - - - void glFramebufferTextureFaceARB - GLenum target - GLenum attachment - GLuint texture - GLint level - GLenum face - - - void glFramebufferTextureFaceEXT - GLenum target - GLenum attachment - GLuint texture - GLint level - GLenum face - - - - void glFramebufferTextureLayer - GLenum target - GLenum attachment - GLuint texture - GLint level - GLint layer - - - - void glFramebufferTextureLayerARB - GLenum target - GLenum attachment - GLuint texture - GLint level - GLint layer - - - - void glFramebufferTextureLayerEXT - GLenum target - GLenum attachment - GLuint texture - GLint level - GLint layer - - - - void glFramebufferTextureLayerDownsampleIMG - GLenum target - GLenum attachment - GLuint texture - GLint level - GLint layer - GLint xscale - GLint yscale - - - void glFramebufferTextureMultisampleMultiviewOVR - GLenum target - GLenum attachment - GLuint texture - GLint level - GLsizei samples - GLint baseViewIndex - GLsizei numViews - - - void glFramebufferTextureMultiviewOVR - GLenum target - GLenum attachment - GLuint texture - GLint level - GLint baseViewIndex - GLsizei numViews - - - void glFramebufferTextureOES - GLenum target - GLenum attachment - GLuint texture - GLint level - - - - void glFreeObjectBufferATI - GLuint buffer - - - void glFrontFace - GLenum mode - - - - void glFrustum - GLdouble left - GLdouble right - GLdouble bottom - GLdouble top - GLdouble zNear - GLdouble zFar - - - - void glFrustumf - GLfloat l - GLfloat r - GLfloat b - GLfloat t - GLfloat n - GLfloat f - - - void glFrustumfOES - GLfloat l - GLfloat r - GLfloat b - GLfloat t - GLfloat n - GLfloat f - - - - void glFrustumx - GLfixed l - GLfixed r - GLfixed b - GLfixed t - GLfixed n - GLfixed f - - - void glFrustumxOES - GLfixed l - GLfixed r - GLfixed b - GLfixed t - GLfixed n - GLfixed f - - - GLuint glGenAsyncMarkersSGIX - GLsizei range - - - void glGenBuffers - GLsizei n - GLuint *buffers - - - void glGenBuffersARB - GLsizei n - GLuint *buffers - - - - void glGenFencesAPPLE - GLsizei n - GLuint *fences - - - void glGenFencesNV - GLsizei n - GLuint *fences - - - - GLuint glGenFragmentShadersATI - GLuint range - - - void glGenFramebuffers - GLsizei n - GLuint *framebuffers - - - - void glGenFramebuffersEXT - GLsizei n - GLuint *framebuffers - - - - - void glGenFramebuffersOES - GLsizei n - GLuint *framebuffers - - - GLuint glGenLists - GLsizei range - - - - void glGenNamesAMD - GLenum identifier - GLuint num - GLuint *names - - - void glGenOcclusionQueriesNV - GLsizei n - GLuint *ids - - - GLuint glGenPathsNV - GLsizei range - - - void glGenPerfMonitorsAMD - GLsizei n - GLuint *monitors - - - void glGenProgramPipelines - GLsizei n - GLuint *pipelines - - - void glGenProgramPipelinesEXT - GLsizei n - GLuint *pipelines - - - void glGenProgramsARB - GLsizei n - GLuint *programs - - - - void glGenProgramsNV - GLsizei n - GLuint *programs - - - - - void glGenQueries - GLsizei n - GLuint *ids - - - - void glGenQueriesARB - GLsizei n - GLuint *ids - - - - void glGenQueriesEXT - GLsizei n - GLuint *ids - - - void glGenQueryResourceTagNV - GLsizei n - GLint *tagIds - - - void glGenRenderbuffers - GLsizei n - GLuint *renderbuffers - - - - void glGenRenderbuffersEXT - GLsizei n - GLuint *renderbuffers - - - - - void glGenRenderbuffersOES - GLsizei n - GLuint *renderbuffers - - - void glGenSamplers - GLsizei count - GLuint *samplers - - - void glGenSemaphoresEXT - GLsizei n - GLuint *semaphores - - - GLuint glGenSymbolsEXT - GLenum datatype - GLenum storagetype - GLenum range - GLuint components - - - void glGenTextures - GLsizei n - GLuint *textures - - - - void glGenTexturesEXT - GLsizei n - GLuint *textures - - - - void glGenTransformFeedbacks - GLsizei n - GLuint *ids - - - void glGenTransformFeedbacksNV - GLsizei n - GLuint *ids - - - - void glGenVertexArrays - GLsizei n - GLuint *arrays - - - - void glGenVertexArraysAPPLE - GLsizei n - GLuint *arrays - - - - void glGenVertexArraysOES - GLsizei n - GLuint *arrays - - - - GLuint glGenVertexShadersEXT - GLuint range - - - void glGenerateMipmap - GLenum target - - - - void glGenerateMipmapEXT - GLenum target - - - - - void glGenerateMipmapOES - GLenum target - - - void glGenerateMultiTexMipmapEXT - GLenum texunit - GLenum target - - - void glGenerateTextureMipmap - GLuint texture - - - void glGenerateTextureMipmapEXT - GLuint texture - GLenum target - - - void glGetActiveAtomicCounterBufferiv - GLuint program - GLuint bufferIndex - GLenum pname - GLint *params - - - void glGetActiveAttrib - GLuint program - GLuint index - GLsizei bufSize - GLsizei *length - GLint *size - GLenum *type - GLchar *name - - - void glGetActiveAttribARB - GLhandleARB programObj - GLuint index - GLsizei maxLength - GLsizei *length - GLint *size - GLenum *type - GLcharARB *name - - - - void glGetActiveSubroutineName - GLuint program - GLenum shadertype - GLuint index - GLsizei bufSize - GLsizei *length - GLchar *name - - - void glGetActiveSubroutineUniformName - GLuint program - GLenum shadertype - GLuint index - GLsizei bufSize - GLsizei *length - GLchar *name - - - void glGetActiveSubroutineUniformiv - GLuint program - GLenum shadertype - GLuint index - GLenum pname - GLint *values - - - void glGetActiveUniform - GLuint program - GLuint index - GLsizei bufSize - GLsizei *length - GLint *size - GLenum *type - GLchar *name - - - void glGetActiveUniformARB - GLhandleARB programObj - GLuint index - GLsizei maxLength - GLsizei *length - GLint *size - GLenum *type - GLcharARB *name - - - - void glGetActiveUniformBlockName - GLuint program - GLuint uniformBlockIndex - GLsizei bufSize - GLsizei *length - GLchar *uniformBlockName - - - - void glGetActiveUniformBlockiv - GLuint program - GLuint uniformBlockIndex - GLenum pname - GLint *params - - - - void glGetActiveUniformName - GLuint program - GLuint uniformIndex - GLsizei bufSize - GLsizei *length - GLchar *uniformName - - - - void glGetActiveUniformsiv - GLuint program - GLsizei uniformCount - const GLuint *uniformIndices - GLenum pname - GLint *params - - - - void glGetActiveVaryingNV - GLuint program - GLuint index - GLsizei bufSize - GLsizei *length - GLsizei *size - GLenum *type - GLchar *name - - - void glGetArrayObjectfvATI - GLenum array - GLenum pname - GLfloat *params - - - void glGetArrayObjectivATI - GLenum array - GLenum pname - GLint *params - - - void glGetAttachedObjectsARB - GLhandleARB containerObj - GLsizei maxCount - GLsizei *count - GLhandleARB *obj - - - void glGetAttachedShaders - GLuint program - GLsizei maxCount - GLsizei *count - GLuint *shaders - - - GLint glGetAttribLocation - GLuint program - const GLchar *name - - - GLint glGetAttribLocationARB - GLhandleARB programObj - const GLcharARB *name - - - - void glGetBooleanIndexedvEXT - GLenum target - GLuint index - GLboolean *data - - - - - void glGetBooleani_v - GLenum target - GLuint index - GLboolean *data - - - void glGetBooleanv - GLenum pname - GLboolean *data - - - - void glGetBufferParameteri64v - GLenum target - GLenum pname - GLint64 *params - - - void glGetBufferParameteriv - GLenum target - GLenum pname - GLint *params - - - void glGetBufferParameterivARB - GLenum target - GLenum pname - GLint *params - - - - void glGetBufferParameterui64vNV - GLenum target - GLenum pname - GLuint64EXT *params - - - void glGetBufferPointerv - GLenum target - GLenum pname - void **params - - - void glGetBufferPointervARB - GLenum target - GLenum pname - void **params - - - - void glGetBufferPointervOES - GLenum target - GLenum pname - void **params - - - - void glGetBufferSubData - GLenum target - GLintptr offset - GLsizeiptr size - void *data - - - void glGetBufferSubDataARB - GLenum target - GLintptrARB offset - GLsizeiptrARB size - void *data - - - - void glGetClipPlane - GLenum plane - GLdouble *equation - - - - void glGetClipPlanef - GLenum plane - GLfloat *equation - - - void glGetClipPlanefOES - GLenum plane - GLfloat *equation - - - - void glGetClipPlanex - GLenum plane - GLfixed *equation - - - void glGetClipPlanexOES - GLenum plane - GLfixed *equation - - - void glGetColorTable - GLenum target - GLenum format - GLenum type - void *table - - - - - void glGetColorTableEXT - GLenum target - GLenum format - GLenum type - void *data - - - - void glGetColorTableParameterfv - GLenum target - GLenum pname - GLfloat *params - - - - void glGetColorTableParameterfvEXT - GLenum target - GLenum pname - GLfloat *params - - - - void glGetColorTableParameterfvSGI - GLenum target - GLenum pname - GLfloat *params - - - - void glGetColorTableParameteriv - GLenum target - GLenum pname - GLint *params - - - - void glGetColorTableParameterivEXT - GLenum target - GLenum pname - GLint *params - - - - void glGetColorTableParameterivSGI - GLenum target - GLenum pname - GLint *params - - - - void glGetColorTableSGI - GLenum target - GLenum format - GLenum type - void *table - - - - void glGetCombinerInputParameterfvNV - GLenum stage - GLenum portion - GLenum variable - GLenum pname - GLfloat *params - - - - void glGetCombinerInputParameterivNV - GLenum stage - GLenum portion - GLenum variable - GLenum pname - GLint *params - - - - void glGetCombinerOutputParameterfvNV - GLenum stage - GLenum portion - GLenum pname - GLfloat *params - - - - void glGetCombinerOutputParameterivNV - GLenum stage - GLenum portion - GLenum pname - GLint *params - - - - void glGetCombinerStageParameterfvNV - GLenum stage - GLenum pname - GLfloat *params - - - GLuint glGetCommandHeaderNV - GLenum tokenID - GLuint size - - - void glGetCompressedMultiTexImageEXT - GLenum texunit - GLenum target - GLint lod - void *img - - - void glGetCompressedTexImage - GLenum target - GLint level - void *img - - - - - void glGetCompressedTexImageARB - GLenum target - GLint level - void *img - - - - - void glGetCompressedTextureImage - GLuint texture - GLint level - GLsizei bufSize - void *pixels - - - void glGetCompressedTextureImageEXT - GLuint texture - GLenum target - GLint lod - void *img - - - void glGetCompressedTextureSubImage - GLuint texture - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLsizei width - GLsizei height - GLsizei depth - GLsizei bufSize - void *pixels - - - void glGetConvolutionFilter - GLenum target - GLenum format - GLenum type - void *image - - - - - void glGetConvolutionFilterEXT - GLenum target - GLenum format - GLenum type - void *image - - - - void glGetConvolutionParameterfv - GLenum target - GLenum pname - GLfloat *params - - - - void glGetConvolutionParameterfvEXT - GLenum target - GLenum pname - GLfloat *params - - - - void glGetConvolutionParameteriv - GLenum target - GLenum pname - GLint *params - - - - void glGetConvolutionParameterivEXT - GLenum target - GLenum pname - GLint *params - - - - void glGetConvolutionParameterxvOES - GLenum target - GLenum pname - GLfixed *params - - - void glGetCoverageModulationTableNV - GLsizei bufSize - GLfloat *v - - - GLuint glGetDebugMessageLog - GLuint count - GLsizei bufSize - GLenum *sources - GLenum *types - GLuint *ids - GLenum *severities - GLsizei *lengths - GLchar *messageLog - - - GLuint glGetDebugMessageLogAMD - GLuint count - GLsizei bufSize - GLenum *categories - GLenum *severities - GLuint *ids - GLsizei *lengths - GLchar *message - - - GLuint glGetDebugMessageLogARB - GLuint count - GLsizei bufSize - GLenum *sources - GLenum *types - GLuint *ids - GLenum *severities - GLsizei *lengths - GLchar *messageLog - - - - GLuint glGetDebugMessageLogKHR - GLuint count - GLsizei bufSize - GLenum *sources - GLenum *types - GLuint *ids - GLenum *severities - GLsizei *lengths - GLchar *messageLog - - - - void glGetDetailTexFuncSGIS - GLenum target - GLfloat *points - - - - void glGetDoubleIndexedvEXT - GLenum target - GLuint index - GLdouble *data - - - - void glGetDoublei_v - GLenum target - GLuint index - GLdouble *data - - - void glGetDoublei_vEXT - GLenum pname - GLuint index - GLdouble *params - - - - void glGetDoublev - GLenum pname - GLdouble *data - - - - void glGetDriverControlStringQCOM - GLuint driverControl - GLsizei bufSize - GLsizei *length - GLchar *driverControlString - - - void glGetDriverControlsQCOM - GLint *num - GLsizei size - GLuint *driverControls - - - GLenum glGetError - - - - void glGetFenceivNV - GLuint fence - GLenum pname - GLint *params - - - - void glGetFinalCombinerInputParameterfvNV - GLenum variable - GLenum pname - GLfloat *params - - - - void glGetFinalCombinerInputParameterivNV - GLenum variable - GLenum pname - GLint *params - - - - void glGetFirstPerfQueryIdINTEL - GLuint *queryId - - - void glGetFixedv - GLenum pname - GLfixed *params - - - void glGetFixedvOES - GLenum pname - GLfixed *params - - - void glGetFloatIndexedvEXT - GLenum target - GLuint index - GLfloat *data - - - - void glGetFloati_v - GLenum target - GLuint index - GLfloat *data - - - void glGetFloati_vEXT - GLenum pname - GLuint index - GLfloat *params - - - - void glGetFloati_vNV - GLenum target - GLuint index - GLfloat *data - - - - void glGetFloati_vOES - GLenum target - GLuint index - GLfloat *data - - - - void glGetFloatv - GLenum pname - GLfloat *data - - - - void glGetFogFuncSGIS - GLfloat *points - - - GLint glGetFragDataIndex - GLuint program - const GLchar *name - - - GLint glGetFragDataIndexEXT - GLuint program - const GLchar *name - - - - GLint glGetFragDataLocation - GLuint program - const GLchar *name - - - GLint glGetFragDataLocationEXT - GLuint program - const GLchar *name - - - - void glGetFragmentLightfvSGIX - GLenum light - GLenum pname - GLfloat *params - - - void glGetFragmentLightivSGIX - GLenum light - GLenum pname - GLint *params - - - void glGetFragmentMaterialfvSGIX - GLenum face - GLenum pname - GLfloat *params - - - void glGetFragmentMaterialivSGIX - GLenum face - GLenum pname - GLint *params - - - void glGetFragmentShadingRatesEXT - GLsizei samples - GLsizei maxCount - GLsizei *count - GLenum *shadingRates - - - void glGetFramebufferAttachmentParameteriv - GLenum target - GLenum attachment - GLenum pname - GLint *params - - - - void glGetFramebufferAttachmentParameterivEXT - GLenum target - GLenum attachment - GLenum pname - GLint *params - - - - - void glGetFramebufferAttachmentParameterivOES - GLenum target - GLenum attachment - GLenum pname - GLint *params - - - void glGetFramebufferParameterfvAMD - GLenum target - GLenum pname - GLuint numsamples - GLuint pixelindex - GLsizei size - GLfloat *values - - - void glGetFramebufferParameteriv - GLenum target - GLenum pname - GLint *params - - - void glGetFramebufferParameterivEXT - GLuint framebuffer - GLenum pname - GLint *params - - - GLsizei glGetFramebufferPixelLocalStorageSizeEXT - GLuint target - - - GLenum glGetGraphicsResetStatus - - - GLenum glGetGraphicsResetStatusARB - - - GLenum glGetGraphicsResetStatusEXT - - - - GLenum glGetGraphicsResetStatusKHR - - - - GLhandleARB glGetHandleARB - GLenum pname - - - void glGetHistogram - GLenum target - GLboolean reset - GLenum format - GLenum type - void *values - - - - - void glGetHistogramEXT - GLenum target - GLboolean reset - GLenum format - GLenum type - void *values - - - - void glGetHistogramParameterfv - GLenum target - GLenum pname - GLfloat *params - - - - void glGetHistogramParameterfvEXT - GLenum target - GLenum pname - GLfloat *params - - - - void glGetHistogramParameteriv - GLenum target - GLenum pname - GLint *params - - - - void glGetHistogramParameterivEXT - GLenum target - GLenum pname - GLint *params - - - - void glGetHistogramParameterxvOES - GLenum target - GLenum pname - GLfixed *params - - - GLuint64 glGetImageHandleARB - GLuint texture - GLint level - GLboolean layered - GLint layer - GLenum format - - - GLuint64 glGetImageHandleNV - GLuint texture - GLint level - GLboolean layered - GLint layer - GLenum format - - - void glGetImageTransformParameterfvHP - GLenum target - GLenum pname - GLfloat *params - - - void glGetImageTransformParameterivHP - GLenum target - GLenum pname - GLint *params - - - void glGetInfoLogARB - GLhandleARB obj - GLsizei maxLength - GLsizei *length - GLcharARB *infoLog - - - GLint glGetInstrumentsSGIX - - - - void glGetInteger64i_v - GLenum target - GLuint index - GLint64 *data - - - void glGetInteger64v - GLenum pname - GLint64 *data - - - void glGetInteger64vAPPLE - GLenum pname - GLint64 *params - - - - void glGetInteger64vEXT - GLenum pname - GLint64 *data - - - - void glGetIntegerIndexedvEXT - GLenum target - GLuint index - GLint *data - - - - - void glGetIntegeri_v - GLenum target - GLuint index - GLint *data - - - void glGetIntegeri_vEXT - GLenum target - GLuint index - GLint *data - - - void glGetIntegerui64i_vNV - GLenum value - GLuint index - GLuint64EXT *result - - - void glGetIntegerui64vNV - GLenum value - GLuint64EXT *result - - - void glGetIntegerv - GLenum pname - GLint *data - - - - void glGetInternalformatSampleivNV - GLenum target - GLenum internalformat - GLsizei samples - GLenum pname - GLsizei count - GLint *params - - - void glGetInternalformati64v - GLenum target - GLenum internalformat - GLenum pname - GLsizei count - GLint64 *params - - - void glGetInternalformativ - GLenum target - GLenum internalformat - GLenum pname - GLsizei count - GLint *params - - - void glGetInvariantBooleanvEXT - GLuint id - GLenum value - GLboolean *data - - - void glGetInvariantFloatvEXT - GLuint id - GLenum value - GLfloat *data - - - void glGetInvariantIntegervEXT - GLuint id - GLenum value - GLint *data - - - void glGetLightfv - GLenum light - GLenum pname - GLfloat *params - - - - void glGetLightiv - GLenum light - GLenum pname - GLint *params - - - - void glGetLightxOES - GLenum light - GLenum pname - GLfixed *params - - - void glGetLightxv - GLenum light - GLenum pname - GLfixed *params - - - void glGetLightxvOES - GLenum light - GLenum pname - GLfixed *params - - - void glGetListParameterfvSGIX - GLuint list - GLenum pname - GLfloat *params - - - void glGetListParameterivSGIX - GLuint list - GLenum pname - GLint *params - - - void glGetLocalConstantBooleanvEXT - GLuint id - GLenum value - GLboolean *data - - - void glGetLocalConstantFloatvEXT - GLuint id - GLenum value - GLfloat *data - - - void glGetLocalConstantIntegervEXT - GLuint id - GLenum value - GLint *data - - - void glGetMapAttribParameterfvNV - GLenum target - GLuint index - GLenum pname - GLfloat *params - - - void glGetMapAttribParameterivNV - GLenum target - GLuint index - GLenum pname - GLint *params - - - void glGetMapControlPointsNV - GLenum target - GLuint index - GLenum type - GLsizei ustride - GLsizei vstride - GLboolean packed - void *points - - - void glGetMapParameterfvNV - GLenum target - GLenum pname - GLfloat *params - - - void glGetMapParameterivNV - GLenum target - GLenum pname - GLint *params - - - void glGetMapdv - GLenum target - GLenum query - GLdouble *v - - - - void glGetMapfv - GLenum target - GLenum query - GLfloat *v - - - - void glGetMapiv - GLenum target - GLenum query - GLint *v - - - - void glGetMapxvOES - GLenum target - GLenum query - GLfixed *v - - - void glGetMaterialfv - GLenum face - GLenum pname - GLfloat *params - - - - void glGetMaterialiv - GLenum face - GLenum pname - GLint *params - - - - void glGetMaterialxOES - GLenum face - GLenum pname - GLfixed param - - - void glGetMaterialxv - GLenum face - GLenum pname - GLfixed *params - - - void glGetMaterialxvOES - GLenum face - GLenum pname - GLfixed *params - - - void glGetMemoryObjectDetachedResourcesuivNV - GLuint memory - GLenum pname - GLint first - GLsizei count - GLuint *params - - - void glGetMemoryObjectParameterivEXT - GLuint memoryObject - GLenum pname - GLint *params - - - void glGetMinmax - GLenum target - GLboolean reset - GLenum format - GLenum type - void *values - - - - - void glGetMinmaxEXT - GLenum target - GLboolean reset - GLenum format - GLenum type - void *values - - - - void glGetMinmaxParameterfv - GLenum target - GLenum pname - GLfloat *params - - - - void glGetMinmaxParameterfvEXT - GLenum target - GLenum pname - GLfloat *params - - - - void glGetMinmaxParameteriv - GLenum target - GLenum pname - GLint *params - - - - void glGetMinmaxParameterivEXT - GLenum target - GLenum pname - GLint *params - - - - void glGetMultiTexEnvfvEXT - GLenum texunit - GLenum target - GLenum pname - GLfloat *params - - - void glGetMultiTexEnvivEXT - GLenum texunit - GLenum target - GLenum pname - GLint *params - - - void glGetMultiTexGendvEXT - GLenum texunit - GLenum coord - GLenum pname - GLdouble *params - - - void glGetMultiTexGenfvEXT - GLenum texunit - GLenum coord - GLenum pname - GLfloat *params - - - void glGetMultiTexGenivEXT - GLenum texunit - GLenum coord - GLenum pname - GLint *params - - - void glGetMultiTexImageEXT - GLenum texunit - GLenum target - GLint level - GLenum format - GLenum type - void *pixels - - - void glGetMultiTexLevelParameterfvEXT - GLenum texunit - GLenum target - GLint level - GLenum pname - GLfloat *params - - - void glGetMultiTexLevelParameterivEXT - GLenum texunit - GLenum target - GLint level - GLenum pname - GLint *params - - - void glGetMultiTexParameterIivEXT - GLenum texunit - GLenum target - GLenum pname - GLint *params - - - void glGetMultiTexParameterIuivEXT - GLenum texunit - GLenum target - GLenum pname - GLuint *params - - - void glGetMultiTexParameterfvEXT - GLenum texunit - GLenum target - GLenum pname - GLfloat *params - - - void glGetMultiTexParameterivEXT - GLenum texunit - GLenum target - GLenum pname - GLint *params - - - void glGetMultisamplefv - GLenum pname - GLuint index - GLfloat *val - - - void glGetMultisamplefvNV - GLenum pname - GLuint index - GLfloat *val - - - - void glGetNamedBufferParameteri64v - GLuint buffer - GLenum pname - GLint64 *params - - - void glGetNamedBufferParameteriv - GLuint buffer - GLenum pname - GLint *params - - - void glGetNamedBufferParameterivEXT - GLuint buffer - GLenum pname - GLint *params - - - void glGetNamedBufferParameterui64vNV - GLuint buffer - GLenum pname - GLuint64EXT *params - - - void glGetNamedBufferPointerv - GLuint buffer - GLenum pname - void **params - - - void glGetNamedBufferPointervEXT - GLuint buffer - GLenum pname - void **params - - - void glGetNamedBufferSubData - GLuint buffer - GLintptr offset - GLsizeiptr size - void *data - - - void glGetNamedBufferSubDataEXT - GLuint buffer - GLintptr offset - GLsizeiptr size - void *data - - - void glGetNamedFramebufferParameterfvAMD - GLuint framebuffer - GLenum pname - GLuint numsamples - GLuint pixelindex - GLsizei size - GLfloat *values - - - void glGetNamedFramebufferAttachmentParameteriv - GLuint framebuffer - GLenum attachment - GLenum pname - GLint *params - - - void glGetNamedFramebufferAttachmentParameterivEXT - GLuint framebuffer - GLenum attachment - GLenum pname - GLint *params - - - void glGetNamedFramebufferParameteriv - GLuint framebuffer - GLenum pname - GLint *param - - - void glGetNamedFramebufferParameterivEXT - GLuint framebuffer - GLenum pname - GLint *params - - - void glGetNamedProgramLocalParameterIivEXT - GLuint program - GLenum target - GLuint index - GLint *params - - - void glGetNamedProgramLocalParameterIuivEXT - GLuint program - GLenum target - GLuint index - GLuint *params - - - void glGetNamedProgramLocalParameterdvEXT - GLuint program - GLenum target - GLuint index - GLdouble *params - - - void glGetNamedProgramLocalParameterfvEXT - GLuint program - GLenum target - GLuint index - GLfloat *params - - - void glGetNamedProgramStringEXT - GLuint program - GLenum target - GLenum pname - void *string - - - void glGetNamedProgramivEXT - GLuint program - GLenum target - GLenum pname - GLint *params - - - void glGetNamedRenderbufferParameteriv - GLuint renderbuffer - GLenum pname - GLint *params - - - void glGetNamedRenderbufferParameterivEXT - GLuint renderbuffer - GLenum pname - GLint *params - - - void glGetNamedStringARB - GLint namelen - const GLchar *name - GLsizei bufSize - GLint *stringlen - GLchar *string - - - void glGetNamedStringivARB - GLint namelen - const GLchar *name - GLenum pname - GLint *params - - - void glGetNextPerfQueryIdINTEL - GLuint queryId - GLuint *nextQueryId - - - void glGetObjectBufferfvATI - GLuint buffer - GLenum pname - GLfloat *params - - - void glGetObjectBufferivATI - GLuint buffer - GLenum pname - GLint *params - - - void glGetObjectLabel - GLenum identifier - GLuint name - GLsizei bufSize - GLsizei *length - GLchar *label - - - void glGetObjectLabelEXT - GLenum type - GLuint object - GLsizei bufSize - GLsizei *length - GLchar *label - - - void glGetObjectLabelKHR - GLenum identifier - GLuint name - GLsizei bufSize - GLsizei *length - GLchar *label - - - - void glGetObjectParameterfvARB - GLhandleARB obj - GLenum pname - GLfloat *params - - - void glGetObjectParameterivAPPLE - GLenum objectType - GLuint name - GLenum pname - GLint *params - - - void glGetObjectParameterivARB - GLhandleARB obj - GLenum pname - GLint *params - - - void glGetObjectPtrLabel - const void *ptr - GLsizei bufSize - GLsizei *length - GLchar *label - - - void glGetObjectPtrLabelKHR - const void *ptr - GLsizei bufSize - GLsizei *length - GLchar *label - - - - void glGetOcclusionQueryivNV - GLuint id - GLenum pname - GLint *params - - - void glGetOcclusionQueryuivNV - GLuint id - GLenum pname - GLuint *params - - - void glGetPathColorGenfvNV - GLenum color - GLenum pname - GLfloat *value - - - void glGetPathColorGenivNV - GLenum color - GLenum pname - GLint *value - - - void glGetPathCommandsNV - GLuint path - GLubyte *commands - - - void glGetPathCoordsNV - GLuint path - GLfloat *coords - - - void glGetPathDashArrayNV - GLuint path - GLfloat *dashArray - - - GLfloat glGetPathLengthNV - GLuint path - GLsizei startSegment - GLsizei numSegments - - - void glGetPathMetricRangeNV - GLbitfield metricQueryMask - GLuint firstPathName - GLsizei numPaths - GLsizei stride - GLfloat *metrics - - - void glGetPathMetricsNV - GLbitfield metricQueryMask - GLsizei numPaths - GLenum pathNameType - const void *paths - GLuint pathBase - GLsizei stride - GLfloat *metrics - - - void glGetPathParameterfvNV - GLuint path - GLenum pname - GLfloat *value - - - void glGetPathParameterivNV - GLuint path - GLenum pname - GLint *value - - - void glGetPathSpacingNV - GLenum pathListMode - GLsizei numPaths - GLenum pathNameType - const void *paths - GLuint pathBase - GLfloat advanceScale - GLfloat kerningScale - GLenum transformType - GLfloat *returnedSpacing - - - void glGetPathTexGenfvNV - GLenum texCoordSet - GLenum pname - GLfloat *value - - - void glGetPathTexGenivNV - GLenum texCoordSet - GLenum pname - GLint *value - - - void glGetPerfCounterInfoINTEL - GLuint queryId - GLuint counterId - GLuint counterNameLength - GLchar *counterName - GLuint counterDescLength - GLchar *counterDesc - GLuint *counterOffset - GLuint *counterDataSize - GLuint *counterTypeEnum - GLuint *counterDataTypeEnum - GLuint64 *rawCounterMaxValue - - - void glGetPerfMonitorCounterDataAMD - GLuint monitor - GLenum pname - GLsizei dataSize - GLuint *data - GLint *bytesWritten - - - void glGetPerfMonitorCounterInfoAMD - GLuint group - GLuint counter - GLenum pname - void *data - - - void glGetPerfMonitorCounterStringAMD - GLuint group - GLuint counter - GLsizei bufSize - GLsizei *length - GLchar *counterString - - - void glGetPerfMonitorCountersAMD - GLuint group - GLint *numCounters - GLint *maxActiveCounters - GLsizei counterSize - GLuint *counters - - - void glGetPerfMonitorGroupStringAMD - GLuint group - GLsizei bufSize - GLsizei *length - GLchar *groupString - - - void glGetPerfMonitorGroupsAMD - GLint *numGroups - GLsizei groupsSize - GLuint *groups - - - void glGetPerfQueryDataINTEL - GLuint queryHandle - GLuint flags - GLsizei dataSize - void *data - GLuint *bytesWritten - - - void glGetPerfQueryIdByNameINTEL - GLchar *queryName - GLuint *queryId - - - void glGetPerfQueryInfoINTEL - GLuint queryId - GLuint queryNameLength - GLchar *queryName - GLuint *dataSize - GLuint *noCounters - GLuint *noInstances - GLuint *capsMask - - - void glGetPixelMapfv - GLenum map - GLfloat *values - - - - - void glGetPixelMapuiv - GLenum map - GLuint *values - - - - - void glGetPixelMapusv - GLenum map - GLushort *values - - - - - void glGetPixelMapxv - GLenum map - GLint size - GLfixed *values - - - void glGetPixelTexGenParameterfvSGIS - GLenum pname - GLfloat *params - - - void glGetPixelTexGenParameterivSGIS - GLenum pname - GLint *params - - - void glGetPixelTransformParameterfvEXT - GLenum target - GLenum pname - GLfloat *params - - - - void glGetPixelTransformParameterivEXT - GLenum target - GLenum pname - GLint *params - - - - void glGetPointerIndexedvEXT - GLenum target - GLuint index - void **data - - - void glGetPointeri_vEXT - GLenum pname - GLuint index - void **params - - - void glGetPointerv - GLenum pname - void **params - - - - void glGetPointervEXT - GLenum pname - void **params - - - - void glGetPointervKHR - GLenum pname - void **params - - - - void glGetPolygonStipple - GLubyte *mask - - - - - void glGetProgramBinary - GLuint program - GLsizei bufSize - GLsizei *length - GLenum *binaryFormat - void *binary - - - void glGetProgramBinaryOES - GLuint program - GLsizei bufSize - GLsizei *length - GLenum *binaryFormat - void *binary - - - - void glGetProgramEnvParameterIivNV - GLenum target - GLuint index - GLint *params - - - void glGetProgramEnvParameterIuivNV - GLenum target - GLuint index - GLuint *params - - - void glGetProgramEnvParameterdvARB - GLenum target - GLuint index - GLdouble *params - - - void glGetProgramEnvParameterfvARB - GLenum target - GLuint index - GLfloat *params - - - void glGetProgramInfoLog - GLuint program - GLsizei bufSize - GLsizei *length - GLchar *infoLog - - - - void glGetProgramInterfaceiv - GLuint program - GLenum programInterface - GLenum pname - GLint *params - - - void glGetProgramLocalParameterIivNV - GLenum target - GLuint index - GLint *params - - - void glGetProgramLocalParameterIuivNV - GLenum target - GLuint index - GLuint *params - - - void glGetProgramLocalParameterdvARB - GLenum target - GLuint index - GLdouble *params - - - void glGetProgramLocalParameterfvARB - GLenum target - GLuint index - GLfloat *params - - - void glGetProgramNamedParameterdvNV - GLuint id - GLsizei len - const GLubyte *name - GLdouble *params - - - - void glGetProgramNamedParameterfvNV - GLuint id - GLsizei len - const GLubyte *name - GLfloat *params - - - - void glGetProgramParameterdvNV - GLenum target - GLuint index - GLenum pname - GLdouble *params - - - - void glGetProgramParameterfvNV - GLenum target - GLuint index - GLenum pname - GLfloat *params - - - - void glGetProgramPipelineInfoLog - GLuint pipeline - GLsizei bufSize - GLsizei *length - GLchar *infoLog - - - void glGetProgramPipelineInfoLogEXT - GLuint pipeline - GLsizei bufSize - GLsizei *length - GLchar *infoLog - - - void glGetProgramPipelineiv - GLuint pipeline - GLenum pname - GLint *params - - - void glGetProgramPipelineivEXT - GLuint pipeline - GLenum pname - GLint *params - - - GLuint glGetProgramResourceIndex - GLuint program - GLenum programInterface - const GLchar *name - - - GLint glGetProgramResourceLocation - GLuint program - GLenum programInterface - const GLchar *name - - - GLint glGetProgramResourceLocationIndex - GLuint program - GLenum programInterface - const GLchar *name - - - GLint glGetProgramResourceLocationIndexEXT - GLuint program - GLenum programInterface - const GLchar *name - - - void glGetProgramResourceName - GLuint program - GLenum programInterface - GLuint index - GLsizei bufSize - GLsizei *length - GLchar *name - - - void glGetProgramResourcefvNV - GLuint program - GLenum programInterface - GLuint index - GLsizei propCount - const GLenum *props - GLsizei count - GLsizei *length - GLfloat *params - - - void glGetProgramResourceiv - GLuint program - GLenum programInterface - GLuint index - GLsizei propCount - const GLenum *props - GLsizei count - GLsizei *length - GLint *params - - - void glGetProgramStageiv - GLuint program - GLenum shadertype - GLenum pname - GLint *values - - - void glGetProgramStringARB - GLenum target - GLenum pname - void *string - - - void glGetProgramStringNV - GLuint id - GLenum pname - GLubyte *program - - - - void glGetProgramSubroutineParameteruivNV - GLenum target - GLuint index - GLuint *param - - - void glGetProgramiv - GLuint program - GLenum pname - GLint *params - - - - void glGetProgramivARB - GLenum target - GLenum pname - GLint *params - - - void glGetProgramivNV - GLuint id - GLenum pname - GLint *params - - - - void glGetQueryBufferObjecti64v - GLuint id - GLuint buffer - GLenum pname - GLintptr offset - - - void glGetQueryBufferObjectiv - GLuint id - GLuint buffer - GLenum pname - GLintptr offset - - - void glGetQueryBufferObjectui64v - GLuint id - GLuint buffer - GLenum pname - GLintptr offset - - - void glGetQueryBufferObjectuiv - GLuint id - GLuint buffer - GLenum pname - GLintptr offset - - - void glGetQueryIndexediv - GLenum target - GLuint index - GLenum pname - GLint *params - - - void glGetQueryObjecti64v - GLuint id - GLenum pname - GLint64 *params - - - void glGetQueryObjecti64vEXT - GLuint id - GLenum pname - GLint64 *params - - - - - void glGetQueryObjectiv - GLuint id - GLenum pname - GLint *params - - - - void glGetQueryObjectivARB - GLuint id - GLenum pname - GLint *params - - - - void glGetQueryObjectivEXT - GLuint id - GLenum pname - GLint *params - - - - void glGetQueryObjectui64v - GLuint id - GLenum pname - GLuint64 *params - - - void glGetQueryObjectui64vEXT - GLuint id - GLenum pname - GLuint64 *params - - - - - void glGetQueryObjectuiv - GLuint id - GLenum pname - GLuint *params - - - - void glGetQueryObjectuivARB - GLuint id - GLenum pname - GLuint *params - - - - void glGetQueryObjectuivEXT - GLuint id - GLenum pname - GLuint *params - - - void glGetQueryiv - GLenum target - GLenum pname - GLint *params - - - - void glGetQueryivARB - GLenum target - GLenum pname - GLint *params - - - - void glGetQueryivEXT - GLenum target - GLenum pname - GLint *params - - - void glGetRenderbufferParameteriv - GLenum target - GLenum pname - GLint *params - - - - void glGetRenderbufferParameterivEXT - GLenum target - GLenum pname - GLint *params - - - - - void glGetRenderbufferParameterivOES - GLenum target - GLenum pname - GLint *params - - - void glGetSamplerParameterIiv - GLuint sampler - GLenum pname - GLint *params - - - void glGetSamplerParameterIivEXT - GLuint sampler - GLenum pname - GLint *params - - - - void glGetSamplerParameterIivOES - GLuint sampler - GLenum pname - GLint *params - - - - void glGetSamplerParameterIuiv - GLuint sampler - GLenum pname - GLuint *params - - - void glGetSamplerParameterIuivEXT - GLuint sampler - GLenum pname - GLuint *params - - - - void glGetSamplerParameterIuivOES - GLuint sampler - GLenum pname - GLuint *params - - - - void glGetSamplerParameterfv - GLuint sampler - GLenum pname - GLfloat *params - - - void glGetSamplerParameteriv - GLuint sampler - GLenum pname - GLint *params - - - void glGetSemaphoreParameterivNV - GLuint semaphore - GLenum pname - GLint *params - - - void glGetSemaphoreParameterui64vEXT - GLuint semaphore - GLenum pname - GLuint64 *params - - - void glGetSeparableFilter - GLenum target - GLenum format - GLenum type - void *row - void *column - void *span - - - - - void glGetSeparableFilterEXT - GLenum target - GLenum format - GLenum type - void *row - void *column - void *span - - - - void glGetShaderInfoLog - GLuint shader - GLsizei bufSize - GLsizei *length - GLchar *infoLog - - - - void glGetShaderPrecisionFormat - GLenum shadertype - GLenum precisiontype - GLint *range - GLint *precision - - - void glGetShaderSource - GLuint shader - GLsizei bufSize - GLsizei *length - GLchar *source - - - void glGetShaderSourceARB - GLhandleARB obj - GLsizei maxLength - GLsizei *length - GLcharARB *source - - - - void glGetShaderiv - GLuint shader - GLenum pname - GLint *params - - - - void glGetShadingRateImagePaletteNV - GLuint viewport - GLuint entry - GLenum *rate - - - void glGetShadingRateSampleLocationivNV - GLenum rate - GLuint samples - GLuint index - GLint *location - - - void glGetSharpenTexFuncSGIS - GLenum target - GLfloat *points - - - - GLushort glGetStageIndexNV - GLenum shadertype - - - - const GLubyte *glGetString - GLenum name - - - - const GLubyte *glGetStringi - GLenum name - GLuint index - - - - GLuint glGetSubroutineIndex - GLuint program - GLenum shadertype - const GLchar *name - - - GLint glGetSubroutineUniformLocation - GLuint program - GLenum shadertype - const GLchar *name - - - void glGetSynciv - GLsync sync - GLenum pname - GLsizei count - GLsizei *length - GLint *values - - - void glGetSyncivAPPLE - GLsync sync - GLenum pname - GLsizei count - GLsizei *length - GLint *values - - - - void glGetTexBumpParameterfvATI - GLenum pname - GLfloat *param - - - void glGetTexBumpParameterivATI - GLenum pname - GLint *param - - - void glGetTexEnvfv - GLenum target - GLenum pname - GLfloat *params - - - - void glGetTexEnviv - GLenum target - GLenum pname - GLint *params - - - - void glGetTexEnvxv - GLenum target - GLenum pname - GLfixed *params - - - void glGetTexEnvxvOES - GLenum target - GLenum pname - GLfixed *params - - - void glGetTexFilterFuncSGIS - GLenum target - GLenum filter - GLfloat *weights - - - - void glGetTexGendv - GLenum coord - GLenum pname - GLdouble *params - - - - void glGetTexGenfv - GLenum coord - GLenum pname - GLfloat *params - - - - void glGetTexGenfvOES - GLenum coord - GLenum pname - GLfloat *params - - - void glGetTexGeniv - GLenum coord - GLenum pname - GLint *params - - - - void glGetTexGenivOES - GLenum coord - GLenum pname - GLint *params - - - void glGetTexGenxvOES - GLenum coord - GLenum pname - GLfixed *params - - - void glGetTexImage - GLenum target - GLint level - GLenum format - GLenum type - void *pixels - - - - - void glGetTexLevelParameterfv - GLenum target - GLint level - GLenum pname - GLfloat *params - - - - void glGetTexLevelParameteriv - GLenum target - GLint level - GLenum pname - GLint *params - - - - void glGetTexLevelParameterxvOES - GLenum target - GLint level - GLenum pname - GLfixed *params - - - void glGetTexParameterIiv - GLenum target - GLenum pname - GLint *params - - - - void glGetTexParameterIivEXT - GLenum target - GLenum pname - GLint *params - - - - void glGetTexParameterIivOES - GLenum target - GLenum pname - GLint *params - - - - void glGetTexParameterIuiv - GLenum target - GLenum pname - GLuint *params - - - - void glGetTexParameterIuivEXT - GLenum target - GLenum pname - GLuint *params - - - - void glGetTexParameterIuivOES - GLenum target - GLenum pname - GLuint *params - - - - void glGetTexParameterPointervAPPLE - GLenum target - GLenum pname - void **params - - - void glGetTexParameterfv - GLenum target - GLenum pname - GLfloat *params - - - - void glGetTexParameteriv - GLenum target - GLenum pname - GLint *params - - - - void glGetTexParameterxv - GLenum target - GLenum pname - GLfixed *params - - - void glGetTexParameterxvOES - GLenum target - GLenum pname - GLfixed *params - - - GLuint64 glGetTextureHandleARB - GLuint texture - - - GLuint64 glGetTextureHandleIMG - GLuint texture - - - - GLuint64 glGetTextureHandleNV - GLuint texture - - - void glGetTextureImage - GLuint texture - GLint level - GLenum format - GLenum type - GLsizei bufSize - void *pixels - - - void glGetTextureImageEXT - GLuint texture - GLenum target - GLint level - GLenum format - GLenum type - void *pixels - - - void glGetTextureLevelParameterfv - GLuint texture - GLint level - GLenum pname - GLfloat *params - - - void glGetTextureLevelParameterfvEXT - GLuint texture - GLenum target - GLint level - GLenum pname - GLfloat *params - - - void glGetTextureLevelParameteriv - GLuint texture - GLint level - GLenum pname - GLint *params - - - void glGetTextureLevelParameterivEXT - GLuint texture - GLenum target - GLint level - GLenum pname - GLint *params - - - void glGetTextureParameterIiv - GLuint texture - GLenum pname - GLint *params - - - void glGetTextureParameterIivEXT - GLuint texture - GLenum target - GLenum pname - GLint *params - - - void glGetTextureParameterIuiv - GLuint texture - GLenum pname - GLuint *params - - - void glGetTextureParameterIuivEXT - GLuint texture - GLenum target - GLenum pname - GLuint *params - - - void glGetTextureParameterfv - GLuint texture - GLenum pname - GLfloat *params - - - void glGetTextureParameterfvEXT - GLuint texture - GLenum target - GLenum pname - GLfloat *params - - - void glGetTextureParameteriv - GLuint texture - GLenum pname - GLint *params - - - void glGetTextureParameterivEXT - GLuint texture - GLenum target - GLenum pname - GLint *params - - - GLuint64 glGetTextureSamplerHandleARB - GLuint texture - GLuint sampler - - - GLuint64 glGetTextureSamplerHandleIMG - GLuint texture - GLuint sampler - - - - GLuint64 glGetTextureSamplerHandleNV - GLuint texture - GLuint sampler - - - void glGetTextureSubImage - GLuint texture - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLsizei width - GLsizei height - GLsizei depth - GLenum format - GLenum type - GLsizei bufSize - void *pixels - - - void glGetTrackMatrixivNV - GLenum target - GLuint address - GLenum pname - GLint *params - - - - void glGetTransformFeedbackVarying - GLuint program - GLuint index - GLsizei bufSize - GLsizei *length - GLsizei *size - GLenum *type - GLchar *name - - - - void glGetTransformFeedbackVaryingEXT - GLuint program - GLuint index - GLsizei bufSize - GLsizei *length - GLsizei *size - GLenum *type - GLchar *name - - - - void glGetTransformFeedbackVaryingNV - GLuint program - GLuint index - GLint *location - - - void glGetTransformFeedbacki64_v - GLuint xfb - GLenum pname - GLuint index - GLint64 *param - - - void glGetTransformFeedbacki_v - GLuint xfb - GLenum pname - GLuint index - GLint *param - - - void glGetTransformFeedbackiv - GLuint xfb - GLenum pname - GLint *param - - - void glGetTranslatedShaderSourceANGLE - GLuint shader - GLsizei bufSize - GLsizei *length - GLchar *source - - - GLuint glGetUniformBlockIndex - GLuint program - const GLchar *uniformBlockName - - - - GLint glGetUniformBufferSizeEXT - GLuint program - GLint location - - - void glGetUniformIndices - GLuint program - GLsizei uniformCount - const GLchar *const*uniformNames - GLuint *uniformIndices - - - - GLint glGetUniformLocation - GLuint program - const GLchar *name - - - GLint glGetUniformLocationARB - GLhandleARB programObj - const GLcharARB *name - - - - GLintptr glGetUniformOffsetEXT - GLuint program - GLint location - - - void glGetUniformSubroutineuiv - GLenum shadertype - GLint location - GLuint *params - - - void glGetUniformdv - GLuint program - GLint location - GLdouble *params - - - void glGetUniformfv - GLuint program - GLint location - GLfloat *params - - - void glGetUniformfvARB - GLhandleARB programObj - GLint location - GLfloat *params - - - - void glGetUniformi64vARB - GLuint program - GLint location - GLint64 *params - - - void glGetUniformi64vNV - GLuint program - GLint location - GLint64EXT *params - - - void glGetUniformiv - GLuint program - GLint location - GLint *params - - - void glGetUniformivARB - GLhandleARB programObj - GLint location - GLint *params - - - - void glGetUniformui64vARB - GLuint program - GLint location - GLuint64 *params - - - void glGetUniformui64vNV - GLuint program - GLint location - GLuint64EXT *params - - - void glGetUniformuiv - GLuint program - GLint location - GLuint *params - - - void glGetUniformuivEXT - GLuint program - GLint location - GLuint *params - - - - void glGetUnsignedBytevEXT - GLenum pname - GLubyte *data - - - void glGetUnsignedBytei_vEXT - GLenum target - GLuint index - GLubyte *data - - - void glGetVariantArrayObjectfvATI - GLuint id - GLenum pname - GLfloat *params - - - void glGetVariantArrayObjectivATI - GLuint id - GLenum pname - GLint *params - - - void glGetVariantBooleanvEXT - GLuint id - GLenum value - GLboolean *data - - - void glGetVariantFloatvEXT - GLuint id - GLenum value - GLfloat *data - - - void glGetVariantIntegervEXT - GLuint id - GLenum value - GLint *data - - - void glGetVariantPointervEXT - GLuint id - GLenum value - void **data - - - GLint glGetVaryingLocationNV - GLuint program - const GLchar *name - - - void glGetVertexArrayIndexed64iv - GLuint vaobj - GLuint index - GLenum pname - GLint64 *param - - - void glGetVertexArrayIndexediv - GLuint vaobj - GLuint index - GLenum pname - GLint *param - - - void glGetVertexArrayIntegeri_vEXT - GLuint vaobj - GLuint index - GLenum pname - GLint *param - - - void glGetVertexArrayIntegervEXT - GLuint vaobj - GLenum pname - GLint *param - - - void glGetVertexArrayPointeri_vEXT - GLuint vaobj - GLuint index - GLenum pname - void **param - - - void glGetVertexArrayPointervEXT - GLuint vaobj - GLenum pname - void **param - - - void glGetVertexArrayiv - GLuint vaobj - GLenum pname - GLint *param - - - void glGetVertexAttribArrayObjectfvATI - GLuint index - GLenum pname - GLfloat *params - - - void glGetVertexAttribArrayObjectivATI - GLuint index - GLenum pname - GLint *params - - - void glGetVertexAttribIiv - GLuint index - GLenum pname - GLint *params - - - void glGetVertexAttribIivEXT - GLuint index - GLenum pname - GLint *params - - - - void glGetVertexAttribIuiv - GLuint index - GLenum pname - GLuint *params - - - void glGetVertexAttribIuivEXT - GLuint index - GLenum pname - GLuint *params - - - - void glGetVertexAttribLdv - GLuint index - GLenum pname - GLdouble *params - - - void glGetVertexAttribLdvEXT - GLuint index - GLenum pname - GLdouble *params - - - - void glGetVertexAttribLi64vNV - GLuint index - GLenum pname - GLint64EXT *params - - - void glGetVertexAttribLui64vARB - GLuint index - GLenum pname - GLuint64EXT *params - - - void glGetVertexAttribLui64vNV - GLuint index - GLenum pname - GLuint64EXT *params - - - void glGetVertexAttribPointerv - GLuint index - GLenum pname - void **pointer - - - - void glGetVertexAttribPointervARB - GLuint index - GLenum pname - void **pointer - - - - void glGetVertexAttribPointervNV - GLuint index - GLenum pname - void **pointer - - - - void glGetVertexAttribdv - GLuint index - GLenum pname - GLdouble *params - - - - void glGetVertexAttribdvARB - GLuint index - GLenum pname - GLdouble *params - - - - - void glGetVertexAttribdvNV - GLuint index - GLenum pname - GLdouble *params - - - - - void glGetVertexAttribfv - GLuint index - GLenum pname - GLfloat *params - - - - void glGetVertexAttribfvARB - GLuint index - GLenum pname - GLfloat *params - - - - - void glGetVertexAttribfvNV - GLuint index - GLenum pname - GLfloat *params - - - - - void glGetVertexAttribiv - GLuint index - GLenum pname - GLint *params - - - - void glGetVertexAttribivARB - GLuint index - GLenum pname - GLint *params - - - - - void glGetVertexAttribivNV - GLuint index - GLenum pname - GLint *params - - - - - void glGetVideoCaptureStreamdvNV - GLuint video_capture_slot - GLuint stream - GLenum pname - GLdouble *params - - - void glGetVideoCaptureStreamfvNV - GLuint video_capture_slot - GLuint stream - GLenum pname - GLfloat *params - - - void glGetVideoCaptureStreamivNV - GLuint video_capture_slot - GLuint stream - GLenum pname - GLint *params - - - void glGetVideoCaptureivNV - GLuint video_capture_slot - GLenum pname - GLint *params - - - void glGetVideoi64vNV - GLuint video_slot - GLenum pname - GLint64EXT *params - - - void glGetVideoivNV - GLuint video_slot - GLenum pname - GLint *params - - - void glGetVideoui64vNV - GLuint video_slot - GLenum pname - GLuint64EXT *params - - - void glGetVideouivNV - GLuint video_slot - GLenum pname - GLuint *params - - - void glGetnColorTable - GLenum target - GLenum format - GLenum type - GLsizei bufSize - void *table - - - void glGetnColorTableARB - GLenum target - GLenum format - GLenum type - GLsizei bufSize - void *table - - - void glGetnCompressedTexImage - GLenum target - GLint lod - GLsizei bufSize - void *pixels - - - void glGetnCompressedTexImageARB - GLenum target - GLint lod - GLsizei bufSize - void *img - - - void glGetnConvolutionFilter - GLenum target - GLenum format - GLenum type - GLsizei bufSize - void *image - - - void glGetnConvolutionFilterARB - GLenum target - GLenum format - GLenum type - GLsizei bufSize - void *image - - - void glGetnHistogram - GLenum target - GLboolean reset - GLenum format - GLenum type - GLsizei bufSize - void *values - - - void glGetnHistogramARB - GLenum target - GLboolean reset - GLenum format - GLenum type - GLsizei bufSize - void *values - - - void glGetnMapdv - GLenum target - GLenum query - GLsizei bufSize - GLdouble *v - - - void glGetnMapdvARB - GLenum target - GLenum query - GLsizei bufSize - GLdouble *v - - - void glGetnMapfv - GLenum target - GLenum query - GLsizei bufSize - GLfloat *v - - - void glGetnMapfvARB - GLenum target - GLenum query - GLsizei bufSize - GLfloat *v - - - void glGetnMapiv - GLenum target - GLenum query - GLsizei bufSize - GLint *v - - - void glGetnMapivARB - GLenum target - GLenum query - GLsizei bufSize - GLint *v - - - void glGetnMinmax - GLenum target - GLboolean reset - GLenum format - GLenum type - GLsizei bufSize - void *values - - - void glGetnMinmaxARB - GLenum target - GLboolean reset - GLenum format - GLenum type - GLsizei bufSize - void *values - - - void glGetnPixelMapfv - GLenum map - GLsizei bufSize - GLfloat *values - - - void glGetnPixelMapfvARB - GLenum map - GLsizei bufSize - GLfloat *values - - - void glGetnPixelMapuiv - GLenum map - GLsizei bufSize - GLuint *values - - - void glGetnPixelMapuivARB - GLenum map - GLsizei bufSize - GLuint *values - - - void glGetnPixelMapusv - GLenum map - GLsizei bufSize - GLushort *values - - - void glGetnPixelMapusvARB - GLenum map - GLsizei bufSize - GLushort *values - - - void glGetnPolygonStipple - GLsizei bufSize - GLubyte *pattern - - - void glGetnPolygonStippleARB - GLsizei bufSize - GLubyte *pattern - - - void glGetnSeparableFilter - GLenum target - GLenum format - GLenum type - GLsizei rowBufSize - void *row - GLsizei columnBufSize - void *column - void *span - - - void glGetnSeparableFilterARB - GLenum target - GLenum format - GLenum type - GLsizei rowBufSize - void *row - GLsizei columnBufSize - void *column - void *span - - - void glGetnTexImage - GLenum target - GLint level - GLenum format - GLenum type - GLsizei bufSize - void *pixels - - - void glGetnTexImageARB - GLenum target - GLint level - GLenum format - GLenum type - GLsizei bufSize - void *img - - - void glGetnUniformdv - GLuint program - GLint location - GLsizei bufSize - GLdouble *params - - - void glGetnUniformdvARB - GLuint program - GLint location - GLsizei bufSize - GLdouble *params - - - void glGetnUniformfv - GLuint program - GLint location - GLsizei bufSize - GLfloat *params - - - void glGetnUniformfvARB - GLuint program - GLint location - GLsizei bufSize - GLfloat *params - - - void glGetnUniformfvEXT - GLuint program - GLint location - GLsizei bufSize - GLfloat *params - - - - void glGetnUniformfvKHR - GLuint program - GLint location - GLsizei bufSize - GLfloat *params - - - - void glGetnUniformi64vARB - GLuint program - GLint location - GLsizei bufSize - GLint64 *params - - - void glGetnUniformiv - GLuint program - GLint location - GLsizei bufSize - GLint *params - - - void glGetnUniformivARB - GLuint program - GLint location - GLsizei bufSize - GLint *params - - - void glGetnUniformivEXT - GLuint program - GLint location - GLsizei bufSize - GLint *params - - - - void glGetnUniformivKHR - GLuint program - GLint location - GLsizei bufSize - GLint *params - - - - void glGetnUniformui64vARB - GLuint program - GLint location - GLsizei bufSize - GLuint64 *params - - - void glGetnUniformuiv - GLuint program - GLint location - GLsizei bufSize - GLuint *params - - - void glGetnUniformuivARB - GLuint program - GLint location - GLsizei bufSize - GLuint *params - - - void glGetnUniformuivKHR - GLuint program - GLint location - GLsizei bufSize - GLuint *params - - - - void glGlobalAlphaFactorbSUN - GLbyte factor - - - void glGlobalAlphaFactordSUN - GLdouble factor - - - void glGlobalAlphaFactorfSUN - GLfloat factor - - - void glGlobalAlphaFactoriSUN - GLint factor - - - void glGlobalAlphaFactorsSUN - GLshort factor - - - void glGlobalAlphaFactorubSUN - GLubyte factor - - - void glGlobalAlphaFactoruiSUN - GLuint factor - - - void glGlobalAlphaFactorusSUN - GLushort factor - - - void glHint - GLenum target - GLenum mode - - - - void glHintPGI - GLenum target - GLint mode - - - void glHistogram - GLenum target - GLsizei width - GLenum internalformat - GLboolean sink - - - - void glHistogramEXT - GLenum target - GLsizei width - GLenum internalformat - GLboolean sink - - - - - void glIglooInterfaceSGIX - GLenum pname - const void *params - - - - void glImageTransformParameterfHP - GLenum target - GLenum pname - GLfloat param - - - void glImageTransformParameterfvHP - GLenum target - GLenum pname - const GLfloat *params - - - void glImageTransformParameteriHP - GLenum target - GLenum pname - GLint param - - - void glImageTransformParameterivHP - GLenum target - GLenum pname - const GLint *params - - - void glImportMemoryFdEXT - GLuint memory - GLuint64 size - GLenum handleType - GLint fd - - - void glImportMemoryWin32HandleEXT - GLuint memory - GLuint64 size - GLenum handleType - void *handle - - - void glImportMemoryWin32NameEXT - GLuint memory - GLuint64 size - GLenum handleType - const void *name - - - void glImportSemaphoreFdEXT - GLuint semaphore - GLenum handleType - GLint fd - - - void glImportSemaphoreWin32HandleEXT - GLuint semaphore - GLenum handleType - void *handle - - - void glImportSemaphoreWin32NameEXT - GLuint semaphore - GLenum handleType - const void *name - - - GLsync glImportSyncEXT - GLenum external_sync_type - GLintptr external_sync - GLbitfield flags - - - void glIndexFormatNV - GLenum type - GLsizei stride - - - void glIndexFuncEXT - GLenum func - GLclampf ref - - - void glIndexMask - GLuint mask - - - - void glIndexMaterialEXT - GLenum face - GLenum mode - - - void glIndexPointer - GLenum type - GLsizei stride - const void *pointer - - - void glIndexPointerEXT - GLenum type - GLsizei stride - GLsizei count - const void *pointer - - - void glIndexPointerListIBM - GLenum type - GLint stride - const void **pointer - GLint ptrstride - - - void glIndexd - GLdouble c - - - - void glIndexdv - const GLdouble *c - - - - void glIndexf - GLfloat c - - - - void glIndexfv - const GLfloat *c - - - - void glIndexi - GLint c - - - - void glIndexiv - const GLint *c - - - - void glIndexs - GLshort c - - - - void glIndexsv - const GLshort *c - - - - void glIndexub - GLubyte c - - - - void glIndexubv - const GLubyte *c - - - - void glIndexxOES - GLfixed component - - - void glIndexxvOES - const GLfixed *component - - - void glInitNames - - - - void glInsertComponentEXT - GLuint res - GLuint src - GLuint num - - - void glInsertEventMarkerEXT - GLsizei length - const GLchar *marker - - - void glInstrumentsBufferSGIX - GLsizei size - GLint *buffer - - - - void glInterleavedArrays - GLenum format - GLsizei stride - const void *pointer - - - void glInterpolatePathsNV - GLuint resultPath - GLuint pathA - GLuint pathB - GLfloat weight - - - void glInvalidateBufferData - GLuint buffer - - - void glInvalidateBufferSubData - GLuint buffer - GLintptr offset - GLsizeiptr length - - - void glInvalidateFramebuffer - GLenum target - GLsizei numAttachments - const GLenum *attachments - - - void glInvalidateNamedFramebufferData - GLuint framebuffer - GLsizei numAttachments - const GLenum *attachments - - - void glInvalidateNamedFramebufferSubData - GLuint framebuffer - GLsizei numAttachments - const GLenum *attachments - GLint x - GLint y - GLsizei width - GLsizei height - - - void glInvalidateSubFramebuffer - GLenum target - GLsizei numAttachments - const GLenum *attachments - GLint x - GLint y - GLsizei width - GLsizei height - - - void glInvalidateTexImage - GLuint texture - GLint level - - - void glInvalidateTexSubImage - GLuint texture - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLsizei width - GLsizei height - GLsizei depth - - - GLboolean glIsAsyncMarkerSGIX - GLuint marker - - - GLboolean glIsBuffer - GLuint buffer - - - GLboolean glIsBufferARB - GLuint buffer - - - - GLboolean glIsBufferResidentNV - GLenum target - - - GLboolean glIsCommandListNV - GLuint list - - - GLboolean glIsEnabled - GLenum cap - - - - GLboolean glIsEnabledIndexedEXT - GLenum target - GLuint index - - - - - GLboolean glIsEnabledi - GLenum target - GLuint index - - - GLboolean glIsEnablediEXT - GLenum target - GLuint index - - - - GLboolean glIsEnablediNV - GLenum target - GLuint index - - - - GLboolean glIsEnablediOES - GLenum target - GLuint index - - - - GLboolean glIsFenceAPPLE - GLuint fence - - - GLboolean glIsFenceNV - GLuint fence - - - - GLboolean glIsFramebuffer - GLuint framebuffer - - - - GLboolean glIsFramebufferEXT - GLuint framebuffer - - - - - GLboolean glIsFramebufferOES - GLuint framebuffer - - - GLboolean glIsImageHandleResidentARB - GLuint64 handle - - - GLboolean glIsImageHandleResidentNV - GLuint64 handle - - - GLboolean glIsList - GLuint list - - - - GLboolean glIsMemoryObjectEXT - GLuint memoryObject - - - GLboolean glIsNameAMD - GLenum identifier - GLuint name - - - GLboolean glIsNamedBufferResidentNV - GLuint buffer - - - GLboolean glIsNamedStringARB - GLint namelen - const GLchar *name - - - GLboolean glIsObjectBufferATI - GLuint buffer - - - GLboolean glIsOcclusionQueryNV - GLuint id - - - GLboolean glIsPathNV - GLuint path - - - GLboolean glIsPointInFillPathNV - GLuint path - GLuint mask - GLfloat x - GLfloat y - - - GLboolean glIsPointInStrokePathNV - GLuint path - GLfloat x - GLfloat y - - - GLboolean glIsProgram - GLuint program - - - - GLboolean glIsProgramARB - GLuint program - - - - GLboolean glIsProgramNV - GLuint id - - - - - GLboolean glIsProgramPipeline - GLuint pipeline - - - GLboolean glIsProgramPipelineEXT - GLuint pipeline - - - GLboolean glIsQuery - GLuint id - - - - GLboolean glIsQueryARB - GLuint id - - - - GLboolean glIsQueryEXT - GLuint id - - - GLboolean glIsRenderbuffer - GLuint renderbuffer - - - - GLboolean glIsRenderbufferEXT - GLuint renderbuffer - - - - - GLboolean glIsRenderbufferOES - GLuint renderbuffer - - - GLboolean glIsSemaphoreEXT - GLuint semaphore - - - GLboolean glIsSampler - GLuint sampler - - - GLboolean glIsShader - GLuint shader - - - - GLboolean glIsStateNV - GLuint state - - - GLboolean glIsSync - GLsync sync - - - GLboolean glIsSyncAPPLE - GLsync sync - - - - GLboolean glIsTexture - GLuint texture - - - - GLboolean glIsTextureEXT - GLuint texture - - - - GLboolean glIsTextureHandleResidentARB - GLuint64 handle - - - GLboolean glIsTextureHandleResidentNV - GLuint64 handle - - - GLboolean glIsTransformFeedback - GLuint id - - - GLboolean glIsTransformFeedbackNV - GLuint id - - - - GLboolean glIsVariantEnabledEXT - GLuint id - GLenum cap - - - GLboolean glIsVertexArray - GLuint array - - - - GLboolean glIsVertexArrayAPPLE - GLuint array - - - - GLboolean glIsVertexArrayOES - GLuint array - - - - GLboolean glIsVertexAttribEnabledAPPLE - GLuint index - GLenum pname - - - void glLGPUCopyImageSubDataNVX - GLuint sourceGpu - GLbitfield destinationGpuMask - GLuint srcName - GLenum srcTarget - GLint srcLevel - GLint srcX - GLint srxY - GLint srcZ - GLuint dstName - GLenum dstTarget - GLint dstLevel - GLint dstX - GLint dstY - GLint dstZ - GLsizei width - GLsizei height - GLsizei depth - - - void glLGPUInterlockNVX - - - void glLGPUNamedBufferSubDataNVX - GLbitfield gpuMask - GLuint buffer - GLintptr offset - GLsizeiptr size - const void *data - - - void glLabelObjectEXT - GLenum type - GLuint object - GLsizei length - const GLchar *label - - - void glLightEnviSGIX - GLenum pname - GLint param - - - void glLightModelf - GLenum pname - GLfloat param - - - - void glLightModelfv - GLenum pname - const GLfloat *params - - - - void glLightModeli - GLenum pname - GLint param - - - - void glLightModeliv - GLenum pname - const GLint *params - - - - void glLightModelx - GLenum pname - GLfixed param - - - void glLightModelxOES - GLenum pname - GLfixed param - - - void glLightModelxv - GLenum pname - const GLfixed *param - - - void glLightModelxvOES - GLenum pname - const GLfixed *param - - - void glLightf - GLenum light - GLenum pname - GLfloat param - - - - void glLightfv - GLenum light - GLenum pname - const GLfloat *params - - - - void glLighti - GLenum light - GLenum pname - GLint param - - - - void glLightiv - GLenum light - GLenum pname - const GLint *params - - - - void glLightx - GLenum light - GLenum pname - GLfixed param - - - void glLightxOES - GLenum light - GLenum pname - GLfixed param - - - void glLightxv - GLenum light - GLenum pname - const GLfixed *params - - - void glLightxvOES - GLenum light - GLenum pname - const GLfixed *params - - - void glLineStipple - GLint factor - GLushort pattern - - - - void glLineWidth - GLfloat width - - - - void glLineWidthx - GLfixed width - - - void glLineWidthxOES - GLfixed width - - - void glLinkProgram - GLuint program - - - void glLinkProgramARB - GLhandleARB programObj - - - - void glListBase - GLuint base - - - - void glListDrawCommandsStatesClientNV - GLuint list - GLuint segment - const void **indirects - const GLsizei *sizes - const GLuint *states - const GLuint *fbos - GLuint count - - - void glListParameterfSGIX - GLuint list - GLenum pname - GLfloat param - - - - void glListParameterfvSGIX - GLuint list - GLenum pname - const GLfloat *params - - - - void glListParameteriSGIX - GLuint list - GLenum pname - GLint param - - - - void glListParameterivSGIX - GLuint list - GLenum pname - const GLint *params - - - - void glLoadIdentity - - - - void glLoadIdentityDeformationMapSGIX - GLbitfield mask - - - - void glLoadMatrixd - const GLdouble *m - - - - void glLoadMatrixf - const GLfloat *m - - - - void glLoadMatrixx - const GLfixed *m - - - void glLoadMatrixxOES - const GLfixed *m - - - void glLoadName - GLuint name - - - - void glLoadPaletteFromModelViewMatrixOES - - - void glLoadProgramNV - GLenum target - GLuint id - GLsizei len - const GLubyte *program - - - - void glLoadTransposeMatrixd - const GLdouble *m - - - void glLoadTransposeMatrixdARB - const GLdouble *m - - - - void glLoadTransposeMatrixf - const GLfloat *m - - - void glLoadTransposeMatrixfARB - const GLfloat *m - - - - void glLoadTransposeMatrixxOES - const GLfixed *m - - - void glLockArraysEXT - GLint first - GLsizei count - - - void glLogicOp - GLenum opcode - - - - void glMakeBufferNonResidentNV - GLenum target - - - void glMakeBufferResidentNV - GLenum target - GLenum access - - - void glMakeImageHandleNonResidentARB - GLuint64 handle - - - void glMakeImageHandleNonResidentNV - GLuint64 handle - - - void glMakeImageHandleResidentARB - GLuint64 handle - GLenum access - - - void glMakeImageHandleResidentNV - GLuint64 handle - GLenum access - - - void glMakeNamedBufferNonResidentNV - GLuint buffer - - - void glMakeNamedBufferResidentNV - GLuint buffer - GLenum access - - - void glMakeTextureHandleNonResidentARB - GLuint64 handle - - - void glMakeTextureHandleNonResidentNV - GLuint64 handle - - - void glMakeTextureHandleResidentARB - GLuint64 handle - - - void glMakeTextureHandleResidentNV - GLuint64 handle - - - void glMap1d - GLenum target - GLdouble u1 - GLdouble u2 - GLint stride - GLint order - const GLdouble *points - - - - void glMap1f - GLenum target - GLfloat u1 - GLfloat u2 - GLint stride - GLint order - const GLfloat *points - - - - void glMap1xOES - GLenum target - GLfixed u1 - GLfixed u2 - GLint stride - GLint order - GLfixed points - - - void glMap2d - GLenum target - GLdouble u1 - GLdouble u2 - GLint ustride - GLint uorder - GLdouble v1 - GLdouble v2 - GLint vstride - GLint vorder - const GLdouble *points - - - - void glMap2f - GLenum target - GLfloat u1 - GLfloat u2 - GLint ustride - GLint uorder - GLfloat v1 - GLfloat v2 - GLint vstride - GLint vorder - const GLfloat *points - - - - void glMap2xOES - GLenum target - GLfixed u1 - GLfixed u2 - GLint ustride - GLint uorder - GLfixed v1 - GLfixed v2 - GLint vstride - GLint vorder - GLfixed points - - - void *glMapBuffer - GLenum target - GLenum access - - - void *glMapBufferARB - GLenum target - GLenum access - - - - void *glMapBufferOES - GLenum target - GLenum access - - - - void *glMapBufferRange - GLenum target - GLintptr offset - GLsizeiptr length - GLbitfield access - - - - void *glMapBufferRangeEXT - GLenum target - GLintptr offset - GLsizeiptr length - GLbitfield access - - - - void glMapControlPointsNV - GLenum target - GLuint index - GLenum type - GLsizei ustride - GLsizei vstride - GLint uorder - GLint vorder - GLboolean packed - const void *points - - - void glMapGrid1d - GLint un - GLdouble u1 - GLdouble u2 - - - - void glMapGrid1f - GLint un - GLfloat u1 - GLfloat u2 - - - - void glMapGrid1xOES - GLint n - GLfixed u1 - GLfixed u2 - - - void glMapGrid2d - GLint un - GLdouble u1 - GLdouble u2 - GLint vn - GLdouble v1 - GLdouble v2 - - - - void glMapGrid2f - GLint un - GLfloat u1 - GLfloat u2 - GLint vn - GLfloat v1 - GLfloat v2 - - - - void glMapGrid2xOES - GLint n - GLfixed u1 - GLfixed u2 - GLfixed v1 - GLfixed v2 - - - void *glMapNamedBuffer - GLuint buffer - GLenum access - - - void *glMapNamedBufferEXT - GLuint buffer - GLenum access - - - void *glMapNamedBufferRange - GLuint buffer - GLintptr offset - GLsizeiptr length - GLbitfield access - - - void *glMapNamedBufferRangeEXT - GLuint buffer - GLintptr offset - GLsizeiptr length - GLbitfield access - - - void *glMapObjectBufferATI - GLuint buffer - - - void glMapParameterfvNV - GLenum target - GLenum pname - const GLfloat *params - - - void glMapParameterivNV - GLenum target - GLenum pname - const GLint *params - - - void *glMapTexture2DINTEL - GLuint texture - GLint level - GLbitfield access - GLint *stride - GLenum *layout - - - void glMapVertexAttrib1dAPPLE - GLuint index - GLuint size - GLdouble u1 - GLdouble u2 - GLint stride - GLint order - const GLdouble *points - - - void glMapVertexAttrib1fAPPLE - GLuint index - GLuint size - GLfloat u1 - GLfloat u2 - GLint stride - GLint order - const GLfloat *points - - - void glMapVertexAttrib2dAPPLE - GLuint index - GLuint size - GLdouble u1 - GLdouble u2 - GLint ustride - GLint uorder - GLdouble v1 - GLdouble v2 - GLint vstride - GLint vorder - const GLdouble *points - - - void glMapVertexAttrib2fAPPLE - GLuint index - GLuint size - GLfloat u1 - GLfloat u2 - GLint ustride - GLint uorder - GLfloat v1 - GLfloat v2 - GLint vstride - GLint vorder - const GLfloat *points - - - void glMaterialf - GLenum face - GLenum pname - GLfloat param - - - - void glMaterialfv - GLenum face - GLenum pname - const GLfloat *params - - - - void glMateriali - GLenum face - GLenum pname - GLint param - - - - void glMaterialiv - GLenum face - GLenum pname - const GLint *params - - - - void glMaterialx - GLenum face - GLenum pname - GLfixed param - - - void glMaterialxOES - GLenum face - GLenum pname - GLfixed param - - - void glMaterialxv - GLenum face - GLenum pname - const GLfixed *param - - - void glMaterialxvOES - GLenum face - GLenum pname - const GLfixed *param - - - void glMatrixFrustumEXT - GLenum mode - GLdouble left - GLdouble right - GLdouble bottom - GLdouble top - GLdouble zNear - GLdouble zFar - - - void glMatrixIndexPointerARB - GLint size - GLenum type - GLsizei stride - const void *pointer - - - void glMatrixIndexPointerOES - GLint size - GLenum type - GLsizei stride - const void *pointer - - - void glMatrixIndexubvARB - GLint size - const GLubyte *indices - - - - void glMatrixIndexuivARB - GLint size - const GLuint *indices - - - - void glMatrixIndexusvARB - GLint size - const GLushort *indices - - - - void glMatrixLoad3x2fNV - GLenum matrixMode - const GLfloat *m - - - void glMatrixLoad3x3fNV - GLenum matrixMode - const GLfloat *m - - - void glMatrixLoadIdentityEXT - GLenum mode - - - void glMatrixLoadTranspose3x3fNV - GLenum matrixMode - const GLfloat *m - - - void glMatrixLoadTransposedEXT - GLenum mode - const GLdouble *m - - - void glMatrixLoadTransposefEXT - GLenum mode - const GLfloat *m - - - void glMatrixLoaddEXT - GLenum mode - const GLdouble *m - - - void glMatrixLoadfEXT - GLenum mode - const GLfloat *m - - - void glMatrixMode - GLenum mode - - - - void glMatrixMult3x2fNV - GLenum matrixMode - const GLfloat *m - - - void glMatrixMult3x3fNV - GLenum matrixMode - const GLfloat *m - - - void glMatrixMultTranspose3x3fNV - GLenum matrixMode - const GLfloat *m - - - void glMatrixMultTransposedEXT - GLenum mode - const GLdouble *m - - - void glMatrixMultTransposefEXT - GLenum mode - const GLfloat *m - - - void glMatrixMultdEXT - GLenum mode - const GLdouble *m - - - void glMatrixMultfEXT - GLenum mode - const GLfloat *m - - - void glMatrixOrthoEXT - GLenum mode - GLdouble left - GLdouble right - GLdouble bottom - GLdouble top - GLdouble zNear - GLdouble zFar - - - void glMatrixPopEXT - GLenum mode - - - void glMatrixPushEXT - GLenum mode - - - void glMatrixRotatedEXT - GLenum mode - GLdouble angle - GLdouble x - GLdouble y - GLdouble z - - - void glMatrixRotatefEXT - GLenum mode - GLfloat angle - GLfloat x - GLfloat y - GLfloat z - - - void glMatrixScaledEXT - GLenum mode - GLdouble x - GLdouble y - GLdouble z - - - void glMatrixScalefEXT - GLenum mode - GLfloat x - GLfloat y - GLfloat z - - - void glMatrixTranslatedEXT - GLenum mode - GLdouble x - GLdouble y - GLdouble z - - - void glMatrixTranslatefEXT - GLenum mode - GLfloat x - GLfloat y - GLfloat z - - - void glMaxActiveShaderCoresARM - GLuint count - - - void glMaxShaderCompilerThreadsKHR - GLuint count - - - void glMaxShaderCompilerThreadsARB - GLuint count - - - - void glMemoryBarrier - GLbitfield barriers - - - void glMemoryBarrierByRegion - GLbitfield barriers - - - void glMemoryBarrierEXT - GLbitfield barriers - - - - void glMemoryObjectParameterivEXT - GLuint memoryObject - GLenum pname - const GLint *params - - - void glMinSampleShading - GLfloat value - - - void glMinSampleShadingARB - GLfloat value - - - - void glMinSampleShadingOES - GLfloat value - - - - void glMinmax - GLenum target - GLenum internalformat - GLboolean sink - - - - void glMinmaxEXT - GLenum target - GLenum internalformat - GLboolean sink - - - - - void glMultMatrixd - const GLdouble *m - - - - void glMultMatrixf - const GLfloat *m - - - - void glMultMatrixx - const GLfixed *m - - - void glMultMatrixxOES - const GLfixed *m - - - void glMultTransposeMatrixd - const GLdouble *m - - - void glMultTransposeMatrixdARB - const GLdouble *m - - - - void glMultTransposeMatrixf - const GLfloat *m - - - void glMultTransposeMatrixfARB - const GLfloat *m - - - - void glMultTransposeMatrixxOES - const GLfixed *m - - - void glMultiDrawArrays - GLenum mode - const GLint *first - const GLsizei *count - GLsizei drawcount - - - void glMultiDrawArraysEXT - GLenum mode - const GLint *first - const GLsizei *count - GLsizei primcount - - - - void glMultiDrawArraysIndirect - GLenum mode - const void *indirect - GLsizei drawcount - GLsizei stride - - - void glMultiDrawArraysIndirectAMD - GLenum mode - const void *indirect - GLsizei primcount - GLsizei stride - - - - void glMultiDrawArraysIndirectBindlessCountNV - GLenum mode - const void *indirect - GLsizei drawCount - GLsizei maxDrawCount - GLsizei stride - GLint vertexBufferCount - - - void glMultiDrawArraysIndirectBindlessNV - GLenum mode - const void *indirect - GLsizei drawCount - GLsizei stride - GLint vertexBufferCount - - - void glMultiDrawArraysIndirectCount - GLenum mode - const void *indirect - GLintptr drawcount - GLsizei maxdrawcount - GLsizei stride - - - void glMultiDrawArraysIndirectCountARB - GLenum mode - const void *indirect - GLintptr drawcount - GLsizei maxdrawcount - GLsizei stride - - - - void glMultiDrawArraysIndirectEXT - GLenum mode - const void *indirect - GLsizei drawcount - GLsizei stride - - - - void glMultiDrawElementArrayAPPLE - GLenum mode - const GLint *first - const GLsizei *count - GLsizei primcount - - - void glMultiDrawElements - GLenum mode - const GLsizei *count - GLenum type - const void *const*indices - GLsizei drawcount - - - void glMultiDrawElementsBaseVertex - GLenum mode - const GLsizei *count - GLenum type - const void *const*indices - GLsizei drawcount - const GLint *basevertex - - - void glMultiDrawElementsBaseVertexEXT - GLenum mode - const GLsizei *count - GLenum type - const void *const*indices - GLsizei drawcount - const GLint *basevertex - - - - void glMultiDrawElementsEXT - GLenum mode - const GLsizei *count - GLenum type - const void *const*indices - GLsizei primcount - - - - void glMultiDrawElementsIndirect - GLenum mode - GLenum type - const void *indirect - GLsizei drawcount - GLsizei stride - - - void glMultiDrawElementsIndirectAMD - GLenum mode - GLenum type - const void *indirect - GLsizei primcount - GLsizei stride - - - - void glMultiDrawElementsIndirectBindlessCountNV - GLenum mode - GLenum type - const void *indirect - GLsizei drawCount - GLsizei maxDrawCount - GLsizei stride - GLint vertexBufferCount - - - void glMultiDrawElementsIndirectBindlessNV - GLenum mode - GLenum type - const void *indirect - GLsizei drawCount - GLsizei stride - GLint vertexBufferCount - - - void glMultiDrawElementsIndirectCount - GLenum mode - GLenum type - const void *indirect - GLintptr drawcount - GLsizei maxdrawcount - GLsizei stride - - - void glMultiDrawElementsIndirectCountARB - GLenum mode - GLenum type - const void *indirect - GLintptr drawcount - GLsizei maxdrawcount - GLsizei stride - - - - void glMultiDrawElementsIndirectEXT - GLenum mode - GLenum type - const void *indirect - GLsizei drawcount - GLsizei stride - - - - void glMultiDrawMeshTasksIndirectEXT - GLintptr indirect - GLsizei drawcount - GLsizei stride - - - void glMultiDrawMeshTasksIndirectNV - GLintptr indirect - GLsizei drawcount - GLsizei stride - - - void glMultiDrawMeshTasksIndirectCountEXT - GLintptr indirect - GLintptr drawcount - GLsizei maxdrawcount - GLsizei stride - - - void glMultiDrawMeshTasksIndirectCountNV - GLintptr indirect - GLintptr drawcount - GLsizei maxdrawcount - GLsizei stride - - - void glMultiDrawRangeElementArrayAPPLE - GLenum mode - GLuint start - GLuint end - const GLint *first - const GLsizei *count - GLsizei primcount - - - void glMultiModeDrawArraysIBM - const GLenum *mode - const GLint *first - const GLsizei *count - GLsizei primcount - GLint modestride - - - void glMultiModeDrawElementsIBM - const GLenum *mode - const GLsizei *count - GLenum type - const void *const*indices - GLsizei primcount - GLint modestride - - - void glMultiTexBufferEXT - GLenum texunit - GLenum target - GLenum internalformat - GLuint buffer - - - void glMultiTexCoord1bOES - GLenum texture - GLbyte s - - - void glMultiTexCoord1bvOES - GLenum texture - const GLbyte *coords - - - void glMultiTexCoord1d - GLenum target - GLdouble s - - - - void glMultiTexCoord1dARB - GLenum target - GLdouble s - - - - - void glMultiTexCoord1dv - GLenum target - const GLdouble *v - - - - void glMultiTexCoord1dvARB - GLenum target - const GLdouble *v - - - - - void glMultiTexCoord1f - GLenum target - GLfloat s - - - - void glMultiTexCoord1fARB - GLenum target - GLfloat s - - - - - void glMultiTexCoord1fv - GLenum target - const GLfloat *v - - - - void glMultiTexCoord1fvARB - GLenum target - const GLfloat *v - - - - - void glMultiTexCoord1hNV - GLenum target - GLhalfNV s - - - - void glMultiTexCoord1hvNV - GLenum target - const GLhalfNV *v - - - - void glMultiTexCoord1i - GLenum target - GLint s - - - - void glMultiTexCoord1iARB - GLenum target - GLint s - - - - - void glMultiTexCoord1iv - GLenum target - const GLint *v - - - - void glMultiTexCoord1ivARB - GLenum target - const GLint *v - - - - - void glMultiTexCoord1s - GLenum target - GLshort s - - - - void glMultiTexCoord1sARB - GLenum target - GLshort s - - - - - void glMultiTexCoord1sv - GLenum target - const GLshort *v - - - - void glMultiTexCoord1svARB - GLenum target - const GLshort *v - - - - - void glMultiTexCoord1xOES - GLenum texture - GLfixed s - - - void glMultiTexCoord1xvOES - GLenum texture - const GLfixed *coords - - - void glMultiTexCoord2bOES - GLenum texture - GLbyte s - GLbyte t - - - void glMultiTexCoord2bvOES - GLenum texture - const GLbyte *coords - - - void glMultiTexCoord2d - GLenum target - GLdouble s - GLdouble t - - - - void glMultiTexCoord2dARB - GLenum target - GLdouble s - GLdouble t - - - - - void glMultiTexCoord2dv - GLenum target - const GLdouble *v - - - - void glMultiTexCoord2dvARB - GLenum target - const GLdouble *v - - - - - void glMultiTexCoord2f - GLenum target - GLfloat s - GLfloat t - - - - void glMultiTexCoord2fARB - GLenum target - GLfloat s - GLfloat t - - - - - void glMultiTexCoord2fv - GLenum target - const GLfloat *v - - - - void glMultiTexCoord2fvARB - GLenum target - const GLfloat *v - - - - - void glMultiTexCoord2hNV - GLenum target - GLhalfNV s - GLhalfNV t - - - - void glMultiTexCoord2hvNV - GLenum target - const GLhalfNV *v - - - - void glMultiTexCoord2i - GLenum target - GLint s - GLint t - - - - void glMultiTexCoord2iARB - GLenum target - GLint s - GLint t - - - - - void glMultiTexCoord2iv - GLenum target - const GLint *v - - - - void glMultiTexCoord2ivARB - GLenum target - const GLint *v - - - - - void glMultiTexCoord2s - GLenum target - GLshort s - GLshort t - - - - void glMultiTexCoord2sARB - GLenum target - GLshort s - GLshort t - - - - - void glMultiTexCoord2sv - GLenum target - const GLshort *v - - - - void glMultiTexCoord2svARB - GLenum target - const GLshort *v - - - - - void glMultiTexCoord2xOES - GLenum texture - GLfixed s - GLfixed t - - - void glMultiTexCoord2xvOES - GLenum texture - const GLfixed *coords - - - void glMultiTexCoord3bOES - GLenum texture - GLbyte s - GLbyte t - GLbyte r - - - void glMultiTexCoord3bvOES - GLenum texture - const GLbyte *coords - - - void glMultiTexCoord3d - GLenum target - GLdouble s - GLdouble t - GLdouble r - - - - void glMultiTexCoord3dARB - GLenum target - GLdouble s - GLdouble t - GLdouble r - - - - - void glMultiTexCoord3dv - GLenum target - const GLdouble *v - - - - void glMultiTexCoord3dvARB - GLenum target - const GLdouble *v - - - - - void glMultiTexCoord3f - GLenum target - GLfloat s - GLfloat t - GLfloat r - - - - void glMultiTexCoord3fARB - GLenum target - GLfloat s - GLfloat t - GLfloat r - - - - - void glMultiTexCoord3fv - GLenum target - const GLfloat *v - - - - void glMultiTexCoord3fvARB - GLenum target - const GLfloat *v - - - - - void glMultiTexCoord3hNV - GLenum target - GLhalfNV s - GLhalfNV t - GLhalfNV r - - - - void glMultiTexCoord3hvNV - GLenum target - const GLhalfNV *v - - - - void glMultiTexCoord3i - GLenum target - GLint s - GLint t - GLint r - - - - void glMultiTexCoord3iARB - GLenum target - GLint s - GLint t - GLint r - - - - - void glMultiTexCoord3iv - GLenum target - const GLint *v - - - - void glMultiTexCoord3ivARB - GLenum target - const GLint *v - - - - - void glMultiTexCoord3s - GLenum target - GLshort s - GLshort t - GLshort r - - - - void glMultiTexCoord3sARB - GLenum target - GLshort s - GLshort t - GLshort r - - - - - void glMultiTexCoord3sv - GLenum target - const GLshort *v - - - - void glMultiTexCoord3svARB - GLenum target - const GLshort *v - - - - - void glMultiTexCoord3xOES - GLenum texture - GLfixed s - GLfixed t - GLfixed r - - - void glMultiTexCoord3xvOES - GLenum texture - const GLfixed *coords - - - void glMultiTexCoord4bOES - GLenum texture - GLbyte s - GLbyte t - GLbyte r - GLbyte q - - - void glMultiTexCoord4bvOES - GLenum texture - const GLbyte *coords - - - void glMultiTexCoord4d - GLenum target - GLdouble s - GLdouble t - GLdouble r - GLdouble q - - - - void glMultiTexCoord4dARB - GLenum target - GLdouble s - GLdouble t - GLdouble r - GLdouble q - - - - - void glMultiTexCoord4dv - GLenum target - const GLdouble *v - - - - void glMultiTexCoord4dvARB - GLenum target - const GLdouble *v - - - - - void glMultiTexCoord4f - GLenum target - GLfloat s - GLfloat t - GLfloat r - GLfloat q - - - - void glMultiTexCoord4fARB - GLenum target - GLfloat s - GLfloat t - GLfloat r - GLfloat q - - - - - void glMultiTexCoord4fv - GLenum target - const GLfloat *v - - - - void glMultiTexCoord4fvARB - GLenum target - const GLfloat *v - - - - - void glMultiTexCoord4hNV - GLenum target - GLhalfNV s - GLhalfNV t - GLhalfNV r - GLhalfNV q - - - - void glMultiTexCoord4hvNV - GLenum target - const GLhalfNV *v - - - - void glMultiTexCoord4i - GLenum target - GLint s - GLint t - GLint r - GLint q - - - - void glMultiTexCoord4iARB - GLenum target - GLint s - GLint t - GLint r - GLint q - - - - - void glMultiTexCoord4iv - GLenum target - const GLint *v - - - - void glMultiTexCoord4ivARB - GLenum target - const GLint *v - - - - - void glMultiTexCoord4s - GLenum target - GLshort s - GLshort t - GLshort r - GLshort q - - - - void glMultiTexCoord4sARB - GLenum target - GLshort s - GLshort t - GLshort r - GLshort q - - - - - void glMultiTexCoord4sv - GLenum target - const GLshort *v - - - - void glMultiTexCoord4svARB - GLenum target - const GLshort *v - - - - - void glMultiTexCoord4x - GLenum texture - GLfixed s - GLfixed t - GLfixed r - GLfixed q - - - void glMultiTexCoord4xOES - GLenum texture - GLfixed s - GLfixed t - GLfixed r - GLfixed q - - - void glMultiTexCoord4xvOES - GLenum texture - const GLfixed *coords - - - void glMultiTexCoordP1ui - GLenum texture - GLenum type - GLuint coords - - - void glMultiTexCoordP1uiv - GLenum texture - GLenum type - const GLuint *coords - - - void glMultiTexCoordP2ui - GLenum texture - GLenum type - GLuint coords - - - void glMultiTexCoordP2uiv - GLenum texture - GLenum type - const GLuint *coords - - - void glMultiTexCoordP3ui - GLenum texture - GLenum type - GLuint coords - - - void glMultiTexCoordP3uiv - GLenum texture - GLenum type - const GLuint *coords - - - void glMultiTexCoordP4ui - GLenum texture - GLenum type - GLuint coords - - - void glMultiTexCoordP4uiv - GLenum texture - GLenum type - const GLuint *coords - - - void glMultiTexCoordPointerEXT - GLenum texunit - GLint size - GLenum type - GLsizei stride - const void *pointer - - - void glMultiTexEnvfEXT - GLenum texunit - GLenum target - GLenum pname - GLfloat param - - - - void glMultiTexEnvfvEXT - GLenum texunit - GLenum target - GLenum pname - const GLfloat *params - - - void glMultiTexEnviEXT - GLenum texunit - GLenum target - GLenum pname - GLint param - - - - void glMultiTexEnvivEXT - GLenum texunit - GLenum target - GLenum pname - const GLint *params - - - void glMultiTexGendEXT - GLenum texunit - GLenum coord - GLenum pname - GLdouble param - - - - void glMultiTexGendvEXT - GLenum texunit - GLenum coord - GLenum pname - const GLdouble *params - - - void glMultiTexGenfEXT - GLenum texunit - GLenum coord - GLenum pname - GLfloat param - - - - void glMultiTexGenfvEXT - GLenum texunit - GLenum coord - GLenum pname - const GLfloat *params - - - void glMultiTexGeniEXT - GLenum texunit - GLenum coord - GLenum pname - GLint param - - - - void glMultiTexGenivEXT - GLenum texunit - GLenum coord - GLenum pname - const GLint *params - - - void glMultiTexImage1DEXT - GLenum texunit - GLenum target - GLint level - GLint internalformat - GLsizei width - GLint border - GLenum format - GLenum type - const void *pixels - - - void glMultiTexImage2DEXT - GLenum texunit - GLenum target - GLint level - GLint internalformat - GLsizei width - GLsizei height - GLint border - GLenum format - GLenum type - const void *pixels - - - void glMultiTexImage3DEXT - GLenum texunit - GLenum target - GLint level - GLint internalformat - GLsizei width - GLsizei height - GLsizei depth - GLint border - GLenum format - GLenum type - const void *pixels - - - void glMultiTexParameterIivEXT - GLenum texunit - GLenum target - GLenum pname - const GLint *params - - - void glMultiTexParameterIuivEXT - GLenum texunit - GLenum target - GLenum pname - const GLuint *params - - - void glMultiTexParameterfEXT - GLenum texunit - GLenum target - GLenum pname - GLfloat param - - - - void glMultiTexParameterfvEXT - GLenum texunit - GLenum target - GLenum pname - const GLfloat *params - - - void glMultiTexParameteriEXT - GLenum texunit - GLenum target - GLenum pname - GLint param - - - - void glMultiTexParameterivEXT - GLenum texunit - GLenum target - GLenum pname - const GLint *params - - - void glMultiTexRenderbufferEXT - GLenum texunit - GLenum target - GLuint renderbuffer - - - void glMultiTexSubImage1DEXT - GLenum texunit - GLenum target - GLint level - GLint xoffset - GLsizei width - GLenum format - GLenum type - const void *pixels - - - void glMultiTexSubImage2DEXT - GLenum texunit - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLsizei width - GLsizei height - GLenum format - GLenum type - const void *pixels - - - void glMultiTexSubImage3DEXT - GLenum texunit - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLsizei width - GLsizei height - GLsizei depth - GLenum format - GLenum type - const void *pixels - - - void glMulticastBarrierNV - - - void glMulticastBlitFramebufferNV - GLuint srcGpu - GLuint dstGpu - GLint srcX0 - GLint srcY0 - GLint srcX1 - GLint srcY1 - GLint dstX0 - GLint dstY0 - GLint dstX1 - GLint dstY1 - GLbitfield mask - GLenum filter - - - void glMulticastBufferSubDataNV - GLbitfield gpuMask - GLuint buffer - GLintptr offset - GLsizeiptr size - const void *data - - - void glMulticastCopyBufferSubDataNV - GLuint readGpu - GLbitfield writeGpuMask - GLuint readBuffer - GLuint writeBuffer - GLintptr readOffset - GLintptr writeOffset - GLsizeiptr size - - - void glMulticastCopyImageSubDataNV - GLuint srcGpu - GLbitfield dstGpuMask - GLuint srcName - GLenum srcTarget - GLint srcLevel - GLint srcX - GLint srcY - GLint srcZ - GLuint dstName - GLenum dstTarget - GLint dstLevel - GLint dstX - GLint dstY - GLint dstZ - GLsizei srcWidth - GLsizei srcHeight - GLsizei srcDepth - - - void glMulticastFramebufferSampleLocationsfvNV - GLuint gpu - GLuint framebuffer - GLuint start - GLsizei count - const GLfloat *v - - - void glMulticastGetQueryObjecti64vNV - GLuint gpu - GLuint id - GLenum pname - GLint64 *params - - - void glMulticastGetQueryObjectivNV - GLuint gpu - GLuint id - GLenum pname - GLint *params - - - void glMulticastGetQueryObjectui64vNV - GLuint gpu - GLuint id - GLenum pname - GLuint64 *params - - - void glMulticastGetQueryObjectuivNV - GLuint gpu - GLuint id - GLenum pname - GLuint *params - - - void glMulticastScissorArrayvNVX - GLuint gpu - GLuint first - GLsizei count - const GLint *v - - - void glMulticastViewportArrayvNVX - GLuint gpu - GLuint first - GLsizei count - const GLfloat *v - - - void glMulticastViewportPositionWScaleNVX - GLuint gpu - GLuint index - GLfloat xcoeff - GLfloat ycoeff - - - void glMulticastWaitSyncNV - GLuint signalGpu - GLbitfield waitGpuMask - - - void glNamedBufferAttachMemoryNV - GLuint buffer - GLuint memory - GLuint64 offset - - - void glNamedBufferData - GLuint buffer - GLsizeiptr size - const void *data - GLenum usage - - - void glNamedBufferDataEXT - GLuint buffer - GLsizeiptr size - const void *data - GLenum usage - - - void glNamedBufferPageCommitmentARB - GLuint buffer - GLintptr offset - GLsizeiptr size - GLboolean commit - - - void glNamedBufferPageCommitmentEXT - GLuint buffer - GLintptr offset - GLsizeiptr size - GLboolean commit - - - void glNamedBufferPageCommitmentMemNV - GLuint buffer - GLintptr offset - GLsizeiptr size - GLuint memory - GLuint64 memOffset - GLboolean commit - - - void glNamedBufferStorage - GLuint buffer - GLsizeiptr size - const void *data - GLbitfield flags - - - void glNamedBufferStorageExternalEXT - GLuint buffer - GLintptr offset - GLsizeiptr size - GLeglClientBufferEXT clientBuffer - GLbitfield flags - - - void glNamedBufferStorageEXT - GLuint buffer - GLsizeiptr size - const void *data - GLbitfield flags - - - - void glNamedBufferStorageMemEXT - GLuint buffer - GLsizeiptr size - GLuint memory - GLuint64 offset - - - void glNamedBufferSubData - GLuint buffer - GLintptr offset - GLsizeiptr size - const void *data - - - void glNamedBufferSubDataEXT - GLuint buffer - GLintptr offset - GLsizeiptr size - const void *data - - - - void glNamedCopyBufferSubDataEXT - GLuint readBuffer - GLuint writeBuffer - GLintptr readOffset - GLintptr writeOffset - GLsizeiptr size - - - void glNamedFramebufferDrawBuffer - GLuint framebuffer - GLenum buf - - - void glNamedFramebufferDrawBuffers - GLuint framebuffer - GLsizei n - const GLenum *bufs - - - void glNamedFramebufferParameteri - GLuint framebuffer - GLenum pname - GLint param - - - void glNamedFramebufferParameteriEXT - GLuint framebuffer - GLenum pname - GLint param - - - void glNamedFramebufferReadBuffer - GLuint framebuffer - GLenum src - - - void glNamedFramebufferRenderbuffer - GLuint framebuffer - GLenum attachment - GLenum renderbuffertarget - GLuint renderbuffer - - - void glNamedFramebufferRenderbufferEXT - GLuint framebuffer - GLenum attachment - GLenum renderbuffertarget - GLuint renderbuffer - - - void glNamedFramebufferSampleLocationsfvARB - GLuint framebuffer - GLuint start - GLsizei count - const GLfloat *v - - - void glNamedFramebufferSampleLocationsfvNV - GLuint framebuffer - GLuint start - GLsizei count - const GLfloat *v - - - void glNamedFramebufferTexture - GLuint framebuffer - GLenum attachment - GLuint texture - GLint level - - - void glNamedFramebufferSamplePositionsfvAMD - GLuint framebuffer - GLuint numsamples - GLuint pixelindex - const GLfloat *values - - - void glNamedFramebufferTexture1DEXT - GLuint framebuffer - GLenum attachment - GLenum textarget - GLuint texture - GLint level - - - void glNamedFramebufferTexture2DEXT - GLuint framebuffer - GLenum attachment - GLenum textarget - GLuint texture - GLint level - - - void glNamedFramebufferTexture3DEXT - GLuint framebuffer - GLenum attachment - GLenum textarget - GLuint texture - GLint level - GLint zoffset - - - void glNamedFramebufferTextureEXT - GLuint framebuffer - GLenum attachment - GLuint texture - GLint level - - - void glNamedFramebufferTextureFaceEXT - GLuint framebuffer - GLenum attachment - GLuint texture - GLint level - GLenum face - - - void glNamedFramebufferTextureLayer - GLuint framebuffer - GLenum attachment - GLuint texture - GLint level - GLint layer - - - void glNamedFramebufferTextureLayerEXT - GLuint framebuffer - GLenum attachment - GLuint texture - GLint level - GLint layer - - - void glNamedFramebufferTextureMultiviewOVR - GLuint framebuffer - GLenum attachment - GLuint texture - GLint level - GLint baseViewIndex - GLsizei numViews - - - void glNamedProgramLocalParameter4dEXT - GLuint program - GLenum target - GLuint index - GLdouble x - GLdouble y - GLdouble z - GLdouble w - - - - void glNamedProgramLocalParameter4dvEXT - GLuint program - GLenum target - GLuint index - const GLdouble *params - - - void glNamedProgramLocalParameter4fEXT - GLuint program - GLenum target - GLuint index - GLfloat x - GLfloat y - GLfloat z - GLfloat w - - - - void glNamedProgramLocalParameter4fvEXT - GLuint program - GLenum target - GLuint index - const GLfloat *params - - - void glNamedProgramLocalParameterI4iEXT - GLuint program - GLenum target - GLuint index - GLint x - GLint y - GLint z - GLint w - - - - void glNamedProgramLocalParameterI4ivEXT - GLuint program - GLenum target - GLuint index - const GLint *params - - - void glNamedProgramLocalParameterI4uiEXT - GLuint program - GLenum target - GLuint index - GLuint x - GLuint y - GLuint z - GLuint w - - - - void glNamedProgramLocalParameterI4uivEXT - GLuint program - GLenum target - GLuint index - const GLuint *params - - - void glNamedProgramLocalParameters4fvEXT - GLuint program - GLenum target - GLuint index - GLsizei count - const GLfloat *params - - - void glNamedProgramLocalParametersI4ivEXT - GLuint program - GLenum target - GLuint index - GLsizei count - const GLint *params - - - void glNamedProgramLocalParametersI4uivEXT - GLuint program - GLenum target - GLuint index - GLsizei count - const GLuint *params - - - void glNamedProgramStringEXT - GLuint program - GLenum target - GLenum format - GLsizei len - const void *string - - - void glNamedRenderbufferStorage - GLuint renderbuffer - GLenum internalformat - GLsizei width - GLsizei height - - - void glNamedRenderbufferStorageEXT - GLuint renderbuffer - GLenum internalformat - GLsizei width - GLsizei height - - - void glNamedRenderbufferStorageMultisample - GLuint renderbuffer - GLsizei samples - GLenum internalformat - GLsizei width - GLsizei height - - - void glNamedRenderbufferStorageMultisampleAdvancedAMD - GLuint renderbuffer - GLsizei samples - GLsizei storageSamples - GLenum internalformat - GLsizei width - GLsizei height - - - void glNamedRenderbufferStorageMultisampleCoverageEXT - GLuint renderbuffer - GLsizei coverageSamples - GLsizei colorSamples - GLenum internalformat - GLsizei width - GLsizei height - - - void glNamedRenderbufferStorageMultisampleEXT - GLuint renderbuffer - GLsizei samples - GLenum internalformat - GLsizei width - GLsizei height - - - void glNamedStringARB - GLenum type - GLint namelen - const GLchar *name - GLint stringlen - const GLchar *string - - - void glNewList - GLuint list - GLenum mode - - - - GLuint glNewObjectBufferATI - GLsizei size - const void *pointer - GLenum usage - - - void glNormal3b - GLbyte nx - GLbyte ny - GLbyte nz - - - - void glNormal3bv - const GLbyte *v - - - - void glNormal3d - GLdouble nx - GLdouble ny - GLdouble nz - - - - void glNormal3dv - const GLdouble *v - - - - void glNormal3f - GLfloat nx - GLfloat ny - GLfloat nz - - - - void glNormal3fVertex3fSUN - GLfloat nx - GLfloat ny - GLfloat nz - GLfloat x - GLfloat y - GLfloat z - - - void glNormal3fVertex3fvSUN - const GLfloat *n - const GLfloat *v - - - void glNormal3fv - const GLfloat *v - - - - void glNormal3hNV - GLhalfNV nx - GLhalfNV ny - GLhalfNV nz - - - - void glNormal3hvNV - const GLhalfNV *v - - - - void glNormal3i - GLint nx - GLint ny - GLint nz - - - - void glNormal3iv - const GLint *v - - - - void glNormal3s - GLshort nx - GLshort ny - GLshort nz - - - - void glNormal3sv - const GLshort *v - - - - void glNormal3x - GLfixed nx - GLfixed ny - GLfixed nz - - - void glNormal3xOES - GLfixed nx - GLfixed ny - GLfixed nz - - - void glNormal3xvOES - const GLfixed *coords - - - void glNormalFormatNV - GLenum type - GLsizei stride - - - void glNormalP3ui - GLenum type - GLuint coords - - - void glNormalP3uiv - GLenum type - const GLuint *coords - - - void glNormalPointer - GLenum type - GLsizei stride - const void *pointer - - - void glNormalPointerEXT - GLenum type - GLsizei stride - GLsizei count - const void *pointer - - - void glNormalPointerListIBM - GLenum type - GLint stride - const void **pointer - GLint ptrstride - - - void glNormalPointervINTEL - GLenum type - const void **pointer - - - void glNormalStream3bATI - GLenum stream - GLbyte nx - GLbyte ny - GLbyte nz - - - void glNormalStream3bvATI - GLenum stream - const GLbyte *coords - - - void glNormalStream3dATI - GLenum stream - GLdouble nx - GLdouble ny - GLdouble nz - - - void glNormalStream3dvATI - GLenum stream - const GLdouble *coords - - - void glNormalStream3fATI - GLenum stream - GLfloat nx - GLfloat ny - GLfloat nz - - - void glNormalStream3fvATI - GLenum stream - const GLfloat *coords - - - void glNormalStream3iATI - GLenum stream - GLint nx - GLint ny - GLint nz - - - void glNormalStream3ivATI - GLenum stream - const GLint *coords - - - void glNormalStream3sATI - GLenum stream - GLshort nx - GLshort ny - GLshort nz - - - void glNormalStream3svATI - GLenum stream - const GLshort *coords - - - void glObjectLabel - GLenum identifier - GLuint name - GLsizei length - const GLchar *label - - - void glObjectLabelKHR - GLenum identifier - GLuint name - GLsizei length - const GLchar *label - - - - void glObjectPtrLabel - const void *ptr - GLsizei length - const GLchar *label - - - void glObjectPtrLabelKHR - const void *ptr - GLsizei length - const GLchar *label - - - - GLenum glObjectPurgeableAPPLE - GLenum objectType - GLuint name - GLenum option - - - GLenum glObjectUnpurgeableAPPLE - GLenum objectType - GLuint name - GLenum option - - - void glOrtho - GLdouble left - GLdouble right - GLdouble bottom - GLdouble top - GLdouble zNear - GLdouble zFar - - - - void glOrthof - GLfloat l - GLfloat r - GLfloat b - GLfloat t - GLfloat n - GLfloat f - - - void glOrthofOES - GLfloat l - GLfloat r - GLfloat b - GLfloat t - GLfloat n - GLfloat f - - - - void glOrthox - GLfixed l - GLfixed r - GLfixed b - GLfixed t - GLfixed n - GLfixed f - - - void glOrthoxOES - GLfixed l - GLfixed r - GLfixed b - GLfixed t - GLfixed n - GLfixed f - - - void glPNTrianglesfATI - GLenum pname - GLfloat param - - - void glPNTrianglesiATI - GLenum pname - GLint param - - - void glPassTexCoordATI - GLuint dst - GLuint coord - GLenum swizzle - - - void glPassThrough - GLfloat token - - - - void glPassThroughxOES - GLfixed token - - - void glPatchParameterfv - GLenum pname - const GLfloat *values - - - void glPatchParameteri - GLenum pname - GLint value - - - void glPatchParameteriEXT - GLenum pname - GLint value - - - - void glPatchParameteriOES - GLenum pname - GLint value - - - - void glPathColorGenNV - GLenum color - GLenum genMode - GLenum colorFormat - const GLfloat *coeffs - - - void glPathCommandsNV - GLuint path - GLsizei numCommands - const GLubyte *commands - GLsizei numCoords - GLenum coordType - const void *coords - - - void glPathCoordsNV - GLuint path - GLsizei numCoords - GLenum coordType - const void *coords - - - void glPathCoverDepthFuncNV - GLenum func - - - void glPathDashArrayNV - GLuint path - GLsizei dashCount - const GLfloat *dashArray - - - void glPathFogGenNV - GLenum genMode - - - GLenum glPathGlyphIndexArrayNV - GLuint firstPathName - GLenum fontTarget - const void *fontName - GLbitfield fontStyle - GLuint firstGlyphIndex - GLsizei numGlyphs - GLuint pathParameterTemplate - GLfloat emScale - - - GLenum glPathGlyphIndexRangeNV - GLenum fontTarget - const void *fontName - GLbitfield fontStyle - GLuint pathParameterTemplate - GLfloat emScale - GLuint *baseAndCount - - - void glPathGlyphRangeNV - GLuint firstPathName - GLenum fontTarget - const void *fontName - GLbitfield fontStyle - GLuint firstGlyph - GLsizei numGlyphs - GLenum handleMissingGlyphs - GLuint pathParameterTemplate - GLfloat emScale - - - void glPathGlyphsNV - GLuint firstPathName - GLenum fontTarget - const void *fontName - GLbitfield fontStyle - GLsizei numGlyphs - GLenum type - const void *charcodes - GLenum handleMissingGlyphs - GLuint pathParameterTemplate - GLfloat emScale - - - GLenum glPathMemoryGlyphIndexArrayNV - GLuint firstPathName - GLenum fontTarget - GLsizeiptr fontSize - const void *fontData - GLsizei faceIndex - GLuint firstGlyphIndex - GLsizei numGlyphs - GLuint pathParameterTemplate - GLfloat emScale - - - void glPathParameterfNV - GLuint path - GLenum pname - GLfloat value - - - void glPathParameterfvNV - GLuint path - GLenum pname - const GLfloat *value - - - void glPathParameteriNV - GLuint path - GLenum pname - GLint value - - - void glPathParameterivNV - GLuint path - GLenum pname - const GLint *value - - - void glPathStencilDepthOffsetNV - GLfloat factor - GLfloat units - - - void glPathStencilFuncNV - GLenum func - GLint ref - GLuint mask - - - void glPathStringNV - GLuint path - GLenum format - GLsizei length - const void *pathString - - - void glPathSubCommandsNV - GLuint path - GLsizei commandStart - GLsizei commandsToDelete - GLsizei numCommands - const GLubyte *commands - GLsizei numCoords - GLenum coordType - const void *coords - - - void glPathSubCoordsNV - GLuint path - GLsizei coordStart - GLsizei numCoords - GLenum coordType - const void *coords - - - void glPathTexGenNV - GLenum texCoordSet - GLenum genMode - GLint components - const GLfloat *coeffs - - - void glPauseTransformFeedback - - - void glPauseTransformFeedbackNV - - - - void glPixelDataRangeNV - GLenum target - GLsizei length - const void *pointer - - - void glPixelMapfv - GLenum map - GLsizei mapsize - const GLfloat *values - - - - - void glPixelMapuiv - GLenum map - GLsizei mapsize - const GLuint *values - - - - - void glPixelMapusv - GLenum map - GLsizei mapsize - const GLushort *values - - - - - void glPixelMapx - GLenum map - GLint size - const GLfixed *values - - - void glPixelStoref - GLenum pname - GLfloat param - - - - void glPixelStorei - GLenum pname - GLint param - - - - void glPixelStorex - GLenum pname - GLfixed param - - - void glPixelTexGenParameterfSGIS - GLenum pname - GLfloat param - - - void glPixelTexGenParameterfvSGIS - GLenum pname - const GLfloat *params - - - void glPixelTexGenParameteriSGIS - GLenum pname - GLint param - - - void glPixelTexGenParameterivSGIS - GLenum pname - const GLint *params - - - void glPixelTexGenSGIX - GLenum mode - - - - void glPixelTransferf - GLenum pname - GLfloat param - - - - void glPixelTransferi - GLenum pname - GLint param - - - - void glPixelTransferxOES - GLenum pname - GLfixed param - - - void glPixelTransformParameterfEXT - GLenum target - GLenum pname - GLfloat param - - - - void glPixelTransformParameterfvEXT - GLenum target - GLenum pname - const GLfloat *params - - - void glPixelTransformParameteriEXT - GLenum target - GLenum pname - GLint param - - - - void glPixelTransformParameterivEXT - GLenum target - GLenum pname - const GLint *params - - - void glPixelZoom - GLfloat xfactor - GLfloat yfactor - - - - void glPixelZoomxOES - GLfixed xfactor - GLfixed yfactor - - - GLboolean glPointAlongPathNV - GLuint path - GLsizei startSegment - GLsizei numSegments - GLfloat distance - GLfloat *x - GLfloat *y - GLfloat *tangentX - GLfloat *tangentY - - - void glPointParameterf - GLenum pname - GLfloat param - - - - void glPointParameterfARB - GLenum pname - GLfloat param - - - - - void glPointParameterfEXT - GLenum pname - GLfloat param - - - - void glPointParameterfSGIS - GLenum pname - GLfloat param - - - - void glPointParameterfv - GLenum pname - const GLfloat *params - - - - void glPointParameterfvARB - GLenum pname - const GLfloat *params - - - - - void glPointParameterfvEXT - GLenum pname - const GLfloat *params - - - - void glPointParameterfvSGIS - GLenum pname - const GLfloat *params - - - - void glPointParameteri - GLenum pname - GLint param - - - - void glPointParameteriNV - GLenum pname - GLint param - - - - - void glPointParameteriv - GLenum pname - const GLint *params - - - - void glPointParameterivNV - GLenum pname - const GLint *params - - - - - void glPointParameterx - GLenum pname - GLfixed param - - - void glPointParameterxOES - GLenum pname - GLfixed param - - - void glPointParameterxv - GLenum pname - const GLfixed *params - - - void glPointParameterxvOES - GLenum pname - const GLfixed *params - - - void glPointSize - GLfloat size - - - - void glPointSizePointerOES - GLenum type - GLsizei stride - const void *pointer - - - void glPointSizex - GLfixed size - - - void glPointSizexOES - GLfixed size - - - GLint glPollAsyncSGIX - GLuint *markerp - - - GLint glPollInstrumentsSGIX - GLint *marker_p - - - - void glPolygonMode - GLenum face - GLenum mode - - - - void glPolygonModeNV - GLenum face - GLenum mode - - - - void glPolygonOffset - GLfloat factor - GLfloat units - - - - void glPolygonOffsetClamp - GLfloat factor - GLfloat units - GLfloat clamp - - - - void glPolygonOffsetClampEXT - GLfloat factor - GLfloat units - GLfloat clamp - - - - void glPolygonOffsetEXT - GLfloat factor - GLfloat bias - - - - void glPolygonOffsetx - GLfixed factor - GLfixed units - - - void glPolygonOffsetxOES - GLfixed factor - GLfixed units - - - void glPolygonStipple - const GLubyte *mask - - - - - void glPopAttrib - - - - void glPopClientAttrib - - - void glPopDebugGroup - - - void glPopDebugGroupKHR - - - - void glPopGroupMarkerEXT - - - void glPopMatrix - - - - void glPopName - - - - void glPresentFrameDualFillNV - GLuint video_slot - GLuint64EXT minPresentTime - GLuint beginPresentTimeId - GLuint presentDurationId - GLenum type - GLenum target0 - GLuint fill0 - GLenum target1 - GLuint fill1 - GLenum target2 - GLuint fill2 - GLenum target3 - GLuint fill3 - - - void glPresentFrameKeyedNV - GLuint video_slot - GLuint64EXT minPresentTime - GLuint beginPresentTimeId - GLuint presentDurationId - GLenum type - GLenum target0 - GLuint fill0 - GLuint key0 - GLenum target1 - GLuint fill1 - GLuint key1 - - - void glPrimitiveBoundingBox - GLfloat minX - GLfloat minY - GLfloat minZ - GLfloat minW - GLfloat maxX - GLfloat maxY - GLfloat maxZ - GLfloat maxW - - - void glPrimitiveBoundingBoxARB - GLfloat minX - GLfloat minY - GLfloat minZ - GLfloat minW - GLfloat maxX - GLfloat maxY - GLfloat maxZ - GLfloat maxW - - - - void glPrimitiveBoundingBoxEXT - GLfloat minX - GLfloat minY - GLfloat minZ - GLfloat minW - GLfloat maxX - GLfloat maxY - GLfloat maxZ - GLfloat maxW - - - - void glPrimitiveBoundingBoxOES - GLfloat minX - GLfloat minY - GLfloat minZ - GLfloat minW - GLfloat maxX - GLfloat maxY - GLfloat maxZ - GLfloat maxW - - - - void glPrimitiveRestartIndex - GLuint index - - - void glPrimitiveRestartIndexNV - GLuint index - - - - void glPrimitiveRestartNV - - - - void glPrioritizeTextures - GLsizei n - const GLuint *textures - const GLfloat *priorities - - - - void glPrioritizeTexturesEXT - GLsizei n - const GLuint *textures - const GLclampf *priorities - - - - - void glPrioritizeTexturesxOES - GLsizei n - const GLuint *textures - const GLfixed *priorities - - - void glProgramBinary - GLuint program - GLenum binaryFormat - const void *binary - GLsizei length - - - void glProgramBinaryOES - GLuint program - GLenum binaryFormat - const void *binary - GLint length - - - - void glProgramBufferParametersIivNV - GLenum target - GLuint bindingIndex - GLuint wordIndex - GLsizei count - const GLint *params - - - void glProgramBufferParametersIuivNV - GLenum target - GLuint bindingIndex - GLuint wordIndex - GLsizei count - const GLuint *params - - - void glProgramBufferParametersfvNV - GLenum target - GLuint bindingIndex - GLuint wordIndex - GLsizei count - const GLfloat *params - - - void glProgramEnvParameter4dARB - GLenum target - GLuint index - GLdouble x - GLdouble y - GLdouble z - GLdouble w - - - - void glProgramEnvParameter4dvARB - GLenum target - GLuint index - const GLdouble *params - - - void glProgramEnvParameter4fARB - GLenum target - GLuint index - GLfloat x - GLfloat y - GLfloat z - GLfloat w - - - - void glProgramEnvParameter4fvARB - GLenum target - GLuint index - const GLfloat *params - - - void glProgramEnvParameterI4iNV - GLenum target - GLuint index - GLint x - GLint y - GLint z - GLint w - - - - void glProgramEnvParameterI4ivNV - GLenum target - GLuint index - const GLint *params - - - void glProgramEnvParameterI4uiNV - GLenum target - GLuint index - GLuint x - GLuint y - GLuint z - GLuint w - - - - void glProgramEnvParameterI4uivNV - GLenum target - GLuint index - const GLuint *params - - - void glProgramEnvParameters4fvEXT - GLenum target - GLuint index - GLsizei count - const GLfloat *params - - - - void glProgramEnvParametersI4ivNV - GLenum target - GLuint index - GLsizei count - const GLint *params - - - void glProgramEnvParametersI4uivNV - GLenum target - GLuint index - GLsizei count - const GLuint *params - - - void glProgramLocalParameter4dARB - GLenum target - GLuint index - GLdouble x - GLdouble y - GLdouble z - GLdouble w - - - - void glProgramLocalParameter4dvARB - GLenum target - GLuint index - const GLdouble *params - - - void glProgramLocalParameter4fARB - GLenum target - GLuint index - GLfloat x - GLfloat y - GLfloat z - GLfloat w - - - - void glProgramLocalParameter4fvARB - GLenum target - GLuint index - const GLfloat *params - - - void glProgramLocalParameterI4iNV - GLenum target - GLuint index - GLint x - GLint y - GLint z - GLint w - - - - void glProgramLocalParameterI4ivNV - GLenum target - GLuint index - const GLint *params - - - void glProgramLocalParameterI4uiNV - GLenum target - GLuint index - GLuint x - GLuint y - GLuint z - GLuint w - - - - void glProgramLocalParameterI4uivNV - GLenum target - GLuint index - const GLuint *params - - - void glProgramLocalParameters4fvEXT - GLenum target - GLuint index - GLsizei count - const GLfloat *params - - - - void glProgramLocalParametersI4ivNV - GLenum target - GLuint index - GLsizei count - const GLint *params - - - void glProgramLocalParametersI4uivNV - GLenum target - GLuint index - GLsizei count - const GLuint *params - - - void glProgramNamedParameter4dNV - GLuint id - GLsizei len - const GLubyte *name - GLdouble x - GLdouble y - GLdouble z - GLdouble w - - - - void glProgramNamedParameter4dvNV - GLuint id - GLsizei len - const GLubyte *name - const GLdouble *v - - - - void glProgramNamedParameter4fNV - GLuint id - GLsizei len - const GLubyte *name - GLfloat x - GLfloat y - GLfloat z - GLfloat w - - - - void glProgramNamedParameter4fvNV - GLuint id - GLsizei len - const GLubyte *name - const GLfloat *v - - - - void glProgramParameter4dNV - GLenum target - GLuint index - GLdouble x - GLdouble y - GLdouble z - GLdouble w - - - - void glProgramParameter4dvNV - GLenum target - GLuint index - const GLdouble *v - - - - void glProgramParameter4fNV - GLenum target - GLuint index - GLfloat x - GLfloat y - GLfloat z - GLfloat w - - - - void glProgramParameter4fvNV - GLenum target - GLuint index - const GLfloat *v - - - - void glProgramParameteri - GLuint program - GLenum pname - GLint value - - - void glProgramParameteriARB - GLuint program - GLenum pname - GLint value - - - - void glProgramParameteriEXT - GLuint program - GLenum pname - GLint value - - - - void glProgramParameters4dvNV - GLenum target - GLuint index - GLsizei count - const GLdouble *v - - - - void glProgramParameters4fvNV - GLenum target - GLuint index - GLsizei count - const GLfloat *v - - - - void glProgramPathFragmentInputGenNV - GLuint program - GLint location - GLenum genMode - GLint components - const GLfloat *coeffs - - - void glProgramStringARB - GLenum target - GLenum format - GLsizei len - const void *string - - - void glProgramSubroutineParametersuivNV - GLenum target - GLsizei count - const GLuint *params - - - void glProgramUniform1d - GLuint program - GLint location - GLdouble v0 - - - void glProgramUniform1dEXT - GLuint program - GLint location - GLdouble x - - - void glProgramUniform1dv - GLuint program - GLint location - GLsizei count - const GLdouble *value - - - void glProgramUniform1dvEXT - GLuint program - GLint location - GLsizei count - const GLdouble *value - - - void glProgramUniform1f - GLuint program - GLint location - GLfloat v0 - - - void glProgramUniform1fEXT - GLuint program - GLint location - GLfloat v0 - - - - void glProgramUniform1fv - GLuint program - GLint location - GLsizei count - const GLfloat *value - - - void glProgramUniform1fvEXT - GLuint program - GLint location - GLsizei count - const GLfloat *value - - - - void glProgramUniform1i - GLuint program - GLint location - GLint v0 - - - void glProgramUniform1i64ARB - GLuint program - GLint location - GLint64 x - - - void glProgramUniform1i64NV - GLuint program - GLint location - GLint64EXT x - - - void glProgramUniform1i64vARB - GLuint program - GLint location - GLsizei count - const GLint64 *value - - - void glProgramUniform1i64vNV - GLuint program - GLint location - GLsizei count - const GLint64EXT *value - - - void glProgramUniform1iEXT - GLuint program - GLint location - GLint v0 - - - - void glProgramUniform1iv - GLuint program - GLint location - GLsizei count - const GLint *value - - - void glProgramUniform1ivEXT - GLuint program - GLint location - GLsizei count - const GLint *value - - - - void glProgramUniform1ui - GLuint program - GLint location - GLuint v0 - - - void glProgramUniform1ui64ARB - GLuint program - GLint location - GLuint64 x - - - void glProgramUniform1ui64NV - GLuint program - GLint location - GLuint64EXT x - - - void glProgramUniform1ui64vARB - GLuint program - GLint location - GLsizei count - const GLuint64 *value - - - void glProgramUniform1ui64vNV - GLuint program - GLint location - GLsizei count - const GLuint64EXT *value - - - void glProgramUniform1uiEXT - GLuint program - GLint location - GLuint v0 - - - - void glProgramUniform1uiv - GLuint program - GLint location - GLsizei count - const GLuint *value - - - void glProgramUniform1uivEXT - GLuint program - GLint location - GLsizei count - const GLuint *value - - - - void glProgramUniform2d - GLuint program - GLint location - GLdouble v0 - GLdouble v1 - - - void glProgramUniform2dEXT - GLuint program - GLint location - GLdouble x - GLdouble y - - - void glProgramUniform2dv - GLuint program - GLint location - GLsizei count - const GLdouble *value - - - void glProgramUniform2dvEXT - GLuint program - GLint location - GLsizei count - const GLdouble *value - - - void glProgramUniform2f - GLuint program - GLint location - GLfloat v0 - GLfloat v1 - - - void glProgramUniform2fEXT - GLuint program - GLint location - GLfloat v0 - GLfloat v1 - - - - void glProgramUniform2fv - GLuint program - GLint location - GLsizei count - const GLfloat *value - - - void glProgramUniform2fvEXT - GLuint program - GLint location - GLsizei count - const GLfloat *value - - - - void glProgramUniform2i - GLuint program - GLint location - GLint v0 - GLint v1 - - - void glProgramUniform2i64ARB - GLuint program - GLint location - GLint64 x - GLint64 y - - - void glProgramUniform2i64NV - GLuint program - GLint location - GLint64EXT x - GLint64EXT y - - - void glProgramUniform2i64vARB - GLuint program - GLint location - GLsizei count - const GLint64 *value - - - void glProgramUniform2i64vNV - GLuint program - GLint location - GLsizei count - const GLint64EXT *value - - - void glProgramUniform2iEXT - GLuint program - GLint location - GLint v0 - GLint v1 - - - - void glProgramUniform2iv - GLuint program - GLint location - GLsizei count - const GLint *value - - - void glProgramUniform2ivEXT - GLuint program - GLint location - GLsizei count - const GLint *value - - - - void glProgramUniform2ui - GLuint program - GLint location - GLuint v0 - GLuint v1 - - - void glProgramUniform2ui64ARB - GLuint program - GLint location - GLuint64 x - GLuint64 y - - - void glProgramUniform2ui64NV - GLuint program - GLint location - GLuint64EXT x - GLuint64EXT y - - - void glProgramUniform2ui64vARB - GLuint program - GLint location - GLsizei count - const GLuint64 *value - - - void glProgramUniform2ui64vNV - GLuint program - GLint location - GLsizei count - const GLuint64EXT *value - - - void glProgramUniform2uiEXT - GLuint program - GLint location - GLuint v0 - GLuint v1 - - - - void glProgramUniform2uiv - GLuint program - GLint location - GLsizei count - const GLuint *value - - - void glProgramUniform2uivEXT - GLuint program - GLint location - GLsizei count - const GLuint *value - - - - void glProgramUniform3d - GLuint program - GLint location - GLdouble v0 - GLdouble v1 - GLdouble v2 - - - void glProgramUniform3dEXT - GLuint program - GLint location - GLdouble x - GLdouble y - GLdouble z - - - void glProgramUniform3dv - GLuint program - GLint location - GLsizei count - const GLdouble *value - - - void glProgramUniform3dvEXT - GLuint program - GLint location - GLsizei count - const GLdouble *value - - - void glProgramUniform3f - GLuint program - GLint location - GLfloat v0 - GLfloat v1 - GLfloat v2 - - - void glProgramUniform3fEXT - GLuint program - GLint location - GLfloat v0 - GLfloat v1 - GLfloat v2 - - - - void glProgramUniform3fv - GLuint program - GLint location - GLsizei count - const GLfloat *value - - - void glProgramUniform3fvEXT - GLuint program - GLint location - GLsizei count - const GLfloat *value - - - - void glProgramUniform3i - GLuint program - GLint location - GLint v0 - GLint v1 - GLint v2 - - - void glProgramUniform3i64ARB - GLuint program - GLint location - GLint64 x - GLint64 y - GLint64 z - - - void glProgramUniform3i64NV - GLuint program - GLint location - GLint64EXT x - GLint64EXT y - GLint64EXT z - - - void glProgramUniform3i64vARB - GLuint program - GLint location - GLsizei count - const GLint64 *value - - - void glProgramUniform3i64vNV - GLuint program - GLint location - GLsizei count - const GLint64EXT *value - - - void glProgramUniform3iEXT - GLuint program - GLint location - GLint v0 - GLint v1 - GLint v2 - - - - void glProgramUniform3iv - GLuint program - GLint location - GLsizei count - const GLint *value - - - void glProgramUniform3ivEXT - GLuint program - GLint location - GLsizei count - const GLint *value - - - - void glProgramUniform3ui - GLuint program - GLint location - GLuint v0 - GLuint v1 - GLuint v2 - - - void glProgramUniform3ui64ARB - GLuint program - GLint location - GLuint64 x - GLuint64 y - GLuint64 z - - - void glProgramUniform3ui64NV - GLuint program - GLint location - GLuint64EXT x - GLuint64EXT y - GLuint64EXT z - - - void glProgramUniform3ui64vARB - GLuint program - GLint location - GLsizei count - const GLuint64 *value - - - void glProgramUniform3ui64vNV - GLuint program - GLint location - GLsizei count - const GLuint64EXT *value - - - void glProgramUniform3uiEXT - GLuint program - GLint location - GLuint v0 - GLuint v1 - GLuint v2 - - - - void glProgramUniform3uiv - GLuint program - GLint location - GLsizei count - const GLuint *value - - - void glProgramUniform3uivEXT - GLuint program - GLint location - GLsizei count - const GLuint *value - - - - void glProgramUniform4d - GLuint program - GLint location - GLdouble v0 - GLdouble v1 - GLdouble v2 - GLdouble v3 - - - void glProgramUniform4dEXT - GLuint program - GLint location - GLdouble x - GLdouble y - GLdouble z - GLdouble w - - - void glProgramUniform4dv - GLuint program - GLint location - GLsizei count - const GLdouble *value - - - void glProgramUniform4dvEXT - GLuint program - GLint location - GLsizei count - const GLdouble *value - - - void glProgramUniform4f - GLuint program - GLint location - GLfloat v0 - GLfloat v1 - GLfloat v2 - GLfloat v3 - - - void glProgramUniform4fEXT - GLuint program - GLint location - GLfloat v0 - GLfloat v1 - GLfloat v2 - GLfloat v3 - - - - void glProgramUniform4fv - GLuint program - GLint location - GLsizei count - const GLfloat *value - - - void glProgramUniform4fvEXT - GLuint program - GLint location - GLsizei count - const GLfloat *value - - - - void glProgramUniform4i - GLuint program - GLint location - GLint v0 - GLint v1 - GLint v2 - GLint v3 - - - void glProgramUniform4i64ARB - GLuint program - GLint location - GLint64 x - GLint64 y - GLint64 z - GLint64 w - - - void glProgramUniform4i64NV - GLuint program - GLint location - GLint64EXT x - GLint64EXT y - GLint64EXT z - GLint64EXT w - - - void glProgramUniform4i64vARB - GLuint program - GLint location - GLsizei count - const GLint64 *value - - - void glProgramUniform4i64vNV - GLuint program - GLint location - GLsizei count - const GLint64EXT *value - - - void glProgramUniform4iEXT - GLuint program - GLint location - GLint v0 - GLint v1 - GLint v2 - GLint v3 - - - - void glProgramUniform4iv - GLuint program - GLint location - GLsizei count - const GLint *value - - - void glProgramUniform4ivEXT - GLuint program - GLint location - GLsizei count - const GLint *value - - - - void glProgramUniform4ui - GLuint program - GLint location - GLuint v0 - GLuint v1 - GLuint v2 - GLuint v3 - - - void glProgramUniform4ui64ARB - GLuint program - GLint location - GLuint64 x - GLuint64 y - GLuint64 z - GLuint64 w - - - void glProgramUniform4ui64NV - GLuint program - GLint location - GLuint64EXT x - GLuint64EXT y - GLuint64EXT z - GLuint64EXT w - - - void glProgramUniform4ui64vARB - GLuint program - GLint location - GLsizei count - const GLuint64 *value - - - void glProgramUniform4ui64vNV - GLuint program - GLint location - GLsizei count - const GLuint64EXT *value - - - void glProgramUniform4uiEXT - GLuint program - GLint location - GLuint v0 - GLuint v1 - GLuint v2 - GLuint v3 - - - - void glProgramUniform4uiv - GLuint program - GLint location - GLsizei count - const GLuint *value - - - void glProgramUniform4uivEXT - GLuint program - GLint location - GLsizei count - const GLuint *value - - - - void glProgramUniformHandleui64ARB - GLuint program - GLint location - GLuint64 value - - - void glProgramUniformHandleui64IMG - GLuint program - GLint location - GLuint64 value - - - - void glProgramUniformHandleui64NV - GLuint program - GLint location - GLuint64 value - - - void glProgramUniformHandleui64vARB - GLuint program - GLint location - GLsizei count - const GLuint64 *values - - - void glProgramUniformHandleui64vIMG - GLuint program - GLint location - GLsizei count - const GLuint64 *values - - - - void glProgramUniformHandleui64vNV - GLuint program - GLint location - GLsizei count - const GLuint64 *values - - - void glProgramUniformMatrix2dv - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLdouble *value - - - void glProgramUniformMatrix2dvEXT - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLdouble *value - - - void glProgramUniformMatrix2fv - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - void glProgramUniformMatrix2fvEXT - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - - void glProgramUniformMatrix2x3dv - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLdouble *value - - - void glProgramUniformMatrix2x3dvEXT - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLdouble *value - - - void glProgramUniformMatrix2x3fv - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - void glProgramUniformMatrix2x3fvEXT - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - - void glProgramUniformMatrix2x4dv - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLdouble *value - - - void glProgramUniformMatrix2x4dvEXT - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLdouble *value - - - void glProgramUniformMatrix2x4fv - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - void glProgramUniformMatrix2x4fvEXT - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - - void glProgramUniformMatrix3dv - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLdouble *value - - - void glProgramUniformMatrix3dvEXT - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLdouble *value - - - void glProgramUniformMatrix3fv - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - void glProgramUniformMatrix3fvEXT - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - - void glProgramUniformMatrix3x2dv - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLdouble *value - - - void glProgramUniformMatrix3x2dvEXT - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLdouble *value - - - void glProgramUniformMatrix3x2fv - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - void glProgramUniformMatrix3x2fvEXT - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - - void glProgramUniformMatrix3x4dv - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLdouble *value - - - void glProgramUniformMatrix3x4dvEXT - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLdouble *value - - - void glProgramUniformMatrix3x4fv - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - void glProgramUniformMatrix3x4fvEXT - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - - void glProgramUniformMatrix4dv - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLdouble *value - - - void glProgramUniformMatrix4dvEXT - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLdouble *value - - - void glProgramUniformMatrix4fv - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - void glProgramUniformMatrix4fvEXT - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - - void glProgramUniformMatrix4x2dv - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLdouble *value - - - void glProgramUniformMatrix4x2dvEXT - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLdouble *value - - - void glProgramUniformMatrix4x2fv - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - void glProgramUniformMatrix4x2fvEXT - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - - void glProgramUniformMatrix4x3dv - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLdouble *value - - - void glProgramUniformMatrix4x3dvEXT - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLdouble *value - - - void glProgramUniformMatrix4x3fv - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - void glProgramUniformMatrix4x3fvEXT - GLuint program - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - - void glProgramUniformui64NV - GLuint program - GLint location - GLuint64EXT value - - - void glProgramUniformui64vNV - GLuint program - GLint location - GLsizei count - const GLuint64EXT *value - - - void glProgramVertexLimitNV - GLenum target - GLint limit - - - void glProvokingVertex - GLenum mode - - - void glProvokingVertexEXT - GLenum mode - - - - void glPushAttrib - GLbitfield mask - - - - void glPushClientAttrib - GLbitfield mask - - - void glPushClientAttribDefaultEXT - GLbitfield mask - - - void glPushDebugGroup - GLenum source - GLuint id - GLsizei length - const GLchar *message - - - void glPushDebugGroupKHR - GLenum source - GLuint id - GLsizei length - const GLchar *message - - - - void glPushGroupMarkerEXT - GLsizei length - const GLchar *marker - - - void glPushMatrix - - - - void glPushName - GLuint name - - - - void glQueryCounter - GLuint id - GLenum target - - - void glQueryCounterEXT - GLuint id - GLenum target - - - - GLbitfield glQueryMatrixxOES - GLfixed *mantissa - GLint *exponent - - - void glQueryObjectParameteruiAMD - GLenum target - GLuint id - GLenum pname - GLuint param - - - GLint glQueryResourceNV - GLenum queryType - GLint tagId - GLuint count - GLint *buffer - - - void glQueryResourceTagNV - GLint tagId - const GLchar *tagString - - - void glRasterPos2d - GLdouble x - GLdouble y - - - - void glRasterPos2dv - const GLdouble *v - - - - void glRasterPos2f - GLfloat x - GLfloat y - - - - void glRasterPos2fv - const GLfloat *v - - - - void glRasterPos2i - GLint x - GLint y - - - - void glRasterPos2iv - const GLint *v - - - - void glRasterPos2s - GLshort x - GLshort y - - - - void glRasterPos2sv - const GLshort *v - - - - void glRasterPos2xOES - GLfixed x - GLfixed y - - - void glRasterPos2xvOES - const GLfixed *coords - - - void glRasterPos3d - GLdouble x - GLdouble y - GLdouble z - - - - void glRasterPos3dv - const GLdouble *v - - - - void glRasterPos3f - GLfloat x - GLfloat y - GLfloat z - - - - void glRasterPos3fv - const GLfloat *v - - - - void glRasterPos3i - GLint x - GLint y - GLint z - - - - void glRasterPos3iv - const GLint *v - - - - void glRasterPos3s - GLshort x - GLshort y - GLshort z - - - - void glRasterPos3sv - const GLshort *v - - - - void glRasterPos3xOES - GLfixed x - GLfixed y - GLfixed z - - - void glRasterPos3xvOES - const GLfixed *coords - - - void glRasterPos4d - GLdouble x - GLdouble y - GLdouble z - GLdouble w - - - - void glRasterPos4dv - const GLdouble *v - - - - void glRasterPos4f - GLfloat x - GLfloat y - GLfloat z - GLfloat w - - - - void glRasterPos4fv - const GLfloat *v - - - - void glRasterPos4i - GLint x - GLint y - GLint z - GLint w - - - - void glRasterPos4iv - const GLint *v - - - - void glRasterPos4s - GLshort x - GLshort y - GLshort z - GLshort w - - - - void glRasterPos4sv - const GLshort *v - - - - void glRasterPos4xOES - GLfixed x - GLfixed y - GLfixed z - GLfixed w - - - void glRasterPos4xvOES - const GLfixed *coords - - - void glRasterSamplesEXT - GLuint samples - GLboolean fixedsamplelocations - - - void glReadBuffer - GLenum src - - - - void glReadBufferIndexedEXT - GLenum src - GLint index - - - void glReadBufferNV - GLenum mode - - - void glReadInstrumentsSGIX - GLint marker - - - - void glReadPixels - GLint x - GLint y - GLsizei width - GLsizei height - GLenum format - GLenum type - void *pixels - - - - - void glReadnPixels - GLint x - GLint y - GLsizei width - GLsizei height - GLenum format - GLenum type - GLsizei bufSize - void *data - - - void glReadnPixelsARB - GLint x - GLint y - GLsizei width - GLsizei height - GLenum format - GLenum type - GLsizei bufSize - void *data - - - - void glReadnPixelsEXT - GLint x - GLint y - GLsizei width - GLsizei height - GLenum format - GLenum type - GLsizei bufSize - void *data - - - - void glReadnPixelsKHR - GLint x - GLint y - GLsizei width - GLsizei height - GLenum format - GLenum type - GLsizei bufSize - void *data - - - - GLboolean glReleaseKeyedMutexWin32EXT - GLuint memory - GLuint64 key - - - void glRectd - GLdouble x1 - GLdouble y1 - GLdouble x2 - GLdouble y2 - - - - void glRectdv - const GLdouble *v1 - const GLdouble *v2 - - - - void glRectf - GLfloat x1 - GLfloat y1 - GLfloat x2 - GLfloat y2 - - - - void glRectfv - const GLfloat *v1 - const GLfloat *v2 - - - - void glRecti - GLint x1 - GLint y1 - GLint x2 - GLint y2 - - - - void glRectiv - const GLint *v1 - const GLint *v2 - - - - void glRects - GLshort x1 - GLshort y1 - GLshort x2 - GLshort y2 - - - - void glRectsv - const GLshort *v1 - const GLshort *v2 - - - - void glRectxOES - GLfixed x1 - GLfixed y1 - GLfixed x2 - GLfixed y2 - - - void glRectxvOES - const GLfixed *v1 - const GLfixed *v2 - - - void glReferencePlaneSGIX - const GLdouble *equation - - - - void glReleaseShaderCompiler - - - void glRenderGpuMaskNV - GLbitfield mask - - - GLint glRenderMode - GLenum mode - - - - void glRenderbufferStorage - GLenum target - GLenum internalformat - GLsizei width - GLsizei height - - - - void glRenderbufferStorageEXT - GLenum target - GLenum internalformat - GLsizei width - GLsizei height - - - - - void glRenderbufferStorageMultisample - GLenum target - GLsizei samples - GLenum internalformat - GLsizei width - GLsizei height - - - - void glRenderbufferStorageMultisampleANGLE - GLenum target - GLsizei samples - GLenum internalformat - GLsizei width - GLsizei height - - - void glRenderbufferStorageMultisampleAPPLE - GLenum target - GLsizei samples - GLenum internalformat - GLsizei width - GLsizei height - - - void glRenderbufferStorageMultisampleAdvancedAMD - GLenum target - GLsizei samples - GLsizei storageSamples - GLenum internalformat - GLsizei width - GLsizei height - - - void glRenderbufferStorageMultisampleCoverageNV - GLenum target - GLsizei coverageSamples - GLsizei colorSamples - GLenum internalformat - GLsizei width - GLsizei height - - - void glRenderbufferStorageMultisampleEXT - GLenum target - GLsizei samples - GLenum internalformat - GLsizei width - GLsizei height - - - - - void glRenderbufferStorageMultisampleIMG - GLenum target - GLsizei samples - GLenum internalformat - GLsizei width - GLsizei height - - - void glRenderbufferStorageMultisampleNV - GLenum target - GLsizei samples - GLenum internalformat - GLsizei width - GLsizei height - - - - void glRenderbufferStorageOES - GLenum target - GLenum internalformat - GLsizei width - GLsizei height - - - void glReplacementCodePointerSUN - GLenum type - GLsizei stride - const void **pointer - - - void glReplacementCodeubSUN - GLubyte code - - - void glReplacementCodeubvSUN - const GLubyte *code - - - void glReplacementCodeuiColor3fVertex3fSUN - GLuint rc - GLfloat r - GLfloat g - GLfloat b - GLfloat x - GLfloat y - GLfloat z - - - void glReplacementCodeuiColor3fVertex3fvSUN - const GLuint *rc - const GLfloat *c - const GLfloat *v - - - void glReplacementCodeuiColor4fNormal3fVertex3fSUN - GLuint rc - GLfloat r - GLfloat g - GLfloat b - GLfloat a - GLfloat nx - GLfloat ny - GLfloat nz - GLfloat x - GLfloat y - GLfloat z - - - void glReplacementCodeuiColor4fNormal3fVertex3fvSUN - const GLuint *rc - const GLfloat *c - const GLfloat *n - const GLfloat *v - - - void glReplacementCodeuiColor4ubVertex3fSUN - GLuint rc - GLubyte r - GLubyte g - GLubyte b - GLubyte a - GLfloat x - GLfloat y - GLfloat z - - - void glReplacementCodeuiColor4ubVertex3fvSUN - const GLuint *rc - const GLubyte *c - const GLfloat *v - - - void glReplacementCodeuiNormal3fVertex3fSUN - GLuint rc - GLfloat nx - GLfloat ny - GLfloat nz - GLfloat x - GLfloat y - GLfloat z - - - void glReplacementCodeuiNormal3fVertex3fvSUN - const GLuint *rc - const GLfloat *n - const GLfloat *v - - - void glReplacementCodeuiSUN - GLuint code - - - void glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN - GLuint rc - GLfloat s - GLfloat t - GLfloat r - GLfloat g - GLfloat b - GLfloat a - GLfloat nx - GLfloat ny - GLfloat nz - GLfloat x - GLfloat y - GLfloat z - - - void glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN - const GLuint *rc - const GLfloat *tc - const GLfloat *c - const GLfloat *n - const GLfloat *v - - - void glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN - GLuint rc - GLfloat s - GLfloat t - GLfloat nx - GLfloat ny - GLfloat nz - GLfloat x - GLfloat y - GLfloat z - - - void glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN - const GLuint *rc - const GLfloat *tc - const GLfloat *n - const GLfloat *v - - - void glReplacementCodeuiTexCoord2fVertex3fSUN - GLuint rc - GLfloat s - GLfloat t - GLfloat x - GLfloat y - GLfloat z - - - void glReplacementCodeuiTexCoord2fVertex3fvSUN - const GLuint *rc - const GLfloat *tc - const GLfloat *v - - - void glReplacementCodeuiVertex3fSUN - GLuint rc - GLfloat x - GLfloat y - GLfloat z - - - void glReplacementCodeuiVertex3fvSUN - const GLuint *rc - const GLfloat *v - - - void glReplacementCodeuivSUN - const GLuint *code - - - void glReplacementCodeusSUN - GLushort code - - - void glReplacementCodeusvSUN - const GLushort *code - - - void glRequestResidentProgramsNV - GLsizei n - const GLuint *programs - - - - void glResetHistogram - GLenum target - - - - void glResetHistogramEXT - GLenum target - - - - - void glResetMemoryObjectParameterNV - GLuint memory - GLenum pname - - - void glResetMinmax - GLenum target - - - - void glResetMinmaxEXT - GLenum target - - - - - void glResizeBuffersMESA - - - void glResolveDepthValuesNV - - - void glResolveMultisampleFramebufferAPPLE - - - void glResumeTransformFeedback - - - void glResumeTransformFeedbackNV - - - - void glRotated - GLdouble angle - GLdouble x - GLdouble y - GLdouble z - - - - void glRotatef - GLfloat angle - GLfloat x - GLfloat y - GLfloat z - - - - void glRotatex - GLfixed angle - GLfixed x - GLfixed y - GLfixed z - - - void glRotatexOES - GLfixed angle - GLfixed x - GLfixed y - GLfixed z - - - void glSampleCoverage - GLfloat value - GLboolean invert - - - - void glSampleCoverageARB - GLfloat value - GLboolean invert - - - - void glSampleCoveragex - GLclampx value - GLboolean invert - - - void glSampleCoveragexOES - GLclampx value - GLboolean invert - - - void glSampleMapATI - GLuint dst - GLuint interp - GLenum swizzle - - - void glSampleMaskEXT - GLclampf value - GLboolean invert - - - void glSampleMaskIndexedNV - GLuint index - GLbitfield mask - - - void glSampleMaskSGIS - GLclampf value - GLboolean invert - - - - - void glSampleMaski - GLuint maskNumber - GLbitfield mask - - - void glSamplePatternEXT - GLenum pattern - - - void glSamplePatternSGIS - GLenum pattern - - - - - void glSamplerParameterIiv - GLuint sampler - GLenum pname - const GLint *param - - - void glSamplerParameterIivEXT - GLuint sampler - GLenum pname - const GLint *param - - - - void glSamplerParameterIivOES - GLuint sampler - GLenum pname - const GLint *param - - - - void glSamplerParameterIuiv - GLuint sampler - GLenum pname - const GLuint *param - - - void glSamplerParameterIuivEXT - GLuint sampler - GLenum pname - const GLuint *param - - - - void glSamplerParameterIuivOES - GLuint sampler - GLenum pname - const GLuint *param - - - - void glSamplerParameterf - GLuint sampler - GLenum pname - GLfloat param - - - void glSamplerParameterfv - GLuint sampler - GLenum pname - const GLfloat *param - - - void glSamplerParameteri - GLuint sampler - GLenum pname - GLint param - - - void glSamplerParameteriv - GLuint sampler - GLenum pname - const GLint *param - - - void glScaled - GLdouble x - GLdouble y - GLdouble z - - - - void glScalef - GLfloat x - GLfloat y - GLfloat z - - - - void glScalex - GLfixed x - GLfixed y - GLfixed z - - - void glScalexOES - GLfixed x - GLfixed y - GLfixed z - - - void glScissor - GLint x - GLint y - GLsizei width - GLsizei height - - - - void glScissorArrayv - GLuint first - GLsizei count - const GLint *v - - - void glScissorArrayvNV - GLuint first - GLsizei count - const GLint *v - - - - void glScissorArrayvOES - GLuint first - GLsizei count - const GLint *v - - - - void glScissorExclusiveArrayvNV - GLuint first - GLsizei count - const GLint *v - - - void glScissorExclusiveNV - GLint x - GLint y - GLsizei width - GLsizei height - - - void glScissorIndexed - GLuint index - GLint left - GLint bottom - GLsizei width - GLsizei height - - - void glScissorIndexedNV - GLuint index - GLint left - GLint bottom - GLsizei width - GLsizei height - - - - void glScissorIndexedOES - GLuint index - GLint left - GLint bottom - GLsizei width - GLsizei height - - - - void glScissorIndexedv - GLuint index - const GLint *v - - - void glScissorIndexedvNV - GLuint index - const GLint *v - - - - void glScissorIndexedvOES - GLuint index - const GLint *v - - - - void glSecondaryColor3b - GLbyte red - GLbyte green - GLbyte blue - - - - void glSecondaryColor3bEXT - GLbyte red - GLbyte green - GLbyte blue - - - - - void glSecondaryColor3bv - const GLbyte *v - - - - void glSecondaryColor3bvEXT - const GLbyte *v - - - - - void glSecondaryColor3d - GLdouble red - GLdouble green - GLdouble blue - - - - void glSecondaryColor3dEXT - GLdouble red - GLdouble green - GLdouble blue - - - - - void glSecondaryColor3dv - const GLdouble *v - - - - void glSecondaryColor3dvEXT - const GLdouble *v - - - - - void glSecondaryColor3f - GLfloat red - GLfloat green - GLfloat blue - - - - void glSecondaryColor3fEXT - GLfloat red - GLfloat green - GLfloat blue - - - - - void glSecondaryColor3fv - const GLfloat *v - - - - void glSecondaryColor3fvEXT - const GLfloat *v - - - - - void glSecondaryColor3hNV - GLhalfNV red - GLhalfNV green - GLhalfNV blue - - - - void glSecondaryColor3hvNV - const GLhalfNV *v - - - - void glSecondaryColor3i - GLint red - GLint green - GLint blue - - - - void glSecondaryColor3iEXT - GLint red - GLint green - GLint blue - - - - - void glSecondaryColor3iv - const GLint *v - - - - void glSecondaryColor3ivEXT - const GLint *v - - - - - void glSecondaryColor3s - GLshort red - GLshort green - GLshort blue - - - - void glSecondaryColor3sEXT - GLshort red - GLshort green - GLshort blue - - - - - void glSecondaryColor3sv - const GLshort *v - - - - void glSecondaryColor3svEXT - const GLshort *v - - - - - void glSecondaryColor3ub - GLubyte red - GLubyte green - GLubyte blue - - - - void glSecondaryColor3ubEXT - GLubyte red - GLubyte green - GLubyte blue - - - - - void glSecondaryColor3ubv - const GLubyte *v - - - - void glSecondaryColor3ubvEXT - const GLubyte *v - - - - - void glSecondaryColor3ui - GLuint red - GLuint green - GLuint blue - - - - void glSecondaryColor3uiEXT - GLuint red - GLuint green - GLuint blue - - - - - void glSecondaryColor3uiv - const GLuint *v - - - - void glSecondaryColor3uivEXT - const GLuint *v - - - - - void glSecondaryColor3us - GLushort red - GLushort green - GLushort blue - - - - void glSecondaryColor3usEXT - GLushort red - GLushort green - GLushort blue - - - - - void glSecondaryColor3usv - const GLushort *v - - - - void glSecondaryColor3usvEXT - const GLushort *v - - - - - void glSecondaryColorFormatNV - GLint size - GLenum type - GLsizei stride - - - void glSecondaryColorP3ui - GLenum type - GLuint color - - - void glSecondaryColorP3uiv - GLenum type - const GLuint *color - - - void glSecondaryColorPointer - GLint size - GLenum type - GLsizei stride - const void *pointer - - - void glSecondaryColorPointerEXT - GLint size - GLenum type - GLsizei stride - const void *pointer - - - - void glSecondaryColorPointerListIBM - GLint size - GLenum type - GLint stride - const void **pointer - GLint ptrstride - - - void glSelectBuffer - GLsizei size - GLuint *buffer - - - - void glSelectPerfMonitorCountersAMD - GLuint monitor - GLboolean enable - GLuint group - GLint numCounters - GLuint *counterList - - - void glSemaphoreParameterivNV - GLuint semaphore - GLenum pname - const GLint *params - - - void glSemaphoreParameterui64vEXT - GLuint semaphore - GLenum pname - const GLuint64 *params - - - void glSeparableFilter2D - GLenum target - GLenum internalformat - GLsizei width - GLsizei height - GLenum format - GLenum type - const void *row - const void *column - - - - - void glSeparableFilter2DEXT - GLenum target - GLenum internalformat - GLsizei width - GLsizei height - GLenum format - GLenum type - const void *row - const void *column - - - - - void glSetFenceAPPLE - GLuint fence - - - void glSetFenceNV - GLuint fence - GLenum condition - - - void glSetFragmentShaderConstantATI - GLuint dst - const GLfloat *value - - - void glSetInvariantEXT - GLuint id - GLenum type - const void *addr - - - void glSetLocalConstantEXT - GLuint id - GLenum type - const void *addr - - - void glSetMultisamplefvAMD - GLenum pname - GLuint index - const GLfloat *val - - - void glShadeModel - GLenum mode - - - - void glShaderBinary - GLsizei count - const GLuint *shaders - GLenum binaryFormat - const void *binary - GLsizei length - - - void glShaderOp1EXT - GLenum op - GLuint res - GLuint arg1 - - - void glShaderOp2EXT - GLenum op - GLuint res - GLuint arg1 - GLuint arg2 - - - void glShaderOp3EXT - GLenum op - GLuint res - GLuint arg1 - GLuint arg2 - GLuint arg3 - - - void glShaderSource - GLuint shader - GLsizei count - const GLchar *const*string - const GLint *length - - - void glShaderSourceARB - GLhandleARB shaderObj - GLsizei count - const GLcharARB **string - const GLint *length - - - - void glShaderStorageBlockBinding - GLuint program - GLuint storageBlockIndex - GLuint storageBlockBinding - - - void glShadingRateEXT - GLenum rate - - - void glShadingRateCombinerOpsEXT - GLenum combinerOp0 - GLenum combinerOp1 - - - void glShadingRateImageBarrierNV - GLboolean synchronize - - - void glShadingRateQCOM - GLenum rate - - - void glShadingRateImagePaletteNV - GLuint viewport - GLuint first - GLsizei count - const GLenum *rates - - - void glShadingRateSampleOrderNV - GLenum order - - - void glShadingRateSampleOrderCustomNV - GLenum rate - GLuint samples - const GLint *locations - - - void glSharpenTexFuncSGIS - GLenum target - GLsizei n - const GLfloat *points - - - - void glSignalSemaphoreEXT - GLuint semaphore - GLuint numBufferBarriers - const GLuint *buffers - GLuint numTextureBarriers - const GLuint *textures - const GLenum *dstLayouts - - - void glSignalSemaphoreui64NVX - GLuint signalGpu - GLsizei fenceObjectCount - const GLuint *semaphoreArray - const GLuint64 *fenceValueArray - - - void glSpecializeShader - GLuint shader - const GLchar *pEntryPoint - GLuint numSpecializationConstants - const GLuint *pConstantIndex - const GLuint *pConstantValue - - - void glSpecializeShaderARB - GLuint shader - const GLchar *pEntryPoint - GLuint numSpecializationConstants - const GLuint *pConstantIndex - const GLuint *pConstantValue - - - - void glSpriteParameterfSGIX - GLenum pname - GLfloat param - - - - void glSpriteParameterfvSGIX - GLenum pname - const GLfloat *params - - - - void glSpriteParameteriSGIX - GLenum pname - GLint param - - - - void glSpriteParameterivSGIX - GLenum pname - const GLint *params - - - - void glStartInstrumentsSGIX - - - - void glStartTilingQCOM - GLuint x - GLuint y - GLuint width - GLuint height - GLbitfield preserveMask - - - void glStateCaptureNV - GLuint state - GLenum mode - - - void glStencilClearTagEXT - GLsizei stencilTagBits - GLuint stencilClearTag - - - - void glStencilFillPathInstancedNV - GLsizei numPaths - GLenum pathNameType - const void *paths - GLuint pathBase - GLenum fillMode - GLuint mask - GLenum transformType - const GLfloat *transformValues - - - void glStencilFillPathNV - GLuint path - GLenum fillMode - GLuint mask - - - void glStencilFunc - GLenum func - GLint ref - GLuint mask - - - - void glStencilFuncSeparate - GLenum face - GLenum func - GLint ref - GLuint mask - - - void glStencilFuncSeparateATI - GLenum frontfunc - GLenum backfunc - GLint ref - GLuint mask - - - void glStencilMask - GLuint mask - - - - void glStencilMaskSeparate - GLenum face - GLuint mask - - - void glStencilOp - GLenum fail - GLenum zfail - GLenum zpass - - - - void glStencilOpSeparate - GLenum face - GLenum sfail - GLenum dpfail - GLenum dppass - - - void glStencilOpSeparateATI - GLenum face - GLenum sfail - GLenum dpfail - GLenum dppass - - - - void glStencilOpValueAMD - GLenum face - GLuint value - - - void glStencilStrokePathInstancedNV - GLsizei numPaths - GLenum pathNameType - const void *paths - GLuint pathBase - GLint reference - GLuint mask - GLenum transformType - const GLfloat *transformValues - - - void glStencilStrokePathNV - GLuint path - GLint reference - GLuint mask - - - void glStencilThenCoverFillPathInstancedNV - GLsizei numPaths - GLenum pathNameType - const void *paths - GLuint pathBase - GLenum fillMode - GLuint mask - GLenum coverMode - GLenum transformType - const GLfloat *transformValues - - - void glStencilThenCoverFillPathNV - GLuint path - GLenum fillMode - GLuint mask - GLenum coverMode - - - void glStencilThenCoverStrokePathInstancedNV - GLsizei numPaths - GLenum pathNameType - const void *paths - GLuint pathBase - GLint reference - GLuint mask - GLenum coverMode - GLenum transformType - const GLfloat *transformValues - - - void glStencilThenCoverStrokePathNV - GLuint path - GLint reference - GLuint mask - GLenum coverMode - - - void glStopInstrumentsSGIX - GLint marker - - - - void glStringMarkerGREMEDY - GLsizei len - const void *string - - - void glSubpixelPrecisionBiasNV - GLuint xbits - GLuint ybits - - - void glSwizzleEXT - GLuint res - GLuint in - GLenum outX - GLenum outY - GLenum outZ - GLenum outW - - - void glSyncTextureINTEL - GLuint texture - - - void glTagSampleBufferSGIX - - - - void glTangent3bEXT - GLbyte tx - GLbyte ty - GLbyte tz - - - - void glTangent3bvEXT - const GLbyte *v - - - void glTangent3dEXT - GLdouble tx - GLdouble ty - GLdouble tz - - - - void glTangent3dvEXT - const GLdouble *v - - - void glTangent3fEXT - GLfloat tx - GLfloat ty - GLfloat tz - - - - void glTangent3fvEXT - const GLfloat *v - - - void glTangent3iEXT - GLint tx - GLint ty - GLint tz - - - - void glTangent3ivEXT - const GLint *v - - - void glTangent3sEXT - GLshort tx - GLshort ty - GLshort tz - - - - void glTangent3svEXT - const GLshort *v - - - void glTangentPointerEXT - GLenum type - GLsizei stride - const void *pointer - - - void glTbufferMask3DFX - GLuint mask - - - void glTessellationFactorAMD - GLfloat factor - - - void glTessellationModeAMD - GLenum mode - - - GLboolean glTestFenceAPPLE - GLuint fence - - - GLboolean glTestFenceNV - GLuint fence - - - - GLboolean glTestObjectAPPLE - GLenum object - GLuint name - - - void glTexAttachMemoryNV - GLenum target - GLuint memory - GLuint64 offset - - - void glTexBuffer - GLenum target - GLenum internalformat - GLuint buffer - - - void glTexBufferARB - GLenum target - GLenum internalformat - GLuint buffer - - - - - void glTexBufferEXT - GLenum target - GLenum internalformat - GLuint buffer - - - - void glTexBufferOES - GLenum target - GLenum internalformat - GLuint buffer - - - - void glTexBufferRange - GLenum target - GLenum internalformat - GLuint buffer - GLintptr offset - GLsizeiptr size - - - void glTexBufferRangeEXT - GLenum target - GLenum internalformat - GLuint buffer - GLintptr offset - GLsizeiptr size - - - - void glTexBufferRangeOES - GLenum target - GLenum internalformat - GLuint buffer - GLintptr offset - GLsizeiptr size - - - - void glTexBumpParameterfvATI - GLenum pname - const GLfloat *param - - - void glTexBumpParameterivATI - GLenum pname - const GLint *param - - - void glTexCoord1bOES - GLbyte s - - - void glTexCoord1bvOES - const GLbyte *coords - - - void glTexCoord1d - GLdouble s - - - - void glTexCoord1dv - const GLdouble *v - - - - void glTexCoord1f - GLfloat s - - - - void glTexCoord1fv - const GLfloat *v - - - - void glTexCoord1hNV - GLhalfNV s - - - - void glTexCoord1hvNV - const GLhalfNV *v - - - - void glTexCoord1i - GLint s - - - - void glTexCoord1iv - const GLint *v - - - - void glTexCoord1s - GLshort s - - - - void glTexCoord1sv - const GLshort *v - - - - void glTexCoord1xOES - GLfixed s - - - void glTexCoord1xvOES - const GLfixed *coords - - - void glTexCoord2bOES - GLbyte s - GLbyte t - - - void glTexCoord2bvOES - const GLbyte *coords - - - void glTexCoord2d - GLdouble s - GLdouble t - - - - void glTexCoord2dv - const GLdouble *v - - - - void glTexCoord2f - GLfloat s - GLfloat t - - - - void glTexCoord2fColor3fVertex3fSUN - GLfloat s - GLfloat t - GLfloat r - GLfloat g - GLfloat b - GLfloat x - GLfloat y - GLfloat z - - - void glTexCoord2fColor3fVertex3fvSUN - const GLfloat *tc - const GLfloat *c - const GLfloat *v - - - void glTexCoord2fColor4fNormal3fVertex3fSUN - GLfloat s - GLfloat t - GLfloat r - GLfloat g - GLfloat b - GLfloat a - GLfloat nx - GLfloat ny - GLfloat nz - GLfloat x - GLfloat y - GLfloat z - - - void glTexCoord2fColor4fNormal3fVertex3fvSUN - const GLfloat *tc - const GLfloat *c - const GLfloat *n - const GLfloat *v - - - void glTexCoord2fColor4ubVertex3fSUN - GLfloat s - GLfloat t - GLubyte r - GLubyte g - GLubyte b - GLubyte a - GLfloat x - GLfloat y - GLfloat z - - - void glTexCoord2fColor4ubVertex3fvSUN - const GLfloat *tc - const GLubyte *c - const GLfloat *v - - - void glTexCoord2fNormal3fVertex3fSUN - GLfloat s - GLfloat t - GLfloat nx - GLfloat ny - GLfloat nz - GLfloat x - GLfloat y - GLfloat z - - - void glTexCoord2fNormal3fVertex3fvSUN - const GLfloat *tc - const GLfloat *n - const GLfloat *v - - - void glTexCoord2fVertex3fSUN - GLfloat s - GLfloat t - GLfloat x - GLfloat y - GLfloat z - - - void glTexCoord2fVertex3fvSUN - const GLfloat *tc - const GLfloat *v - - - void glTexCoord2fv - const GLfloat *v - - - - void glTexCoord2hNV - GLhalfNV s - GLhalfNV t - - - - void glTexCoord2hvNV - const GLhalfNV *v - - - - void glTexCoord2i - GLint s - GLint t - - - - void glTexCoord2iv - const GLint *v - - - - void glTexCoord2s - GLshort s - GLshort t - - - - void glTexCoord2sv - const GLshort *v - - - - void glTexCoord2xOES - GLfixed s - GLfixed t - - - void glTexCoord2xvOES - const GLfixed *coords - - - void glTexCoord3bOES - GLbyte s - GLbyte t - GLbyte r - - - void glTexCoord3bvOES - const GLbyte *coords - - - void glTexCoord3d - GLdouble s - GLdouble t - GLdouble r - - - - void glTexCoord3dv - const GLdouble *v - - - - void glTexCoord3f - GLfloat s - GLfloat t - GLfloat r - - - - void glTexCoord3fv - const GLfloat *v - - - - void glTexCoord3hNV - GLhalfNV s - GLhalfNV t - GLhalfNV r - - - - void glTexCoord3hvNV - const GLhalfNV *v - - - - void glTexCoord3i - GLint s - GLint t - GLint r - - - - void glTexCoord3iv - const GLint *v - - - - void glTexCoord3s - GLshort s - GLshort t - GLshort r - - - - void glTexCoord3sv - const GLshort *v - - - - void glTexCoord3xOES - GLfixed s - GLfixed t - GLfixed r - - - void glTexCoord3xvOES - const GLfixed *coords - - - void glTexCoord4bOES - GLbyte s - GLbyte t - GLbyte r - GLbyte q - - - void glTexCoord4bvOES - const GLbyte *coords - - - void glTexCoord4d - GLdouble s - GLdouble t - GLdouble r - GLdouble q - - - - void glTexCoord4dv - const GLdouble *v - - - - void glTexCoord4f - GLfloat s - GLfloat t - GLfloat r - GLfloat q - - - - void glTexCoord4fColor4fNormal3fVertex4fSUN - GLfloat s - GLfloat t - GLfloat p - GLfloat q - GLfloat r - GLfloat g - GLfloat b - GLfloat a - GLfloat nx - GLfloat ny - GLfloat nz - GLfloat x - GLfloat y - GLfloat z - GLfloat w - - - void glTexCoord4fColor4fNormal3fVertex4fvSUN - const GLfloat *tc - const GLfloat *c - const GLfloat *n - const GLfloat *v - - - void glTexCoord4fVertex4fSUN - GLfloat s - GLfloat t - GLfloat p - GLfloat q - GLfloat x - GLfloat y - GLfloat z - GLfloat w - - - void glTexCoord4fVertex4fvSUN - const GLfloat *tc - const GLfloat *v - - - void glTexCoord4fv - const GLfloat *v - - - - void glTexCoord4hNV - GLhalfNV s - GLhalfNV t - GLhalfNV r - GLhalfNV q - - - - void glTexCoord4hvNV - const GLhalfNV *v - - - - void glTexCoord4i - GLint s - GLint t - GLint r - GLint q - - - - void glTexCoord4iv - const GLint *v - - - - void glTexCoord4s - GLshort s - GLshort t - GLshort r - GLshort q - - - - void glTexCoord4sv - const GLshort *v - - - - void glTexCoord4xOES - GLfixed s - GLfixed t - GLfixed r - GLfixed q - - - void glTexCoord4xvOES - const GLfixed *coords - - - void glTexCoordFormatNV - GLint size - GLenum type - GLsizei stride - - - void glTexCoordP1ui - GLenum type - GLuint coords - - - void glTexCoordP1uiv - GLenum type - const GLuint *coords - - - void glTexCoordP2ui - GLenum type - GLuint coords - - - void glTexCoordP2uiv - GLenum type - const GLuint *coords - - - void glTexCoordP3ui - GLenum type - GLuint coords - - - void glTexCoordP3uiv - GLenum type - const GLuint *coords - - - void glTexCoordP4ui - GLenum type - GLuint coords - - - void glTexCoordP4uiv - GLenum type - const GLuint *coords - - - void glTexCoordPointer - GLint size - GLenum type - GLsizei stride - const void *pointer - - - void glTexCoordPointerEXT - GLint size - GLenum type - GLsizei stride - GLsizei count - const void *pointer - - - void glTexCoordPointerListIBM - GLint size - GLenum type - GLint stride - const void **pointer - GLint ptrstride - - - void glTexCoordPointervINTEL - GLint size - GLenum type - const void **pointer - - - void glTexEnvf - GLenum target - GLenum pname - GLfloat param - - - - void glTexEnvfv - GLenum target - GLenum pname - const GLfloat *params - - - - void glTexEnvi - GLenum target - GLenum pname - GLint param - - - - void glTexEnviv - GLenum target - GLenum pname - const GLint *params - - - - void glTexEnvx - GLenum target - GLenum pname - GLfixed param - - - void glTexEnvxOES - GLenum target - GLenum pname - GLfixed param - - - void glTexEnvxv - GLenum target - GLenum pname - const GLfixed *params - - - void glTexEnvxvOES - GLenum target - GLenum pname - const GLfixed *params - - - void glTexEstimateMotionQCOM - GLuint ref - GLuint target - GLuint output - - - void glTexEstimateMotionRegionsQCOM - GLuint ref - GLuint target - GLuint output - GLuint mask - - - void glExtrapolateTex2DQCOM - GLuint src1 - GLuint src2 - GLuint output - GLfloat scaleFactor - - - void glTexFilterFuncSGIS - GLenum target - GLenum filter - GLsizei n - const GLfloat *weights - - - - void glTexGend - GLenum coord - GLenum pname - GLdouble param - - - - void glTexGendv - GLenum coord - GLenum pname - const GLdouble *params - - - - void glTexGenf - GLenum coord - GLenum pname - GLfloat param - - - - void glTexGenfOES - GLenum coord - GLenum pname - GLfloat param - - - void glTexGenfv - GLenum coord - GLenum pname - const GLfloat *params - - - - void glTexGenfvOES - GLenum coord - GLenum pname - const GLfloat *params - - - void glTexGeni - GLenum coord - GLenum pname - GLint param - - - - void glTexGeniOES - GLenum coord - GLenum pname - GLint param - - - void glTexGeniv - GLenum coord - GLenum pname - const GLint *params - - - - void glTexGenivOES - GLenum coord - GLenum pname - const GLint *params - - - void glTexGenxOES - GLenum coord - GLenum pname - GLfixed param - - - void glTexGenxvOES - GLenum coord - GLenum pname - const GLfixed *params - - - void glTexImage1D - GLenum target - GLint level - GLint internalformat - GLsizei width - GLint border - GLenum format - GLenum type - const void *pixels - - - - - void glTexImage2D - GLenum target - GLint level - GLint internalformat - GLsizei width - GLsizei height - GLint border - GLenum format - GLenum type - const void *pixels - - - - - void glTexImage2DMultisample - GLenum target - GLsizei samples - GLenum internalformat - GLsizei width - GLsizei height - GLboolean fixedsamplelocations - - - void glTexImage2DMultisampleCoverageNV - GLenum target - GLsizei coverageSamples - GLsizei colorSamples - GLint internalFormat - GLsizei width - GLsizei height - GLboolean fixedSampleLocations - - - void glTexImage3D - GLenum target - GLint level - GLint internalformat - GLsizei width - GLsizei height - GLsizei depth - GLint border - GLenum format - GLenum type - const void *pixels - - - - - void glTexImage3DEXT - GLenum target - GLint level - GLenum internalformat - GLsizei width - GLsizei height - GLsizei depth - GLint border - GLenum format - GLenum type - const void *pixels - - - - - void glTexImage3DMultisample - GLenum target - GLsizei samples - GLenum internalformat - GLsizei width - GLsizei height - GLsizei depth - GLboolean fixedsamplelocations - - - void glTexImage3DMultisampleCoverageNV - GLenum target - GLsizei coverageSamples - GLsizei colorSamples - GLint internalFormat - GLsizei width - GLsizei height - GLsizei depth - GLboolean fixedSampleLocations - - - void glTexImage3DOES - GLenum target - GLint level - GLenum internalformat - GLsizei width - GLsizei height - GLsizei depth - GLint border - GLenum format - GLenum type - const void *pixels - - - void glTexImage4DSGIS - GLenum target - GLint level - GLenum internalformat - GLsizei width - GLsizei height - GLsizei depth - GLsizei size4d - GLint border - GLenum format - GLenum type - const void *pixels - - - - void glTexPageCommitmentARB - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLsizei width - GLsizei height - GLsizei depth - GLboolean commit - - - void glTexPageCommitmentEXT - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLsizei width - GLsizei height - GLsizei depth - GLboolean commit - - - - void glTexPageCommitmentMemNV - GLenum target - GLint layer - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLsizei width - GLsizei height - GLsizei depth - GLuint memory - GLuint64 offset - GLboolean commit - - - void glTexParameterIiv - GLenum target - GLenum pname - const GLint *params - - - - void glTexParameterIivEXT - GLenum target - GLenum pname - const GLint *params - - - - void glTexParameterIivOES - GLenum target - GLenum pname - const GLint *params - - - - void glTexParameterIuiv - GLenum target - GLenum pname - const GLuint *params - - - - void glTexParameterIuivEXT - GLenum target - GLenum pname - const GLuint *params - - - - void glTexParameterIuivOES - GLenum target - GLenum pname - const GLuint *params - - - - void glTexParameterf - GLenum target - GLenum pname - GLfloat param - - - - void glTexParameterfv - GLenum target - GLenum pname - const GLfloat *params - - - - void glTexParameteri - GLenum target - GLenum pname - GLint param - - - - void glTexParameteriv - GLenum target - GLenum pname - const GLint *params - - - - void glTexParameterx - GLenum target - GLenum pname - GLfixed param - - - void glTexParameterxOES - GLenum target - GLenum pname - GLfixed param - - - void glTexParameterxv - GLenum target - GLenum pname - const GLfixed *params - - - void glTexParameterxvOES - GLenum target - GLenum pname - const GLfixed *params - - - void glTexRenderbufferNV - GLenum target - GLuint renderbuffer - - - void glTexStorage1D - GLenum target - GLsizei levels - GLenum internalformat - GLsizei width - - - void glTexStorage1DEXT - GLenum target - GLsizei levels - GLenum internalformat - GLsizei width - - - - void glTexStorage2D - GLenum target - GLsizei levels - GLenum internalformat - GLsizei width - GLsizei height - - - void glTexStorage2DEXT - GLenum target - GLsizei levels - GLenum internalformat - GLsizei width - GLsizei height - - - - void glTexStorage2DMultisample - GLenum target - GLsizei samples - GLenum internalformat - GLsizei width - GLsizei height - GLboolean fixedsamplelocations - - - void glTexStorage3D - GLenum target - GLsizei levels - GLenum internalformat - GLsizei width - GLsizei height - GLsizei depth - - - void glTexStorage3DEXT - GLenum target - GLsizei levels - GLenum internalformat - GLsizei width - GLsizei height - GLsizei depth - - - - void glTexStorage3DMultisample - GLenum target - GLsizei samples - GLenum internalformat - GLsizei width - GLsizei height - GLsizei depth - GLboolean fixedsamplelocations - - - void glTexStorage3DMultisampleOES - GLenum target - GLsizei samples - GLenum internalformat - GLsizei width - GLsizei height - GLsizei depth - GLboolean fixedsamplelocations - - - - void glTexStorageAttribs2DEXT - GLenum target - GLsizei levels - GLenum internalformat - GLsizei width - GLsizei height - const GLint* attrib_list - - - void glTexStorageAttribs3DEXT - GLenum target - GLsizei levels - GLenum internalformat - GLsizei width - GLsizei height - GLsizei depth - const GLint* attrib_list - - - void glTexStorageMem1DEXT - GLenum target - GLsizei levels - GLenum internalFormat - GLsizei width - GLuint memory - GLuint64 offset - - - void glTexStorageMem2DEXT - GLenum target - GLsizei levels - GLenum internalFormat - GLsizei width - GLsizei height - GLuint memory - GLuint64 offset - - - void glTexStorageMem2DMultisampleEXT - GLenum target - GLsizei samples - GLenum internalFormat - GLsizei width - GLsizei height - GLboolean fixedSampleLocations - GLuint memory - GLuint64 offset - - - void glTexStorageMem3DEXT - GLenum target - GLsizei levels - GLenum internalFormat - GLsizei width - GLsizei height - GLsizei depth - GLuint memory - GLuint64 offset - - - void glTexStorageMem3DMultisampleEXT - GLenum target - GLsizei samples - GLenum internalFormat - GLsizei width - GLsizei height - GLsizei depth - GLboolean fixedSampleLocations - GLuint memory - GLuint64 offset - - - void glTexStorageSparseAMD - GLenum target - GLenum internalFormat - GLsizei width - GLsizei height - GLsizei depth - GLsizei layers - GLbitfield flags - - - void glTexSubImage1D - GLenum target - GLint level - GLint xoffset - GLsizei width - GLenum format - GLenum type - const void *pixels - - - - - void glTexSubImage1DEXT - GLenum target - GLint level - GLint xoffset - GLsizei width - GLenum format - GLenum type - const void *pixels - - - - - void glTexSubImage2D - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLsizei width - GLsizei height - GLenum format - GLenum type - const void *pixels - - - - - void glTexSubImage2DEXT - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLsizei width - GLsizei height - GLenum format - GLenum type - const void *pixels - - - - - void glTexSubImage3D - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLsizei width - GLsizei height - GLsizei depth - GLenum format - GLenum type - const void *pixels - - - - - void glTexSubImage3DEXT - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLsizei width - GLsizei height - GLsizei depth - GLenum format - GLenum type - const void *pixels - - - - - void glTexSubImage3DOES - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLsizei width - GLsizei height - GLsizei depth - GLenum format - GLenum type - const void *pixels - - - void glTexSubImage4DSGIS - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLint woffset - GLsizei width - GLsizei height - GLsizei depth - GLsizei size4d - GLenum format - GLenum type - const void *pixels - - - - void glTextureAttachMemoryNV - GLuint texture - GLuint memory - GLuint64 offset - - - void glTextureBarrier - - - void glTextureBarrierNV - - - - void glTextureBuffer - GLuint texture - GLenum internalformat - GLuint buffer - - - void glTextureBufferEXT - GLuint texture - GLenum target - GLenum internalformat - GLuint buffer - - - void glTextureBufferRange - GLuint texture - GLenum internalformat - GLuint buffer - GLintptr offset - GLsizeiptr size - - - void glTextureBufferRangeEXT - GLuint texture - GLenum target - GLenum internalformat - GLuint buffer - GLintptr offset - GLsizeiptr size - - - void glTextureColorMaskSGIS - GLboolean red - GLboolean green - GLboolean blue - GLboolean alpha - - - - void glTextureFoveationParametersQCOM - GLuint texture - GLuint layer - GLuint focalPoint - GLfloat focalX - GLfloat focalY - GLfloat gainX - GLfloat gainY - GLfloat foveaArea - - - void glTextureImage1DEXT - GLuint texture - GLenum target - GLint level - GLint internalformat - GLsizei width - GLint border - GLenum format - GLenum type - const void *pixels - - - void glTextureImage2DEXT - GLuint texture - GLenum target - GLint level - GLint internalformat - GLsizei width - GLsizei height - GLint border - GLenum format - GLenum type - const void *pixels - - - void glTextureImage2DMultisampleCoverageNV - GLuint texture - GLenum target - GLsizei coverageSamples - GLsizei colorSamples - GLint internalFormat - GLsizei width - GLsizei height - GLboolean fixedSampleLocations - - - void glTextureImage2DMultisampleNV - GLuint texture - GLenum target - GLsizei samples - GLint internalFormat - GLsizei width - GLsizei height - GLboolean fixedSampleLocations - - - void glTextureImage3DEXT - GLuint texture - GLenum target - GLint level - GLint internalformat - GLsizei width - GLsizei height - GLsizei depth - GLint border - GLenum format - GLenum type - const void *pixels - - - void glTextureImage3DMultisampleCoverageNV - GLuint texture - GLenum target - GLsizei coverageSamples - GLsizei colorSamples - GLint internalFormat - GLsizei width - GLsizei height - GLsizei depth - GLboolean fixedSampleLocations - - - void glTextureImage3DMultisampleNV - GLuint texture - GLenum target - GLsizei samples - GLint internalFormat - GLsizei width - GLsizei height - GLsizei depth - GLboolean fixedSampleLocations - - - void glTextureLightEXT - GLenum pname - - - void glTextureMaterialEXT - GLenum face - GLenum mode - - - void glTextureNormalEXT - GLenum mode - - - void glTexturePageCommitmentEXT - GLuint texture - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLsizei width - GLsizei height - GLsizei depth - GLboolean commit - - - void glTexturePageCommitmentMemNV - GLuint texture - GLint layer - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLsizei width - GLsizei height - GLsizei depth - GLuint memory - GLuint64 offset - GLboolean commit - - - void glTextureParameterIiv - GLuint texture - GLenum pname - const GLint *params - - - void glTextureParameterIivEXT - GLuint texture - GLenum target - GLenum pname - const GLint *params - - - void glTextureParameterIuiv - GLuint texture - GLenum pname - const GLuint *params - - - void glTextureParameterIuivEXT - GLuint texture - GLenum target - GLenum pname - const GLuint *params - - - void glTextureParameterf - GLuint texture - GLenum pname - GLfloat param - - - void glTextureParameterfEXT - GLuint texture - GLenum target - GLenum pname - GLfloat param - - - - void glTextureParameterfv - GLuint texture - GLenum pname - const GLfloat *param - - - void glTextureParameterfvEXT - GLuint texture - GLenum target - GLenum pname - const GLfloat *params - - - void glTextureParameteri - GLuint texture - GLenum pname - GLint param - - - void glTextureParameteriEXT - GLuint texture - GLenum target - GLenum pname - GLint param - - - - void glTextureParameteriv - GLuint texture - GLenum pname - const GLint *param - - - void glTextureParameterivEXT - GLuint texture - GLenum target - GLenum pname - const GLint *params - - - void glTextureRangeAPPLE - GLenum target - GLsizei length - const void *pointer - - - void glTextureRenderbufferEXT - GLuint texture - GLenum target - GLuint renderbuffer - - - void glTextureStorage1D - GLuint texture - GLsizei levels - GLenum internalformat - GLsizei width - - - void glTextureStorage1DEXT - GLuint texture - GLenum target - GLsizei levels - GLenum internalformat - GLsizei width - - - void glTextureStorage2D - GLuint texture - GLsizei levels - GLenum internalformat - GLsizei width - GLsizei height - - - void glTextureStorage2DEXT - GLuint texture - GLenum target - GLsizei levels - GLenum internalformat - GLsizei width - GLsizei height - - - void glTextureStorage2DMultisample - GLuint texture - GLsizei samples - GLenum internalformat - GLsizei width - GLsizei height - GLboolean fixedsamplelocations - - - void glTextureStorage2DMultisampleEXT - GLuint texture - GLenum target - GLsizei samples - GLenum internalformat - GLsizei width - GLsizei height - GLboolean fixedsamplelocations - - - void glTextureStorage3D - GLuint texture - GLsizei levels - GLenum internalformat - GLsizei width - GLsizei height - GLsizei depth - - - void glTextureStorage3DEXT - GLuint texture - GLenum target - GLsizei levels - GLenum internalformat - GLsizei width - GLsizei height - GLsizei depth - - - void glTextureStorage3DMultisample - GLuint texture - GLsizei samples - GLenum internalformat - GLsizei width - GLsizei height - GLsizei depth - GLboolean fixedsamplelocations - - - void glTextureStorage3DMultisampleEXT - GLuint texture - GLenum target - GLsizei samples - GLenum internalformat - GLsizei width - GLsizei height - GLsizei depth - GLboolean fixedsamplelocations - - - void glTextureStorageMem1DEXT - GLuint texture - GLsizei levels - GLenum internalFormat - GLsizei width - GLuint memory - GLuint64 offset - - - void glTextureStorageMem2DEXT - GLuint texture - GLsizei levels - GLenum internalFormat - GLsizei width - GLsizei height - GLuint memory - GLuint64 offset - - - void glTextureStorageMem2DMultisampleEXT - GLuint texture - GLsizei samples - GLenum internalFormat - GLsizei width - GLsizei height - GLboolean fixedSampleLocations - GLuint memory - GLuint64 offset - - - void glTextureStorageMem3DEXT - GLuint texture - GLsizei levels - GLenum internalFormat - GLsizei width - GLsizei height - GLsizei depth - GLuint memory - GLuint64 offset - - - void glTextureStorageMem3DMultisampleEXT - GLuint texture - GLsizei samples - GLenum internalFormat - GLsizei width - GLsizei height - GLsizei depth - GLboolean fixedSampleLocations - GLuint memory - GLuint64 offset - - - void glTextureStorageSparseAMD - GLuint texture - GLenum target - GLenum internalFormat - GLsizei width - GLsizei height - GLsizei depth - GLsizei layers - GLbitfield flags - - - void glTextureSubImage1D - GLuint texture - GLint level - GLint xoffset - GLsizei width - GLenum format - GLenum type - const void *pixels - - - void glTextureSubImage1DEXT - GLuint texture - GLenum target - GLint level - GLint xoffset - GLsizei width - GLenum format - GLenum type - const void *pixels - - - void glTextureSubImage2D - GLuint texture - GLint level - GLint xoffset - GLint yoffset - GLsizei width - GLsizei height - GLenum format - GLenum type - const void *pixels - - - void glTextureSubImage2DEXT - GLuint texture - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLsizei width - GLsizei height - GLenum format - GLenum type - const void *pixels - - - void glTextureSubImage3D - GLuint texture - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLsizei width - GLsizei height - GLsizei depth - GLenum format - GLenum type - const void *pixels - - - void glTextureSubImage3DEXT - GLuint texture - GLenum target - GLint level - GLint xoffset - GLint yoffset - GLint zoffset - GLsizei width - GLsizei height - GLsizei depth - GLenum format - GLenum type - const void *pixels - - - void glTextureView - GLuint texture - GLenum target - GLuint origtexture - GLenum internalformat - GLuint minlevel - GLuint numlevels - GLuint minlayer - GLuint numlayers - - - void glTextureViewEXT - GLuint texture - GLenum target - GLuint origtexture - GLenum internalformat - GLuint minlevel - GLuint numlevels - GLuint minlayer - GLuint numlayers - - - - void glTextureViewOES - GLuint texture - GLenum target - GLuint origtexture - GLenum internalformat - GLuint minlevel - GLuint numlevels - GLuint minlayer - GLuint numlayers - - - - void glTrackMatrixNV - GLenum target - GLuint address - GLenum matrix - GLenum transform - - - - void glTransformFeedbackAttribsNV - GLsizei count - const GLint *attribs - GLenum bufferMode - - - void glTransformFeedbackBufferBase - GLuint xfb - GLuint index - GLuint buffer - - - void glTransformFeedbackBufferRange - GLuint xfb - GLuint index - GLuint buffer - GLintptr offset - GLsizeiptr size - - - void glTransformFeedbackStreamAttribsNV - GLsizei count - const GLint *attribs - GLsizei nbuffers - const GLint *bufstreams - GLenum bufferMode - - - void glTransformFeedbackVaryings - GLuint program - GLsizei count - const GLchar *const*varyings - GLenum bufferMode - - - - void glTransformFeedbackVaryingsEXT - GLuint program - GLsizei count - const GLchar *const*varyings - GLenum bufferMode - - - - void glTransformFeedbackVaryingsNV - GLuint program - GLsizei count - const GLint *locations - GLenum bufferMode - - - void glTransformPathNV - GLuint resultPath - GLuint srcPath - GLenum transformType - const GLfloat *transformValues - - - void glTranslated - GLdouble x - GLdouble y - GLdouble z - - - - void glTranslatef - GLfloat x - GLfloat y - GLfloat z - - - - void glTranslatex - GLfixed x - GLfixed y - GLfixed z - - - void glTranslatexOES - GLfixed x - GLfixed y - GLfixed z - - - void glUniform1d - GLint location - GLdouble x - - - void glUniform1dv - GLint location - GLsizei count - const GLdouble *value - - - void glUniform1f - GLint location - GLfloat v0 - - - void glUniform1fARB - GLint location - GLfloat v0 - - - - void glUniform1fv - GLint location - GLsizei count - const GLfloat *value - - - void glUniform1fvARB - GLint location - GLsizei count - const GLfloat *value - - - - void glUniform1i - GLint location - GLint v0 - - - void glUniform1i64ARB - GLint location - GLint64 x - - - void glUniform1i64NV - GLint location - GLint64EXT x - - - void glUniform1i64vARB - GLint location - GLsizei count - const GLint64 *value - - - void glUniform1i64vNV - GLint location - GLsizei count - const GLint64EXT *value - - - void glUniform1iARB - GLint location - GLint v0 - - - - void glUniform1iv - GLint location - GLsizei count - const GLint *value - - - void glUniform1ivARB - GLint location - GLsizei count - const GLint *value - - - - void glUniform1ui - GLint location - GLuint v0 - - - void glUniform1ui64ARB - GLint location - GLuint64 x - - - void glUniform1ui64NV - GLint location - GLuint64EXT x - - - void glUniform1ui64vARB - GLint location - GLsizei count - const GLuint64 *value - - - void glUniform1ui64vNV - GLint location - GLsizei count - const GLuint64EXT *value - - - void glUniform1uiEXT - GLint location - GLuint v0 - - - - void glUniform1uiv - GLint location - GLsizei count - const GLuint *value - - - void glUniform1uivEXT - GLint location - GLsizei count - const GLuint *value - - - - void glUniform2d - GLint location - GLdouble x - GLdouble y - - - void glUniform2dv - GLint location - GLsizei count - const GLdouble *value - - - void glUniform2f - GLint location - GLfloat v0 - GLfloat v1 - - - void glUniform2fARB - GLint location - GLfloat v0 - GLfloat v1 - - - - void glUniform2fv - GLint location - GLsizei count - const GLfloat *value - - - void glUniform2fvARB - GLint location - GLsizei count - const GLfloat *value - - - - void glUniform2i - GLint location - GLint v0 - GLint v1 - - - void glUniform2i64ARB - GLint location - GLint64 x - GLint64 y - - - void glUniform2i64NV - GLint location - GLint64EXT x - GLint64EXT y - - - void glUniform2i64vARB - GLint location - GLsizei count - const GLint64 *value - - - void glUniform2i64vNV - GLint location - GLsizei count - const GLint64EXT *value - - - void glUniform2iARB - GLint location - GLint v0 - GLint v1 - - - - void glUniform2iv - GLint location - GLsizei count - const GLint *value - - - void glUniform2ivARB - GLint location - GLsizei count - const GLint *value - - - - void glUniform2ui - GLint location - GLuint v0 - GLuint v1 - - - void glUniform2ui64ARB - GLint location - GLuint64 x - GLuint64 y - - - void glUniform2ui64NV - GLint location - GLuint64EXT x - GLuint64EXT y - - - void glUniform2ui64vARB - GLint location - GLsizei count - const GLuint64 *value - - - void glUniform2ui64vNV - GLint location - GLsizei count - const GLuint64EXT *value - - - void glUniform2uiEXT - GLint location - GLuint v0 - GLuint v1 - - - - void glUniform2uiv - GLint location - GLsizei count - const GLuint *value - - - void glUniform2uivEXT - GLint location - GLsizei count - const GLuint *value - - - - void glUniform3d - GLint location - GLdouble x - GLdouble y - GLdouble z - - - void glUniform3dv - GLint location - GLsizei count - const GLdouble *value - - - void glUniform3f - GLint location - GLfloat v0 - GLfloat v1 - GLfloat v2 - - - void glUniform3fARB - GLint location - GLfloat v0 - GLfloat v1 - GLfloat v2 - - - - void glUniform3fv - GLint location - GLsizei count - const GLfloat *value - - - void glUniform3fvARB - GLint location - GLsizei count - const GLfloat *value - - - - void glUniform3i - GLint location - GLint v0 - GLint v1 - GLint v2 - - - void glUniform3i64ARB - GLint location - GLint64 x - GLint64 y - GLint64 z - - - void glUniform3i64NV - GLint location - GLint64EXT x - GLint64EXT y - GLint64EXT z - - - void glUniform3i64vARB - GLint location - GLsizei count - const GLint64 *value - - - void glUniform3i64vNV - GLint location - GLsizei count - const GLint64EXT *value - - - void glUniform3iARB - GLint location - GLint v0 - GLint v1 - GLint v2 - - - - void glUniform3iv - GLint location - GLsizei count - const GLint *value - - - void glUniform3ivARB - GLint location - GLsizei count - const GLint *value - - - - void glUniform3ui - GLint location - GLuint v0 - GLuint v1 - GLuint v2 - - - void glUniform3ui64ARB - GLint location - GLuint64 x - GLuint64 y - GLuint64 z - - - void glUniform3ui64NV - GLint location - GLuint64EXT x - GLuint64EXT y - GLuint64EXT z - - - void glUniform3ui64vARB - GLint location - GLsizei count - const GLuint64 *value - - - void glUniform3ui64vNV - GLint location - GLsizei count - const GLuint64EXT *value - - - void glUniform3uiEXT - GLint location - GLuint v0 - GLuint v1 - GLuint v2 - - - - void glUniform3uiv - GLint location - GLsizei count - const GLuint *value - - - void glUniform3uivEXT - GLint location - GLsizei count - const GLuint *value - - - - void glUniform4d - GLint location - GLdouble x - GLdouble y - GLdouble z - GLdouble w - - - void glUniform4dv - GLint location - GLsizei count - const GLdouble *value - - - void glUniform4f - GLint location - GLfloat v0 - GLfloat v1 - GLfloat v2 - GLfloat v3 - - - void glUniform4fARB - GLint location - GLfloat v0 - GLfloat v1 - GLfloat v2 - GLfloat v3 - - - - void glUniform4fv - GLint location - GLsizei count - const GLfloat *value - - - void glUniform4fvARB - GLint location - GLsizei count - const GLfloat *value - - - - void glUniform4i - GLint location - GLint v0 - GLint v1 - GLint v2 - GLint v3 - - - void glUniform4i64ARB - GLint location - GLint64 x - GLint64 y - GLint64 z - GLint64 w - - - void glUniform4i64NV - GLint location - GLint64EXT x - GLint64EXT y - GLint64EXT z - GLint64EXT w - - - void glUniform4i64vARB - GLint location - GLsizei count - const GLint64 *value - - - void glUniform4i64vNV - GLint location - GLsizei count - const GLint64EXT *value - - - void glUniform4iARB - GLint location - GLint v0 - GLint v1 - GLint v2 - GLint v3 - - - - void glUniform4iv - GLint location - GLsizei count - const GLint *value - - - void glUniform4ivARB - GLint location - GLsizei count - const GLint *value - - - - void glUniform4ui - GLint location - GLuint v0 - GLuint v1 - GLuint v2 - GLuint v3 - - - void glUniform4ui64ARB - GLint location - GLuint64 x - GLuint64 y - GLuint64 z - GLuint64 w - - - void glUniform4ui64NV - GLint location - GLuint64EXT x - GLuint64EXT y - GLuint64EXT z - GLuint64EXT w - - - void glUniform4ui64vARB - GLint location - GLsizei count - const GLuint64 *value - - - void glUniform4ui64vNV - GLint location - GLsizei count - const GLuint64EXT *value - - - void glUniform4uiEXT - GLint location - GLuint v0 - GLuint v1 - GLuint v2 - GLuint v3 - - - - void glUniform4uiv - GLint location - GLsizei count - const GLuint *value - - - void glUniform4uivEXT - GLint location - GLsizei count - const GLuint *value - - - - void glUniformBlockBinding - GLuint program - GLuint uniformBlockIndex - GLuint uniformBlockBinding - - - - void glUniformBufferEXT - GLuint program - GLint location - GLuint buffer - - - void glUniformHandleui64ARB - GLint location - GLuint64 value - - - void glUniformHandleui64IMG - GLint location - GLuint64 value - - - - void glUniformHandleui64NV - GLint location - GLuint64 value - - - void glUniformHandleui64vARB - GLint location - GLsizei count - const GLuint64 *value - - - void glUniformHandleui64vIMG - GLint location - GLsizei count - const GLuint64 *value - - - - void glUniformHandleui64vNV - GLint location - GLsizei count - const GLuint64 *value - - - void glUniformMatrix2dv - GLint location - GLsizei count - GLboolean transpose - const GLdouble *value - - - void glUniformMatrix2fv - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - void glUniformMatrix2fvARB - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - - void glUniformMatrix2x3dv - GLint location - GLsizei count - GLboolean transpose - const GLdouble *value - - - void glUniformMatrix2x3fv - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - - void glUniformMatrix2x3fvNV - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - - void glUniformMatrix2x4dv - GLint location - GLsizei count - GLboolean transpose - const GLdouble *value - - - void glUniformMatrix2x4fv - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - - void glUniformMatrix2x4fvNV - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - - void glUniformMatrix3dv - GLint location - GLsizei count - GLboolean transpose - const GLdouble *value - - - void glUniformMatrix3fv - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - void glUniformMatrix3fvARB - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - - void glUniformMatrix3x2dv - GLint location - GLsizei count - GLboolean transpose - const GLdouble *value - - - void glUniformMatrix3x2fv - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - - void glUniformMatrix3x2fvNV - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - - void glUniformMatrix3x4dv - GLint location - GLsizei count - GLboolean transpose - const GLdouble *value - - - void glUniformMatrix3x4fv - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - - void glUniformMatrix3x4fvNV - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - - void glUniformMatrix4dv - GLint location - GLsizei count - GLboolean transpose - const GLdouble *value - - - void glUniformMatrix4fv - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - void glUniformMatrix4fvARB - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - - void glUniformMatrix4x2dv - GLint location - GLsizei count - GLboolean transpose - const GLdouble *value - - - void glUniformMatrix4x2fv - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - - void glUniformMatrix4x2fvNV - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - - void glUniformMatrix4x3dv - GLint location - GLsizei count - GLboolean transpose - const GLdouble *value - - - void glUniformMatrix4x3fv - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - - void glUniformMatrix4x3fvNV - GLint location - GLsizei count - GLboolean transpose - const GLfloat *value - - - - void glUniformSubroutinesuiv - GLenum shadertype - GLsizei count - const GLuint *indices - - - void glUniformui64NV - GLint location - GLuint64EXT value - - - void glUniformui64vNV - GLint location - GLsizei count - const GLuint64EXT *value - - - void glUnlockArraysEXT - - - GLboolean glUnmapBuffer - GLenum target - - - GLboolean glUnmapBufferARB - GLenum target - - - - GLboolean glUnmapBufferOES - GLenum target - - - - GLboolean glUnmapNamedBuffer - GLuint buffer - - - GLboolean glUnmapNamedBufferEXT - GLuint buffer - - - void glUnmapObjectBufferATI - GLuint buffer - - - void glUnmapTexture2DINTEL - GLuint texture - GLint level - - - void glUpdateObjectBufferATI - GLuint buffer - GLuint offset - GLsizei size - const void *pointer - GLenum preserve - - - void glUploadGpuMaskNVX - GLbitfield mask - - - void glUseProgram - GLuint program - - - void glUseProgramObjectARB - GLhandleARB programObj - - - - void glUseProgramStages - GLuint pipeline - GLbitfield stages - GLuint program - - - void glUseProgramStagesEXT - GLuint pipeline - GLbitfield stages - GLuint program - - - void glUseShaderProgramEXT - GLenum type - GLuint program - - - void glVDPAUFiniNV - - - void glVDPAUGetSurfaceivNV - GLvdpauSurfaceNV surface - GLenum pname - GLsizei count - GLsizei *length - GLint *values - - - void glVDPAUInitNV - const void *vdpDevice - const void *getProcAddress - - - GLboolean glVDPAUIsSurfaceNV - GLvdpauSurfaceNV surface - - - void glVDPAUMapSurfacesNV - GLsizei numSurfaces - const GLvdpauSurfaceNV *surfaces - - - GLvdpauSurfaceNV glVDPAURegisterOutputSurfaceNV - const void *vdpSurface - GLenum target - GLsizei numTextureNames - const GLuint *textureNames - - - GLvdpauSurfaceNV glVDPAURegisterVideoSurfaceNV - const void *vdpSurface - GLenum target - GLsizei numTextureNames - const GLuint *textureNames - - - GLvdpauSurfaceNV glVDPAURegisterVideoSurfaceWithPictureStructureNV - const void *vdpSurface - GLenum target - GLsizei numTextureNames - const GLuint *textureNames - GLboolean isFrameStructure - - - void glVDPAUSurfaceAccessNV - GLvdpauSurfaceNV surface - GLenum access - - - void glVDPAUUnmapSurfacesNV - GLsizei numSurface - const GLvdpauSurfaceNV *surfaces - - - void glVDPAUUnregisterSurfaceNV - GLvdpauSurfaceNV surface - - - void glValidateProgram - GLuint program - - - void glValidateProgramARB - GLhandleARB programObj - - - - void glValidateProgramPipeline - GLuint pipeline - - - void glValidateProgramPipelineEXT - GLuint pipeline - - - void glVariantArrayObjectATI - GLuint id - GLenum type - GLsizei stride - GLuint buffer - GLuint offset - - - void glVariantPointerEXT - GLuint id - GLenum type - GLuint stride - const void *addr - - - void glVariantbvEXT - GLuint id - const GLbyte *addr - - - void glVariantdvEXT - GLuint id - const GLdouble *addr - - - void glVariantfvEXT - GLuint id - const GLfloat *addr - - - void glVariantivEXT - GLuint id - const GLint *addr - - - void glVariantsvEXT - GLuint id - const GLshort *addr - - - void glVariantubvEXT - GLuint id - const GLubyte *addr - - - void glVariantuivEXT - GLuint id - const GLuint *addr - - - void glVariantusvEXT - GLuint id - const GLushort *addr - - - void glVertex2bOES - GLbyte x - GLbyte y - - - void glVertex2bvOES - const GLbyte *coords - - - void glVertex2d - GLdouble x - GLdouble y - - - - void glVertex2dv - const GLdouble *v - - - - void glVertex2f - GLfloat x - GLfloat y - - - - void glVertex2fv - const GLfloat *v - - - - void glVertex2hNV - GLhalfNV x - GLhalfNV y - - - - void glVertex2hvNV - const GLhalfNV *v - - - - void glVertex2i - GLint x - GLint y - - - - void glVertex2iv - const GLint *v - - - - void glVertex2s - GLshort x - GLshort y - - - - void glVertex2sv - const GLshort *v - - - - void glVertex2xOES - GLfixed x - - - void glVertex2xvOES - const GLfixed *coords - - - void glVertex3bOES - GLbyte x - GLbyte y - GLbyte z - - - void glVertex3bvOES - const GLbyte *coords - - - void glVertex3d - GLdouble x - GLdouble y - GLdouble z - - - - void glVertex3dv - const GLdouble *v - - - - void glVertex3f - GLfloat x - GLfloat y - GLfloat z - - - - void glVertex3fv - const GLfloat *v - - - - void glVertex3hNV - GLhalfNV x - GLhalfNV y - GLhalfNV z - - - - void glVertex3hvNV - const GLhalfNV *v - - - - void glVertex3i - GLint x - GLint y - GLint z - - - - void glVertex3iv - const GLint *v - - - - void glVertex3s - GLshort x - GLshort y - GLshort z - - - - void glVertex3sv - const GLshort *v - - - - void glVertex3xOES - GLfixed x - GLfixed y - - - void glVertex3xvOES - const GLfixed *coords - - - void glVertex4bOES - GLbyte x - GLbyte y - GLbyte z - GLbyte w - - - void glVertex4bvOES - const GLbyte *coords - - - void glVertex4d - GLdouble x - GLdouble y - GLdouble z - GLdouble w - - - - void glVertex4dv - const GLdouble *v - - - - void glVertex4f - GLfloat x - GLfloat y - GLfloat z - GLfloat w - - - - void glVertex4fv - const GLfloat *v - - - - void glVertex4hNV - GLhalfNV x - GLhalfNV y - GLhalfNV z - GLhalfNV w - - - - void glVertex4hvNV - const GLhalfNV *v - - - - void glVertex4i - GLint x - GLint y - GLint z - GLint w - - - - void glVertex4iv - const GLint *v - - - - void glVertex4s - GLshort x - GLshort y - GLshort z - GLshort w - - - - void glVertex4sv - const GLshort *v - - - - void glVertex4xOES - GLfixed x - GLfixed y - GLfixed z - - - void glVertex4xvOES - const GLfixed *coords - - - void glVertexArrayAttribBinding - GLuint vaobj - GLuint attribindex - GLuint bindingindex - - - void glVertexArrayAttribFormat - GLuint vaobj - GLuint attribindex - GLint size - GLenum type - GLboolean normalized - GLuint relativeoffset - - - void glVertexArrayAttribIFormat - GLuint vaobj - GLuint attribindex - GLint size - GLenum type - GLuint relativeoffset - - - void glVertexArrayAttribLFormat - GLuint vaobj - GLuint attribindex - GLint size - GLenum type - GLuint relativeoffset - - - void glVertexArrayBindVertexBufferEXT - GLuint vaobj - GLuint bindingindex - GLuint buffer - GLintptr offset - GLsizei stride - - - void glVertexArrayBindingDivisor - GLuint vaobj - GLuint bindingindex - GLuint divisor - - - void glVertexArrayColorOffsetEXT - GLuint vaobj - GLuint buffer - GLint size - GLenum type - GLsizei stride - GLintptr offset - - - void glVertexArrayEdgeFlagOffsetEXT - GLuint vaobj - GLuint buffer - GLsizei stride - GLintptr offset - - - void glVertexArrayElementBuffer - GLuint vaobj - GLuint buffer - - - void glVertexArrayFogCoordOffsetEXT - GLuint vaobj - GLuint buffer - GLenum type - GLsizei stride - GLintptr offset - - - void glVertexArrayIndexOffsetEXT - GLuint vaobj - GLuint buffer - GLenum type - GLsizei stride - GLintptr offset - - - void glVertexArrayMultiTexCoordOffsetEXT - GLuint vaobj - GLuint buffer - GLenum texunit - GLint size - GLenum type - GLsizei stride - GLintptr offset - - - void glVertexArrayNormalOffsetEXT - GLuint vaobj - GLuint buffer - GLenum type - GLsizei stride - GLintptr offset - - - void glVertexArrayParameteriAPPLE - GLenum pname - GLint param - - - void glVertexArrayRangeAPPLE - GLsizei length - void *pointer - - - void glVertexArrayRangeNV - GLsizei length - const void *pointer - - - void glVertexArraySecondaryColorOffsetEXT - GLuint vaobj - GLuint buffer - GLint size - GLenum type - GLsizei stride - GLintptr offset - - - void glVertexArrayTexCoordOffsetEXT - GLuint vaobj - GLuint buffer - GLint size - GLenum type - GLsizei stride - GLintptr offset - - - void glVertexArrayVertexAttribBindingEXT - GLuint vaobj - GLuint attribindex - GLuint bindingindex - - - void glVertexArrayVertexAttribDivisorEXT - GLuint vaobj - GLuint index - GLuint divisor - - - void glVertexArrayVertexAttribFormatEXT - GLuint vaobj - GLuint attribindex - GLint size - GLenum type - GLboolean normalized - GLuint relativeoffset - - - void glVertexArrayVertexAttribIFormatEXT - GLuint vaobj - GLuint attribindex - GLint size - GLenum type - GLuint relativeoffset - - - void glVertexArrayVertexAttribIOffsetEXT - GLuint vaobj - GLuint buffer - GLuint index - GLint size - GLenum type - GLsizei stride - GLintptr offset - - - void glVertexArrayVertexAttribLFormatEXT - GLuint vaobj - GLuint attribindex - GLint size - GLenum type - GLuint relativeoffset - - - void glVertexArrayVertexAttribLOffsetEXT - GLuint vaobj - GLuint buffer - GLuint index - GLint size - GLenum type - GLsizei stride - GLintptr offset - - - void glVertexArrayVertexAttribOffsetEXT - GLuint vaobj - GLuint buffer - GLuint index - GLint size - GLenum type - GLboolean normalized - GLsizei stride - GLintptr offset - - - void glVertexArrayVertexBindingDivisorEXT - GLuint vaobj - GLuint bindingindex - GLuint divisor - - - void glVertexArrayVertexBuffer - GLuint vaobj - GLuint bindingindex - GLuint buffer - GLintptr offset - GLsizei stride - - - void glVertexArrayVertexBuffers - GLuint vaobj - GLuint first - GLsizei count - const GLuint *buffers - const GLintptr *offsets - const GLsizei *strides - - - void glVertexArrayVertexOffsetEXT - GLuint vaobj - GLuint buffer - GLint size - GLenum type - GLsizei stride - GLintptr offset - - - void glVertexAttrib1d - GLuint index - GLdouble x - - - - void glVertexAttrib1dARB - GLuint index - GLdouble x - - - - - void glVertexAttrib1dNV - GLuint index - GLdouble x - - - - - void glVertexAttrib1dv - GLuint index - const GLdouble *v - - - - void glVertexAttrib1dvARB - GLuint index - const GLdouble *v - - - - - void glVertexAttrib1dvNV - GLuint index - const GLdouble *v - - - - - void glVertexAttrib1f - GLuint index - GLfloat x - - - - void glVertexAttrib1fARB - GLuint index - GLfloat x - - - - - void glVertexAttrib1fNV - GLuint index - GLfloat x - - - - - void glVertexAttrib1fv - GLuint index - const GLfloat *v - - - - void glVertexAttrib1fvARB - GLuint index - const GLfloat *v - - - - - void glVertexAttrib1fvNV - GLuint index - const GLfloat *v - - - - - void glVertexAttrib1hNV - GLuint index - GLhalfNV x - - - - void glVertexAttrib1hvNV - GLuint index - const GLhalfNV *v - - - - void glVertexAttrib1s - GLuint index - GLshort x - - - - void glVertexAttrib1sARB - GLuint index - GLshort x - - - - - void glVertexAttrib1sNV - GLuint index - GLshort x - - - - - void glVertexAttrib1sv - GLuint index - const GLshort *v - - - - void glVertexAttrib1svARB - GLuint index - const GLshort *v - - - - - void glVertexAttrib1svNV - GLuint index - const GLshort *v - - - - - void glVertexAttrib2d - GLuint index - GLdouble x - GLdouble y - - - - void glVertexAttrib2dARB - GLuint index - GLdouble x - GLdouble y - - - - - void glVertexAttrib2dNV - GLuint index - GLdouble x - GLdouble y - - - - - void glVertexAttrib2dv - GLuint index - const GLdouble *v - - - - void glVertexAttrib2dvARB - GLuint index - const GLdouble *v - - - - - void glVertexAttrib2dvNV - GLuint index - const GLdouble *v - - - - - void glVertexAttrib2f - GLuint index - GLfloat x - GLfloat y - - - - void glVertexAttrib2fARB - GLuint index - GLfloat x - GLfloat y - - - - - void glVertexAttrib2fNV - GLuint index - GLfloat x - GLfloat y - - - - - void glVertexAttrib2fv - GLuint index - const GLfloat *v - - - - void glVertexAttrib2fvARB - GLuint index - const GLfloat *v - - - - - void glVertexAttrib2fvNV - GLuint index - const GLfloat *v - - - - - void glVertexAttrib2hNV - GLuint index - GLhalfNV x - GLhalfNV y - - - - void glVertexAttrib2hvNV - GLuint index - const GLhalfNV *v - - - - void glVertexAttrib2s - GLuint index - GLshort x - GLshort y - - - - void glVertexAttrib2sARB - GLuint index - GLshort x - GLshort y - - - - - void glVertexAttrib2sNV - GLuint index - GLshort x - GLshort y - - - - - void glVertexAttrib2sv - GLuint index - const GLshort *v - - - - void glVertexAttrib2svARB - GLuint index - const GLshort *v - - - - - void glVertexAttrib2svNV - GLuint index - const GLshort *v - - - - - void glVertexAttrib3d - GLuint index - GLdouble x - GLdouble y - GLdouble z - - - - void glVertexAttrib3dARB - GLuint index - GLdouble x - GLdouble y - GLdouble z - - - - - void glVertexAttrib3dNV - GLuint index - GLdouble x - GLdouble y - GLdouble z - - - - - void glVertexAttrib3dv - GLuint index - const GLdouble *v - - - - void glVertexAttrib3dvARB - GLuint index - const GLdouble *v - - - - - void glVertexAttrib3dvNV - GLuint index - const GLdouble *v - - - - - void glVertexAttrib3f - GLuint index - GLfloat x - GLfloat y - GLfloat z - - - - void glVertexAttrib3fARB - GLuint index - GLfloat x - GLfloat y - GLfloat z - - - - - void glVertexAttrib3fNV - GLuint index - GLfloat x - GLfloat y - GLfloat z - - - - - void glVertexAttrib3fv - GLuint index - const GLfloat *v - - - - void glVertexAttrib3fvARB - GLuint index - const GLfloat *v - - - - - void glVertexAttrib3fvNV - GLuint index - const GLfloat *v - - - - - void glVertexAttrib3hNV - GLuint index - GLhalfNV x - GLhalfNV y - GLhalfNV z - - - - void glVertexAttrib3hvNV - GLuint index - const GLhalfNV *v - - - - void glVertexAttrib3s - GLuint index - GLshort x - GLshort y - GLshort z - - - - void glVertexAttrib3sARB - GLuint index - GLshort x - GLshort y - GLshort z - - - - - void glVertexAttrib3sNV - GLuint index - GLshort x - GLshort y - GLshort z - - - - - void glVertexAttrib3sv - GLuint index - const GLshort *v - - - - void glVertexAttrib3svARB - GLuint index - const GLshort *v - - - - - void glVertexAttrib3svNV - GLuint index - const GLshort *v - - - - - void glVertexAttrib4Nbv - GLuint index - const GLbyte *v - - - void glVertexAttrib4NbvARB - GLuint index - const GLbyte *v - - - - void glVertexAttrib4Niv - GLuint index - const GLint *v - - - void glVertexAttrib4NivARB - GLuint index - const GLint *v - - - - void glVertexAttrib4Nsv - GLuint index - const GLshort *v - - - void glVertexAttrib4NsvARB - GLuint index - const GLshort *v - - - - void glVertexAttrib4Nub - GLuint index - GLubyte x - GLubyte y - GLubyte z - GLubyte w - - - void glVertexAttrib4NubARB - GLuint index - GLubyte x - GLubyte y - GLubyte z - GLubyte w - - - - void glVertexAttrib4Nubv - GLuint index - const GLubyte *v - - - - void glVertexAttrib4NubvARB - GLuint index - const GLubyte *v - - - - - void glVertexAttrib4Nuiv - GLuint index - const GLuint *v - - - void glVertexAttrib4NuivARB - GLuint index - const GLuint *v - - - - void glVertexAttrib4Nusv - GLuint index - const GLushort *v - - - void glVertexAttrib4NusvARB - GLuint index - const GLushort *v - - - - void glVertexAttrib4bv - GLuint index - const GLbyte *v - - - void glVertexAttrib4bvARB - GLuint index - const GLbyte *v - - - - void glVertexAttrib4d - GLuint index - GLdouble x - GLdouble y - GLdouble z - GLdouble w - - - - void glVertexAttrib4dARB - GLuint index - GLdouble x - GLdouble y - GLdouble z - GLdouble w - - - - - void glVertexAttrib4dNV - GLuint index - GLdouble x - GLdouble y - GLdouble z - GLdouble w - - - - - void glVertexAttrib4dv - GLuint index - const GLdouble *v - - - - void glVertexAttrib4dvARB - GLuint index - const GLdouble *v - - - - - void glVertexAttrib4dvNV - GLuint index - const GLdouble *v - - - - - void glVertexAttrib4f - GLuint index - GLfloat x - GLfloat y - GLfloat z - GLfloat w - - - - void glVertexAttrib4fARB - GLuint index - GLfloat x - GLfloat y - GLfloat z - GLfloat w - - - - - void glVertexAttrib4fNV - GLuint index - GLfloat x - GLfloat y - GLfloat z - GLfloat w - - - - - void glVertexAttrib4fv - GLuint index - const GLfloat *v - - - - void glVertexAttrib4fvARB - GLuint index - const GLfloat *v - - - - - void glVertexAttrib4fvNV - GLuint index - const GLfloat *v - - - - - void glVertexAttrib4hNV - GLuint index - GLhalfNV x - GLhalfNV y - GLhalfNV z - GLhalfNV w - - - - void glVertexAttrib4hvNV - GLuint index - const GLhalfNV *v - - - - void glVertexAttrib4iv - GLuint index - const GLint *v - - - void glVertexAttrib4ivARB - GLuint index - const GLint *v - - - - void glVertexAttrib4s - GLuint index - GLshort x - GLshort y - GLshort z - GLshort w - - - - void glVertexAttrib4sARB - GLuint index - GLshort x - GLshort y - GLshort z - GLshort w - - - - - void glVertexAttrib4sNV - GLuint index - GLshort x - GLshort y - GLshort z - GLshort w - - - - - void glVertexAttrib4sv - GLuint index - const GLshort *v - - - - void glVertexAttrib4svARB - GLuint index - const GLshort *v - - - - - void glVertexAttrib4svNV - GLuint index - const GLshort *v - - - - - void glVertexAttrib4ubNV - GLuint index - GLubyte x - GLubyte y - GLubyte z - GLubyte w - - - - - void glVertexAttrib4ubv - GLuint index - const GLubyte *v - - - void glVertexAttrib4ubvARB - GLuint index - const GLubyte *v - - - - void glVertexAttrib4ubvNV - GLuint index - const GLubyte *v - - - - - void glVertexAttrib4uiv - GLuint index - const GLuint *v - - - void glVertexAttrib4uivARB - GLuint index - const GLuint *v - - - - void glVertexAttrib4usv - GLuint index - const GLushort *v - - - void glVertexAttrib4usvARB - GLuint index - const GLushort *v - - - - void glVertexAttribArrayObjectATI - GLuint index - GLint size - GLenum type - GLboolean normalized - GLsizei stride - GLuint buffer - GLuint offset - - - void glVertexAttribBinding - GLuint attribindex - GLuint bindingindex - - - void glVertexAttribDivisor - GLuint index - GLuint divisor - - - void glVertexAttribDivisorANGLE - GLuint index - GLuint divisor - - - - void glVertexAttribDivisorARB - GLuint index - GLuint divisor - - - - void glVertexAttribDivisorEXT - GLuint index - GLuint divisor - - - - void glVertexAttribDivisorNV - GLuint index - GLuint divisor - - - - void glVertexAttribFormat - GLuint attribindex - GLint size - GLenum type - GLboolean normalized - GLuint relativeoffset - - - void glVertexAttribFormatNV - GLuint index - GLint size - GLenum type - GLboolean normalized - GLsizei stride - - - void glVertexAttribI1i - GLuint index - GLint x - - - - void glVertexAttribI1iEXT - GLuint index - GLint x - - - - - void glVertexAttribI1iv - GLuint index - const GLint *v - - - void glVertexAttribI1ivEXT - GLuint index - const GLint *v - - - - void glVertexAttribI1ui - GLuint index - GLuint x - - - - void glVertexAttribI1uiEXT - GLuint index - GLuint x - - - - - void glVertexAttribI1uiv - GLuint index - const GLuint *v - - - void glVertexAttribI1uivEXT - GLuint index - const GLuint *v - - - - void glVertexAttribI2i - GLuint index - GLint x - GLint y - - - - void glVertexAttribI2iEXT - GLuint index - GLint x - GLint y - - - - - void glVertexAttribI2iv - GLuint index - const GLint *v - - - void glVertexAttribI2ivEXT - GLuint index - const GLint *v - - - - void glVertexAttribI2ui - GLuint index - GLuint x - GLuint y - - - - void glVertexAttribI2uiEXT - GLuint index - GLuint x - GLuint y - - - - - void glVertexAttribI2uiv - GLuint index - const GLuint *v - - - void glVertexAttribI2uivEXT - GLuint index - const GLuint *v - - - - void glVertexAttribI3i - GLuint index - GLint x - GLint y - GLint z - - - - void glVertexAttribI3iEXT - GLuint index - GLint x - GLint y - GLint z - - - - - void glVertexAttribI3iv - GLuint index - const GLint *v - - - void glVertexAttribI3ivEXT - GLuint index - const GLint *v - - - - void glVertexAttribI3ui - GLuint index - GLuint x - GLuint y - GLuint z - - - - void glVertexAttribI3uiEXT - GLuint index - GLuint x - GLuint y - GLuint z - - - - - void glVertexAttribI3uiv - GLuint index - const GLuint *v - - - void glVertexAttribI3uivEXT - GLuint index - const GLuint *v - - - - void glVertexAttribI4bv - GLuint index - const GLbyte *v - - - void glVertexAttribI4bvEXT - GLuint index - const GLbyte *v - - - - void glVertexAttribI4i - GLuint index - GLint x - GLint y - GLint z - GLint w - - - - void glVertexAttribI4iEXT - GLuint index - GLint x - GLint y - GLint z - GLint w - - - - - void glVertexAttribI4iv - GLuint index - const GLint *v - - - void glVertexAttribI4ivEXT - GLuint index - const GLint *v - - - - void glVertexAttribI4sv - GLuint index - const GLshort *v - - - void glVertexAttribI4svEXT - GLuint index - const GLshort *v - - - - void glVertexAttribI4ubv - GLuint index - const GLubyte *v - - - void glVertexAttribI4ubvEXT - GLuint index - const GLubyte *v - - - - void glVertexAttribI4ui - GLuint index - GLuint x - GLuint y - GLuint z - GLuint w - - - - void glVertexAttribI4uiEXT - GLuint index - GLuint x - GLuint y - GLuint z - GLuint w - - - - - void glVertexAttribI4uiv - GLuint index - const GLuint *v - - - void glVertexAttribI4uivEXT - GLuint index - const GLuint *v - - - - void glVertexAttribI4usv - GLuint index - const GLushort *v - - - void glVertexAttribI4usvEXT - GLuint index - const GLushort *v - - - - void glVertexAttribIFormat - GLuint attribindex - GLint size - GLenum type - GLuint relativeoffset - - - void glVertexAttribIFormatNV - GLuint index - GLint size - GLenum type - GLsizei stride - - - void glVertexAttribIPointer - GLuint index - GLint size - GLenum type - GLsizei stride - const void *pointer - - - void glVertexAttribIPointerEXT - GLuint index - GLint size - GLenum type - GLsizei stride - const void *pointer - - - - void glVertexAttribL1d - GLuint index - GLdouble x - - - void glVertexAttribL1dEXT - GLuint index - GLdouble x - - - - void glVertexAttribL1dv - GLuint index - const GLdouble *v - - - void glVertexAttribL1dvEXT - GLuint index - const GLdouble *v - - - - void glVertexAttribL1i64NV - GLuint index - GLint64EXT x - - - void glVertexAttribL1i64vNV - GLuint index - const GLint64EXT *v - - - void glVertexAttribL1ui64ARB - GLuint index - GLuint64EXT x - - - void glVertexAttribL1ui64NV - GLuint index - GLuint64EXT x - - - void glVertexAttribL1ui64vARB - GLuint index - const GLuint64EXT *v - - - void glVertexAttribL1ui64vNV - GLuint index - const GLuint64EXT *v - - - void glVertexAttribL2d - GLuint index - GLdouble x - GLdouble y - - - void glVertexAttribL2dEXT - GLuint index - GLdouble x - GLdouble y - - - - void glVertexAttribL2dv - GLuint index - const GLdouble *v - - - void glVertexAttribL2dvEXT - GLuint index - const GLdouble *v - - - - void glVertexAttribL2i64NV - GLuint index - GLint64EXT x - GLint64EXT y - - - void glVertexAttribL2i64vNV - GLuint index - const GLint64EXT *v - - - void glVertexAttribL2ui64NV - GLuint index - GLuint64EXT x - GLuint64EXT y - - - void glVertexAttribL2ui64vNV - GLuint index - const GLuint64EXT *v - - - void glVertexAttribL3d - GLuint index - GLdouble x - GLdouble y - GLdouble z - - - void glVertexAttribL3dEXT - GLuint index - GLdouble x - GLdouble y - GLdouble z - - - - void glVertexAttribL3dv - GLuint index - const GLdouble *v - - - void glVertexAttribL3dvEXT - GLuint index - const GLdouble *v - - - - void glVertexAttribL3i64NV - GLuint index - GLint64EXT x - GLint64EXT y - GLint64EXT z - - - void glVertexAttribL3i64vNV - GLuint index - const GLint64EXT *v - - - void glVertexAttribL3ui64NV - GLuint index - GLuint64EXT x - GLuint64EXT y - GLuint64EXT z - - - void glVertexAttribL3ui64vNV - GLuint index - const GLuint64EXT *v - - - void glVertexAttribL4d - GLuint index - GLdouble x - GLdouble y - GLdouble z - GLdouble w - - - void glVertexAttribL4dEXT - GLuint index - GLdouble x - GLdouble y - GLdouble z - GLdouble w - - - - void glVertexAttribL4dv - GLuint index - const GLdouble *v - - - void glVertexAttribL4dvEXT - GLuint index - const GLdouble *v - - - - void glVertexAttribL4i64NV - GLuint index - GLint64EXT x - GLint64EXT y - GLint64EXT z - GLint64EXT w - - - void glVertexAttribL4i64vNV - GLuint index - const GLint64EXT *v - - - void glVertexAttribL4ui64NV - GLuint index - GLuint64EXT x - GLuint64EXT y - GLuint64EXT z - GLuint64EXT w - - - void glVertexAttribL4ui64vNV - GLuint index - const GLuint64EXT *v - - - void glVertexAttribLFormat - GLuint attribindex - GLint size - GLenum type - GLuint relativeoffset - - - void glVertexAttribLFormatNV - GLuint index - GLint size - GLenum type - GLsizei stride - - - void glVertexAttribLPointer - GLuint index - GLint size - GLenum type - GLsizei stride - const void *pointer - - - void glVertexAttribLPointerEXT - GLuint index - GLint size - GLenum type - GLsizei stride - const void *pointer - - - - void glVertexAttribP1ui - GLuint index - GLenum type - GLboolean normalized - GLuint value - - - void glVertexAttribP1uiv - GLuint index - GLenum type - GLboolean normalized - const GLuint *value - - - void glVertexAttribP2ui - GLuint index - GLenum type - GLboolean normalized - GLuint value - - - void glVertexAttribP2uiv - GLuint index - GLenum type - GLboolean normalized - const GLuint *value - - - void glVertexAttribP3ui - GLuint index - GLenum type - GLboolean normalized - GLuint value - - - void glVertexAttribP3uiv - GLuint index - GLenum type - GLboolean normalized - const GLuint *value - - - void glVertexAttribP4ui - GLuint index - GLenum type - GLboolean normalized - GLuint value - - - void glVertexAttribP4uiv - GLuint index - GLenum type - GLboolean normalized - const GLuint *value - - - void glVertexAttribParameteriAMD - GLuint index - GLenum pname - GLint param - - - void glVertexAttribPointer - GLuint index - GLint size - GLenum type - GLboolean normalized - GLsizei stride - const void *pointer - - - void glVertexAttribPointerARB - GLuint index - GLint size - GLenum type - GLboolean normalized - GLsizei stride - const void *pointer - - - - void glVertexAttribPointerNV - GLuint index - GLint fsize - GLenum type - GLsizei stride - const void *pointer - - - void glVertexAttribs1dvNV - GLuint index - GLsizei count - const GLdouble *v - - - - void glVertexAttribs1fvNV - GLuint index - GLsizei count - const GLfloat *v - - - - void glVertexAttribs1hvNV - GLuint index - GLsizei n - const GLhalfNV *v - - - - void glVertexAttribs1svNV - GLuint index - GLsizei count - const GLshort *v - - - - void glVertexAttribs2dvNV - GLuint index - GLsizei count - const GLdouble *v - - - - void glVertexAttribs2fvNV - GLuint index - GLsizei count - const GLfloat *v - - - - void glVertexAttribs2hvNV - GLuint index - GLsizei n - const GLhalfNV *v - - - - void glVertexAttribs2svNV - GLuint index - GLsizei count - const GLshort *v - - - - void glVertexAttribs3dvNV - GLuint index - GLsizei count - const GLdouble *v - - - - void glVertexAttribs3fvNV - GLuint index - GLsizei count - const GLfloat *v - - - - void glVertexAttribs3hvNV - GLuint index - GLsizei n - const GLhalfNV *v - - - - void glVertexAttribs3svNV - GLuint index - GLsizei count - const GLshort *v - - - - void glVertexAttribs4dvNV - GLuint index - GLsizei count - const GLdouble *v - - - - void glVertexAttribs4fvNV - GLuint index - GLsizei count - const GLfloat *v - - - - void glVertexAttribs4hvNV - GLuint index - GLsizei n - const GLhalfNV *v - - - - void glVertexAttribs4svNV - GLuint index - GLsizei count - const GLshort *v - - - - void glVertexAttribs4ubvNV - GLuint index - GLsizei count - const GLubyte *v - - - - void glVertexBindingDivisor - GLuint bindingindex - GLuint divisor - - - void glVertexBlendARB - GLint count - - - - void glVertexBlendEnvfATI - GLenum pname - GLfloat param - - - void glVertexBlendEnviATI - GLenum pname - GLint param - - - void glVertexFormatNV - GLint size - GLenum type - GLsizei stride - - - void glVertexP2ui - GLenum type - GLuint value - - - void glVertexP2uiv - GLenum type - const GLuint *value - - - void glVertexP3ui - GLenum type - GLuint value - - - void glVertexP3uiv - GLenum type - const GLuint *value - - - void glVertexP4ui - GLenum type - GLuint value - - - void glVertexP4uiv - GLenum type - const GLuint *value - - - void glVertexPointer - GLint size - GLenum type - GLsizei stride - const void *pointer - - - void glVertexPointerEXT - GLint size - GLenum type - GLsizei stride - GLsizei count - const void *pointer - - - void glVertexPointerListIBM - GLint size - GLenum type - GLint stride - const void **pointer - GLint ptrstride - - - void glVertexPointervINTEL - GLint size - GLenum type - const void **pointer - - - void glVertexStream1dATI - GLenum stream - GLdouble x - - - void glVertexStream1dvATI - GLenum stream - const GLdouble *coords - - - void glVertexStream1fATI - GLenum stream - GLfloat x - - - void glVertexStream1fvATI - GLenum stream - const GLfloat *coords - - - void glVertexStream1iATI - GLenum stream - GLint x - - - void glVertexStream1ivATI - GLenum stream - const GLint *coords - - - void glVertexStream1sATI - GLenum stream - GLshort x - - - void glVertexStream1svATI - GLenum stream - const GLshort *coords - - - void glVertexStream2dATI - GLenum stream - GLdouble x - GLdouble y - - - void glVertexStream2dvATI - GLenum stream - const GLdouble *coords - - - void glVertexStream2fATI - GLenum stream - GLfloat x - GLfloat y - - - void glVertexStream2fvATI - GLenum stream - const GLfloat *coords - - - void glVertexStream2iATI - GLenum stream - GLint x - GLint y - - - void glVertexStream2ivATI - GLenum stream - const GLint *coords - - - void glVertexStream2sATI - GLenum stream - GLshort x - GLshort y - - - void glVertexStream2svATI - GLenum stream - const GLshort *coords - - - void glVertexStream3dATI - GLenum stream - GLdouble x - GLdouble y - GLdouble z - - - void glVertexStream3dvATI - GLenum stream - const GLdouble *coords - - - void glVertexStream3fATI - GLenum stream - GLfloat x - GLfloat y - GLfloat z - - - void glVertexStream3fvATI - GLenum stream - const GLfloat *coords - - - void glVertexStream3iATI - GLenum stream - GLint x - GLint y - GLint z - - - void glVertexStream3ivATI - GLenum stream - const GLint *coords - - - void glVertexStream3sATI - GLenum stream - GLshort x - GLshort y - GLshort z - - - void glVertexStream3svATI - GLenum stream - const GLshort *coords - - - void glVertexStream4dATI - GLenum stream - GLdouble x - GLdouble y - GLdouble z - GLdouble w - - - void glVertexStream4dvATI - GLenum stream - const GLdouble *coords - - - void glVertexStream4fATI - GLenum stream - GLfloat x - GLfloat y - GLfloat z - GLfloat w - - - void glVertexStream4fvATI - GLenum stream - const GLfloat *coords - - - void glVertexStream4iATI - GLenum stream - GLint x - GLint y - GLint z - GLint w - - - void glVertexStream4ivATI - GLenum stream - const GLint *coords - - - void glVertexStream4sATI - GLenum stream - GLshort x - GLshort y - GLshort z - GLshort w - - - void glVertexStream4svATI - GLenum stream - const GLshort *coords - - - void glVertexWeightPointerEXT - GLint size - GLenum type - GLsizei stride - const void *pointer - - - void glVertexWeightfEXT - GLfloat weight - - - - void glVertexWeightfvEXT - const GLfloat *weight - - - - void glVertexWeighthNV - GLhalfNV weight - - - - void glVertexWeighthvNV - const GLhalfNV *weight - - - - GLenum glVideoCaptureNV - GLuint video_capture_slot - GLuint *sequence_num - GLuint64EXT *capture_time - - - void glVideoCaptureStreamParameterdvNV - GLuint video_capture_slot - GLuint stream - GLenum pname - const GLdouble *params - - - void glVideoCaptureStreamParameterfvNV - GLuint video_capture_slot - GLuint stream - GLenum pname - const GLfloat *params - - - void glVideoCaptureStreamParameterivNV - GLuint video_capture_slot - GLuint stream - GLenum pname - const GLint *params - - - void glViewport - GLint x - GLint y - GLsizei width - GLsizei height - - - - void glViewportArrayv - GLuint first - GLsizei count - const GLfloat *v - - - void glViewportArrayvNV - GLuint first - GLsizei count - const GLfloat *v - - - - void glViewportArrayvOES - GLuint first - GLsizei count - const GLfloat *v - - - - void glViewportIndexedf - GLuint index - GLfloat x - GLfloat y - GLfloat w - GLfloat h - - - void glViewportIndexedfOES - GLuint index - GLfloat x - GLfloat y - GLfloat w - GLfloat h - - - - void glViewportIndexedfNV - GLuint index - GLfloat x - GLfloat y - GLfloat w - GLfloat h - - - - void glViewportIndexedfv - GLuint index - const GLfloat *v - - - void glViewportIndexedfvOES - GLuint index - const GLfloat *v - - - - void glViewportIndexedfvNV - GLuint index - const GLfloat *v - - - - void glViewportPositionWScaleNV - GLuint index - GLfloat xcoeff - GLfloat ycoeff - - - void glViewportSwizzleNV - GLuint index - GLenum swizzlex - GLenum swizzley - GLenum swizzlez - GLenum swizzlew - - - void glWaitSemaphoreEXT - GLuint semaphore - GLuint numBufferBarriers - const GLuint *buffers - GLuint numTextureBarriers - const GLuint *textures - const GLenum *srcLayouts - - - void glWaitSemaphoreui64NVX - GLuint waitGpu - GLsizei fenceObjectCount - const GLuint *semaphoreArray - const GLuint64 *fenceValueArray - - - void glWaitSync - GLsync sync - GLbitfield flags - GLuint64 timeout - - - void glWaitSyncAPPLE - GLsync sync - GLbitfield flags - GLuint64 timeout - - - - void glWeightPathsNV - GLuint resultPath - GLsizei numPaths - const GLuint *paths - const GLfloat *weights - - - void glWeightPointerARB - GLint size - GLenum type - GLsizei stride - const void *pointer - - - void glWeightPointerOES - GLint size - GLenum type - GLsizei stride - const void *pointer - - - void glWeightbvARB - GLint size - const GLbyte *weights - - - - void glWeightdvARB - GLint size - const GLdouble *weights - - - - void glWeightfvARB - GLint size - const GLfloat *weights - - - - void glWeightivARB - GLint size - const GLint *weights - - - - void glWeightsvARB - GLint size - const GLshort *weights - - - - void glWeightubvARB - GLint size - const GLubyte *weights - - - - void glWeightuivARB - GLint size - const GLuint *weights - - - - void glWeightusvARB - GLint size - const GLushort *weights - - - - void glWindowPos2d - GLdouble x - GLdouble y - - - - void glWindowPos2dARB - GLdouble x - GLdouble y - - - - - void glWindowPos2dMESA - GLdouble x - GLdouble y - - - - - void glWindowPos2dv - const GLdouble *v - - - - void glWindowPos2dvARB - const GLdouble *v - - - - - void glWindowPos2dvMESA - const GLdouble *v - - - - void glWindowPos2f - GLfloat x - GLfloat y - - - - void glWindowPos2fARB - GLfloat x - GLfloat y - - - - - void glWindowPos2fMESA - GLfloat x - GLfloat y - - - - - void glWindowPos2fv - const GLfloat *v - - - - void glWindowPos2fvARB - const GLfloat *v - - - - - void glWindowPos2fvMESA - const GLfloat *v - - - - void glWindowPos2i - GLint x - GLint y - - - - void glWindowPos2iARB - GLint x - GLint y - - - - - void glWindowPos2iMESA - GLint x - GLint y - - - - - void glWindowPos2iv - const GLint *v - - - - void glWindowPos2ivARB - const GLint *v - - - - - void glWindowPos2ivMESA - const GLint *v - - - - void glWindowPos2s - GLshort x - GLshort y - - - - void glWindowPos2sARB - GLshort x - GLshort y - - - - - void glWindowPos2sMESA - GLshort x - GLshort y - - - - - void glWindowPos2sv - const GLshort *v - - - - void glWindowPos2svARB - const GLshort *v - - - - - void glWindowPos2svMESA - const GLshort *v - - - - void glWindowPos3d - GLdouble x - GLdouble y - GLdouble z - - - - void glWindowPos3dARB - GLdouble x - GLdouble y - GLdouble z - - - - - void glWindowPos3dMESA - GLdouble x - GLdouble y - GLdouble z - - - - - void glWindowPos3dv - const GLdouble *v - - - - void glWindowPos3dvARB - const GLdouble *v - - - - - void glWindowPos3dvMESA - const GLdouble *v - - - - void glWindowPos3f - GLfloat x - GLfloat y - GLfloat z - - - - void glWindowPos3fARB - GLfloat x - GLfloat y - GLfloat z - - - - - void glWindowPos3fMESA - GLfloat x - GLfloat y - GLfloat z - - - - - void glWindowPos3fv - const GLfloat *v - - - - void glWindowPos3fvARB - const GLfloat *v - - - - - void glWindowPos3fvMESA - const GLfloat *v - - - - void glWindowPos3i - GLint x - GLint y - GLint z - - - - void glWindowPos3iARB - GLint x - GLint y - GLint z - - - - - void glWindowPos3iMESA - GLint x - GLint y - GLint z - - - - - void glWindowPos3iv - const GLint *v - - - - void glWindowPos3ivARB - const GLint *v - - - - - void glWindowPos3ivMESA - const GLint *v - - - - void glWindowPos3s - GLshort x - GLshort y - GLshort z - - - - void glWindowPos3sARB - GLshort x - GLshort y - GLshort z - - - - - void glWindowPos3sMESA - GLshort x - GLshort y - GLshort z - - - - - void glWindowPos3sv - const GLshort *v - - - - void glWindowPos3svARB - const GLshort *v - - - - - void glWindowPos3svMESA - const GLshort *v - - - - void glWindowPos4dMESA - GLdouble x - GLdouble y - GLdouble z - GLdouble w - - - - void glWindowPos4dvMESA - const GLdouble *v - - - void glWindowPos4fMESA - GLfloat x - GLfloat y - GLfloat z - GLfloat w - - - - void glWindowPos4fvMESA - const GLfloat *v - - - void glWindowPos4iMESA - GLint x - GLint y - GLint z - GLint w - - - - void glWindowPos4ivMESA - const GLint *v - - - void glWindowPos4sMESA - GLshort x - GLshort y - GLshort z - GLshort w - - - - void glWindowPos4svMESA - const GLshort *v - - - void glWindowRectanglesEXT - GLenum mode - GLsizei count - const GLint *box - - - void glWriteMaskEXT - GLuint res - GLuint in - GLenum outX - GLenum outY - GLenum outZ - GLenum outW - - - void glDrawVkImageNV - GLuint64 vkImage - GLuint sampler - GLfloat x0 - GLfloat y0 - GLfloat x1 - GLfloat y1 - GLfloat z - GLfloat s0 - GLfloat t0 - GLfloat s1 - GLfloat t1 - - - GLVULKANPROCNV glGetVkProcAddrNV - const GLchar *name - - - void glWaitVkSemaphoreNV - GLuint64 vkSemaphore - - - void glSignalVkSemaphoreNV - GLuint64 vkSemaphore - - - void glSignalVkFenceNV - GLuint64 vkFence - - - void glFramebufferParameteriMESA - GLenum target - GLenum pname - GLint param - - - void glGetFramebufferParameterivMESA - GLenum target - GLenum pname - GLint *params - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + +Copyright 2013-2025 The Khronos Group Inc. +SPDX-License-Identifier: Apache-2.0 + +This file, gl.xml, is the OpenGL and OpenGL API Registry. The canonical +version of the registry, together with documentation, schema, and Python +generator scripts used to generate C header files for OpenGL and OpenGL ES, +can always be found in the Khronos Registry at +https://github.com/KhronosGroup/OpenGL-Registry + + + + + + #include <KHR/khrplatform.h> + + typedef unsigned int GLenum; + typedef unsigned char GLboolean; + typedef unsigned int GLbitfield; + typedef void GLvoid; + typedef khronos_int8_t GLbyte; + typedef khronos_uint8_t GLubyte; + typedef khronos_int16_t GLshort; + typedef khronos_uint16_t GLushort; + typedef int GLint; + typedef unsigned int GLuint; + typedef khronos_int32_t GLclampx; + typedef int GLsizei; + typedef khronos_float_t GLfloat; + typedef khronos_float_t GLclampf; + typedef double GLdouble; + typedef double GLclampd; + typedef void *GLeglClientBufferEXT; + typedef void *GLeglImageOES; + typedef char GLchar; + typedef char GLcharARB; + #ifdef __APPLE__ +typedef void *GLhandleARB; +#else +typedef unsigned int GLhandleARB; +#endif + typedef khronos_uint16_t GLhalf; + typedef khronos_uint16_t GLhalfARB; + typedef khronos_int32_t GLfixed; + typedef khronos_intptr_t GLintptr; + typedef khronos_intptr_t GLintptrARB; + typedef khronos_ssize_t GLsizeiptr; + typedef khronos_ssize_t GLsizeiptrARB; + typedef khronos_int64_t GLint64; + typedef khronos_int64_t GLint64EXT; + typedef khronos_uint64_t GLuint64; + typedef khronos_uint64_t GLuint64EXT; + typedef struct __GLsync *GLsync; + struct _cl_context; + struct _cl_event; + typedef void ( *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); + typedef void ( *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); + typedef void ( *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); + + + typedef void ( *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam); + typedef unsigned short GLhalfNV; + typedef GLintptr GLvdpauSurfaceNV; + typedef void ( *GLVULKANPROCNV)(void); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + void glAccum + GLenum op + GLfloat value + + + + void glAccumxOES + GLenum op + GLfixed value + + + void glActiveProgramEXT + GLuint program + + + void glActiveShaderProgram + GLuint pipeline + GLuint program + + + void glActiveShaderProgramEXT + GLuint pipeline + GLuint program + + + void glActiveStencilFaceEXT + GLenum face + + + + void glActiveTexture + GLenum texture + + + + void glActiveTextureARB + GLenum texture + + + + + void glActiveVaryingNV + GLuint program + const GLchar *name + + + void glAlphaFragmentOp1ATI + GLenum op + GLuint dst + GLuint dstMod + GLuint arg1 + GLuint arg1Rep + GLuint arg1Mod + + + void glAlphaFragmentOp2ATI + GLenum op + GLuint dst + GLuint dstMod + GLuint arg1 + GLuint arg1Rep + GLuint arg1Mod + GLuint arg2 + GLuint arg2Rep + GLuint arg2Mod + + + void glAlphaFragmentOp3ATI + GLenum op + GLuint dst + GLuint dstMod + GLuint arg1 + GLuint arg1Rep + GLuint arg1Mod + GLuint arg2 + GLuint arg2Rep + GLuint arg2Mod + GLuint arg3 + GLuint arg3Rep + GLuint arg3Mod + + + void glAlphaFunc + GLenum func + GLfloat ref + + + + void glAlphaFuncQCOM + GLenum func + GLclampf ref + + + void glAlphaFuncx + GLenum func + GLfixed ref + + + void glAlphaFuncxOES + GLenum func + GLfixed ref + + + void glAlphaToCoverageDitherControlNV + GLenum mode + + + void glApplyFramebufferAttachmentCMAAINTEL + + + void glApplyTextureEXT + GLenum mode + + + GLboolean glAcquireKeyedMutexWin32EXT + GLuint memory + GLuint64 key + GLuint timeout + + + GLboolean glAreProgramsResidentNV + GLsizei n + const GLuint *programs + GLboolean *residences + + + + GLboolean glAreTexturesResident + GLsizei n + const GLuint *textures + GLboolean *residences + + + + GLboolean glAreTexturesResidentEXT + GLsizei n + const GLuint *textures + GLboolean *residences + + + + void glArrayElement + GLint i + + + void glArrayElementEXT + GLint i + + + + void glArrayObjectATI + GLenum array + GLint size + GLenum type + GLsizei stride + GLuint buffer + GLuint offset + + + GLuint glAsyncCopyBufferSubDataNVX + GLsizei waitSemaphoreCount + const GLuint *waitSemaphoreArray + const GLuint64 *fenceValueArray + GLuint readGpu + GLbitfield writeGpuMask + GLuint readBuffer + GLuint writeBuffer + GLintptr readOffset + GLintptr writeOffset + GLsizeiptr size + GLsizei signalSemaphoreCount + const GLuint *signalSemaphoreArray + const GLuint64 *signalValueArray + + + GLuint glAsyncCopyImageSubDataNVX + GLsizei waitSemaphoreCount + const GLuint *waitSemaphoreArray + const GLuint64 *waitValueArray + GLuint srcGpu + GLbitfield dstGpuMask + GLuint srcName + GLenum srcTarget + GLint srcLevel + GLint srcX + GLint srcY + GLint srcZ + GLuint dstName + GLenum dstTarget + GLint dstLevel + GLint dstX + GLint dstY + GLint dstZ + GLsizei srcWidth + GLsizei srcHeight + GLsizei srcDepth + GLsizei signalSemaphoreCount + const GLuint *signalSemaphoreArray + const GLuint64 *signalValueArray + + + void glAsyncMarkerSGIX + GLuint marker + + + void glAttachObjectARB + GLhandleARB containerObj + GLhandleARB obj + + + + void glAttachShader + GLuint program + GLuint shader + + + void glBegin + GLenum mode + + + + void glBeginConditionalRender + GLuint id + GLenum mode + + + void glBeginConditionalRenderNV + GLuint id + GLenum mode + + + + + void glBeginConditionalRenderNVX + GLuint id + + + void glBeginFragmentShaderATI + + + void glBeginOcclusionQueryNV + GLuint id + + + void glBeginPerfMonitorAMD + GLuint monitor + + + void glBeginPerfQueryINTEL + GLuint queryHandle + + + void glBeginQuery + GLenum target + GLuint id + + + + void glBeginQueryARB + GLenum target + GLuint id + + + + void glBeginQueryEXT + GLenum target + GLuint id + + + void glBeginQueryIndexed + GLenum target + GLuint index + GLuint id + + + void glBeginTransformFeedback + GLenum primitiveMode + + + + void glBeginTransformFeedbackEXT + GLenum primitiveMode + + + + void glBeginTransformFeedbackNV + GLenum primitiveMode + + + + void glBeginVertexShaderEXT + + + void glBeginVideoCaptureNV + GLuint video_capture_slot + + + void glBindAttribLocation + GLuint program + GLuint index + const GLchar *name + + + void glBindAttribLocationARB + GLhandleARB programObj + GLuint index + const GLcharARB *name + + + + void glBindBuffer + GLenum target + GLuint buffer + + + void glBindBufferARB + GLenum target + GLuint buffer + + + + void glBindBufferBase + GLenum target + GLuint index + GLuint buffer + + + + void glBindBufferBaseEXT + GLenum target + GLuint index + GLuint buffer + + + + void glBindBufferBaseNV + GLenum target + GLuint index + GLuint buffer + + + + void glBindBufferOffsetEXT + GLenum target + GLuint index + GLuint buffer + GLintptr offset + + + void glBindBufferOffsetNV + GLenum target + GLuint index + GLuint buffer + GLintptr offset + + + + void glBindBufferRange + GLenum target + GLuint index + GLuint buffer + GLintptr offset + GLsizeiptr size + + + + void glBindBufferRangeEXT + GLenum target + GLuint index + GLuint buffer + GLintptr offset + GLsizeiptr size + + + + void glBindBufferRangeNV + GLenum target + GLuint index + GLuint buffer + GLintptr offset + GLsizeiptr size + + + + void glBindBuffersBase + GLenum target + GLuint first + GLsizei count + const GLuint *buffers + + + void glBindBuffersRange + GLenum target + GLuint first + GLsizei count + const GLuint *buffers + const GLintptr *offsets + const GLsizeiptr *sizes + + + void glBindFragDataLocation + GLuint program + GLuint color + const GLchar *name + + + void glBindFragDataLocationEXT + GLuint program + GLuint color + const GLchar *name + + + + void glBindFragDataLocationIndexed + GLuint program + GLuint colorNumber + GLuint index + const GLchar *name + + + void glBindFragDataLocationIndexedEXT + GLuint program + GLuint colorNumber + GLuint index + const GLchar *name + + + + void glBindFragmentShaderATI + GLuint id + + + void glBindFramebuffer + GLenum target + GLuint framebuffer + + + + void glBindFramebufferEXT + GLenum target + GLuint framebuffer + + + + void glBindFramebufferOES + GLenum target + GLuint framebuffer + + + void glBindImageTexture + GLuint unit + GLuint texture + GLint level + GLboolean layered + GLint layer + GLenum access + GLenum format + + + void glBindImageTextureEXT + GLuint index + GLuint texture + GLint level + GLboolean layered + GLint layer + GLenum access + GLint format + + + void glBindImageTextures + GLuint first + GLsizei count + const GLuint *textures + + + GLuint glBindLightParameterEXT + GLenum light + GLenum value + + + GLuint glBindMaterialParameterEXT + GLenum face + GLenum value + + + void glBindMultiTextureEXT + GLenum texunit + GLenum target + GLuint texture + + + GLuint glBindParameterEXT + GLenum value + + + void glBindProgramARB + GLenum target + GLuint program + + + + void glBindProgramNV + GLenum target + GLuint id + + + + + void glBindProgramPipeline + GLuint pipeline + + + void glBindProgramPipelineEXT + GLuint pipeline + + + void glBindRenderbuffer + GLenum target + GLuint renderbuffer + + + + void glBindRenderbufferEXT + GLenum target + GLuint renderbuffer + + + + void glBindRenderbufferOES + GLenum target + GLuint renderbuffer + + + void glBindSampler + GLuint unit + GLuint sampler + + + void glBindSamplers + GLuint first + GLsizei count + const GLuint *samplers + + + void glBindShadingRateImageNV + GLuint texture + + + GLuint glBindTexGenParameterEXT + GLenum unit + GLenum coord + GLenum value + + + void glBindTexture + GLenum target + GLuint texture + + + + void glBindTextureEXT + GLenum target + GLuint texture + + + + + void glBindTextureUnit + GLuint unit + GLuint texture + + + GLuint glBindTextureUnitParameterEXT + GLenum unit + GLenum value + + + void glBindTextures + GLuint first + GLsizei count + const GLuint *textures + + + void glBindTransformFeedback + GLenum target + GLuint id + + + void glBindTransformFeedbackNV + GLenum target + GLuint id + + + void glBindVertexArray + GLuint array + + + + void glBindVertexArrayAPPLE + GLuint array + + + void glBindVertexArrayOES + GLuint array + + + + void glBindVertexBuffer + GLuint bindingindex + GLuint buffer + GLintptr offset + GLsizei stride + + + void glBindVertexBuffers + GLuint first + GLsizei count + const GLuint *buffers + const GLintptr *offsets + const GLsizei *strides + + + void glBindVertexShaderEXT + GLuint id + + + void glBindVideoCaptureStreamBufferNV + GLuint video_capture_slot + GLuint stream + GLenum frame_region + GLintptrARB offset + + + void glBindVideoCaptureStreamTextureNV + GLuint video_capture_slot + GLuint stream + GLenum frame_region + GLenum target + GLuint texture + + + void glBinormal3bEXT + GLbyte bx + GLbyte by + GLbyte bz + + + + void glBinormal3bvEXT + const GLbyte *v + + + void glBinormal3dEXT + GLdouble bx + GLdouble by + GLdouble bz + + + + void glBinormal3dvEXT + const GLdouble *v + + + void glBinormal3fEXT + GLfloat bx + GLfloat by + GLfloat bz + + + + void glBinormal3fvEXT + const GLfloat *v + + + void glBinormal3iEXT + GLint bx + GLint by + GLint bz + + + + void glBinormal3ivEXT + const GLint *v + + + void glBinormal3sEXT + GLshort bx + GLshort by + GLshort bz + + + + void glBinormal3svEXT + const GLshort *v + + + void glBinormalPointerEXT + GLenum type + GLsizei stride + const void *pointer + + + void glBitmap + GLsizei width + GLsizei height + GLfloat xorig + GLfloat yorig + GLfloat xmove + GLfloat ymove + const GLubyte *bitmap + + + + + void glBitmapxOES + GLsizei width + GLsizei height + GLfixed xorig + GLfixed yorig + GLfixed xmove + GLfixed ymove + const GLubyte *bitmap + + + void glBlendBarrier + + + void glBlendBarrierKHR + + + + void glBlendBarrierNV + + + + void glBlendColor + GLfloat red + GLfloat green + GLfloat blue + GLfloat alpha + + + + void glBlendColorEXT + GLfloat red + GLfloat green + GLfloat blue + GLfloat alpha + + + + + void glBlendColorxOES + GLfixed red + GLfixed green + GLfixed blue + GLfixed alpha + + + void glBlendEquation + GLenum mode + + + + void glBlendEquationEXT + GLenum mode + + + + + void glBlendEquationIndexedAMD + GLuint buf + GLenum mode + + + + void glBlendEquationOES + GLenum mode + + + void glBlendEquationSeparate + GLenum modeRGB + GLenum modeAlpha + + + + void glBlendEquationSeparateEXT + GLenum modeRGB + GLenum modeAlpha + + + + + void glBlendEquationSeparateIndexedAMD + GLuint buf + GLenum modeRGB + GLenum modeAlpha + + + + void glBlendEquationSeparateOES + GLenum modeRGB + GLenum modeAlpha + + + void glBlendEquationSeparatei + GLuint buf + GLenum modeRGB + GLenum modeAlpha + + + void glBlendEquationSeparateiARB + GLuint buf + GLenum modeRGB + GLenum modeAlpha + + + + void glBlendEquationSeparateiEXT + GLuint buf + GLenum modeRGB + GLenum modeAlpha + + + + void glBlendEquationSeparateiOES + GLuint buf + GLenum modeRGB + GLenum modeAlpha + + + + void glBlendEquationi + GLuint buf + GLenum mode + + + void glBlendEquationiARB + GLuint buf + GLenum mode + + + + void glBlendEquationiEXT + GLuint buf + GLenum mode + + + + void glBlendEquationiOES + GLuint buf + GLenum mode + + + + void glBlendFunc + GLenum sfactor + GLenum dfactor + + + + void glBlendFuncIndexedAMD + GLuint buf + GLenum src + GLenum dst + + + + void glBlendFuncSeparate + GLenum sfactorRGB + GLenum dfactorRGB + GLenum sfactorAlpha + GLenum dfactorAlpha + + + + void glBlendFuncSeparateEXT + GLenum sfactorRGB + GLenum dfactorRGB + GLenum sfactorAlpha + GLenum dfactorAlpha + + + + + void glBlendFuncSeparateINGR + GLenum sfactorRGB + GLenum dfactorRGB + GLenum sfactorAlpha + GLenum dfactorAlpha + + + + + void glBlendFuncSeparateIndexedAMD + GLuint buf + GLenum srcRGB + GLenum dstRGB + GLenum srcAlpha + GLenum dstAlpha + + + + void glBlendFuncSeparateOES + GLenum srcRGB + GLenum dstRGB + GLenum srcAlpha + GLenum dstAlpha + + + void glBlendFuncSeparatei + GLuint buf + GLenum srcRGB + GLenum dstRGB + GLenum srcAlpha + GLenum dstAlpha + + + void glBlendFuncSeparateiARB + GLuint buf + GLenum srcRGB + GLenum dstRGB + GLenum srcAlpha + GLenum dstAlpha + + + + void glBlendFuncSeparateiEXT + GLuint buf + GLenum srcRGB + GLenum dstRGB + GLenum srcAlpha + GLenum dstAlpha + + + + void glBlendFuncSeparateiOES + GLuint buf + GLenum srcRGB + GLenum dstRGB + GLenum srcAlpha + GLenum dstAlpha + + + + void glBlendFunci + GLuint buf + GLenum src + GLenum dst + + + void glBlendFunciARB + GLuint buf + GLenum src + GLenum dst + + + + void glBlendFunciEXT + GLuint buf + GLenum src + GLenum dst + + + + void glBlendFunciOES + GLuint buf + GLenum src + GLenum dst + + + + void glBlendParameteriNV + GLenum pname + GLint value + + + void glBlitFramebuffer + GLint srcX0 + GLint srcY0 + GLint srcX1 + GLint srcY1 + GLint dstX0 + GLint dstY0 + GLint dstX1 + GLint dstY1 + GLbitfield mask + GLenum filter + + + + void glBlitFramebufferANGLE + GLint srcX0 + GLint srcY0 + GLint srcX1 + GLint srcY1 + GLint dstX0 + GLint dstY0 + GLint dstX1 + GLint dstY1 + GLbitfield mask + GLenum filter + + + void glBlitFramebufferEXT + GLint srcX0 + GLint srcY0 + GLint srcX1 + GLint srcY1 + GLint dstX0 + GLint dstY0 + GLint dstX1 + GLint dstY1 + GLbitfield mask + GLenum filter + + + + + void glBlitFramebufferLayerEXT + GLint srcX0 + GLint srcY0 + GLint srcX1 + GLint srcY1 + GLint srcLayer + GLint dstX0 + GLint dstY0 + GLint dstX1 + GLint dstY1 + GLint dstLayer + GLbitfield mask + GLenum filter + + + void glBlitFramebufferLayersEXT + GLint srcX0 + GLint srcY0 + GLint srcX1 + GLint srcY1 + GLint dstX0 + GLint dstY0 + GLint dstX1 + GLint dstY1 + GLbitfield mask + GLenum filter + + + void glBlitFramebufferNV + GLint srcX0 + GLint srcY0 + GLint srcX1 + GLint srcY1 + GLint dstX0 + GLint dstY0 + GLint dstX1 + GLint dstY1 + GLbitfield mask + GLenum filter + + + + void glBlitNamedFramebuffer + GLuint readFramebuffer + GLuint drawFramebuffer + GLint srcX0 + GLint srcY0 + GLint srcX1 + GLint srcY1 + GLint dstX0 + GLint dstY0 + GLint dstX1 + GLint dstY1 + GLbitfield mask + GLenum filter + + + void glBufferAddressRangeNV + GLenum pname + GLuint index + GLuint64EXT address + GLsizeiptr length + + + void glBufferAttachMemoryNV + GLenum target + GLuint memory + GLuint64 offset + + + void glBufferData + GLenum target + GLsizeiptr size + const void *data + GLenum usage + + + void glBufferDataARB + GLenum target + GLsizeiptrARB size + const void *data + GLenum usage + + + + void glBufferPageCommitmentARB + GLenum target + GLintptr offset + GLsizeiptr size + GLboolean commit + + + void glBufferPageCommitmentMemNV + GLenum target + GLintptr offset + GLsizeiptr size + GLuint memory + GLuint64 memOffset + GLboolean commit + + + void glBufferParameteriAPPLE + GLenum target + GLenum pname + GLint param + + + void glBufferStorage + GLenum target + GLsizeiptr size + const void *data + GLbitfield flags + + + void glBufferStorageEXT + GLenum target + GLsizeiptr size + const void *data + GLbitfield flags + + + + void glBufferStorageExternalEXT + GLenum target + GLintptr offset + GLsizeiptr size + GLeglClientBufferEXT clientBuffer + GLbitfield flags + + + void glBufferStorageMemEXT + GLenum target + GLsizeiptr size + GLuint memory + GLuint64 offset + + + void glBufferSubData + GLenum target + GLintptr offset + GLsizeiptr size + const void *data + + + void glBufferSubDataARB + GLenum target + GLintptrARB offset + GLsizeiptrARB size + const void *data + + + + void glCallCommandListNV + GLuint list + + + void glCallList + GLuint list + + + + void glCallLists + GLsizei n + GLenum type + const void *lists + + + + GLenum glCheckFramebufferStatus + GLenum target + + + + GLenum glCheckFramebufferStatusEXT + GLenum target + + + + + GLenum glCheckFramebufferStatusOES + GLenum target + + + GLenum glCheckNamedFramebufferStatus + GLuint framebuffer + GLenum target + + + GLenum glCheckNamedFramebufferStatusEXT + GLuint framebuffer + GLenum target + + + void glClampColor + GLenum target + GLenum clamp + + + + void glClampColorARB + GLenum target + GLenum clamp + + + + + void glClear + GLbitfield mask + + + + void glClearAccum + GLfloat red + GLfloat green + GLfloat blue + GLfloat alpha + + + + void glClearAccumxOES + GLfixed red + GLfixed green + GLfixed blue + GLfixed alpha + + + void glClearBufferData + GLenum target + GLenum internalformat + GLenum format + GLenum type + const void *data + + + void glClearBufferSubData + GLenum target + GLenum internalformat + GLintptr offset + GLsizeiptr size + GLenum format + GLenum type + const void *data + + + void glClearBufferfi + GLenum buffer + GLint drawbuffer + GLfloat depth + GLint stencil + + + + void glClearBufferfv + GLenum buffer + GLint drawbuffer + const GLfloat *value + + + + void glClearBufferiv + GLenum buffer + GLint drawbuffer + const GLint *value + + + + void glClearBufferuiv + GLenum buffer + GLint drawbuffer + const GLuint *value + + + + void glClearColor + GLfloat red + GLfloat green + GLfloat blue + GLfloat alpha + + + + void glClearColorIiEXT + GLint red + GLint green + GLint blue + GLint alpha + + + + void glClearColorIuiEXT + GLuint red + GLuint green + GLuint blue + GLuint alpha + + + + void glClearColorx + GLfixed red + GLfixed green + GLfixed blue + GLfixed alpha + + + void glClearColorxOES + GLfixed red + GLfixed green + GLfixed blue + GLfixed alpha + + + void glClearDepth + GLdouble depth + + + + void glClearDepthdNV + GLdouble depth + + + + void glClearDepthf + GLfloat d + + + void glClearDepthfOES + GLclampf depth + + + + + void glClearDepthx + GLfixed depth + + + void glClearDepthxOES + GLfixed depth + + + void glClearIndex + GLfloat c + + + + void glClearNamedBufferData + GLuint buffer + GLenum internalformat + GLenum format + GLenum type + const void *data + + + void glClearNamedBufferDataEXT + GLuint buffer + GLenum internalformat + GLenum format + GLenum type + const void *data + + + void glClearNamedBufferSubData + GLuint buffer + GLenum internalformat + GLintptr offset + GLsizeiptr size + GLenum format + GLenum type + const void *data + + + void glClearNamedBufferSubDataEXT + GLuint buffer + GLenum internalformat + GLsizeiptr offset + GLsizeiptr size + GLenum format + GLenum type + const void *data + + + void glClearNamedFramebufferfi + GLuint framebuffer + GLenum buffer + GLint drawbuffer + GLfloat depth + GLint stencil + + + void glClearNamedFramebufferfv + GLuint framebuffer + GLenum buffer + GLint drawbuffer + const GLfloat *value + + + void glClearNamedFramebufferiv + GLuint framebuffer + GLenum buffer + GLint drawbuffer + const GLint *value + + + void glClearNamedFramebufferuiv + GLuint framebuffer + GLenum buffer + GLint drawbuffer + const GLuint *value + + + void glClearPixelLocalStorageuiEXT + GLsizei offset + GLsizei n + const GLuint *values + + + void glClearStencil + GLint s + + + + void glClearTexImage + GLuint texture + GLint level + GLenum format + GLenum type + const void *data + + + void glClearTexImageEXT + GLuint texture + GLint level + GLenum format + GLenum type + const void *data + + + + void glClearTexSubImage + GLuint texture + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLenum type + const void *data + + + void glClearTexSubImageEXT + GLuint texture + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLenum type + const void *data + + + + void glClientActiveTexture + GLenum texture + + + void glClientActiveTextureARB + GLenum texture + + + + void glClientActiveVertexStreamATI + GLenum stream + + + void glClientAttribDefaultEXT + GLbitfield mask + + + void glClientWaitSemaphoreui64NVX + GLsizei fenceObjectCount + const GLuint *semaphoreArray + const GLuint64 *fenceValueArray + + + GLenum glClientWaitSync + GLsync sync + GLbitfield flags + GLuint64 timeout + + + GLenum glClientWaitSyncAPPLE + GLsync sync + GLbitfield flags + GLuint64 timeout + + + + void glClipControl + GLenum origin + GLenum depth + + + void glClipControlEXT + GLenum origin + GLenum depth + + + + void glClipPlane + GLenum plane + const GLdouble *equation + + + + void glClipPlanef + GLenum p + const GLfloat *eqn + + + void glClipPlanefIMG + GLenum p + const GLfloat *eqn + + + void glClipPlanefOES + GLenum plane + const GLfloat *equation + + + + void glClipPlanex + GLenum plane + const GLfixed *equation + + + void glClipPlanexIMG + GLenum p + const GLfixed *eqn + + + void glClipPlanexOES + GLenum plane + const GLfixed *equation + + + void glColor3b + GLbyte red + GLbyte green + GLbyte blue + + + + void glColor3bv + const GLbyte *v + + + + void glColor3d + GLdouble red + GLdouble green + GLdouble blue + + + + void glColor3dv + const GLdouble *v + + + + void glColor3f + GLfloat red + GLfloat green + GLfloat blue + + + + void glColor3fVertex3fSUN + GLfloat r + GLfloat g + GLfloat b + GLfloat x + GLfloat y + GLfloat z + + + void glColor3fVertex3fvSUN + const GLfloat *c + const GLfloat *v + + + void glColor3fv + const GLfloat *v + + + + void glColor3hNV + GLhalfNV red + GLhalfNV green + GLhalfNV blue + + + + void glColor3hvNV + const GLhalfNV *v + + + + void glColor3i + GLint red + GLint green + GLint blue + + + + void glColor3iv + const GLint *v + + + + void glColor3s + GLshort red + GLshort green + GLshort blue + + + + void glColor3sv + const GLshort *v + + + + void glColor3ub + GLubyte red + GLubyte green + GLubyte blue + + + + void glColor3ubv + const GLubyte *v + + + + void glColor3ui + GLuint red + GLuint green + GLuint blue + + + + void glColor3uiv + const GLuint *v + + + + void glColor3us + GLushort red + GLushort green + GLushort blue + + + + void glColor3usv + const GLushort *v + + + + void glColor3xOES + GLfixed red + GLfixed green + GLfixed blue + + + void glColor3xvOES + const GLfixed *components + + + void glColor4b + GLbyte red + GLbyte green + GLbyte blue + GLbyte alpha + + + + void glColor4bv + const GLbyte *v + + + + void glColor4d + GLdouble red + GLdouble green + GLdouble blue + GLdouble alpha + + + + void glColor4dv + const GLdouble *v + + + + void glColor4f + GLfloat red + GLfloat green + GLfloat blue + GLfloat alpha + + + + void glColor4fNormal3fVertex3fSUN + GLfloat r + GLfloat g + GLfloat b + GLfloat a + GLfloat nx + GLfloat ny + GLfloat nz + GLfloat x + GLfloat y + GLfloat z + + + void glColor4fNormal3fVertex3fvSUN + const GLfloat *c + const GLfloat *n + const GLfloat *v + + + void glColor4fv + const GLfloat *v + + + + void glColor4hNV + GLhalfNV red + GLhalfNV green + GLhalfNV blue + GLhalfNV alpha + + + + void glColor4hvNV + const GLhalfNV *v + + + + void glColor4i + GLint red + GLint green + GLint blue + GLint alpha + + + + void glColor4iv + const GLint *v + + + + void glColor4s + GLshort red + GLshort green + GLshort blue + GLshort alpha + + + + void glColor4sv + const GLshort *v + + + + void glColor4ub + GLubyte red + GLubyte green + GLubyte blue + GLubyte alpha + + + + void glColor4ubVertex2fSUN + GLubyte r + GLubyte g + GLubyte b + GLubyte a + GLfloat x + GLfloat y + + + void glColor4ubVertex2fvSUN + const GLubyte *c + const GLfloat *v + + + void glColor4ubVertex3fSUN + GLubyte r + GLubyte g + GLubyte b + GLubyte a + GLfloat x + GLfloat y + GLfloat z + + + void glColor4ubVertex3fvSUN + const GLubyte *c + const GLfloat *v + + + void glColor4ubv + const GLubyte *v + + + + void glColor4ui + GLuint red + GLuint green + GLuint blue + GLuint alpha + + + + void glColor4uiv + const GLuint *v + + + + void glColor4us + GLushort red + GLushort green + GLushort blue + GLushort alpha + + + + void glColor4usv + const GLushort *v + + + + void glColor4x + GLfixed red + GLfixed green + GLfixed blue + GLfixed alpha + + + void glColor4xOES + GLfixed red + GLfixed green + GLfixed blue + GLfixed alpha + + + void glColor4xvOES + const GLfixed *components + + + void glColorFormatNV + GLint size + GLenum type + GLsizei stride + + + void glColorFragmentOp1ATI + GLenum op + GLuint dst + GLuint dstMask + GLuint dstMod + GLuint arg1 + GLuint arg1Rep + GLuint arg1Mod + + + void glColorFragmentOp2ATI + GLenum op + GLuint dst + GLuint dstMask + GLuint dstMod + GLuint arg1 + GLuint arg1Rep + GLuint arg1Mod + GLuint arg2 + GLuint arg2Rep + GLuint arg2Mod + + + void glColorFragmentOp3ATI + GLenum op + GLuint dst + GLuint dstMask + GLuint dstMod + GLuint arg1 + GLuint arg1Rep + GLuint arg1Mod + GLuint arg2 + GLuint arg2Rep + GLuint arg2Mod + GLuint arg3 + GLuint arg3Rep + GLuint arg3Mod + + + void glColorMask + GLboolean red + GLboolean green + GLboolean blue + GLboolean alpha + + + + void glColorMaskIndexedEXT + GLuint index + GLboolean r + GLboolean g + GLboolean b + GLboolean a + + + + + void glColorMaski + GLuint index + GLboolean r + GLboolean g + GLboolean b + GLboolean a + + + void glColorMaskiEXT + GLuint index + GLboolean r + GLboolean g + GLboolean b + GLboolean a + + + + void glColorMaskiOES + GLuint index + GLboolean r + GLboolean g + GLboolean b + GLboolean a + + + + void glColorMaterial + GLenum face + GLenum mode + + + + void glColorP3ui + GLenum type + GLuint color + + + void glColorP3uiv + GLenum type + const GLuint *color + + + void glColorP4ui + GLenum type + GLuint color + + + void glColorP4uiv + GLenum type + const GLuint *color + + + void glColorPointer + GLint size + GLenum type + GLsizei stride + const void *pointer + + + void glColorPointerEXT + GLint size + GLenum type + GLsizei stride + GLsizei count + const void *pointer + + + void glColorPointerListIBM + GLint size + GLenum type + GLint stride + const void **pointer + GLint ptrstride + + + void glColorPointervINTEL + GLint size + GLenum type + const void **pointer + + + void glColorSubTable + GLenum target + GLsizei start + GLsizei count + GLenum format + GLenum type + const void *data + + + + + void glColorSubTableEXT + GLenum target + GLsizei start + GLsizei count + GLenum format + GLenum type + const void *data + + + + void glColorTable + GLenum target + GLenum internalformat + GLsizei width + GLenum format + GLenum type + const void *table + + + + + void glColorTableEXT + GLenum target + GLenum internalFormat + GLsizei width + GLenum format + GLenum type + const void *table + + + + void glColorTableParameterfv + GLenum target + GLenum pname + const GLfloat *params + + + + void glColorTableParameterfvSGI + GLenum target + GLenum pname + const GLfloat *params + + + + + void glColorTableParameteriv + GLenum target + GLenum pname + const GLint *params + + + + void glColorTableParameterivSGI + GLenum target + GLenum pname + const GLint *params + + + + + void glColorTableSGI + GLenum target + GLenum internalformat + GLsizei width + GLenum format + GLenum type + const void *table + + + + + void glCombinerInputNV + GLenum stage + GLenum portion + GLenum variable + GLenum input + GLenum mapping + GLenum componentUsage + + + + void glCombinerOutputNV + GLenum stage + GLenum portion + GLenum abOutput + GLenum cdOutput + GLenum sumOutput + GLenum scale + GLenum bias + GLboolean abDotProduct + GLboolean cdDotProduct + GLboolean muxSum + + + + void glCombinerParameterfNV + GLenum pname + GLfloat param + + + + void glCombinerParameterfvNV + GLenum pname + const GLfloat *params + + + + void glCombinerParameteriNV + GLenum pname + GLint param + + + + void glCombinerParameterivNV + GLenum pname + const GLint *params + + + + void glCombinerStageParameterfvNV + GLenum stage + GLenum pname + const GLfloat *params + + + void glCommandListSegmentsNV + GLuint list + GLuint segments + + + void glCompileCommandListNV + GLuint list + + + void glCompileShader + GLuint shader + + + void glCompileShaderARB + GLhandleARB shaderObj + + + + void glCompileShaderIncludeARB + GLuint shader + GLsizei count + const GLchar *const*path + const GLint *length + + + void glCompressedMultiTexImage1DEXT + GLenum texunit + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLint border + GLsizei imageSize + const void *bits + + + void glCompressedMultiTexImage2DEXT + GLenum texunit + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLsizei height + GLint border + GLsizei imageSize + const void *bits + + + void glCompressedMultiTexImage3DEXT + GLenum texunit + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + GLint border + GLsizei imageSize + const void *bits + + + void glCompressedMultiTexSubImage1DEXT + GLenum texunit + GLenum target + GLint level + GLint xoffset + GLsizei width + GLenum format + GLsizei imageSize + const void *bits + + + void glCompressedMultiTexSubImage2DEXT + GLenum texunit + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLsizei width + GLsizei height + GLenum format + GLsizei imageSize + const void *bits + + + void glCompressedMultiTexSubImage3DEXT + GLenum texunit + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLsizei imageSize + const void *bits + + + void glCompressedTexImage1D + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLint border + GLsizei imageSize + const void *data + + + + + void glCompressedTexImage1DARB + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLint border + GLsizei imageSize + const void *data + + + + + void glCompressedTexImage2D + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLsizei height + GLint border + GLsizei imageSize + const void *data + + + + + void glCompressedTexImage2DARB + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLsizei height + GLint border + GLsizei imageSize + const void *data + + + + + void glCompressedTexImage3D + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + GLint border + GLsizei imageSize + const void *data + + + + + void glCompressedTexImage3DARB + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + GLint border + GLsizei imageSize + const void *data + + + + + void glCompressedTexImage3DOES + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + GLint border + GLsizei imageSize + const void *data + + + void glCompressedTexSubImage1D + GLenum target + GLint level + GLint xoffset + GLsizei width + GLenum format + GLsizei imageSize + const void *data + + + + + void glCompressedTexSubImage1DARB + GLenum target + GLint level + GLint xoffset + GLsizei width + GLenum format + GLsizei imageSize + const void *data + + + + + void glCompressedTexSubImage2D + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLsizei width + GLsizei height + GLenum format + GLsizei imageSize + const void *data + + + + + void glCompressedTexSubImage2DARB + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLsizei width + GLsizei height + GLenum format + GLsizei imageSize + const void *data + + + + + void glCompressedTexSubImage3D + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLsizei imageSize + const void *data + + + + + void glCompressedTexSubImage3DARB + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLsizei imageSize + const void *data + + + + + void glCompressedTexSubImage3DOES + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLsizei imageSize + const void *data + + + void glCompressedTextureImage1DEXT + GLuint texture + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLint border + GLsizei imageSize + const void *bits + + + void glCompressedTextureImage2DEXT + GLuint texture + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLsizei height + GLint border + GLsizei imageSize + const void *bits + + + void glCompressedTextureImage3DEXT + GLuint texture + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + GLint border + GLsizei imageSize + const void *bits + + + void glCompressedTextureSubImage1D + GLuint texture + GLint level + GLint xoffset + GLsizei width + GLenum format + GLsizei imageSize + const void *data + + + void glCompressedTextureSubImage1DEXT + GLuint texture + GLenum target + GLint level + GLint xoffset + GLsizei width + GLenum format + GLsizei imageSize + const void *bits + + + void glCompressedTextureSubImage2D + GLuint texture + GLint level + GLint xoffset + GLint yoffset + GLsizei width + GLsizei height + GLenum format + GLsizei imageSize + const void *data + + + void glCompressedTextureSubImage2DEXT + GLuint texture + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLsizei width + GLsizei height + GLenum format + GLsizei imageSize + const void *bits + + + void glCompressedTextureSubImage3D + GLuint texture + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLsizei imageSize + const void *data + + + void glCompressedTextureSubImage3DEXT + GLuint texture + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLsizei imageSize + const void *bits + + + void glConservativeRasterParameterfNV + GLenum pname + GLfloat value + + + void glConservativeRasterParameteriNV + GLenum pname + GLint param + + + void glConvolutionFilter1D + GLenum target + GLenum internalformat + GLsizei width + GLenum format + GLenum type + const void *image + + + + + void glConvolutionFilter1DEXT + GLenum target + GLenum internalformat + GLsizei width + GLenum format + GLenum type + const void *image + + + + + void glConvolutionFilter2D + GLenum target + GLenum internalformat + GLsizei width + GLsizei height + GLenum format + GLenum type + const void *image + + + + + void glConvolutionFilter2DEXT + GLenum target + GLenum internalformat + GLsizei width + GLsizei height + GLenum format + GLenum type + const void *image + + + + + void glConvolutionParameterf + GLenum target + GLenum pname + GLfloat params + + + + void glConvolutionParameterfEXT + GLenum target + GLenum pname + GLfloat params + + + + + void glConvolutionParameterfv + GLenum target + GLenum pname + const GLfloat *params + + + + void glConvolutionParameterfvEXT + GLenum target + GLenum pname + const GLfloat *params + + + + + void glConvolutionParameteri + GLenum target + GLenum pname + GLint params + + + + void glConvolutionParameteriEXT + GLenum target + GLenum pname + GLint params + + + + + void glConvolutionParameteriv + GLenum target + GLenum pname + const GLint *params + + + + void glConvolutionParameterivEXT + GLenum target + GLenum pname + const GLint *params + + + + + void glConvolutionParameterxOES + GLenum target + GLenum pname + GLfixed param + + + void glConvolutionParameterxvOES + GLenum target + GLenum pname + const GLfixed *params + + + void glCopyBufferSubData + GLenum readTarget + GLenum writeTarget + GLintptr readOffset + GLintptr writeOffset + GLsizeiptr size + + + + void glCopyBufferSubDataNV + GLenum readTarget + GLenum writeTarget + GLintptr readOffset + GLintptr writeOffset + GLsizeiptr size + + + + void glCopyColorSubTable + GLenum target + GLsizei start + GLint x + GLint y + GLsizei width + + + + void glCopyColorSubTableEXT + GLenum target + GLsizei start + GLint x + GLint y + GLsizei width + + + + void glCopyColorTable + GLenum target + GLenum internalformat + GLint x + GLint y + GLsizei width + + + + void glCopyColorTableSGI + GLenum target + GLenum internalformat + GLint x + GLint y + GLsizei width + + + + + void glCopyConvolutionFilter1D + GLenum target + GLenum internalformat + GLint x + GLint y + GLsizei width + + + + void glCopyConvolutionFilter1DEXT + GLenum target + GLenum internalformat + GLint x + GLint y + GLsizei width + + + + + void glCopyConvolutionFilter2D + GLenum target + GLenum internalformat + GLint x + GLint y + GLsizei width + GLsizei height + + + + void glCopyConvolutionFilter2DEXT + GLenum target + GLenum internalformat + GLint x + GLint y + GLsizei width + GLsizei height + + + + + void glCopyImageSubData + GLuint srcName + GLenum srcTarget + GLint srcLevel + GLint srcX + GLint srcY + GLint srcZ + GLuint dstName + GLenum dstTarget + GLint dstLevel + GLint dstX + GLint dstY + GLint dstZ + GLsizei srcWidth + GLsizei srcHeight + GLsizei srcDepth + + + void glCopyImageSubDataEXT + GLuint srcName + GLenum srcTarget + GLint srcLevel + GLint srcX + GLint srcY + GLint srcZ + GLuint dstName + GLenum dstTarget + GLint dstLevel + GLint dstX + GLint dstY + GLint dstZ + GLsizei srcWidth + GLsizei srcHeight + GLsizei srcDepth + + + + void glCopyImageSubDataNV + GLuint srcName + GLenum srcTarget + GLint srcLevel + GLint srcX + GLint srcY + GLint srcZ + GLuint dstName + GLenum dstTarget + GLint dstLevel + GLint dstX + GLint dstY + GLint dstZ + GLsizei width + GLsizei height + GLsizei depth + + + + void glCopyImageSubDataOES + GLuint srcName + GLenum srcTarget + GLint srcLevel + GLint srcX + GLint srcY + GLint srcZ + GLuint dstName + GLenum dstTarget + GLint dstLevel + GLint dstX + GLint dstY + GLint dstZ + GLsizei srcWidth + GLsizei srcHeight + GLsizei srcDepth + + + + void glCopyMultiTexImage1DEXT + GLenum texunit + GLenum target + GLint level + GLenum internalformat + GLint x + GLint y + GLsizei width + GLint border + + + void glCopyMultiTexImage2DEXT + GLenum texunit + GLenum target + GLint level + GLenum internalformat + GLint x + GLint y + GLsizei width + GLsizei height + GLint border + + + void glCopyMultiTexSubImage1DEXT + GLenum texunit + GLenum target + GLint level + GLint xoffset + GLint x + GLint y + GLsizei width + + + void glCopyMultiTexSubImage2DEXT + GLenum texunit + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint x + GLint y + GLsizei width + GLsizei height + + + void glCopyMultiTexSubImage3DEXT + GLenum texunit + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLint x + GLint y + GLsizei width + GLsizei height + + + void glCopyNamedBufferSubData + GLuint readBuffer + GLuint writeBuffer + GLintptr readOffset + GLintptr writeOffset + GLsizeiptr size + + + void glCopyPathNV + GLuint resultPath + GLuint srcPath + + + void glCopyPixels + GLint x + GLint y + GLsizei width + GLsizei height + GLenum type + + + + void glCopyTexImage1D + GLenum target + GLint level + GLenum internalformat + GLint x + GLint y + GLsizei width + GLint border + + + + void glCopyTexImage1DEXT + GLenum target + GLint level + GLenum internalformat + GLint x + GLint y + GLsizei width + GLint border + + + + + void glCopyTexImage2D + GLenum target + GLint level + GLenum internalformat + GLint x + GLint y + GLsizei width + GLsizei height + GLint border + + + + void glCopyTexImage2DEXT + GLenum target + GLint level + GLenum internalformat + GLint x + GLint y + GLsizei width + GLsizei height + GLint border + + + + + void glCopyTexSubImage1D + GLenum target + GLint level + GLint xoffset + GLint x + GLint y + GLsizei width + + + + void glCopyTexSubImage1DEXT + GLenum target + GLint level + GLint xoffset + GLint x + GLint y + GLsizei width + + + + + void glCopyTexSubImage2D + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint x + GLint y + GLsizei width + GLsizei height + + + + void glCopyTexSubImage2DEXT + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint x + GLint y + GLsizei width + GLsizei height + + + + + void glCopyTexSubImage3D + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLint x + GLint y + GLsizei width + GLsizei height + + + + void glCopyTexSubImage3DEXT + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLint x + GLint y + GLsizei width + GLsizei height + + + + + void glCopyTexSubImage3DOES + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLint x + GLint y + GLsizei width + GLsizei height + + + void glCopyTextureImage1DEXT + GLuint texture + GLenum target + GLint level + GLenum internalformat + GLint x + GLint y + GLsizei width + GLint border + + + void glCopyTextureImage2DEXT + GLuint texture + GLenum target + GLint level + GLenum internalformat + GLint x + GLint y + GLsizei width + GLsizei height + GLint border + + + void glCopyTextureLevelsAPPLE + GLuint destinationTexture + GLuint sourceTexture + GLint sourceBaseLevel + GLsizei sourceLevelCount + + + void glCopyTextureSubImage1D + GLuint texture + GLint level + GLint xoffset + GLint x + GLint y + GLsizei width + + + void glCopyTextureSubImage1DEXT + GLuint texture + GLenum target + GLint level + GLint xoffset + GLint x + GLint y + GLsizei width + + + void glCopyTextureSubImage2D + GLuint texture + GLint level + GLint xoffset + GLint yoffset + GLint x + GLint y + GLsizei width + GLsizei height + + + void glCopyTextureSubImage2DEXT + GLuint texture + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint x + GLint y + GLsizei width + GLsizei height + + + void glCopyTextureSubImage3D + GLuint texture + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLint x + GLint y + GLsizei width + GLsizei height + + + void glCopyTextureSubImage3DEXT + GLuint texture + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLint x + GLint y + GLsizei width + GLsizei height + + + void glCoverFillPathInstancedNV + GLsizei numPaths + GLenum pathNameType + const void *paths + GLuint pathBase + GLenum coverMode + GLenum transformType + const GLfloat *transformValues + + + void glCoverFillPathNV + GLuint path + GLenum coverMode + + + void glCoverStrokePathInstancedNV + GLsizei numPaths + GLenum pathNameType + const void *paths + GLuint pathBase + GLenum coverMode + GLenum transformType + const GLfloat *transformValues + + + void glCoverStrokePathNV + GLuint path + GLenum coverMode + + + void glCoverageMaskNV + GLboolean mask + + + void glCoverageModulationNV + GLenum components + + + void glCoverageModulationTableNV + GLsizei n + const GLfloat *v + + + void glCoverageOperationNV + GLenum operation + + + void glCreateBuffers + GLsizei n + GLuint *buffers + + + void glCreateCommandListsNV + GLsizei n + GLuint *lists + + + void glCreateFramebuffers + GLsizei n + GLuint *framebuffers + + + void glCreateMemoryObjectsEXT + GLsizei n + GLuint *memoryObjects + + + void glCreatePerfQueryINTEL + GLuint queryId + GLuint *queryHandle + + + GLuint glCreateProgram + + + GLhandleARB glCreateProgramObjectARB + + + + void glCreateProgramPipelines + GLsizei n + GLuint *pipelines + + + GLuint glCreateProgressFenceNVX + + + void glCreateQueries + GLenum target + GLsizei n + GLuint *ids + + + void glCreateRenderbuffers + GLsizei n + GLuint *renderbuffers + + + void glCreateSamplers + GLsizei n + GLuint *samplers + + + void glCreateSemaphoresNV + GLsizei n + GLuint *semaphores + + + GLuint glCreateShader + GLenum type + + + GLhandleARB glCreateShaderObjectARB + GLenum shaderType + + + + GLuint glCreateShaderProgramEXT + GLenum type + const GLchar *string + + + GLuint glCreateShaderProgramv + GLenum type + GLsizei count + const GLchar *const*strings + + + GLuint glCreateShaderProgramvEXT + GLenum type + GLsizei count + const GLchar *const*strings + + + void glCreateStatesNV + GLsizei n + GLuint *states + + + GLsync glCreateSyncFromCLeventARB + struct _cl_context *context + struct _cl_event *event + GLbitfield flags + + + void glCreateTextures + GLenum target + GLsizei n + GLuint *textures + + + void glCreateTransformFeedbacks + GLsizei n + GLuint *ids + + + void glCreateVertexArrays + GLsizei n + GLuint *arrays + + + void glCullFace + GLenum mode + + + + void glCullParameterdvEXT + GLenum pname + GLdouble *params + + + void glCullParameterfvEXT + GLenum pname + GLfloat *params + + + void glCurrentPaletteMatrixARB + GLint index + + + + void glCurrentPaletteMatrixOES + GLuint matrixpaletteindex + + + void glDebugMessageCallback + GLDEBUGPROC callback + const void *userParam + + + void glDebugMessageCallbackAMD + GLDEBUGPROCAMD callback + void *userParam + + + void glDebugMessageCallbackARB + GLDEBUGPROCARB callback + const void *userParam + + + + void glDebugMessageCallbackKHR + GLDEBUGPROCKHR callback + const void *userParam + + + + void glDebugMessageControl + GLenum source + GLenum type + GLenum severity + GLsizei count + const GLuint *ids + GLboolean enabled + + + void glDebugMessageControlARB + GLenum source + GLenum type + GLenum severity + GLsizei count + const GLuint *ids + GLboolean enabled + + + + void glDebugMessageControlKHR + GLenum source + GLenum type + GLenum severity + GLsizei count + const GLuint *ids + GLboolean enabled + + + + void glDebugMessageEnableAMD + GLenum category + GLenum severity + GLsizei count + const GLuint *ids + GLboolean enabled + + + void glDebugMessageInsert + GLenum source + GLenum type + GLuint id + GLenum severity + GLsizei length + const GLchar *buf + + + void glDebugMessageInsertAMD + GLenum category + GLenum severity + GLuint id + GLsizei length + const GLchar *buf + + + void glDebugMessageInsertARB + GLenum source + GLenum type + GLuint id + GLenum severity + GLsizei length + const GLchar *buf + + + + void glDebugMessageInsertKHR + GLenum source + GLenum type + GLuint id + GLenum severity + GLsizei length + const GLchar *buf + + + + void glDeformSGIX + GLbitfield mask + + + + void glDeformationMap3dSGIX + GLenum target + GLdouble u1 + GLdouble u2 + GLint ustride + GLint uorder + GLdouble v1 + GLdouble v2 + GLint vstride + GLint vorder + GLdouble w1 + GLdouble w2 + GLint wstride + GLint worder + const GLdouble *points + + + + void glDeformationMap3fSGIX + GLenum target + GLfloat u1 + GLfloat u2 + GLint ustride + GLint uorder + GLfloat v1 + GLfloat v2 + GLint vstride + GLint vorder + GLfloat w1 + GLfloat w2 + GLint wstride + GLint worder + const GLfloat *points + + + + void glDeleteAsyncMarkersSGIX + GLuint marker + GLsizei range + + + void glDeleteBuffers + GLsizei n + const GLuint *buffers + + + void glDeleteBuffersARB + GLsizei n + const GLuint *buffers + + + + void glDeleteCommandListsNV + GLsizei n + const GLuint *lists + + + void glDeleteFencesAPPLE + GLsizei n + const GLuint *fences + + + void glDeleteFencesNV + GLsizei n + const GLuint *fences + + + + void glDeleteFragmentShaderATI + GLuint id + + + void glDeleteFramebuffers + GLsizei n + const GLuint *framebuffers + + + + void glDeleteFramebuffersEXT + GLsizei n + const GLuint *framebuffers + + + + + void glDeleteFramebuffersOES + GLsizei n + const GLuint *framebuffers + + + void glDeleteLists + GLuint list + GLsizei range + + + + void glDeleteMemoryObjectsEXT + GLsizei n + const GLuint *memoryObjects + + + void glDeleteNamedStringARB + GLint namelen + const GLchar *name + + + void glDeleteNamesAMD + GLenum identifier + GLuint num + const GLuint *names + + + void glDeleteObjectARB + GLhandleARB obj + + + void glDeleteOcclusionQueriesNV + GLsizei n + const GLuint *ids + + + void glDeletePathsNV + GLuint path + GLsizei range + + + void glDeletePerfMonitorsAMD + GLsizei n + GLuint *monitors + + + void glDeletePerfQueryINTEL + GLuint queryHandle + + + void glDeleteProgram + GLuint program + + + + void glDeleteProgramPipelines + GLsizei n + const GLuint *pipelines + + + void glDeleteProgramPipelinesEXT + GLsizei n + const GLuint *pipelines + + + void glDeleteProgramsARB + GLsizei n + const GLuint *programs + + + + void glDeleteProgramsNV + GLsizei n + const GLuint *programs + + + + + void glDeleteQueries + GLsizei n + const GLuint *ids + + + + void glDeleteQueriesARB + GLsizei n + const GLuint *ids + + + + void glDeleteQueriesEXT + GLsizei n + const GLuint *ids + + + void glDeleteQueryResourceTagNV + GLsizei n + const GLint *tagIds + + + void glDeleteRenderbuffers + GLsizei n + const GLuint *renderbuffers + + + + void glDeleteRenderbuffersEXT + GLsizei n + const GLuint *renderbuffers + + + + + void glDeleteRenderbuffersOES + GLsizei n + const GLuint *renderbuffers + + + void glDeleteSamplers + GLsizei count + const GLuint *samplers + + + void glDeleteSemaphoresEXT + GLsizei n + const GLuint *semaphores + + + void glDeleteShader + GLuint shader + + + + void glDeleteStatesNV + GLsizei n + const GLuint *states + + + void glDeleteSync + GLsync sync + + + void glDeleteSyncAPPLE + GLsync sync + + + + void glDeleteTextures + GLsizei n + const GLuint *textures + + + + void glDeleteTexturesEXT + GLsizei n + const GLuint *textures + + + + void glDeleteTransformFeedbacks + GLsizei n + const GLuint *ids + + + void glDeleteTransformFeedbacksNV + GLsizei n + const GLuint *ids + + + + void glDeleteVertexArrays + GLsizei n + const GLuint *arrays + + + + void glDeleteVertexArraysAPPLE + GLsizei n + const GLuint *arrays + + + + void glDeleteVertexArraysOES + GLsizei n + const GLuint *arrays + + + + void glDeleteVertexShaderEXT + GLuint id + + + void glDepthBoundsEXT + GLclampd zmin + GLclampd zmax + + + + void glDepthBoundsdNV + GLdouble zmin + GLdouble zmax + + + + void glDepthFunc + GLenum func + + + + void glDepthMask + GLboolean flag + + + + void glDepthRange + GLdouble n + GLdouble f + + + + void glDepthRangeArraydvNV + GLuint first + GLsizei count + const GLdouble *v + + + void glDepthRangeArrayfvNV + GLuint first + GLsizei count + const GLfloat *v + + + void glDepthRangeArrayfvOES + GLuint first + GLsizei count + const GLfloat *v + + + void glDepthRangeArrayv + GLuint first + GLsizei count + const GLdouble *v + + + void glDepthRangeIndexed + GLuint index + GLdouble n + GLdouble f + + + void glDepthRangeIndexeddNV + GLuint index + GLdouble n + GLdouble f + + + void glDepthRangeIndexedfNV + GLuint index + GLfloat n + GLfloat f + + + void glDepthRangeIndexedfOES + GLuint index + GLfloat n + GLfloat f + + + void glDepthRangedNV + GLdouble zNear + GLdouble zFar + + + + void glDepthRangef + GLfloat n + GLfloat f + + + void glDepthRangefOES + GLclampf n + GLclampf f + + + + + void glDepthRangex + GLfixed n + GLfixed f + + + void glDepthRangexOES + GLfixed n + GLfixed f + + + void glDetachObjectARB + GLhandleARB containerObj + GLhandleARB attachedObj + + + + void glDetachShader + GLuint program + GLuint shader + + + void glDetailTexFuncSGIS + GLenum target + GLsizei n + const GLfloat *points + + + + void glDisable + GLenum cap + + + + void glDisableClientState + GLenum array + + + void glDisableClientStateIndexedEXT + GLenum array + GLuint index + + + void glDisableClientStateiEXT + GLenum array + GLuint index + + + void glDisableDriverControlQCOM + GLuint driverControl + + + void glDisableIndexedEXT + GLenum target + GLuint index + + + + + void glDisableVariantClientStateEXT + GLuint id + + + void glDisableVertexArrayAttrib + GLuint vaobj + GLuint index + + + void glDisableVertexArrayAttribEXT + GLuint vaobj + GLuint index + + + void glDisableVertexArrayEXT + GLuint vaobj + GLenum array + + + void glDisableVertexAttribAPPLE + GLuint index + GLenum pname + + + void glDisableVertexAttribArray + GLuint index + + + void glDisableVertexAttribArrayARB + GLuint index + + + + void glDisablei + GLenum target + GLuint index + + + void glDisableiEXT + GLenum target + GLuint index + + + + void glDisableiNV + GLenum target + GLuint index + + + + void glDisableiOES + GLenum target + GLuint index + + + + void glDiscardFramebufferEXT + GLenum target + GLsizei numAttachments + const GLenum *attachments + + + void glDispatchCompute + GLuint num_groups_x + GLuint num_groups_y + GLuint num_groups_z + + + void glDispatchComputeGroupSizeARB + GLuint num_groups_x + GLuint num_groups_y + GLuint num_groups_z + GLuint group_size_x + GLuint group_size_y + GLuint group_size_z + + + void glDispatchComputeIndirect + GLintptr indirect + + + void glDrawArrays + GLenum mode + GLint first + GLsizei count + + + + void glDrawArraysEXT + GLenum mode + GLint first + GLsizei count + + + + + void glDrawArraysIndirect + GLenum mode + const void *indirect + + + void glDrawArraysInstanced + GLenum mode + GLint first + GLsizei count + GLsizei instancecount + + + void glDrawArraysInstancedANGLE + GLenum mode + GLint first + GLsizei count + GLsizei primcount + + + + void glDrawArraysInstancedARB + GLenum mode + GLint first + GLsizei count + GLsizei primcount + + + + void glDrawArraysInstancedBaseInstance + GLenum mode + GLint first + GLsizei count + GLsizei instancecount + GLuint baseinstance + + + void glDrawArraysInstancedBaseInstanceEXT + GLenum mode + GLint first + GLsizei count + GLsizei instancecount + GLuint baseinstance + + + + void glDrawArraysInstancedEXT + GLenum mode + GLint start + GLsizei count + GLsizei primcount + + + + void glDrawArraysInstancedNV + GLenum mode + GLint first + GLsizei count + GLsizei primcount + + + + void glDrawBuffer + GLenum buf + + + + void glDrawBuffers + GLsizei n + const GLenum *bufs + + + + void glDrawBuffersARB + GLsizei n + const GLenum *bufs + + + + void glDrawBuffersATI + GLsizei n + const GLenum *bufs + + + + + void glDrawBuffersEXT + GLsizei n + const GLenum *bufs + + + + void glDrawBuffersIndexedEXT + GLint n + const GLenum *location + const GLint *indices + + + void glDrawBuffersNV + GLsizei n + const GLenum *bufs + + + void glDrawCommandsAddressNV + GLenum primitiveMode + const GLuint64 *indirects + const GLsizei *sizes + GLuint count + + + void glDrawCommandsNV + GLenum primitiveMode + GLuint buffer + const GLintptr *indirects + const GLsizei *sizes + GLuint count + + + void glDrawCommandsStatesAddressNV + const GLuint64 *indirects + const GLsizei *sizes + const GLuint *states + const GLuint *fbos + GLuint count + + + void glDrawCommandsStatesNV + GLuint buffer + const GLintptr *indirects + const GLsizei *sizes + const GLuint *states + const GLuint *fbos + GLuint count + + + void glDrawElementArrayAPPLE + GLenum mode + GLint first + GLsizei count + + + void glDrawElementArrayATI + GLenum mode + GLsizei count + + + void glDrawElements + GLenum mode + GLsizei count + GLenum type + const void *indices + + + void glDrawElementsBaseVertex + GLenum mode + GLsizei count + GLenum type + const void *indices + GLint basevertex + + + void glDrawElementsBaseVertexEXT + GLenum mode + GLsizei count + GLenum type + const void *indices + GLint basevertex + + + + void glDrawElementsBaseVertexOES + GLenum mode + GLsizei count + GLenum type + const void *indices + GLint basevertex + + + + void glDrawElementsIndirect + GLenum mode + GLenum type + const void *indirect + + + void glDrawElementsInstanced + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei instancecount + + + void glDrawElementsInstancedANGLE + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei primcount + + + + void glDrawElementsInstancedARB + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei primcount + + + + void glDrawElementsInstancedBaseInstance + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei instancecount + GLuint baseinstance + + + void glDrawElementsInstancedBaseInstanceEXT + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei instancecount + GLuint baseinstance + + + + void glDrawElementsInstancedBaseVertex + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei instancecount + GLint basevertex + + + void glDrawElementsInstancedBaseVertexBaseInstance + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei instancecount + GLint basevertex + GLuint baseinstance + + + void glDrawElementsInstancedBaseVertexBaseInstanceEXT + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei instancecount + GLint basevertex + GLuint baseinstance + + + + void glDrawElementsInstancedBaseVertexEXT + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei instancecount + GLint basevertex + + + + void glDrawElementsInstancedBaseVertexOES + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei instancecount + GLint basevertex + + + + void glDrawElementsInstancedEXT + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei primcount + + + + void glDrawElementsInstancedNV + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei primcount + + + + void glDrawMeshArraysSUN + GLenum mode + GLint first + GLsizei count + GLsizei width + + + void glDrawMeshTasksEXT + GLuint num_groups_x + GLuint num_groups_y + GLuint num_groups_z + + + void glDrawMeshTasksNV + GLuint first + GLuint count + + + void glDrawMeshTasksIndirectEXT + GLintptr indirect + + + void glDrawMeshTasksIndirectNV + GLintptr indirect + + + void glDrawPixels + GLsizei width + GLsizei height + GLenum format + GLenum type + const void *pixels + + + + + void glDrawRangeElementArrayAPPLE + GLenum mode + GLuint start + GLuint end + GLint first + GLsizei count + + + void glDrawRangeElementArrayATI + GLenum mode + GLuint start + GLuint end + GLsizei count + + + void glDrawRangeElements + GLenum mode + GLuint start + GLuint end + GLsizei count + GLenum type + const void *indices + + + void glDrawRangeElementsBaseVertex + GLenum mode + GLuint start + GLuint end + GLsizei count + GLenum type + const void *indices + GLint basevertex + + + void glDrawRangeElementsBaseVertexEXT + GLenum mode + GLuint start + GLuint end + GLsizei count + GLenum type + const void *indices + GLint basevertex + + + + void glDrawRangeElementsBaseVertexOES + GLenum mode + GLuint start + GLuint end + GLsizei count + GLenum type + const void *indices + GLint basevertex + + + + void glDrawRangeElementsEXT + GLenum mode + GLuint start + GLuint end + GLsizei count + GLenum type + const void *indices + + + + void glDrawTexfOES + GLfloat x + GLfloat y + GLfloat z + GLfloat width + GLfloat height + + + + void glDrawTexfvOES + const GLfloat *coords + + + void glDrawTexiOES + GLint x + GLint y + GLint z + GLint width + GLint height + + + + void glDrawTexivOES + const GLint *coords + + + void glDrawTexsOES + GLshort x + GLshort y + GLshort z + GLshort width + GLshort height + + + + void glDrawTexsvOES + const GLshort *coords + + + void glDrawTextureNV + GLuint texture + GLuint sampler + GLfloat x0 + GLfloat y0 + GLfloat x1 + GLfloat y1 + GLfloat z + GLfloat s0 + GLfloat t0 + GLfloat s1 + GLfloat t1 + + + void glDrawTexxOES + GLfixed x + GLfixed y + GLfixed z + GLfixed width + GLfixed height + + + + void glDrawTexxvOES + const GLfixed *coords + + + void glDrawTransformFeedback + GLenum mode + GLuint id + + + void glDrawTransformFeedbackEXT + GLenum mode + GLuint id + + + + void glDrawTransformFeedbackInstanced + GLenum mode + GLuint id + GLsizei instancecount + + + void glDrawTransformFeedbackInstancedEXT + GLenum mode + GLuint id + GLsizei instancecount + + + + void glDrawTransformFeedbackNV + GLenum mode + GLuint id + + + + void glDrawTransformFeedbackStream + GLenum mode + GLuint id + GLuint stream + + + void glDrawTransformFeedbackStreamInstanced + GLenum mode + GLuint id + GLuint stream + GLsizei instancecount + + + void glEGLImageTargetRenderbufferStorageOES + GLenum target + GLeglImageOES image + + + void glEGLImageTargetTexStorageEXT + GLenum target + GLeglImageOES image + const GLint* attrib_list + + + void glEGLImageTargetTexture2DOES + GLenum target + GLeglImageOES image + + + void glEGLImageTargetTextureStorageEXT + GLuint texture + GLeglImageOES image + const GLint* attrib_list + + + void glEdgeFlag + GLboolean flag + + + + void glEdgeFlagFormatNV + GLsizei stride + + + void glEdgeFlagPointer + GLsizei stride + const void *pointer + + + void glEdgeFlagPointerEXT + GLsizei stride + GLsizei count + const GLboolean *pointer + + + void glEdgeFlagPointerListIBM + GLint stride + const GLboolean **pointer + GLint ptrstride + + + void glEdgeFlagv + const GLboolean *flag + + + + void glElementPointerAPPLE + GLenum type + const void *pointer + + + void glElementPointerATI + GLenum type + const void *pointer + + + void glEnable + GLenum cap + + + + void glEnableClientState + GLenum array + + + void glEnableClientStateIndexedEXT + GLenum array + GLuint index + + + void glEnableClientStateiEXT + GLenum array + GLuint index + + + void glEnableDriverControlQCOM + GLuint driverControl + + + void glEnableIndexedEXT + GLenum target + GLuint index + + + + + void glEnableVariantClientStateEXT + GLuint id + + + void glEnableVertexArrayAttrib + GLuint vaobj + GLuint index + + + void glEnableVertexArrayAttribEXT + GLuint vaobj + GLuint index + + + void glEnableVertexArrayEXT + GLuint vaobj + GLenum array + + + void glEnableVertexAttribAPPLE + GLuint index + GLenum pname + + + void glEnableVertexAttribArray + GLuint index + + + void glEnableVertexAttribArrayARB + GLuint index + + + + void glEnablei + GLenum target + GLuint index + + + void glEnableiEXT + GLenum target + GLuint index + + + + void glEnableiNV + GLenum target + GLuint index + + + + void glEnableiOES + GLenum target + GLuint index + + + + void glEnd + + + + void glEndConditionalRender + + + + void glEndConditionalRenderNV + + + + void glEndConditionalRenderNVX + + + + void glEndFragmentShaderATI + + + void glEndList + + + + void glEndOcclusionQueryNV + + + void glEndPerfMonitorAMD + GLuint monitor + + + void glEndPerfQueryINTEL + GLuint queryHandle + + + void glEndQuery + GLenum target + + + + void glEndQueryARB + GLenum target + + + + void glEndQueryEXT + GLenum target + + + void glEndQueryIndexed + GLenum target + GLuint index + + + void glEndTilingQCOM + GLbitfield preserveMask + + + void glEndTransformFeedback + + + + void glEndTransformFeedbackEXT + + + + void glEndTransformFeedbackNV + + + + void glEndVertexShaderEXT + + + void glEndVideoCaptureNV + GLuint video_capture_slot + + + void glEvalCoord1d + GLdouble u + + + + void glEvalCoord1dv + const GLdouble *u + + + + void glEvalCoord1f + GLfloat u + + + + void glEvalCoord1fv + const GLfloat *u + + + + void glEvalCoord1xOES + GLfixed u + + + void glEvalCoord1xvOES + const GLfixed *coords + + + void glEvalCoord2d + GLdouble u + GLdouble v + + + + void glEvalCoord2dv + const GLdouble *u + + + + void glEvalCoord2f + GLfloat u + GLfloat v + + + + void glEvalCoord2fv + const GLfloat *u + + + + void glEvalCoord2xOES + GLfixed u + GLfixed v + + + void glEvalCoord2xvOES + const GLfixed *coords + + + void glEvalMapsNV + GLenum target + GLenum mode + + + void glEvalMesh1 + GLenum mode + GLint i1 + GLint i2 + + + + void glEvalMesh2 + GLenum mode + GLint i1 + GLint i2 + GLint j1 + GLint j2 + + + + void glEvalPoint1 + GLint i + + + + void glEvalPoint2 + GLint i + GLint j + + + + void glEvaluateDepthValuesARB + + + void glExecuteProgramNV + GLenum target + GLuint id + const GLfloat *params + + + + void glExtGetBufferPointervQCOM + GLenum target + void **params + + + void glExtGetBuffersQCOM + GLuint *buffers + GLint maxBuffers + GLint *numBuffers + + + void glExtGetFramebuffersQCOM + GLuint *framebuffers + GLint maxFramebuffers + GLint *numFramebuffers + + + void glExtGetProgramBinarySourceQCOM + GLuint program + GLenum shadertype + GLchar *source + GLint *length + + + void glExtGetProgramsQCOM + GLuint *programs + GLint maxPrograms + GLint *numPrograms + + + void glExtGetRenderbuffersQCOM + GLuint *renderbuffers + GLint maxRenderbuffers + GLint *numRenderbuffers + + + void glExtGetShadersQCOM + GLuint *shaders + GLint maxShaders + GLint *numShaders + + + void glExtGetTexLevelParameterivQCOM + GLuint texture + GLenum face + GLint level + GLenum pname + GLint *params + + + void glExtGetTexSubImageQCOM + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLenum type + void *texels + + + void glExtGetTexturesQCOM + GLuint *textures + GLint maxTextures + GLint *numTextures + + + GLboolean glExtIsProgramBinaryQCOM + GLuint program + + + void glExtTexObjectStateOverrideiQCOM + GLenum target + GLenum pname + GLint param + + + void glExtractComponentEXT + GLuint res + GLuint src + GLuint num + + + void glFeedbackBuffer + GLsizei size + GLenum type + GLfloat *buffer + + + + void glFeedbackBufferxOES + GLsizei n + GLenum type + const GLfixed *buffer + + + GLsync glFenceSync + GLenum condition + GLbitfield flags + + + GLsync glFenceSyncAPPLE + GLenum condition + GLbitfield flags + + + + void glFinalCombinerInputNV + GLenum variable + GLenum input + GLenum mapping + GLenum componentUsage + + + + void glFinish + + + + GLint glFinishAsyncSGIX + GLuint *markerp + + + void glFinishFenceAPPLE + GLuint fence + + + void glFinishFenceNV + GLuint fence + + + + void glFinishObjectAPPLE + GLenum object + GLint name + + + void glFinishTextureSUNX + + + void glFlush + + + + void glFlushMappedBufferRange + GLenum target + GLintptr offset + GLsizeiptr length + + + void glFlushMappedBufferRangeAPPLE + GLenum target + GLintptr offset + GLsizeiptr size + + + + void glFlushMappedBufferRangeEXT + GLenum target + GLintptr offset + GLsizeiptr length + + + + void glFlushMappedNamedBufferRange + GLuint buffer + GLintptr offset + GLsizeiptr length + + + void glFlushMappedNamedBufferRangeEXT + GLuint buffer + GLintptr offset + GLsizeiptr length + + + void glFlushPixelDataRangeNV + GLenum target + + + void glFlushRasterSGIX + + + + void glFlushStaticDataIBM + GLenum target + + + void glFlushVertexArrayRangeAPPLE + GLsizei length + void *pointer + + + void glFlushVertexArrayRangeNV + + + void glFogCoordFormatNV + GLenum type + GLsizei stride + + + void glFogCoordPointer + GLenum type + GLsizei stride + const void *pointer + + + void glFogCoordPointerEXT + GLenum type + GLsizei stride + const void *pointer + + + + void glFogCoordPointerListIBM + GLenum type + GLint stride + const void **pointer + GLint ptrstride + + + void glFogCoordd + GLdouble coord + + + + void glFogCoorddEXT + GLdouble coord + + + + + void glFogCoorddv + const GLdouble *coord + + + + void glFogCoorddvEXT + const GLdouble *coord + + + + + void glFogCoordf + GLfloat coord + + + + void glFogCoordfEXT + GLfloat coord + + + + + void glFogCoordfv + const GLfloat *coord + + + + void glFogCoordfvEXT + const GLfloat *coord + + + + + void glFogCoordhNV + GLhalfNV fog + + + + void glFogCoordhvNV + const GLhalfNV *fog + + + + void glFogFuncSGIS + GLsizei n + const GLfloat *points + + + + void glFogf + GLenum pname + GLfloat param + + + + void glFogfv + GLenum pname + const GLfloat *params + + + + void glFogi + GLenum pname + GLint param + + + + void glFogiv + GLenum pname + const GLint *params + + + + void glFogx + GLenum pname + GLfixed param + + + void glFogxOES + GLenum pname + GLfixed param + + + void glFogxv + GLenum pname + const GLfixed *param + + + void glFogxvOES + GLenum pname + const GLfixed *param + + + void glFragmentColorMaterialSGIX + GLenum face + GLenum mode + + + void glFragmentCoverageColorNV + GLuint color + + + void glFragmentLightModelfSGIX + GLenum pname + GLfloat param + + + void glFragmentLightModelfvSGIX + GLenum pname + const GLfloat *params + + + void glFragmentLightModeliSGIX + GLenum pname + GLint param + + + void glFragmentLightModelivSGIX + GLenum pname + const GLint *params + + + void glFragmentLightfSGIX + GLenum light + GLenum pname + GLfloat param + + + void glFragmentLightfvSGIX + GLenum light + GLenum pname + const GLfloat *params + + + void glFragmentLightiSGIX + GLenum light + GLenum pname + GLint param + + + void glFragmentLightivSGIX + GLenum light + GLenum pname + const GLint *params + + + void glFragmentMaterialfSGIX + GLenum face + GLenum pname + GLfloat param + + + void glFragmentMaterialfvSGIX + GLenum face + GLenum pname + const GLfloat *params + + + void glFragmentMaterialiSGIX + GLenum face + GLenum pname + GLint param + + + void glFragmentMaterialivSGIX + GLenum face + GLenum pname + const GLint *params + + + void glFrameTerminatorGREMEDY + + + void glFrameZoomSGIX + GLint factor + + + + void glFramebufferDrawBufferEXT + GLuint framebuffer + GLenum mode + + + void glFramebufferDrawBuffersEXT + GLuint framebuffer + GLsizei n + const GLenum *bufs + + + void glFramebufferFetchBarrierEXT + + + void glFramebufferFetchBarrierQCOM + + + void glFramebufferFoveationConfigQCOM + GLuint framebuffer + GLuint numLayers + GLuint focalPointsPerLayer + GLuint requestedFeatures + GLuint *providedFeatures + + + void glFramebufferFoveationParametersQCOM + GLuint framebuffer + GLuint layer + GLuint focalPoint + GLfloat focalX + GLfloat focalY + GLfloat gainX + GLfloat gainY + GLfloat foveaArea + + + void glFramebufferParameteri + GLenum target + GLenum pname + GLint param + + + void glFramebufferPixelLocalStorageSizeEXT + GLuint target + GLsizei size + + + void glFramebufferReadBufferEXT + GLuint framebuffer + GLenum mode + + + void glFramebufferRenderbuffer + GLenum target + GLenum attachment + GLenum renderbuffertarget + GLuint renderbuffer + + + + void glFramebufferRenderbufferEXT + GLenum target + GLenum attachment + GLenum renderbuffertarget + GLuint renderbuffer + + + + + void glFramebufferRenderbufferOES + GLenum target + GLenum attachment + GLenum renderbuffertarget + GLuint renderbuffer + + + void glFramebufferSampleLocationsfvARB + GLenum target + GLuint start + GLsizei count + const GLfloat *v + + + void glFramebufferSampleLocationsfvNV + GLenum target + GLuint start + GLsizei count + const GLfloat *v + + + void glFramebufferSamplePositionsfvAMD + GLenum target + GLuint numsamples + GLuint pixelindex + const GLfloat *values + + + void glFramebufferShadingRateEXT + GLenum target + GLenum attachment + GLuint texture + GLint baseLayer + GLsizei numLayers + GLsizei texelWidth + GLsizei texelHeight + + + void glFramebufferTexture + GLenum target + GLenum attachment + GLuint texture + GLint level + + + void glFramebufferTexture1D + GLenum target + GLenum attachment + GLenum textarget + GLuint texture + GLint level + + + + void glFramebufferTexture1DEXT + GLenum target + GLenum attachment + GLenum textarget + GLuint texture + GLint level + + + + + void glFramebufferTexture2D + GLenum target + GLenum attachment + GLenum textarget + GLuint texture + GLint level + + + + void glFramebufferTexture2DEXT + GLenum target + GLenum attachment + GLenum textarget + GLuint texture + GLint level + + + + + void glFramebufferTexture2DDownsampleIMG + GLenum target + GLenum attachment + GLenum textarget + GLuint texture + GLint level + GLint xscale + GLint yscale + + + void glFramebufferTexture2DMultisampleEXT + GLenum target + GLenum attachment + GLenum textarget + GLuint texture + GLint level + GLsizei samples + + + void glFramebufferTexture2DMultisampleIMG + GLenum target + GLenum attachment + GLenum textarget + GLuint texture + GLint level + GLsizei samples + + + void glFramebufferTexture2DOES + GLenum target + GLenum attachment + GLenum textarget + GLuint texture + GLint level + + + void glFramebufferTexture3D + GLenum target + GLenum attachment + GLenum textarget + GLuint texture + GLint level + GLint zoffset + + + + void glFramebufferTexture3DEXT + GLenum target + GLenum attachment + GLenum textarget + GLuint texture + GLint level + GLint zoffset + + + + + void glFramebufferTexture3DOES + GLenum target + GLenum attachment + GLenum textarget + GLuint texture + GLint level + GLint zoffset + + + void glFramebufferTextureARB + GLenum target + GLenum attachment + GLuint texture + GLint level + + + + void glFramebufferTextureEXT + GLenum target + GLenum attachment + GLuint texture + GLint level + + + + void glFramebufferTextureFaceARB + GLenum target + GLenum attachment + GLuint texture + GLint level + GLenum face + + + void glFramebufferTextureFaceEXT + GLenum target + GLenum attachment + GLuint texture + GLint level + GLenum face + + + + void glFramebufferTextureLayer + GLenum target + GLenum attachment + GLuint texture + GLint level + GLint layer + + + + void glFramebufferTextureLayerARB + GLenum target + GLenum attachment + GLuint texture + GLint level + GLint layer + + + + void glFramebufferTextureLayerEXT + GLenum target + GLenum attachment + GLuint texture + GLint level + GLint layer + + + + void glFramebufferTextureLayerDownsampleIMG + GLenum target + GLenum attachment + GLuint texture + GLint level + GLint layer + GLint xscale + GLint yscale + + + void glFramebufferTextureMultisampleMultiviewOVR + GLenum target + GLenum attachment + GLuint texture + GLint level + GLsizei samples + GLint baseViewIndex + GLsizei numViews + + + void glFramebufferTextureMultiviewOVR + GLenum target + GLenum attachment + GLuint texture + GLint level + GLint baseViewIndex + GLsizei numViews + + + void glFramebufferTextureOES + GLenum target + GLenum attachment + GLuint texture + GLint level + + + + void glFreeObjectBufferATI + GLuint buffer + + + void glFrontFace + GLenum mode + + + + void glFrustum + GLdouble left + GLdouble right + GLdouble bottom + GLdouble top + GLdouble zNear + GLdouble zFar + + + + void glFrustumf + GLfloat l + GLfloat r + GLfloat b + GLfloat t + GLfloat n + GLfloat f + + + void glFrustumfOES + GLfloat l + GLfloat r + GLfloat b + GLfloat t + GLfloat n + GLfloat f + + + + void glFrustumx + GLfixed l + GLfixed r + GLfixed b + GLfixed t + GLfixed n + GLfixed f + + + void glFrustumxOES + GLfixed l + GLfixed r + GLfixed b + GLfixed t + GLfixed n + GLfixed f + + + GLuint glGenAsyncMarkersSGIX + GLsizei range + + + void glGenBuffers + GLsizei n + GLuint *buffers + + + void glGenBuffersARB + GLsizei n + GLuint *buffers + + + + void glGenFencesAPPLE + GLsizei n + GLuint *fences + + + void glGenFencesNV + GLsizei n + GLuint *fences + + + + GLuint glGenFragmentShadersATI + GLuint range + + + void glGenFramebuffers + GLsizei n + GLuint *framebuffers + + + + void glGenFramebuffersEXT + GLsizei n + GLuint *framebuffers + + + + + void glGenFramebuffersOES + GLsizei n + GLuint *framebuffers + + + GLuint glGenLists + GLsizei range + + + + void glGenNamesAMD + GLenum identifier + GLuint num + GLuint *names + + + void glGenOcclusionQueriesNV + GLsizei n + GLuint *ids + + + GLuint glGenPathsNV + GLsizei range + + + void glGenPerfMonitorsAMD + GLsizei n + GLuint *monitors + + + void glGenProgramPipelines + GLsizei n + GLuint *pipelines + + + void glGenProgramPipelinesEXT + GLsizei n + GLuint *pipelines + + + void glGenProgramsARB + GLsizei n + GLuint *programs + + + + void glGenProgramsNV + GLsizei n + GLuint *programs + + + + + void glGenQueries + GLsizei n + GLuint *ids + + + + void glGenQueriesARB + GLsizei n + GLuint *ids + + + + void glGenQueriesEXT + GLsizei n + GLuint *ids + + + void glGenQueryResourceTagNV + GLsizei n + GLint *tagIds + + + void glGenRenderbuffers + GLsizei n + GLuint *renderbuffers + + + + void glGenRenderbuffersEXT + GLsizei n + GLuint *renderbuffers + + + + + void glGenRenderbuffersOES + GLsizei n + GLuint *renderbuffers + + + void glGenSamplers + GLsizei count + GLuint *samplers + + + void glGenSemaphoresEXT + GLsizei n + GLuint *semaphores + + + GLuint glGenSymbolsEXT + GLenum datatype + GLenum storagetype + GLenum range + GLuint components + + + void glGenTextures + GLsizei n + GLuint *textures + + + + void glGenTexturesEXT + GLsizei n + GLuint *textures + + + + void glGenTransformFeedbacks + GLsizei n + GLuint *ids + + + void glGenTransformFeedbacksNV + GLsizei n + GLuint *ids + + + + void glGenVertexArrays + GLsizei n + GLuint *arrays + + + + void glGenVertexArraysAPPLE + GLsizei n + GLuint *arrays + + + + void glGenVertexArraysOES + GLsizei n + GLuint *arrays + + + + GLuint glGenVertexShadersEXT + GLuint range + + + void glGenerateMipmap + GLenum target + + + + void glGenerateMipmapEXT + GLenum target + + + + + void glGenerateMipmapOES + GLenum target + + + void glGenerateMultiTexMipmapEXT + GLenum texunit + GLenum target + + + void glGenerateTextureMipmap + GLuint texture + + + void glGenerateTextureMipmapEXT + GLuint texture + GLenum target + + + void glGetActiveAtomicCounterBufferiv + GLuint program + GLuint bufferIndex + GLenum pname + GLint *params + + + void glGetActiveAttrib + GLuint program + GLuint index + GLsizei bufSize + GLsizei *length + GLint *size + GLenum *type + GLchar *name + + + void glGetActiveAttribARB + GLhandleARB programObj + GLuint index + GLsizei maxLength + GLsizei *length + GLint *size + GLenum *type + GLcharARB *name + + + + void glGetActiveSubroutineName + GLuint program + GLenum shadertype + GLuint index + GLsizei bufSize + GLsizei *length + GLchar *name + + + void glGetActiveSubroutineUniformName + GLuint program + GLenum shadertype + GLuint index + GLsizei bufSize + GLsizei *length + GLchar *name + + + void glGetActiveSubroutineUniformiv + GLuint program + GLenum shadertype + GLuint index + GLenum pname + GLint *values + + + void glGetActiveUniform + GLuint program + GLuint index + GLsizei bufSize + GLsizei *length + GLint *size + GLenum *type + GLchar *name + + + void glGetActiveUniformARB + GLhandleARB programObj + GLuint index + GLsizei maxLength + GLsizei *length + GLint *size + GLenum *type + GLcharARB *name + + + + void glGetActiveUniformBlockName + GLuint program + GLuint uniformBlockIndex + GLsizei bufSize + GLsizei *length + GLchar *uniformBlockName + + + + void glGetActiveUniformBlockiv + GLuint program + GLuint uniformBlockIndex + GLenum pname + GLint *params + + + + void glGetActiveUniformName + GLuint program + GLuint uniformIndex + GLsizei bufSize + GLsizei *length + GLchar *uniformName + + + + void glGetActiveUniformsiv + GLuint program + GLsizei uniformCount + const GLuint *uniformIndices + GLenum pname + GLint *params + + + + void glGetActiveVaryingNV + GLuint program + GLuint index + GLsizei bufSize + GLsizei *length + GLsizei *size + GLenum *type + GLchar *name + + + void glGetArrayObjectfvATI + GLenum array + GLenum pname + GLfloat *params + + + void glGetArrayObjectivATI + GLenum array + GLenum pname + GLint *params + + + void glGetAttachedObjectsARB + GLhandleARB containerObj + GLsizei maxCount + GLsizei *count + GLhandleARB *obj + + + void glGetAttachedShaders + GLuint program + GLsizei maxCount + GLsizei *count + GLuint *shaders + + + GLint glGetAttribLocation + GLuint program + const GLchar *name + + + GLint glGetAttribLocationARB + GLhandleARB programObj + const GLcharARB *name + + + + void glGetBooleanIndexedvEXT + GLenum target + GLuint index + GLboolean *data + + + + + void glGetBooleani_v + GLenum target + GLuint index + GLboolean *data + + + void glGetBooleanv + GLenum pname + GLboolean *data + + + + void glGetBufferParameteri64v + GLenum target + GLenum pname + GLint64 *params + + + void glGetBufferParameteriv + GLenum target + GLenum pname + GLint *params + + + void glGetBufferParameterivARB + GLenum target + GLenum pname + GLint *params + + + + void glGetBufferParameterui64vNV + GLenum target + GLenum pname + GLuint64EXT *params + + + void glGetBufferPointerv + GLenum target + GLenum pname + void **params + + + void glGetBufferPointervARB + GLenum target + GLenum pname + void **params + + + + void glGetBufferPointervOES + GLenum target + GLenum pname + void **params + + + + void glGetBufferSubData + GLenum target + GLintptr offset + GLsizeiptr size + void *data + + + void glGetBufferSubDataARB + GLenum target + GLintptrARB offset + GLsizeiptrARB size + void *data + + + + void glGetClipPlane + GLenum plane + GLdouble *equation + + + + void glGetClipPlanef + GLenum plane + GLfloat *equation + + + void glGetClipPlanefOES + GLenum plane + GLfloat *equation + + + + void glGetClipPlanex + GLenum plane + GLfixed *equation + + + void glGetClipPlanexOES + GLenum plane + GLfixed *equation + + + void glGetColorTable + GLenum target + GLenum format + GLenum type + void *table + + + + + void glGetColorTableEXT + GLenum target + GLenum format + GLenum type + void *data + + + + void glGetColorTableParameterfv + GLenum target + GLenum pname + GLfloat *params + + + + void glGetColorTableParameterfvEXT + GLenum target + GLenum pname + GLfloat *params + + + + void glGetColorTableParameterfvSGI + GLenum target + GLenum pname + GLfloat *params + + + + void glGetColorTableParameteriv + GLenum target + GLenum pname + GLint *params + + + + void glGetColorTableParameterivEXT + GLenum target + GLenum pname + GLint *params + + + + void glGetColorTableParameterivSGI + GLenum target + GLenum pname + GLint *params + + + + void glGetColorTableSGI + GLenum target + GLenum format + GLenum type + void *table + + + + void glGetCombinerInputParameterfvNV + GLenum stage + GLenum portion + GLenum variable + GLenum pname + GLfloat *params + + + + void glGetCombinerInputParameterivNV + GLenum stage + GLenum portion + GLenum variable + GLenum pname + GLint *params + + + + void glGetCombinerOutputParameterfvNV + GLenum stage + GLenum portion + GLenum pname + GLfloat *params + + + + void glGetCombinerOutputParameterivNV + GLenum stage + GLenum portion + GLenum pname + GLint *params + + + + void glGetCombinerStageParameterfvNV + GLenum stage + GLenum pname + GLfloat *params + + + GLuint glGetCommandHeaderNV + GLenum tokenID + GLuint size + + + void glGetCompressedMultiTexImageEXT + GLenum texunit + GLenum target + GLint lod + void *img + + + void glGetCompressedTexImage + GLenum target + GLint level + void *img + + + + + void glGetCompressedTexImageARB + GLenum target + GLint level + void *img + + + + + void glGetCompressedTextureImage + GLuint texture + GLint level + GLsizei bufSize + void *pixels + + + void glGetCompressedTextureImageEXT + GLuint texture + GLenum target + GLint lod + void *img + + + void glGetCompressedTextureSubImage + GLuint texture + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLsizei bufSize + void *pixels + + + void glGetConvolutionFilter + GLenum target + GLenum format + GLenum type + void *image + + + + + void glGetConvolutionFilterEXT + GLenum target + GLenum format + GLenum type + void *image + + + + void glGetConvolutionParameterfv + GLenum target + GLenum pname + GLfloat *params + + + + void glGetConvolutionParameterfvEXT + GLenum target + GLenum pname + GLfloat *params + + + + void glGetConvolutionParameteriv + GLenum target + GLenum pname + GLint *params + + + + void glGetConvolutionParameterivEXT + GLenum target + GLenum pname + GLint *params + + + + void glGetConvolutionParameterxvOES + GLenum target + GLenum pname + GLfixed *params + + + void glGetCoverageModulationTableNV + GLsizei bufSize + GLfloat *v + + + GLuint glGetDebugMessageLog + GLuint count + GLsizei bufSize + GLenum *sources + GLenum *types + GLuint *ids + GLenum *severities + GLsizei *lengths + GLchar *messageLog + + + GLuint glGetDebugMessageLogAMD + GLuint count + GLsizei bufSize + GLenum *categories + GLenum *severities + GLuint *ids + GLsizei *lengths + GLchar *message + + + GLuint glGetDebugMessageLogARB + GLuint count + GLsizei bufSize + GLenum *sources + GLenum *types + GLuint *ids + GLenum *severities + GLsizei *lengths + GLchar *messageLog + + + + GLuint glGetDebugMessageLogKHR + GLuint count + GLsizei bufSize + GLenum *sources + GLenum *types + GLuint *ids + GLenum *severities + GLsizei *lengths + GLchar *messageLog + + + + void glGetDetailTexFuncSGIS + GLenum target + GLfloat *points + + + + void glGetDoubleIndexedvEXT + GLenum target + GLuint index + GLdouble *data + + + + void glGetDoublei_v + GLenum target + GLuint index + GLdouble *data + + + void glGetDoublei_vEXT + GLenum pname + GLuint index + GLdouble *params + + + + void glGetDoublev + GLenum pname + GLdouble *data + + + + void glGetDriverControlStringQCOM + GLuint driverControl + GLsizei bufSize + GLsizei *length + GLchar *driverControlString + + + void glGetDriverControlsQCOM + GLint *num + GLsizei size + GLuint *driverControls + + + GLenum glGetError + + + + void glGetFenceivNV + GLuint fence + GLenum pname + GLint *params + + + + void glGetFinalCombinerInputParameterfvNV + GLenum variable + GLenum pname + GLfloat *params + + + + void glGetFinalCombinerInputParameterivNV + GLenum variable + GLenum pname + GLint *params + + + + void glGetFirstPerfQueryIdINTEL + GLuint *queryId + + + void glGetFixedv + GLenum pname + GLfixed *params + + + void glGetFixedvOES + GLenum pname + GLfixed *params + + + void glGetFloatIndexedvEXT + GLenum target + GLuint index + GLfloat *data + + + + void glGetFloati_v + GLenum target + GLuint index + GLfloat *data + + + void glGetFloati_vEXT + GLenum pname + GLuint index + GLfloat *params + + + + void glGetFloati_vNV + GLenum target + GLuint index + GLfloat *data + + + + void glGetFloati_vOES + GLenum target + GLuint index + GLfloat *data + + + + void glGetFloatv + GLenum pname + GLfloat *data + + + + void glGetFogFuncSGIS + GLfloat *points + + + GLint glGetFragDataIndex + GLuint program + const GLchar *name + + + GLint glGetFragDataIndexEXT + GLuint program + const GLchar *name + + + + GLint glGetFragDataLocation + GLuint program + const GLchar *name + + + GLint glGetFragDataLocationEXT + GLuint program + const GLchar *name + + + + void glGetFragmentLightfvSGIX + GLenum light + GLenum pname + GLfloat *params + + + void glGetFragmentLightivSGIX + GLenum light + GLenum pname + GLint *params + + + void glGetFragmentMaterialfvSGIX + GLenum face + GLenum pname + GLfloat *params + + + void glGetFragmentMaterialivSGIX + GLenum face + GLenum pname + GLint *params + + + void glGetFragmentShadingRatesEXT + GLsizei samples + GLsizei maxCount + GLsizei *count + GLenum *shadingRates + + + void glGetFramebufferAttachmentParameteriv + GLenum target + GLenum attachment + GLenum pname + GLint *params + + + + void glGetFramebufferAttachmentParameterivEXT + GLenum target + GLenum attachment + GLenum pname + GLint *params + + + + + void glGetFramebufferAttachmentParameterivOES + GLenum target + GLenum attachment + GLenum pname + GLint *params + + + void glGetFramebufferParameterfvAMD + GLenum target + GLenum pname + GLuint numsamples + GLuint pixelindex + GLsizei size + GLfloat *values + + + void glGetFramebufferParameteriv + GLenum target + GLenum pname + GLint *params + + + void glGetFramebufferParameterivEXT + GLuint framebuffer + GLenum pname + GLint *params + + + GLsizei glGetFramebufferPixelLocalStorageSizeEXT + GLuint target + + + GLenum glGetGraphicsResetStatus + + + GLenum glGetGraphicsResetStatusARB + + + GLenum glGetGraphicsResetStatusEXT + + + + GLenum glGetGraphicsResetStatusKHR + + + + GLhandleARB glGetHandleARB + GLenum pname + + + void glGetHistogram + GLenum target + GLboolean reset + GLenum format + GLenum type + void *values + + + + + void glGetHistogramEXT + GLenum target + GLboolean reset + GLenum format + GLenum type + void *values + + + + void glGetHistogramParameterfv + GLenum target + GLenum pname + GLfloat *params + + + + void glGetHistogramParameterfvEXT + GLenum target + GLenum pname + GLfloat *params + + + + void glGetHistogramParameteriv + GLenum target + GLenum pname + GLint *params + + + + void glGetHistogramParameterivEXT + GLenum target + GLenum pname + GLint *params + + + + void glGetHistogramParameterxvOES + GLenum target + GLenum pname + GLfixed *params + + + GLuint64 glGetImageHandleARB + GLuint texture + GLint level + GLboolean layered + GLint layer + GLenum format + + + GLuint64 glGetImageHandleNV + GLuint texture + GLint level + GLboolean layered + GLint layer + GLenum format + + + void glGetImageTransformParameterfvHP + GLenum target + GLenum pname + GLfloat *params + + + void glGetImageTransformParameterivHP + GLenum target + GLenum pname + GLint *params + + + void glGetInfoLogARB + GLhandleARB obj + GLsizei maxLength + GLsizei *length + GLcharARB *infoLog + + + GLint glGetInstrumentsSGIX + + + + void glGetInteger64i_v + GLenum target + GLuint index + GLint64 *data + + + void glGetInteger64v + GLenum pname + GLint64 *data + + + void glGetInteger64vAPPLE + GLenum pname + GLint64 *params + + + + void glGetInteger64vEXT + GLenum pname + GLint64 *data + + + + void glGetIntegerIndexedvEXT + GLenum target + GLuint index + GLint *data + + + + + void glGetIntegeri_v + GLenum target + GLuint index + GLint *data + + + void glGetIntegeri_vEXT + GLenum target + GLuint index + GLint *data + + + void glGetIntegerui64i_vNV + GLenum value + GLuint index + GLuint64EXT *result + + + void glGetIntegerui64vNV + GLenum value + GLuint64EXT *result + + + void glGetIntegerv + GLenum pname + GLint *data + + + + void glGetInternalformatSampleivNV + GLenum target + GLenum internalformat + GLsizei samples + GLenum pname + GLsizei count + GLint *params + + + void glGetInternalformati64v + GLenum target + GLenum internalformat + GLenum pname + GLsizei count + GLint64 *params + + + void glGetInternalformativ + GLenum target + GLenum internalformat + GLenum pname + GLsizei count + GLint *params + + + void glGetInvariantBooleanvEXT + GLuint id + GLenum value + GLboolean *data + + + void glGetInvariantFloatvEXT + GLuint id + GLenum value + GLfloat *data + + + void glGetInvariantIntegervEXT + GLuint id + GLenum value + GLint *data + + + void glGetLightfv + GLenum light + GLenum pname + GLfloat *params + + + + void glGetLightiv + GLenum light + GLenum pname + GLint *params + + + + void glGetLightxOES + GLenum light + GLenum pname + GLfixed *params + + + void glGetLightxv + GLenum light + GLenum pname + GLfixed *params + + + void glGetLightxvOES + GLenum light + GLenum pname + GLfixed *params + + + void glGetListParameterfvSGIX + GLuint list + GLenum pname + GLfloat *params + + + void glGetListParameterivSGIX + GLuint list + GLenum pname + GLint *params + + + void glGetLocalConstantBooleanvEXT + GLuint id + GLenum value + GLboolean *data + + + void glGetLocalConstantFloatvEXT + GLuint id + GLenum value + GLfloat *data + + + void glGetLocalConstantIntegervEXT + GLuint id + GLenum value + GLint *data + + + void glGetMapAttribParameterfvNV + GLenum target + GLuint index + GLenum pname + GLfloat *params + + + void glGetMapAttribParameterivNV + GLenum target + GLuint index + GLenum pname + GLint *params + + + void glGetMapControlPointsNV + GLenum target + GLuint index + GLenum type + GLsizei ustride + GLsizei vstride + GLboolean packed + void *points + + + void glGetMapParameterfvNV + GLenum target + GLenum pname + GLfloat *params + + + void glGetMapParameterivNV + GLenum target + GLenum pname + GLint *params + + + void glGetMapdv + GLenum target + GLenum query + GLdouble *v + + + + void glGetMapfv + GLenum target + GLenum query + GLfloat *v + + + + void glGetMapiv + GLenum target + GLenum query + GLint *v + + + + void glGetMapxvOES + GLenum target + GLenum query + GLfixed *v + + + void glGetMaterialfv + GLenum face + GLenum pname + GLfloat *params + + + + void glGetMaterialiv + GLenum face + GLenum pname + GLint *params + + + + void glGetMaterialxOES + GLenum face + GLenum pname + GLfixed param + + + void glGetMaterialxv + GLenum face + GLenum pname + GLfixed *params + + + void glGetMaterialxvOES + GLenum face + GLenum pname + GLfixed *params + + + void glGetMemoryObjectDetachedResourcesuivNV + GLuint memory + GLenum pname + GLint first + GLsizei count + GLuint *params + + + void glGetMemoryObjectParameterivEXT + GLuint memoryObject + GLenum pname + GLint *params + + + void glGetMinmax + GLenum target + GLboolean reset + GLenum format + GLenum type + void *values + + + + + void glGetMinmaxEXT + GLenum target + GLboolean reset + GLenum format + GLenum type + void *values + + + + void glGetMinmaxParameterfv + GLenum target + GLenum pname + GLfloat *params + + + + void glGetMinmaxParameterfvEXT + GLenum target + GLenum pname + GLfloat *params + + + + void glGetMinmaxParameteriv + GLenum target + GLenum pname + GLint *params + + + + void glGetMinmaxParameterivEXT + GLenum target + GLenum pname + GLint *params + + + + void glGetMultiTexEnvfvEXT + GLenum texunit + GLenum target + GLenum pname + GLfloat *params + + + void glGetMultiTexEnvivEXT + GLenum texunit + GLenum target + GLenum pname + GLint *params + + + void glGetMultiTexGendvEXT + GLenum texunit + GLenum coord + GLenum pname + GLdouble *params + + + void glGetMultiTexGenfvEXT + GLenum texunit + GLenum coord + GLenum pname + GLfloat *params + + + void glGetMultiTexGenivEXT + GLenum texunit + GLenum coord + GLenum pname + GLint *params + + + void glGetMultiTexImageEXT + GLenum texunit + GLenum target + GLint level + GLenum format + GLenum type + void *pixels + + + void glGetMultiTexLevelParameterfvEXT + GLenum texunit + GLenum target + GLint level + GLenum pname + GLfloat *params + + + void glGetMultiTexLevelParameterivEXT + GLenum texunit + GLenum target + GLint level + GLenum pname + GLint *params + + + void glGetMultiTexParameterIivEXT + GLenum texunit + GLenum target + GLenum pname + GLint *params + + + void glGetMultiTexParameterIuivEXT + GLenum texunit + GLenum target + GLenum pname + GLuint *params + + + void glGetMultiTexParameterfvEXT + GLenum texunit + GLenum target + GLenum pname + GLfloat *params + + + void glGetMultiTexParameterivEXT + GLenum texunit + GLenum target + GLenum pname + GLint *params + + + void glGetMultisamplefv + GLenum pname + GLuint index + GLfloat *val + + + void glGetMultisamplefvNV + GLenum pname + GLuint index + GLfloat *val + + + + void glGetNamedBufferParameteri64v + GLuint buffer + GLenum pname + GLint64 *params + + + void glGetNamedBufferParameteriv + GLuint buffer + GLenum pname + GLint *params + + + void glGetNamedBufferParameterivEXT + GLuint buffer + GLenum pname + GLint *params + + + void glGetNamedBufferParameterui64vNV + GLuint buffer + GLenum pname + GLuint64EXT *params + + + void glGetNamedBufferPointerv + GLuint buffer + GLenum pname + void **params + + + void glGetNamedBufferPointervEXT + GLuint buffer + GLenum pname + void **params + + + void glGetNamedBufferSubData + GLuint buffer + GLintptr offset + GLsizeiptr size + void *data + + + void glGetNamedBufferSubDataEXT + GLuint buffer + GLintptr offset + GLsizeiptr size + void *data + + + void glGetNamedFramebufferParameterfvAMD + GLuint framebuffer + GLenum pname + GLuint numsamples + GLuint pixelindex + GLsizei size + GLfloat *values + + + void glGetNamedFramebufferAttachmentParameteriv + GLuint framebuffer + GLenum attachment + GLenum pname + GLint *params + + + void glGetNamedFramebufferAttachmentParameterivEXT + GLuint framebuffer + GLenum attachment + GLenum pname + GLint *params + + + void glGetNamedFramebufferParameteriv + GLuint framebuffer + GLenum pname + GLint *param + + + void glGetNamedFramebufferParameterivEXT + GLuint framebuffer + GLenum pname + GLint *params + + + void glGetNamedProgramLocalParameterIivEXT + GLuint program + GLenum target + GLuint index + GLint *params + + + void glGetNamedProgramLocalParameterIuivEXT + GLuint program + GLenum target + GLuint index + GLuint *params + + + void glGetNamedProgramLocalParameterdvEXT + GLuint program + GLenum target + GLuint index + GLdouble *params + + + void glGetNamedProgramLocalParameterfvEXT + GLuint program + GLenum target + GLuint index + GLfloat *params + + + void glGetNamedProgramStringEXT + GLuint program + GLenum target + GLenum pname + void *string + + + void glGetNamedProgramivEXT + GLuint program + GLenum target + GLenum pname + GLint *params + + + void glGetNamedRenderbufferParameteriv + GLuint renderbuffer + GLenum pname + GLint *params + + + void glGetNamedRenderbufferParameterivEXT + GLuint renderbuffer + GLenum pname + GLint *params + + + void glGetNamedStringARB + GLint namelen + const GLchar *name + GLsizei bufSize + GLint *stringlen + GLchar *string + + + void glGetNamedStringivARB + GLint namelen + const GLchar *name + GLenum pname + GLint *params + + + void glGetNextPerfQueryIdINTEL + GLuint queryId + GLuint *nextQueryId + + + void glGetObjectBufferfvATI + GLuint buffer + GLenum pname + GLfloat *params + + + void glGetObjectBufferivATI + GLuint buffer + GLenum pname + GLint *params + + + void glGetObjectLabel + GLenum identifier + GLuint name + GLsizei bufSize + GLsizei *length + GLchar *label + + + void glGetObjectLabelEXT + GLenum type + GLuint object + GLsizei bufSize + GLsizei *length + GLchar *label + + + void glGetObjectLabelKHR + GLenum identifier + GLuint name + GLsizei bufSize + GLsizei *length + GLchar *label + + + + void glGetObjectParameterfvARB + GLhandleARB obj + GLenum pname + GLfloat *params + + + void glGetObjectParameterivAPPLE + GLenum objectType + GLuint name + GLenum pname + GLint *params + + + void glGetObjectParameterivARB + GLhandleARB obj + GLenum pname + GLint *params + + + void glGetObjectPtrLabel + const void *ptr + GLsizei bufSize + GLsizei *length + GLchar *label + + + void glGetObjectPtrLabelKHR + const void *ptr + GLsizei bufSize + GLsizei *length + GLchar *label + + + + void glGetOcclusionQueryivNV + GLuint id + GLenum pname + GLint *params + + + void glGetOcclusionQueryuivNV + GLuint id + GLenum pname + GLuint *params + + + void glGetPathColorGenfvNV + GLenum color + GLenum pname + GLfloat *value + + + void glGetPathColorGenivNV + GLenum color + GLenum pname + GLint *value + + + void glGetPathCommandsNV + GLuint path + GLubyte *commands + + + void glGetPathCoordsNV + GLuint path + GLfloat *coords + + + void glGetPathDashArrayNV + GLuint path + GLfloat *dashArray + + + GLfloat glGetPathLengthNV + GLuint path + GLsizei startSegment + GLsizei numSegments + + + void glGetPathMetricRangeNV + GLbitfield metricQueryMask + GLuint firstPathName + GLsizei numPaths + GLsizei stride + GLfloat *metrics + + + void glGetPathMetricsNV + GLbitfield metricQueryMask + GLsizei numPaths + GLenum pathNameType + const void *paths + GLuint pathBase + GLsizei stride + GLfloat *metrics + + + void glGetPathParameterfvNV + GLuint path + GLenum pname + GLfloat *value + + + void glGetPathParameterivNV + GLuint path + GLenum pname + GLint *value + + + void glGetPathSpacingNV + GLenum pathListMode + GLsizei numPaths + GLenum pathNameType + const void *paths + GLuint pathBase + GLfloat advanceScale + GLfloat kerningScale + GLenum transformType + GLfloat *returnedSpacing + + + void glGetPathTexGenfvNV + GLenum texCoordSet + GLenum pname + GLfloat *value + + + void glGetPathTexGenivNV + GLenum texCoordSet + GLenum pname + GLint *value + + + void glGetPerfCounterInfoINTEL + GLuint queryId + GLuint counterId + GLuint counterNameLength + GLchar *counterName + GLuint counterDescLength + GLchar *counterDesc + GLuint *counterOffset + GLuint *counterDataSize + GLuint *counterTypeEnum + GLuint *counterDataTypeEnum + GLuint64 *rawCounterMaxValue + + + void glGetPerfMonitorCounterDataAMD + GLuint monitor + GLenum pname + GLsizei dataSize + GLuint *data + GLint *bytesWritten + + + void glGetPerfMonitorCounterInfoAMD + GLuint group + GLuint counter + GLenum pname + void *data + + + void glGetPerfMonitorCounterStringAMD + GLuint group + GLuint counter + GLsizei bufSize + GLsizei *length + GLchar *counterString + + + void glGetPerfMonitorCountersAMD + GLuint group + GLint *numCounters + GLint *maxActiveCounters + GLsizei counterSize + GLuint *counters + + + void glGetPerfMonitorGroupStringAMD + GLuint group + GLsizei bufSize + GLsizei *length + GLchar *groupString + + + void glGetPerfMonitorGroupsAMD + GLint *numGroups + GLsizei groupsSize + GLuint *groups + + + void glGetPerfQueryDataINTEL + GLuint queryHandle + GLuint flags + GLsizei dataSize + void *data + GLuint *bytesWritten + + + void glGetPerfQueryIdByNameINTEL + GLchar *queryName + GLuint *queryId + + + void glGetPerfQueryInfoINTEL + GLuint queryId + GLuint queryNameLength + GLchar *queryName + GLuint *dataSize + GLuint *noCounters + GLuint *noInstances + GLuint *capsMask + + + void glGetPixelMapfv + GLenum map + GLfloat *values + + + + + void glGetPixelMapuiv + GLenum map + GLuint *values + + + + + void glGetPixelMapusv + GLenum map + GLushort *values + + + + + void glGetPixelMapxv + GLenum map + GLint size + GLfixed *values + + + void glGetPixelTexGenParameterfvSGIS + GLenum pname + GLfloat *params + + + void glGetPixelTexGenParameterivSGIS + GLenum pname + GLint *params + + + void glGetPixelTransformParameterfvEXT + GLenum target + GLenum pname + GLfloat *params + + + + void glGetPixelTransformParameterivEXT + GLenum target + GLenum pname + GLint *params + + + + void glGetPointerIndexedvEXT + GLenum target + GLuint index + void **data + + + void glGetPointeri_vEXT + GLenum pname + GLuint index + void **params + + + void glGetPointerv + GLenum pname + void **params + + + + void glGetPointervEXT + GLenum pname + void **params + + + + void glGetPointervKHR + GLenum pname + void **params + + + + void glGetPolygonStipple + GLubyte *mask + + + + + void glGetProgramBinary + GLuint program + GLsizei bufSize + GLsizei *length + GLenum *binaryFormat + void *binary + + + void glGetProgramBinaryOES + GLuint program + GLsizei bufSize + GLsizei *length + GLenum *binaryFormat + void *binary + + + + void glGetProgramEnvParameterIivNV + GLenum target + GLuint index + GLint *params + + + void glGetProgramEnvParameterIuivNV + GLenum target + GLuint index + GLuint *params + + + void glGetProgramEnvParameterdvARB + GLenum target + GLuint index + GLdouble *params + + + void glGetProgramEnvParameterfvARB + GLenum target + GLuint index + GLfloat *params + + + void glGetProgramInfoLog + GLuint program + GLsizei bufSize + GLsizei *length + GLchar *infoLog + + + + void glGetProgramInterfaceiv + GLuint program + GLenum programInterface + GLenum pname + GLint *params + + + void glGetProgramLocalParameterIivNV + GLenum target + GLuint index + GLint *params + + + void glGetProgramLocalParameterIuivNV + GLenum target + GLuint index + GLuint *params + + + void glGetProgramLocalParameterdvARB + GLenum target + GLuint index + GLdouble *params + + + void glGetProgramLocalParameterfvARB + GLenum target + GLuint index + GLfloat *params + + + void glGetProgramNamedParameterdvNV + GLuint id + GLsizei len + const GLubyte *name + GLdouble *params + + + + void glGetProgramNamedParameterfvNV + GLuint id + GLsizei len + const GLubyte *name + GLfloat *params + + + + void glGetProgramParameterdvNV + GLenum target + GLuint index + GLenum pname + GLdouble *params + + + + void glGetProgramParameterfvNV + GLenum target + GLuint index + GLenum pname + GLfloat *params + + + + void glGetProgramPipelineInfoLog + GLuint pipeline + GLsizei bufSize + GLsizei *length + GLchar *infoLog + + + void glGetProgramPipelineInfoLogEXT + GLuint pipeline + GLsizei bufSize + GLsizei *length + GLchar *infoLog + + + void glGetProgramPipelineiv + GLuint pipeline + GLenum pname + GLint *params + + + void glGetProgramPipelineivEXT + GLuint pipeline + GLenum pname + GLint *params + + + GLuint glGetProgramResourceIndex + GLuint program + GLenum programInterface + const GLchar *name + + + GLint glGetProgramResourceLocation + GLuint program + GLenum programInterface + const GLchar *name + + + GLint glGetProgramResourceLocationIndex + GLuint program + GLenum programInterface + const GLchar *name + + + GLint glGetProgramResourceLocationIndexEXT + GLuint program + GLenum programInterface + const GLchar *name + + + void glGetProgramResourceName + GLuint program + GLenum programInterface + GLuint index + GLsizei bufSize + GLsizei *length + GLchar *name + + + void glGetProgramResourcefvNV + GLuint program + GLenum programInterface + GLuint index + GLsizei propCount + const GLenum *props + GLsizei count + GLsizei *length + GLfloat *params + + + void glGetProgramResourceiv + GLuint program + GLenum programInterface + GLuint index + GLsizei propCount + const GLenum *props + GLsizei count + GLsizei *length + GLint *params + + + void glGetProgramStageiv + GLuint program + GLenum shadertype + GLenum pname + GLint *values + + + void glGetProgramStringARB + GLenum target + GLenum pname + void *string + + + void glGetProgramStringNV + GLuint id + GLenum pname + GLubyte *program + + + + void glGetProgramSubroutineParameteruivNV + GLenum target + GLuint index + GLuint *param + + + void glGetProgramiv + GLuint program + GLenum pname + GLint *params + + + + void glGetProgramivARB + GLenum target + GLenum pname + GLint *params + + + void glGetProgramivNV + GLuint id + GLenum pname + GLint *params + + + + void glGetQueryBufferObjecti64v + GLuint id + GLuint buffer + GLenum pname + GLintptr offset + + + void glGetQueryBufferObjectiv + GLuint id + GLuint buffer + GLenum pname + GLintptr offset + + + void glGetQueryBufferObjectui64v + GLuint id + GLuint buffer + GLenum pname + GLintptr offset + + + void glGetQueryBufferObjectuiv + GLuint id + GLuint buffer + GLenum pname + GLintptr offset + + + void glGetQueryIndexediv + GLenum target + GLuint index + GLenum pname + GLint *params + + + void glGetQueryObjecti64v + GLuint id + GLenum pname + GLint64 *params + + + void glGetQueryObjecti64vEXT + GLuint id + GLenum pname + GLint64 *params + + + + + void glGetQueryObjectiv + GLuint id + GLenum pname + GLint *params + + + + void glGetQueryObjectivARB + GLuint id + GLenum pname + GLint *params + + + + void glGetQueryObjectivEXT + GLuint id + GLenum pname + GLint *params + + + + void glGetQueryObjectui64v + GLuint id + GLenum pname + GLuint64 *params + + + void glGetQueryObjectui64vEXT + GLuint id + GLenum pname + GLuint64 *params + + + + + void glGetQueryObjectuiv + GLuint id + GLenum pname + GLuint *params + + + + void glGetQueryObjectuivARB + GLuint id + GLenum pname + GLuint *params + + + + void glGetQueryObjectuivEXT + GLuint id + GLenum pname + GLuint *params + + + void glGetQueryiv + GLenum target + GLenum pname + GLint *params + + + + void glGetQueryivARB + GLenum target + GLenum pname + GLint *params + + + + void glGetQueryivEXT + GLenum target + GLenum pname + GLint *params + + + void glGetRenderbufferParameteriv + GLenum target + GLenum pname + GLint *params + + + + void glGetRenderbufferParameterivEXT + GLenum target + GLenum pname + GLint *params + + + + + void glGetRenderbufferParameterivOES + GLenum target + GLenum pname + GLint *params + + + void glGetSamplerParameterIiv + GLuint sampler + GLenum pname + GLint *params + + + void glGetSamplerParameterIivEXT + GLuint sampler + GLenum pname + GLint *params + + + + void glGetSamplerParameterIivOES + GLuint sampler + GLenum pname + GLint *params + + + + void glGetSamplerParameterIuiv + GLuint sampler + GLenum pname + GLuint *params + + + void glGetSamplerParameterIuivEXT + GLuint sampler + GLenum pname + GLuint *params + + + + void glGetSamplerParameterIuivOES + GLuint sampler + GLenum pname + GLuint *params + + + + void glGetSamplerParameterfv + GLuint sampler + GLenum pname + GLfloat *params + + + void glGetSamplerParameteriv + GLuint sampler + GLenum pname + GLint *params + + + void glGetSemaphoreParameterivNV + GLuint semaphore + GLenum pname + GLint *params + + + void glGetSemaphoreParameterui64vEXT + GLuint semaphore + GLenum pname + GLuint64 *params + + + void glGetSeparableFilter + GLenum target + GLenum format + GLenum type + void *row + void *column + void *span + + + + + void glGetSeparableFilterEXT + GLenum target + GLenum format + GLenum type + void *row + void *column + void *span + + + + void glGetShaderInfoLog + GLuint shader + GLsizei bufSize + GLsizei *length + GLchar *infoLog + + + + void glGetShaderPrecisionFormat + GLenum shadertype + GLenum precisiontype + GLint *range + GLint *precision + + + void glGetShaderSource + GLuint shader + GLsizei bufSize + GLsizei *length + GLchar *source + + + void glGetShaderSourceARB + GLhandleARB obj + GLsizei maxLength + GLsizei *length + GLcharARB *source + + + + void glGetShaderiv + GLuint shader + GLenum pname + GLint *params + + + + void glGetShadingRateImagePaletteNV + GLuint viewport + GLuint entry + GLenum *rate + + + void glGetShadingRateSampleLocationivNV + GLenum rate + GLuint samples + GLuint index + GLint *location + + + void glGetSharpenTexFuncSGIS + GLenum target + GLfloat *points + + + + GLushort glGetStageIndexNV + GLenum shadertype + + + + const GLubyte *glGetString + GLenum name + + + + const GLubyte *glGetStringi + GLenum name + GLuint index + + + + GLuint glGetSubroutineIndex + GLuint program + GLenum shadertype + const GLchar *name + + + GLint glGetSubroutineUniformLocation + GLuint program + GLenum shadertype + const GLchar *name + + + void glGetSynciv + GLsync sync + GLenum pname + GLsizei count + GLsizei *length + GLint *values + + + void glGetSyncivAPPLE + GLsync sync + GLenum pname + GLsizei count + GLsizei *length + GLint *values + + + + void glGetTexBumpParameterfvATI + GLenum pname + GLfloat *param + + + void glGetTexBumpParameterivATI + GLenum pname + GLint *param + + + void glGetTexEnvfv + GLenum target + GLenum pname + GLfloat *params + + + + void glGetTexEnviv + GLenum target + GLenum pname + GLint *params + + + + void glGetTexEnvxv + GLenum target + GLenum pname + GLfixed *params + + + void glGetTexEnvxvOES + GLenum target + GLenum pname + GLfixed *params + + + void glGetTexFilterFuncSGIS + GLenum target + GLenum filter + GLfloat *weights + + + + void glGetTexGendv + GLenum coord + GLenum pname + GLdouble *params + + + + void glGetTexGenfv + GLenum coord + GLenum pname + GLfloat *params + + + + void glGetTexGenfvOES + GLenum coord + GLenum pname + GLfloat *params + + + void glGetTexGeniv + GLenum coord + GLenum pname + GLint *params + + + + void glGetTexGenivOES + GLenum coord + GLenum pname + GLint *params + + + void glGetTexGenxvOES + GLenum coord + GLenum pname + GLfixed *params + + + void glGetTexImage + GLenum target + GLint level + GLenum format + GLenum type + void *pixels + + + + + void glGetTexLevelParameterfv + GLenum target + GLint level + GLenum pname + GLfloat *params + + + + void glGetTexLevelParameteriv + GLenum target + GLint level + GLenum pname + GLint *params + + + + void glGetTexLevelParameterxvOES + GLenum target + GLint level + GLenum pname + GLfixed *params + + + void glGetTexParameterIiv + GLenum target + GLenum pname + GLint *params + + + + void glGetTexParameterIivEXT + GLenum target + GLenum pname + GLint *params + + + + void glGetTexParameterIivOES + GLenum target + GLenum pname + GLint *params + + + + void glGetTexParameterIuiv + GLenum target + GLenum pname + GLuint *params + + + + void glGetTexParameterIuivEXT + GLenum target + GLenum pname + GLuint *params + + + + void glGetTexParameterIuivOES + GLenum target + GLenum pname + GLuint *params + + + + void glGetTexParameterPointervAPPLE + GLenum target + GLenum pname + void **params + + + void glGetTexParameterfv + GLenum target + GLenum pname + GLfloat *params + + + + void glGetTexParameteriv + GLenum target + GLenum pname + GLint *params + + + + void glGetTexParameterxv + GLenum target + GLenum pname + GLfixed *params + + + void glGetTexParameterxvOES + GLenum target + GLenum pname + GLfixed *params + + + GLuint64 glGetTextureHandleARB + GLuint texture + + + GLuint64 glGetTextureHandleIMG + GLuint texture + + + + GLuint64 glGetTextureHandleNV + GLuint texture + + + void glGetTextureImage + GLuint texture + GLint level + GLenum format + GLenum type + GLsizei bufSize + void *pixels + + + void glGetTextureImageEXT + GLuint texture + GLenum target + GLint level + GLenum format + GLenum type + void *pixels + + + void glGetTextureLevelParameterfv + GLuint texture + GLint level + GLenum pname + GLfloat *params + + + void glGetTextureLevelParameterfvEXT + GLuint texture + GLenum target + GLint level + GLenum pname + GLfloat *params + + + void glGetTextureLevelParameteriv + GLuint texture + GLint level + GLenum pname + GLint *params + + + void glGetTextureLevelParameterivEXT + GLuint texture + GLenum target + GLint level + GLenum pname + GLint *params + + + void glGetTextureParameterIiv + GLuint texture + GLenum pname + GLint *params + + + void glGetTextureParameterIivEXT + GLuint texture + GLenum target + GLenum pname + GLint *params + + + void glGetTextureParameterIuiv + GLuint texture + GLenum pname + GLuint *params + + + void glGetTextureParameterIuivEXT + GLuint texture + GLenum target + GLenum pname + GLuint *params + + + void glGetTextureParameterfv + GLuint texture + GLenum pname + GLfloat *params + + + void glGetTextureParameterfvEXT + GLuint texture + GLenum target + GLenum pname + GLfloat *params + + + void glGetTextureParameteriv + GLuint texture + GLenum pname + GLint *params + + + void glGetTextureParameterivEXT + GLuint texture + GLenum target + GLenum pname + GLint *params + + + GLuint64 glGetTextureSamplerHandleARB + GLuint texture + GLuint sampler + + + GLuint64 glGetTextureSamplerHandleIMG + GLuint texture + GLuint sampler + + + + GLuint64 glGetTextureSamplerHandleNV + GLuint texture + GLuint sampler + + + void glGetTextureSubImage + GLuint texture + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLenum type + GLsizei bufSize + void *pixels + + + void glGetTrackMatrixivNV + GLenum target + GLuint address + GLenum pname + GLint *params + + + + void glGetTransformFeedbackVarying + GLuint program + GLuint index + GLsizei bufSize + GLsizei *length + GLsizei *size + GLenum *type + GLchar *name + + + + void glGetTransformFeedbackVaryingEXT + GLuint program + GLuint index + GLsizei bufSize + GLsizei *length + GLsizei *size + GLenum *type + GLchar *name + + + + void glGetTransformFeedbackVaryingNV + GLuint program + GLuint index + GLint *location + + + void glGetTransformFeedbacki64_v + GLuint xfb + GLenum pname + GLuint index + GLint64 *param + + + void glGetTransformFeedbacki_v + GLuint xfb + GLenum pname + GLuint index + GLint *param + + + void glGetTransformFeedbackiv + GLuint xfb + GLenum pname + GLint *param + + + void glGetTranslatedShaderSourceANGLE + GLuint shader + GLsizei bufSize + GLsizei *length + GLchar *source + + + GLuint glGetUniformBlockIndex + GLuint program + const GLchar *uniformBlockName + + + + GLint glGetUniformBufferSizeEXT + GLuint program + GLint location + + + void glGetUniformIndices + GLuint program + GLsizei uniformCount + const GLchar *const*uniformNames + GLuint *uniformIndices + + + + GLint glGetUniformLocation + GLuint program + const GLchar *name + + + GLint glGetUniformLocationARB + GLhandleARB programObj + const GLcharARB *name + + + + GLintptr glGetUniformOffsetEXT + GLuint program + GLint location + + + void glGetUniformSubroutineuiv + GLenum shadertype + GLint location + GLuint *params + + + void glGetUniformdv + GLuint program + GLint location + GLdouble *params + + + void glGetUniformfv + GLuint program + GLint location + GLfloat *params + + + void glGetUniformfvARB + GLhandleARB programObj + GLint location + GLfloat *params + + + + void glGetUniformi64vARB + GLuint program + GLint location + GLint64 *params + + + void glGetUniformi64vNV + GLuint program + GLint location + GLint64EXT *params + + + void glGetUniformiv + GLuint program + GLint location + GLint *params + + + void glGetUniformivARB + GLhandleARB programObj + GLint location + GLint *params + + + + void glGetUniformui64vARB + GLuint program + GLint location + GLuint64 *params + + + void glGetUniformui64vNV + GLuint program + GLint location + GLuint64EXT *params + + + void glGetUniformuiv + GLuint program + GLint location + GLuint *params + + + void glGetUniformuivEXT + GLuint program + GLint location + GLuint *params + + + + void glGetUnsignedBytevEXT + GLenum pname + GLubyte *data + + + void glGetUnsignedBytei_vEXT + GLenum target + GLuint index + GLubyte *data + + + void glGetVariantArrayObjectfvATI + GLuint id + GLenum pname + GLfloat *params + + + void glGetVariantArrayObjectivATI + GLuint id + GLenum pname + GLint *params + + + void glGetVariantBooleanvEXT + GLuint id + GLenum value + GLboolean *data + + + void glGetVariantFloatvEXT + GLuint id + GLenum value + GLfloat *data + + + void glGetVariantIntegervEXT + GLuint id + GLenum value + GLint *data + + + void glGetVariantPointervEXT + GLuint id + GLenum value + void **data + + + GLint glGetVaryingLocationNV + GLuint program + const GLchar *name + + + void glGetVertexArrayIndexed64iv + GLuint vaobj + GLuint index + GLenum pname + GLint64 *param + + + void glGetVertexArrayIndexediv + GLuint vaobj + GLuint index + GLenum pname + GLint *param + + + void glGetVertexArrayIntegeri_vEXT + GLuint vaobj + GLuint index + GLenum pname + GLint *param + + + void glGetVertexArrayIntegervEXT + GLuint vaobj + GLenum pname + GLint *param + + + void glGetVertexArrayPointeri_vEXT + GLuint vaobj + GLuint index + GLenum pname + void **param + + + void glGetVertexArrayPointervEXT + GLuint vaobj + GLenum pname + void **param + + + void glGetVertexArrayiv + GLuint vaobj + GLenum pname + GLint *param + + + void glGetVertexAttribArrayObjectfvATI + GLuint index + GLenum pname + GLfloat *params + + + void glGetVertexAttribArrayObjectivATI + GLuint index + GLenum pname + GLint *params + + + void glGetVertexAttribIiv + GLuint index + GLenum pname + GLint *params + + + void glGetVertexAttribIivEXT + GLuint index + GLenum pname + GLint *params + + + + void glGetVertexAttribIuiv + GLuint index + GLenum pname + GLuint *params + + + void glGetVertexAttribIuivEXT + GLuint index + GLenum pname + GLuint *params + + + + void glGetVertexAttribLdv + GLuint index + GLenum pname + GLdouble *params + + + void glGetVertexAttribLdvEXT + GLuint index + GLenum pname + GLdouble *params + + + + void glGetVertexAttribLi64vNV + GLuint index + GLenum pname + GLint64EXT *params + + + void glGetVertexAttribLui64vARB + GLuint index + GLenum pname + GLuint64EXT *params + + + void glGetVertexAttribLui64vNV + GLuint index + GLenum pname + GLuint64EXT *params + + + void glGetVertexAttribPointerv + GLuint index + GLenum pname + void **pointer + + + + void glGetVertexAttribPointervARB + GLuint index + GLenum pname + void **pointer + + + + void glGetVertexAttribPointervNV + GLuint index + GLenum pname + void **pointer + + + + void glGetVertexAttribdv + GLuint index + GLenum pname + GLdouble *params + + + + void glGetVertexAttribdvARB + GLuint index + GLenum pname + GLdouble *params + + + + + void glGetVertexAttribdvNV + GLuint index + GLenum pname + GLdouble *params + + + + + void glGetVertexAttribfv + GLuint index + GLenum pname + GLfloat *params + + + + void glGetVertexAttribfvARB + GLuint index + GLenum pname + GLfloat *params + + + + + void glGetVertexAttribfvNV + GLuint index + GLenum pname + GLfloat *params + + + + + void glGetVertexAttribiv + GLuint index + GLenum pname + GLint *params + + + + void glGetVertexAttribivARB + GLuint index + GLenum pname + GLint *params + + + + + void glGetVertexAttribivNV + GLuint index + GLenum pname + GLint *params + + + + + void glGetVideoCaptureStreamdvNV + GLuint video_capture_slot + GLuint stream + GLenum pname + GLdouble *params + + + void glGetVideoCaptureStreamfvNV + GLuint video_capture_slot + GLuint stream + GLenum pname + GLfloat *params + + + void glGetVideoCaptureStreamivNV + GLuint video_capture_slot + GLuint stream + GLenum pname + GLint *params + + + void glGetVideoCaptureivNV + GLuint video_capture_slot + GLenum pname + GLint *params + + + void glGetVideoi64vNV + GLuint video_slot + GLenum pname + GLint64EXT *params + + + void glGetVideoivNV + GLuint video_slot + GLenum pname + GLint *params + + + void glGetVideoui64vNV + GLuint video_slot + GLenum pname + GLuint64EXT *params + + + void glGetVideouivNV + GLuint video_slot + GLenum pname + GLuint *params + + + void glGetnColorTable + GLenum target + GLenum format + GLenum type + GLsizei bufSize + void *table + + + void glGetnColorTableARB + GLenum target + GLenum format + GLenum type + GLsizei bufSize + void *table + + + void glGetnCompressedTexImage + GLenum target + GLint lod + GLsizei bufSize + void *pixels + + + void glGetnCompressedTexImageARB + GLenum target + GLint lod + GLsizei bufSize + void *img + + + void glGetnConvolutionFilter + GLenum target + GLenum format + GLenum type + GLsizei bufSize + void *image + + + void glGetnConvolutionFilterARB + GLenum target + GLenum format + GLenum type + GLsizei bufSize + void *image + + + void glGetnHistogram + GLenum target + GLboolean reset + GLenum format + GLenum type + GLsizei bufSize + void *values + + + void glGetnHistogramARB + GLenum target + GLboolean reset + GLenum format + GLenum type + GLsizei bufSize + void *values + + + void glGetnMapdv + GLenum target + GLenum query + GLsizei bufSize + GLdouble *v + + + void glGetnMapdvARB + GLenum target + GLenum query + GLsizei bufSize + GLdouble *v + + + void glGetnMapfv + GLenum target + GLenum query + GLsizei bufSize + GLfloat *v + + + void glGetnMapfvARB + GLenum target + GLenum query + GLsizei bufSize + GLfloat *v + + + void glGetnMapiv + GLenum target + GLenum query + GLsizei bufSize + GLint *v + + + void glGetnMapivARB + GLenum target + GLenum query + GLsizei bufSize + GLint *v + + + void glGetnMinmax + GLenum target + GLboolean reset + GLenum format + GLenum type + GLsizei bufSize + void *values + + + void glGetnMinmaxARB + GLenum target + GLboolean reset + GLenum format + GLenum type + GLsizei bufSize + void *values + + + void glGetnPixelMapfv + GLenum map + GLsizei bufSize + GLfloat *values + + + void glGetnPixelMapfvARB + GLenum map + GLsizei bufSize + GLfloat *values + + + void glGetnPixelMapuiv + GLenum map + GLsizei bufSize + GLuint *values + + + void glGetnPixelMapuivARB + GLenum map + GLsizei bufSize + GLuint *values + + + void glGetnPixelMapusv + GLenum map + GLsizei bufSize + GLushort *values + + + void glGetnPixelMapusvARB + GLenum map + GLsizei bufSize + GLushort *values + + + void glGetnPolygonStipple + GLsizei bufSize + GLubyte *pattern + + + void glGetnPolygonStippleARB + GLsizei bufSize + GLubyte *pattern + + + void glGetnSeparableFilter + GLenum target + GLenum format + GLenum type + GLsizei rowBufSize + void *row + GLsizei columnBufSize + void *column + void *span + + + void glGetnSeparableFilterARB + GLenum target + GLenum format + GLenum type + GLsizei rowBufSize + void *row + GLsizei columnBufSize + void *column + void *span + + + void glGetnTexImage + GLenum target + GLint level + GLenum format + GLenum type + GLsizei bufSize + void *pixels + + + void glGetnTexImageARB + GLenum target + GLint level + GLenum format + GLenum type + GLsizei bufSize + void *img + + + void glGetnUniformdv + GLuint program + GLint location + GLsizei bufSize + GLdouble *params + + + void glGetnUniformdvARB + GLuint program + GLint location + GLsizei bufSize + GLdouble *params + + + void glGetnUniformfv + GLuint program + GLint location + GLsizei bufSize + GLfloat *params + + + void glGetnUniformfvARB + GLuint program + GLint location + GLsizei bufSize + GLfloat *params + + + void glGetnUniformfvEXT + GLuint program + GLint location + GLsizei bufSize + GLfloat *params + + + + void glGetnUniformfvKHR + GLuint program + GLint location + GLsizei bufSize + GLfloat *params + + + + void glGetnUniformi64vARB + GLuint program + GLint location + GLsizei bufSize + GLint64 *params + + + void glGetnUniformiv + GLuint program + GLint location + GLsizei bufSize + GLint *params + + + void glGetnUniformivARB + GLuint program + GLint location + GLsizei bufSize + GLint *params + + + void glGetnUniformivEXT + GLuint program + GLint location + GLsizei bufSize + GLint *params + + + + void glGetnUniformivKHR + GLuint program + GLint location + GLsizei bufSize + GLint *params + + + + void glGetnUniformui64vARB + GLuint program + GLint location + GLsizei bufSize + GLuint64 *params + + + void glGetnUniformuiv + GLuint program + GLint location + GLsizei bufSize + GLuint *params + + + void glGetnUniformuivARB + GLuint program + GLint location + GLsizei bufSize + GLuint *params + + + void glGetnUniformuivKHR + GLuint program + GLint location + GLsizei bufSize + GLuint *params + + + + void glGlobalAlphaFactorbSUN + GLbyte factor + + + void glGlobalAlphaFactordSUN + GLdouble factor + + + void glGlobalAlphaFactorfSUN + GLfloat factor + + + void glGlobalAlphaFactoriSUN + GLint factor + + + void glGlobalAlphaFactorsSUN + GLshort factor + + + void glGlobalAlphaFactorubSUN + GLubyte factor + + + void glGlobalAlphaFactoruiSUN + GLuint factor + + + void glGlobalAlphaFactorusSUN + GLushort factor + + + void glHint + GLenum target + GLenum mode + + + + void glHintPGI + GLenum target + GLint mode + + + void glHistogram + GLenum target + GLsizei width + GLenum internalformat + GLboolean sink + + + + void glHistogramEXT + GLenum target + GLsizei width + GLenum internalformat + GLboolean sink + + + + + void glIglooInterfaceSGIX + GLenum pname + const void *params + + + + void glImageTransformParameterfHP + GLenum target + GLenum pname + GLfloat param + + + void glImageTransformParameterfvHP + GLenum target + GLenum pname + const GLfloat *params + + + void glImageTransformParameteriHP + GLenum target + GLenum pname + GLint param + + + void glImageTransformParameterivHP + GLenum target + GLenum pname + const GLint *params + + + void glImportMemoryFdEXT + GLuint memory + GLuint64 size + GLenum handleType + GLint fd + + + void glImportMemoryWin32HandleEXT + GLuint memory + GLuint64 size + GLenum handleType + void *handle + + + void glImportMemoryWin32NameEXT + GLuint memory + GLuint64 size + GLenum handleType + const void *name + + + void glImportSemaphoreFdEXT + GLuint semaphore + GLenum handleType + GLint fd + + + void glImportSemaphoreWin32HandleEXT + GLuint semaphore + GLenum handleType + void *handle + + + void glImportSemaphoreWin32NameEXT + GLuint semaphore + GLenum handleType + const void *name + + + GLsync glImportSyncEXT + GLenum external_sync_type + GLintptr external_sync + GLbitfield flags + + + void glIndexFormatNV + GLenum type + GLsizei stride + + + void glIndexFuncEXT + GLenum func + GLclampf ref + + + void glIndexMask + GLuint mask + + + + void glIndexMaterialEXT + GLenum face + GLenum mode + + + void glIndexPointer + GLenum type + GLsizei stride + const void *pointer + + + void glIndexPointerEXT + GLenum type + GLsizei stride + GLsizei count + const void *pointer + + + void glIndexPointerListIBM + GLenum type + GLint stride + const void **pointer + GLint ptrstride + + + void glIndexd + GLdouble c + + + + void glIndexdv + const GLdouble *c + + + + void glIndexf + GLfloat c + + + + void glIndexfv + const GLfloat *c + + + + void glIndexi + GLint c + + + + void glIndexiv + const GLint *c + + + + void glIndexs + GLshort c + + + + void glIndexsv + const GLshort *c + + + + void glIndexub + GLubyte c + + + + void glIndexubv + const GLubyte *c + + + + void glIndexxOES + GLfixed component + + + void glIndexxvOES + const GLfixed *component + + + void glInitNames + + + + void glInsertComponentEXT + GLuint res + GLuint src + GLuint num + + + void glInsertEventMarkerEXT + GLsizei length + const GLchar *marker + + + void glInstrumentsBufferSGIX + GLsizei size + GLint *buffer + + + + void glInterleavedArrays + GLenum format + GLsizei stride + const void *pointer + + + void glInterpolatePathsNV + GLuint resultPath + GLuint pathA + GLuint pathB + GLfloat weight + + + void glInvalidateBufferData + GLuint buffer + + + void glInvalidateBufferSubData + GLuint buffer + GLintptr offset + GLsizeiptr length + + + void glInvalidateFramebuffer + GLenum target + GLsizei numAttachments + const GLenum *attachments + + + void glInvalidateNamedFramebufferData + GLuint framebuffer + GLsizei numAttachments + const GLenum *attachments + + + void glInvalidateNamedFramebufferSubData + GLuint framebuffer + GLsizei numAttachments + const GLenum *attachments + GLint x + GLint y + GLsizei width + GLsizei height + + + void glInvalidateSubFramebuffer + GLenum target + GLsizei numAttachments + const GLenum *attachments + GLint x + GLint y + GLsizei width + GLsizei height + + + void glInvalidateTexImage + GLuint texture + GLint level + + + void glInvalidateTexSubImage + GLuint texture + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + + + GLboolean glIsAsyncMarkerSGIX + GLuint marker + + + GLboolean glIsBuffer + GLuint buffer + + + GLboolean glIsBufferARB + GLuint buffer + + + + GLboolean glIsBufferResidentNV + GLenum target + + + GLboolean glIsCommandListNV + GLuint list + + + GLboolean glIsEnabled + GLenum cap + + + + GLboolean glIsEnabledIndexedEXT + GLenum target + GLuint index + + + + + GLboolean glIsEnabledi + GLenum target + GLuint index + + + GLboolean glIsEnablediEXT + GLenum target + GLuint index + + + + GLboolean glIsEnablediNV + GLenum target + GLuint index + + + + GLboolean glIsEnablediOES + GLenum target + GLuint index + + + + GLboolean glIsFenceAPPLE + GLuint fence + + + GLboolean glIsFenceNV + GLuint fence + + + + GLboolean glIsFramebuffer + GLuint framebuffer + + + + GLboolean glIsFramebufferEXT + GLuint framebuffer + + + + + GLboolean glIsFramebufferOES + GLuint framebuffer + + + GLboolean glIsImageHandleResidentARB + GLuint64 handle + + + GLboolean glIsImageHandleResidentNV + GLuint64 handle + + + GLboolean glIsList + GLuint list + + + + GLboolean glIsMemoryObjectEXT + GLuint memoryObject + + + GLboolean glIsNameAMD + GLenum identifier + GLuint name + + + GLboolean glIsNamedBufferResidentNV + GLuint buffer + + + GLboolean glIsNamedStringARB + GLint namelen + const GLchar *name + + + GLboolean glIsObjectBufferATI + GLuint buffer + + + GLboolean glIsOcclusionQueryNV + GLuint id + + + GLboolean glIsPathNV + GLuint path + + + GLboolean glIsPointInFillPathNV + GLuint path + GLuint mask + GLfloat x + GLfloat y + + + GLboolean glIsPointInStrokePathNV + GLuint path + GLfloat x + GLfloat y + + + GLboolean glIsProgram + GLuint program + + + + GLboolean glIsProgramARB + GLuint program + + + + GLboolean glIsProgramNV + GLuint id + + + + + GLboolean glIsProgramPipeline + GLuint pipeline + + + GLboolean glIsProgramPipelineEXT + GLuint pipeline + + + GLboolean glIsQuery + GLuint id + + + + GLboolean glIsQueryARB + GLuint id + + + + GLboolean glIsQueryEXT + GLuint id + + + GLboolean glIsRenderbuffer + GLuint renderbuffer + + + + GLboolean glIsRenderbufferEXT + GLuint renderbuffer + + + + + GLboolean glIsRenderbufferOES + GLuint renderbuffer + + + GLboolean glIsSemaphoreEXT + GLuint semaphore + + + GLboolean glIsSampler + GLuint sampler + + + GLboolean glIsShader + GLuint shader + + + + GLboolean glIsStateNV + GLuint state + + + GLboolean glIsSync + GLsync sync + + + GLboolean glIsSyncAPPLE + GLsync sync + + + + GLboolean glIsTexture + GLuint texture + + + + GLboolean glIsTextureEXT + GLuint texture + + + + GLboolean glIsTextureHandleResidentARB + GLuint64 handle + + + GLboolean glIsTextureHandleResidentNV + GLuint64 handle + + + GLboolean glIsTransformFeedback + GLuint id + + + GLboolean glIsTransformFeedbackNV + GLuint id + + + + GLboolean glIsVariantEnabledEXT + GLuint id + GLenum cap + + + GLboolean glIsVertexArray + GLuint array + + + + GLboolean glIsVertexArrayAPPLE + GLuint array + + + + GLboolean glIsVertexArrayOES + GLuint array + + + + GLboolean glIsVertexAttribEnabledAPPLE + GLuint index + GLenum pname + + + void glLGPUCopyImageSubDataNVX + GLuint sourceGpu + GLbitfield destinationGpuMask + GLuint srcName + GLenum srcTarget + GLint srcLevel + GLint srcX + GLint srxY + GLint srcZ + GLuint dstName + GLenum dstTarget + GLint dstLevel + GLint dstX + GLint dstY + GLint dstZ + GLsizei width + GLsizei height + GLsizei depth + + + void glLGPUInterlockNVX + + + void glLGPUNamedBufferSubDataNVX + GLbitfield gpuMask + GLuint buffer + GLintptr offset + GLsizeiptr size + const void *data + + + void glLabelObjectEXT + GLenum type + GLuint object + GLsizei length + const GLchar *label + + + void glLightEnviSGIX + GLenum pname + GLint param + + + void glLightModelf + GLenum pname + GLfloat param + + + + void glLightModelfv + GLenum pname + const GLfloat *params + + + + void glLightModeli + GLenum pname + GLint param + + + + void glLightModeliv + GLenum pname + const GLint *params + + + + void glLightModelx + GLenum pname + GLfixed param + + + void glLightModelxOES + GLenum pname + GLfixed param + + + void glLightModelxv + GLenum pname + const GLfixed *param + + + void glLightModelxvOES + GLenum pname + const GLfixed *param + + + void glLightf + GLenum light + GLenum pname + GLfloat param + + + + void glLightfv + GLenum light + GLenum pname + const GLfloat *params + + + + void glLighti + GLenum light + GLenum pname + GLint param + + + + void glLightiv + GLenum light + GLenum pname + const GLint *params + + + + void glLightx + GLenum light + GLenum pname + GLfixed param + + + void glLightxOES + GLenum light + GLenum pname + GLfixed param + + + void glLightxv + GLenum light + GLenum pname + const GLfixed *params + + + void glLightxvOES + GLenum light + GLenum pname + const GLfixed *params + + + void glLineStipple + GLint factor + GLushort pattern + + + + void glLineWidth + GLfloat width + + + + void glLineWidthx + GLfixed width + + + void glLineWidthxOES + GLfixed width + + + void glLinkProgram + GLuint program + + + void glLinkProgramARB + GLhandleARB programObj + + + + void glListBase + GLuint base + + + + void glListDrawCommandsStatesClientNV + GLuint list + GLuint segment + const void **indirects + const GLsizei *sizes + const GLuint *states + const GLuint *fbos + GLuint count + + + void glListParameterfSGIX + GLuint list + GLenum pname + GLfloat param + + + + void glListParameterfvSGIX + GLuint list + GLenum pname + const GLfloat *params + + + + void glListParameteriSGIX + GLuint list + GLenum pname + GLint param + + + + void glListParameterivSGIX + GLuint list + GLenum pname + const GLint *params + + + + void glLoadIdentity + + + + void glLoadIdentityDeformationMapSGIX + GLbitfield mask + + + + void glLoadMatrixd + const GLdouble *m + + + + void glLoadMatrixf + const GLfloat *m + + + + void glLoadMatrixx + const GLfixed *m + + + void glLoadMatrixxOES + const GLfixed *m + + + void glLoadName + GLuint name + + + + void glLoadPaletteFromModelViewMatrixOES + + + void glLoadProgramNV + GLenum target + GLuint id + GLsizei len + const GLubyte *program + + + + void glLoadTransposeMatrixd + const GLdouble *m + + + void glLoadTransposeMatrixdARB + const GLdouble *m + + + + void glLoadTransposeMatrixf + const GLfloat *m + + + void glLoadTransposeMatrixfARB + const GLfloat *m + + + + void glLoadTransposeMatrixxOES + const GLfixed *m + + + void glLockArraysEXT + GLint first + GLsizei count + + + void glLogicOp + GLenum opcode + + + + void glMakeBufferNonResidentNV + GLenum target + + + void glMakeBufferResidentNV + GLenum target + GLenum access + + + void glMakeImageHandleNonResidentARB + GLuint64 handle + + + void glMakeImageHandleNonResidentNV + GLuint64 handle + + + void glMakeImageHandleResidentARB + GLuint64 handle + GLenum access + + + void glMakeImageHandleResidentNV + GLuint64 handle + GLenum access + + + void glMakeNamedBufferNonResidentNV + GLuint buffer + + + void glMakeNamedBufferResidentNV + GLuint buffer + GLenum access + + + void glMakeTextureHandleNonResidentARB + GLuint64 handle + + + void glMakeTextureHandleNonResidentNV + GLuint64 handle + + + void glMakeTextureHandleResidentARB + GLuint64 handle + + + void glMakeTextureHandleResidentNV + GLuint64 handle + + + void glMap1d + GLenum target + GLdouble u1 + GLdouble u2 + GLint stride + GLint order + const GLdouble *points + + + + void glMap1f + GLenum target + GLfloat u1 + GLfloat u2 + GLint stride + GLint order + const GLfloat *points + + + + void glMap1xOES + GLenum target + GLfixed u1 + GLfixed u2 + GLint stride + GLint order + GLfixed points + + + void glMap2d + GLenum target + GLdouble u1 + GLdouble u2 + GLint ustride + GLint uorder + GLdouble v1 + GLdouble v2 + GLint vstride + GLint vorder + const GLdouble *points + + + + void glMap2f + GLenum target + GLfloat u1 + GLfloat u2 + GLint ustride + GLint uorder + GLfloat v1 + GLfloat v2 + GLint vstride + GLint vorder + const GLfloat *points + + + + void glMap2xOES + GLenum target + GLfixed u1 + GLfixed u2 + GLint ustride + GLint uorder + GLfixed v1 + GLfixed v2 + GLint vstride + GLint vorder + GLfixed points + + + void *glMapBuffer + GLenum target + GLenum access + + + void *glMapBufferARB + GLenum target + GLenum access + + + + void *glMapBufferOES + GLenum target + GLenum access + + + + void *glMapBufferRange + GLenum target + GLintptr offset + GLsizeiptr length + GLbitfield access + + + + void *glMapBufferRangeEXT + GLenum target + GLintptr offset + GLsizeiptr length + GLbitfield access + + + + void glMapControlPointsNV + GLenum target + GLuint index + GLenum type + GLsizei ustride + GLsizei vstride + GLint uorder + GLint vorder + GLboolean packed + const void *points + + + void glMapGrid1d + GLint un + GLdouble u1 + GLdouble u2 + + + + void glMapGrid1f + GLint un + GLfloat u1 + GLfloat u2 + + + + void glMapGrid1xOES + GLint n + GLfixed u1 + GLfixed u2 + + + void glMapGrid2d + GLint un + GLdouble u1 + GLdouble u2 + GLint vn + GLdouble v1 + GLdouble v2 + + + + void glMapGrid2f + GLint un + GLfloat u1 + GLfloat u2 + GLint vn + GLfloat v1 + GLfloat v2 + + + + void glMapGrid2xOES + GLint n + GLfixed u1 + GLfixed u2 + GLfixed v1 + GLfixed v2 + + + void *glMapNamedBuffer + GLuint buffer + GLenum access + + + void *glMapNamedBufferEXT + GLuint buffer + GLenum access + + + void *glMapNamedBufferRange + GLuint buffer + GLintptr offset + GLsizeiptr length + GLbitfield access + + + void *glMapNamedBufferRangeEXT + GLuint buffer + GLintptr offset + GLsizeiptr length + GLbitfield access + + + void *glMapObjectBufferATI + GLuint buffer + + + void glMapParameterfvNV + GLenum target + GLenum pname + const GLfloat *params + + + void glMapParameterivNV + GLenum target + GLenum pname + const GLint *params + + + void *glMapTexture2DINTEL + GLuint texture + GLint level + GLbitfield access + GLint *stride + GLenum *layout + + + void glMapVertexAttrib1dAPPLE + GLuint index + GLuint size + GLdouble u1 + GLdouble u2 + GLint stride + GLint order + const GLdouble *points + + + void glMapVertexAttrib1fAPPLE + GLuint index + GLuint size + GLfloat u1 + GLfloat u2 + GLint stride + GLint order + const GLfloat *points + + + void glMapVertexAttrib2dAPPLE + GLuint index + GLuint size + GLdouble u1 + GLdouble u2 + GLint ustride + GLint uorder + GLdouble v1 + GLdouble v2 + GLint vstride + GLint vorder + const GLdouble *points + + + void glMapVertexAttrib2fAPPLE + GLuint index + GLuint size + GLfloat u1 + GLfloat u2 + GLint ustride + GLint uorder + GLfloat v1 + GLfloat v2 + GLint vstride + GLint vorder + const GLfloat *points + + + void glMaterialf + GLenum face + GLenum pname + GLfloat param + + + + void glMaterialfv + GLenum face + GLenum pname + const GLfloat *params + + + + void glMateriali + GLenum face + GLenum pname + GLint param + + + + void glMaterialiv + GLenum face + GLenum pname + const GLint *params + + + + void glMaterialx + GLenum face + GLenum pname + GLfixed param + + + void glMaterialxOES + GLenum face + GLenum pname + GLfixed param + + + void glMaterialxv + GLenum face + GLenum pname + const GLfixed *param + + + void glMaterialxvOES + GLenum face + GLenum pname + const GLfixed *param + + + void glMatrixFrustumEXT + GLenum mode + GLdouble left + GLdouble right + GLdouble bottom + GLdouble top + GLdouble zNear + GLdouble zFar + + + void glMatrixIndexPointerARB + GLint size + GLenum type + GLsizei stride + const void *pointer + + + void glMatrixIndexPointerOES + GLint size + GLenum type + GLsizei stride + const void *pointer + + + void glMatrixIndexubvARB + GLint size + const GLubyte *indices + + + + void glMatrixIndexuivARB + GLint size + const GLuint *indices + + + + void glMatrixIndexusvARB + GLint size + const GLushort *indices + + + + void glMatrixLoad3x2fNV + GLenum matrixMode + const GLfloat *m + + + void glMatrixLoad3x3fNV + GLenum matrixMode + const GLfloat *m + + + void glMatrixLoadIdentityEXT + GLenum mode + + + void glMatrixLoadTranspose3x3fNV + GLenum matrixMode + const GLfloat *m + + + void glMatrixLoadTransposedEXT + GLenum mode + const GLdouble *m + + + void glMatrixLoadTransposefEXT + GLenum mode + const GLfloat *m + + + void glMatrixLoaddEXT + GLenum mode + const GLdouble *m + + + void glMatrixLoadfEXT + GLenum mode + const GLfloat *m + + + void glMatrixMode + GLenum mode + + + + void glMatrixMult3x2fNV + GLenum matrixMode + const GLfloat *m + + + void glMatrixMult3x3fNV + GLenum matrixMode + const GLfloat *m + + + void glMatrixMultTranspose3x3fNV + GLenum matrixMode + const GLfloat *m + + + void glMatrixMultTransposedEXT + GLenum mode + const GLdouble *m + + + void glMatrixMultTransposefEXT + GLenum mode + const GLfloat *m + + + void glMatrixMultdEXT + GLenum mode + const GLdouble *m + + + void glMatrixMultfEXT + GLenum mode + const GLfloat *m + + + void glMatrixOrthoEXT + GLenum mode + GLdouble left + GLdouble right + GLdouble bottom + GLdouble top + GLdouble zNear + GLdouble zFar + + + void glMatrixPopEXT + GLenum mode + + + void glMatrixPushEXT + GLenum mode + + + void glMatrixRotatedEXT + GLenum mode + GLdouble angle + GLdouble x + GLdouble y + GLdouble z + + + void glMatrixRotatefEXT + GLenum mode + GLfloat angle + GLfloat x + GLfloat y + GLfloat z + + + void glMatrixScaledEXT + GLenum mode + GLdouble x + GLdouble y + GLdouble z + + + void glMatrixScalefEXT + GLenum mode + GLfloat x + GLfloat y + GLfloat z + + + void glMatrixTranslatedEXT + GLenum mode + GLdouble x + GLdouble y + GLdouble z + + + void glMatrixTranslatefEXT + GLenum mode + GLfloat x + GLfloat y + GLfloat z + + + void glMaxActiveShaderCoresARM + GLuint count + + + void glMaxShaderCompilerThreadsKHR + GLuint count + + + void glMaxShaderCompilerThreadsARB + GLuint count + + + + void glMemoryBarrier + GLbitfield barriers + + + void glMemoryBarrierByRegion + GLbitfield barriers + + + void glMemoryBarrierEXT + GLbitfield barriers + + + + void glMemoryObjectParameterivEXT + GLuint memoryObject + GLenum pname + const GLint *params + + + void glMinSampleShading + GLfloat value + + + void glMinSampleShadingARB + GLfloat value + + + + void glMinSampleShadingOES + GLfloat value + + + + void glMinmax + GLenum target + GLenum internalformat + GLboolean sink + + + + void glMinmaxEXT + GLenum target + GLenum internalformat + GLboolean sink + + + + + void glMultMatrixd + const GLdouble *m + + + + void glMultMatrixf + const GLfloat *m + + + + void glMultMatrixx + const GLfixed *m + + + void glMultMatrixxOES + const GLfixed *m + + + void glMultTransposeMatrixd + const GLdouble *m + + + void glMultTransposeMatrixdARB + const GLdouble *m + + + + void glMultTransposeMatrixf + const GLfloat *m + + + void glMultTransposeMatrixfARB + const GLfloat *m + + + + void glMultTransposeMatrixxOES + const GLfixed *m + + + void glMultiDrawArrays + GLenum mode + const GLint *first + const GLsizei *count + GLsizei drawcount + + + void glMultiDrawArraysEXT + GLenum mode + const GLint *first + const GLsizei *count + GLsizei primcount + + + + void glMultiDrawArraysIndirect + GLenum mode + const void *indirect + GLsizei drawcount + GLsizei stride + + + void glMultiDrawArraysIndirectAMD + GLenum mode + const void *indirect + GLsizei primcount + GLsizei stride + + + + void glMultiDrawArraysIndirectBindlessCountNV + GLenum mode + const void *indirect + GLsizei drawCount + GLsizei maxDrawCount + GLsizei stride + GLint vertexBufferCount + + + void glMultiDrawArraysIndirectBindlessNV + GLenum mode + const void *indirect + GLsizei drawCount + GLsizei stride + GLint vertexBufferCount + + + void glMultiDrawArraysIndirectCount + GLenum mode + const void *indirect + GLintptr drawcount + GLsizei maxdrawcount + GLsizei stride + + + void glMultiDrawArraysIndirectCountARB + GLenum mode + const void *indirect + GLintptr drawcount + GLsizei maxdrawcount + GLsizei stride + + + + void glMultiDrawArraysIndirectEXT + GLenum mode + const void *indirect + GLsizei drawcount + GLsizei stride + + + + void glMultiDrawElementArrayAPPLE + GLenum mode + const GLint *first + const GLsizei *count + GLsizei primcount + + + void glMultiDrawElements + GLenum mode + const GLsizei *count + GLenum type + const void *const*indices + GLsizei drawcount + + + void glMultiDrawElementsBaseVertex + GLenum mode + const GLsizei *count + GLenum type + const void *const*indices + GLsizei drawcount + const GLint *basevertex + + + void glMultiDrawElementsBaseVertexEXT + GLenum mode + const GLsizei *count + GLenum type + const void *const*indices + GLsizei drawcount + const GLint *basevertex + + + + void glMultiDrawElementsEXT + GLenum mode + const GLsizei *count + GLenum type + const void *const*indices + GLsizei primcount + + + + void glMultiDrawElementsIndirect + GLenum mode + GLenum type + const void *indirect + GLsizei drawcount + GLsizei stride + + + void glMultiDrawElementsIndirectAMD + GLenum mode + GLenum type + const void *indirect + GLsizei primcount + GLsizei stride + + + + void glMultiDrawElementsIndirectBindlessCountNV + GLenum mode + GLenum type + const void *indirect + GLsizei drawCount + GLsizei maxDrawCount + GLsizei stride + GLint vertexBufferCount + + + void glMultiDrawElementsIndirectBindlessNV + GLenum mode + GLenum type + const void *indirect + GLsizei drawCount + GLsizei stride + GLint vertexBufferCount + + + void glMultiDrawElementsIndirectCount + GLenum mode + GLenum type + const void *indirect + GLintptr drawcount + GLsizei maxdrawcount + GLsizei stride + + + void glMultiDrawElementsIndirectCountARB + GLenum mode + GLenum type + const void *indirect + GLintptr drawcount + GLsizei maxdrawcount + GLsizei stride + + + + void glMultiDrawElementsIndirectEXT + GLenum mode + GLenum type + const void *indirect + GLsizei drawcount + GLsizei stride + + + + void glMultiDrawMeshTasksIndirectEXT + GLintptr indirect + GLsizei drawcount + GLsizei stride + + + void glMultiDrawMeshTasksIndirectNV + GLintptr indirect + GLsizei drawcount + GLsizei stride + + + void glMultiDrawMeshTasksIndirectCountEXT + GLintptr indirect + GLintptr drawcount + GLsizei maxdrawcount + GLsizei stride + + + void glMultiDrawMeshTasksIndirectCountNV + GLintptr indirect + GLintptr drawcount + GLsizei maxdrawcount + GLsizei stride + + + void glMultiDrawRangeElementArrayAPPLE + GLenum mode + GLuint start + GLuint end + const GLint *first + const GLsizei *count + GLsizei primcount + + + void glMultiModeDrawArraysIBM + const GLenum *mode + const GLint *first + const GLsizei *count + GLsizei primcount + GLint modestride + + + void glMultiModeDrawElementsIBM + const GLenum *mode + const GLsizei *count + GLenum type + const void *const*indices + GLsizei primcount + GLint modestride + + + void glMultiTexBufferEXT + GLenum texunit + GLenum target + GLenum internalformat + GLuint buffer + + + void glMultiTexCoord1bOES + GLenum texture + GLbyte s + + + void glMultiTexCoord1bvOES + GLenum texture + const GLbyte *coords + + + void glMultiTexCoord1d + GLenum target + GLdouble s + + + + void glMultiTexCoord1dARB + GLenum target + GLdouble s + + + + + void glMultiTexCoord1dv + GLenum target + const GLdouble *v + + + + void glMultiTexCoord1dvARB + GLenum target + const GLdouble *v + + + + + void glMultiTexCoord1f + GLenum target + GLfloat s + + + + void glMultiTexCoord1fARB + GLenum target + GLfloat s + + + + + void glMultiTexCoord1fv + GLenum target + const GLfloat *v + + + + void glMultiTexCoord1fvARB + GLenum target + const GLfloat *v + + + + + void glMultiTexCoord1hNV + GLenum target + GLhalfNV s + + + + void glMultiTexCoord1hvNV + GLenum target + const GLhalfNV *v + + + + void glMultiTexCoord1i + GLenum target + GLint s + + + + void glMultiTexCoord1iARB + GLenum target + GLint s + + + + + void glMultiTexCoord1iv + GLenum target + const GLint *v + + + + void glMultiTexCoord1ivARB + GLenum target + const GLint *v + + + + + void glMultiTexCoord1s + GLenum target + GLshort s + + + + void glMultiTexCoord1sARB + GLenum target + GLshort s + + + + + void glMultiTexCoord1sv + GLenum target + const GLshort *v + + + + void glMultiTexCoord1svARB + GLenum target + const GLshort *v + + + + + void glMultiTexCoord1xOES + GLenum texture + GLfixed s + + + void glMultiTexCoord1xvOES + GLenum texture + const GLfixed *coords + + + void glMultiTexCoord2bOES + GLenum texture + GLbyte s + GLbyte t + + + void glMultiTexCoord2bvOES + GLenum texture + const GLbyte *coords + + + void glMultiTexCoord2d + GLenum target + GLdouble s + GLdouble t + + + + void glMultiTexCoord2dARB + GLenum target + GLdouble s + GLdouble t + + + + + void glMultiTexCoord2dv + GLenum target + const GLdouble *v + + + + void glMultiTexCoord2dvARB + GLenum target + const GLdouble *v + + + + + void glMultiTexCoord2f + GLenum target + GLfloat s + GLfloat t + + + + void glMultiTexCoord2fARB + GLenum target + GLfloat s + GLfloat t + + + + + void glMultiTexCoord2fv + GLenum target + const GLfloat *v + + + + void glMultiTexCoord2fvARB + GLenum target + const GLfloat *v + + + + + void glMultiTexCoord2hNV + GLenum target + GLhalfNV s + GLhalfNV t + + + + void glMultiTexCoord2hvNV + GLenum target + const GLhalfNV *v + + + + void glMultiTexCoord2i + GLenum target + GLint s + GLint t + + + + void glMultiTexCoord2iARB + GLenum target + GLint s + GLint t + + + + + void glMultiTexCoord2iv + GLenum target + const GLint *v + + + + void glMultiTexCoord2ivARB + GLenum target + const GLint *v + + + + + void glMultiTexCoord2s + GLenum target + GLshort s + GLshort t + + + + void glMultiTexCoord2sARB + GLenum target + GLshort s + GLshort t + + + + + void glMultiTexCoord2sv + GLenum target + const GLshort *v + + + + void glMultiTexCoord2svARB + GLenum target + const GLshort *v + + + + + void glMultiTexCoord2xOES + GLenum texture + GLfixed s + GLfixed t + + + void glMultiTexCoord2xvOES + GLenum texture + const GLfixed *coords + + + void glMultiTexCoord3bOES + GLenum texture + GLbyte s + GLbyte t + GLbyte r + + + void glMultiTexCoord3bvOES + GLenum texture + const GLbyte *coords + + + void glMultiTexCoord3d + GLenum target + GLdouble s + GLdouble t + GLdouble r + + + + void glMultiTexCoord3dARB + GLenum target + GLdouble s + GLdouble t + GLdouble r + + + + + void glMultiTexCoord3dv + GLenum target + const GLdouble *v + + + + void glMultiTexCoord3dvARB + GLenum target + const GLdouble *v + + + + + void glMultiTexCoord3f + GLenum target + GLfloat s + GLfloat t + GLfloat r + + + + void glMultiTexCoord3fARB + GLenum target + GLfloat s + GLfloat t + GLfloat r + + + + + void glMultiTexCoord3fv + GLenum target + const GLfloat *v + + + + void glMultiTexCoord3fvARB + GLenum target + const GLfloat *v + + + + + void glMultiTexCoord3hNV + GLenum target + GLhalfNV s + GLhalfNV t + GLhalfNV r + + + + void glMultiTexCoord3hvNV + GLenum target + const GLhalfNV *v + + + + void glMultiTexCoord3i + GLenum target + GLint s + GLint t + GLint r + + + + void glMultiTexCoord3iARB + GLenum target + GLint s + GLint t + GLint r + + + + + void glMultiTexCoord3iv + GLenum target + const GLint *v + + + + void glMultiTexCoord3ivARB + GLenum target + const GLint *v + + + + + void glMultiTexCoord3s + GLenum target + GLshort s + GLshort t + GLshort r + + + + void glMultiTexCoord3sARB + GLenum target + GLshort s + GLshort t + GLshort r + + + + + void glMultiTexCoord3sv + GLenum target + const GLshort *v + + + + void glMultiTexCoord3svARB + GLenum target + const GLshort *v + + + + + void glMultiTexCoord3xOES + GLenum texture + GLfixed s + GLfixed t + GLfixed r + + + void glMultiTexCoord3xvOES + GLenum texture + const GLfixed *coords + + + void glMultiTexCoord4bOES + GLenum texture + GLbyte s + GLbyte t + GLbyte r + GLbyte q + + + void glMultiTexCoord4bvOES + GLenum texture + const GLbyte *coords + + + void glMultiTexCoord4d + GLenum target + GLdouble s + GLdouble t + GLdouble r + GLdouble q + + + + void glMultiTexCoord4dARB + GLenum target + GLdouble s + GLdouble t + GLdouble r + GLdouble q + + + + + void glMultiTexCoord4dv + GLenum target + const GLdouble *v + + + + void glMultiTexCoord4dvARB + GLenum target + const GLdouble *v + + + + + void glMultiTexCoord4f + GLenum target + GLfloat s + GLfloat t + GLfloat r + GLfloat q + + + + void glMultiTexCoord4fARB + GLenum target + GLfloat s + GLfloat t + GLfloat r + GLfloat q + + + + + void glMultiTexCoord4fv + GLenum target + const GLfloat *v + + + + void glMultiTexCoord4fvARB + GLenum target + const GLfloat *v + + + + + void glMultiTexCoord4hNV + GLenum target + GLhalfNV s + GLhalfNV t + GLhalfNV r + GLhalfNV q + + + + void glMultiTexCoord4hvNV + GLenum target + const GLhalfNV *v + + + + void glMultiTexCoord4i + GLenum target + GLint s + GLint t + GLint r + GLint q + + + + void glMultiTexCoord4iARB + GLenum target + GLint s + GLint t + GLint r + GLint q + + + + + void glMultiTexCoord4iv + GLenum target + const GLint *v + + + + void glMultiTexCoord4ivARB + GLenum target + const GLint *v + + + + + void glMultiTexCoord4s + GLenum target + GLshort s + GLshort t + GLshort r + GLshort q + + + + void glMultiTexCoord4sARB + GLenum target + GLshort s + GLshort t + GLshort r + GLshort q + + + + + void glMultiTexCoord4sv + GLenum target + const GLshort *v + + + + void glMultiTexCoord4svARB + GLenum target + const GLshort *v + + + + + void glMultiTexCoord4x + GLenum texture + GLfixed s + GLfixed t + GLfixed r + GLfixed q + + + void glMultiTexCoord4xOES + GLenum texture + GLfixed s + GLfixed t + GLfixed r + GLfixed q + + + void glMultiTexCoord4xvOES + GLenum texture + const GLfixed *coords + + + void glMultiTexCoordP1ui + GLenum texture + GLenum type + GLuint coords + + + void glMultiTexCoordP1uiv + GLenum texture + GLenum type + const GLuint *coords + + + void glMultiTexCoordP2ui + GLenum texture + GLenum type + GLuint coords + + + void glMultiTexCoordP2uiv + GLenum texture + GLenum type + const GLuint *coords + + + void glMultiTexCoordP3ui + GLenum texture + GLenum type + GLuint coords + + + void glMultiTexCoordP3uiv + GLenum texture + GLenum type + const GLuint *coords + + + void glMultiTexCoordP4ui + GLenum texture + GLenum type + GLuint coords + + + void glMultiTexCoordP4uiv + GLenum texture + GLenum type + const GLuint *coords + + + void glMultiTexCoordPointerEXT + GLenum texunit + GLint size + GLenum type + GLsizei stride + const void *pointer + + + void glMultiTexEnvfEXT + GLenum texunit + GLenum target + GLenum pname + GLfloat param + + + + void glMultiTexEnvfvEXT + GLenum texunit + GLenum target + GLenum pname + const GLfloat *params + + + void glMultiTexEnviEXT + GLenum texunit + GLenum target + GLenum pname + GLint param + + + + void glMultiTexEnvivEXT + GLenum texunit + GLenum target + GLenum pname + const GLint *params + + + void glMultiTexGendEXT + GLenum texunit + GLenum coord + GLenum pname + GLdouble param + + + + void glMultiTexGendvEXT + GLenum texunit + GLenum coord + GLenum pname + const GLdouble *params + + + void glMultiTexGenfEXT + GLenum texunit + GLenum coord + GLenum pname + GLfloat param + + + + void glMultiTexGenfvEXT + GLenum texunit + GLenum coord + GLenum pname + const GLfloat *params + + + void glMultiTexGeniEXT + GLenum texunit + GLenum coord + GLenum pname + GLint param + + + + void glMultiTexGenivEXT + GLenum texunit + GLenum coord + GLenum pname + const GLint *params + + + void glMultiTexImage1DEXT + GLenum texunit + GLenum target + GLint level + GLint internalformat + GLsizei width + GLint border + GLenum format + GLenum type + const void *pixels + + + void glMultiTexImage2DEXT + GLenum texunit + GLenum target + GLint level + GLint internalformat + GLsizei width + GLsizei height + GLint border + GLenum format + GLenum type + const void *pixels + + + void glMultiTexImage3DEXT + GLenum texunit + GLenum target + GLint level + GLint internalformat + GLsizei width + GLsizei height + GLsizei depth + GLint border + GLenum format + GLenum type + const void *pixels + + + void glMultiTexParameterIivEXT + GLenum texunit + GLenum target + GLenum pname + const GLint *params + + + void glMultiTexParameterIuivEXT + GLenum texunit + GLenum target + GLenum pname + const GLuint *params + + + void glMultiTexParameterfEXT + GLenum texunit + GLenum target + GLenum pname + GLfloat param + + + + void glMultiTexParameterfvEXT + GLenum texunit + GLenum target + GLenum pname + const GLfloat *params + + + void glMultiTexParameteriEXT + GLenum texunit + GLenum target + GLenum pname + GLint param + + + + void glMultiTexParameterivEXT + GLenum texunit + GLenum target + GLenum pname + const GLint *params + + + void glMultiTexRenderbufferEXT + GLenum texunit + GLenum target + GLuint renderbuffer + + + void glMultiTexSubImage1DEXT + GLenum texunit + GLenum target + GLint level + GLint xoffset + GLsizei width + GLenum format + GLenum type + const void *pixels + + + void glMultiTexSubImage2DEXT + GLenum texunit + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLsizei width + GLsizei height + GLenum format + GLenum type + const void *pixels + + + void glMultiTexSubImage3DEXT + GLenum texunit + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLenum type + const void *pixels + + + void glMulticastBarrierNV + + + void glMulticastBlitFramebufferNV + GLuint srcGpu + GLuint dstGpu + GLint srcX0 + GLint srcY0 + GLint srcX1 + GLint srcY1 + GLint dstX0 + GLint dstY0 + GLint dstX1 + GLint dstY1 + GLbitfield mask + GLenum filter + + + void glMulticastBufferSubDataNV + GLbitfield gpuMask + GLuint buffer + GLintptr offset + GLsizeiptr size + const void *data + + + void glMulticastCopyBufferSubDataNV + GLuint readGpu + GLbitfield writeGpuMask + GLuint readBuffer + GLuint writeBuffer + GLintptr readOffset + GLintptr writeOffset + GLsizeiptr size + + + void glMulticastCopyImageSubDataNV + GLuint srcGpu + GLbitfield dstGpuMask + GLuint srcName + GLenum srcTarget + GLint srcLevel + GLint srcX + GLint srcY + GLint srcZ + GLuint dstName + GLenum dstTarget + GLint dstLevel + GLint dstX + GLint dstY + GLint dstZ + GLsizei srcWidth + GLsizei srcHeight + GLsizei srcDepth + + + void glMulticastFramebufferSampleLocationsfvNV + GLuint gpu + GLuint framebuffer + GLuint start + GLsizei count + const GLfloat *v + + + void glMulticastGetQueryObjecti64vNV + GLuint gpu + GLuint id + GLenum pname + GLint64 *params + + + void glMulticastGetQueryObjectivNV + GLuint gpu + GLuint id + GLenum pname + GLint *params + + + void glMulticastGetQueryObjectui64vNV + GLuint gpu + GLuint id + GLenum pname + GLuint64 *params + + + void glMulticastGetQueryObjectuivNV + GLuint gpu + GLuint id + GLenum pname + GLuint *params + + + void glMulticastScissorArrayvNVX + GLuint gpu + GLuint first + GLsizei count + const GLint *v + + + void glMulticastViewportArrayvNVX + GLuint gpu + GLuint first + GLsizei count + const GLfloat *v + + + void glMulticastViewportPositionWScaleNVX + GLuint gpu + GLuint index + GLfloat xcoeff + GLfloat ycoeff + + + void glMulticastWaitSyncNV + GLuint signalGpu + GLbitfield waitGpuMask + + + void glNamedBufferAttachMemoryNV + GLuint buffer + GLuint memory + GLuint64 offset + + + void glNamedBufferData + GLuint buffer + GLsizeiptr size + const void *data + GLenum usage + + + void glNamedBufferDataEXT + GLuint buffer + GLsizeiptr size + const void *data + GLenum usage + + + void glNamedBufferPageCommitmentARB + GLuint buffer + GLintptr offset + GLsizeiptr size + GLboolean commit + + + void glNamedBufferPageCommitmentEXT + GLuint buffer + GLintptr offset + GLsizeiptr size + GLboolean commit + + + void glNamedBufferPageCommitmentMemNV + GLuint buffer + GLintptr offset + GLsizeiptr size + GLuint memory + GLuint64 memOffset + GLboolean commit + + + void glNamedBufferStorage + GLuint buffer + GLsizeiptr size + const void *data + GLbitfield flags + + + void glNamedBufferStorageExternalEXT + GLuint buffer + GLintptr offset + GLsizeiptr size + GLeglClientBufferEXT clientBuffer + GLbitfield flags + + + void glNamedBufferStorageEXT + GLuint buffer + GLsizeiptr size + const void *data + GLbitfield flags + + + + void glNamedBufferStorageMemEXT + GLuint buffer + GLsizeiptr size + GLuint memory + GLuint64 offset + + + void glNamedBufferSubData + GLuint buffer + GLintptr offset + GLsizeiptr size + const void *data + + + void glNamedBufferSubDataEXT + GLuint buffer + GLintptr offset + GLsizeiptr size + const void *data + + + + void glNamedCopyBufferSubDataEXT + GLuint readBuffer + GLuint writeBuffer + GLintptr readOffset + GLintptr writeOffset + GLsizeiptr size + + + void glNamedFramebufferDrawBuffer + GLuint framebuffer + GLenum buf + + + void glNamedFramebufferDrawBuffers + GLuint framebuffer + GLsizei n + const GLenum *bufs + + + void glNamedFramebufferParameteri + GLuint framebuffer + GLenum pname + GLint param + + + void glNamedFramebufferParameteriEXT + GLuint framebuffer + GLenum pname + GLint param + + + void glNamedFramebufferReadBuffer + GLuint framebuffer + GLenum src + + + void glNamedFramebufferRenderbuffer + GLuint framebuffer + GLenum attachment + GLenum renderbuffertarget + GLuint renderbuffer + + + void glNamedFramebufferRenderbufferEXT + GLuint framebuffer + GLenum attachment + GLenum renderbuffertarget + GLuint renderbuffer + + + void glNamedFramebufferSampleLocationsfvARB + GLuint framebuffer + GLuint start + GLsizei count + const GLfloat *v + + + void glNamedFramebufferSampleLocationsfvNV + GLuint framebuffer + GLuint start + GLsizei count + const GLfloat *v + + + void glNamedFramebufferTexture + GLuint framebuffer + GLenum attachment + GLuint texture + GLint level + + + void glNamedFramebufferSamplePositionsfvAMD + GLuint framebuffer + GLuint numsamples + GLuint pixelindex + const GLfloat *values + + + void glNamedFramebufferTexture1DEXT + GLuint framebuffer + GLenum attachment + GLenum textarget + GLuint texture + GLint level + + + void glNamedFramebufferTexture2DEXT + GLuint framebuffer + GLenum attachment + GLenum textarget + GLuint texture + GLint level + + + void glNamedFramebufferTexture3DEXT + GLuint framebuffer + GLenum attachment + GLenum textarget + GLuint texture + GLint level + GLint zoffset + + + void glNamedFramebufferTextureEXT + GLuint framebuffer + GLenum attachment + GLuint texture + GLint level + + + void glNamedFramebufferTextureFaceEXT + GLuint framebuffer + GLenum attachment + GLuint texture + GLint level + GLenum face + + + void glNamedFramebufferTextureLayer + GLuint framebuffer + GLenum attachment + GLuint texture + GLint level + GLint layer + + + void glNamedFramebufferTextureLayerEXT + GLuint framebuffer + GLenum attachment + GLuint texture + GLint level + GLint layer + + + void glNamedFramebufferTextureMultiviewOVR + GLuint framebuffer + GLenum attachment + GLuint texture + GLint level + GLint baseViewIndex + GLsizei numViews + + + void glNamedProgramLocalParameter4dEXT + GLuint program + GLenum target + GLuint index + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + + void glNamedProgramLocalParameter4dvEXT + GLuint program + GLenum target + GLuint index + const GLdouble *params + + + void glNamedProgramLocalParameter4fEXT + GLuint program + GLenum target + GLuint index + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + + void glNamedProgramLocalParameter4fvEXT + GLuint program + GLenum target + GLuint index + const GLfloat *params + + + void glNamedProgramLocalParameterI4iEXT + GLuint program + GLenum target + GLuint index + GLint x + GLint y + GLint z + GLint w + + + + void glNamedProgramLocalParameterI4ivEXT + GLuint program + GLenum target + GLuint index + const GLint *params + + + void glNamedProgramLocalParameterI4uiEXT + GLuint program + GLenum target + GLuint index + GLuint x + GLuint y + GLuint z + GLuint w + + + + void glNamedProgramLocalParameterI4uivEXT + GLuint program + GLenum target + GLuint index + const GLuint *params + + + void glNamedProgramLocalParameters4fvEXT + GLuint program + GLenum target + GLuint index + GLsizei count + const GLfloat *params + + + void glNamedProgramLocalParametersI4ivEXT + GLuint program + GLenum target + GLuint index + GLsizei count + const GLint *params + + + void glNamedProgramLocalParametersI4uivEXT + GLuint program + GLenum target + GLuint index + GLsizei count + const GLuint *params + + + void glNamedProgramStringEXT + GLuint program + GLenum target + GLenum format + GLsizei len + const void *string + + + void glNamedRenderbufferStorage + GLuint renderbuffer + GLenum internalformat + GLsizei width + GLsizei height + + + void glNamedRenderbufferStorageEXT + GLuint renderbuffer + GLenum internalformat + GLsizei width + GLsizei height + + + void glNamedRenderbufferStorageMultisample + GLuint renderbuffer + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + + + void glNamedRenderbufferStorageMultisampleAdvancedAMD + GLuint renderbuffer + GLsizei samples + GLsizei storageSamples + GLenum internalformat + GLsizei width + GLsizei height + + + void glNamedRenderbufferStorageMultisampleCoverageEXT + GLuint renderbuffer + GLsizei coverageSamples + GLsizei colorSamples + GLenum internalformat + GLsizei width + GLsizei height + + + void glNamedRenderbufferStorageMultisampleEXT + GLuint renderbuffer + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + + + void glNamedStringARB + GLenum type + GLint namelen + const GLchar *name + GLint stringlen + const GLchar *string + + + void glNewList + GLuint list + GLenum mode + + + + GLuint glNewObjectBufferATI + GLsizei size + const void *pointer + GLenum usage + + + void glNormal3b + GLbyte nx + GLbyte ny + GLbyte nz + + + + void glNormal3bv + const GLbyte *v + + + + void glNormal3d + GLdouble nx + GLdouble ny + GLdouble nz + + + + void glNormal3dv + const GLdouble *v + + + + void glNormal3f + GLfloat nx + GLfloat ny + GLfloat nz + + + + void glNormal3fVertex3fSUN + GLfloat nx + GLfloat ny + GLfloat nz + GLfloat x + GLfloat y + GLfloat z + + + void glNormal3fVertex3fvSUN + const GLfloat *n + const GLfloat *v + + + void glNormal3fv + const GLfloat *v + + + + void glNormal3hNV + GLhalfNV nx + GLhalfNV ny + GLhalfNV nz + + + + void glNormal3hvNV + const GLhalfNV *v + + + + void glNormal3i + GLint nx + GLint ny + GLint nz + + + + void glNormal3iv + const GLint *v + + + + void glNormal3s + GLshort nx + GLshort ny + GLshort nz + + + + void glNormal3sv + const GLshort *v + + + + void glNormal3x + GLfixed nx + GLfixed ny + GLfixed nz + + + void glNormal3xOES + GLfixed nx + GLfixed ny + GLfixed nz + + + void glNormal3xvOES + const GLfixed *coords + + + void glNormalFormatNV + GLenum type + GLsizei stride + + + void glNormalP3ui + GLenum type + GLuint coords + + + void glNormalP3uiv + GLenum type + const GLuint *coords + + + void glNormalPointer + GLenum type + GLsizei stride + const void *pointer + + + void glNormalPointerEXT + GLenum type + GLsizei stride + GLsizei count + const void *pointer + + + void glNormalPointerListIBM + GLenum type + GLint stride + const void **pointer + GLint ptrstride + + + void glNormalPointervINTEL + GLenum type + const void **pointer + + + void glNormalStream3bATI + GLenum stream + GLbyte nx + GLbyte ny + GLbyte nz + + + void glNormalStream3bvATI + GLenum stream + const GLbyte *coords + + + void glNormalStream3dATI + GLenum stream + GLdouble nx + GLdouble ny + GLdouble nz + + + void glNormalStream3dvATI + GLenum stream + const GLdouble *coords + + + void glNormalStream3fATI + GLenum stream + GLfloat nx + GLfloat ny + GLfloat nz + + + void glNormalStream3fvATI + GLenum stream + const GLfloat *coords + + + void glNormalStream3iATI + GLenum stream + GLint nx + GLint ny + GLint nz + + + void glNormalStream3ivATI + GLenum stream + const GLint *coords + + + void glNormalStream3sATI + GLenum stream + GLshort nx + GLshort ny + GLshort nz + + + void glNormalStream3svATI + GLenum stream + const GLshort *coords + + + void glObjectLabel + GLenum identifier + GLuint name + GLsizei length + const GLchar *label + + + void glObjectLabelKHR + GLenum identifier + GLuint name + GLsizei length + const GLchar *label + + + + void glObjectPtrLabel + const void *ptr + GLsizei length + const GLchar *label + + + void glObjectPtrLabelKHR + const void *ptr + GLsizei length + const GLchar *label + + + + GLenum glObjectPurgeableAPPLE + GLenum objectType + GLuint name + GLenum option + + + GLenum glObjectUnpurgeableAPPLE + GLenum objectType + GLuint name + GLenum option + + + void glOrtho + GLdouble left + GLdouble right + GLdouble bottom + GLdouble top + GLdouble zNear + GLdouble zFar + + + + void glOrthof + GLfloat l + GLfloat r + GLfloat b + GLfloat t + GLfloat n + GLfloat f + + + void glOrthofOES + GLfloat l + GLfloat r + GLfloat b + GLfloat t + GLfloat n + GLfloat f + + + + void glOrthox + GLfixed l + GLfixed r + GLfixed b + GLfixed t + GLfixed n + GLfixed f + + + void glOrthoxOES + GLfixed l + GLfixed r + GLfixed b + GLfixed t + GLfixed n + GLfixed f + + + void glPNTrianglesfATI + GLenum pname + GLfloat param + + + void glPNTrianglesiATI + GLenum pname + GLint param + + + void glPassTexCoordATI + GLuint dst + GLuint coord + GLenum swizzle + + + void glPassThrough + GLfloat token + + + + void glPassThroughxOES + GLfixed token + + + void glPatchParameterfv + GLenum pname + const GLfloat *values + + + void glPatchParameteri + GLenum pname + GLint value + + + void glPatchParameteriEXT + GLenum pname + GLint value + + + + void glPatchParameteriOES + GLenum pname + GLint value + + + + void glPathColorGenNV + GLenum color + GLenum genMode + GLenum colorFormat + const GLfloat *coeffs + + + void glPathCommandsNV + GLuint path + GLsizei numCommands + const GLubyte *commands + GLsizei numCoords + GLenum coordType + const void *coords + + + void glPathCoordsNV + GLuint path + GLsizei numCoords + GLenum coordType + const void *coords + + + void glPathCoverDepthFuncNV + GLenum func + + + void glPathDashArrayNV + GLuint path + GLsizei dashCount + const GLfloat *dashArray + + + void glPathFogGenNV + GLenum genMode + + + GLenum glPathGlyphIndexArrayNV + GLuint firstPathName + GLenum fontTarget + const void *fontName + GLbitfield fontStyle + GLuint firstGlyphIndex + GLsizei numGlyphs + GLuint pathParameterTemplate + GLfloat emScale + + + GLenum glPathGlyphIndexRangeNV + GLenum fontTarget + const void *fontName + GLbitfield fontStyle + GLuint pathParameterTemplate + GLfloat emScale + GLuint *baseAndCount + + + void glPathGlyphRangeNV + GLuint firstPathName + GLenum fontTarget + const void *fontName + GLbitfield fontStyle + GLuint firstGlyph + GLsizei numGlyphs + GLenum handleMissingGlyphs + GLuint pathParameterTemplate + GLfloat emScale + + + void glPathGlyphsNV + GLuint firstPathName + GLenum fontTarget + const void *fontName + GLbitfield fontStyle + GLsizei numGlyphs + GLenum type + const void *charcodes + GLenum handleMissingGlyphs + GLuint pathParameterTemplate + GLfloat emScale + + + GLenum glPathMemoryGlyphIndexArrayNV + GLuint firstPathName + GLenum fontTarget + GLsizeiptr fontSize + const void *fontData + GLsizei faceIndex + GLuint firstGlyphIndex + GLsizei numGlyphs + GLuint pathParameterTemplate + GLfloat emScale + + + void glPathParameterfNV + GLuint path + GLenum pname + GLfloat value + + + void glPathParameterfvNV + GLuint path + GLenum pname + const GLfloat *value + + + void glPathParameteriNV + GLuint path + GLenum pname + GLint value + + + void glPathParameterivNV + GLuint path + GLenum pname + const GLint *value + + + void glPathStencilDepthOffsetNV + GLfloat factor + GLfloat units + + + void glPathStencilFuncNV + GLenum func + GLint ref + GLuint mask + + + void glPathStringNV + GLuint path + GLenum format + GLsizei length + const void *pathString + + + void glPathSubCommandsNV + GLuint path + GLsizei commandStart + GLsizei commandsToDelete + GLsizei numCommands + const GLubyte *commands + GLsizei numCoords + GLenum coordType + const void *coords + + + void glPathSubCoordsNV + GLuint path + GLsizei coordStart + GLsizei numCoords + GLenum coordType + const void *coords + + + void glPathTexGenNV + GLenum texCoordSet + GLenum genMode + GLint components + const GLfloat *coeffs + + + void glPauseTransformFeedback + + + void glPauseTransformFeedbackNV + + + + void glPixelDataRangeNV + GLenum target + GLsizei length + const void *pointer + + + void glPixelMapfv + GLenum map + GLsizei mapsize + const GLfloat *values + + + + + void glPixelMapuiv + GLenum map + GLsizei mapsize + const GLuint *values + + + + + void glPixelMapusv + GLenum map + GLsizei mapsize + const GLushort *values + + + + + void glPixelMapx + GLenum map + GLint size + const GLfixed *values + + + void glPixelStoref + GLenum pname + GLfloat param + + + + void glPixelStorei + GLenum pname + GLint param + + + + void glPixelStorex + GLenum pname + GLfixed param + + + void glPixelTexGenParameterfSGIS + GLenum pname + GLfloat param + + + void glPixelTexGenParameterfvSGIS + GLenum pname + const GLfloat *params + + + void glPixelTexGenParameteriSGIS + GLenum pname + GLint param + + + void glPixelTexGenParameterivSGIS + GLenum pname + const GLint *params + + + void glPixelTexGenSGIX + GLenum mode + + + + void glPixelTransferf + GLenum pname + GLfloat param + + + + void glPixelTransferi + GLenum pname + GLint param + + + + void glPixelTransferxOES + GLenum pname + GLfixed param + + + void glPixelTransformParameterfEXT + GLenum target + GLenum pname + GLfloat param + + + + void glPixelTransformParameterfvEXT + GLenum target + GLenum pname + const GLfloat *params + + + void glPixelTransformParameteriEXT + GLenum target + GLenum pname + GLint param + + + + void glPixelTransformParameterivEXT + GLenum target + GLenum pname + const GLint *params + + + void glPixelZoom + GLfloat xfactor + GLfloat yfactor + + + + void glPixelZoomxOES + GLfixed xfactor + GLfixed yfactor + + + GLboolean glPointAlongPathNV + GLuint path + GLsizei startSegment + GLsizei numSegments + GLfloat distance + GLfloat *x + GLfloat *y + GLfloat *tangentX + GLfloat *tangentY + + + void glPointParameterf + GLenum pname + GLfloat param + + + + void glPointParameterfARB + GLenum pname + GLfloat param + + + + + void glPointParameterfEXT + GLenum pname + GLfloat param + + + + void glPointParameterfSGIS + GLenum pname + GLfloat param + + + + void glPointParameterfv + GLenum pname + const GLfloat *params + + + + void glPointParameterfvARB + GLenum pname + const GLfloat *params + + + + + void glPointParameterfvEXT + GLenum pname + const GLfloat *params + + + + void glPointParameterfvSGIS + GLenum pname + const GLfloat *params + + + + void glPointParameteri + GLenum pname + GLint param + + + + void glPointParameteriNV + GLenum pname + GLint param + + + + + void glPointParameteriv + GLenum pname + const GLint *params + + + + void glPointParameterivNV + GLenum pname + const GLint *params + + + + + void glPointParameterx + GLenum pname + GLfixed param + + + void glPointParameterxOES + GLenum pname + GLfixed param + + + void glPointParameterxv + GLenum pname + const GLfixed *params + + + void glPointParameterxvOES + GLenum pname + const GLfixed *params + + + void glPointSize + GLfloat size + + + + void glPointSizePointerOES + GLenum type + GLsizei stride + const void *pointer + + + void glPointSizex + GLfixed size + + + void glPointSizexOES + GLfixed size + + + GLint glPollAsyncSGIX + GLuint *markerp + + + GLint glPollInstrumentsSGIX + GLint *marker_p + + + + void glPolygonMode + GLenum face + GLenum mode + + + + void glPolygonModeNV + GLenum face + GLenum mode + + + + void glPolygonOffset + GLfloat factor + GLfloat units + + + + void glPolygonOffsetClamp + GLfloat factor + GLfloat units + GLfloat clamp + + + + void glPolygonOffsetClampEXT + GLfloat factor + GLfloat units + GLfloat clamp + + + + void glPolygonOffsetEXT + GLfloat factor + GLfloat bias + + + + void glPolygonOffsetx + GLfixed factor + GLfixed units + + + void glPolygonOffsetxOES + GLfixed factor + GLfixed units + + + void glPolygonStipple + const GLubyte *mask + + + + + void glPopAttrib + + + + void glPopClientAttrib + + + void glPopDebugGroup + + + void glPopDebugGroupKHR + + + + void glPopGroupMarkerEXT + + + void glPopMatrix + + + + void glPopName + + + + void glPresentFrameDualFillNV + GLuint video_slot + GLuint64EXT minPresentTime + GLuint beginPresentTimeId + GLuint presentDurationId + GLenum type + GLenum target0 + GLuint fill0 + GLenum target1 + GLuint fill1 + GLenum target2 + GLuint fill2 + GLenum target3 + GLuint fill3 + + + void glPresentFrameKeyedNV + GLuint video_slot + GLuint64EXT minPresentTime + GLuint beginPresentTimeId + GLuint presentDurationId + GLenum type + GLenum target0 + GLuint fill0 + GLuint key0 + GLenum target1 + GLuint fill1 + GLuint key1 + + + void glPrimitiveBoundingBox + GLfloat minX + GLfloat minY + GLfloat minZ + GLfloat minW + GLfloat maxX + GLfloat maxY + GLfloat maxZ + GLfloat maxW + + + void glPrimitiveBoundingBoxARB + GLfloat minX + GLfloat minY + GLfloat minZ + GLfloat minW + GLfloat maxX + GLfloat maxY + GLfloat maxZ + GLfloat maxW + + + + void glPrimitiveBoundingBoxEXT + GLfloat minX + GLfloat minY + GLfloat minZ + GLfloat minW + GLfloat maxX + GLfloat maxY + GLfloat maxZ + GLfloat maxW + + + + void glPrimitiveBoundingBoxOES + GLfloat minX + GLfloat minY + GLfloat minZ + GLfloat minW + GLfloat maxX + GLfloat maxY + GLfloat maxZ + GLfloat maxW + + + + void glPrimitiveRestartIndex + GLuint index + + + void glPrimitiveRestartIndexNV + GLuint index + + + + void glPrimitiveRestartNV + + + + void glPrioritizeTextures + GLsizei n + const GLuint *textures + const GLfloat *priorities + + + + void glPrioritizeTexturesEXT + GLsizei n + const GLuint *textures + const GLclampf *priorities + + + + + void glPrioritizeTexturesxOES + GLsizei n + const GLuint *textures + const GLfixed *priorities + + + void glProgramBinary + GLuint program + GLenum binaryFormat + const void *binary + GLsizei length + + + void glProgramBinaryOES + GLuint program + GLenum binaryFormat + const void *binary + GLint length + + + + void glProgramBufferParametersIivNV + GLenum target + GLuint bindingIndex + GLuint wordIndex + GLsizei count + const GLint *params + + + void glProgramBufferParametersIuivNV + GLenum target + GLuint bindingIndex + GLuint wordIndex + GLsizei count + const GLuint *params + + + void glProgramBufferParametersfvNV + GLenum target + GLuint bindingIndex + GLuint wordIndex + GLsizei count + const GLfloat *params + + + void glProgramEnvParameter4dARB + GLenum target + GLuint index + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + + void glProgramEnvParameter4dvARB + GLenum target + GLuint index + const GLdouble *params + + + void glProgramEnvParameter4fARB + GLenum target + GLuint index + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + + void glProgramEnvParameter4fvARB + GLenum target + GLuint index + const GLfloat *params + + + void glProgramEnvParameterI4iNV + GLenum target + GLuint index + GLint x + GLint y + GLint z + GLint w + + + + void glProgramEnvParameterI4ivNV + GLenum target + GLuint index + const GLint *params + + + void glProgramEnvParameterI4uiNV + GLenum target + GLuint index + GLuint x + GLuint y + GLuint z + GLuint w + + + + void glProgramEnvParameterI4uivNV + GLenum target + GLuint index + const GLuint *params + + + void glProgramEnvParameters4fvEXT + GLenum target + GLuint index + GLsizei count + const GLfloat *params + + + + void glProgramEnvParametersI4ivNV + GLenum target + GLuint index + GLsizei count + const GLint *params + + + void glProgramEnvParametersI4uivNV + GLenum target + GLuint index + GLsizei count + const GLuint *params + + + void glProgramLocalParameter4dARB + GLenum target + GLuint index + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + + void glProgramLocalParameter4dvARB + GLenum target + GLuint index + const GLdouble *params + + + void glProgramLocalParameter4fARB + GLenum target + GLuint index + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + + void glProgramLocalParameter4fvARB + GLenum target + GLuint index + const GLfloat *params + + + void glProgramLocalParameterI4iNV + GLenum target + GLuint index + GLint x + GLint y + GLint z + GLint w + + + + void glProgramLocalParameterI4ivNV + GLenum target + GLuint index + const GLint *params + + + void glProgramLocalParameterI4uiNV + GLenum target + GLuint index + GLuint x + GLuint y + GLuint z + GLuint w + + + + void glProgramLocalParameterI4uivNV + GLenum target + GLuint index + const GLuint *params + + + void glProgramLocalParameters4fvEXT + GLenum target + GLuint index + GLsizei count + const GLfloat *params + + + + void glProgramLocalParametersI4ivNV + GLenum target + GLuint index + GLsizei count + const GLint *params + + + void glProgramLocalParametersI4uivNV + GLenum target + GLuint index + GLsizei count + const GLuint *params + + + void glProgramNamedParameter4dNV + GLuint id + GLsizei len + const GLubyte *name + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + + void glProgramNamedParameter4dvNV + GLuint id + GLsizei len + const GLubyte *name + const GLdouble *v + + + + void glProgramNamedParameter4fNV + GLuint id + GLsizei len + const GLubyte *name + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + + void glProgramNamedParameter4fvNV + GLuint id + GLsizei len + const GLubyte *name + const GLfloat *v + + + + void glProgramParameter4dNV + GLenum target + GLuint index + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + + void glProgramParameter4dvNV + GLenum target + GLuint index + const GLdouble *v + + + + void glProgramParameter4fNV + GLenum target + GLuint index + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + + void glProgramParameter4fvNV + GLenum target + GLuint index + const GLfloat *v + + + + void glProgramParameteri + GLuint program + GLenum pname + GLint value + + + void glProgramParameteriARB + GLuint program + GLenum pname + GLint value + + + + void glProgramParameteriEXT + GLuint program + GLenum pname + GLint value + + + + void glProgramParameters4dvNV + GLenum target + GLuint index + GLsizei count + const GLdouble *v + + + + void glProgramParameters4fvNV + GLenum target + GLuint index + GLsizei count + const GLfloat *v + + + + void glProgramPathFragmentInputGenNV + GLuint program + GLint location + GLenum genMode + GLint components + const GLfloat *coeffs + + + void glProgramStringARB + GLenum target + GLenum format + GLsizei len + const void *string + + + void glProgramSubroutineParametersuivNV + GLenum target + GLsizei count + const GLuint *params + + + void glProgramUniform1d + GLuint program + GLint location + GLdouble v0 + + + void glProgramUniform1dEXT + GLuint program + GLint location + GLdouble x + + + void glProgramUniform1dv + GLuint program + GLint location + GLsizei count + const GLdouble *value + + + void glProgramUniform1dvEXT + GLuint program + GLint location + GLsizei count + const GLdouble *value + + + void glProgramUniform1f + GLuint program + GLint location + GLfloat v0 + + + void glProgramUniform1fEXT + GLuint program + GLint location + GLfloat v0 + + + + void glProgramUniform1fv + GLuint program + GLint location + GLsizei count + const GLfloat *value + + + void glProgramUniform1fvEXT + GLuint program + GLint location + GLsizei count + const GLfloat *value + + + + void glProgramUniform1i + GLuint program + GLint location + GLint v0 + + + void glProgramUniform1i64ARB + GLuint program + GLint location + GLint64 x + + + void glProgramUniform1i64NV + GLuint program + GLint location + GLint64EXT x + + + void glProgramUniform1i64vARB + GLuint program + GLint location + GLsizei count + const GLint64 *value + + + void glProgramUniform1i64vNV + GLuint program + GLint location + GLsizei count + const GLint64EXT *value + + + void glProgramUniform1iEXT + GLuint program + GLint location + GLint v0 + + + + void glProgramUniform1iv + GLuint program + GLint location + GLsizei count + const GLint *value + + + void glProgramUniform1ivEXT + GLuint program + GLint location + GLsizei count + const GLint *value + + + + void glProgramUniform1ui + GLuint program + GLint location + GLuint v0 + + + void glProgramUniform1ui64ARB + GLuint program + GLint location + GLuint64 x + + + void glProgramUniform1ui64NV + GLuint program + GLint location + GLuint64EXT x + + + void glProgramUniform1ui64vARB + GLuint program + GLint location + GLsizei count + const GLuint64 *value + + + void glProgramUniform1ui64vNV + GLuint program + GLint location + GLsizei count + const GLuint64EXT *value + + + void glProgramUniform1uiEXT + GLuint program + GLint location + GLuint v0 + + + + void glProgramUniform1uiv + GLuint program + GLint location + GLsizei count + const GLuint *value + + + void glProgramUniform1uivEXT + GLuint program + GLint location + GLsizei count + const GLuint *value + + + + void glProgramUniform2d + GLuint program + GLint location + GLdouble v0 + GLdouble v1 + + + void glProgramUniform2dEXT + GLuint program + GLint location + GLdouble x + GLdouble y + + + void glProgramUniform2dv + GLuint program + GLint location + GLsizei count + const GLdouble *value + + + void glProgramUniform2dvEXT + GLuint program + GLint location + GLsizei count + const GLdouble *value + + + void glProgramUniform2f + GLuint program + GLint location + GLfloat v0 + GLfloat v1 + + + void glProgramUniform2fEXT + GLuint program + GLint location + GLfloat v0 + GLfloat v1 + + + + void glProgramUniform2fv + GLuint program + GLint location + GLsizei count + const GLfloat *value + + + void glProgramUniform2fvEXT + GLuint program + GLint location + GLsizei count + const GLfloat *value + + + + void glProgramUniform2i + GLuint program + GLint location + GLint v0 + GLint v1 + + + void glProgramUniform2i64ARB + GLuint program + GLint location + GLint64 x + GLint64 y + + + void glProgramUniform2i64NV + GLuint program + GLint location + GLint64EXT x + GLint64EXT y + + + void glProgramUniform2i64vARB + GLuint program + GLint location + GLsizei count + const GLint64 *value + + + void glProgramUniform2i64vNV + GLuint program + GLint location + GLsizei count + const GLint64EXT *value + + + void glProgramUniform2iEXT + GLuint program + GLint location + GLint v0 + GLint v1 + + + + void glProgramUniform2iv + GLuint program + GLint location + GLsizei count + const GLint *value + + + void glProgramUniform2ivEXT + GLuint program + GLint location + GLsizei count + const GLint *value + + + + void glProgramUniform2ui + GLuint program + GLint location + GLuint v0 + GLuint v1 + + + void glProgramUniform2ui64ARB + GLuint program + GLint location + GLuint64 x + GLuint64 y + + + void glProgramUniform2ui64NV + GLuint program + GLint location + GLuint64EXT x + GLuint64EXT y + + + void glProgramUniform2ui64vARB + GLuint program + GLint location + GLsizei count + const GLuint64 *value + + + void glProgramUniform2ui64vNV + GLuint program + GLint location + GLsizei count + const GLuint64EXT *value + + + void glProgramUniform2uiEXT + GLuint program + GLint location + GLuint v0 + GLuint v1 + + + + void glProgramUniform2uiv + GLuint program + GLint location + GLsizei count + const GLuint *value + + + void glProgramUniform2uivEXT + GLuint program + GLint location + GLsizei count + const GLuint *value + + + + void glProgramUniform3d + GLuint program + GLint location + GLdouble v0 + GLdouble v1 + GLdouble v2 + + + void glProgramUniform3dEXT + GLuint program + GLint location + GLdouble x + GLdouble y + GLdouble z + + + void glProgramUniform3dv + GLuint program + GLint location + GLsizei count + const GLdouble *value + + + void glProgramUniform3dvEXT + GLuint program + GLint location + GLsizei count + const GLdouble *value + + + void glProgramUniform3f + GLuint program + GLint location + GLfloat v0 + GLfloat v1 + GLfloat v2 + + + void glProgramUniform3fEXT + GLuint program + GLint location + GLfloat v0 + GLfloat v1 + GLfloat v2 + + + + void glProgramUniform3fv + GLuint program + GLint location + GLsizei count + const GLfloat *value + + + void glProgramUniform3fvEXT + GLuint program + GLint location + GLsizei count + const GLfloat *value + + + + void glProgramUniform3i + GLuint program + GLint location + GLint v0 + GLint v1 + GLint v2 + + + void glProgramUniform3i64ARB + GLuint program + GLint location + GLint64 x + GLint64 y + GLint64 z + + + void glProgramUniform3i64NV + GLuint program + GLint location + GLint64EXT x + GLint64EXT y + GLint64EXT z + + + void glProgramUniform3i64vARB + GLuint program + GLint location + GLsizei count + const GLint64 *value + + + void glProgramUniform3i64vNV + GLuint program + GLint location + GLsizei count + const GLint64EXT *value + + + void glProgramUniform3iEXT + GLuint program + GLint location + GLint v0 + GLint v1 + GLint v2 + + + + void glProgramUniform3iv + GLuint program + GLint location + GLsizei count + const GLint *value + + + void glProgramUniform3ivEXT + GLuint program + GLint location + GLsizei count + const GLint *value + + + + void glProgramUniform3ui + GLuint program + GLint location + GLuint v0 + GLuint v1 + GLuint v2 + + + void glProgramUniform3ui64ARB + GLuint program + GLint location + GLuint64 x + GLuint64 y + GLuint64 z + + + void glProgramUniform3ui64NV + GLuint program + GLint location + GLuint64EXT x + GLuint64EXT y + GLuint64EXT z + + + void glProgramUniform3ui64vARB + GLuint program + GLint location + GLsizei count + const GLuint64 *value + + + void glProgramUniform3ui64vNV + GLuint program + GLint location + GLsizei count + const GLuint64EXT *value + + + void glProgramUniform3uiEXT + GLuint program + GLint location + GLuint v0 + GLuint v1 + GLuint v2 + + + + void glProgramUniform3uiv + GLuint program + GLint location + GLsizei count + const GLuint *value + + + void glProgramUniform3uivEXT + GLuint program + GLint location + GLsizei count + const GLuint *value + + + + void glProgramUniform4d + GLuint program + GLint location + GLdouble v0 + GLdouble v1 + GLdouble v2 + GLdouble v3 + + + void glProgramUniform4dEXT + GLuint program + GLint location + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + void glProgramUniform4dv + GLuint program + GLint location + GLsizei count + const GLdouble *value + + + void glProgramUniform4dvEXT + GLuint program + GLint location + GLsizei count + const GLdouble *value + + + void glProgramUniform4f + GLuint program + GLint location + GLfloat v0 + GLfloat v1 + GLfloat v2 + GLfloat v3 + + + void glProgramUniform4fEXT + GLuint program + GLint location + GLfloat v0 + GLfloat v1 + GLfloat v2 + GLfloat v3 + + + + void glProgramUniform4fv + GLuint program + GLint location + GLsizei count + const GLfloat *value + + + void glProgramUniform4fvEXT + GLuint program + GLint location + GLsizei count + const GLfloat *value + + + + void glProgramUniform4i + GLuint program + GLint location + GLint v0 + GLint v1 + GLint v2 + GLint v3 + + + void glProgramUniform4i64ARB + GLuint program + GLint location + GLint64 x + GLint64 y + GLint64 z + GLint64 w + + + void glProgramUniform4i64NV + GLuint program + GLint location + GLint64EXT x + GLint64EXT y + GLint64EXT z + GLint64EXT w + + + void glProgramUniform4i64vARB + GLuint program + GLint location + GLsizei count + const GLint64 *value + + + void glProgramUniform4i64vNV + GLuint program + GLint location + GLsizei count + const GLint64EXT *value + + + void glProgramUniform4iEXT + GLuint program + GLint location + GLint v0 + GLint v1 + GLint v2 + GLint v3 + + + + void glProgramUniform4iv + GLuint program + GLint location + GLsizei count + const GLint *value + + + void glProgramUniform4ivEXT + GLuint program + GLint location + GLsizei count + const GLint *value + + + + void glProgramUniform4ui + GLuint program + GLint location + GLuint v0 + GLuint v1 + GLuint v2 + GLuint v3 + + + void glProgramUniform4ui64ARB + GLuint program + GLint location + GLuint64 x + GLuint64 y + GLuint64 z + GLuint64 w + + + void glProgramUniform4ui64NV + GLuint program + GLint location + GLuint64EXT x + GLuint64EXT y + GLuint64EXT z + GLuint64EXT w + + + void glProgramUniform4ui64vARB + GLuint program + GLint location + GLsizei count + const GLuint64 *value + + + void glProgramUniform4ui64vNV + GLuint program + GLint location + GLsizei count + const GLuint64EXT *value + + + void glProgramUniform4uiEXT + GLuint program + GLint location + GLuint v0 + GLuint v1 + GLuint v2 + GLuint v3 + + + + void glProgramUniform4uiv + GLuint program + GLint location + GLsizei count + const GLuint *value + + + void glProgramUniform4uivEXT + GLuint program + GLint location + GLsizei count + const GLuint *value + + + + void glProgramUniformHandleui64ARB + GLuint program + GLint location + GLuint64 value + + + void glProgramUniformHandleui64IMG + GLuint program + GLint location + GLuint64 value + + + + void glProgramUniformHandleui64NV + GLuint program + GLint location + GLuint64 value + + + void glProgramUniformHandleui64vARB + GLuint program + GLint location + GLsizei count + const GLuint64 *values + + + void glProgramUniformHandleui64vIMG + GLuint program + GLint location + GLsizei count + const GLuint64 *values + + + + void glProgramUniformHandleui64vNV + GLuint program + GLint location + GLsizei count + const GLuint64 *values + + + void glProgramUniformMatrix2dv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix2dvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix2fv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + void glProgramUniformMatrix2fvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glProgramUniformMatrix2x3dv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix2x3dvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix2x3fv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + void glProgramUniformMatrix2x3fvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glProgramUniformMatrix2x4dv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix2x4dvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix2x4fv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + void glProgramUniformMatrix2x4fvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glProgramUniformMatrix3dv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix3dvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix3fv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + void glProgramUniformMatrix3fvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glProgramUniformMatrix3x2dv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix3x2dvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix3x2fv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + void glProgramUniformMatrix3x2fvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glProgramUniformMatrix3x4dv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix3x4dvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix3x4fv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + void glProgramUniformMatrix3x4fvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glProgramUniformMatrix4dv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix4dvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix4fv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + void glProgramUniformMatrix4fvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glProgramUniformMatrix4x2dv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix4x2dvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix4x2fv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + void glProgramUniformMatrix4x2fvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glProgramUniformMatrix4x3dv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix4x3dvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix4x3fv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + void glProgramUniformMatrix4x3fvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glProgramUniformui64NV + GLuint program + GLint location + GLuint64EXT value + + + void glProgramUniformui64vNV + GLuint program + GLint location + GLsizei count + const GLuint64EXT *value + + + void glProgramVertexLimitNV + GLenum target + GLint limit + + + void glProvokingVertex + GLenum mode + + + void glProvokingVertexEXT + GLenum mode + + + + void glPushAttrib + GLbitfield mask + + + + void glPushClientAttrib + GLbitfield mask + + + void glPushClientAttribDefaultEXT + GLbitfield mask + + + void glPushDebugGroup + GLenum source + GLuint id + GLsizei length + const GLchar *message + + + void glPushDebugGroupKHR + GLenum source + GLuint id + GLsizei length + const GLchar *message + + + + void glPushGroupMarkerEXT + GLsizei length + const GLchar *marker + + + void glPushMatrix + + + + void glPushName + GLuint name + + + + void glQueryCounter + GLuint id + GLenum target + + + void glQueryCounterEXT + GLuint id + GLenum target + + + + GLbitfield glQueryMatrixxOES + GLfixed *mantissa + GLint *exponent + + + void glQueryObjectParameteruiAMD + GLenum target + GLuint id + GLenum pname + GLuint param + + + GLint glQueryResourceNV + GLenum queryType + GLint tagId + GLuint count + GLint *buffer + + + void glQueryResourceTagNV + GLint tagId + const GLchar *tagString + + + void glRasterPos2d + GLdouble x + GLdouble y + + + + void glRasterPos2dv + const GLdouble *v + + + + void glRasterPos2f + GLfloat x + GLfloat y + + + + void glRasterPos2fv + const GLfloat *v + + + + void glRasterPos2i + GLint x + GLint y + + + + void glRasterPos2iv + const GLint *v + + + + void glRasterPos2s + GLshort x + GLshort y + + + + void glRasterPos2sv + const GLshort *v + + + + void glRasterPos2xOES + GLfixed x + GLfixed y + + + void glRasterPos2xvOES + const GLfixed *coords + + + void glRasterPos3d + GLdouble x + GLdouble y + GLdouble z + + + + void glRasterPos3dv + const GLdouble *v + + + + void glRasterPos3f + GLfloat x + GLfloat y + GLfloat z + + + + void glRasterPos3fv + const GLfloat *v + + + + void glRasterPos3i + GLint x + GLint y + GLint z + + + + void glRasterPos3iv + const GLint *v + + + + void glRasterPos3s + GLshort x + GLshort y + GLshort z + + + + void glRasterPos3sv + const GLshort *v + + + + void glRasterPos3xOES + GLfixed x + GLfixed y + GLfixed z + + + void glRasterPos3xvOES + const GLfixed *coords + + + void glRasterPos4d + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + + void glRasterPos4dv + const GLdouble *v + + + + void glRasterPos4f + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + + void glRasterPos4fv + const GLfloat *v + + + + void glRasterPos4i + GLint x + GLint y + GLint z + GLint w + + + + void glRasterPos4iv + const GLint *v + + + + void glRasterPos4s + GLshort x + GLshort y + GLshort z + GLshort w + + + + void glRasterPos4sv + const GLshort *v + + + + void glRasterPos4xOES + GLfixed x + GLfixed y + GLfixed z + GLfixed w + + + void glRasterPos4xvOES + const GLfixed *coords + + + void glRasterSamplesEXT + GLuint samples + GLboolean fixedsamplelocations + + + void glReadBuffer + GLenum src + + + + void glReadBufferIndexedEXT + GLenum src + GLint index + + + void glReadBufferNV + GLenum mode + + + void glReadInstrumentsSGIX + GLint marker + + + + void glReadPixels + GLint x + GLint y + GLsizei width + GLsizei height + GLenum format + GLenum type + void *pixels + + + + + void glReadnPixels + GLint x + GLint y + GLsizei width + GLsizei height + GLenum format + GLenum type + GLsizei bufSize + void *data + + + void glReadnPixelsARB + GLint x + GLint y + GLsizei width + GLsizei height + GLenum format + GLenum type + GLsizei bufSize + void *data + + + + void glReadnPixelsEXT + GLint x + GLint y + GLsizei width + GLsizei height + GLenum format + GLenum type + GLsizei bufSize + void *data + + + + void glReadnPixelsKHR + GLint x + GLint y + GLsizei width + GLsizei height + GLenum format + GLenum type + GLsizei bufSize + void *data + + + + GLboolean glReleaseKeyedMutexWin32EXT + GLuint memory + GLuint64 key + + + void glRectd + GLdouble x1 + GLdouble y1 + GLdouble x2 + GLdouble y2 + + + + void glRectdv + const GLdouble *v1 + const GLdouble *v2 + + + + void glRectf + GLfloat x1 + GLfloat y1 + GLfloat x2 + GLfloat y2 + + + + void glRectfv + const GLfloat *v1 + const GLfloat *v2 + + + + void glRecti + GLint x1 + GLint y1 + GLint x2 + GLint y2 + + + + void glRectiv + const GLint *v1 + const GLint *v2 + + + + void glRects + GLshort x1 + GLshort y1 + GLshort x2 + GLshort y2 + + + + void glRectsv + const GLshort *v1 + const GLshort *v2 + + + + void glRectxOES + GLfixed x1 + GLfixed y1 + GLfixed x2 + GLfixed y2 + + + void glRectxvOES + const GLfixed *v1 + const GLfixed *v2 + + + void glReferencePlaneSGIX + const GLdouble *equation + + + + void glReleaseShaderCompiler + + + void glRenderGpuMaskNV + GLbitfield mask + + + GLint glRenderMode + GLenum mode + + + + void glRenderbufferStorage + GLenum target + GLenum internalformat + GLsizei width + GLsizei height + + + + void glRenderbufferStorageEXT + GLenum target + GLenum internalformat + GLsizei width + GLsizei height + + + + + void glRenderbufferStorageMultisample + GLenum target + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + + + + void glRenderbufferStorageMultisampleANGLE + GLenum target + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + + + void glRenderbufferStorageMultisampleAPPLE + GLenum target + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + + + void glRenderbufferStorageMultisampleAdvancedAMD + GLenum target + GLsizei samples + GLsizei storageSamples + GLenum internalformat + GLsizei width + GLsizei height + + + void glRenderbufferStorageMultisampleCoverageNV + GLenum target + GLsizei coverageSamples + GLsizei colorSamples + GLenum internalformat + GLsizei width + GLsizei height + + + void glRenderbufferStorageMultisampleEXT + GLenum target + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + + + + + void glRenderbufferStorageMultisampleIMG + GLenum target + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + + + void glRenderbufferStorageMultisampleNV + GLenum target + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + + + + void glRenderbufferStorageOES + GLenum target + GLenum internalformat + GLsizei width + GLsizei height + + + void glReplacementCodePointerSUN + GLenum type + GLsizei stride + const void **pointer + + + void glReplacementCodeubSUN + GLubyte code + + + void glReplacementCodeubvSUN + const GLubyte *code + + + void glReplacementCodeuiColor3fVertex3fSUN + GLuint rc + GLfloat r + GLfloat g + GLfloat b + GLfloat x + GLfloat y + GLfloat z + + + void glReplacementCodeuiColor3fVertex3fvSUN + const GLuint *rc + const GLfloat *c + const GLfloat *v + + + void glReplacementCodeuiColor4fNormal3fVertex3fSUN + GLuint rc + GLfloat r + GLfloat g + GLfloat b + GLfloat a + GLfloat nx + GLfloat ny + GLfloat nz + GLfloat x + GLfloat y + GLfloat z + + + void glReplacementCodeuiColor4fNormal3fVertex3fvSUN + const GLuint *rc + const GLfloat *c + const GLfloat *n + const GLfloat *v + + + void glReplacementCodeuiColor4ubVertex3fSUN + GLuint rc + GLubyte r + GLubyte g + GLubyte b + GLubyte a + GLfloat x + GLfloat y + GLfloat z + + + void glReplacementCodeuiColor4ubVertex3fvSUN + const GLuint *rc + const GLubyte *c + const GLfloat *v + + + void glReplacementCodeuiNormal3fVertex3fSUN + GLuint rc + GLfloat nx + GLfloat ny + GLfloat nz + GLfloat x + GLfloat y + GLfloat z + + + void glReplacementCodeuiNormal3fVertex3fvSUN + const GLuint *rc + const GLfloat *n + const GLfloat *v + + + void glReplacementCodeuiSUN + GLuint code + + + void glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN + GLuint rc + GLfloat s + GLfloat t + GLfloat r + GLfloat g + GLfloat b + GLfloat a + GLfloat nx + GLfloat ny + GLfloat nz + GLfloat x + GLfloat y + GLfloat z + + + void glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN + const GLuint *rc + const GLfloat *tc + const GLfloat *c + const GLfloat *n + const GLfloat *v + + + void glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN + GLuint rc + GLfloat s + GLfloat t + GLfloat nx + GLfloat ny + GLfloat nz + GLfloat x + GLfloat y + GLfloat z + + + void glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN + const GLuint *rc + const GLfloat *tc + const GLfloat *n + const GLfloat *v + + + void glReplacementCodeuiTexCoord2fVertex3fSUN + GLuint rc + GLfloat s + GLfloat t + GLfloat x + GLfloat y + GLfloat z + + + void glReplacementCodeuiTexCoord2fVertex3fvSUN + const GLuint *rc + const GLfloat *tc + const GLfloat *v + + + void glReplacementCodeuiVertex3fSUN + GLuint rc + GLfloat x + GLfloat y + GLfloat z + + + void glReplacementCodeuiVertex3fvSUN + const GLuint *rc + const GLfloat *v + + + void glReplacementCodeuivSUN + const GLuint *code + + + void glReplacementCodeusSUN + GLushort code + + + void glReplacementCodeusvSUN + const GLushort *code + + + void glRequestResidentProgramsNV + GLsizei n + const GLuint *programs + + + + void glResetHistogram + GLenum target + + + + void glResetHistogramEXT + GLenum target + + + + + void glResetMemoryObjectParameterNV + GLuint memory + GLenum pname + + + void glResetMinmax + GLenum target + + + + void glResetMinmaxEXT + GLenum target + + + + + void glResizeBuffersMESA + + + void glResolveDepthValuesNV + + + void glResolveMultisampleFramebufferAPPLE + + + void glResumeTransformFeedback + + + void glResumeTransformFeedbackNV + + + + void glRotated + GLdouble angle + GLdouble x + GLdouble y + GLdouble z + + + + void glRotatef + GLfloat angle + GLfloat x + GLfloat y + GLfloat z + + + + void glRotatex + GLfixed angle + GLfixed x + GLfixed y + GLfixed z + + + void glRotatexOES + GLfixed angle + GLfixed x + GLfixed y + GLfixed z + + + void glSampleCoverage + GLfloat value + GLboolean invert + + + + void glSampleCoverageARB + GLfloat value + GLboolean invert + + + + void glSampleCoveragex + GLclampx value + GLboolean invert + + + void glSampleCoveragexOES + GLclampx value + GLboolean invert + + + void glSampleMapATI + GLuint dst + GLuint interp + GLenum swizzle + + + void glSampleMaskEXT + GLclampf value + GLboolean invert + + + void glSampleMaskIndexedNV + GLuint index + GLbitfield mask + + + void glSampleMaskSGIS + GLclampf value + GLboolean invert + + + + + void glSampleMaski + GLuint maskNumber + GLbitfield mask + + + void glSamplePatternEXT + GLenum pattern + + + void glSamplePatternSGIS + GLenum pattern + + + + + void glSamplerParameterIiv + GLuint sampler + GLenum pname + const GLint *param + + + void glSamplerParameterIivEXT + GLuint sampler + GLenum pname + const GLint *param + + + + void glSamplerParameterIivOES + GLuint sampler + GLenum pname + const GLint *param + + + + void glSamplerParameterIuiv + GLuint sampler + GLenum pname + const GLuint *param + + + void glSamplerParameterIuivEXT + GLuint sampler + GLenum pname + const GLuint *param + + + + void glSamplerParameterIuivOES + GLuint sampler + GLenum pname + const GLuint *param + + + + void glSamplerParameterf + GLuint sampler + GLenum pname + GLfloat param + + + void glSamplerParameterfv + GLuint sampler + GLenum pname + const GLfloat *param + + + void glSamplerParameteri + GLuint sampler + GLenum pname + GLint param + + + void glSamplerParameteriv + GLuint sampler + GLenum pname + const GLint *param + + + void glScaled + GLdouble x + GLdouble y + GLdouble z + + + + void glScalef + GLfloat x + GLfloat y + GLfloat z + + + + void glScalex + GLfixed x + GLfixed y + GLfixed z + + + void glScalexOES + GLfixed x + GLfixed y + GLfixed z + + + void glScissor + GLint x + GLint y + GLsizei width + GLsizei height + + + + void glScissorArrayv + GLuint first + GLsizei count + const GLint *v + + + void glScissorArrayvNV + GLuint first + GLsizei count + const GLint *v + + + + void glScissorArrayvOES + GLuint first + GLsizei count + const GLint *v + + + + void glScissorExclusiveArrayvNV + GLuint first + GLsizei count + const GLint *v + + + void glScissorExclusiveNV + GLint x + GLint y + GLsizei width + GLsizei height + + + void glScissorIndexed + GLuint index + GLint left + GLint bottom + GLsizei width + GLsizei height + + + void glScissorIndexedNV + GLuint index + GLint left + GLint bottom + GLsizei width + GLsizei height + + + + void glScissorIndexedOES + GLuint index + GLint left + GLint bottom + GLsizei width + GLsizei height + + + + void glScissorIndexedv + GLuint index + const GLint *v + + + void glScissorIndexedvNV + GLuint index + const GLint *v + + + + void glScissorIndexedvOES + GLuint index + const GLint *v + + + + void glSecondaryColor3b + GLbyte red + GLbyte green + GLbyte blue + + + + void glSecondaryColor3bEXT + GLbyte red + GLbyte green + GLbyte blue + + + + + void glSecondaryColor3bv + const GLbyte *v + + + + void glSecondaryColor3bvEXT + const GLbyte *v + + + + + void glSecondaryColor3d + GLdouble red + GLdouble green + GLdouble blue + + + + void glSecondaryColor3dEXT + GLdouble red + GLdouble green + GLdouble blue + + + + + void glSecondaryColor3dv + const GLdouble *v + + + + void glSecondaryColor3dvEXT + const GLdouble *v + + + + + void glSecondaryColor3f + GLfloat red + GLfloat green + GLfloat blue + + + + void glSecondaryColor3fEXT + GLfloat red + GLfloat green + GLfloat blue + + + + + void glSecondaryColor3fv + const GLfloat *v + + + + void glSecondaryColor3fvEXT + const GLfloat *v + + + + + void glSecondaryColor3hNV + GLhalfNV red + GLhalfNV green + GLhalfNV blue + + + + void glSecondaryColor3hvNV + const GLhalfNV *v + + + + void glSecondaryColor3i + GLint red + GLint green + GLint blue + + + + void glSecondaryColor3iEXT + GLint red + GLint green + GLint blue + + + + + void glSecondaryColor3iv + const GLint *v + + + + void glSecondaryColor3ivEXT + const GLint *v + + + + + void glSecondaryColor3s + GLshort red + GLshort green + GLshort blue + + + + void glSecondaryColor3sEXT + GLshort red + GLshort green + GLshort blue + + + + + void glSecondaryColor3sv + const GLshort *v + + + + void glSecondaryColor3svEXT + const GLshort *v + + + + + void glSecondaryColor3ub + GLubyte red + GLubyte green + GLubyte blue + + + + void glSecondaryColor3ubEXT + GLubyte red + GLubyte green + GLubyte blue + + + + + void glSecondaryColor3ubv + const GLubyte *v + + + + void glSecondaryColor3ubvEXT + const GLubyte *v + + + + + void glSecondaryColor3ui + GLuint red + GLuint green + GLuint blue + + + + void glSecondaryColor3uiEXT + GLuint red + GLuint green + GLuint blue + + + + + void glSecondaryColor3uiv + const GLuint *v + + + + void glSecondaryColor3uivEXT + const GLuint *v + + + + + void glSecondaryColor3us + GLushort red + GLushort green + GLushort blue + + + + void glSecondaryColor3usEXT + GLushort red + GLushort green + GLushort blue + + + + + void glSecondaryColor3usv + const GLushort *v + + + + void glSecondaryColor3usvEXT + const GLushort *v + + + + + void glSecondaryColorFormatNV + GLint size + GLenum type + GLsizei stride + + + void glSecondaryColorP3ui + GLenum type + GLuint color + + + void glSecondaryColorP3uiv + GLenum type + const GLuint *color + + + void glSecondaryColorPointer + GLint size + GLenum type + GLsizei stride + const void *pointer + + + void glSecondaryColorPointerEXT + GLint size + GLenum type + GLsizei stride + const void *pointer + + + + void glSecondaryColorPointerListIBM + GLint size + GLenum type + GLint stride + const void **pointer + GLint ptrstride + + + void glSelectBuffer + GLsizei size + GLuint *buffer + + + + void glSelectPerfMonitorCountersAMD + GLuint monitor + GLboolean enable + GLuint group + GLint numCounters + GLuint *counterList + + + void glSemaphoreParameterivNV + GLuint semaphore + GLenum pname + const GLint *params + + + void glSemaphoreParameterui64vEXT + GLuint semaphore + GLenum pname + const GLuint64 *params + + + void glSeparableFilter2D + GLenum target + GLenum internalformat + GLsizei width + GLsizei height + GLenum format + GLenum type + const void *row + const void *column + + + + + void glSeparableFilter2DEXT + GLenum target + GLenum internalformat + GLsizei width + GLsizei height + GLenum format + GLenum type + const void *row + const void *column + + + + + void glSetFenceAPPLE + GLuint fence + + + void glSetFenceNV + GLuint fence + GLenum condition + + + void glSetFragmentShaderConstantATI + GLuint dst + const GLfloat *value + + + void glSetInvariantEXT + GLuint id + GLenum type + const void *addr + + + void glSetLocalConstantEXT + GLuint id + GLenum type + const void *addr + + + void glSetMultisamplefvAMD + GLenum pname + GLuint index + const GLfloat *val + + + void glShadeModel + GLenum mode + + + + void glShaderBinary + GLsizei count + const GLuint *shaders + GLenum binaryFormat + const void *binary + GLsizei length + + + void glShaderOp1EXT + GLenum op + GLuint res + GLuint arg1 + + + void glShaderOp2EXT + GLenum op + GLuint res + GLuint arg1 + GLuint arg2 + + + void glShaderOp3EXT + GLenum op + GLuint res + GLuint arg1 + GLuint arg2 + GLuint arg3 + + + void glShaderSource + GLuint shader + GLsizei count + const GLchar *const*string + const GLint *length + + + void glShaderSourceARB + GLhandleARB shaderObj + GLsizei count + const GLcharARB **string + const GLint *length + + + + void glShaderStorageBlockBinding + GLuint program + GLuint storageBlockIndex + GLuint storageBlockBinding + + + void glShadingRateEXT + GLenum rate + + + void glShadingRateCombinerOpsEXT + GLenum combinerOp0 + GLenum combinerOp1 + + + void glShadingRateImageBarrierNV + GLboolean synchronize + + + void glShadingRateQCOM + GLenum rate + + + void glShadingRateImagePaletteNV + GLuint viewport + GLuint first + GLsizei count + const GLenum *rates + + + void glShadingRateSampleOrderNV + GLenum order + + + void glShadingRateSampleOrderCustomNV + GLenum rate + GLuint samples + const GLint *locations + + + void glSharpenTexFuncSGIS + GLenum target + GLsizei n + const GLfloat *points + + + + void glSignalSemaphoreEXT + GLuint semaphore + GLuint numBufferBarriers + const GLuint *buffers + GLuint numTextureBarriers + const GLuint *textures + const GLenum *dstLayouts + + + void glSignalSemaphoreui64NVX + GLuint signalGpu + GLsizei fenceObjectCount + const GLuint *semaphoreArray + const GLuint64 *fenceValueArray + + + void glSpecializeShader + GLuint shader + const GLchar *pEntryPoint + GLuint numSpecializationConstants + const GLuint *pConstantIndex + const GLuint *pConstantValue + + + void glSpecializeShaderARB + GLuint shader + const GLchar *pEntryPoint + GLuint numSpecializationConstants + const GLuint *pConstantIndex + const GLuint *pConstantValue + + + + void glSpriteParameterfSGIX + GLenum pname + GLfloat param + + + + void glSpriteParameterfvSGIX + GLenum pname + const GLfloat *params + + + + void glSpriteParameteriSGIX + GLenum pname + GLint param + + + + void glSpriteParameterivSGIX + GLenum pname + const GLint *params + + + + void glStartInstrumentsSGIX + + + + void glStartTilingQCOM + GLuint x + GLuint y + GLuint width + GLuint height + GLbitfield preserveMask + + + void glStateCaptureNV + GLuint state + GLenum mode + + + void glStencilClearTagEXT + GLsizei stencilTagBits + GLuint stencilClearTag + + + + void glStencilFillPathInstancedNV + GLsizei numPaths + GLenum pathNameType + const void *paths + GLuint pathBase + GLenum fillMode + GLuint mask + GLenum transformType + const GLfloat *transformValues + + + void glStencilFillPathNV + GLuint path + GLenum fillMode + GLuint mask + + + void glStencilFunc + GLenum func + GLint ref + GLuint mask + + + + void glStencilFuncSeparate + GLenum face + GLenum func + GLint ref + GLuint mask + + + void glStencilFuncSeparateATI + GLenum frontfunc + GLenum backfunc + GLint ref + GLuint mask + + + void glStencilMask + GLuint mask + + + + void glStencilMaskSeparate + GLenum face + GLuint mask + + + void glStencilOp + GLenum fail + GLenum zfail + GLenum zpass + + + + void glStencilOpSeparate + GLenum face + GLenum sfail + GLenum dpfail + GLenum dppass + + + void glStencilOpSeparateATI + GLenum face + GLenum sfail + GLenum dpfail + GLenum dppass + + + + void glStencilOpValueAMD + GLenum face + GLuint value + + + void glStencilStrokePathInstancedNV + GLsizei numPaths + GLenum pathNameType + const void *paths + GLuint pathBase + GLint reference + GLuint mask + GLenum transformType + const GLfloat *transformValues + + + void glStencilStrokePathNV + GLuint path + GLint reference + GLuint mask + + + void glStencilThenCoverFillPathInstancedNV + GLsizei numPaths + GLenum pathNameType + const void *paths + GLuint pathBase + GLenum fillMode + GLuint mask + GLenum coverMode + GLenum transformType + const GLfloat *transformValues + + + void glStencilThenCoverFillPathNV + GLuint path + GLenum fillMode + GLuint mask + GLenum coverMode + + + void glStencilThenCoverStrokePathInstancedNV + GLsizei numPaths + GLenum pathNameType + const void *paths + GLuint pathBase + GLint reference + GLuint mask + GLenum coverMode + GLenum transformType + const GLfloat *transformValues + + + void glStencilThenCoverStrokePathNV + GLuint path + GLint reference + GLuint mask + GLenum coverMode + + + void glStopInstrumentsSGIX + GLint marker + + + + void glStringMarkerGREMEDY + GLsizei len + const void *string + + + void glSubpixelPrecisionBiasNV + GLuint xbits + GLuint ybits + + + void glSwizzleEXT + GLuint res + GLuint in + GLenum outX + GLenum outY + GLenum outZ + GLenum outW + + + void glSyncTextureINTEL + GLuint texture + + + void glTagSampleBufferSGIX + + + + void glTangent3bEXT + GLbyte tx + GLbyte ty + GLbyte tz + + + + void glTangent3bvEXT + const GLbyte *v + + + void glTangent3dEXT + GLdouble tx + GLdouble ty + GLdouble tz + + + + void glTangent3dvEXT + const GLdouble *v + + + void glTangent3fEXT + GLfloat tx + GLfloat ty + GLfloat tz + + + + void glTangent3fvEXT + const GLfloat *v + + + void glTangent3iEXT + GLint tx + GLint ty + GLint tz + + + + void glTangent3ivEXT + const GLint *v + + + void glTangent3sEXT + GLshort tx + GLshort ty + GLshort tz + + + + void glTangent3svEXT + const GLshort *v + + + void glTangentPointerEXT + GLenum type + GLsizei stride + const void *pointer + + + void glTbufferMask3DFX + GLuint mask + + + void glTessellationFactorAMD + GLfloat factor + + + void glTessellationModeAMD + GLenum mode + + + GLboolean glTestFenceAPPLE + GLuint fence + + + GLboolean glTestFenceNV + GLuint fence + + + + GLboolean glTestObjectAPPLE + GLenum object + GLuint name + + + void glTexAttachMemoryNV + GLenum target + GLuint memory + GLuint64 offset + + + void glTexBuffer + GLenum target + GLenum internalformat + GLuint buffer + + + void glTexBufferARB + GLenum target + GLenum internalformat + GLuint buffer + + + + + void glTexBufferEXT + GLenum target + GLenum internalformat + GLuint buffer + + + + void glTexBufferOES + GLenum target + GLenum internalformat + GLuint buffer + + + + void glTexBufferRange + GLenum target + GLenum internalformat + GLuint buffer + GLintptr offset + GLsizeiptr size + + + void glTexBufferRangeEXT + GLenum target + GLenum internalformat + GLuint buffer + GLintptr offset + GLsizeiptr size + + + + void glTexBufferRangeOES + GLenum target + GLenum internalformat + GLuint buffer + GLintptr offset + GLsizeiptr size + + + + void glTexBumpParameterfvATI + GLenum pname + const GLfloat *param + + + void glTexBumpParameterivATI + GLenum pname + const GLint *param + + + void glTexCoord1bOES + GLbyte s + + + void glTexCoord1bvOES + const GLbyte *coords + + + void glTexCoord1d + GLdouble s + + + + void glTexCoord1dv + const GLdouble *v + + + + void glTexCoord1f + GLfloat s + + + + void glTexCoord1fv + const GLfloat *v + + + + void glTexCoord1hNV + GLhalfNV s + + + + void glTexCoord1hvNV + const GLhalfNV *v + + + + void glTexCoord1i + GLint s + + + + void glTexCoord1iv + const GLint *v + + + + void glTexCoord1s + GLshort s + + + + void glTexCoord1sv + const GLshort *v + + + + void glTexCoord1xOES + GLfixed s + + + void glTexCoord1xvOES + const GLfixed *coords + + + void glTexCoord2bOES + GLbyte s + GLbyte t + + + void glTexCoord2bvOES + const GLbyte *coords + + + void glTexCoord2d + GLdouble s + GLdouble t + + + + void glTexCoord2dv + const GLdouble *v + + + + void glTexCoord2f + GLfloat s + GLfloat t + + + + void glTexCoord2fColor3fVertex3fSUN + GLfloat s + GLfloat t + GLfloat r + GLfloat g + GLfloat b + GLfloat x + GLfloat y + GLfloat z + + + void glTexCoord2fColor3fVertex3fvSUN + const GLfloat *tc + const GLfloat *c + const GLfloat *v + + + void glTexCoord2fColor4fNormal3fVertex3fSUN + GLfloat s + GLfloat t + GLfloat r + GLfloat g + GLfloat b + GLfloat a + GLfloat nx + GLfloat ny + GLfloat nz + GLfloat x + GLfloat y + GLfloat z + + + void glTexCoord2fColor4fNormal3fVertex3fvSUN + const GLfloat *tc + const GLfloat *c + const GLfloat *n + const GLfloat *v + + + void glTexCoord2fColor4ubVertex3fSUN + GLfloat s + GLfloat t + GLubyte r + GLubyte g + GLubyte b + GLubyte a + GLfloat x + GLfloat y + GLfloat z + + + void glTexCoord2fColor4ubVertex3fvSUN + const GLfloat *tc + const GLubyte *c + const GLfloat *v + + + void glTexCoord2fNormal3fVertex3fSUN + GLfloat s + GLfloat t + GLfloat nx + GLfloat ny + GLfloat nz + GLfloat x + GLfloat y + GLfloat z + + + void glTexCoord2fNormal3fVertex3fvSUN + const GLfloat *tc + const GLfloat *n + const GLfloat *v + + + void glTexCoord2fVertex3fSUN + GLfloat s + GLfloat t + GLfloat x + GLfloat y + GLfloat z + + + void glTexCoord2fVertex3fvSUN + const GLfloat *tc + const GLfloat *v + + + void glTexCoord2fv + const GLfloat *v + + + + void glTexCoord2hNV + GLhalfNV s + GLhalfNV t + + + + void glTexCoord2hvNV + const GLhalfNV *v + + + + void glTexCoord2i + GLint s + GLint t + + + + void glTexCoord2iv + const GLint *v + + + + void glTexCoord2s + GLshort s + GLshort t + + + + void glTexCoord2sv + const GLshort *v + + + + void glTexCoord2xOES + GLfixed s + GLfixed t + + + void glTexCoord2xvOES + const GLfixed *coords + + + void glTexCoord3bOES + GLbyte s + GLbyte t + GLbyte r + + + void glTexCoord3bvOES + const GLbyte *coords + + + void glTexCoord3d + GLdouble s + GLdouble t + GLdouble r + + + + void glTexCoord3dv + const GLdouble *v + + + + void glTexCoord3f + GLfloat s + GLfloat t + GLfloat r + + + + void glTexCoord3fv + const GLfloat *v + + + + void glTexCoord3hNV + GLhalfNV s + GLhalfNV t + GLhalfNV r + + + + void glTexCoord3hvNV + const GLhalfNV *v + + + + void glTexCoord3i + GLint s + GLint t + GLint r + + + + void glTexCoord3iv + const GLint *v + + + + void glTexCoord3s + GLshort s + GLshort t + GLshort r + + + + void glTexCoord3sv + const GLshort *v + + + + void glTexCoord3xOES + GLfixed s + GLfixed t + GLfixed r + + + void glTexCoord3xvOES + const GLfixed *coords + + + void glTexCoord4bOES + GLbyte s + GLbyte t + GLbyte r + GLbyte q + + + void glTexCoord4bvOES + const GLbyte *coords + + + void glTexCoord4d + GLdouble s + GLdouble t + GLdouble r + GLdouble q + + + + void glTexCoord4dv + const GLdouble *v + + + + void glTexCoord4f + GLfloat s + GLfloat t + GLfloat r + GLfloat q + + + + void glTexCoord4fColor4fNormal3fVertex4fSUN + GLfloat s + GLfloat t + GLfloat p + GLfloat q + GLfloat r + GLfloat g + GLfloat b + GLfloat a + GLfloat nx + GLfloat ny + GLfloat nz + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + void glTexCoord4fColor4fNormal3fVertex4fvSUN + const GLfloat *tc + const GLfloat *c + const GLfloat *n + const GLfloat *v + + + void glTexCoord4fVertex4fSUN + GLfloat s + GLfloat t + GLfloat p + GLfloat q + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + void glTexCoord4fVertex4fvSUN + const GLfloat *tc + const GLfloat *v + + + void glTexCoord4fv + const GLfloat *v + + + + void glTexCoord4hNV + GLhalfNV s + GLhalfNV t + GLhalfNV r + GLhalfNV q + + + + void glTexCoord4hvNV + const GLhalfNV *v + + + + void glTexCoord4i + GLint s + GLint t + GLint r + GLint q + + + + void glTexCoord4iv + const GLint *v + + + + void glTexCoord4s + GLshort s + GLshort t + GLshort r + GLshort q + + + + void glTexCoord4sv + const GLshort *v + + + + void glTexCoord4xOES + GLfixed s + GLfixed t + GLfixed r + GLfixed q + + + void glTexCoord4xvOES + const GLfixed *coords + + + void glTexCoordFormatNV + GLint size + GLenum type + GLsizei stride + + + void glTexCoordP1ui + GLenum type + GLuint coords + + + void glTexCoordP1uiv + GLenum type + const GLuint *coords + + + void glTexCoordP2ui + GLenum type + GLuint coords + + + void glTexCoordP2uiv + GLenum type + const GLuint *coords + + + void glTexCoordP3ui + GLenum type + GLuint coords + + + void glTexCoordP3uiv + GLenum type + const GLuint *coords + + + void glTexCoordP4ui + GLenum type + GLuint coords + + + void glTexCoordP4uiv + GLenum type + const GLuint *coords + + + void glTexCoordPointer + GLint size + GLenum type + GLsizei stride + const void *pointer + + + void glTexCoordPointerEXT + GLint size + GLenum type + GLsizei stride + GLsizei count + const void *pointer + + + void glTexCoordPointerListIBM + GLint size + GLenum type + GLint stride + const void **pointer + GLint ptrstride + + + void glTexCoordPointervINTEL + GLint size + GLenum type + const void **pointer + + + void glTexEnvf + GLenum target + GLenum pname + GLfloat param + + + + void glTexEnvfv + GLenum target + GLenum pname + const GLfloat *params + + + + void glTexEnvi + GLenum target + GLenum pname + GLint param + + + + void glTexEnviv + GLenum target + GLenum pname + const GLint *params + + + + void glTexEnvx + GLenum target + GLenum pname + GLfixed param + + + void glTexEnvxOES + GLenum target + GLenum pname + GLfixed param + + + void glTexEnvxv + GLenum target + GLenum pname + const GLfixed *params + + + void glTexEnvxvOES + GLenum target + GLenum pname + const GLfixed *params + + + void glTexEstimateMotionQCOM + GLuint ref + GLuint target + GLuint output + + + void glTexEstimateMotionRegionsQCOM + GLuint ref + GLuint target + GLuint output + GLuint mask + + + void glExtrapolateTex2DQCOM + GLuint src1 + GLuint src2 + GLuint output + GLfloat scaleFactor + + + void glTexFilterFuncSGIS + GLenum target + GLenum filter + GLsizei n + const GLfloat *weights + + + + void glTexGend + GLenum coord + GLenum pname + GLdouble param + + + + void glTexGendv + GLenum coord + GLenum pname + const GLdouble *params + + + + void glTexGenf + GLenum coord + GLenum pname + GLfloat param + + + + void glTexGenfOES + GLenum coord + GLenum pname + GLfloat param + + + void glTexGenfv + GLenum coord + GLenum pname + const GLfloat *params + + + + void glTexGenfvOES + GLenum coord + GLenum pname + const GLfloat *params + + + void glTexGeni + GLenum coord + GLenum pname + GLint param + + + + void glTexGeniOES + GLenum coord + GLenum pname + GLint param + + + void glTexGeniv + GLenum coord + GLenum pname + const GLint *params + + + + void glTexGenivOES + GLenum coord + GLenum pname + const GLint *params + + + void glTexGenxOES + GLenum coord + GLenum pname + GLfixed param + + + void glTexGenxvOES + GLenum coord + GLenum pname + const GLfixed *params + + + void glTexImage1D + GLenum target + GLint level + GLint internalformat + GLsizei width + GLint border + GLenum format + GLenum type + const void *pixels + + + + + void glTexImage2D + GLenum target + GLint level + GLint internalformat + GLsizei width + GLsizei height + GLint border + GLenum format + GLenum type + const void *pixels + + + + + void glTexImage2DMultisample + GLenum target + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + GLboolean fixedsamplelocations + + + void glTexImage2DMultisampleCoverageNV + GLenum target + GLsizei coverageSamples + GLsizei colorSamples + GLint internalFormat + GLsizei width + GLsizei height + GLboolean fixedSampleLocations + + + void glTexImage3D + GLenum target + GLint level + GLint internalformat + GLsizei width + GLsizei height + GLsizei depth + GLint border + GLenum format + GLenum type + const void *pixels + + + + + void glTexImage3DEXT + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + GLint border + GLenum format + GLenum type + const void *pixels + + + + + void glTexImage3DMultisample + GLenum target + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + GLboolean fixedsamplelocations + + + void glTexImage3DMultisampleCoverageNV + GLenum target + GLsizei coverageSamples + GLsizei colorSamples + GLint internalFormat + GLsizei width + GLsizei height + GLsizei depth + GLboolean fixedSampleLocations + + + void glTexImage3DOES + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + GLint border + GLenum format + GLenum type + const void *pixels + + + void glTexImage4DSGIS + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + GLsizei size4d + GLint border + GLenum format + GLenum type + const void *pixels + + + + void glTexPageCommitmentARB + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLboolean commit + + + void glTexPageCommitmentEXT + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLboolean commit + + + + void glTexPageCommitmentMemNV + GLenum target + GLint layer + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLuint memory + GLuint64 offset + GLboolean commit + + + void glTexParameterIiv + GLenum target + GLenum pname + const GLint *params + + + + void glTexParameterIivEXT + GLenum target + GLenum pname + const GLint *params + + + + void glTexParameterIivOES + GLenum target + GLenum pname + const GLint *params + + + + void glTexParameterIuiv + GLenum target + GLenum pname + const GLuint *params + + + + void glTexParameterIuivEXT + GLenum target + GLenum pname + const GLuint *params + + + + void glTexParameterIuivOES + GLenum target + GLenum pname + const GLuint *params + + + + void glTexParameterf + GLenum target + GLenum pname + GLfloat param + + + + void glTexParameterfv + GLenum target + GLenum pname + const GLfloat *params + + + + void glTexParameteri + GLenum target + GLenum pname + GLint param + + + + void glTexParameteriv + GLenum target + GLenum pname + const GLint *params + + + + void glTexParameterx + GLenum target + GLenum pname + GLfixed param + + + void glTexParameterxOES + GLenum target + GLenum pname + GLfixed param + + + void glTexParameterxv + GLenum target + GLenum pname + const GLfixed *params + + + void glTexParameterxvOES + GLenum target + GLenum pname + const GLfixed *params + + + void glTexRenderbufferNV + GLenum target + GLuint renderbuffer + + + void glTexStorage1D + GLenum target + GLsizei levels + GLenum internalformat + GLsizei width + + + void glTexStorage1DEXT + GLenum target + GLsizei levels + GLenum internalformat + GLsizei width + + + + void glTexStorage2D + GLenum target + GLsizei levels + GLenum internalformat + GLsizei width + GLsizei height + + + void glTexStorage2DEXT + GLenum target + GLsizei levels + GLenum internalformat + GLsizei width + GLsizei height + + + + void glTexStorage2DMultisample + GLenum target + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + GLboolean fixedsamplelocations + + + void glTexStorage3D + GLenum target + GLsizei levels + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + + + void glTexStorage3DEXT + GLenum target + GLsizei levels + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + + + + void glTexStorage3DMultisample + GLenum target + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + GLboolean fixedsamplelocations + + + void glTexStorage3DMultisampleOES + GLenum target + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + GLboolean fixedsamplelocations + + + + void glTexStorageAttribs2DEXT + GLenum target + GLsizei levels + GLenum internalformat + GLsizei width + GLsizei height + const GLint* attrib_list + + + void glTexStorageAttribs3DEXT + GLenum target + GLsizei levels + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + const GLint* attrib_list + + + void glTexStorageMem1DEXT + GLenum target + GLsizei levels + GLenum internalFormat + GLsizei width + GLuint memory + GLuint64 offset + + + void glTexStorageMem2DEXT + GLenum target + GLsizei levels + GLenum internalFormat + GLsizei width + GLsizei height + GLuint memory + GLuint64 offset + + + void glTexStorageMem2DMultisampleEXT + GLenum target + GLsizei samples + GLenum internalFormat + GLsizei width + GLsizei height + GLboolean fixedSampleLocations + GLuint memory + GLuint64 offset + + + void glTexStorageMem3DEXT + GLenum target + GLsizei levels + GLenum internalFormat + GLsizei width + GLsizei height + GLsizei depth + GLuint memory + GLuint64 offset + + + void glTexStorageMem3DMultisampleEXT + GLenum target + GLsizei samples + GLenum internalFormat + GLsizei width + GLsizei height + GLsizei depth + GLboolean fixedSampleLocations + GLuint memory + GLuint64 offset + + + void glTexStorageSparseAMD + GLenum target + GLenum internalFormat + GLsizei width + GLsizei height + GLsizei depth + GLsizei layers + GLbitfield flags + + + void glTexSubImage1D + GLenum target + GLint level + GLint xoffset + GLsizei width + GLenum format + GLenum type + const void *pixels + + + + + void glTexSubImage1DEXT + GLenum target + GLint level + GLint xoffset + GLsizei width + GLenum format + GLenum type + const void *pixels + + + + + void glTexSubImage2D + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLsizei width + GLsizei height + GLenum format + GLenum type + const void *pixels + + + + + void glTexSubImage2DEXT + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLsizei width + GLsizei height + GLenum format + GLenum type + const void *pixels + + + + + void glTexSubImage3D + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLenum type + const void *pixels + + + + + void glTexSubImage3DEXT + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLenum type + const void *pixels + + + + + void glTexSubImage3DOES + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLenum type + const void *pixels + + + void glTexSubImage4DSGIS + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLint woffset + GLsizei width + GLsizei height + GLsizei depth + GLsizei size4d + GLenum format + GLenum type + const void *pixels + + + + void glTextureAttachMemoryNV + GLuint texture + GLuint memory + GLuint64 offset + + + void glTextureBarrier + + + void glTextureBarrierNV + + + + void glTextureBuffer + GLuint texture + GLenum internalformat + GLuint buffer + + + void glTextureBufferEXT + GLuint texture + GLenum target + GLenum internalformat + GLuint buffer + + + void glTextureBufferRange + GLuint texture + GLenum internalformat + GLuint buffer + GLintptr offset + GLsizeiptr size + + + void glTextureBufferRangeEXT + GLuint texture + GLenum target + GLenum internalformat + GLuint buffer + GLintptr offset + GLsizeiptr size + + + void glTextureColorMaskSGIS + GLboolean red + GLboolean green + GLboolean blue + GLboolean alpha + + + + void glTextureFoveationParametersQCOM + GLuint texture + GLuint layer + GLuint focalPoint + GLfloat focalX + GLfloat focalY + GLfloat gainX + GLfloat gainY + GLfloat foveaArea + + + void glTextureImage1DEXT + GLuint texture + GLenum target + GLint level + GLint internalformat + GLsizei width + GLint border + GLenum format + GLenum type + const void *pixels + + + void glTextureImage2DEXT + GLuint texture + GLenum target + GLint level + GLint internalformat + GLsizei width + GLsizei height + GLint border + GLenum format + GLenum type + const void *pixels + + + void glTextureImage2DMultisampleCoverageNV + GLuint texture + GLenum target + GLsizei coverageSamples + GLsizei colorSamples + GLint internalFormat + GLsizei width + GLsizei height + GLboolean fixedSampleLocations + + + void glTextureImage2DMultisampleNV + GLuint texture + GLenum target + GLsizei samples + GLint internalFormat + GLsizei width + GLsizei height + GLboolean fixedSampleLocations + + + void glTextureImage3DEXT + GLuint texture + GLenum target + GLint level + GLint internalformat + GLsizei width + GLsizei height + GLsizei depth + GLint border + GLenum format + GLenum type + const void *pixels + + + void glTextureImage3DMultisampleCoverageNV + GLuint texture + GLenum target + GLsizei coverageSamples + GLsizei colorSamples + GLint internalFormat + GLsizei width + GLsizei height + GLsizei depth + GLboolean fixedSampleLocations + + + void glTextureImage3DMultisampleNV + GLuint texture + GLenum target + GLsizei samples + GLint internalFormat + GLsizei width + GLsizei height + GLsizei depth + GLboolean fixedSampleLocations + + + void glTextureLightEXT + GLenum pname + + + void glTextureMaterialEXT + GLenum face + GLenum mode + + + void glTextureNormalEXT + GLenum mode + + + void glTexturePageCommitmentEXT + GLuint texture + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLboolean commit + + + void glTexturePageCommitmentMemNV + GLuint texture + GLint layer + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLuint memory + GLuint64 offset + GLboolean commit + + + void glTextureParameterIiv + GLuint texture + GLenum pname + const GLint *params + + + void glTextureParameterIivEXT + GLuint texture + GLenum target + GLenum pname + const GLint *params + + + void glTextureParameterIuiv + GLuint texture + GLenum pname + const GLuint *params + + + void glTextureParameterIuivEXT + GLuint texture + GLenum target + GLenum pname + const GLuint *params + + + void glTextureParameterf + GLuint texture + GLenum pname + GLfloat param + + + void glTextureParameterfEXT + GLuint texture + GLenum target + GLenum pname + GLfloat param + + + + void glTextureParameterfv + GLuint texture + GLenum pname + const GLfloat *param + + + void glTextureParameterfvEXT + GLuint texture + GLenum target + GLenum pname + const GLfloat *params + + + void glTextureParameteri + GLuint texture + GLenum pname + GLint param + + + void glTextureParameteriEXT + GLuint texture + GLenum target + GLenum pname + GLint param + + + + void glTextureParameteriv + GLuint texture + GLenum pname + const GLint *param + + + void glTextureParameterivEXT + GLuint texture + GLenum target + GLenum pname + const GLint *params + + + void glTextureRangeAPPLE + GLenum target + GLsizei length + const void *pointer + + + void glTextureRenderbufferEXT + GLuint texture + GLenum target + GLuint renderbuffer + + + void glTextureStorage1D + GLuint texture + GLsizei levels + GLenum internalformat + GLsizei width + + + void glTextureStorage1DEXT + GLuint texture + GLenum target + GLsizei levels + GLenum internalformat + GLsizei width + + + void glTextureStorage2D + GLuint texture + GLsizei levels + GLenum internalformat + GLsizei width + GLsizei height + + + void glTextureStorage2DEXT + GLuint texture + GLenum target + GLsizei levels + GLenum internalformat + GLsizei width + GLsizei height + + + void glTextureStorage2DMultisample + GLuint texture + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + GLboolean fixedsamplelocations + + + void glTextureStorage2DMultisampleEXT + GLuint texture + GLenum target + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + GLboolean fixedsamplelocations + + + void glTextureStorage3D + GLuint texture + GLsizei levels + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + + + void glTextureStorage3DEXT + GLuint texture + GLenum target + GLsizei levels + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + + + void glTextureStorage3DMultisample + GLuint texture + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + GLboolean fixedsamplelocations + + + void glTextureStorage3DMultisampleEXT + GLuint texture + GLenum target + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + GLboolean fixedsamplelocations + + + void glTextureStorageMem1DEXT + GLuint texture + GLsizei levels + GLenum internalFormat + GLsizei width + GLuint memory + GLuint64 offset + + + void glTextureStorageMem2DEXT + GLuint texture + GLsizei levels + GLenum internalFormat + GLsizei width + GLsizei height + GLuint memory + GLuint64 offset + + + void glTextureStorageMem2DMultisampleEXT + GLuint texture + GLsizei samples + GLenum internalFormat + GLsizei width + GLsizei height + GLboolean fixedSampleLocations + GLuint memory + GLuint64 offset + + + void glTextureStorageMem3DEXT + GLuint texture + GLsizei levels + GLenum internalFormat + GLsizei width + GLsizei height + GLsizei depth + GLuint memory + GLuint64 offset + + + void glTextureStorageMem3DMultisampleEXT + GLuint texture + GLsizei samples + GLenum internalFormat + GLsizei width + GLsizei height + GLsizei depth + GLboolean fixedSampleLocations + GLuint memory + GLuint64 offset + + + void glTextureStorageSparseAMD + GLuint texture + GLenum target + GLenum internalFormat + GLsizei width + GLsizei height + GLsizei depth + GLsizei layers + GLbitfield flags + + + void glTextureSubImage1D + GLuint texture + GLint level + GLint xoffset + GLsizei width + GLenum format + GLenum type + const void *pixels + + + void glTextureSubImage1DEXT + GLuint texture + GLenum target + GLint level + GLint xoffset + GLsizei width + GLenum format + GLenum type + const void *pixels + + + void glTextureSubImage2D + GLuint texture + GLint level + GLint xoffset + GLint yoffset + GLsizei width + GLsizei height + GLenum format + GLenum type + const void *pixels + + + void glTextureSubImage2DEXT + GLuint texture + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLsizei width + GLsizei height + GLenum format + GLenum type + const void *pixels + + + void glTextureSubImage3D + GLuint texture + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLenum type + const void *pixels + + + void glTextureSubImage3DEXT + GLuint texture + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLenum type + const void *pixels + + + void glTextureView + GLuint texture + GLenum target + GLuint origtexture + GLenum internalformat + GLuint minlevel + GLuint numlevels + GLuint minlayer + GLuint numlayers + + + void glTextureViewEXT + GLuint texture + GLenum target + GLuint origtexture + GLenum internalformat + GLuint minlevel + GLuint numlevels + GLuint minlayer + GLuint numlayers + + + + void glTextureViewOES + GLuint texture + GLenum target + GLuint origtexture + GLenum internalformat + GLuint minlevel + GLuint numlevels + GLuint minlayer + GLuint numlayers + + + + void glTrackMatrixNV + GLenum target + GLuint address + GLenum matrix + GLenum transform + + + + void glTransformFeedbackAttribsNV + GLsizei count + const GLint *attribs + GLenum bufferMode + + + void glTransformFeedbackBufferBase + GLuint xfb + GLuint index + GLuint buffer + + + void glTransformFeedbackBufferRange + GLuint xfb + GLuint index + GLuint buffer + GLintptr offset + GLsizeiptr size + + + void glTransformFeedbackStreamAttribsNV + GLsizei count + const GLint *attribs + GLsizei nbuffers + const GLint *bufstreams + GLenum bufferMode + + + void glTransformFeedbackVaryings + GLuint program + GLsizei count + const GLchar *const*varyings + GLenum bufferMode + + + + void glTransformFeedbackVaryingsEXT + GLuint program + GLsizei count + const GLchar *const*varyings + GLenum bufferMode + + + + void glTransformFeedbackVaryingsNV + GLuint program + GLsizei count + const GLint *locations + GLenum bufferMode + + + void glTransformPathNV + GLuint resultPath + GLuint srcPath + GLenum transformType + const GLfloat *transformValues + + + void glTranslated + GLdouble x + GLdouble y + GLdouble z + + + + void glTranslatef + GLfloat x + GLfloat y + GLfloat z + + + + void glTranslatex + GLfixed x + GLfixed y + GLfixed z + + + void glTranslatexOES + GLfixed x + GLfixed y + GLfixed z + + + void glUniform1d + GLint location + GLdouble x + + + void glUniform1dv + GLint location + GLsizei count + const GLdouble *value + + + void glUniform1f + GLint location + GLfloat v0 + + + void glUniform1fARB + GLint location + GLfloat v0 + + + + void glUniform1fv + GLint location + GLsizei count + const GLfloat *value + + + void glUniform1fvARB + GLint location + GLsizei count + const GLfloat *value + + + + void glUniform1i + GLint location + GLint v0 + + + void glUniform1i64ARB + GLint location + GLint64 x + + + void glUniform1i64NV + GLint location + GLint64EXT x + + + void glUniform1i64vARB + GLint location + GLsizei count + const GLint64 *value + + + void glUniform1i64vNV + GLint location + GLsizei count + const GLint64EXT *value + + + void glUniform1iARB + GLint location + GLint v0 + + + + void glUniform1iv + GLint location + GLsizei count + const GLint *value + + + void glUniform1ivARB + GLint location + GLsizei count + const GLint *value + + + + void glUniform1ui + GLint location + GLuint v0 + + + void glUniform1ui64ARB + GLint location + GLuint64 x + + + void glUniform1ui64NV + GLint location + GLuint64EXT x + + + void glUniform1ui64vARB + GLint location + GLsizei count + const GLuint64 *value + + + void glUniform1ui64vNV + GLint location + GLsizei count + const GLuint64EXT *value + + + void glUniform1uiEXT + GLint location + GLuint v0 + + + + void glUniform1uiv + GLint location + GLsizei count + const GLuint *value + + + void glUniform1uivEXT + GLint location + GLsizei count + const GLuint *value + + + + void glUniform2d + GLint location + GLdouble x + GLdouble y + + + void glUniform2dv + GLint location + GLsizei count + const GLdouble *value + + + void glUniform2f + GLint location + GLfloat v0 + GLfloat v1 + + + void glUniform2fARB + GLint location + GLfloat v0 + GLfloat v1 + + + + void glUniform2fv + GLint location + GLsizei count + const GLfloat *value + + + void glUniform2fvARB + GLint location + GLsizei count + const GLfloat *value + + + + void glUniform2i + GLint location + GLint v0 + GLint v1 + + + void glUniform2i64ARB + GLint location + GLint64 x + GLint64 y + + + void glUniform2i64NV + GLint location + GLint64EXT x + GLint64EXT y + + + void glUniform2i64vARB + GLint location + GLsizei count + const GLint64 *value + + + void glUniform2i64vNV + GLint location + GLsizei count + const GLint64EXT *value + + + void glUniform2iARB + GLint location + GLint v0 + GLint v1 + + + + void glUniform2iv + GLint location + GLsizei count + const GLint *value + + + void glUniform2ivARB + GLint location + GLsizei count + const GLint *value + + + + void glUniform2ui + GLint location + GLuint v0 + GLuint v1 + + + void glUniform2ui64ARB + GLint location + GLuint64 x + GLuint64 y + + + void glUniform2ui64NV + GLint location + GLuint64EXT x + GLuint64EXT y + + + void glUniform2ui64vARB + GLint location + GLsizei count + const GLuint64 *value + + + void glUniform2ui64vNV + GLint location + GLsizei count + const GLuint64EXT *value + + + void glUniform2uiEXT + GLint location + GLuint v0 + GLuint v1 + + + + void glUniform2uiv + GLint location + GLsizei count + const GLuint *value + + + void glUniform2uivEXT + GLint location + GLsizei count + const GLuint *value + + + + void glUniform3d + GLint location + GLdouble x + GLdouble y + GLdouble z + + + void glUniform3dv + GLint location + GLsizei count + const GLdouble *value + + + void glUniform3f + GLint location + GLfloat v0 + GLfloat v1 + GLfloat v2 + + + void glUniform3fARB + GLint location + GLfloat v0 + GLfloat v1 + GLfloat v2 + + + + void glUniform3fv + GLint location + GLsizei count + const GLfloat *value + + + void glUniform3fvARB + GLint location + GLsizei count + const GLfloat *value + + + + void glUniform3i + GLint location + GLint v0 + GLint v1 + GLint v2 + + + void glUniform3i64ARB + GLint location + GLint64 x + GLint64 y + GLint64 z + + + void glUniform3i64NV + GLint location + GLint64EXT x + GLint64EXT y + GLint64EXT z + + + void glUniform3i64vARB + GLint location + GLsizei count + const GLint64 *value + + + void glUniform3i64vNV + GLint location + GLsizei count + const GLint64EXT *value + + + void glUniform3iARB + GLint location + GLint v0 + GLint v1 + GLint v2 + + + + void glUniform3iv + GLint location + GLsizei count + const GLint *value + + + void glUniform3ivARB + GLint location + GLsizei count + const GLint *value + + + + void glUniform3ui + GLint location + GLuint v0 + GLuint v1 + GLuint v2 + + + void glUniform3ui64ARB + GLint location + GLuint64 x + GLuint64 y + GLuint64 z + + + void glUniform3ui64NV + GLint location + GLuint64EXT x + GLuint64EXT y + GLuint64EXT z + + + void glUniform3ui64vARB + GLint location + GLsizei count + const GLuint64 *value + + + void glUniform3ui64vNV + GLint location + GLsizei count + const GLuint64EXT *value + + + void glUniform3uiEXT + GLint location + GLuint v0 + GLuint v1 + GLuint v2 + + + + void glUniform3uiv + GLint location + GLsizei count + const GLuint *value + + + void glUniform3uivEXT + GLint location + GLsizei count + const GLuint *value + + + + void glUniform4d + GLint location + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + void glUniform4dv + GLint location + GLsizei count + const GLdouble *value + + + void glUniform4f + GLint location + GLfloat v0 + GLfloat v1 + GLfloat v2 + GLfloat v3 + + + void glUniform4fARB + GLint location + GLfloat v0 + GLfloat v1 + GLfloat v2 + GLfloat v3 + + + + void glUniform4fv + GLint location + GLsizei count + const GLfloat *value + + + void glUniform4fvARB + GLint location + GLsizei count + const GLfloat *value + + + + void glUniform4i + GLint location + GLint v0 + GLint v1 + GLint v2 + GLint v3 + + + void glUniform4i64ARB + GLint location + GLint64 x + GLint64 y + GLint64 z + GLint64 w + + + void glUniform4i64NV + GLint location + GLint64EXT x + GLint64EXT y + GLint64EXT z + GLint64EXT w + + + void glUniform4i64vARB + GLint location + GLsizei count + const GLint64 *value + + + void glUniform4i64vNV + GLint location + GLsizei count + const GLint64EXT *value + + + void glUniform4iARB + GLint location + GLint v0 + GLint v1 + GLint v2 + GLint v3 + + + + void glUniform4iv + GLint location + GLsizei count + const GLint *value + + + void glUniform4ivARB + GLint location + GLsizei count + const GLint *value + + + + void glUniform4ui + GLint location + GLuint v0 + GLuint v1 + GLuint v2 + GLuint v3 + + + void glUniform4ui64ARB + GLint location + GLuint64 x + GLuint64 y + GLuint64 z + GLuint64 w + + + void glUniform4ui64NV + GLint location + GLuint64EXT x + GLuint64EXT y + GLuint64EXT z + GLuint64EXT w + + + void glUniform4ui64vARB + GLint location + GLsizei count + const GLuint64 *value + + + void glUniform4ui64vNV + GLint location + GLsizei count + const GLuint64EXT *value + + + void glUniform4uiEXT + GLint location + GLuint v0 + GLuint v1 + GLuint v2 + GLuint v3 + + + + void glUniform4uiv + GLint location + GLsizei count + const GLuint *value + + + void glUniform4uivEXT + GLint location + GLsizei count + const GLuint *value + + + + void glUniformBlockBinding + GLuint program + GLuint uniformBlockIndex + GLuint uniformBlockBinding + + + + void glUniformBufferEXT + GLuint program + GLint location + GLuint buffer + + + void glUniformHandleui64ARB + GLint location + GLuint64 value + + + void glUniformHandleui64IMG + GLint location + GLuint64 value + + + + void glUniformHandleui64NV + GLint location + GLuint64 value + + + void glUniformHandleui64vARB + GLint location + GLsizei count + const GLuint64 *value + + + void glUniformHandleui64vIMG + GLint location + GLsizei count + const GLuint64 *value + + + + void glUniformHandleui64vNV + GLint location + GLsizei count + const GLuint64 *value + + + void glUniformMatrix2dv + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glUniformMatrix2fv + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + void glUniformMatrix2fvARB + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix2x3dv + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glUniformMatrix2x3fv + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix2x3fvNV + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix2x4dv + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glUniformMatrix2x4fv + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix2x4fvNV + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix3dv + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glUniformMatrix3fv + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + void glUniformMatrix3fvARB + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix3x2dv + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glUniformMatrix3x2fv + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix3x2fvNV + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix3x4dv + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glUniformMatrix3x4fv + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix3x4fvNV + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix4dv + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glUniformMatrix4fv + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + void glUniformMatrix4fvARB + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix4x2dv + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glUniformMatrix4x2fv + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix4x2fvNV + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix4x3dv + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glUniformMatrix4x3fv + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix4x3fvNV + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformSubroutinesuiv + GLenum shadertype + GLsizei count + const GLuint *indices + + + void glUniformui64NV + GLint location + GLuint64EXT value + + + void glUniformui64vNV + GLint location + GLsizei count + const GLuint64EXT *value + + + void glUnlockArraysEXT + + + GLboolean glUnmapBuffer + GLenum target + + + GLboolean glUnmapBufferARB + GLenum target + + + + GLboolean glUnmapBufferOES + GLenum target + + + + GLboolean glUnmapNamedBuffer + GLuint buffer + + + GLboolean glUnmapNamedBufferEXT + GLuint buffer + + + void glUnmapObjectBufferATI + GLuint buffer + + + void glUnmapTexture2DINTEL + GLuint texture + GLint level + + + void glUpdateObjectBufferATI + GLuint buffer + GLuint offset + GLsizei size + const void *pointer + GLenum preserve + + + void glUploadGpuMaskNVX + GLbitfield mask + + + void glUseProgram + GLuint program + + + void glUseProgramObjectARB + GLhandleARB programObj + + + + void glUseProgramStages + GLuint pipeline + GLbitfield stages + GLuint program + + + void glUseProgramStagesEXT + GLuint pipeline + GLbitfield stages + GLuint program + + + void glUseShaderProgramEXT + GLenum type + GLuint program + + + void glVDPAUFiniNV + + + void glVDPAUGetSurfaceivNV + GLvdpauSurfaceNV surface + GLenum pname + GLsizei count + GLsizei *length + GLint *values + + + void glVDPAUInitNV + const void *vdpDevice + const void *getProcAddress + + + GLboolean glVDPAUIsSurfaceNV + GLvdpauSurfaceNV surface + + + void glVDPAUMapSurfacesNV + GLsizei numSurfaces + const GLvdpauSurfaceNV *surfaces + + + GLvdpauSurfaceNV glVDPAURegisterOutputSurfaceNV + const void *vdpSurface + GLenum target + GLsizei numTextureNames + const GLuint *textureNames + + + GLvdpauSurfaceNV glVDPAURegisterVideoSurfaceNV + const void *vdpSurface + GLenum target + GLsizei numTextureNames + const GLuint *textureNames + + + GLvdpauSurfaceNV glVDPAURegisterVideoSurfaceWithPictureStructureNV + const void *vdpSurface + GLenum target + GLsizei numTextureNames + const GLuint *textureNames + GLboolean isFrameStructure + + + void glVDPAUSurfaceAccessNV + GLvdpauSurfaceNV surface + GLenum access + + + void glVDPAUUnmapSurfacesNV + GLsizei numSurface + const GLvdpauSurfaceNV *surfaces + + + void glVDPAUUnregisterSurfaceNV + GLvdpauSurfaceNV surface + + + void glValidateProgram + GLuint program + + + void glValidateProgramARB + GLhandleARB programObj + + + + void glValidateProgramPipeline + GLuint pipeline + + + void glValidateProgramPipelineEXT + GLuint pipeline + + + void glVariantArrayObjectATI + GLuint id + GLenum type + GLsizei stride + GLuint buffer + GLuint offset + + + void glVariantPointerEXT + GLuint id + GLenum type + GLuint stride + const void *addr + + + void glVariantbvEXT + GLuint id + const GLbyte *addr + + + void glVariantdvEXT + GLuint id + const GLdouble *addr + + + void glVariantfvEXT + GLuint id + const GLfloat *addr + + + void glVariantivEXT + GLuint id + const GLint *addr + + + void glVariantsvEXT + GLuint id + const GLshort *addr + + + void glVariantubvEXT + GLuint id + const GLubyte *addr + + + void glVariantuivEXT + GLuint id + const GLuint *addr + + + void glVariantusvEXT + GLuint id + const GLushort *addr + + + void glVertex2bOES + GLbyte x + GLbyte y + + + void glVertex2bvOES + const GLbyte *coords + + + void glVertex2d + GLdouble x + GLdouble y + + + + void glVertex2dv + const GLdouble *v + + + + void glVertex2f + GLfloat x + GLfloat y + + + + void glVertex2fv + const GLfloat *v + + + + void glVertex2hNV + GLhalfNV x + GLhalfNV y + + + + void glVertex2hvNV + const GLhalfNV *v + + + + void glVertex2i + GLint x + GLint y + + + + void glVertex2iv + const GLint *v + + + + void glVertex2s + GLshort x + GLshort y + + + + void glVertex2sv + const GLshort *v + + + + void glVertex2xOES + GLfixed x + + + void glVertex2xvOES + const GLfixed *coords + + + void glVertex3bOES + GLbyte x + GLbyte y + GLbyte z + + + void glVertex3bvOES + const GLbyte *coords + + + void glVertex3d + GLdouble x + GLdouble y + GLdouble z + + + + void glVertex3dv + const GLdouble *v + + + + void glVertex3f + GLfloat x + GLfloat y + GLfloat z + + + + void glVertex3fv + const GLfloat *v + + + + void glVertex3hNV + GLhalfNV x + GLhalfNV y + GLhalfNV z + + + + void glVertex3hvNV + const GLhalfNV *v + + + + void glVertex3i + GLint x + GLint y + GLint z + + + + void glVertex3iv + const GLint *v + + + + void glVertex3s + GLshort x + GLshort y + GLshort z + + + + void glVertex3sv + const GLshort *v + + + + void glVertex3xOES + GLfixed x + GLfixed y + + + void glVertex3xvOES + const GLfixed *coords + + + void glVertex4bOES + GLbyte x + GLbyte y + GLbyte z + GLbyte w + + + void glVertex4bvOES + const GLbyte *coords + + + void glVertex4d + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + + void glVertex4dv + const GLdouble *v + + + + void glVertex4f + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + + void glVertex4fv + const GLfloat *v + + + + void glVertex4hNV + GLhalfNV x + GLhalfNV y + GLhalfNV z + GLhalfNV w + + + + void glVertex4hvNV + const GLhalfNV *v + + + + void glVertex4i + GLint x + GLint y + GLint z + GLint w + + + + void glVertex4iv + const GLint *v + + + + void glVertex4s + GLshort x + GLshort y + GLshort z + GLshort w + + + + void glVertex4sv + const GLshort *v + + + + void glVertex4xOES + GLfixed x + GLfixed y + GLfixed z + + + void glVertex4xvOES + const GLfixed *coords + + + void glVertexArrayAttribBinding + GLuint vaobj + GLuint attribindex + GLuint bindingindex + + + void glVertexArrayAttribFormat + GLuint vaobj + GLuint attribindex + GLint size + GLenum type + GLboolean normalized + GLuint relativeoffset + + + void glVertexArrayAttribIFormat + GLuint vaobj + GLuint attribindex + GLint size + GLenum type + GLuint relativeoffset + + + void glVertexArrayAttribLFormat + GLuint vaobj + GLuint attribindex + GLint size + GLenum type + GLuint relativeoffset + + + void glVertexArrayBindVertexBufferEXT + GLuint vaobj + GLuint bindingindex + GLuint buffer + GLintptr offset + GLsizei stride + + + void glVertexArrayBindingDivisor + GLuint vaobj + GLuint bindingindex + GLuint divisor + + + void glVertexArrayColorOffsetEXT + GLuint vaobj + GLuint buffer + GLint size + GLenum type + GLsizei stride + GLintptr offset + + + void glVertexArrayEdgeFlagOffsetEXT + GLuint vaobj + GLuint buffer + GLsizei stride + GLintptr offset + + + void glVertexArrayElementBuffer + GLuint vaobj + GLuint buffer + + + void glVertexArrayFogCoordOffsetEXT + GLuint vaobj + GLuint buffer + GLenum type + GLsizei stride + GLintptr offset + + + void glVertexArrayIndexOffsetEXT + GLuint vaobj + GLuint buffer + GLenum type + GLsizei stride + GLintptr offset + + + void glVertexArrayMultiTexCoordOffsetEXT + GLuint vaobj + GLuint buffer + GLenum texunit + GLint size + GLenum type + GLsizei stride + GLintptr offset + + + void glVertexArrayNormalOffsetEXT + GLuint vaobj + GLuint buffer + GLenum type + GLsizei stride + GLintptr offset + + + void glVertexArrayParameteriAPPLE + GLenum pname + GLint param + + + void glVertexArrayRangeAPPLE + GLsizei length + void *pointer + + + void glVertexArrayRangeNV + GLsizei length + const void *pointer + + + void glVertexArraySecondaryColorOffsetEXT + GLuint vaobj + GLuint buffer + GLint size + GLenum type + GLsizei stride + GLintptr offset + + + void glVertexArrayTexCoordOffsetEXT + GLuint vaobj + GLuint buffer + GLint size + GLenum type + GLsizei stride + GLintptr offset + + + void glVertexArrayVertexAttribBindingEXT + GLuint vaobj + GLuint attribindex + GLuint bindingindex + + + void glVertexArrayVertexAttribDivisorEXT + GLuint vaobj + GLuint index + GLuint divisor + + + void glVertexArrayVertexAttribFormatEXT + GLuint vaobj + GLuint attribindex + GLint size + GLenum type + GLboolean normalized + GLuint relativeoffset + + + void glVertexArrayVertexAttribIFormatEXT + GLuint vaobj + GLuint attribindex + GLint size + GLenum type + GLuint relativeoffset + + + void glVertexArrayVertexAttribIOffsetEXT + GLuint vaobj + GLuint buffer + GLuint index + GLint size + GLenum type + GLsizei stride + GLintptr offset + + + void glVertexArrayVertexAttribLFormatEXT + GLuint vaobj + GLuint attribindex + GLint size + GLenum type + GLuint relativeoffset + + + void glVertexArrayVertexAttribLOffsetEXT + GLuint vaobj + GLuint buffer + GLuint index + GLint size + GLenum type + GLsizei stride + GLintptr offset + + + void glVertexArrayVertexAttribOffsetEXT + GLuint vaobj + GLuint buffer + GLuint index + GLint size + GLenum type + GLboolean normalized + GLsizei stride + GLintptr offset + + + void glVertexArrayVertexBindingDivisorEXT + GLuint vaobj + GLuint bindingindex + GLuint divisor + + + void glVertexArrayVertexBuffer + GLuint vaobj + GLuint bindingindex + GLuint buffer + GLintptr offset + GLsizei stride + + + void glVertexArrayVertexBuffers + GLuint vaobj + GLuint first + GLsizei count + const GLuint *buffers + const GLintptr *offsets + const GLsizei *strides + + + void glVertexArrayVertexOffsetEXT + GLuint vaobj + GLuint buffer + GLint size + GLenum type + GLsizei stride + GLintptr offset + + + void glVertexAttrib1d + GLuint index + GLdouble x + + + + void glVertexAttrib1dARB + GLuint index + GLdouble x + + + + + void glVertexAttrib1dNV + GLuint index + GLdouble x + + + + + void glVertexAttrib1dv + GLuint index + const GLdouble *v + + + + void glVertexAttrib1dvARB + GLuint index + const GLdouble *v + + + + + void glVertexAttrib1dvNV + GLuint index + const GLdouble *v + + + + + void glVertexAttrib1f + GLuint index + GLfloat x + + + + void glVertexAttrib1fARB + GLuint index + GLfloat x + + + + + void glVertexAttrib1fNV + GLuint index + GLfloat x + + + + + void glVertexAttrib1fv + GLuint index + const GLfloat *v + + + + void glVertexAttrib1fvARB + GLuint index + const GLfloat *v + + + + + void glVertexAttrib1fvNV + GLuint index + const GLfloat *v + + + + + void glVertexAttrib1hNV + GLuint index + GLhalfNV x + + + + void glVertexAttrib1hvNV + GLuint index + const GLhalfNV *v + + + + void glVertexAttrib1s + GLuint index + GLshort x + + + + void glVertexAttrib1sARB + GLuint index + GLshort x + + + + + void glVertexAttrib1sNV + GLuint index + GLshort x + + + + + void glVertexAttrib1sv + GLuint index + const GLshort *v + + + + void glVertexAttrib1svARB + GLuint index + const GLshort *v + + + + + void glVertexAttrib1svNV + GLuint index + const GLshort *v + + + + + void glVertexAttrib2d + GLuint index + GLdouble x + GLdouble y + + + + void glVertexAttrib2dARB + GLuint index + GLdouble x + GLdouble y + + + + + void glVertexAttrib2dNV + GLuint index + GLdouble x + GLdouble y + + + + + void glVertexAttrib2dv + GLuint index + const GLdouble *v + + + + void glVertexAttrib2dvARB + GLuint index + const GLdouble *v + + + + + void glVertexAttrib2dvNV + GLuint index + const GLdouble *v + + + + + void glVertexAttrib2f + GLuint index + GLfloat x + GLfloat y + + + + void glVertexAttrib2fARB + GLuint index + GLfloat x + GLfloat y + + + + + void glVertexAttrib2fNV + GLuint index + GLfloat x + GLfloat y + + + + + void glVertexAttrib2fv + GLuint index + const GLfloat *v + + + + void glVertexAttrib2fvARB + GLuint index + const GLfloat *v + + + + + void glVertexAttrib2fvNV + GLuint index + const GLfloat *v + + + + + void glVertexAttrib2hNV + GLuint index + GLhalfNV x + GLhalfNV y + + + + void glVertexAttrib2hvNV + GLuint index + const GLhalfNV *v + + + + void glVertexAttrib2s + GLuint index + GLshort x + GLshort y + + + + void glVertexAttrib2sARB + GLuint index + GLshort x + GLshort y + + + + + void glVertexAttrib2sNV + GLuint index + GLshort x + GLshort y + + + + + void glVertexAttrib2sv + GLuint index + const GLshort *v + + + + void glVertexAttrib2svARB + GLuint index + const GLshort *v + + + + + void glVertexAttrib2svNV + GLuint index + const GLshort *v + + + + + void glVertexAttrib3d + GLuint index + GLdouble x + GLdouble y + GLdouble z + + + + void glVertexAttrib3dARB + GLuint index + GLdouble x + GLdouble y + GLdouble z + + + + + void glVertexAttrib3dNV + GLuint index + GLdouble x + GLdouble y + GLdouble z + + + + + void glVertexAttrib3dv + GLuint index + const GLdouble *v + + + + void glVertexAttrib3dvARB + GLuint index + const GLdouble *v + + + + + void glVertexAttrib3dvNV + GLuint index + const GLdouble *v + + + + + void glVertexAttrib3f + GLuint index + GLfloat x + GLfloat y + GLfloat z + + + + void glVertexAttrib3fARB + GLuint index + GLfloat x + GLfloat y + GLfloat z + + + + + void glVertexAttrib3fNV + GLuint index + GLfloat x + GLfloat y + GLfloat z + + + + + void glVertexAttrib3fv + GLuint index + const GLfloat *v + + + + void glVertexAttrib3fvARB + GLuint index + const GLfloat *v + + + + + void glVertexAttrib3fvNV + GLuint index + const GLfloat *v + + + + + void glVertexAttrib3hNV + GLuint index + GLhalfNV x + GLhalfNV y + GLhalfNV z + + + + void glVertexAttrib3hvNV + GLuint index + const GLhalfNV *v + + + + void glVertexAttrib3s + GLuint index + GLshort x + GLshort y + GLshort z + + + + void glVertexAttrib3sARB + GLuint index + GLshort x + GLshort y + GLshort z + + + + + void glVertexAttrib3sNV + GLuint index + GLshort x + GLshort y + GLshort z + + + + + void glVertexAttrib3sv + GLuint index + const GLshort *v + + + + void glVertexAttrib3svARB + GLuint index + const GLshort *v + + + + + void glVertexAttrib3svNV + GLuint index + const GLshort *v + + + + + void glVertexAttrib4Nbv + GLuint index + const GLbyte *v + + + void glVertexAttrib4NbvARB + GLuint index + const GLbyte *v + + + + void glVertexAttrib4Niv + GLuint index + const GLint *v + + + void glVertexAttrib4NivARB + GLuint index + const GLint *v + + + + void glVertexAttrib4Nsv + GLuint index + const GLshort *v + + + void glVertexAttrib4NsvARB + GLuint index + const GLshort *v + + + + void glVertexAttrib4Nub + GLuint index + GLubyte x + GLubyte y + GLubyte z + GLubyte w + + + void glVertexAttrib4NubARB + GLuint index + GLubyte x + GLubyte y + GLubyte z + GLubyte w + + + + void glVertexAttrib4Nubv + GLuint index + const GLubyte *v + + + + void glVertexAttrib4NubvARB + GLuint index + const GLubyte *v + + + + + void glVertexAttrib4Nuiv + GLuint index + const GLuint *v + + + void glVertexAttrib4NuivARB + GLuint index + const GLuint *v + + + + void glVertexAttrib4Nusv + GLuint index + const GLushort *v + + + void glVertexAttrib4NusvARB + GLuint index + const GLushort *v + + + + void glVertexAttrib4bv + GLuint index + const GLbyte *v + + + void glVertexAttrib4bvARB + GLuint index + const GLbyte *v + + + + void glVertexAttrib4d + GLuint index + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + + void glVertexAttrib4dARB + GLuint index + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + + + void glVertexAttrib4dNV + GLuint index + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + + + void glVertexAttrib4dv + GLuint index + const GLdouble *v + + + + void glVertexAttrib4dvARB + GLuint index + const GLdouble *v + + + + + void glVertexAttrib4dvNV + GLuint index + const GLdouble *v + + + + + void glVertexAttrib4f + GLuint index + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + + void glVertexAttrib4fARB + GLuint index + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + + + void glVertexAttrib4fNV + GLuint index + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + + + void glVertexAttrib4fv + GLuint index + const GLfloat *v + + + + void glVertexAttrib4fvARB + GLuint index + const GLfloat *v + + + + + void glVertexAttrib4fvNV + GLuint index + const GLfloat *v + + + + + void glVertexAttrib4hNV + GLuint index + GLhalfNV x + GLhalfNV y + GLhalfNV z + GLhalfNV w + + + + void glVertexAttrib4hvNV + GLuint index + const GLhalfNV *v + + + + void glVertexAttrib4iv + GLuint index + const GLint *v + + + void glVertexAttrib4ivARB + GLuint index + const GLint *v + + + + void glVertexAttrib4s + GLuint index + GLshort x + GLshort y + GLshort z + GLshort w + + + + void glVertexAttrib4sARB + GLuint index + GLshort x + GLshort y + GLshort z + GLshort w + + + + + void glVertexAttrib4sNV + GLuint index + GLshort x + GLshort y + GLshort z + GLshort w + + + + + void glVertexAttrib4sv + GLuint index + const GLshort *v + + + + void glVertexAttrib4svARB + GLuint index + const GLshort *v + + + + + void glVertexAttrib4svNV + GLuint index + const GLshort *v + + + + + void glVertexAttrib4ubNV + GLuint index + GLubyte x + GLubyte y + GLubyte z + GLubyte w + + + + + void glVertexAttrib4ubv + GLuint index + const GLubyte *v + + + void glVertexAttrib4ubvARB + GLuint index + const GLubyte *v + + + + void glVertexAttrib4ubvNV + GLuint index + const GLubyte *v + + + + + void glVertexAttrib4uiv + GLuint index + const GLuint *v + + + void glVertexAttrib4uivARB + GLuint index + const GLuint *v + + + + void glVertexAttrib4usv + GLuint index + const GLushort *v + + + void glVertexAttrib4usvARB + GLuint index + const GLushort *v + + + + void glVertexAttribArrayObjectATI + GLuint index + GLint size + GLenum type + GLboolean normalized + GLsizei stride + GLuint buffer + GLuint offset + + + void glVertexAttribBinding + GLuint attribindex + GLuint bindingindex + + + void glVertexAttribDivisor + GLuint index + GLuint divisor + + + void glVertexAttribDivisorANGLE + GLuint index + GLuint divisor + + + + void glVertexAttribDivisorARB + GLuint index + GLuint divisor + + + + void glVertexAttribDivisorEXT + GLuint index + GLuint divisor + + + + void glVertexAttribDivisorNV + GLuint index + GLuint divisor + + + + void glVertexAttribFormat + GLuint attribindex + GLint size + GLenum type + GLboolean normalized + GLuint relativeoffset + + + void glVertexAttribFormatNV + GLuint index + GLint size + GLenum type + GLboolean normalized + GLsizei stride + + + void glVertexAttribI1i + GLuint index + GLint x + + + + void glVertexAttribI1iEXT + GLuint index + GLint x + + + + + void glVertexAttribI1iv + GLuint index + const GLint *v + + + void glVertexAttribI1ivEXT + GLuint index + const GLint *v + + + + void glVertexAttribI1ui + GLuint index + GLuint x + + + + void glVertexAttribI1uiEXT + GLuint index + GLuint x + + + + + void glVertexAttribI1uiv + GLuint index + const GLuint *v + + + void glVertexAttribI1uivEXT + GLuint index + const GLuint *v + + + + void glVertexAttribI2i + GLuint index + GLint x + GLint y + + + + void glVertexAttribI2iEXT + GLuint index + GLint x + GLint y + + + + + void glVertexAttribI2iv + GLuint index + const GLint *v + + + void glVertexAttribI2ivEXT + GLuint index + const GLint *v + + + + void glVertexAttribI2ui + GLuint index + GLuint x + GLuint y + + + + void glVertexAttribI2uiEXT + GLuint index + GLuint x + GLuint y + + + + + void glVertexAttribI2uiv + GLuint index + const GLuint *v + + + void glVertexAttribI2uivEXT + GLuint index + const GLuint *v + + + + void glVertexAttribI3i + GLuint index + GLint x + GLint y + GLint z + + + + void glVertexAttribI3iEXT + GLuint index + GLint x + GLint y + GLint z + + + + + void glVertexAttribI3iv + GLuint index + const GLint *v + + + void glVertexAttribI3ivEXT + GLuint index + const GLint *v + + + + void glVertexAttribI3ui + GLuint index + GLuint x + GLuint y + GLuint z + + + + void glVertexAttribI3uiEXT + GLuint index + GLuint x + GLuint y + GLuint z + + + + + void glVertexAttribI3uiv + GLuint index + const GLuint *v + + + void glVertexAttribI3uivEXT + GLuint index + const GLuint *v + + + + void glVertexAttribI4bv + GLuint index + const GLbyte *v + + + void glVertexAttribI4bvEXT + GLuint index + const GLbyte *v + + + + void glVertexAttribI4i + GLuint index + GLint x + GLint y + GLint z + GLint w + + + + void glVertexAttribI4iEXT + GLuint index + GLint x + GLint y + GLint z + GLint w + + + + + void glVertexAttribI4iv + GLuint index + const GLint *v + + + void glVertexAttribI4ivEXT + GLuint index + const GLint *v + + + + void glVertexAttribI4sv + GLuint index + const GLshort *v + + + void glVertexAttribI4svEXT + GLuint index + const GLshort *v + + + + void glVertexAttribI4ubv + GLuint index + const GLubyte *v + + + void glVertexAttribI4ubvEXT + GLuint index + const GLubyte *v + + + + void glVertexAttribI4ui + GLuint index + GLuint x + GLuint y + GLuint z + GLuint w + + + + void glVertexAttribI4uiEXT + GLuint index + GLuint x + GLuint y + GLuint z + GLuint w + + + + + void glVertexAttribI4uiv + GLuint index + const GLuint *v + + + void glVertexAttribI4uivEXT + GLuint index + const GLuint *v + + + + void glVertexAttribI4usv + GLuint index + const GLushort *v + + + void glVertexAttribI4usvEXT + GLuint index + const GLushort *v + + + + void glVertexAttribIFormat + GLuint attribindex + GLint size + GLenum type + GLuint relativeoffset + + + void glVertexAttribIFormatNV + GLuint index + GLint size + GLenum type + GLsizei stride + + + void glVertexAttribIPointer + GLuint index + GLint size + GLenum type + GLsizei stride + const void *pointer + + + void glVertexAttribIPointerEXT + GLuint index + GLint size + GLenum type + GLsizei stride + const void *pointer + + + + void glVertexAttribL1d + GLuint index + GLdouble x + + + void glVertexAttribL1dEXT + GLuint index + GLdouble x + + + + void glVertexAttribL1dv + GLuint index + const GLdouble *v + + + void glVertexAttribL1dvEXT + GLuint index + const GLdouble *v + + + + void glVertexAttribL1i64NV + GLuint index + GLint64EXT x + + + void glVertexAttribL1i64vNV + GLuint index + const GLint64EXT *v + + + void glVertexAttribL1ui64ARB + GLuint index + GLuint64EXT x + + + void glVertexAttribL1ui64NV + GLuint index + GLuint64EXT x + + + void glVertexAttribL1ui64vARB + GLuint index + const GLuint64EXT *v + + + void glVertexAttribL1ui64vNV + GLuint index + const GLuint64EXT *v + + + void glVertexAttribL2d + GLuint index + GLdouble x + GLdouble y + + + void glVertexAttribL2dEXT + GLuint index + GLdouble x + GLdouble y + + + + void glVertexAttribL2dv + GLuint index + const GLdouble *v + + + void glVertexAttribL2dvEXT + GLuint index + const GLdouble *v + + + + void glVertexAttribL2i64NV + GLuint index + GLint64EXT x + GLint64EXT y + + + void glVertexAttribL2i64vNV + GLuint index + const GLint64EXT *v + + + void glVertexAttribL2ui64NV + GLuint index + GLuint64EXT x + GLuint64EXT y + + + void glVertexAttribL2ui64vNV + GLuint index + const GLuint64EXT *v + + + void glVertexAttribL3d + GLuint index + GLdouble x + GLdouble y + GLdouble z + + + void glVertexAttribL3dEXT + GLuint index + GLdouble x + GLdouble y + GLdouble z + + + + void glVertexAttribL3dv + GLuint index + const GLdouble *v + + + void glVertexAttribL3dvEXT + GLuint index + const GLdouble *v + + + + void glVertexAttribL3i64NV + GLuint index + GLint64EXT x + GLint64EXT y + GLint64EXT z + + + void glVertexAttribL3i64vNV + GLuint index + const GLint64EXT *v + + + void glVertexAttribL3ui64NV + GLuint index + GLuint64EXT x + GLuint64EXT y + GLuint64EXT z + + + void glVertexAttribL3ui64vNV + GLuint index + const GLuint64EXT *v + + + void glVertexAttribL4d + GLuint index + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + void glVertexAttribL4dEXT + GLuint index + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + + void glVertexAttribL4dv + GLuint index + const GLdouble *v + + + void glVertexAttribL4dvEXT + GLuint index + const GLdouble *v + + + + void glVertexAttribL4i64NV + GLuint index + GLint64EXT x + GLint64EXT y + GLint64EXT z + GLint64EXT w + + + void glVertexAttribL4i64vNV + GLuint index + const GLint64EXT *v + + + void glVertexAttribL4ui64NV + GLuint index + GLuint64EXT x + GLuint64EXT y + GLuint64EXT z + GLuint64EXT w + + + void glVertexAttribL4ui64vNV + GLuint index + const GLuint64EXT *v + + + void glVertexAttribLFormat + GLuint attribindex + GLint size + GLenum type + GLuint relativeoffset + + + void glVertexAttribLFormatNV + GLuint index + GLint size + GLenum type + GLsizei stride + + + void glVertexAttribLPointer + GLuint index + GLint size + GLenum type + GLsizei stride + const void *pointer + + + void glVertexAttribLPointerEXT + GLuint index + GLint size + GLenum type + GLsizei stride + const void *pointer + + + + void glVertexAttribP1ui + GLuint index + GLenum type + GLboolean normalized + GLuint value + + + void glVertexAttribP1uiv + GLuint index + GLenum type + GLboolean normalized + const GLuint *value + + + void glVertexAttribP2ui + GLuint index + GLenum type + GLboolean normalized + GLuint value + + + void glVertexAttribP2uiv + GLuint index + GLenum type + GLboolean normalized + const GLuint *value + + + void glVertexAttribP3ui + GLuint index + GLenum type + GLboolean normalized + GLuint value + + + void glVertexAttribP3uiv + GLuint index + GLenum type + GLboolean normalized + const GLuint *value + + + void glVertexAttribP4ui + GLuint index + GLenum type + GLboolean normalized + GLuint value + + + void glVertexAttribP4uiv + GLuint index + GLenum type + GLboolean normalized + const GLuint *value + + + void glVertexAttribParameteriAMD + GLuint index + GLenum pname + GLint param + + + void glVertexAttribPointer + GLuint index + GLint size + GLenum type + GLboolean normalized + GLsizei stride + const void *pointer + + + void glVertexAttribPointerARB + GLuint index + GLint size + GLenum type + GLboolean normalized + GLsizei stride + const void *pointer + + + + void glVertexAttribPointerNV + GLuint index + GLint fsize + GLenum type + GLsizei stride + const void *pointer + + + void glVertexAttribs1dvNV + GLuint index + GLsizei count + const GLdouble *v + + + + void glVertexAttribs1fvNV + GLuint index + GLsizei count + const GLfloat *v + + + + void glVertexAttribs1hvNV + GLuint index + GLsizei n + const GLhalfNV *v + + + + void glVertexAttribs1svNV + GLuint index + GLsizei count + const GLshort *v + + + + void glVertexAttribs2dvNV + GLuint index + GLsizei count + const GLdouble *v + + + + void glVertexAttribs2fvNV + GLuint index + GLsizei count + const GLfloat *v + + + + void glVertexAttribs2hvNV + GLuint index + GLsizei n + const GLhalfNV *v + + + + void glVertexAttribs2svNV + GLuint index + GLsizei count + const GLshort *v + + + + void glVertexAttribs3dvNV + GLuint index + GLsizei count + const GLdouble *v + + + + void glVertexAttribs3fvNV + GLuint index + GLsizei count + const GLfloat *v + + + + void glVertexAttribs3hvNV + GLuint index + GLsizei n + const GLhalfNV *v + + + + void glVertexAttribs3svNV + GLuint index + GLsizei count + const GLshort *v + + + + void glVertexAttribs4dvNV + GLuint index + GLsizei count + const GLdouble *v + + + + void glVertexAttribs4fvNV + GLuint index + GLsizei count + const GLfloat *v + + + + void glVertexAttribs4hvNV + GLuint index + GLsizei n + const GLhalfNV *v + + + + void glVertexAttribs4svNV + GLuint index + GLsizei count + const GLshort *v + + + + void glVertexAttribs4ubvNV + GLuint index + GLsizei count + const GLubyte *v + + + + void glVertexBindingDivisor + GLuint bindingindex + GLuint divisor + + + void glVertexBlendARB + GLint count + + + + void glVertexBlendEnvfATI + GLenum pname + GLfloat param + + + void glVertexBlendEnviATI + GLenum pname + GLint param + + + void glVertexFormatNV + GLint size + GLenum type + GLsizei stride + + + void glVertexP2ui + GLenum type + GLuint value + + + void glVertexP2uiv + GLenum type + const GLuint *value + + + void glVertexP3ui + GLenum type + GLuint value + + + void glVertexP3uiv + GLenum type + const GLuint *value + + + void glVertexP4ui + GLenum type + GLuint value + + + void glVertexP4uiv + GLenum type + const GLuint *value + + + void glVertexPointer + GLint size + GLenum type + GLsizei stride + const void *pointer + + + void glVertexPointerEXT + GLint size + GLenum type + GLsizei stride + GLsizei count + const void *pointer + + + void glVertexPointerListIBM + GLint size + GLenum type + GLint stride + const void **pointer + GLint ptrstride + + + void glVertexPointervINTEL + GLint size + GLenum type + const void **pointer + + + void glVertexStream1dATI + GLenum stream + GLdouble x + + + void glVertexStream1dvATI + GLenum stream + const GLdouble *coords + + + void glVertexStream1fATI + GLenum stream + GLfloat x + + + void glVertexStream1fvATI + GLenum stream + const GLfloat *coords + + + void glVertexStream1iATI + GLenum stream + GLint x + + + void glVertexStream1ivATI + GLenum stream + const GLint *coords + + + void glVertexStream1sATI + GLenum stream + GLshort x + + + void glVertexStream1svATI + GLenum stream + const GLshort *coords + + + void glVertexStream2dATI + GLenum stream + GLdouble x + GLdouble y + + + void glVertexStream2dvATI + GLenum stream + const GLdouble *coords + + + void glVertexStream2fATI + GLenum stream + GLfloat x + GLfloat y + + + void glVertexStream2fvATI + GLenum stream + const GLfloat *coords + + + void glVertexStream2iATI + GLenum stream + GLint x + GLint y + + + void glVertexStream2ivATI + GLenum stream + const GLint *coords + + + void glVertexStream2sATI + GLenum stream + GLshort x + GLshort y + + + void glVertexStream2svATI + GLenum stream + const GLshort *coords + + + void glVertexStream3dATI + GLenum stream + GLdouble x + GLdouble y + GLdouble z + + + void glVertexStream3dvATI + GLenum stream + const GLdouble *coords + + + void glVertexStream3fATI + GLenum stream + GLfloat x + GLfloat y + GLfloat z + + + void glVertexStream3fvATI + GLenum stream + const GLfloat *coords + + + void glVertexStream3iATI + GLenum stream + GLint x + GLint y + GLint z + + + void glVertexStream3ivATI + GLenum stream + const GLint *coords + + + void glVertexStream3sATI + GLenum stream + GLshort x + GLshort y + GLshort z + + + void glVertexStream3svATI + GLenum stream + const GLshort *coords + + + void glVertexStream4dATI + GLenum stream + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + void glVertexStream4dvATI + GLenum stream + const GLdouble *coords + + + void glVertexStream4fATI + GLenum stream + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + void glVertexStream4fvATI + GLenum stream + const GLfloat *coords + + + void glVertexStream4iATI + GLenum stream + GLint x + GLint y + GLint z + GLint w + + + void glVertexStream4ivATI + GLenum stream + const GLint *coords + + + void glVertexStream4sATI + GLenum stream + GLshort x + GLshort y + GLshort z + GLshort w + + + void glVertexStream4svATI + GLenum stream + const GLshort *coords + + + void glVertexWeightPointerEXT + GLint size + GLenum type + GLsizei stride + const void *pointer + + + void glVertexWeightfEXT + GLfloat weight + + + + void glVertexWeightfvEXT + const GLfloat *weight + + + + void glVertexWeighthNV + GLhalfNV weight + + + + void glVertexWeighthvNV + const GLhalfNV *weight + + + + GLenum glVideoCaptureNV + GLuint video_capture_slot + GLuint *sequence_num + GLuint64EXT *capture_time + + + void glVideoCaptureStreamParameterdvNV + GLuint video_capture_slot + GLuint stream + GLenum pname + const GLdouble *params + + + void glVideoCaptureStreamParameterfvNV + GLuint video_capture_slot + GLuint stream + GLenum pname + const GLfloat *params + + + void glVideoCaptureStreamParameterivNV + GLuint video_capture_slot + GLuint stream + GLenum pname + const GLint *params + + + void glViewport + GLint x + GLint y + GLsizei width + GLsizei height + + + + void glViewportArrayv + GLuint first + GLsizei count + const GLfloat *v + + + void glViewportArrayvNV + GLuint first + GLsizei count + const GLfloat *v + + + + void glViewportArrayvOES + GLuint first + GLsizei count + const GLfloat *v + + + + void glViewportIndexedf + GLuint index + GLfloat x + GLfloat y + GLfloat w + GLfloat h + + + void glViewportIndexedfOES + GLuint index + GLfloat x + GLfloat y + GLfloat w + GLfloat h + + + + void glViewportIndexedfNV + GLuint index + GLfloat x + GLfloat y + GLfloat w + GLfloat h + + + + void glViewportIndexedfv + GLuint index + const GLfloat *v + + + void glViewportIndexedfvOES + GLuint index + const GLfloat *v + + + + void glViewportIndexedfvNV + GLuint index + const GLfloat *v + + + + void glViewportPositionWScaleNV + GLuint index + GLfloat xcoeff + GLfloat ycoeff + + + void glViewportSwizzleNV + GLuint index + GLenum swizzlex + GLenum swizzley + GLenum swizzlez + GLenum swizzlew + + + void glWaitSemaphoreEXT + GLuint semaphore + GLuint numBufferBarriers + const GLuint *buffers + GLuint numTextureBarriers + const GLuint *textures + const GLenum *srcLayouts + + + void glWaitSemaphoreui64NVX + GLuint waitGpu + GLsizei fenceObjectCount + const GLuint *semaphoreArray + const GLuint64 *fenceValueArray + + + void glWaitSync + GLsync sync + GLbitfield flags + GLuint64 timeout + + + void glWaitSyncAPPLE + GLsync sync + GLbitfield flags + GLuint64 timeout + + + + void glWeightPathsNV + GLuint resultPath + GLsizei numPaths + const GLuint *paths + const GLfloat *weights + + + void glWeightPointerARB + GLint size + GLenum type + GLsizei stride + const void *pointer + + + void glWeightPointerOES + GLint size + GLenum type + GLsizei stride + const void *pointer + + + void glWeightbvARB + GLint size + const GLbyte *weights + + + + void glWeightdvARB + GLint size + const GLdouble *weights + + + + void glWeightfvARB + GLint size + const GLfloat *weights + + + + void glWeightivARB + GLint size + const GLint *weights + + + + void glWeightsvARB + GLint size + const GLshort *weights + + + + void glWeightubvARB + GLint size + const GLubyte *weights + + + + void glWeightuivARB + GLint size + const GLuint *weights + + + + void glWeightusvARB + GLint size + const GLushort *weights + + + + void glWindowPos2d + GLdouble x + GLdouble y + + + + void glWindowPos2dARB + GLdouble x + GLdouble y + + + + + void glWindowPos2dMESA + GLdouble x + GLdouble y + + + + + void glWindowPos2dv + const GLdouble *v + + + + void glWindowPos2dvARB + const GLdouble *v + + + + + void glWindowPos2dvMESA + const GLdouble *v + + + + void glWindowPos2f + GLfloat x + GLfloat y + + + + void glWindowPos2fARB + GLfloat x + GLfloat y + + + + + void glWindowPos2fMESA + GLfloat x + GLfloat y + + + + + void glWindowPos2fv + const GLfloat *v + + + + void glWindowPos2fvARB + const GLfloat *v + + + + + void glWindowPos2fvMESA + const GLfloat *v + + + + void glWindowPos2i + GLint x + GLint y + + + + void glWindowPos2iARB + GLint x + GLint y + + + + + void glWindowPos2iMESA + GLint x + GLint y + + + + + void glWindowPos2iv + const GLint *v + + + + void glWindowPos2ivARB + const GLint *v + + + + + void glWindowPos2ivMESA + const GLint *v + + + + void glWindowPos2s + GLshort x + GLshort y + + + + void glWindowPos2sARB + GLshort x + GLshort y + + + + + void glWindowPos2sMESA + GLshort x + GLshort y + + + + + void glWindowPos2sv + const GLshort *v + + + + void glWindowPos2svARB + const GLshort *v + + + + + void glWindowPos2svMESA + const GLshort *v + + + + void glWindowPos3d + GLdouble x + GLdouble y + GLdouble z + + + + void glWindowPos3dARB + GLdouble x + GLdouble y + GLdouble z + + + + + void glWindowPos3dMESA + GLdouble x + GLdouble y + GLdouble z + + + + + void glWindowPos3dv + const GLdouble *v + + + + void glWindowPos3dvARB + const GLdouble *v + + + + + void glWindowPos3dvMESA + const GLdouble *v + + + + void glWindowPos3f + GLfloat x + GLfloat y + GLfloat z + + + + void glWindowPos3fARB + GLfloat x + GLfloat y + GLfloat z + + + + + void glWindowPos3fMESA + GLfloat x + GLfloat y + GLfloat z + + + + + void glWindowPos3fv + const GLfloat *v + + + + void glWindowPos3fvARB + const GLfloat *v + + + + + void glWindowPos3fvMESA + const GLfloat *v + + + + void glWindowPos3i + GLint x + GLint y + GLint z + + + + void glWindowPos3iARB + GLint x + GLint y + GLint z + + + + + void glWindowPos3iMESA + GLint x + GLint y + GLint z + + + + + void glWindowPos3iv + const GLint *v + + + + void glWindowPos3ivARB + const GLint *v + + + + + void glWindowPos3ivMESA + const GLint *v + + + + void glWindowPos3s + GLshort x + GLshort y + GLshort z + + + + void glWindowPos3sARB + GLshort x + GLshort y + GLshort z + + + + + void glWindowPos3sMESA + GLshort x + GLshort y + GLshort z + + + + + void glWindowPos3sv + const GLshort *v + + + + void glWindowPos3svARB + const GLshort *v + + + + + void glWindowPos3svMESA + const GLshort *v + + + + void glWindowPos4dMESA + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + + void glWindowPos4dvMESA + const GLdouble *v + + + void glWindowPos4fMESA + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + + void glWindowPos4fvMESA + const GLfloat *v + + + void glWindowPos4iMESA + GLint x + GLint y + GLint z + GLint w + + + + void glWindowPos4ivMESA + const GLint *v + + + void glWindowPos4sMESA + GLshort x + GLshort y + GLshort z + GLshort w + + + + void glWindowPos4svMESA + const GLshort *v + + + void glWindowRectanglesEXT + GLenum mode + GLsizei count + const GLint *box + + + void glWriteMaskEXT + GLuint res + GLuint in + GLenum outX + GLenum outY + GLenum outZ + GLenum outW + + + void glDrawVkImageNV + GLuint64 vkImage + GLuint sampler + GLfloat x0 + GLfloat y0 + GLfloat x1 + GLfloat y1 + GLfloat z + GLfloat s0 + GLfloat t0 + GLfloat s1 + GLfloat t1 + + + GLVULKANPROCNV glGetVkProcAddrNV + const GLchar *name + + + void glWaitVkSemaphoreNV + GLuint64 vkSemaphore + + + void glSignalVkSemaphoreNV + GLuint64 vkSemaphore + + + void glSignalVkFenceNV + GLuint64 vkFence + + + void glFramebufferParameteriMESA + GLenum target + GLenum pname + GLint param + + + void glGetFramebufferParameterivMESA + GLenum target + GLenum pname + GLint *params + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/StgSharp.GenerateGL/xml/glx.xml b/StgSharp.GenerateGL/xml/glx.xml index 8d248f2d..5cb02a80 100644 --- a/StgSharp.GenerateGL/xml/glx.xml +++ b/StgSharp.GenerateGL/xml/glx.xml @@ -1,2208 +1,2208 @@ - - - -Copyright 2013-2025 The Khronos Group Inc. -SPDX-License-Identifier: Apache-2.0 - -This file, glx.xml, is the GLX API Registry. The canonical version of the -registry, together with documentation, schema, and Python generator scripts -used to generate C header files for GLX, can always be found in the Khronos -Registry at https://github.com/KhronosGroup/OpenGL-Registry - - - - - - = 199901L -#include -#elif defined(__sun__) || defined(__digital__) -#include -#if defined(__STDC__) -#if defined(__arch64__) || defined(_LP64) -typedef long int int64_t; -typedef unsigned long int uint64_t; -#else -typedef long long int int64_t; -typedef unsigned long long int uint64_t; -#endif /* __arch64__ */ -#endif /* __STDC__ */ -#elif defined( __VMS ) || defined(__sgi) -#include -#elif defined(__SCO__) || defined(__USLC__) -#include -#elif defined(__UNIXOS2__) || defined(__SOL64__) -typedef long int int32_t; -typedef long long int int64_t; -typedef unsigned long long int uint64_t; -#elif defined(_WIN32) && defined(__GNUC__) -#include -#elif defined(_WIN32) -typedef __int32 int32_t; -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; -#else -/* Fallback if nothing above works */ -#include -#endif -#endif]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - typedef XID GLXFBConfigID; - typedef struct __GLXFBConfigRec *GLXFBConfig; - typedef XID GLXContextID; - typedef struct __GLXcontextRec *GLXContext; - typedef XID GLXPixmap; - typedef XID GLXDrawable; - typedef XID GLXWindow; - typedef XID GLXPbuffer; - typedef void ( *__GLXextFuncPtr)(void); - typedef XID GLXVideoCaptureDeviceNV; - typedef unsigned int GLXVideoDeviceNV; - typedef XID GLXVideoSourceSGIX; - typedef XID GLXFBConfigIDSGIX; - typedef struct __GLXFBConfigRec *GLXFBConfigSGIX; - typedef XID GLXPbufferSGIX; - - typedef struct { - int event_type; /* GLX_DAMAGED or GLX_SAVED */ - int draw_type; /* GLX_WINDOW or GLX_PBUFFER */ - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if this came for SendEvent request */ - Display *display; /* display the event was read from */ - GLXDrawable drawable; /* XID of Drawable */ - unsigned int buffer_mask; /* mask indicating which buffers are affected */ - unsigned int aux_buffer; /* which aux buffer was affected */ - int x, y; - int width, height; - int count; /* if nonzero, at least this many more */ -} GLXPbufferClobberEvent; - - typedef struct { - int type; - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if this came from a SendEvent request */ - Display *display; /* Display the event was read from */ - GLXDrawable drawable; /* drawable on which event was requested in event mask */ - int event_type; - int64_t ust; - int64_t msc; - int64_t sbc; -} GLXBufferSwapComplete; - - typedef union __GLXEvent { - GLXPbufferClobberEvent glxpbufferclobber; - GLXBufferSwapComplete glxbufferswapcomplete; - long pad[24]; -} GLXEvent; - - typedef struct { - int type; - unsigned long serial; - Bool send_event; - Display *display; - int extension; - int evtype; - GLXDrawable window; - Bool stereo_tree; -} GLXStereoNotifyEventEXT; - - typedef struct { - int type; - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if this came for SendEvent request */ - Display *display; /* display the event was read from */ - GLXDrawable drawable; /* i.d. of Drawable */ - int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */ - int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */ - unsigned int mask; /* mask indicating which buffers are affected*/ - int x, y; - int width, height; - int count; /* if nonzero, at least this many more */ -} GLXBufferClobberEventSGIX; - - typedef struct { - char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */ - int networkId; -} GLXHyperpipeNetworkSGIX; - - typedef struct { - char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */ - int channel; - unsigned int participationType; - int timeSlice; -} GLXHyperpipeConfigSGIX; - - typedef struct { - char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */ - int srcXOrigin, srcYOrigin, srcWidth, srcHeight; - int destXOrigin, destYOrigin, destWidth, destHeight; -} GLXPipeRect; - - typedef struct { - char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */ - int XOrigin, YOrigin, maxHeight, maxWidth; -} GLXPipeRectLimits; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Bool glXAssociateDMPbufferSGIX - Display *dpy - GLXPbufferSGIX pbuffer - DMparams *params - DMbuffer dmbuffer - - - int glXBindChannelToWindowSGIX - Display *display - int screen - int channel - Window window - - - int glXBindHyperpipeSGIX - Display *dpy - int hpId - - - Bool glXBindSwapBarrierNV - Display *dpy - GLuint group - GLuint barrier - - - void glXBindSwapBarrierSGIX - Display *dpy - GLXDrawable drawable - int barrier - - - void glXBindTexImageEXT - Display *dpy - GLXDrawable drawable - int buffer - const int *attrib_list - - - int glXBindVideoCaptureDeviceNV - Display *dpy - unsigned int video_capture_slot - GLXVideoCaptureDeviceNV device - - - int glXBindVideoDeviceNV - Display *dpy - unsigned int video_slot - unsigned int video_device - const int *attrib_list - - - int glXBindVideoImageNV - Display *dpy - GLXVideoDeviceNV VideoDevice - GLXPbuffer pbuf - int iVideoBuffer - - - void glXBlitContextFramebufferAMD - GLXContext dstCtx - GLint srcX0 - GLint srcY0 - GLint srcX1 - GLint srcY1 - GLint dstX0 - GLint dstY0 - GLint dstX1 - GLint dstY1 - GLbitfield mask - GLenum filter - - - int glXChannelRectSGIX - Display *display - int screen - int channel - int x - int y - int w - int h - - - int glXChannelRectSyncSGIX - Display *display - int screen - int channel - GLenum synctype - - - GLXFBConfig *glXChooseFBConfig - Display *dpy - int screen - const int *attrib_list - int *nelements - - - GLXFBConfigSGIX *glXChooseFBConfigSGIX - Display *dpy - int screen - int *attrib_list - int *nelements - - - XVisualInfo *glXChooseVisual - Display *dpy - int screen - int *attribList - - - void glXCopyBufferSubDataNV - Display *dpy - GLXContext readCtx - GLXContext writeCtx - GLenum readTarget - GLenum writeTarget - GLintptr readOffset - GLintptr writeOffset - GLsizeiptr size - - - void glXNamedCopyBufferSubDataNV - Display *dpy - GLXContext readCtx - GLXContext writeCtx - GLuint readBuffer - GLuint writeBuffer - GLintptr readOffset - GLintptr writeOffset - GLsizeiptr size - - - void glXCopyContext - Display *dpy - GLXContext src - GLXContext dst - unsigned long mask - - - void glXCopyImageSubDataNV - Display *dpy - GLXContext srcCtx - GLuint srcName - GLenum srcTarget - GLint srcLevel - GLint srcX - GLint srcY - GLint srcZ - GLXContext dstCtx - GLuint dstName - GLenum dstTarget - GLint dstLevel - GLint dstX - GLint dstY - GLint dstZ - GLsizei width - GLsizei height - GLsizei depth - - - void glXCopySubBufferMESA - Display *dpy - GLXDrawable drawable - int x - int y - int width - int height - - - GLXContext glXCreateAssociatedContextAMD - unsigned int id - GLXContext share_list - - - GLXContext glXCreateAssociatedContextAttribsAMD - unsigned int id - GLXContext share_context - const int *attribList - - - GLXContext glXCreateContextAttribsARB - Display *dpy - GLXFBConfig config - GLXContext share_context - Bool direct - const int *attrib_list - - - GLXContext glXCreateContext - Display *dpy - XVisualInfo *vis - GLXContext shareList - Bool direct - - - GLXContext glXCreateContextWithConfigSGIX - Display *dpy - GLXFBConfigSGIX config - int render_type - GLXContext share_list - Bool direct - - - GLXPbufferSGIX glXCreateGLXPbufferSGIX - Display *dpy - GLXFBConfigSGIX config - unsigned int width - unsigned int height - int *attrib_list - - - GLXPixmap glXCreateGLXPixmap - Display *dpy - XVisualInfo *visual - Pixmap pixmap - - - GLXPixmap glXCreateGLXPixmapMESA - Display *dpy - XVisualInfo *visual - Pixmap pixmap - Colormap cmap - - - GLXPixmap glXCreateGLXPixmapWithConfigSGIX - Display *dpy - GLXFBConfigSGIX config - Pixmap pixmap - - - GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX - Display *display - int screen - VLServer server - VLPath path - int nodeClass - VLNode drainNode - - - GLXContext glXCreateNewContext - Display *dpy - GLXFBConfig config - int render_type - GLXContext share_list - Bool direct - - - GLXPbuffer glXCreatePbuffer - Display *dpy - GLXFBConfig config - const int *attrib_list - - - GLXPixmap glXCreatePixmap - Display *dpy - GLXFBConfig config - Pixmap pixmap - const int *attrib_list - - - GLXWindow glXCreateWindow - Display *dpy - GLXFBConfig config - Window win - const int *attrib_list - - - void glXCushionSGI - Display *dpy - Window window - float cushion - - - Bool glXDelayBeforeSwapNV - Display *dpy - GLXDrawable drawable - GLfloat seconds - - - Bool glXDeleteAssociatedContextAMD - GLXContext ctx - - - void glXDestroyContext - Display *dpy - GLXContext ctx - - - void glXDestroyGLXPbufferSGIX - Display *dpy - GLXPbufferSGIX pbuf - - - void glXDestroyGLXPixmap - Display *dpy - GLXPixmap pixmap - - - void glXDestroyGLXVideoSourceSGIX - Display *dpy - GLXVideoSourceSGIX glxvideosource - - - int glXDestroyHyperpipeConfigSGIX - Display *dpy - int hpId - - - void glXDestroyPbuffer - Display *dpy - GLXPbuffer pbuf - - - void glXDestroyPixmap - Display *dpy - GLXPixmap pixmap - - - void glXDestroyWindow - Display *dpy - GLXWindow win - - - GLXVideoCaptureDeviceNV *glXEnumerateVideoCaptureDevicesNV - Display *dpy - int screen - int *nelements - - - unsigned int *glXEnumerateVideoDevicesNV - Display *dpy - int screen - int *nelements - - - void glXFreeContextEXT - Display *dpy - GLXContext context - - - unsigned int glXGetAGPOffsetMESA - const void *pointer - - - const char *glXGetClientString - Display *dpy - int name - - - int glXGetConfig - Display *dpy - XVisualInfo *visual - int attrib - int *value - - - unsigned int glXGetContextGPUIDAMD - GLXContext ctx - - - GLXContextID glXGetContextIDEXT - const GLXContext context - - - GLXContext glXGetCurrentAssociatedContextAMD - - - GLXContext glXGetCurrentContext - - - Display *glXGetCurrentDisplayEXT - - - Display *glXGetCurrentDisplay - - - GLXDrawable glXGetCurrentDrawable - - - GLXDrawable glXGetCurrentReadDrawableSGI - - - GLXDrawable glXGetCurrentReadDrawable - - - int glXGetFBConfigAttrib - Display *dpy - GLXFBConfig config - int attribute - int *value - - - int glXGetFBConfigAttribSGIX - Display *dpy - GLXFBConfigSGIX config - int attribute - int *value - - - GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX - Display *dpy - XVisualInfo *vis - - - GLXFBConfig *glXGetFBConfigs - Display *dpy - int screen - int *nelements - - - unsigned int glXGetGPUIDsAMD - unsigned int maxCount - unsigned int *ids - - - int glXGetGPUInfoAMD - unsigned int id - int property - GLenum dataType - unsigned int size - void *data - - - Bool glXGetMscRateOML - Display *dpy - GLXDrawable drawable - int32_t *numerator - int32_t *denominator - - - __GLXextFuncPtr glXGetProcAddressARB - const GLubyte *procName - - - __GLXextFuncPtr glXGetProcAddress - const GLubyte *procName - - - void glXGetSelectedEvent - Display *dpy - GLXDrawable draw - unsigned long *event_mask - - - void glXGetSelectedEventSGIX - Display *dpy - GLXDrawable drawable - unsigned long *mask - - - int glXGetSwapIntervalMESA - - - Bool glXGetSyncValuesOML - Display *dpy - GLXDrawable drawable - int64_t *ust - int64_t *msc - int64_t *sbc - - - Status glXGetTransparentIndexSUN - Display *dpy - Window overlay - Window underlay - unsigned long *pTransparentIndex - - - int glXGetVideoDeviceNV - Display *dpy - int screen - int numVideoDevices - GLXVideoDeviceNV *pVideoDevice - - - int glXGetVideoInfoNV - Display *dpy - int screen - GLXVideoDeviceNV VideoDevice - unsigned long *pulCounterOutputPbuffer - unsigned long *pulCounterOutputVideo - - - int glXGetVideoSyncSGI - unsigned int *count - - - XVisualInfo *glXGetVisualFromFBConfig - Display *dpy - GLXFBConfig config - - - XVisualInfo *glXGetVisualFromFBConfigSGIX - Display *dpy - GLXFBConfigSGIX config - - - int glXHyperpipeAttribSGIX - Display *dpy - int timeSlice - int attrib - int size - void *attribList - - - int glXHyperpipeConfigSGIX - Display *dpy - int networkId - int npipes - GLXHyperpipeConfigSGIX *cfg - int *hpId - - - GLXContext glXImportContextEXT - Display *dpy - GLXContextID contextID - - - Bool glXIsDirect - Display *dpy - GLXContext ctx - - - Bool glXJoinSwapGroupNV - Display *dpy - GLXDrawable drawable - GLuint group - - - void glXJoinSwapGroupSGIX - Display *dpy - GLXDrawable drawable - GLXDrawable member - - - void glXLockVideoCaptureDeviceNV - Display *dpy - GLXVideoCaptureDeviceNV device - - - Bool glXMakeAssociatedContextCurrentAMD - GLXContext ctx - - - Bool glXMakeContextCurrent - Display *dpy - GLXDrawable draw - GLXDrawable read - GLXContext ctx - - - Bool glXMakeCurrent - Display *dpy - GLXDrawable drawable - GLXContext ctx - - - Bool glXMakeCurrentReadSGI - Display *dpy - GLXDrawable draw - GLXDrawable read - GLXContext ctx - - - int glXQueryChannelDeltasSGIX - Display *display - int screen - int channel - int *x - int *y - int *w - int *h - - - int glXQueryChannelRectSGIX - Display *display - int screen - int channel - int *dx - int *dy - int *dw - int *dh - - - int glXQueryContext - Display *dpy - GLXContext ctx - int attribute - int *value - - - int glXQueryContextInfoEXT - Display *dpy - GLXContext context - int attribute - int *value - - - Bool glXQueryCurrentRendererIntegerMESA - int attribute - unsigned int *value - - - const char *glXQueryCurrentRendererStringMESA - int attribute - - - void glXQueryDrawable - Display *dpy - GLXDrawable draw - int attribute - unsigned int *value - - - Bool glXQueryExtension - Display *dpy - int *errorb - int *event - - - const char *glXQueryExtensionsString - Display *dpy - int screen - - - Bool glXQueryFrameCountNV - Display *dpy - int screen - GLuint *count - - - void glXQueryGLXPbufferSGIX - Display *dpy - GLXPbufferSGIX pbuf - int attribute - unsigned int *value - - - int glXQueryHyperpipeAttribSGIX - Display *dpy - int timeSlice - int attrib - int size - void *returnAttribList - - - int glXQueryHyperpipeBestAttribSGIX - Display *dpy - int timeSlice - int attrib - int size - void *attribList - void *returnAttribList - - - GLXHyperpipeConfigSGIX *glXQueryHyperpipeConfigSGIX - Display *dpy - int hpId - int *npipes - - - GLXHyperpipeNetworkSGIX *glXQueryHyperpipeNetworkSGIX - Display *dpy - int *npipes - - - Bool glXQueryMaxSwapBarriersSGIX - Display *dpy - int screen - int *max - - - Bool glXQueryMaxSwapGroupsNV - Display *dpy - int screen - GLuint *maxGroups - GLuint *maxBarriers - - - Bool glXQueryRendererIntegerMESA - Display *dpy - int screen - int renderer - int attribute - unsigned int *value - - - const char *glXQueryRendererStringMESA - Display *dpy - int screen - int renderer - int attribute - - - const char *glXQueryServerString - Display *dpy - int screen - int name - - - Bool glXQuerySwapGroupNV - Display *dpy - GLXDrawable drawable - GLuint *group - GLuint *barrier - - - Bool glXQueryVersion - Display *dpy - int *maj - int *min - - - int glXQueryVideoCaptureDeviceNV - Display *dpy - GLXVideoCaptureDeviceNV device - int attribute - int *value - - - Bool glXReleaseBuffersMESA - Display *dpy - GLXDrawable drawable - - - void glXReleaseTexImageEXT - Display *dpy - GLXDrawable drawable - int buffer - - - void glXReleaseVideoCaptureDeviceNV - Display *dpy - GLXVideoCaptureDeviceNV device - - - int glXReleaseVideoDeviceNV - Display *dpy - int screen - GLXVideoDeviceNV VideoDevice - - - int glXReleaseVideoImageNV - Display *dpy - GLXPbuffer pbuf - - - Bool glXResetFrameCountNV - Display *dpy - int screen - - - void glXSelectEvent - Display *dpy - GLXDrawable draw - unsigned long event_mask - - - void glXSelectEventSGIX - Display *dpy - GLXDrawable drawable - unsigned long mask - - - int glXSendPbufferToVideoNV - Display *dpy - GLXPbuffer pbuf - int iBufferType - unsigned long *pulCounterPbuffer - GLboolean bBlock - - - GLboolean glXSet3DfxModeMESA - GLint mode - - - void glXSwapBuffers - Display *dpy - GLXDrawable drawable - - - int64_t glXSwapBuffersMscOML - Display *dpy - GLXDrawable drawable - int64_t target_msc - int64_t divisor - int64_t remainder - - - int glXSwapIntervalMESA - unsigned int interval - - - void glXSwapIntervalEXT - Display *dpy - GLXDrawable drawable - int interval - - - int glXSwapIntervalSGI - int interval - - - void glXUseXFont - Font font - int first - int count - int list - - - Bool glXWaitForMscOML - Display *dpy - GLXDrawable drawable - int64_t target_msc - int64_t divisor - int64_t remainder - int64_t *ust - int64_t *msc - int64_t *sbc - - - Bool glXWaitForSbcOML - Display *dpy - GLXDrawable drawable - int64_t target_sbc - int64_t *ust - int64_t *msc - int64_t *sbc - - - void glXWaitGL - - - int glXWaitVideoSyncSGI - int divisor - int remainder - unsigned int *count - - - void glXWaitX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + +Copyright 2013-2025 The Khronos Group Inc. +SPDX-License-Identifier: Apache-2.0 + +This file, glx.xml, is the GLX API Registry. The canonical version of the +registry, together with documentation, schema, and Python generator scripts +used to generate C header files for GLX, can always be found in the Khronos +Registry at https://github.com/KhronosGroup/OpenGL-Registry + + + + + + = 199901L +#include +#elif defined(__sun__) || defined(__digital__) +#include +#if defined(__STDC__) +#if defined(__arch64__) || defined(_LP64) +typedef long int int64_t; +typedef unsigned long int uint64_t; +#else +typedef long long int int64_t; +typedef unsigned long long int uint64_t; +#endif /* __arch64__ */ +#endif /* __STDC__ */ +#elif defined( __VMS ) || defined(__sgi) +#include +#elif defined(__SCO__) || defined(__USLC__) +#include +#elif defined(__UNIXOS2__) || defined(__SOL64__) +typedef long int int32_t; +typedef long long int int64_t; +typedef unsigned long long int uint64_t; +#elif defined(_WIN32) && defined(__GNUC__) +#include +#elif defined(_WIN32) +typedef __int32 int32_t; +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; +#else +/* Fallback if nothing above works */ +#include +#endif +#endif]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + typedef XID GLXFBConfigID; + typedef struct __GLXFBConfigRec *GLXFBConfig; + typedef XID GLXContextID; + typedef struct __GLXcontextRec *GLXContext; + typedef XID GLXPixmap; + typedef XID GLXDrawable; + typedef XID GLXWindow; + typedef XID GLXPbuffer; + typedef void ( *__GLXextFuncPtr)(void); + typedef XID GLXVideoCaptureDeviceNV; + typedef unsigned int GLXVideoDeviceNV; + typedef XID GLXVideoSourceSGIX; + typedef XID GLXFBConfigIDSGIX; + typedef struct __GLXFBConfigRec *GLXFBConfigSGIX; + typedef XID GLXPbufferSGIX; + + typedef struct { + int event_type; /* GLX_DAMAGED or GLX_SAVED */ + int draw_type; /* GLX_WINDOW or GLX_PBUFFER */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came for SendEvent request */ + Display *display; /* display the event was read from */ + GLXDrawable drawable; /* XID of Drawable */ + unsigned int buffer_mask; /* mask indicating which buffers are affected */ + unsigned int aux_buffer; /* which aux buffer was affected */ + int x, y; + int width, height; + int count; /* if nonzero, at least this many more */ +} GLXPbufferClobberEvent; + + typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + GLXDrawable drawable; /* drawable on which event was requested in event mask */ + int event_type; + int64_t ust; + int64_t msc; + int64_t sbc; +} GLXBufferSwapComplete; + + typedef union __GLXEvent { + GLXPbufferClobberEvent glxpbufferclobber; + GLXBufferSwapComplete glxbufferswapcomplete; + long pad[24]; +} GLXEvent; + + typedef struct { + int type; + unsigned long serial; + Bool send_event; + Display *display; + int extension; + int evtype; + GLXDrawable window; + Bool stereo_tree; +} GLXStereoNotifyEventEXT; + + typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came for SendEvent request */ + Display *display; /* display the event was read from */ + GLXDrawable drawable; /* i.d. of Drawable */ + int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */ + int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */ + unsigned int mask; /* mask indicating which buffers are affected*/ + int x, y; + int width, height; + int count; /* if nonzero, at least this many more */ +} GLXBufferClobberEventSGIX; + + typedef struct { + char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */ + int networkId; +} GLXHyperpipeNetworkSGIX; + + typedef struct { + char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */ + int channel; + unsigned int participationType; + int timeSlice; +} GLXHyperpipeConfigSGIX; + + typedef struct { + char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */ + int srcXOrigin, srcYOrigin, srcWidth, srcHeight; + int destXOrigin, destYOrigin, destWidth, destHeight; +} GLXPipeRect; + + typedef struct { + char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */ + int XOrigin, YOrigin, maxHeight, maxWidth; +} GLXPipeRectLimits; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bool glXAssociateDMPbufferSGIX + Display *dpy + GLXPbufferSGIX pbuffer + DMparams *params + DMbuffer dmbuffer + + + int glXBindChannelToWindowSGIX + Display *display + int screen + int channel + Window window + + + int glXBindHyperpipeSGIX + Display *dpy + int hpId + + + Bool glXBindSwapBarrierNV + Display *dpy + GLuint group + GLuint barrier + + + void glXBindSwapBarrierSGIX + Display *dpy + GLXDrawable drawable + int barrier + + + void glXBindTexImageEXT + Display *dpy + GLXDrawable drawable + int buffer + const int *attrib_list + + + int glXBindVideoCaptureDeviceNV + Display *dpy + unsigned int video_capture_slot + GLXVideoCaptureDeviceNV device + + + int glXBindVideoDeviceNV + Display *dpy + unsigned int video_slot + unsigned int video_device + const int *attrib_list + + + int glXBindVideoImageNV + Display *dpy + GLXVideoDeviceNV VideoDevice + GLXPbuffer pbuf + int iVideoBuffer + + + void glXBlitContextFramebufferAMD + GLXContext dstCtx + GLint srcX0 + GLint srcY0 + GLint srcX1 + GLint srcY1 + GLint dstX0 + GLint dstY0 + GLint dstX1 + GLint dstY1 + GLbitfield mask + GLenum filter + + + int glXChannelRectSGIX + Display *display + int screen + int channel + int x + int y + int w + int h + + + int glXChannelRectSyncSGIX + Display *display + int screen + int channel + GLenum synctype + + + GLXFBConfig *glXChooseFBConfig + Display *dpy + int screen + const int *attrib_list + int *nelements + + + GLXFBConfigSGIX *glXChooseFBConfigSGIX + Display *dpy + int screen + int *attrib_list + int *nelements + + + XVisualInfo *glXChooseVisual + Display *dpy + int screen + int *attribList + + + void glXCopyBufferSubDataNV + Display *dpy + GLXContext readCtx + GLXContext writeCtx + GLenum readTarget + GLenum writeTarget + GLintptr readOffset + GLintptr writeOffset + GLsizeiptr size + + + void glXNamedCopyBufferSubDataNV + Display *dpy + GLXContext readCtx + GLXContext writeCtx + GLuint readBuffer + GLuint writeBuffer + GLintptr readOffset + GLintptr writeOffset + GLsizeiptr size + + + void glXCopyContext + Display *dpy + GLXContext src + GLXContext dst + unsigned long mask + + + void glXCopyImageSubDataNV + Display *dpy + GLXContext srcCtx + GLuint srcName + GLenum srcTarget + GLint srcLevel + GLint srcX + GLint srcY + GLint srcZ + GLXContext dstCtx + GLuint dstName + GLenum dstTarget + GLint dstLevel + GLint dstX + GLint dstY + GLint dstZ + GLsizei width + GLsizei height + GLsizei depth + + + void glXCopySubBufferMESA + Display *dpy + GLXDrawable drawable + int x + int y + int width + int height + + + GLXContext glXCreateAssociatedContextAMD + unsigned int id + GLXContext share_list + + + GLXContext glXCreateAssociatedContextAttribsAMD + unsigned int id + GLXContext share_context + const int *attribList + + + GLXContext glXCreateContextAttribsARB + Display *dpy + GLXFBConfig config + GLXContext share_context + Bool direct + const int *attrib_list + + + GLXContext glXCreateContext + Display *dpy + XVisualInfo *vis + GLXContext shareList + Bool direct + + + GLXContext glXCreateContextWithConfigSGIX + Display *dpy + GLXFBConfigSGIX config + int render_type + GLXContext share_list + Bool direct + + + GLXPbufferSGIX glXCreateGLXPbufferSGIX + Display *dpy + GLXFBConfigSGIX config + unsigned int width + unsigned int height + int *attrib_list + + + GLXPixmap glXCreateGLXPixmap + Display *dpy + XVisualInfo *visual + Pixmap pixmap + + + GLXPixmap glXCreateGLXPixmapMESA + Display *dpy + XVisualInfo *visual + Pixmap pixmap + Colormap cmap + + + GLXPixmap glXCreateGLXPixmapWithConfigSGIX + Display *dpy + GLXFBConfigSGIX config + Pixmap pixmap + + + GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX + Display *display + int screen + VLServer server + VLPath path + int nodeClass + VLNode drainNode + + + GLXContext glXCreateNewContext + Display *dpy + GLXFBConfig config + int render_type + GLXContext share_list + Bool direct + + + GLXPbuffer glXCreatePbuffer + Display *dpy + GLXFBConfig config + const int *attrib_list + + + GLXPixmap glXCreatePixmap + Display *dpy + GLXFBConfig config + Pixmap pixmap + const int *attrib_list + + + GLXWindow glXCreateWindow + Display *dpy + GLXFBConfig config + Window win + const int *attrib_list + + + void glXCushionSGI + Display *dpy + Window window + float cushion + + + Bool glXDelayBeforeSwapNV + Display *dpy + GLXDrawable drawable + GLfloat seconds + + + Bool glXDeleteAssociatedContextAMD + GLXContext ctx + + + void glXDestroyContext + Display *dpy + GLXContext ctx + + + void glXDestroyGLXPbufferSGIX + Display *dpy + GLXPbufferSGIX pbuf + + + void glXDestroyGLXPixmap + Display *dpy + GLXPixmap pixmap + + + void glXDestroyGLXVideoSourceSGIX + Display *dpy + GLXVideoSourceSGIX glxvideosource + + + int glXDestroyHyperpipeConfigSGIX + Display *dpy + int hpId + + + void glXDestroyPbuffer + Display *dpy + GLXPbuffer pbuf + + + void glXDestroyPixmap + Display *dpy + GLXPixmap pixmap + + + void glXDestroyWindow + Display *dpy + GLXWindow win + + + GLXVideoCaptureDeviceNV *glXEnumerateVideoCaptureDevicesNV + Display *dpy + int screen + int *nelements + + + unsigned int *glXEnumerateVideoDevicesNV + Display *dpy + int screen + int *nelements + + + void glXFreeContextEXT + Display *dpy + GLXContext context + + + unsigned int glXGetAGPOffsetMESA + const void *pointer + + + const char *glXGetClientString + Display *dpy + int name + + + int glXGetConfig + Display *dpy + XVisualInfo *visual + int attrib + int *value + + + unsigned int glXGetContextGPUIDAMD + GLXContext ctx + + + GLXContextID glXGetContextIDEXT + const GLXContext context + + + GLXContext glXGetCurrentAssociatedContextAMD + + + GLXContext glXGetCurrentContext + + + Display *glXGetCurrentDisplayEXT + + + Display *glXGetCurrentDisplay + + + GLXDrawable glXGetCurrentDrawable + + + GLXDrawable glXGetCurrentReadDrawableSGI + + + GLXDrawable glXGetCurrentReadDrawable + + + int glXGetFBConfigAttrib + Display *dpy + GLXFBConfig config + int attribute + int *value + + + int glXGetFBConfigAttribSGIX + Display *dpy + GLXFBConfigSGIX config + int attribute + int *value + + + GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX + Display *dpy + XVisualInfo *vis + + + GLXFBConfig *glXGetFBConfigs + Display *dpy + int screen + int *nelements + + + unsigned int glXGetGPUIDsAMD + unsigned int maxCount + unsigned int *ids + + + int glXGetGPUInfoAMD + unsigned int id + int property + GLenum dataType + unsigned int size + void *data + + + Bool glXGetMscRateOML + Display *dpy + GLXDrawable drawable + int32_t *numerator + int32_t *denominator + + + __GLXextFuncPtr glXGetProcAddressARB + const GLubyte *procName + + + __GLXextFuncPtr glXGetProcAddress + const GLubyte *procName + + + void glXGetSelectedEvent + Display *dpy + GLXDrawable draw + unsigned long *event_mask + + + void glXGetSelectedEventSGIX + Display *dpy + GLXDrawable drawable + unsigned long *mask + + + int glXGetSwapIntervalMESA + + + Bool glXGetSyncValuesOML + Display *dpy + GLXDrawable drawable + int64_t *ust + int64_t *msc + int64_t *sbc + + + Status glXGetTransparentIndexSUN + Display *dpy + Window overlay + Window underlay + unsigned long *pTransparentIndex + + + int glXGetVideoDeviceNV + Display *dpy + int screen + int numVideoDevices + GLXVideoDeviceNV *pVideoDevice + + + int glXGetVideoInfoNV + Display *dpy + int screen + GLXVideoDeviceNV VideoDevice + unsigned long *pulCounterOutputPbuffer + unsigned long *pulCounterOutputVideo + + + int glXGetVideoSyncSGI + unsigned int *count + + + XVisualInfo *glXGetVisualFromFBConfig + Display *dpy + GLXFBConfig config + + + XVisualInfo *glXGetVisualFromFBConfigSGIX + Display *dpy + GLXFBConfigSGIX config + + + int glXHyperpipeAttribSGIX + Display *dpy + int timeSlice + int attrib + int size + void *attribList + + + int glXHyperpipeConfigSGIX + Display *dpy + int networkId + int npipes + GLXHyperpipeConfigSGIX *cfg + int *hpId + + + GLXContext glXImportContextEXT + Display *dpy + GLXContextID contextID + + + Bool glXIsDirect + Display *dpy + GLXContext ctx + + + Bool glXJoinSwapGroupNV + Display *dpy + GLXDrawable drawable + GLuint group + + + void glXJoinSwapGroupSGIX + Display *dpy + GLXDrawable drawable + GLXDrawable member + + + void glXLockVideoCaptureDeviceNV + Display *dpy + GLXVideoCaptureDeviceNV device + + + Bool glXMakeAssociatedContextCurrentAMD + GLXContext ctx + + + Bool glXMakeContextCurrent + Display *dpy + GLXDrawable draw + GLXDrawable read + GLXContext ctx + + + Bool glXMakeCurrent + Display *dpy + GLXDrawable drawable + GLXContext ctx + + + Bool glXMakeCurrentReadSGI + Display *dpy + GLXDrawable draw + GLXDrawable read + GLXContext ctx + + + int glXQueryChannelDeltasSGIX + Display *display + int screen + int channel + int *x + int *y + int *w + int *h + + + int glXQueryChannelRectSGIX + Display *display + int screen + int channel + int *dx + int *dy + int *dw + int *dh + + + int glXQueryContext + Display *dpy + GLXContext ctx + int attribute + int *value + + + int glXQueryContextInfoEXT + Display *dpy + GLXContext context + int attribute + int *value + + + Bool glXQueryCurrentRendererIntegerMESA + int attribute + unsigned int *value + + + const char *glXQueryCurrentRendererStringMESA + int attribute + + + void glXQueryDrawable + Display *dpy + GLXDrawable draw + int attribute + unsigned int *value + + + Bool glXQueryExtension + Display *dpy + int *errorb + int *event + + + const char *glXQueryExtensionsString + Display *dpy + int screen + + + Bool glXQueryFrameCountNV + Display *dpy + int screen + GLuint *count + + + void glXQueryGLXPbufferSGIX + Display *dpy + GLXPbufferSGIX pbuf + int attribute + unsigned int *value + + + int glXQueryHyperpipeAttribSGIX + Display *dpy + int timeSlice + int attrib + int size + void *returnAttribList + + + int glXQueryHyperpipeBestAttribSGIX + Display *dpy + int timeSlice + int attrib + int size + void *attribList + void *returnAttribList + + + GLXHyperpipeConfigSGIX *glXQueryHyperpipeConfigSGIX + Display *dpy + int hpId + int *npipes + + + GLXHyperpipeNetworkSGIX *glXQueryHyperpipeNetworkSGIX + Display *dpy + int *npipes + + + Bool glXQueryMaxSwapBarriersSGIX + Display *dpy + int screen + int *max + + + Bool glXQueryMaxSwapGroupsNV + Display *dpy + int screen + GLuint *maxGroups + GLuint *maxBarriers + + + Bool glXQueryRendererIntegerMESA + Display *dpy + int screen + int renderer + int attribute + unsigned int *value + + + const char *glXQueryRendererStringMESA + Display *dpy + int screen + int renderer + int attribute + + + const char *glXQueryServerString + Display *dpy + int screen + int name + + + Bool glXQuerySwapGroupNV + Display *dpy + GLXDrawable drawable + GLuint *group + GLuint *barrier + + + Bool glXQueryVersion + Display *dpy + int *maj + int *min + + + int glXQueryVideoCaptureDeviceNV + Display *dpy + GLXVideoCaptureDeviceNV device + int attribute + int *value + + + Bool glXReleaseBuffersMESA + Display *dpy + GLXDrawable drawable + + + void glXReleaseTexImageEXT + Display *dpy + GLXDrawable drawable + int buffer + + + void glXReleaseVideoCaptureDeviceNV + Display *dpy + GLXVideoCaptureDeviceNV device + + + int glXReleaseVideoDeviceNV + Display *dpy + int screen + GLXVideoDeviceNV VideoDevice + + + int glXReleaseVideoImageNV + Display *dpy + GLXPbuffer pbuf + + + Bool glXResetFrameCountNV + Display *dpy + int screen + + + void glXSelectEvent + Display *dpy + GLXDrawable draw + unsigned long event_mask + + + void glXSelectEventSGIX + Display *dpy + GLXDrawable drawable + unsigned long mask + + + int glXSendPbufferToVideoNV + Display *dpy + GLXPbuffer pbuf + int iBufferType + unsigned long *pulCounterPbuffer + GLboolean bBlock + + + GLboolean glXSet3DfxModeMESA + GLint mode + + + void glXSwapBuffers + Display *dpy + GLXDrawable drawable + + + int64_t glXSwapBuffersMscOML + Display *dpy + GLXDrawable drawable + int64_t target_msc + int64_t divisor + int64_t remainder + + + int glXSwapIntervalMESA + unsigned int interval + + + void glXSwapIntervalEXT + Display *dpy + GLXDrawable drawable + int interval + + + int glXSwapIntervalSGI + int interval + + + void glXUseXFont + Font font + int first + int count + int list + + + Bool glXWaitForMscOML + Display *dpy + GLXDrawable drawable + int64_t target_msc + int64_t divisor + int64_t remainder + int64_t *ust + int64_t *msc + int64_t *sbc + + + Bool glXWaitForSbcOML + Display *dpy + GLXDrawable drawable + int64_t target_sbc + int64_t *ust + int64_t *msc + int64_t *sbc + + + void glXWaitGL + + + int glXWaitVideoSyncSGI + int divisor + int remainder + unsigned int *count + + + void glXWaitX + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/StgSharp.GenerateGL/xml/glxproto.reserved.txt b/StgSharp.GenerateGL/xml/glxproto.reserved.txt index 33ac0cff..a61f0308 100644 --- a/StgSharp.GenerateGL/xml/glxproto.reserved.txt +++ b/StgSharp.GenerateGL/xml/glxproto.reserved.txt @@ -1,729 +1,729 @@ -This is the registry of GLX opcodes, error codes, and event codes. It is -very rarely modified since there is almost no interest in supporting GLX -with modern OpenGL features, and the work of extending the XML schema to -express it is not worthwhile. - -When new GLX protocol is needed for extension specifications, allocate it -here and reflect it in the extension specification document as well as, if -appropriate, glx.xml. - -Reserved opcode ranges assigned to vendors, and in some cases, opcodes -actually assigned within that range are tracked here. Not all opcodes used -by vendors are known. - -GLX Opcodes (8 bits) -==================== - 1-15 GLX 1.0 - 16 Vendor Private - 17 Vendor Private with Reply - 18-20 GLX 1.1 - 21-32 GLX 1.3 - 33 glXSetClientInfoARB (GLX_ARB_create_context) - 34 glXCreateContextAttribsARB (GLX_ARB_create_context) - 35 glXSetClientInfo2ARB (GLX_ARB_create_context) - -GLX Vendor Private / Vendor Private with Reply opcodes (32-bits) - (first 4 bytes past standard X header) -================================================================ - - 0 255 EXT (various - contact SGI) - 256 271 HP (originally Compaq) - (272-511 unused) - 512 575 E&S - (576-1023 unused) - 1024 1269 EXT (various - contact SGI) - 1024 GLX_EXT_import_context - 1270 1275 NV_register_combiners - 1276 1280 NV_fence - 1281 1292 NVIDIA (use TBD; was intended for NV_vertex_program) - 1293 1308 NV_vertex_program / ARB_vertex_program / ARB_fragment_program - 1309 NVIDIA (use TBD) - 1310 1311 NV_fragment_program - 1312 NV_fence - 1313 1318 GLX_NV_video_output - 1319 1320 NV_vertex_program - 1321 1326 NVIDIA (use TBD) - 1327 NV_register_combiners2 - 1328 1329 EXT_timer_query - 1330 1331 GLX_EXT_texture_from_pixmap - 1332 1339 NV_present_video - 1340 NVIDIA (use TBD) - 1341 GLX_NV_delay_before_swap - 1342 1359 NVIDIA (use TBD) - 1360 GLX_NV_copy_image - 1361 1364 NVIDIA (use TBD) - 1365 1368 NV_gpu_program4 - 1369 1386 NVIDIA (use TBD) - 1387 1388 GLX_NV_copy_buffer - 1389 1399 NVIDIA (use TBD) - 1400 1415 NV_video_capture - 1416 GLX_EXT_swap_control - 1417 1420 NVIDIA (use TBD) - 1421 OES_single_precision (Khronos OpenGL ES 1.0) - 1422 1428 EXT_framebuffer_object - (1429-2047 unused) - 2048 2064 SUN - 3000 3999 IBM - 4096 5151 SGI (4106-5151 unused) - 4096 SGIS_detail_texture - 4097 SGIS_sharpen_texture - 4098 4100 SGI_color_table - 4101 SGIS_texture_filter4 - 4102 4104 SGIX_instruments - 4105 SGIX_flush_raster - 5152 5184 Mesa (unknown use) - 8192 8207 HP - 16384 16399 ADD - 65536 66575 SGI (various GLX extensions) - 65536 GLX_SGI_swap_control - 65537 GLX_SGI_make_current_read - 65538 65539 GLX_SGIX_video_source - 65540 65542 GLX_SGIX_fbconfig - 65543 65546 GLX_SGIX_pbuffer - 65547 GLX_SGIX_swap_group - 65548 65549 GLX_SGIX_swap_barrier - 65550 65553 GLX_SGIX_hyperpipe_group - 65554 GLX_SGIX_query_board_num (internal, for shm) - -OpenGL Single Opcodes (8 Bits) -=============================== - - 167-up Reserved - 0 146 OpenGL 1.0/1.1 core - 147 159 OpenGL 1.2 core - 160 160 ARB_texture_compression - 161 166 ARB_occlusion_query - 167 178 ARB_shader_objects - 179 181 ARB_vertex_shader - 182 183 EXT_gpu_shader4 - 184 185 NV_vertex_program4 - 186 194 ARB_vertex_buffer_object - 195 202 OpenGL 2.0 core - 203 204 EXT_texture_integer - 205 205 ARB_map_buffer_range - 206 209 ARB_vertex_array_object - 210 212 EXT_draw_buffers2 - 213 214 OpenGL 3.0 core - 215 220 ARB_uniform_buffer_object - 221 ARB_copy_buffer - -OpenGL Rendering Opcodes (16 Bits) -================================== - - 0-1007 Reserved to ARB (231-1007 unused) - 0 191 OpenGL 1.0 core (140 deprecated?) - 192 194 OpenGL 1.1 core - 195 196 OpenGL 1.2 core - 197 213 ARB_multitexture - 214 219 ARB_texture_compression - 220 228 ARB_vertex_blend - 229 ARB_multisample - 230 ARB_window_pos - 231 232 ARB_occlusion_query - 233 ARB_draw_buffers - 234 ARB_color_buffer_float - 235 237 ARB_framebuffer_object - 238 264 ARB_shader_object - 265 ARB_vertex_shader - 266 268 ARB_geometry_shader4 - 269 277 EXT_gpu_shader4 - 278 289 NV_vertex_program4 - 290 301 ARB_vertex_buffer_object - 302 304 ARB_stencil_two_side - 305 310 OpenGL 2.1 core - 311 345 ARB_pixel_buffer_object - 346 347 EXT_texture_integer - 348 349 NV_conditional_render - 350 351 ARB_vertex_array_object - 352 354 EXT_draw_buffers2 - 355 363 OpenGL 3.0 core - 364 365 NV_primitive_restart - 366 ARB_uniform_buffer_object - 367 ARB_texture_buffer_object - 1008-1023 Reserved to IBM (unknown usage) - 1024-1039 Reserved to HP (originally Compaq) (unknown usage) - 1040-2047 Unused - 2048-3071 Reserved to SGI (2083-3071 unused) - 2048 2049 SGIS_multisample - 2050 SGIX_tag_sample_buffer - 2051 SGIS_detail_texture - 2052 SGIS_sharpen_texture - 2053 2056 SGI_color_table - 2057 2058 SGIS_texture4D - 2059 SGIX_pixel_texture - 2060 2063 SGIX_sprite - 2064 SGIS_texture_filter4 - 2065 2066 EXT_point_parameters/SGIS_point_parameters - 2067 SGIS_fog_function - 2068 unused? - 2069 2070 SGIX_instruments - 2071 SGIX_reference_plane - 2072 SGIX_framezoom - 2073 2076 unused? - 2077 SGIX_instruments - 2078 2081 SGIX_list_priority - 2082 SGIS_texture_color_mask - 3072-4095 Reserved to ARB (unused) - 4096-5151 Reserved to EXT (4460-5151 unused) - 4096 EXT_blend_color/1.2 - 4097 EXT_blend_minmax/1.2 - 4098 EXT_polygon_offset - 4099 4100 EXT_subtexture - 4101 4109 EXT_convolution/1.2 - 4110 4113 EXT_histogram/1.2 - 4114 EXT_texture3D/1.2 - 4115 EXT_subtexture/1.2 - 4116 EXT_vertex_array - 4117 4118 EXT_texture_object/1.1 - 4119 4123 EXT_copy_texture/1.1 - 4124 4125 EXT_fog_coord - 4126 4133 EXT_secondary_color - 4134 EXT_blend_func_separate - 4135 EXT_vertex_weighting - 4136 4142 NV_register_combiners - 4143 4144 NV_fence (4144 retired, used to be for FinishFence) - 4145 4179 NVIDIA (use TBD; was intended for NV_vertex_program) - 4180 4214 NV_vertex_program - 4215 4217 ARB_vertex_program - 4218 4219 NV_fragment_program - 4220 EXT_stencil_two_side - 4221 4222 NV_point_sprite - 4223 EXT_stencil_clear_tag - 4225 EXT_polygon_offset_clamp - 4228 EXT_blend_equation_separate - 4229 EXT_depth_bounds_test - 4230 4239 ARB_vertex_program - 4240 4264 NV_half_float - 4265 4280 NVIDIA (use TBD) - 4281 4282 EXT_gpu_program_parameters - 4283 4285 NV_depth_buffer_float - 4286 4290 NVIDIA (use TBD) - 4291 NV_copy_image - 4292 4293 EXT_texture_integer - 4294 4307 NVIDIA (use TBD) - 4308 4312 OES_single_precision (Khronos OpenGL ES 1.0) - 4313 4315 SUN (use TBD) - 4316 4325 EXT_framebuffer_object - 4326 4329 ARB_matrix_palette - 4330 EXT_framebuffer_blit - 4331 EXT_framebuffer_multisample - 4332 4347 NVIDIA (use TBD, bug 6720) - 4348 NV_texture_barrier - 4349 4459 NVIDIA (use TBD, bug 6720) - - 8192-8207 Reserved to HP (unknown usage) - 16384-16415 Reserved to SUN (unknown usage) - 24576-24607 Reserved to ADD (unknown usage) - - -GLX Enumerateds (32 Bits) -========================= -0x0-0xFF Reserved to EXT (visual attribute names) - 0x1 0x11 GLX 1.0 (attribute names) - 0x12 0x1F unused? - 0x20 GLX_EXT_visual_rating (attribute names) - 0x21 unused? - 0x22 0x28 GLX_EXT_visual_info (attribute names) -0x1F00-0x1F02 Reserved to ARB (shared with WGL) - 0x1F00 0x1F02 GLX_AMD_gpu_association -0x2070-0x209F Reserved to ARB (shared with WGL) - 0x2090 0x2094 GLX_ARB_create_context - 0x2095 GL_ARB_vertex_buffer_object - 0x2097 0x2098 GLX_ARB_context_flush_control -0x20A0-0x219F Reserved to NVIDIA (shared with WGL) - 0x20B0 GLX_NV_float_buffer - 0x20B1 GLX_EXT_fbconfig_packed_float - 0x20B2 GLX_ARB_framebuffer_sRGB (nee EXT) - 0x20B3 GLX_NV_multisample_coverage - 0x20B9 GLX_ARB_fbconfig_float - 0x20C3 0x20CC GLX_NV_video_out - 0x20CD 0x20CF GLX_NV_video_capture - 0x20D0 0x20EB GLX_EXT_texture_from_pixmap - 0x20F0 GLX_NV_present_video - 0x20F1 0x20F2 GLX_EXT_swap_control - 0x20F3 GLX_EXT_swap_control_tear - 0x20F4 GLX_EXT_buffer_age - 0x20F5 GLX_EXT_stereo_tree - 0x20F6 GLX_EXT_libglvnd - 0x20F7 GLX_NV_robustness_video_memory_purge -0x21A0-0x21AF Reserved to AMD (shared with WGL) - 0x21A2 0x21A8 GLX_AMD_gpu_association -0x31B3 Reserved to ARB (shared with WGL) - 0x31B3 GLX_ARB_create_context_no_error -0x8000-0x800F Reserved to EXT (0x800E-0x800F unused) - 0x8000 0x8009 GLX_EXT_visual_info - 0x800A 0x800C GLX_EXT_import_context - 0x800D GLX_EXT_visual_rating -0x8010-0x803F Reserved to SGI (0x8029-0x803F unused) - 0x8010 0x8015 GLX_SGIX_fbconfig - 0x8016 0x8023 GLX_SGIX_pbuffer - 0x8024 GLX_SGIX_dm_buffer - 0x8025 GLX_SGIS_blended_overlay - 0x8026 0x8027 GLX_SGIS_shared_multisample - 0x8028 GLX_SGIX_visual_select_group - 0x8030 GLX_SGIX_hyperpipe -0x8040-0x804F Reserved to OpenGL ARB - 0x8040 0x8041 GLX 1.3 -0x8050-0x805F Reserved to 3Dfx - 0x8050 0x8051 GLX_3DFX_multisample -0x8060-0x806F Reserved to OpenML SIG - 0x8060 0x8063 GLX_OML_swap_method -0x8070-0x816F Reserved to NVIDIA -0x8170-0x817F Reserved to SUN -0x8180-0x818F Reserved to Intel (0x818F unused) - 0x8180 0x8182 GLX_INTEL_swap_event - 0x8183 0x818E GLX_MESA_query_renderer -0x8250-0x826F Reserved to ARB (Shared with GL and WGL) - 0x8252 GLX_ARB_create_context_robustness - 0x8256 GLX_ARB_create_context_robustness - 0x8261 GLX_ARB_create_context_robustness -0x9126 GLX_ARB_create_context_profile (shared with WGL) - -100000-100011 Reserved to SGI (100002-100011 unused) - 100000 100001 GLX_SGIS_multisample/GLX_ARB_multisample - -GLX Error Codes -=============== - -(Extension reservations for vendor extensions should start sufficiently -high so they don't interfere with GLX core and GLX ARB extensions.) - -0 GLXBadContext OpenGL ARB (GLX core) -1 GLXBadContextState OpenGL ARB (GLX core) -2 GLXBadDrawable OpenGL ARB (GLX core) -3 GLXBadPixmap OpenGL ARB (GLX core) -4 GLXBadContextTag OpenGL ARB (GLX core) -5 GLXBadCurrentWindow OpenGL ARB (GLX core) -6 GLXBadRenderRequest OpenGL ARB (GLX core) -7 GLXBadLargeRequest OpenGL ARB (GLX core) -8 GLXUnsupportedPrivateRequest OpenGL ARB (GLX core) -9 GLXBadFBConfig OpenGL ARB (GLX core) -10 GLXBadPbuffer OpenGL ARB (GLX core) -11 GLXBadCurrentDrawable OpenGL ARB (GLX core) -12 GLXBadWindow OpenGL ARB (GLX core) -13 GLXBadProfileARB OpenGL ARB (GLX_ARB_create_context) - - -GLX Event Masks -=============== -0x08000000 GLX 1.3 / SGIX_pbuffer -0x04000000 Intel (INTEL_swap_event) - -GLX Event Codes -=============== - -(The X.org/Mesa GLX implementation derived from the SGI Sample -Implementation has __GLX_NUMBER_EVENTS == 17, suggesting that vendor -events should be allocated downwards from the first free value <= 16 -(14), and core GLX events allocated upwards). - -0 OpenGL ARB (GLX_PbufferClobber in GLX 1.3) -15 Intel (GLX_BufferSwapINTEL) -16 SGI (GLX_PbufferClobberSGIX) -64 SGI - -GLX protocol encoding for GL >= 2.0 -=================================== - -(This section - this whole file really - should eventually be incorporated -in a proper update of the GLX protocol specification.) - -OpenGL 2.0 ----------- - - DeleteShader - - 1 CARD8 opcode (X assigned) - 1 195 GLX opcode - 2 3 request length - 4 GLX_CONTEXT_TAG context tag - 4 CARD32 shader - - IsShader - - 1 CARD8 opcode (X assigned) - 1 196 GLX opcode - 2 3 request length - 4 GLX_CONTEXT_TAG context tag - 4 CARD32 shader - => - 1 1 reply - 1 unused - 2 CARD16 sequence number - 4 0 reply length - 4 BOOL32 return value - 20 unused - - IsProgram - - 1 CARD8 opcode (X assigned) - 1 197 GLX opcode - 2 3 request length - 4 GLX_CONTEXT_TAG context tag - 4 CARD32 program - => - 1 1 reply - 1 unused - 2 CARD16 sequence number - 4 0 reply length - 4 BOOL32 return value - 20 unused - - GetShaderiv - - 1 CARD8 opcode (X assigned) - 1 198 GLX opcode - 2 4 request length - 4 GLX_CONTEXT_TAG context tag - 4 CARD32 program - 4 CARD32 pname - => - 1 1 reply - 1 unused - 2 CARD16 sequence number - 4 m reply length, m = (n == 1 ? 0 : n) - 4 unused - 4 CARD32 n - - if (n == 1) this follows: - - 4 CARD32 params - 12 unused - - otherwise this follows: - - 16 unused - n*4 LISTOFCARD32 params - - Note that n may be 0, indicating that a GL error occurred. - - GetProgramiv - - 1 CARD8 opcode (X assigned) - 1 199 GLX opcode - 2 4 request length - 4 GLX_CONTEXT_TAG context tag - 4 CARD32 program - 4 CARD32 pname - => - 1 1 reply - 1 unused - 2 CARD16 sequence number - 4 m reply length, m = (n == 1 ? 0 : n) - 4 unused - 4 CARD32 n - - if (n == 1) this follows: - - 4 CARD32 params - 12 unused - - otherwise this follows: - - 16 unused - n*4 LISTofCARD32 params - - Note that n may be 0, indicating that a GL error occurred. - - GetShaderInfoLog - - 1 CARD8 opcode (X assigned) - 1 200 GLX opcode - 2 4 request length - 4 GLX_CONTEXT_TAG context tag - 4 CARD32 shader - 4 CARD32 bufSize - => - 1 1 reply - 1 unused - 2 CARD16 sequence number - 4 m reply length, m = (n + p) / 4 - 4 unused - 4 CARD32 n, n = length + 1 - 16 unused - n LISTofBYTE infoLog - p unused, p=pad(n) - - Note that n may be 0, indicating that a GL error occurred. - - GetProgramInfoLog - - 1 CARD8 opcode (X assigned) - 1 201 GLX opcode - 2 4 request length - 4 GLX_CONTEXT_TAG context tag - 4 CARD32 program - 4 CARD32 bufSize - => - 1 1 reply - 1 unused - 2 CARD16 sequence number - 4 m reply length, m = (n + p) / 4 - 4 unused - 4 CARD32 n, n = length + 1 - 16 unused - n LISTofBYTE infoLog - p unused, p=pad(n) - - Note that n may be 0, indicating that a GL error occurred. - - DeleteProgram - - 1 CARD8 opcode (X assigned) - 1 202 GLX opcode - 2 3 request length - 4 GLX_CONTEXT_TAG context tag - 4 CARD32 program - -OpenGL 2.1 ----------- - - UniformMatrix2x3fv - - 2 16+4*count*2*3 rendering command length - 2 305 rendering command opcode - 4 CARD32 location - 4 CARD32 count - 1 BOOL transpose - 3 unused - 4*count*2*3 LISTofFLOAT32 value - - If the command is encoded in a glXRenderLarge request, the - command opcode and command length fields above are expanded to - 4 bytes each: - - 4 20+4*count*2*2 rendering command length - 4 305 rendering command opcode - - UniformMatrix3x2fv - - 2 16+4*count*3*2 rendering command length - 2 306 rendering command opcode - 4 CARD32 location - 4 CARD32 count - 1 BOOL transpose - 3 unused - 4*count*3*2 LISTofFLOAT32 value - - If the command is encoded in a glXRenderLarge request, the - command opcode and command length fields above are expanded to - 4 bytes each: - - 4 20+4*count*3*2 rendering command length - 4 306 rendering command opcode - - UniformMatrix2x4fv - - 2 16+4*count*2*4 rendering command length - 2 307 rendering command opcode - 4 CARD32 location - 4 CARD32 count - 1 BOOL transpose - 3 unused - 4*count*2*4 LISTofFLOAT32 value - - If the command is encoded in a glXRenderLarge request, the - command opcode and command length fields above are expanded to - 4 bytes each: - - 4 20+4*count*2*4 rendering command length - 4 307 rendering command opcode - - UniformMatrix4x2fv - - 2 16+4*count*4*2 rendering command length - 2 308 rendering command opcode - 4 CARD32 location - 4 CARD32 count - 1 BOOL transpose - 3 unused - 4*count*4*2 LISTofFLOAT32 value - - If the command is encoded in a glXRenderLarge request, the - command opcode and command length fields above are expanded to - 4 bytes each: - - 4 20+4*count*4*2 rendering command length - 4 308 rendering command opcode - - UniformMatrix3x4fv - - 2 16+4*count*3*4 rendering command length - 2 309 rendering command opcode - 4 CARD32 location - 4 CARD32 count - 1 BOOL transpose - 3 unused - 4*count*3*4 LISTofFLOAT32 value - - If the command is encoded in a glXRenderLarge request, the - command opcode and command length fields above are expanded to - 4 bytes each: - - 4 20+4*count*3*4 rendering command length - 4 309 rendering command opcode - - UniformMatrix4x3fv - - 2 16+4*count*4*3 rendering command length - 2 310 rendering command opcode - 4 CARD32 location - 4 CARD32 count - 1 BOOL transpose - 3 unused - 4*count*4*3 LISTofFLOAT32 value - - If the command is encoded in a glXRenderLarge request, the - command opcode and command length fields above are expanded to - 4 bytes each: - - 4 20+4*count*4*3 rendering command length - 4 310 rendering command opcode - -OpenGL 3.0 ----------- - - The following rendering commands are sent to the sever as part of a - glXRender request: - - BindBufferRange - - 2 32 rendering command length - 2 355 rendering command opcode - 8 INT64 offset - 8 INT64 size - 4 ENUM target - 4 CARD32 index - 4 CARD32 buffer - - BindBufferBase - - 2 16 rendering command length - 2 356 rendering command opcode - 4 ENUM target - 4 CARD32 index - 4 CARD32 buffer - - BeginTransformFeedback - - 2 8 rendering command length - 2 357 rendering command opcode - 4 ENUM primitiveMode - - EndTransformFeedback - - 2 4 rendering command length - 2 358 rendering command opcode - - ClearBufferfi - - 2 20 rendering command length - 2 360 rendering command opcode - 4 ENUM buffer - 4 CARD32 drawbuffer - 4 FLOAT32 depth - 4 CARD32 stencil - - ClearBufferfv - - 2 12+(4*n) rendering command length - 2 361 rendering command opcode - 4 ENUM buffer - 0x1800 n=4 GL_COLOR - 0x1801 n=1 GL_STENCIL - 0x1802 n=1 GL_DEPTH - else n=0 - 4 CARD32 drawbuffer - 4*n LISTofFLOAT32 value - - ClearBufferiv - - 2 12+(4*n) rendering command length - 2 362 rendering command opcode - 4 ENUM buffer - 0x1800 n=4 GL_COLOR - 0x1801 n=1 GL_STENCIL - 0x1802 n=1 GL_DEPTH - else n=0 - 4 CARD32 drawbuffer - 4*n LISTofINT32 value - - ClearBufferuiv - - 2 12+(4*n) rendering command length - 2 363 rendering command opcode - 4 ENUM buffer - 0x1800 n=4 GL_COLOR - 0x1801 n=1 GL_STENCIL - 0x1802 n=1 GL_DEPTH - else n=0 - 4 CARD32 drawbuffer - 4*n LISTofCARD32 value - - The following rendering commands can be sent in a glXRender - or glXRenderLarge request. - - TransformFeedbackVaryings - - 2 16+(n*4)+s+p rendering command length - 2 359 rendering command opcode - 4 CARD32 program - 4 INT32 count - 4 ENUM buffermode - n*4 LISTofINT32 lengths[n], n = count - s LISTofCHAR varyings, s = sum of all entries in the lengths - array - p unused, p = pad(s) - - If the command is encoded in a glXRenderLarge request, the command - opcode and command length fields are expanded to 4 bytes each. - - 4 20+(n*4)+s+p rendering command length - 4 359 rendering command opcode - - lengths[i] is calculated as strlen(varyings[i]) + 1. The NUL terminator - is included when sending the varyings. - - The following single commands are sent to the server as part of a - glXSingle request: - - GetTransformFeedbackVarying - - 1 CARD8 opcode(X assigned) - 1 213 GLX opcode - 2 5 request length - 4 GLX_CONTEXT_TAG context tag - 4 CARD32 program - 4 CARD32 index - 4 CARD32 bufsize - => - 1 1 reply - 1 unused - 2 CARD16 sequence number - 4 m reply length, m = (n == 0 ? 0 : (n + p) / 4) - 4 unused - 4 n-1 length - 4 INT32 size - 4 INT32 type - 8 unused - n LISTofCHAR name, n = strlen(name)+1 - p unused, p = pad(m) - - GetStringi - - 1 CARD8 opcode (X assigned) - 1 214 GLX opcode - 2 4 request length - 4 GLX_CONTEXT_TAG context tag - 4 ENUM name - 4 CARD32 index - => - 1 1 reply - 1 1 unused - 2 CARD16 sequence number - 4 m reply length, m = (n + p) / 4 - 4 unused - 4 CARD32 n - 16 unused - n STRING8 string - p unused, p=pad(n) +This is the registry of GLX opcodes, error codes, and event codes. It is +very rarely modified since there is almost no interest in supporting GLX +with modern OpenGL features, and the work of extending the XML schema to +express it is not worthwhile. + +When new GLX protocol is needed for extension specifications, allocate it +here and reflect it in the extension specification document as well as, if +appropriate, glx.xml. + +Reserved opcode ranges assigned to vendors, and in some cases, opcodes +actually assigned within that range are tracked here. Not all opcodes used +by vendors are known. + +GLX Opcodes (8 bits) +==================== + 1-15 GLX 1.0 + 16 Vendor Private + 17 Vendor Private with Reply + 18-20 GLX 1.1 + 21-32 GLX 1.3 + 33 glXSetClientInfoARB (GLX_ARB_create_context) + 34 glXCreateContextAttribsARB (GLX_ARB_create_context) + 35 glXSetClientInfo2ARB (GLX_ARB_create_context) + +GLX Vendor Private / Vendor Private with Reply opcodes (32-bits) + (first 4 bytes past standard X header) +================================================================ + + 0 255 EXT (various - contact SGI) + 256 271 HP (originally Compaq) + (272-511 unused) + 512 575 E&S + (576-1023 unused) + 1024 1269 EXT (various - contact SGI) + 1024 GLX_EXT_import_context + 1270 1275 NV_register_combiners + 1276 1280 NV_fence + 1281 1292 NVIDIA (use TBD; was intended for NV_vertex_program) + 1293 1308 NV_vertex_program / ARB_vertex_program / ARB_fragment_program + 1309 NVIDIA (use TBD) + 1310 1311 NV_fragment_program + 1312 NV_fence + 1313 1318 GLX_NV_video_output + 1319 1320 NV_vertex_program + 1321 1326 NVIDIA (use TBD) + 1327 NV_register_combiners2 + 1328 1329 EXT_timer_query + 1330 1331 GLX_EXT_texture_from_pixmap + 1332 1339 NV_present_video + 1340 NVIDIA (use TBD) + 1341 GLX_NV_delay_before_swap + 1342 1359 NVIDIA (use TBD) + 1360 GLX_NV_copy_image + 1361 1364 NVIDIA (use TBD) + 1365 1368 NV_gpu_program4 + 1369 1386 NVIDIA (use TBD) + 1387 1388 GLX_NV_copy_buffer + 1389 1399 NVIDIA (use TBD) + 1400 1415 NV_video_capture + 1416 GLX_EXT_swap_control + 1417 1420 NVIDIA (use TBD) + 1421 OES_single_precision (Khronos OpenGL ES 1.0) + 1422 1428 EXT_framebuffer_object + (1429-2047 unused) + 2048 2064 SUN + 3000 3999 IBM + 4096 5151 SGI (4106-5151 unused) + 4096 SGIS_detail_texture + 4097 SGIS_sharpen_texture + 4098 4100 SGI_color_table + 4101 SGIS_texture_filter4 + 4102 4104 SGIX_instruments + 4105 SGIX_flush_raster + 5152 5184 Mesa (unknown use) + 8192 8207 HP + 16384 16399 ADD + 65536 66575 SGI (various GLX extensions) + 65536 GLX_SGI_swap_control + 65537 GLX_SGI_make_current_read + 65538 65539 GLX_SGIX_video_source + 65540 65542 GLX_SGIX_fbconfig + 65543 65546 GLX_SGIX_pbuffer + 65547 GLX_SGIX_swap_group + 65548 65549 GLX_SGIX_swap_barrier + 65550 65553 GLX_SGIX_hyperpipe_group + 65554 GLX_SGIX_query_board_num (internal, for shm) + +OpenGL Single Opcodes (8 Bits) +=============================== + + 167-up Reserved + 0 146 OpenGL 1.0/1.1 core + 147 159 OpenGL 1.2 core + 160 160 ARB_texture_compression + 161 166 ARB_occlusion_query + 167 178 ARB_shader_objects + 179 181 ARB_vertex_shader + 182 183 EXT_gpu_shader4 + 184 185 NV_vertex_program4 + 186 194 ARB_vertex_buffer_object + 195 202 OpenGL 2.0 core + 203 204 EXT_texture_integer + 205 205 ARB_map_buffer_range + 206 209 ARB_vertex_array_object + 210 212 EXT_draw_buffers2 + 213 214 OpenGL 3.0 core + 215 220 ARB_uniform_buffer_object + 221 ARB_copy_buffer + +OpenGL Rendering Opcodes (16 Bits) +================================== + + 0-1007 Reserved to ARB (231-1007 unused) + 0 191 OpenGL 1.0 core (140 deprecated?) + 192 194 OpenGL 1.1 core + 195 196 OpenGL 1.2 core + 197 213 ARB_multitexture + 214 219 ARB_texture_compression + 220 228 ARB_vertex_blend + 229 ARB_multisample + 230 ARB_window_pos + 231 232 ARB_occlusion_query + 233 ARB_draw_buffers + 234 ARB_color_buffer_float + 235 237 ARB_framebuffer_object + 238 264 ARB_shader_object + 265 ARB_vertex_shader + 266 268 ARB_geometry_shader4 + 269 277 EXT_gpu_shader4 + 278 289 NV_vertex_program4 + 290 301 ARB_vertex_buffer_object + 302 304 ARB_stencil_two_side + 305 310 OpenGL 2.1 core + 311 345 ARB_pixel_buffer_object + 346 347 EXT_texture_integer + 348 349 NV_conditional_render + 350 351 ARB_vertex_array_object + 352 354 EXT_draw_buffers2 + 355 363 OpenGL 3.0 core + 364 365 NV_primitive_restart + 366 ARB_uniform_buffer_object + 367 ARB_texture_buffer_object + 1008-1023 Reserved to IBM (unknown usage) + 1024-1039 Reserved to HP (originally Compaq) (unknown usage) + 1040-2047 Unused + 2048-3071 Reserved to SGI (2083-3071 unused) + 2048 2049 SGIS_multisample + 2050 SGIX_tag_sample_buffer + 2051 SGIS_detail_texture + 2052 SGIS_sharpen_texture + 2053 2056 SGI_color_table + 2057 2058 SGIS_texture4D + 2059 SGIX_pixel_texture + 2060 2063 SGIX_sprite + 2064 SGIS_texture_filter4 + 2065 2066 EXT_point_parameters/SGIS_point_parameters + 2067 SGIS_fog_function + 2068 unused? + 2069 2070 SGIX_instruments + 2071 SGIX_reference_plane + 2072 SGIX_framezoom + 2073 2076 unused? + 2077 SGIX_instruments + 2078 2081 SGIX_list_priority + 2082 SGIS_texture_color_mask + 3072-4095 Reserved to ARB (unused) + 4096-5151 Reserved to EXT (4460-5151 unused) + 4096 EXT_blend_color/1.2 + 4097 EXT_blend_minmax/1.2 + 4098 EXT_polygon_offset + 4099 4100 EXT_subtexture + 4101 4109 EXT_convolution/1.2 + 4110 4113 EXT_histogram/1.2 + 4114 EXT_texture3D/1.2 + 4115 EXT_subtexture/1.2 + 4116 EXT_vertex_array + 4117 4118 EXT_texture_object/1.1 + 4119 4123 EXT_copy_texture/1.1 + 4124 4125 EXT_fog_coord + 4126 4133 EXT_secondary_color + 4134 EXT_blend_func_separate + 4135 EXT_vertex_weighting + 4136 4142 NV_register_combiners + 4143 4144 NV_fence (4144 retired, used to be for FinishFence) + 4145 4179 NVIDIA (use TBD; was intended for NV_vertex_program) + 4180 4214 NV_vertex_program + 4215 4217 ARB_vertex_program + 4218 4219 NV_fragment_program + 4220 EXT_stencil_two_side + 4221 4222 NV_point_sprite + 4223 EXT_stencil_clear_tag + 4225 EXT_polygon_offset_clamp + 4228 EXT_blend_equation_separate + 4229 EXT_depth_bounds_test + 4230 4239 ARB_vertex_program + 4240 4264 NV_half_float + 4265 4280 NVIDIA (use TBD) + 4281 4282 EXT_gpu_program_parameters + 4283 4285 NV_depth_buffer_float + 4286 4290 NVIDIA (use TBD) + 4291 NV_copy_image + 4292 4293 EXT_texture_integer + 4294 4307 NVIDIA (use TBD) + 4308 4312 OES_single_precision (Khronos OpenGL ES 1.0) + 4313 4315 SUN (use TBD) + 4316 4325 EXT_framebuffer_object + 4326 4329 ARB_matrix_palette + 4330 EXT_framebuffer_blit + 4331 EXT_framebuffer_multisample + 4332 4347 NVIDIA (use TBD, bug 6720) + 4348 NV_texture_barrier + 4349 4459 NVIDIA (use TBD, bug 6720) + + 8192-8207 Reserved to HP (unknown usage) + 16384-16415 Reserved to SUN (unknown usage) + 24576-24607 Reserved to ADD (unknown usage) + + +GLX Enumerateds (32 Bits) +========================= +0x0-0xFF Reserved to EXT (visual attribute names) + 0x1 0x11 GLX 1.0 (attribute names) + 0x12 0x1F unused? + 0x20 GLX_EXT_visual_rating (attribute names) + 0x21 unused? + 0x22 0x28 GLX_EXT_visual_info (attribute names) +0x1F00-0x1F02 Reserved to ARB (shared with WGL) + 0x1F00 0x1F02 GLX_AMD_gpu_association +0x2070-0x209F Reserved to ARB (shared with WGL) + 0x2090 0x2094 GLX_ARB_create_context + 0x2095 GL_ARB_vertex_buffer_object + 0x2097 0x2098 GLX_ARB_context_flush_control +0x20A0-0x219F Reserved to NVIDIA (shared with WGL) + 0x20B0 GLX_NV_float_buffer + 0x20B1 GLX_EXT_fbconfig_packed_float + 0x20B2 GLX_ARB_framebuffer_sRGB (nee EXT) + 0x20B3 GLX_NV_multisample_coverage + 0x20B9 GLX_ARB_fbconfig_float + 0x20C3 0x20CC GLX_NV_video_out + 0x20CD 0x20CF GLX_NV_video_capture + 0x20D0 0x20EB GLX_EXT_texture_from_pixmap + 0x20F0 GLX_NV_present_video + 0x20F1 0x20F2 GLX_EXT_swap_control + 0x20F3 GLX_EXT_swap_control_tear + 0x20F4 GLX_EXT_buffer_age + 0x20F5 GLX_EXT_stereo_tree + 0x20F6 GLX_EXT_libglvnd + 0x20F7 GLX_NV_robustness_video_memory_purge +0x21A0-0x21AF Reserved to AMD (shared with WGL) + 0x21A2 0x21A8 GLX_AMD_gpu_association +0x31B3 Reserved to ARB (shared with WGL) + 0x31B3 GLX_ARB_create_context_no_error +0x8000-0x800F Reserved to EXT (0x800E-0x800F unused) + 0x8000 0x8009 GLX_EXT_visual_info + 0x800A 0x800C GLX_EXT_import_context + 0x800D GLX_EXT_visual_rating +0x8010-0x803F Reserved to SGI (0x8029-0x803F unused) + 0x8010 0x8015 GLX_SGIX_fbconfig + 0x8016 0x8023 GLX_SGIX_pbuffer + 0x8024 GLX_SGIX_dm_buffer + 0x8025 GLX_SGIS_blended_overlay + 0x8026 0x8027 GLX_SGIS_shared_multisample + 0x8028 GLX_SGIX_visual_select_group + 0x8030 GLX_SGIX_hyperpipe +0x8040-0x804F Reserved to OpenGL ARB + 0x8040 0x8041 GLX 1.3 +0x8050-0x805F Reserved to 3Dfx + 0x8050 0x8051 GLX_3DFX_multisample +0x8060-0x806F Reserved to OpenML SIG + 0x8060 0x8063 GLX_OML_swap_method +0x8070-0x816F Reserved to NVIDIA +0x8170-0x817F Reserved to SUN +0x8180-0x818F Reserved to Intel (0x818F unused) + 0x8180 0x8182 GLX_INTEL_swap_event + 0x8183 0x818E GLX_MESA_query_renderer +0x8250-0x826F Reserved to ARB (Shared with GL and WGL) + 0x8252 GLX_ARB_create_context_robustness + 0x8256 GLX_ARB_create_context_robustness + 0x8261 GLX_ARB_create_context_robustness +0x9126 GLX_ARB_create_context_profile (shared with WGL) + +100000-100011 Reserved to SGI (100002-100011 unused) + 100000 100001 GLX_SGIS_multisample/GLX_ARB_multisample + +GLX Error Codes +=============== + +(Extension reservations for vendor extensions should start sufficiently +high so they don't interfere with GLX core and GLX ARB extensions.) + +0 GLXBadContext OpenGL ARB (GLX core) +1 GLXBadContextState OpenGL ARB (GLX core) +2 GLXBadDrawable OpenGL ARB (GLX core) +3 GLXBadPixmap OpenGL ARB (GLX core) +4 GLXBadContextTag OpenGL ARB (GLX core) +5 GLXBadCurrentWindow OpenGL ARB (GLX core) +6 GLXBadRenderRequest OpenGL ARB (GLX core) +7 GLXBadLargeRequest OpenGL ARB (GLX core) +8 GLXUnsupportedPrivateRequest OpenGL ARB (GLX core) +9 GLXBadFBConfig OpenGL ARB (GLX core) +10 GLXBadPbuffer OpenGL ARB (GLX core) +11 GLXBadCurrentDrawable OpenGL ARB (GLX core) +12 GLXBadWindow OpenGL ARB (GLX core) +13 GLXBadProfileARB OpenGL ARB (GLX_ARB_create_context) + + +GLX Event Masks +=============== +0x08000000 GLX 1.3 / SGIX_pbuffer +0x04000000 Intel (INTEL_swap_event) + +GLX Event Codes +=============== + +(The X.org/Mesa GLX implementation derived from the SGI Sample +Implementation has __GLX_NUMBER_EVENTS == 17, suggesting that vendor +events should be allocated downwards from the first free value <= 16 +(14), and core GLX events allocated upwards). + +0 OpenGL ARB (GLX_PbufferClobber in GLX 1.3) +15 Intel (GLX_BufferSwapINTEL) +16 SGI (GLX_PbufferClobberSGIX) +64 SGI + +GLX protocol encoding for GL >= 2.0 +=================================== + +(This section - this whole file really - should eventually be incorporated +in a proper update of the GLX protocol specification.) + +OpenGL 2.0 +---------- + + DeleteShader + + 1 CARD8 opcode (X assigned) + 1 195 GLX opcode + 2 3 request length + 4 GLX_CONTEXT_TAG context tag + 4 CARD32 shader + + IsShader + + 1 CARD8 opcode (X assigned) + 1 196 GLX opcode + 2 3 request length + 4 GLX_CONTEXT_TAG context tag + 4 CARD32 shader + => + 1 1 reply + 1 unused + 2 CARD16 sequence number + 4 0 reply length + 4 BOOL32 return value + 20 unused + + IsProgram + + 1 CARD8 opcode (X assigned) + 1 197 GLX opcode + 2 3 request length + 4 GLX_CONTEXT_TAG context tag + 4 CARD32 program + => + 1 1 reply + 1 unused + 2 CARD16 sequence number + 4 0 reply length + 4 BOOL32 return value + 20 unused + + GetShaderiv + + 1 CARD8 opcode (X assigned) + 1 198 GLX opcode + 2 4 request length + 4 GLX_CONTEXT_TAG context tag + 4 CARD32 program + 4 CARD32 pname + => + 1 1 reply + 1 unused + 2 CARD16 sequence number + 4 m reply length, m = (n == 1 ? 0 : n) + 4 unused + 4 CARD32 n + + if (n == 1) this follows: + + 4 CARD32 params + 12 unused + + otherwise this follows: + + 16 unused + n*4 LISTOFCARD32 params + + Note that n may be 0, indicating that a GL error occurred. + + GetProgramiv + + 1 CARD8 opcode (X assigned) + 1 199 GLX opcode + 2 4 request length + 4 GLX_CONTEXT_TAG context tag + 4 CARD32 program + 4 CARD32 pname + => + 1 1 reply + 1 unused + 2 CARD16 sequence number + 4 m reply length, m = (n == 1 ? 0 : n) + 4 unused + 4 CARD32 n + + if (n == 1) this follows: + + 4 CARD32 params + 12 unused + + otherwise this follows: + + 16 unused + n*4 LISTofCARD32 params + + Note that n may be 0, indicating that a GL error occurred. + + GetShaderInfoLog + + 1 CARD8 opcode (X assigned) + 1 200 GLX opcode + 2 4 request length + 4 GLX_CONTEXT_TAG context tag + 4 CARD32 shader + 4 CARD32 bufSize + => + 1 1 reply + 1 unused + 2 CARD16 sequence number + 4 m reply length, m = (n + p) / 4 + 4 unused + 4 CARD32 n, n = length + 1 + 16 unused + n LISTofBYTE infoLog + p unused, p=pad(n) + + Note that n may be 0, indicating that a GL error occurred. + + GetProgramInfoLog + + 1 CARD8 opcode (X assigned) + 1 201 GLX opcode + 2 4 request length + 4 GLX_CONTEXT_TAG context tag + 4 CARD32 program + 4 CARD32 bufSize + => + 1 1 reply + 1 unused + 2 CARD16 sequence number + 4 m reply length, m = (n + p) / 4 + 4 unused + 4 CARD32 n, n = length + 1 + 16 unused + n LISTofBYTE infoLog + p unused, p=pad(n) + + Note that n may be 0, indicating that a GL error occurred. + + DeleteProgram + + 1 CARD8 opcode (X assigned) + 1 202 GLX opcode + 2 3 request length + 4 GLX_CONTEXT_TAG context tag + 4 CARD32 program + +OpenGL 2.1 +---------- + + UniformMatrix2x3fv + + 2 16+4*count*2*3 rendering command length + 2 305 rendering command opcode + 4 CARD32 location + 4 CARD32 count + 1 BOOL transpose + 3 unused + 4*count*2*3 LISTofFLOAT32 value + + If the command is encoded in a glXRenderLarge request, the + command opcode and command length fields above are expanded to + 4 bytes each: + + 4 20+4*count*2*2 rendering command length + 4 305 rendering command opcode + + UniformMatrix3x2fv + + 2 16+4*count*3*2 rendering command length + 2 306 rendering command opcode + 4 CARD32 location + 4 CARD32 count + 1 BOOL transpose + 3 unused + 4*count*3*2 LISTofFLOAT32 value + + If the command is encoded in a glXRenderLarge request, the + command opcode and command length fields above are expanded to + 4 bytes each: + + 4 20+4*count*3*2 rendering command length + 4 306 rendering command opcode + + UniformMatrix2x4fv + + 2 16+4*count*2*4 rendering command length + 2 307 rendering command opcode + 4 CARD32 location + 4 CARD32 count + 1 BOOL transpose + 3 unused + 4*count*2*4 LISTofFLOAT32 value + + If the command is encoded in a glXRenderLarge request, the + command opcode and command length fields above are expanded to + 4 bytes each: + + 4 20+4*count*2*4 rendering command length + 4 307 rendering command opcode + + UniformMatrix4x2fv + + 2 16+4*count*4*2 rendering command length + 2 308 rendering command opcode + 4 CARD32 location + 4 CARD32 count + 1 BOOL transpose + 3 unused + 4*count*4*2 LISTofFLOAT32 value + + If the command is encoded in a glXRenderLarge request, the + command opcode and command length fields above are expanded to + 4 bytes each: + + 4 20+4*count*4*2 rendering command length + 4 308 rendering command opcode + + UniformMatrix3x4fv + + 2 16+4*count*3*4 rendering command length + 2 309 rendering command opcode + 4 CARD32 location + 4 CARD32 count + 1 BOOL transpose + 3 unused + 4*count*3*4 LISTofFLOAT32 value + + If the command is encoded in a glXRenderLarge request, the + command opcode and command length fields above are expanded to + 4 bytes each: + + 4 20+4*count*3*4 rendering command length + 4 309 rendering command opcode + + UniformMatrix4x3fv + + 2 16+4*count*4*3 rendering command length + 2 310 rendering command opcode + 4 CARD32 location + 4 CARD32 count + 1 BOOL transpose + 3 unused + 4*count*4*3 LISTofFLOAT32 value + + If the command is encoded in a glXRenderLarge request, the + command opcode and command length fields above are expanded to + 4 bytes each: + + 4 20+4*count*4*3 rendering command length + 4 310 rendering command opcode + +OpenGL 3.0 +---------- + + The following rendering commands are sent to the sever as part of a + glXRender request: + + BindBufferRange + + 2 32 rendering command length + 2 355 rendering command opcode + 8 INT64 offset + 8 INT64 size + 4 ENUM target + 4 CARD32 index + 4 CARD32 buffer + + BindBufferBase + + 2 16 rendering command length + 2 356 rendering command opcode + 4 ENUM target + 4 CARD32 index + 4 CARD32 buffer + + BeginTransformFeedback + + 2 8 rendering command length + 2 357 rendering command opcode + 4 ENUM primitiveMode + + EndTransformFeedback + + 2 4 rendering command length + 2 358 rendering command opcode + + ClearBufferfi + + 2 20 rendering command length + 2 360 rendering command opcode + 4 ENUM buffer + 4 CARD32 drawbuffer + 4 FLOAT32 depth + 4 CARD32 stencil + + ClearBufferfv + + 2 12+(4*n) rendering command length + 2 361 rendering command opcode + 4 ENUM buffer + 0x1800 n=4 GL_COLOR + 0x1801 n=1 GL_STENCIL + 0x1802 n=1 GL_DEPTH + else n=0 + 4 CARD32 drawbuffer + 4*n LISTofFLOAT32 value + + ClearBufferiv + + 2 12+(4*n) rendering command length + 2 362 rendering command opcode + 4 ENUM buffer + 0x1800 n=4 GL_COLOR + 0x1801 n=1 GL_STENCIL + 0x1802 n=1 GL_DEPTH + else n=0 + 4 CARD32 drawbuffer + 4*n LISTofINT32 value + + ClearBufferuiv + + 2 12+(4*n) rendering command length + 2 363 rendering command opcode + 4 ENUM buffer + 0x1800 n=4 GL_COLOR + 0x1801 n=1 GL_STENCIL + 0x1802 n=1 GL_DEPTH + else n=0 + 4 CARD32 drawbuffer + 4*n LISTofCARD32 value + + The following rendering commands can be sent in a glXRender + or glXRenderLarge request. + + TransformFeedbackVaryings + + 2 16+(n*4)+s+p rendering command length + 2 359 rendering command opcode + 4 CARD32 program + 4 INT32 count + 4 ENUM buffermode + n*4 LISTofINT32 lengths[n], n = count + s LISTofCHAR varyings, s = sum of all entries in the lengths + array + p unused, p = pad(s) + + If the command is encoded in a glXRenderLarge request, the command + opcode and command length fields are expanded to 4 bytes each. + + 4 20+(n*4)+s+p rendering command length + 4 359 rendering command opcode + + lengths[i] is calculated as strlen(varyings[i]) + 1. The NUL terminator + is included when sending the varyings. + + The following single commands are sent to the server as part of a + glXSingle request: + + GetTransformFeedbackVarying + + 1 CARD8 opcode(X assigned) + 1 213 GLX opcode + 2 5 request length + 4 GLX_CONTEXT_TAG context tag + 4 CARD32 program + 4 CARD32 index + 4 CARD32 bufsize + => + 1 1 reply + 1 unused + 2 CARD16 sequence number + 4 m reply length, m = (n == 0 ? 0 : (n + p) / 4) + 4 unused + 4 n-1 length + 4 INT32 size + 4 INT32 type + 8 unused + n LISTofCHAR name, n = strlen(name)+1 + p unused, p = pad(m) + + GetStringi + + 1 CARD8 opcode (X assigned) + 1 214 GLX opcode + 2 4 request length + 4 GLX_CONTEXT_TAG context tag + 4 ENUM name + 4 CARD32 index + => + 1 1 reply + 1 1 unused + 2 CARD16 sequence number + 4 m reply length, m = (n + p) / 4 + 4 unused + 4 CARD32 n + 16 unused + n STRING8 string + p unused, p=pad(n) diff --git a/StgSharp.GenerateGL/xml/readme.tex b/StgSharp.GenerateGL/xml/readme.tex index 91381264..ee702c84 100644 --- a/StgSharp.GenerateGL/xml/readme.tex +++ b/StgSharp.GenerateGL/xml/readme.tex @@ -1,1050 +1,1050 @@ -\documentclass{article} - -% Various packages of possible use. {index} creates problems for some reason. -% \usepackage{index} -\def\specpdftitle{The Khronos OpenGL API Registry Schema} -\usepackage[pdftex,bookmarksnumbered=true,linktocpage,plainpages=false,pdftitle={\specpdftitle},colorlinks=true]{hyperref} -\usepackage{amsmath,enumerate,epsfig,framed,mdframed,multicol,longtable,times,url} -\usepackage[normalem]{ulem} -% underscore allows use of _ instead of \_ in text. [strings] allows _ in file names -\usepackage[strings]{underscore} -\usepackage[breakwords,fit]{truncate} - -\makeatletter -\makeatother -\makeindex - -% Some commonly used abbreviations - -\def\code#1{{\tt #1}} -\def\tag#1{{\tt <#1>\index{<#1>}}} -\def\attr#1{{\tt #1\index{#1}}} - -\begin{document} - -\title{The Khronos OpenGL API Registry Schema} -\author{Jon Leech} -\date{Last updated 2020-10-27} -\maketitle - -\begin{abstract} - -This document describes the Khronos OpenGL API Registry XML schema, and provides -some additional information about using the registry and scripts to generate -C header files. The underlying XML files and scripts, as well as headers -generated from the current authoritative copy of the XML files, can be -obtained from the OpenGL-Registry github repository at - -\begin{center} -{\bf \href{https://github.com/KhronosGroup/OpenGL-Registry} - {https://github.com/KhronosGroup/OpenGL-Registry}} -\end{center} - -\end{abstract} - -\tableofcontents - -\section{Introduction} - -The registry uses an XML representation of the API and a set of Python 3 -scripts to manipulate the XML, based on the lxml Python bindings. It comes -with an XML schema and validator. Outside users are welcome to submit pull -requests on github, although the XML schema itself is mature and unlikely to -change at this point. - -Other APIs defined by Khronos, such as Vulkan and OpenXR, use a similar XML -schema originally based on the OpenGL schema to describe those APIs. - -Some groups outside Khronos have their own XML based API descriptions, -often used for additional purposes such as library code generators or -extension loaders, and it may be desirable to construct XSLT or other -translators between the schema. - - -\section{Getting Started} - -Once the repository has been downloaded, if you're running -in a Linux command-line environment and have Python 3, the lxml Python -bindings, and libxml installed, you should just be able to invoke -\code{make} and generate C/C++ header files for all the following -targets: - -\begin{itemize} -\item \code{GL/glext.h} - OpenGL 1.2 (and later) compatibility profile - API + extensions -\item \code{GL/glcorearb.h} - OpenGL core profile API + extensions -\item \code{GLES/gl.h} - OpenGL compatibility profile API -\item \code{GLES/glext.h} - OpenGL ES 1.x extensions -\item \code{GLES2/gl2.h} - OpenGL ES 2.x API -\item \code{GLES2/gl2ext.h} - OpenGL ES 2.x extensions -\item \code{GLES3/gl3.h} - OpenGL ES 3.x API -\item \code{GL/glx.h} - GLX API -\item \code{GL/glxext.h} - GLX 1.3 (and later) API + extensions -\item \code{GL/wgl.h} - WGL API -\item \code{GL/wglext.h} - WGL extensions -\item \code{EGL/egl.h} - EGL (still being worked on) -\end{itemize} - -Starting with the Makefile rules and inspecting the files \code{gl.xml}, -\code{genheaders.py}, and \code{reg.py} will be necessary if you want to -repurpose the registry for reasons other than header file generation, or -to generate headers for languages other than C. - -If you're running in a Microsoft Windows, MaxOS X, or other non-Linux -environment, there are equivalent versions of Python and GNU Make, although -we haven't tested this ourselves. Feedback would be helpful. If you're using -Windows 10, you should probably try to build in the Ubuntu Linux subsystem -rather than older Unix emulation environments such as Cygwin. - - -\subsection{Header Generation Script - \code{genheaders.py}} - -When generating header files using the \code{genheaders.py} script, an -API name and profile name are required, as shown in the Makefile -examples. Additionally, specific versions and extensions can be required -or excluded. Based on this information, the generator script extracts -the relevant interfaces and creates a C-language header file for them. -\code{genheaders.py} contains predefined generator options for OpenGL compatibility -and core profiles, OpenGL ES 1 / 2 / 3, GLX, and WGL headers. - -The generator script is intended to be generalizable to other languages -by writing new generator classes. Such generators would have to rewrite -the C types and definitions in the XML to something appropriate to their -language. - -\subsection{Registry Processing Script - \code{reg.py}} - -Actual XML registry processing is done in \code{reg.py}, which contains -several objects and methods for loading registries and extracting -interfaces and extensions for use in header generation. There is some -internal documentation in the form of comments although nothing more -extensive exists yet, and it's possible the Python scripts will evolve -significantly based on public feedback. - - -\section{XML Registry Schema} -\label{schema} - -The format of an XML registry is a top level \tag{registry} tag -containing \tag{types}, \tag{enums}, \tag{commands}, \tag{feature}, and -\tag{extension} tags describing the different elements of an API, as -explained below. This description corresponds to a formal Relax NG -schema file, \code{registry.rnc}, against which the XML registry files -can be validated. - -At present there are separate registries for: - -\begin{itemize} -\item OpenGL and OpenGL ES - \code{gl.xml} -\item GLX - \code{glx.xml} -\item WGL - \code{wgl.xml} -\item EGL - \code{egl.xml} (still in development) -\end{itemize} - -\subsection{Profiles} -\label{schema:profile} - -Types and enumerants can have different definitions depending on the API -profile requested, which allows us to accomodate minor incompatibilities -in the OpenGL and OpenGL ES APIs, for example. Features and extensions -can include some elements conditionally depending on the API profile -requested. - -\subsection{API Names} -\label{schema:apiname} - -Several tags use a \attr{api} attribute. This is an arbitrary string, -specified at header generation time, for labelling properties of a -specific API. The string can be, but is not necessarily, an actual API -name. As used in \code{genheaders.py} and \code{gl.xml}, the API names -are \code{gl}, \code{gles1}, and \code{gles2}, corresponding to OpenGL, -OpenGL ES 1, and OpenGL ES 2/3, respectively. - - -\section{Registry Root (\tag{registry} tag)} -\label{schema:root} - -A \tag{registry} contains the entire definition of one or more related -APIs. - -\subsection{Attributes of \tag{registry} tags} - -None. - -\subsection{Contents of \tag{registry} tags} - -Zero or more of each of the following tags, normally in this order -(although order shouldn't be important): - -\begin{itemize} -\item \tag{comment} - Contains arbitrary text, such as a copyright - statement. Unused. -\item \tag{types} (see section~\ref{tag:types}) - defines API types. - Usually only one tag is used. -\item \tag{kinds} (see section~\ref{tag:kinds}) - defines tags - that can be used for parameter validation and more expressive types - in API bindings for languages other than C. - One parameter can be of multiple kinds, separated by commas. -\item \tag{groups} (see section~\ref{tag:groups}) - defines named groups - of tokens for possible parameter validation in API bindings for - languages other than C. Usually only one tag is used. -\item \tag{enums} (see section~\ref{tag:enums}) - defines API enumerants - (tokens). Usually multiple tags are used. -\item \tag{commands} (see section~\ref{tag:commands}) - defines API - commands (functions). Usually only one tag is used. -\item \tag{feature} (see section~\ref{tag:feature}) - defines API - feature interfaces (API versions, more or less). One tag per - feature set. -\item \tag{extensions} (see section~\ref{tag:extensions}) - defines API - extension interfaces. Usually only one tag is used, wrapping many - extensions. -\end{itemize} - - -\section{API types (\tag{types} tag)} -\label{tag:types} - -The \tag{types} tag contains individual \tag{type} tags describing each -of the derived types used in the API. - -Each \tag{type} tag contains legal C code, with attributes or embedded -tags denoting the type name. - -\subsection{Attributes of \tag{type} tags} - -\begin{itemize} -\item \attr{requires} - another type name this type requires to complete - its definition. -\item \attr{name} - name of this type (if not defined in the tag body). -\item \attr{api} - an API name (see \tag{feature} below) which - specializes this definition of the named type, so that the same - API types may have different definitions for e.g. GL ES and GL. -\item \attr{comment} - arbitrary string (unused). -\end{itemize} - -\subsection{Contents of \tag{type} tags} - -\tag{type} contains text which is legal C code for a type declaration. -It may also contain embedded tags: - -\begin{itemize} -\item \tag{apientry/} - insert a platform calling convention macro here - during header generation, used mostly for function pointer types. -\item \tag{name} - contains the name of this type (if not defined in the - tag attributes). -\end{itemize} - -\subsection{Example of a \tag{types} tag} - -\begin{verbatim} - - ]]> - typedef ptrdiff_t GLintptr; - -\end{verbatim} - -If the {\tt GLint64} type is required by a command, this will result in -the following declarations: - -\begin{verbatim} -#include -typedef ptrdiff_t GLintptr; -\end{verbatim} - -\section{Kinds (\tag{kinds} tag)} -\label{tag:kinds} - -The \tag{kinds} tag contain individual \tag{kind} tags describing -some metadata not captured by the \tag{types} tag (see section~\ref{tag:types}) -or \tag{enums} tag (see section~\ref{tag:groups}). - -\subsection{Attributes of (\tag{kinds} tag)} - -\begin{itemize} -\item \attr{name} - the name of the kind. -\item \attr{desc} - a description of what the kind indicates. -\end{itemize} - -\subsection{Contents of \tag{kinds} tags} - -Each \tag{kinds} block contains zero or more \tag{kind} tags, in -arbitrary order. - -\subsection{Example of a \tag{kinds} tag} - -\begin{verbatim} - - - - -\end{verbatim} - -\section{Kind (\tag{kind} tag)} -\label{tag:kind} - -Each \{kind} tag defines a single kind annotation. - -\subsection{Attributes of \tag{kind} tag} - -\begin{itemize} -\item \attr{name} - kind name, an arbitrary string without commas (',') used - to identify this kind. -\item \attr{desc} - kind description, a description of what it - means for a parameter or return value to be annotated with this kind. -\end{itemize} - -\subsection{Contents of \tag{kind} tag} - -None. - -\subsection{Meaning of \tag{kind} tags} -\label{tag:kind:meaning} - -If a \tag{proto} or \tag{param} tag of a \tag{command} has a -\attr{kind} attribute defined, and and the comma separated elemenst -if the attribute matches a \tag{kind} name, -then the return type or parameter type is considered to be -further defined by the description provided by the \tag{kind} tags -with the matching names. C language bindings do not attempt to -enforce this constraint in any way, but other language bindings -may try to do so. - -\section{Enumerant Groups (\tag{groups} tag)} -\label{tag:groups} - -The \tag{groups} tags contain individual \tag{group} tags describing -some of the group annotations used for return and parameter types. - -\subsection{Attributes of \tag{groups} tags} - -None. - -\subsection{Contents of \tag{groups} tags} - -Each \tag{groups} block contains zero or more \tag{group} tags, in -arbitrary order (although they are typically ordered by group name, to -improve human readability). - -\subsection{Example of \tag{groups} tags} - -\begin{verbatim} - - - - - - - - - - -\end{verbatim} - - -\section{Enumerant Group (\tag{group} tag)} -\label{tag:group} - -Each \tag{group} tag defines a single group annotation. - -\subsection{Attributes of \tag{group} tags} - -\begin{itemize} -\item \attr{name} - group name, an arbitrary string for grouping a set - of enums together within a broader namespace. -\end{itemize} - -\subsection{Contents of \tag{group} tags} - -\tag{group} tags may contain zero or more \tag{enum} tags. Each -\tag{enum} tag may contain only a \attr{name} attribute, which should -correspond to a \tag{enum} definition in an \tag{enums} block. - -\subsection{Meaning of \tag{group} tags} -\label{tag:group:meaning} - -If a \tag{proto} or \tag{param} tag of a \tag{command} has a -\attr{group} attribute defined, and that attribute matches a \tag{group} -name, then the return type or parameter type is considered to be -constrained to values defined by the corresponding \tag{group}. C -language bindings do not attempt to enforce this constraint in any way, -but other language bindings may try to do so. - - -\section{Enumerant Blocks (\tag{enums} tag)} -\label{tag:enums} - -The \tag{enums} tags contain individual \tag{enum} tags describing each of the -token (enumerant) names used in the API. - -\subsection{Attributes of \tag{enums} tags} - -\begin{itemize} -\item \attr{namespace} - a string for grouping many different enums - together, currently unused but typically something like \code{GL} - for all enums in the OpenGL / OpenGL ES shared namespace. Multiple - \tag{enums} tags can share the same namespace. -\item \attr{type} - a string describing the data type of the values of - this group of enums, currently unused. The only string used at - present in the is \code{bitmask}. -\item \attr{start}, \attr{end} - integers defining the start and end of - a reserved range of enumerants for a particular vendor or purpose. - \attr{start} must be $\leq$ \attr{end}. These fields define formal - enumerant allocations within a namespace, and are made by the - Khronos Registrar on request from implementers following the enum - allocation policy. -\item \attr{vendor} - string describing the vendor or purposes to whom a - reserved range of enumerants is allocated. -\item \attr{comment} - arbitrary string (unused) -\end{itemize} - -\subsection{Contents of \tag{enums} tags} - -Each \tag{enums} block contains zero or more \tag{enum} and \tag{unused} -tags, in arbitrary order (although they are typically ordered by sorting -on enumerant values, to improve human readability). - -\subsection{Example of \tag{enums} tags} - -\begin{verbatim} - - - - - - - - -\end{verbatim} - -When processed into a C header, and assuming all these tokens were -required, this results in - -\begin{verbatim} -#define GL_CURRENT_BIT 0x00000001 -#define GL_POINT_BIT 0x00000001 -#define GL_BGR 0x80E0 -\end{verbatim} - - -\section{Enumerants (\tag{enum} tag)} -\label{tag:enum} - -Each \tag{enum} tag defines a single GL (or other API) token. - -\subsection{Attributes of \tag{enum} tags} - -\begin{itemize} -\item \attr{value} - enumerant value, a legal C constant (usually a - hexadecimal integer). -\item \attr{name} - enumerant name, a legal C preprocessor token name. -\item \attr{api} - an API name which specializes this definition of the - named enum, so that different APIs may have different values for - the same token (used to address a few accidental incompatibilities - between GL and GL ES). -\item \attr{type} - legal C suffix for the value to force it to a - specific type. Currently only \code{u} and \code{ull} are used, - for \code{unsigned} 32- and 64-bit integer values, respectively. - Separated from the \attr{value} field since this eases parsing and - sorting of values, and is rarely used. -\item \attr{group} - group name, an arbitrary string for grouping a set of - enums together within a broader namespace. - \par {\bf Note:} the \tag{group} tag (see section~\ref{tag:group}) - serves the same purpose, but is deprecated in favor of this attribute. - Eventually all \tag{group} tags will be removed from the XML - registries. -\item \attr{alias} - name of another enumerant this is an alias of, used - where token names have been changed as a result of profile changes - or for consistency purposes. An enumerant alias is simply a - different \attr{name} for the exact same \attr{value}. At present, - enumerants which are promoted from extension to core API status - are not tagged as aliases - just enumerants tagged as aliases in - the {\em Changed Tokens} sections of appendices to the OpenGL - Specification. This might change in the future. -\end{itemize} - -\subsection{Contents of \tag{enum} tags} - -\tag{enum} tags have no allowed contents. All information is contained -in the attributes. - - -\section{Unused Enumerants (\tag{unused} tag)} -\label{tag:unused} - -Each \tag{unused} tag defines a range of enumerants which is allocated, -but not yet assigned to specific enums. This just tracks the unused -values and is not needed for header generation. - -\subsection{Attributes of \tag{unused} tags} - -\begin{itemize} -\item \attr{start}, \attr{end} - integers defining the start and end of - an unused range of enumerants. \attr{start} must be $\leq$ - \attr{end}. This range should not exceed the range reserved by the - surrounding \tag{enums} tag. -\item \attr{vendor} - string describing the vendor or purposes to whom a - reserved range of enumerants is allocated. Usually identical to - the \attr{vendor} attribute of the surrounding \attr{enums} block. -\item \attr{comment} - arbitrary string (unused) -\end{itemize} - -\subsection{Contents of \tag{unused} tags} - -None. - - -\section{Command Blocks (\tag{commands} tag)} -\label{tag:commands} - -The \tag{commands} tag contains definitions of each of the functions -(commands) used in the API. - -\subsection{Attributes of \tag{commands} tags} - -\begin{itemize} -\item \attr{namespace} - a string defining the namespace in which - commands live, currently unused but typically something like - \code{GL}. -\end{itemize} - -\subsection{Contents of \tag{commands} tags} - -Each \tag{commands} block contains zero or more \tag{command} tags, in -arbitrary order (although they are typically ordered by sorting on the -command name, to improve human readability). - - -\section{Commands (\tag{command} tag)} -\label{tag:command} - -The \tag{command} tag contains a structured definition of a single API -command (function). - -\subsection{Attributes of \tag{command} tags} - -\begin{itemize} -\item \attr{comment} - arbitrary string (unused). -\end{itemize} - -\subsection{Contents of \tag{command} tags} - -\begin{itemize} -\item \tag{proto} must be the first element, and is a tag defining the C - function prototype of a command as described below, up to the - function name but not including function parameters. -\item \tag{param} elements for each command parameter follow, defining - its name and type, as described below. If a command takes no - arguments, it has no \tag{param} tags. -\end{itemize} - -Following these elements, the remaining elements in a \tag{command} -tag are optional and may be in any order: - -\begin{itemize} -\item \tag{alias} has one attribute, \attr{name}, containing a string which is the - name of another command this command is an alias of, used when - promoting a function from extension to ARB or ARB to API status. A - command alias describes the case where there are two function - names which resolve to the {\bf same} client library code, so (for - example) the case where a command is promoted but is also given - different GLX protocol would {\bf not} be an alias in this sense. -\item \tag{vecequiv} has one attribute, \attr{name}, containing a string which is - the name of another command which is the {\em vector equivalent} - of this command. For example, the vector equivalent of - \code{glVertex3f} is \code{glVertex3fv}. -\item \tag{glx} defines GLX protocol information for this command, as - described below. Many GL commands don't have GLX protocol defined, - and other APIs such as EGL and WGL don't use GLX at all. -\end{itemize} - - -\subsection{Command prototype (\tag{proto} tags)} -\label{tag:command:proto} - -The \tag{proto} tag defines the return type and name of a command. - -\subsubsection{Attributes of \tag{proto} tags} - -\begin{itemize} -\item \attr{group} - group name, an arbitrary string. -\item \attr{kind} - kind list, a comma separated list of names of - previously defined \tag{kind} tags. -\end{itemize} - -If the group name is defined, it may be interpreted as described in -section~\ref{tag:group:meaning}. - -\subsubsection{Contents of \tag{proto} tags} - -The text elements of a \tag{proto} tag, with all other tags removed, is -legal C code describing the return type and name of a command. In addition -it may contain two semantic tags: - -\begin{itemize} -\item The \tag{ptype} tag is optional, and contains text which is a - valid type name found in \tag{type} tag, and indicates that this - type must be previously defined for the definition of the command - to succeed. Builtin C types, and any derived types which are - expected to be found in other header files, should not be wrapped - in \tag{ptype} tags. -\item The \tag{name} tag is required, and contains the command name - being described. -\end{itemize} - -\subsection{Command parameter (\tag{param} tags)} -\label{tag:command:param} - -The \tag{param} tag defines the type and name of a parameter. - -\subsubsection{Attributes of \tag{param} tags} - -\begin{itemize} -\item \attr{group} - group name, an arbitrary string. -\item \attr{kind} - kind list, a comma separated list of names of - previously defined \tag{kind} tags. -\item \attr{len} - parameter length, either an integer specifying the - number of elements of the parameter \tag{ptype}, or a complex - string expression with poorly defined syntax, usually representing - a length that is computed as a combination of other command - parameter values, and possibly current GL state as well. -\item \attr{class} - an arbitrary string defining the type of object handles - passed in this parameter. Handles with different types are not - compatible; for example, handles created with - \attr{class}{\tt="buffer"} can not be passed to a parameter with - \attr{class}{\tt="shader"}. -\end{itemize} - -If the group name is defined, it may be interpreted as described in -section~\ref{tag:group:meaning}. - -\subsubsection{Contents of \tag{param} tags} - -The text elements of a \tag{param} tag, with all other tags removed, is -legal C code describing the type and name of a function parameter. In -addition it may contain two semantic tags: - -\begin{itemize} -\item The \tag{ptype} tag is optional, and contains text which is a - valid type name found in \tag{type} tag, and indicates that this - type must be previously defined for the definition of the command - to succeed. Builtin C types, and any derived types which are - expected to be found in other header files, should not be wrapped - in \tag{ptype} tags. -\item The \tag{name} tag is required, and contains the command name - being described. -\end{itemize} - -\subsection{Example of a \tag{commands} tag} - -\begin{verbatim} - - - void glBeginConditionalRenderNV - GLuint id - GLenum mode - - - - -\end{verbatim} - -When processed into a C header, this results in - -\begin{verbatim} -void glBeginConditionalRenderNV(GLuint id, GLenum mode); -\end{verbatim} - - -\section{API Features / Versions (\tag{feature} tag)} -\label{tag:feature} - -API features are described in individual \tag{feature} tags. A feature -is the set of interfaces (enumerants and commands) defined by a -particular API and version, such as OpenGL 4.0 or OpenGL ES 3.0, and -includes all API profiles of that version. - -\subsection{Attributes of \tag{feature} tags} - -\begin{itemize} -\item \attr{api} - API name this feature is for (see - section~\ref{schema:apiname}), such as \code{gl} or \code{gles2}. -\item \attr{name} - version name, used as the C preprocessor token under - which the version's interfaces are protected against multiple - inclusion. Example: \code{GL\_VERSION\_4\_2}. -\item \attr{protect} - an additional preprocessor token used to protect - a feature definition. Usually another feature or extension - \attr{name}. Rarely used, for odd circumstances where the - definition of a feature or extension requires another to be - defined first. -\item \attr{number} - feature version number, usually a string - interpreted as $majorNumber.minorNumber$. Example: \code{4.2}. -\item \attr{comment} - arbitrary string (unused) -\end{itemize} - -\subsection{Contents of \tag{feature} tags} - -Zero or more \tag{require} and \tag{remove} tags (see -section~\ref{tag:required}), in arbitrary order. Each tag describes a -set of interfaces that is respectively required for, or removed from, -this feature, as described below. - -\subsection{Example of a \tag{feature} tag} - -\begin{verbatim} - - - - - - - - - - -\end{verbatim} - -When processed into a C header for the \code{compatibility} profile of -OpenGL, this results in (assuming the usual definitions of these GL -interfaces): - -\begin{verbatim} -#ifndef GL_VERSION_3_0 -#define GL_VERSION_3_0 1 -#define GL_COMPARE_REF_TO_TEXTURE 0x884E -#define GL_CLIP_DISTANCE0 0x3000 -#define GL_INDEX 0x8222 -typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glEndTransformFeedback (void); -#endif -#endif /* GL_VERSION_3_0 */ -\end{verbatim} - -If processed into a header for the \code{core} profile, the definition of -\code{GL\_INDEX} would not appear. - - -\section{Extension Blocks (\tag{extensions} tag)} -\label{tag:extensions} - -The \tag{extensions} tag contains definitions of each of the extenions -which are defined for the API. - -\subsection{Attributes of \tag{extensions} tags} - -None. - -\subsection{Contents of \tag{extensions} tags} - -Each \tag{extensions} block contains zero or more \tag{extension} tags, -each describing an API extension, in arbitrary order (although they are -typically ordered by sorting on the extension name, to improve human -readability). - - -\section{API Extensions (\tag{extension} tag)} -\label{tag:extension} - -API extensions are described in individual \tag{extension} tags. An -extension is the set of interfaces defined by a particular API extension -specification, such as \code{ARB\_multitexture}. \tag{extension} is -similar to \tag{feature}, but instead of having \attr{version} and -\attr{profile} attributes, instead has a \attr{supported} attribute, -which describes the set of API names which the extension can potentially -be implemented against. - -\subsection{Attributes of \tag{extension} tags} - -\begin{itemize} -\item \attr{supported} - a regular expression, with an implicit - \code{\^{}} and \code{\$} bracketing it, which should match the - \attr{api} tag of a set of \tag{feature} tags. -\item \attr{protect} - an additional preprocessor token used to protect - an extension definition. Usually another feature or extension - \attr{name}. Rarely used, for odd circumstances where the - definition of an extension requires another to be defined first. -\item \attr{comment} - arbitrary string (unused) -\end{itemize} - -\subsection{Contents of \tag{extension} tags} - -Zero or more \tag{require} and \tag{remove} tags (see -section~\ref{tag:required}), in arbitrary order. Each tag describes a -set of interfaces that is respectively required for, or removed from, -this extension, as described below. - -\subsection{Example of an \tag{extensions} tag} - -\begin{verbatim} - - - - - - - - - - - -\end{verbatim} - -The \attr{supported} attribute says that the extension can be supported for -either the GL compatibility (\code{gl}) or GL core (\code{glcore}) API -profiles, but not for other APIs. When processed into a C header for the -\code{core} profile of OpenGL, this results in (assuming the usual -definitions of these GL interfaces): - -\begin{verbatim} -#ifndef GL_ARB_robustness -#define GL_ARB_robustness 1 -#define GL_NO_ERROR 0 -typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLenum APIENTRY glGetGraphicsResetStatusARB (void); -#endif -#endif /* GL_ARB_robustness */ -\end{verbatim} - - -\section{Required and Removed Interfaces (\tag{require} and \tag{remove} tags)} -\label{tag:required} - -A \tag{require} block defines a set of interfaces (types, enumerants and -commands) {\em required} by a \tag{feature} or \tag{extension}. A -\tag{remove} block defines a set of interfaces {\em removed} by a -\tag{feature} (this is primarily useful for the OpenGL core profile, -which removed many interfaces - extensions should never remove -interfaces, although this usage is allowed by the schema). Except for -the tag name and behavior, the contents of \tag{require} and -\tag{remove} tags are identical. - -\subsection{Attributes of \tag{require} and \tag{remove} tags} - -\begin{itemize} -\item \attr{profile} - string name of an API profile. Interfaces in the - tag are only required (or removed) if the specified profile is - being generated. If not specified, interfaces are required (or - removed) for all API profiles. -\item \attr{comment} - arbitrary string (unused) -\item \attr{api} - an API name (see section~\ref{schema:apiname}). Interfaces - in the tag are only required (or removed) if the specified API is - being generated. If not specified, interfaces are required (or - removed) for all APIs. - - {\bf The \attr{api} attribute is only supported inside - \tag{extension} tags,} since \tag{feature} tags already define a - specific API. -\end{itemize} - -\subsection{Contents of \tag{require} and \tag{remove} tags} - -Zero or more of the following tags, in any order: - -\begin{itemize} -\item \tag{command} specifies an required (or removed) command defined - in a \tag{commands} block. The tag has no content, but contains - elements: - - \begin{itemize} - \item \attr{name} - name of the command (required). - \item \attr{comment} - arbitrary string (optional and unused). - \end{itemize} -\item \tag{enum} specifies an required (or removed) enumerant defined in - a \tag{enums} block. The tag has no content, but contains - elements: - - \begin{itemize} - \item \attr{name} - name of the enumerant (required). - \item \attr{comment} - arbitrary string (optional and unused). - \end{itemize} -\item \tag{type} specifies a required (or removed) type defined in a - \tag{types} block. Most types are picked up implicitly by using - the \tag{ptype} tags of commands, but in a few cases, additional - types need to be specified explicitly (it is unlikely that a type - would ever be removed, although this usage is allowed by the - schema). The tag has no content, but contains elements: - - \begin{itemize} - \item \attr{name} - name of the type (required). - \item \attr{comment} - arbitrary string (optional and unused). - \end{itemize} -\end{itemize} - - -\section{General Discussion} -\label{general} - - -\subsection{Stability of the XML Database and Schema} -\label{general:stability} - -The new registry schema, scripts, and databases are evolving in response -to feedback and to Khronos' own wishlist. This means the XML schema is -subject to change, although most such change will probably be confined -to adding attributes to existing tags. The XML databases such as -\code{gl.xml} will evolve in response to schema changes, to new -extensions and API versions, and to general cleanup, such as -canonicalization of the XML or sorting of \tag{command} and -\tag{extension} tags by name. Changes to the schema will be described in -the change log of this document (see section~\ref{changelog}). Changes -to the \code{.xml} files will be described in Github revision history. - - -\subsection{Feature Enhancements to the Registry} -\label{general:enhancements} - -There are lots of tools and additional tags that would make the XML format -more expressive and the tools more capable. Khronos is open to hosting -additional processing scripts for other purposes related to the definition -of the API and bindings to it. - -A partial wishlist follows: - -\begin{itemize} -\item Enhance \tag{command} \tag{alias} tags to describe more relaxed - sorts of aliases, such as commands equivalent in behavior and - interface, but using different GLX protocol (this might be called - a {\em client-side alias} or something of the sort). -\end{itemize} - -\subsection{Type Annotations and Relationship to \code{.spec} Files} -\label{general:annotations} - -The initial releases of the XML Registry did not include type annotation -and array length information from the old \code{.spec} files, which -generated a number of complaints from people writing bindings of OpenGL -to languages other than C. The majority of these annotations have now -been added to the XML, in the form of \tag{group} tags (see -section~\ref{tag:group}) defining groups of related enumerants, -\attr{group} attributes on \tag{proto} and \tag{param} tags specifying -that the corresponding return type belongs to a group, and \attr{len} -attributes on \tag{param} tags specifying the array length of the -corresponding parameter. - -There are many caveats regarding these annotations. For the most part -they date from SGI's OpenGL 1.1 implementation, and have not been -updated. The defined \tag{group}s therefore do not cover many API -parameters which {\bf could} be given a group, and in many cases, the -defined \tag{group}s have not been updated to add new enumerants from -later versions of OpenGL and OpenGL extensions. The group names are -often somewhat misleading (with imbedded vendor extension tags, while -the corresponding features have been promoted). - -The \tag{group}s added to \code{gl.xml} are the enumerant groups defined -in \code{enum.spec}, and \code{enumext.spec}. Many additional group -names were used in the annotations in \code{gl.spec}, and they -fall in several categories discussed below. - - -\subsubsection{Simple API Type Aliases} - -Group names that were simply an alias for a GL type have been left -entirely out of \code{gl.xml}, since they offer no useful additional -information. - -For example, a parameter described as \code{UInt32} in \code{gl.spec} is -not annotated with \code{group="UInt32"} in \code{gl.xml}, because this -offers no information about the parameter not already present in its -declaration as \code{GLuint}. - -A few examples of such groups are \code{cl\_context}, -\code{handleARB}, \code{Int32}, and \code{sync}. - - -\subsubsection{Numeric Constraints} - -Group names representing some type of numerical constraint on a value -are retained in \tag{proto} and \tag{param} \attr{group} attributes, but -no definition exists. This is because the existing \tag{group} mechanism -can only describe constraints to specific enumerant names. - -This is not a regression relative to the \code{.spec} files, which also -did not describe the meaning of these groups. - -A few examples of such groups are \code{CheckedFloat32}, -\code{ClampedFixed}, and \code{CoordD}. - - -\subsubsection{GL Object Names} - -Group names representing an object name obtained from e.g. a -\code{glGen*} command, such as a display list name, are retained in in -\tag{proto} and \tag{param} \attr{group} attributes, but no definition -exists. This is because the existing \tag{group} mechanism can only -describe constraints to specific enumerant names. - -This is not a regression relative to the \code{.spec} files, which also -did not describe the meaning of these groups. - -A few examples of such groups are \code{List} and \code{Path}. - - -\subsubsection{Groups Not Defined Yet} - -Group names representing enumerant groups which were not defined in -\code{enum.spec} and \code{enumext.spec} are retained in \tag{proto} and -\tag{param} \attr{group} attributes, but no definition exists. Such -groups usually are a result of vendors contributing \code{gl.spec} -entries for an extension without contributing corresponding -\code{enum.spec} entries. - -This is not a regression relative to the \code{.spec} files, which also -did not describe the meaning of these groups. - -A few examples of such groups are \code{ArrayObjectPNameATI}, -\code{BinormalPointerTypeEXT}, and \code{SpriteParameterNameSGIX}. - - -\subsubsection{Other Groups} - -There are probably a few groups which are present in \code{gl.xml} but -should not be. These can be gradually cleaned up over time. - - -\subsubsection{Validating Groups} - -The \code{genheaders.py} script has been enhanced to allow validating -groups during header generation. Invoking it with the -\code{-validate} option, for example via: - -\code{\$ genheaders.py -validate -registry gl.xml} - -\noindent will generate a text dump on standard output showing all -parameter type \attr{group} attributes which do {\bf not} have -corresponding \tag{group} tags. - - -\section{Change Log} -\label{changelog} - -\begin{itemize} -\item 2020-10-27 - Add \attr{class} attribute to \tag{param} tags (github - pull request 428), update document title and make minor tweaks to - reflect this not being the only Khronos XML API schema in use, and - having migrated from Subversion to Github. -\item 2020-01-11 - Add \attr{group} attribute to \tag{enum} tags, and - deprecate \tag{group} tags (github issue 335). -\item 2017-01-20 - Update for the move to the new github repository. -\item 2014-06-16 - Add \tag{vendor} attribute to \tag{unused} tags. -\item 2013-09-17 - Add \tag{comment} attribute to \tag{command} tags - within \tag{commands}. -\item 2013-06-24 - Add \tag{groups} and \tag{group} tags, renamed - \tag{enums} attribute \attr{class} to \attr{group}, and add - parameter type annotation attributes \attr{group} and \attr{len} - to both \tag{proto} and \tag{param}. Add - section~\ref{general:annotations} discussing limitations of these - annotations. Still need to add examples of the annotation - attributes. -\item 2013-06-19 - Added \tag{extensions} tag block as a wrapper around - groups of \tag{extension} tags, to ease XML transformations such - as sorting extensions by name. -\item 2013-06-14 - Expanded description of tags, better formatting -\item 2013-06-12 - First release, text file format -\end{itemize} - -\input{readme.ind} - -% \printindex - -\end{document} +\documentclass{article} + +% Various packages of possible use. {index} creates problems for some reason. +% \usepackage{index} +\def\specpdftitle{The Khronos OpenGL API Registry Schema} +\usepackage[pdftex,bookmarksnumbered=true,linktocpage,plainpages=false,pdftitle={\specpdftitle},colorlinks=true]{hyperref} +\usepackage{amsmath,enumerate,epsfig,framed,mdframed,multicol,longtable,times,url} +\usepackage[normalem]{ulem} +% underscore allows use of _ instead of \_ in text. [strings] allows _ in file names +\usepackage[strings]{underscore} +\usepackage[breakwords,fit]{truncate} + +\makeatletter +\makeatother +\makeindex + +% Some commonly used abbreviations + +\def\code#1{{\tt #1}} +\def\tag#1{{\tt <#1>\index{<#1>}}} +\def\attr#1{{\tt #1\index{#1}}} + +\begin{document} + +\title{The Khronos OpenGL API Registry Schema} +\author{Jon Leech} +\date{Last updated 2020-10-27} +\maketitle + +\begin{abstract} + +This document describes the Khronos OpenGL API Registry XML schema, and provides +some additional information about using the registry and scripts to generate +C header files. The underlying XML files and scripts, as well as headers +generated from the current authoritative copy of the XML files, can be +obtained from the OpenGL-Registry github repository at + +\begin{center} +{\bf \href{https://github.com/KhronosGroup/OpenGL-Registry} + {https://github.com/KhronosGroup/OpenGL-Registry}} +\end{center} + +\end{abstract} + +\tableofcontents + +\section{Introduction} + +The registry uses an XML representation of the API and a set of Python 3 +scripts to manipulate the XML, based on the lxml Python bindings. It comes +with an XML schema and validator. Outside users are welcome to submit pull +requests on github, although the XML schema itself is mature and unlikely to +change at this point. + +Other APIs defined by Khronos, such as Vulkan and OpenXR, use a similar XML +schema originally based on the OpenGL schema to describe those APIs. + +Some groups outside Khronos have their own XML based API descriptions, +often used for additional purposes such as library code generators or +extension loaders, and it may be desirable to construct XSLT or other +translators between the schema. + + +\section{Getting Started} + +Once the repository has been downloaded, if you're running +in a Linux command-line environment and have Python 3, the lxml Python +bindings, and libxml installed, you should just be able to invoke +\code{make} and generate C/C++ header files for all the following +targets: + +\begin{itemize} +\item \code{GL/glext.h} - OpenGL 1.2 (and later) compatibility profile + API + extensions +\item \code{GL/glcorearb.h} - OpenGL core profile API + extensions +\item \code{GLES/gl.h} - OpenGL compatibility profile API +\item \code{GLES/glext.h} - OpenGL ES 1.x extensions +\item \code{GLES2/gl2.h} - OpenGL ES 2.x API +\item \code{GLES2/gl2ext.h} - OpenGL ES 2.x extensions +\item \code{GLES3/gl3.h} - OpenGL ES 3.x API +\item \code{GL/glx.h} - GLX API +\item \code{GL/glxext.h} - GLX 1.3 (and later) API + extensions +\item \code{GL/wgl.h} - WGL API +\item \code{GL/wglext.h} - WGL extensions +\item \code{EGL/egl.h} - EGL (still being worked on) +\end{itemize} + +Starting with the Makefile rules and inspecting the files \code{gl.xml}, +\code{genheaders.py}, and \code{reg.py} will be necessary if you want to +repurpose the registry for reasons other than header file generation, or +to generate headers for languages other than C. + +If you're running in a Microsoft Windows, MaxOS X, or other non-Linux +environment, there are equivalent versions of Python and GNU Make, although +we haven't tested this ourselves. Feedback would be helpful. If you're using +Windows 10, you should probably try to build in the Ubuntu Linux subsystem +rather than older Unix emulation environments such as Cygwin. + + +\subsection{Header Generation Script - \code{genheaders.py}} + +When generating header files using the \code{genheaders.py} script, an +API name and profile name are required, as shown in the Makefile +examples. Additionally, specific versions and extensions can be required +or excluded. Based on this information, the generator script extracts +the relevant interfaces and creates a C-language header file for them. +\code{genheaders.py} contains predefined generator options for OpenGL compatibility +and core profiles, OpenGL ES 1 / 2 / 3, GLX, and WGL headers. + +The generator script is intended to be generalizable to other languages +by writing new generator classes. Such generators would have to rewrite +the C types and definitions in the XML to something appropriate to their +language. + +\subsection{Registry Processing Script - \code{reg.py}} + +Actual XML registry processing is done in \code{reg.py}, which contains +several objects and methods for loading registries and extracting +interfaces and extensions for use in header generation. There is some +internal documentation in the form of comments although nothing more +extensive exists yet, and it's possible the Python scripts will evolve +significantly based on public feedback. + + +\section{XML Registry Schema} +\label{schema} + +The format of an XML registry is a top level \tag{registry} tag +containing \tag{types}, \tag{enums}, \tag{commands}, \tag{feature}, and +\tag{extension} tags describing the different elements of an API, as +explained below. This description corresponds to a formal Relax NG +schema file, \code{registry.rnc}, against which the XML registry files +can be validated. + +At present there are separate registries for: + +\begin{itemize} +\item OpenGL and OpenGL ES - \code{gl.xml} +\item GLX - \code{glx.xml} +\item WGL - \code{wgl.xml} +\item EGL - \code{egl.xml} (still in development) +\end{itemize} + +\subsection{Profiles} +\label{schema:profile} + +Types and enumerants can have different definitions depending on the API +profile requested, which allows us to accomodate minor incompatibilities +in the OpenGL and OpenGL ES APIs, for example. Features and extensions +can include some elements conditionally depending on the API profile +requested. + +\subsection{API Names} +\label{schema:apiname} + +Several tags use a \attr{api} attribute. This is an arbitrary string, +specified at header generation time, for labelling properties of a +specific API. The string can be, but is not necessarily, an actual API +name. As used in \code{genheaders.py} and \code{gl.xml}, the API names +are \code{gl}, \code{gles1}, and \code{gles2}, corresponding to OpenGL, +OpenGL ES 1, and OpenGL ES 2/3, respectively. + + +\section{Registry Root (\tag{registry} tag)} +\label{schema:root} + +A \tag{registry} contains the entire definition of one or more related +APIs. + +\subsection{Attributes of \tag{registry} tags} + +None. + +\subsection{Contents of \tag{registry} tags} + +Zero or more of each of the following tags, normally in this order +(although order shouldn't be important): + +\begin{itemize} +\item \tag{comment} - Contains arbitrary text, such as a copyright + statement. Unused. +\item \tag{types} (see section~\ref{tag:types}) - defines API types. + Usually only one tag is used. +\item \tag{kinds} (see section~\ref{tag:kinds}) - defines tags + that can be used for parameter validation and more expressive types + in API bindings for languages other than C. + One parameter can be of multiple kinds, separated by commas. +\item \tag{groups} (see section~\ref{tag:groups}) - defines named groups + of tokens for possible parameter validation in API bindings for + languages other than C. Usually only one tag is used. +\item \tag{enums} (see section~\ref{tag:enums}) - defines API enumerants + (tokens). Usually multiple tags are used. +\item \tag{commands} (see section~\ref{tag:commands}) - defines API + commands (functions). Usually only one tag is used. +\item \tag{feature} (see section~\ref{tag:feature}) - defines API + feature interfaces (API versions, more or less). One tag per + feature set. +\item \tag{extensions} (see section~\ref{tag:extensions}) - defines API + extension interfaces. Usually only one tag is used, wrapping many + extensions. +\end{itemize} + + +\section{API types (\tag{types} tag)} +\label{tag:types} + +The \tag{types} tag contains individual \tag{type} tags describing each +of the derived types used in the API. + +Each \tag{type} tag contains legal C code, with attributes or embedded +tags denoting the type name. + +\subsection{Attributes of \tag{type} tags} + +\begin{itemize} +\item \attr{requires} - another type name this type requires to complete + its definition. +\item \attr{name} - name of this type (if not defined in the tag body). +\item \attr{api} - an API name (see \tag{feature} below) which + specializes this definition of the named type, so that the same + API types may have different definitions for e.g. GL ES and GL. +\item \attr{comment} - arbitrary string (unused). +\end{itemize} + +\subsection{Contents of \tag{type} tags} + +\tag{type} contains text which is legal C code for a type declaration. +It may also contain embedded tags: + +\begin{itemize} +\item \tag{apientry/} - insert a platform calling convention macro here + during header generation, used mostly for function pointer types. +\item \tag{name} - contains the name of this type (if not defined in the + tag attributes). +\end{itemize} + +\subsection{Example of a \tag{types} tag} + +\begin{verbatim} + + ]]> + typedef ptrdiff_t GLintptr; + +\end{verbatim} + +If the {\tt GLint64} type is required by a command, this will result in +the following declarations: + +\begin{verbatim} +#include +typedef ptrdiff_t GLintptr; +\end{verbatim} + +\section{Kinds (\tag{kinds} tag)} +\label{tag:kinds} + +The \tag{kinds} tag contain individual \tag{kind} tags describing +some metadata not captured by the \tag{types} tag (see section~\ref{tag:types}) +or \tag{enums} tag (see section~\ref{tag:groups}). + +\subsection{Attributes of (\tag{kinds} tag)} + +\begin{itemize} +\item \attr{name} - the name of the kind. +\item \attr{desc} - a description of what the kind indicates. +\end{itemize} + +\subsection{Contents of \tag{kinds} tags} + +Each \tag{kinds} block contains zero or more \tag{kind} tags, in +arbitrary order. + +\subsection{Example of a \tag{kinds} tag} + +\begin{verbatim} + + + + +\end{verbatim} + +\section{Kind (\tag{kind} tag)} +\label{tag:kind} + +Each \{kind} tag defines a single kind annotation. + +\subsection{Attributes of \tag{kind} tag} + +\begin{itemize} +\item \attr{name} - kind name, an arbitrary string without commas (',') used + to identify this kind. +\item \attr{desc} - kind description, a description of what it + means for a parameter or return value to be annotated with this kind. +\end{itemize} + +\subsection{Contents of \tag{kind} tag} + +None. + +\subsection{Meaning of \tag{kind} tags} +\label{tag:kind:meaning} + +If a \tag{proto} or \tag{param} tag of a \tag{command} has a +\attr{kind} attribute defined, and and the comma separated elemenst +if the attribute matches a \tag{kind} name, +then the return type or parameter type is considered to be +further defined by the description provided by the \tag{kind} tags +with the matching names. C language bindings do not attempt to +enforce this constraint in any way, but other language bindings +may try to do so. + +\section{Enumerant Groups (\tag{groups} tag)} +\label{tag:groups} + +The \tag{groups} tags contain individual \tag{group} tags describing +some of the group annotations used for return and parameter types. + +\subsection{Attributes of \tag{groups} tags} + +None. + +\subsection{Contents of \tag{groups} tags} + +Each \tag{groups} block contains zero or more \tag{group} tags, in +arbitrary order (although they are typically ordered by group name, to +improve human readability). + +\subsection{Example of \tag{groups} tags} + +\begin{verbatim} + + + + + + + + + + +\end{verbatim} + + +\section{Enumerant Group (\tag{group} tag)} +\label{tag:group} + +Each \tag{group} tag defines a single group annotation. + +\subsection{Attributes of \tag{group} tags} + +\begin{itemize} +\item \attr{name} - group name, an arbitrary string for grouping a set + of enums together within a broader namespace. +\end{itemize} + +\subsection{Contents of \tag{group} tags} + +\tag{group} tags may contain zero or more \tag{enum} tags. Each +\tag{enum} tag may contain only a \attr{name} attribute, which should +correspond to a \tag{enum} definition in an \tag{enums} block. + +\subsection{Meaning of \tag{group} tags} +\label{tag:group:meaning} + +If a \tag{proto} or \tag{param} tag of a \tag{command} has a +\attr{group} attribute defined, and that attribute matches a \tag{group} +name, then the return type or parameter type is considered to be +constrained to values defined by the corresponding \tag{group}. C +language bindings do not attempt to enforce this constraint in any way, +but other language bindings may try to do so. + + +\section{Enumerant Blocks (\tag{enums} tag)} +\label{tag:enums} + +The \tag{enums} tags contain individual \tag{enum} tags describing each of the +token (enumerant) names used in the API. + +\subsection{Attributes of \tag{enums} tags} + +\begin{itemize} +\item \attr{namespace} - a string for grouping many different enums + together, currently unused but typically something like \code{GL} + for all enums in the OpenGL / OpenGL ES shared namespace. Multiple + \tag{enums} tags can share the same namespace. +\item \attr{type} - a string describing the data type of the values of + this group of enums, currently unused. The only string used at + present in the is \code{bitmask}. +\item \attr{start}, \attr{end} - integers defining the start and end of + a reserved range of enumerants for a particular vendor or purpose. + \attr{start} must be $\leq$ \attr{end}. These fields define formal + enumerant allocations within a namespace, and are made by the + Khronos Registrar on request from implementers following the enum + allocation policy. +\item \attr{vendor} - string describing the vendor or purposes to whom a + reserved range of enumerants is allocated. +\item \attr{comment} - arbitrary string (unused) +\end{itemize} + +\subsection{Contents of \tag{enums} tags} + +Each \tag{enums} block contains zero or more \tag{enum} and \tag{unused} +tags, in arbitrary order (although they are typically ordered by sorting +on enumerant values, to improve human readability). + +\subsection{Example of \tag{enums} tags} + +\begin{verbatim} + + + + + + + + +\end{verbatim} + +When processed into a C header, and assuming all these tokens were +required, this results in + +\begin{verbatim} +#define GL_CURRENT_BIT 0x00000001 +#define GL_POINT_BIT 0x00000001 +#define GL_BGR 0x80E0 +\end{verbatim} + + +\section{Enumerants (\tag{enum} tag)} +\label{tag:enum} + +Each \tag{enum} tag defines a single GL (or other API) token. + +\subsection{Attributes of \tag{enum} tags} + +\begin{itemize} +\item \attr{value} - enumerant value, a legal C constant (usually a + hexadecimal integer). +\item \attr{name} - enumerant name, a legal C preprocessor token name. +\item \attr{api} - an API name which specializes this definition of the + named enum, so that different APIs may have different values for + the same token (used to address a few accidental incompatibilities + between GL and GL ES). +\item \attr{type} - legal C suffix for the value to force it to a + specific type. Currently only \code{u} and \code{ull} are used, + for \code{unsigned} 32- and 64-bit integer values, respectively. + Separated from the \attr{value} field since this eases parsing and + sorting of values, and is rarely used. +\item \attr{group} - group name, an arbitrary string for grouping a set of + enums together within a broader namespace. + \par {\bf Note:} the \tag{group} tag (see section~\ref{tag:group}) + serves the same purpose, but is deprecated in favor of this attribute. + Eventually all \tag{group} tags will be removed from the XML + registries. +\item \attr{alias} - name of another enumerant this is an alias of, used + where token names have been changed as a result of profile changes + or for consistency purposes. An enumerant alias is simply a + different \attr{name} for the exact same \attr{value}. At present, + enumerants which are promoted from extension to core API status + are not tagged as aliases - just enumerants tagged as aliases in + the {\em Changed Tokens} sections of appendices to the OpenGL + Specification. This might change in the future. +\end{itemize} + +\subsection{Contents of \tag{enum} tags} + +\tag{enum} tags have no allowed contents. All information is contained +in the attributes. + + +\section{Unused Enumerants (\tag{unused} tag)} +\label{tag:unused} + +Each \tag{unused} tag defines a range of enumerants which is allocated, +but not yet assigned to specific enums. This just tracks the unused +values and is not needed for header generation. + +\subsection{Attributes of \tag{unused} tags} + +\begin{itemize} +\item \attr{start}, \attr{end} - integers defining the start and end of + an unused range of enumerants. \attr{start} must be $\leq$ + \attr{end}. This range should not exceed the range reserved by the + surrounding \tag{enums} tag. +\item \attr{vendor} - string describing the vendor or purposes to whom a + reserved range of enumerants is allocated. Usually identical to + the \attr{vendor} attribute of the surrounding \attr{enums} block. +\item \attr{comment} - arbitrary string (unused) +\end{itemize} + +\subsection{Contents of \tag{unused} tags} + +None. + + +\section{Command Blocks (\tag{commands} tag)} +\label{tag:commands} + +The \tag{commands} tag contains definitions of each of the functions +(commands) used in the API. + +\subsection{Attributes of \tag{commands} tags} + +\begin{itemize} +\item \attr{namespace} - a string defining the namespace in which + commands live, currently unused but typically something like + \code{GL}. +\end{itemize} + +\subsection{Contents of \tag{commands} tags} + +Each \tag{commands} block contains zero or more \tag{command} tags, in +arbitrary order (although they are typically ordered by sorting on the +command name, to improve human readability). + + +\section{Commands (\tag{command} tag)} +\label{tag:command} + +The \tag{command} tag contains a structured definition of a single API +command (function). + +\subsection{Attributes of \tag{command} tags} + +\begin{itemize} +\item \attr{comment} - arbitrary string (unused). +\end{itemize} + +\subsection{Contents of \tag{command} tags} + +\begin{itemize} +\item \tag{proto} must be the first element, and is a tag defining the C + function prototype of a command as described below, up to the + function name but not including function parameters. +\item \tag{param} elements for each command parameter follow, defining + its name and type, as described below. If a command takes no + arguments, it has no \tag{param} tags. +\end{itemize} + +Following these elements, the remaining elements in a \tag{command} +tag are optional and may be in any order: + +\begin{itemize} +\item \tag{alias} has one attribute, \attr{name}, containing a string which is the + name of another command this command is an alias of, used when + promoting a function from extension to ARB or ARB to API status. A + command alias describes the case where there are two function + names which resolve to the {\bf same} client library code, so (for + example) the case where a command is promoted but is also given + different GLX protocol would {\bf not} be an alias in this sense. +\item \tag{vecequiv} has one attribute, \attr{name}, containing a string which is + the name of another command which is the {\em vector equivalent} + of this command. For example, the vector equivalent of + \code{glVertex3f} is \code{glVertex3fv}. +\item \tag{glx} defines GLX protocol information for this command, as + described below. Many GL commands don't have GLX protocol defined, + and other APIs such as EGL and WGL don't use GLX at all. +\end{itemize} + + +\subsection{Command prototype (\tag{proto} tags)} +\label{tag:command:proto} + +The \tag{proto} tag defines the return type and name of a command. + +\subsubsection{Attributes of \tag{proto} tags} + +\begin{itemize} +\item \attr{group} - group name, an arbitrary string. +\item \attr{kind} - kind list, a comma separated list of names of + previously defined \tag{kind} tags. +\end{itemize} + +If the group name is defined, it may be interpreted as described in +section~\ref{tag:group:meaning}. + +\subsubsection{Contents of \tag{proto} tags} + +The text elements of a \tag{proto} tag, with all other tags removed, is +legal C code describing the return type and name of a command. In addition +it may contain two semantic tags: + +\begin{itemize} +\item The \tag{ptype} tag is optional, and contains text which is a + valid type name found in \tag{type} tag, and indicates that this + type must be previously defined for the definition of the command + to succeed. Builtin C types, and any derived types which are + expected to be found in other header files, should not be wrapped + in \tag{ptype} tags. +\item The \tag{name} tag is required, and contains the command name + being described. +\end{itemize} + +\subsection{Command parameter (\tag{param} tags)} +\label{tag:command:param} + +The \tag{param} tag defines the type and name of a parameter. + +\subsubsection{Attributes of \tag{param} tags} + +\begin{itemize} +\item \attr{group} - group name, an arbitrary string. +\item \attr{kind} - kind list, a comma separated list of names of + previously defined \tag{kind} tags. +\item \attr{len} - parameter length, either an integer specifying the + number of elements of the parameter \tag{ptype}, or a complex + string expression with poorly defined syntax, usually representing + a length that is computed as a combination of other command + parameter values, and possibly current GL state as well. +\item \attr{class} - an arbitrary string defining the type of object handles + passed in this parameter. Handles with different types are not + compatible; for example, handles created with + \attr{class}{\tt="buffer"} can not be passed to a parameter with + \attr{class}{\tt="shader"}. +\end{itemize} + +If the group name is defined, it may be interpreted as described in +section~\ref{tag:group:meaning}. + +\subsubsection{Contents of \tag{param} tags} + +The text elements of a \tag{param} tag, with all other tags removed, is +legal C code describing the type and name of a function parameter. In +addition it may contain two semantic tags: + +\begin{itemize} +\item The \tag{ptype} tag is optional, and contains text which is a + valid type name found in \tag{type} tag, and indicates that this + type must be previously defined for the definition of the command + to succeed. Builtin C types, and any derived types which are + expected to be found in other header files, should not be wrapped + in \tag{ptype} tags. +\item The \tag{name} tag is required, and contains the command name + being described. +\end{itemize} + +\subsection{Example of a \tag{commands} tag} + +\begin{verbatim} + + + void glBeginConditionalRenderNV + GLuint id + GLenum mode + + + + +\end{verbatim} + +When processed into a C header, this results in + +\begin{verbatim} +void glBeginConditionalRenderNV(GLuint id, GLenum mode); +\end{verbatim} + + +\section{API Features / Versions (\tag{feature} tag)} +\label{tag:feature} + +API features are described in individual \tag{feature} tags. A feature +is the set of interfaces (enumerants and commands) defined by a +particular API and version, such as OpenGL 4.0 or OpenGL ES 3.0, and +includes all API profiles of that version. + +\subsection{Attributes of \tag{feature} tags} + +\begin{itemize} +\item \attr{api} - API name this feature is for (see + section~\ref{schema:apiname}), such as \code{gl} or \code{gles2}. +\item \attr{name} - version name, used as the C preprocessor token under + which the version's interfaces are protected against multiple + inclusion. Example: \code{GL\_VERSION\_4\_2}. +\item \attr{protect} - an additional preprocessor token used to protect + a feature definition. Usually another feature or extension + \attr{name}. Rarely used, for odd circumstances where the + definition of a feature or extension requires another to be + defined first. +\item \attr{number} - feature version number, usually a string + interpreted as $majorNumber.minorNumber$. Example: \code{4.2}. +\item \attr{comment} - arbitrary string (unused) +\end{itemize} + +\subsection{Contents of \tag{feature} tags} + +Zero or more \tag{require} and \tag{remove} tags (see +section~\ref{tag:required}), in arbitrary order. Each tag describes a +set of interfaces that is respectively required for, or removed from, +this feature, as described below. + +\subsection{Example of a \tag{feature} tag} + +\begin{verbatim} + + + + + + + + + + +\end{verbatim} + +When processed into a C header for the \code{compatibility} profile of +OpenGL, this results in (assuming the usual definitions of these GL +interfaces): + +\begin{verbatim} +#ifndef GL_VERSION_3_0 +#define GL_VERSION_3_0 1 +#define GL_COMPARE_REF_TO_TEXTURE 0x884E +#define GL_CLIP_DISTANCE0 0x3000 +#define GL_INDEX 0x8222 +typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glEndTransformFeedback (void); +#endif +#endif /* GL_VERSION_3_0 */ +\end{verbatim} + +If processed into a header for the \code{core} profile, the definition of +\code{GL\_INDEX} would not appear. + + +\section{Extension Blocks (\tag{extensions} tag)} +\label{tag:extensions} + +The \tag{extensions} tag contains definitions of each of the extenions +which are defined for the API. + +\subsection{Attributes of \tag{extensions} tags} + +None. + +\subsection{Contents of \tag{extensions} tags} + +Each \tag{extensions} block contains zero or more \tag{extension} tags, +each describing an API extension, in arbitrary order (although they are +typically ordered by sorting on the extension name, to improve human +readability). + + +\section{API Extensions (\tag{extension} tag)} +\label{tag:extension} + +API extensions are described in individual \tag{extension} tags. An +extension is the set of interfaces defined by a particular API extension +specification, such as \code{ARB\_multitexture}. \tag{extension} is +similar to \tag{feature}, but instead of having \attr{version} and +\attr{profile} attributes, instead has a \attr{supported} attribute, +which describes the set of API names which the extension can potentially +be implemented against. + +\subsection{Attributes of \tag{extension} tags} + +\begin{itemize} +\item \attr{supported} - a regular expression, with an implicit + \code{\^{}} and \code{\$} bracketing it, which should match the + \attr{api} tag of a set of \tag{feature} tags. +\item \attr{protect} - an additional preprocessor token used to protect + an extension definition. Usually another feature or extension + \attr{name}. Rarely used, for odd circumstances where the + definition of an extension requires another to be defined first. +\item \attr{comment} - arbitrary string (unused) +\end{itemize} + +\subsection{Contents of \tag{extension} tags} + +Zero or more \tag{require} and \tag{remove} tags (see +section~\ref{tag:required}), in arbitrary order. Each tag describes a +set of interfaces that is respectively required for, or removed from, +this extension, as described below. + +\subsection{Example of an \tag{extensions} tag} + +\begin{verbatim} + + + + + + + + + + + +\end{verbatim} + +The \attr{supported} attribute says that the extension can be supported for +either the GL compatibility (\code{gl}) or GL core (\code{glcore}) API +profiles, but not for other APIs. When processed into a C header for the +\code{core} profile of OpenGL, this results in (assuming the usual +definitions of these GL interfaces): + +\begin{verbatim} +#ifndef GL_ARB_robustness +#define GL_ARB_robustness 1 +#define GL_NO_ERROR 0 +typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLenum APIENTRY glGetGraphicsResetStatusARB (void); +#endif +#endif /* GL_ARB_robustness */ +\end{verbatim} + + +\section{Required and Removed Interfaces (\tag{require} and \tag{remove} tags)} +\label{tag:required} + +A \tag{require} block defines a set of interfaces (types, enumerants and +commands) {\em required} by a \tag{feature} or \tag{extension}. A +\tag{remove} block defines a set of interfaces {\em removed} by a +\tag{feature} (this is primarily useful for the OpenGL core profile, +which removed many interfaces - extensions should never remove +interfaces, although this usage is allowed by the schema). Except for +the tag name and behavior, the contents of \tag{require} and +\tag{remove} tags are identical. + +\subsection{Attributes of \tag{require} and \tag{remove} tags} + +\begin{itemize} +\item \attr{profile} - string name of an API profile. Interfaces in the + tag are only required (or removed) if the specified profile is + being generated. If not specified, interfaces are required (or + removed) for all API profiles. +\item \attr{comment} - arbitrary string (unused) +\item \attr{api} - an API name (see section~\ref{schema:apiname}). Interfaces + in the tag are only required (or removed) if the specified API is + being generated. If not specified, interfaces are required (or + removed) for all APIs. + + {\bf The \attr{api} attribute is only supported inside + \tag{extension} tags,} since \tag{feature} tags already define a + specific API. +\end{itemize} + +\subsection{Contents of \tag{require} and \tag{remove} tags} + +Zero or more of the following tags, in any order: + +\begin{itemize} +\item \tag{command} specifies an required (or removed) command defined + in a \tag{commands} block. The tag has no content, but contains + elements: + + \begin{itemize} + \item \attr{name} - name of the command (required). + \item \attr{comment} - arbitrary string (optional and unused). + \end{itemize} +\item \tag{enum} specifies an required (or removed) enumerant defined in + a \tag{enums} block. The tag has no content, but contains + elements: + + \begin{itemize} + \item \attr{name} - name of the enumerant (required). + \item \attr{comment} - arbitrary string (optional and unused). + \end{itemize} +\item \tag{type} specifies a required (or removed) type defined in a + \tag{types} block. Most types are picked up implicitly by using + the \tag{ptype} tags of commands, but in a few cases, additional + types need to be specified explicitly (it is unlikely that a type + would ever be removed, although this usage is allowed by the + schema). The tag has no content, but contains elements: + + \begin{itemize} + \item \attr{name} - name of the type (required). + \item \attr{comment} - arbitrary string (optional and unused). + \end{itemize} +\end{itemize} + + +\section{General Discussion} +\label{general} + + +\subsection{Stability of the XML Database and Schema} +\label{general:stability} + +The new registry schema, scripts, and databases are evolving in response +to feedback and to Khronos' own wishlist. This means the XML schema is +subject to change, although most such change will probably be confined +to adding attributes to existing tags. The XML databases such as +\code{gl.xml} will evolve in response to schema changes, to new +extensions and API versions, and to general cleanup, such as +canonicalization of the XML or sorting of \tag{command} and +\tag{extension} tags by name. Changes to the schema will be described in +the change log of this document (see section~\ref{changelog}). Changes +to the \code{.xml} files will be described in Github revision history. + + +\subsection{Feature Enhancements to the Registry} +\label{general:enhancements} + +There are lots of tools and additional tags that would make the XML format +more expressive and the tools more capable. Khronos is open to hosting +additional processing scripts for other purposes related to the definition +of the API and bindings to it. + +A partial wishlist follows: + +\begin{itemize} +\item Enhance \tag{command} \tag{alias} tags to describe more relaxed + sorts of aliases, such as commands equivalent in behavior and + interface, but using different GLX protocol (this might be called + a {\em client-side alias} or something of the sort). +\end{itemize} + +\subsection{Type Annotations and Relationship to \code{.spec} Files} +\label{general:annotations} + +The initial releases of the XML Registry did not include type annotation +and array length information from the old \code{.spec} files, which +generated a number of complaints from people writing bindings of OpenGL +to languages other than C. The majority of these annotations have now +been added to the XML, in the form of \tag{group} tags (see +section~\ref{tag:group}) defining groups of related enumerants, +\attr{group} attributes on \tag{proto} and \tag{param} tags specifying +that the corresponding return type belongs to a group, and \attr{len} +attributes on \tag{param} tags specifying the array length of the +corresponding parameter. + +There are many caveats regarding these annotations. For the most part +they date from SGI's OpenGL 1.1 implementation, and have not been +updated. The defined \tag{group}s therefore do not cover many API +parameters which {\bf could} be given a group, and in many cases, the +defined \tag{group}s have not been updated to add new enumerants from +later versions of OpenGL and OpenGL extensions. The group names are +often somewhat misleading (with imbedded vendor extension tags, while +the corresponding features have been promoted). + +The \tag{group}s added to \code{gl.xml} are the enumerant groups defined +in \code{enum.spec}, and \code{enumext.spec}. Many additional group +names were used in the annotations in \code{gl.spec}, and they +fall in several categories discussed below. + + +\subsubsection{Simple API Type Aliases} + +Group names that were simply an alias for a GL type have been left +entirely out of \code{gl.xml}, since they offer no useful additional +information. + +For example, a parameter described as \code{UInt32} in \code{gl.spec} is +not annotated with \code{group="UInt32"} in \code{gl.xml}, because this +offers no information about the parameter not already present in its +declaration as \code{GLuint}. + +A few examples of such groups are \code{cl\_context}, +\code{handleARB}, \code{Int32}, and \code{sync}. + + +\subsubsection{Numeric Constraints} + +Group names representing some type of numerical constraint on a value +are retained in \tag{proto} and \tag{param} \attr{group} attributes, but +no definition exists. This is because the existing \tag{group} mechanism +can only describe constraints to specific enumerant names. + +This is not a regression relative to the \code{.spec} files, which also +did not describe the meaning of these groups. + +A few examples of such groups are \code{CheckedFloat32}, +\code{ClampedFixed}, and \code{CoordD}. + + +\subsubsection{GL Object Names} + +Group names representing an object name obtained from e.g. a +\code{glGen*} command, such as a display list name, are retained in in +\tag{proto} and \tag{param} \attr{group} attributes, but no definition +exists. This is because the existing \tag{group} mechanism can only +describe constraints to specific enumerant names. + +This is not a regression relative to the \code{.spec} files, which also +did not describe the meaning of these groups. + +A few examples of such groups are \code{List} and \code{Path}. + + +\subsubsection{Groups Not Defined Yet} + +Group names representing enumerant groups which were not defined in +\code{enum.spec} and \code{enumext.spec} are retained in \tag{proto} and +\tag{param} \attr{group} attributes, but no definition exists. Such +groups usually are a result of vendors contributing \code{gl.spec} +entries for an extension without contributing corresponding +\code{enum.spec} entries. + +This is not a regression relative to the \code{.spec} files, which also +did not describe the meaning of these groups. + +A few examples of such groups are \code{ArrayObjectPNameATI}, +\code{BinormalPointerTypeEXT}, and \code{SpriteParameterNameSGIX}. + + +\subsubsection{Other Groups} + +There are probably a few groups which are present in \code{gl.xml} but +should not be. These can be gradually cleaned up over time. + + +\subsubsection{Validating Groups} + +The \code{genheaders.py} script has been enhanced to allow validating +groups during header generation. Invoking it with the +\code{-validate} option, for example via: + +\code{\$ genheaders.py -validate -registry gl.xml} + +\noindent will generate a text dump on standard output showing all +parameter type \attr{group} attributes which do {\bf not} have +corresponding \tag{group} tags. + + +\section{Change Log} +\label{changelog} + +\begin{itemize} +\item 2020-10-27 - Add \attr{class} attribute to \tag{param} tags (github + pull request 428), update document title and make minor tweaks to + reflect this not being the only Khronos XML API schema in use, and + having migrated from Subversion to Github. +\item 2020-01-11 - Add \attr{group} attribute to \tag{enum} tags, and + deprecate \tag{group} tags (github issue 335). +\item 2017-01-20 - Update for the move to the new github repository. +\item 2014-06-16 - Add \tag{vendor} attribute to \tag{unused} tags. +\item 2013-09-17 - Add \tag{comment} attribute to \tag{command} tags + within \tag{commands}. +\item 2013-06-24 - Add \tag{groups} and \tag{group} tags, renamed + \tag{enums} attribute \attr{class} to \attr{group}, and add + parameter type annotation attributes \attr{group} and \attr{len} + to both \tag{proto} and \tag{param}. Add + section~\ref{general:annotations} discussing limitations of these + annotations. Still need to add examples of the annotation + attributes. +\item 2013-06-19 - Added \tag{extensions} tag block as a wrapper around + groups of \tag{extension} tags, to ease XML transformations such + as sorting extensions by name. +\item 2013-06-14 - Expanded description of tags, better formatting +\item 2013-06-12 - First release, text file format +\end{itemize} + +\input{readme.ind} + +% \printindex + +\end{document} diff --git a/StgSharp.GenerateGL/xml/reg.py b/StgSharp.GenerateGL/xml/reg.py index 0ef17076..dd147e41 100644 --- a/StgSharp.GenerateGL/xml/reg.py +++ b/StgSharp.GenerateGL/xml/reg.py @@ -1,1159 +1,1159 @@ -#!/usr/bin/python3 -i -# -# Copyright 2013-2020 The Khronos Group Inc. -# SPDX-License-Identifier: Apache-2.0 - -import io,os,re,string,sys -from lxml import etree - -def write(*args, **kwargs): - file = kwargs.pop('file', sys.stdout) - end = kwargs.pop('end', '\n') - file.write(' '.join([str(arg) for arg in args])) - file.write(end) - -# noneStr - returns string argument, or "" if argument is None. -# Used in converting lxml Elements into text. -# str - string to convert -def noneStr(str): - if (str): - return str - else: - return "" - -# matchAPIProfile - returns whether an API and profile -# being generated matches an element's profile -# api - string naming the API to match -# profile - string naming the profile to match -# elem - Element which (may) have 'api' and 'profile' -# attributes to match to. -# If a tag is not present in the Element, the corresponding API -# or profile always matches. -# Otherwise, the tag must exactly match the API or profile. -# Thus, if 'profile' = core: -# with no attribute will match -# will match -# will not match -# Possible match conditions: -# Requested Element -# Profile Profile -# --------- -------- -# None None Always matches -# 'string' None Always matches -# None 'string' Does not match. Can't generate multiple APIs -# or profiles, so if an API/profile constraint -# is present, it must be asked for explicitly. -# 'string' 'string' Strings must match -# -# ** In the future, we will allow regexes for the attributes, -# not just strings, so that api="^(gl|gles2)" will match. Even -# this isn't really quite enough, we might prefer something -# like "gl(core)|gles1(common-lite)". -def matchAPIProfile(api, profile, elem): - """Match a requested API & profile name to a api & profile attributes of an Element""" - match = True - # Match 'api', if present - if ('api' in elem.attrib): - if (api == None): - raise UserWarning("No API requested, but 'api' attribute is present with value '" + - elem.get('api') + "'") - elif (api != elem.get('api')): - # Requested API doesn't match attribute - return False - if ('profile' in elem.attrib): - if (profile == None): - raise UserWarning("No profile requested, but 'profile' attribute is present with value '" + - elem.get('profile') + "'") - elif (profile != elem.get('profile')): - # Requested profile doesn't match attribute - return False - return True - -# BaseInfo - base class for information about a registry feature -# (type/group/enum/command/API/extension). -# required - should this feature be defined during header generation -# (has it been removed by a profile or version)? -# declared - has this feature been defined already? -# elem - lxml.etree Element for this feature -# resetState() - reset required/declared to initial values. Used -# prior to generating a new API interface. -class BaseInfo: - """Represents the state of a registry feature, used during API generation""" - def __init__(self, elem): - self.required = False - self.declared = False - self.elem = elem - def resetState(self): - self.required = False - self.declared = False - -# TypeInfo - registry information about a type. No additional state -# beyond BaseInfo is required. -class TypeInfo(BaseInfo): - """Represents the state of a registry type""" - def __init__(self, elem): - BaseInfo.__init__(self, elem) - -# GroupInfo - registry information about a group of related enums. -# enums - dictionary of enum names which are in the group -class GroupInfo(BaseInfo): - """Represents the state of a registry enumerant group""" - def __init__(self, elem): - BaseInfo.__init__(self, elem) - self.enums = {} - -# EnumInfo - registry information about an enum -# type - numeric type of the value of the tag -# ( '' for GLint, 'u' for GLuint, 'ull' for GLuint64 ) -class EnumInfo(BaseInfo): - """Represents the state of a registry enum""" - def __init__(self, elem): - BaseInfo.__init__(self, elem) - self.type = elem.get('type') - if (self.type == None): - self.type = '' - -# CmdInfo - registry information about a command -# glxtype - type of GLX protocol { None, 'render', 'single', 'vendor' } -# glxopcode - GLX protocol opcode { None, number } -# glxequiv - equivalent command at GLX dispatch level { None, string } -# vecequiv - equivalent vector form of a command taking multiple scalar args -# { None, string } -class CmdInfo(BaseInfo): - """Represents the state of a registry command""" - def __init__(self, elem): - BaseInfo.__init__(self, elem) - self.glxtype = None - self.glxopcode = None - self.glxequiv = None - self.vecequiv = None - -# FeatureInfo - registry information about an API -# or -# name - feature name string (e.g. 'GL_ARB_multitexture') -# number - feature version number (e.g. 1.2). -# features are unversioned and assigned version number 0. -# category - category, e.g. VERSION or ARB/KHR/OES/ETC/vendor -# emit - has this feature been defined already? -class FeatureInfo(BaseInfo): - """Represents the state of an API feature (version/extension)""" - def __init__(self, elem): - BaseInfo.__init__(self, elem) - self.name = elem.get('name') - # Determine element category (vendor). Only works - # for elements. - if (elem.tag == 'feature'): - self.category = 'VERSION' - self.number = elem.get('number') - else: - self.category = self.name.split('_', 2)[1] - self.number = "0" - self.emit = False - -# Primary sort key for regSortFeatures. -# Sorts by category of the feature name string: -# Core API features (those defined with a tag) -# ARB/KHR/OES (Khronos extensions) -# other (EXT/vendor extensions) -def regSortCategoryKey(feature): - if (feature.elem.tag == 'feature'): - return 0 - elif (feature.category == 'ARB' or - feature.category == 'KHR' or - feature.category == 'OES'): - return 1 - else: - return 2 - -# Secondary sort key for regSortFeatures. -# Sorts by extension name. -def regSortNameKey(feature): - return feature.name - -# Tertiary sort key for regSortFeatures. -# Sorts by feature version number. -# elements all have version number "0" -def regSortNumberKey(feature): - return feature.number - -# regSortFeatures - default sort procedure for features. -# Sorts by primary key of feature category, -# then by feature name within the category, -# then by version number -def regSortFeatures(featureList): - featureList.sort(key = regSortNumberKey) - featureList.sort(key = regSortNameKey) - featureList.sort(key = regSortCategoryKey) - -# GeneratorOptions - base class for options used during header production -# These options are target language independent, and used by -# Registry.apiGen() and by base OutputGenerator objects. -# -# Members -# filename - name of file to generate, or None to write to stdout. -# apiname - string matching 'apiname' attribute, e.g. 'gl'. -# profile - string specifying API profile , e.g. 'core', or None. -# versions - regex matching API versions to process interfaces for. -# Normally '.*' or r'[0-9]\.[0-9]' to match all defined versions. -# emitversions - regex matching API versions to actually emit -# interfaces for (though all requested versions are considered -# when deciding which interfaces to generate). For GL 4.3 glext.h, -# this might be r'1\.[2-5]|[2-4]\.[0-9]'. -# defaultExtensions - If not None, a string which must in its -# entirety match the pattern in the "supported" attribute of -# the . Defaults to None. Usually the same as apiname. -# addExtensions - regex matching names of additional extensions -# to include. Defaults to None. -# removeExtensions - regex matching names of extensions to -# remove (after defaultExtensions and addExtensions). Defaults -# to None. -# sortProcedure - takes a list of FeatureInfo objects and sorts -# them in place to a preferred order in the generated output. -# Default is core API versions, ARB/KHR/OES extensions, all -# other extensions, alphabetically within each group. -# The regex patterns can be None or empty, in which case they match -# nothing. -class GeneratorOptions: - """Represents options during header production from an API registry""" - def __init__(self, - filename = None, - apiname = None, - profile = None, - versions = '.*', - emitversions = '.*', - defaultExtensions = None, - addExtensions = None, - removeExtensions = None, - sortProcedure = regSortFeatures): - self.filename = filename - self.apiname = apiname - self.profile = profile - self.versions = self.emptyRegex(versions) - self.emitversions = self.emptyRegex(emitversions) - self.defaultExtensions = defaultExtensions - self.addExtensions = self.emptyRegex(addExtensions) - self.removeExtensions = self.emptyRegex(removeExtensions) - self.sortProcedure = sortProcedure - # - # Substitute a regular expression which matches no version - # or extension names for None or the empty string. - def emptyRegex(self,pat): - if (pat == None or pat == ''): - return '_nomatch_^' - else: - return pat - -# CGeneratorOptions - subclass of GeneratorOptions. -# -# Adds options used by COutputGenerator objects during C language header -# generation. -# -# Additional members -# prefixText - list of strings to prefix generated header with -# (usually a copyright statement + calling convention macros). -# protectFile - True if multiple inclusion protection should be -# generated (based on the filename) around the entire header. -# protectFeature - True if #ifndef..#endif protection should be -# generated around a feature interface in the header file. -# genFuncPointers - True if function pointer typedefs should be -# generated -# protectProto - Controls cpp protection around prototypes: -# False - no protection -# 'nonzero' - protectProtoStr must be defined to a nonzero value -# True - protectProtoStr must be defined -# protectProtoStr - #ifdef symbol to use around prototype -# declarations, if protected -# apicall - string to use for the function declaration prefix, -# such as APICALL on Windows. -# apientry - string to use for the calling convention macro, -# in typedefs, such as APIENTRY. -# apientryp - string to use for the calling convention macro -# in function pointer typedefs, such as APIENTRYP. -class CGeneratorOptions(GeneratorOptions): - """Represents options during C header production from an API registry""" - def __init__(self, - filename = None, - apiname = None, - profile = None, - versions = '.*', - emitversions = '.*', - defaultExtensions = None, - addExtensions = None, - removeExtensions = None, - sortProcedure = regSortFeatures, - prefixText = "", - genFuncPointers = True, - protectFile = True, - protectFeature = True, - protectProto = True, - protectProtoStr = True, - apicall = '', - apientry = '', - apientryp = ''): - GeneratorOptions.__init__(self, filename, apiname, profile, - versions, emitversions, defaultExtensions, - addExtensions, removeExtensions, sortProcedure) - self.prefixText = prefixText - self.genFuncPointers = genFuncPointers - self.protectFile = protectFile - self.protectFeature = protectFeature - self.protectProto = protectProto - self.protectProtoStr = protectProtoStr - self.apicall = apicall - self.apientry = apientry - self.apientryp = apientryp - -# OutputGenerator - base class for generating API interfaces. -# Manages basic logic, logging, and output file control -# Derived classes actually generate formatted output. -# -# ---- methods ---- -# OutputGenerator(errFile, warnFile, diagFile) -# errFile, warnFile, diagFile - file handles to write errors, -# warnings, diagnostics to. May be None to not write. -# logMsg(level, *args) - log messages of different categories -# level - 'error', 'warn', or 'diag'. 'error' will also -# raise a UserWarning exception -# *args - print()-style arguments -# beginFile(genOpts) - start a new interface file -# genOpts - GeneratorOptions controlling what's generated and how -# endFile() - finish an interface file, closing it when done -# beginFeature(interface, emit) - write interface for a feature -# and tag generated features as having been done. -# interface - element for the / to generate -# emit - actually write to the header only when True -# endFeature() - finish an interface. -# genType(typeinfo,name) - generate interface for a type -# typeinfo - TypeInfo for a type -# genEnum(enuminfo, name) - generate interface for an enum -# enuminfo - EnumInfo for an enum -# name - enum name -# genCmd(cmdinfo) - generate interface for a command -# cmdinfo - CmdInfo for a command -class OutputGenerator: - """Generate specified API interfaces in a specific style, such as a C header""" - def __init__(self, - errFile = sys.stderr, - warnFile = sys.stderr, - diagFile = sys.stdout): - self.outFile = None - self.errFile = errFile - self.warnFile = warnFile - self.diagFile = diagFile - # Internal state - self.featureName = None - self.genOpts = None - # - # logMsg - write a message of different categories to different - # destinations. - # level - - # 'diag' (diagnostic, voluminous) - # 'warn' (warning) - # 'error' (fatal error - raises exception after logging) - # *args - print()-style arguments to direct to corresponding log - def logMsg(self, level, *args): - """Log a message at the given level. Can be ignored or log to a file""" - if (level == 'error'): - strfile = io.StringIO() - write('ERROR:', *args, file=strfile) - if (self.errFile != None): - write(strfile.getvalue(), file=self.errFile) - raise UserWarning(strfile.getvalue()) - elif (level == 'warn'): - if (self.warnFile != None): - write('WARNING:', *args, file=self.warnFile) - elif (level == 'diag'): - if (self.diagFile != None): - write('DIAG:', *args, file=self.diagFile) - else: - raise UserWarning( - '*** FATAL ERROR in Generator.logMsg: unknown level:' + level) - # - def beginFile(self, genOpts): - self.genOpts = genOpts - # - # Open specified output file. Not done in constructor since a - # Generator can be used without writing to a file. - if (self.genOpts.filename != None): - self.outFile = open(self.genOpts.filename, 'w') - else: - self.outFile = sys.stdout - def endFile(self): - self.errFile and self.errFile.flush() - self.warnFile and self.warnFile.flush() - self.diagFile and self.diagFile.flush() - self.outFile.flush() - if (self.outFile != sys.stdout and self.outFile != sys.stderr): - self.outFile.close() - self.genOpts = None - # - def beginFeature(self, interface, emit): - self.emit = emit - self.featureName = interface.get('name') - # If there's an additional 'protect' attribute in the feature, save it - self.featureExtraProtect = interface.get('protect') - def endFeature(self): - # Derived classes responsible for emitting feature - self.featureName = None - self.featureExtraProtect = None - # - # Type generation - def genType(self, typeinfo, name): - if (self.featureName == None): - raise UserWarning('Attempt to generate type', name, - 'when not in feature') - # - # Enumerant generation - def genEnum(self, enuminfo, name): - if (self.featureName == None): - raise UserWarning('Attempt to generate enum', name, - 'when not in feature') - # - # Command generation - def genCmd(self, cmd, name): - if (self.featureName == None): - raise UserWarning('Attempt to generate command', name, - 'when not in feature') - -# COutputGenerator - subclass of OutputGenerator. -# Generates C-language API interfaces. -# -# ---- methods ---- -# COutputGenerator(errFile, warnFile, diagFile) - args as for -# OutputGenerator. Defines additional internal state. -# makeCDecls(cmd) - return C prototype and function pointer typedef for a -# Element, as a list of two strings -# cmd - Element for the -# newline() - print a newline to the output file (utility function) -# ---- methods overriding base class ---- -# beginFile(genOpts) -# endFile() -# beginFeature(interface, emit) -# endFeature() -# genType(typeinfo,name) - generate interface for a type -# genEnum(enuminfo, name) -# genCmd(cmdinfo) -class COutputGenerator(OutputGenerator): - """Generate specified API interfaces in a specific style, such as a C header""" - def __init__(self, - errFile = sys.stderr, - warnFile = sys.stderr, - diagFile = sys.stdout): - OutputGenerator.__init__(self, errFile, warnFile, diagFile) - # Internal state - accumulators for different inner block text - self.typeBody = '' - self.enumBody = '' - self.cmdBody = '' - # - # makeCDecls - return C prototype and function pointer typedef for a - # command, as a two-element list of strings. - # cmd - Element containing a tag - def makeCDecls(self, cmd): - """Generate C function pointer typedef for Element""" - proto = cmd.find('proto') - params = cmd.findall('param') - # Begin accumulating prototype and typedef strings - pdecl = self.genOpts.apicall - tdecl = 'typedef ' - # - # Insert the function return type/name. - # For prototypes, add APIENTRY macro before the name - # For typedefs, add (APIENTRYP ) around the name and - # use the PFNGLCMDNAMEPROC nameng convention. - # Done by walking the tree for element by element. - # lxml.etree has elem.text followed by (elem[i], elem[i].tail) - # for each child element and any following text - # Leading text - pdecl += noneStr(proto.text) - tdecl += noneStr(proto.text) - # For each child element, if it's a wrap in appropriate - # declaration. Otherwise append its contents and tail contents. - for elem in proto: - text = noneStr(elem.text) - tail = noneStr(elem.tail) - if (elem.tag == 'name'): - pdecl += self.genOpts.apientry + text + tail - tdecl += '(' + self.genOpts.apientryp + 'PFN' + text.upper() + 'PROC' + tail + ')' - else: - pdecl += text + tail - tdecl += text + tail - # Now add the parameter declaration list, which is identical - # for prototypes and typedefs. Concatenate all the text from - # a node without the tags. No tree walking required - # since all tags are ignored. - n = len(params) - paramdecl = ' (' - if n > 0: - for i in range(0,n): - paramdecl += ''.join([t for t in params[i].itertext()]) - if (i < n - 1): - paramdecl += ', ' - else: - paramdecl += 'void' - paramdecl += ');\n'; - return [ pdecl + paramdecl, tdecl + paramdecl ] - # - def newline(self): - write('', file=self.outFile) - # - def beginFile(self, genOpts): - OutputGenerator.beginFile(self, genOpts) - # C-specific - # - # Multiple inclusion protection & C++ wrappers. - if (genOpts.protectFile and self.genOpts.filename): - headerSym = '__' + self.genOpts.apiname + '_' + re.sub('\.h', '_h_', os.path.basename(self.genOpts.filename)) - write('#ifndef', headerSym, file=self.outFile) - write('#define', headerSym, '1', file=self.outFile) - self.newline() - write('#ifdef __cplusplus', file=self.outFile) - write('extern "C" {', file=self.outFile) - write('#endif', file=self.outFile) - self.newline() - # - # User-supplied prefix text, if any (list of strings) - if (genOpts.prefixText): - for s in genOpts.prefixText: - write(s, file=self.outFile) - # - # Some boilerplate describing what was generated - this - # will probably be removed later since the extensions - # pattern may be very long. - write('/* Generated C header for:', file=self.outFile) - write(' * API:', genOpts.apiname, file=self.outFile) - if (genOpts.profile): - write(' * Profile:', genOpts.profile, file=self.outFile) - write(' * Versions considered:', genOpts.versions, file=self.outFile) - write(' * Versions emitted:', genOpts.emitversions, file=self.outFile) - write(' * Default extensions included:', genOpts.defaultExtensions, file=self.outFile) - write(' * Additional extensions included:', genOpts.addExtensions, file=self.outFile) - write(' * Extensions removed:', genOpts.removeExtensions, file=self.outFile) - write(' */', file=self.outFile) - def endFile(self): - # C-specific - # Finish C++ wrapper and multiple inclusion protection - self.newline() - write('#ifdef __cplusplus', file=self.outFile) - write('}', file=self.outFile) - write('#endif', file=self.outFile) - if (self.genOpts.protectFile and self.genOpts.filename): - self.newline() - write('#endif', file=self.outFile) - # Finish processing in superclass - OutputGenerator.endFile(self) - def beginFeature(self, interface, emit): - # Start processing in superclass - OutputGenerator.beginFeature(self, interface, emit) - # C-specific - # Accumulate types, enums, function pointer typedefs, end function - # prototypes separately for this feature. They're only printed in - # endFeature(). - self.typeBody = '' - self.enumBody = '' - self.cmdPointerBody = '' - self.cmdBody = '' - def endFeature(self): - # C-specific - # Actually write the interface to the output file. - if (self.emit): - self.newline() - if (self.genOpts.protectFeature): - write('#ifndef', self.featureName, file=self.outFile) - write('#define', self.featureName, '1', file=self.outFile) - if (self.typeBody != ''): - write(self.typeBody, end='', file=self.outFile) - # - # Don't add additional protection for derived type declarations, - # which may be needed by other features later on. - if (self.featureExtraProtect != None): - write('#ifdef', self.featureExtraProtect, file=self.outFile) - if (self.enumBody != ''): - write(self.enumBody, end='', file=self.outFile) - if (self.genOpts.genFuncPointers and self.cmdPointerBody != ''): - write(self.cmdPointerBody, end='', file=self.outFile) - if (self.cmdBody != ''): - if (self.genOpts.protectProto == True): - prefix = '#ifdef ' + self.genOpts.protectProtoStr + '\n' - suffix = '#endif\n' - elif (self.genOpts.protectProto == 'nonzero'): - prefix = '#if ' + self.genOpts.protectProtoStr + '\n' - suffix = '#endif\n' - elif (self.genOpts.protectProto == False): - prefix = '' - suffix = '' - else: - self.gen.logMsg('warn', - '*** Unrecognized value for protectProto:', - self.genOpts.protectProto, - 'not generating prototype wrappers') - prefix = '' - suffix = '' - - write(prefix + self.cmdBody + suffix, end='', file=self.outFile) - if (self.featureExtraProtect != None): - write('#endif /*', self.featureExtraProtect, '*/', file=self.outFile) - if (self.genOpts.protectFeature): - write('#endif /*', self.featureName, '*/', file=self.outFile) - # Finish processing in superclass - OutputGenerator.endFeature(self) - # - # Type generation - def genType(self, typeinfo, name): - OutputGenerator.genType(self, typeinfo, name) - # - # Replace tags with an APIENTRY-style string - # (from self.genOpts). Copy other text through unchanged. - # If the resulting text is an empty string, don't emit it. - typeElem = typeinfo.elem - s = noneStr(typeElem.text) - for elem in typeElem: - if (elem.tag == 'apientry'): - s += self.genOpts.apientry + noneStr(elem.tail) - else: - s += noneStr(elem.text) + noneStr(elem.tail) - if (len(s) > 0): - self.typeBody += s + '\n' - # - # Enumerant generation - def genEnum(self, enuminfo, name): - OutputGenerator.genEnum(self, enuminfo, name) - # - # EnumInfo.type is a C value suffix (e.g. u, ull) - self.enumBody += '#define ' + name.ljust(33) + ' ' + enuminfo.elem.get('value') - # - # Handle non-integer 'type' fields by using it as the C value suffix - t = enuminfo.elem.get('type') - if (t != '' and t != 'i'): - self.enumBody += enuminfo.type - self.enumBody += '\n' - # - # Command generation - def genCmd(self, cmdinfo, name): - OutputGenerator.genCmd(self, cmdinfo, name) - # - decls = self.makeCDecls(cmdinfo.elem) - self.cmdBody += decls[0] - if (self.genOpts.genFuncPointers): - self.cmdPointerBody += decls[1] - -# Registry - object representing an API registry, loaded from an XML file -# Members -# tree - ElementTree containing the root -# typedict - dictionary of TypeInfo objects keyed by type name -# groupdict - dictionary of GroupInfo objects keyed by group name -# enumdict - dictionary of EnumInfo objects keyed by enum name -# cmddict - dictionary of CmdInfo objects keyed by command name -# apidict - dictionary of Elements keyed by API name -# extensions - list of Elements -# extdict - dictionary of Elements keyed by extension name -# gen - OutputGenerator object used to write headers / messages -# genOpts - GeneratorOptions object used to control which -# fetures to write and how to format them -# emitFeatures - True to actually emit features for a version / extension, -# or False to just treat them as emitted -# Public methods -# loadElementTree(etree) - load registry from specified ElementTree -# loadFile(filename) - load registry from XML file -# setGenerator(gen) - OutputGenerator to use -# parseTree() - parse the registry once loaded & create dictionaries -# dumpReg(maxlen, filehandle) - diagnostic to dump the dictionaries -# to specified file handle (default stdout). Truncates type / -# enum / command elements to maxlen characters (default 80) -# generator(g) - specify the output generator object -# apiGen(apiname, genOpts) - generate API headers for the API type -# and profile specified in genOpts, but only for the versions and -# extensions specified there. -# apiReset() - call between calls to apiGen() to reset internal state -# validateGroups() - call to verify that each or -# with a 'group' attribute matches an actual existing group. -# Private methods -# addElementInfo(elem,info,infoName,dictionary) - add feature info to dict -# lookupElementInfo(fname,dictionary) - lookup feature info in dict -class Registry: - """Represents an API registry loaded from XML""" - def __init__(self): - self.tree = None - self.typedict = {} - self.groupdict = {} - self.enumdict = {} - self.cmddict = {} - self.apidict = {} - self.extensions = [] - self.extdict = {} - # A default output generator, so commands prior to apiGen can report - # errors via the generator object. - self.gen = OutputGenerator() - self.genOpts = None - self.emitFeatures = False - def loadElementTree(self, tree): - """Load ElementTree into a Registry object and parse it""" - self.tree = tree - self.parseTree() - def loadFile(self, file): - """Load an API registry XML file into a Registry object and parse it""" - self.tree = etree.parse(file) - self.parseTree() - def setGenerator(self, gen): - """Specify output generator object. None restores the default generator""" - self.gen = gen - # addElementInfo - add information about an element to the - # corresponding dictionary - # elem - ///// Element - # info - corresponding {Type|Group|Enum|Cmd|Feature}Info object - # infoName - 'type' / 'group' / 'enum' / 'command' / 'feature' / 'extension' - # dictionary - self.{type|group|enum|cmd|api|ext}dict - # If the Element has an 'api' attribute, the dictionary key is the - # tuple (name,api). If not, the key is the name. 'name' is an - # attribute of the Element - def addElementInfo(self, elem, info, infoName, dictionary): - if ('api' in elem.attrib): - key = (elem.get('name'),elem.get('api')) - else: - key = elem.get('name') - if key in dictionary: - self.gen.logMsg('warn', '*** Attempt to redefine', - infoName, 'with key:', key) - else: - dictionary[key] = info - # - # lookupElementInfo - find a {Type|Enum|Cmd}Info object by name. - # If an object qualified by API name exists, use that. - # fname - name of type / enum / command - # dictionary - self.{type|enum|cmd}dict - def lookupElementInfo(self, fname, dictionary): - key = (fname, self.genOpts.apiname) - if (key in dictionary): - # self.gen.logMsg('diag', 'Found API-specific element for feature', fname) - return dictionary[key] - elif (fname in dictionary): - # self.gen.logMsg('diag', 'Found generic element for feature', fname) - return dictionary[fname] - else: - return None - def parseTree(self): - """Parse the registry Element, once created""" - # This must be the Element for the root - self.reg = self.tree.getroot() - # - # Create dictionary of registry types from toplevel tags - # and add 'name' attribute to each tag (where missing) - # based on its element. - # - # There's usually one block; more are OK - # Required attributes: 'name' or nested tag contents - self.typedict = {} - for type in self.reg.findall('types/type'): - # If the doesn't already have a 'name' attribute, set - # it from contents of its tag. - if (type.get('name') == None): - type.attrib['name'] = type.find('name').text - self.addElementInfo(type, TypeInfo(type), 'type', self.typedict) - # - # Create dictionary of registry groups from toplevel tags. - # - # There's usually one block; more are OK. - # Required attributes: 'name' - self.groupdict = {} - for group in self.reg.findall('groups/group'): - self.addElementInfo(group, GroupInfo(group), 'group', self.groupdict) - # - # Create dictionary of registry enums from toplevel tags - # - # There are usually many tags in different namespaces, but - # these are functional namespaces of the values, while the actual - # enum names all share the dictionary. - # Required attributes: 'name', 'value' - self.enumdict = {} - for enum in self.reg.findall('enums/enum'): - self.addElementInfo(enum, EnumInfo(enum), 'enum', self.enumdict) - # - # Create dictionary of registry commands from tags - # and add 'name' attribute to each tag (where missing) - # based on its element. - # - # There's usually only one block; more are OK. - # Required attributes: 'name' or tag contents - self.cmddict = {} - for cmd in self.reg.findall('commands/command'): - # If the doesn't already have a 'name' attribute, set - # it from contents of its tag. - if (cmd.get('name') == None): - cmd.attrib['name'] = cmd.find('proto/name').text - ci = CmdInfo(cmd) - self.addElementInfo(cmd, ci, 'command', self.cmddict) - # - # Create dictionaries of API and extension interfaces - # from toplevel and tags. - # - self.apidict = {} - for feature in self.reg.findall('feature'): - ai = FeatureInfo(feature) - self.addElementInfo(feature, ai, 'feature', self.apidict) - self.extensions = self.reg.findall('extensions/extension') - self.extdict = {} - for feature in self.extensions: - ei = FeatureInfo(feature) - self.addElementInfo(feature, ei, 'extension', self.extdict) - def dumpReg(self, maxlen = 40, filehandle = sys.stdout): - """Dump all the dictionaries constructed from the Registry object""" - write('***************************************', file=filehandle) - write(' ** Dumping Registry contents **', file=filehandle) - write('***************************************', file=filehandle) - write('// Types', file=filehandle) - for name in self.typedict: - tobj = self.typedict[name] - write(' Type', name, '->', etree.tostring(tobj.elem)[0:maxlen], file=filehandle) - write('// Groups', file=filehandle) - for name in self.groupdict: - gobj = self.groupdict[name] - write(' Group', name, '->', etree.tostring(gobj.elem)[0:maxlen], file=filehandle) - write('// Enums', file=filehandle) - for name in self.enumdict: - eobj = self.enumdict[name] - write(' Enum', name, '->', etree.tostring(eobj.elem)[0:maxlen], file=filehandle) - write('// Commands', file=filehandle) - for name in self.cmddict: - cobj = self.cmddict[name] - write(' Command', name, '->', etree.tostring(cobj.elem)[0:maxlen], file=filehandle) - write('// APIs', file=filehandle) - for key in self.apidict: - write(' API Version ', key, '->', - etree.tostring(self.apidict[key].elem)[0:maxlen], file=filehandle) - write('// Extensions', file=filehandle) - for key in self.extdict: - write(' Extension', key, '->', - etree.tostring(self.extdict[key].elem)[0:maxlen], file=filehandle) - # write('***************************************', file=filehandle) - # write(' ** Dumping XML ElementTree **', file=filehandle) - # write('***************************************', file=filehandle) - # write(etree.tostring(self.tree.getroot(),pretty_print=True), file=filehandle) - # - # typename - name of type - # required - boolean (to tag features as required or not) - def markTypeRequired(self, typename, required): - """Require (along with its dependencies) or remove (but not its dependencies) a type""" - self.gen.logMsg('diag', '*** tagging type:', typename, '-> required =', required) - # Get TypeInfo object for tag corresponding to typename - type = self.lookupElementInfo(typename, self.typedict) - if (type != None): - # Tag required type dependencies as required. - # This DOES NOT un-tag dependencies in a tag. - # See comments in markRequired() below for the reason. - if (required and ('requires' in type.elem.attrib)): - depType = type.elem.get('requires') - self.gen.logMsg('diag', '*** Generating dependent type', - depType, 'for type', typename) - self.markTypeRequired(depType, required) - type.required = required - else: - self.gen.logMsg('warn', '*** type:', typename , 'IS NOT DEFINED') - # - # features - Element for or tag - # required - boolean (to tag features as required or not) - def markRequired(self, features, required): - """Require or remove features specified in the Element""" - self.gen.logMsg('diag', '*** markRequired (features = , required =', required, ')') - # Loop over types, enums, and commands in the tag - # @@ It would be possible to respect 'api' and 'profile' attributes - # in individual features, but that's not done yet. - for typeElem in features.findall('type'): - self.markTypeRequired(typeElem.get('name'), required) - for enumElem in features.findall('enum'): - name = enumElem.get('name') - self.gen.logMsg('diag', '*** tagging enum:', name, '-> required =', required) - enum = self.lookupElementInfo(name, self.enumdict) - if (enum != None): - enum.required = required - else: - self.gen.logMsg('warn', '*** enum:', name , 'IS NOT DEFINED') - for cmdElem in features.findall('command'): - name = cmdElem.get('name') - self.gen.logMsg('diag', '*** tagging command:', name, '-> required =', required) - cmd = self.lookupElementInfo(name, self.cmddict) - if (cmd != None): - cmd.required = required - # Tag all parameter types of this command as required. - # This DOES NOT remove types of commands in a - # tag, because many other commands may use the same type. - # We could be more clever and reference count types, - # instead of using a boolean. - if (required): - # Look for in entire tree, - # not just immediate children - for ptype in cmd.elem.findall('.//ptype'): - self.gen.logMsg('diag', '*** markRequired: command implicitly requires dependent type', ptype.text) - self.markTypeRequired(ptype.text, required) - else: - self.gen.logMsg('warn', '*** command:', name, 'IS NOT DEFINED') - # - # interface - Element for or , containing - # and tags - # api - string specifying API name being generated - # profile - string specifying API profile being generated - def requireAndRemoveFeatures(self, interface, api, profile): - """Process and tags for a or """ - # marks things that are required by this version/profile - for feature in interface.findall('require'): - if (matchAPIProfile(api, profile, feature)): - self.markRequired(feature,True) - # marks things that are removed by this version/profile - for feature in interface.findall('remove'): - if (matchAPIProfile(api, profile, feature)): - self.markRequired(feature,False) - # - # generateFeature - generate a single type / enum / command, - # and all its dependencies as needed. - # fname - name of feature (// - # ftype - type of feature, 'type' | 'enum' | 'command' - # dictionary - of *Info objects - self.{type|enum|cmd}dict - # genProc - bound function pointer for self.gen.gen{Type|Enum|Cmd} - def generateFeature(self, fname, ftype, dictionary, genProc): - f = self.lookupElementInfo(fname, dictionary) - if (f == None): - # No such feature. This is an error, but reported earlier - self.gen.logMsg('diag', '*** No entry found for feature', fname, - 'returning!') - return - # - # If feature isn't required, or has already been declared, return - if (not f.required): - self.gen.logMsg('diag', '*** Skipping', ftype, fname, '(not required)') - return - if (f.declared): - self.gen.logMsg('diag', '*** Skipping', ftype, fname, '(already declared)') - return - # - # Pull in dependent type declaration(s) of the feature. - # For types, there may be one in the 'required' attribute of the element - # For commands, there may be many in tags within the element - # For enums, no dependencies are allowed (though perhasps if you - # have a uint64 enum, it should require GLuint64) - if (ftype == 'type'): - if ('requires' in f.elem.attrib): - depname = f.elem.get('requires') - self.gen.logMsg('diag', '*** Generating required dependent type', - depname) - self.generateFeature(depname, 'type', self.typedict, - self.gen.genType) - elif (ftype == 'command'): - for ptype in f.elem.findall('.//ptype'): - depname = ptype.text - self.gen.logMsg('diag', '*** Generating required parameter type', - depname) - self.generateFeature(depname, 'type', self.typedict, - self.gen.genType) - # - # Actually generate the type only if emitting declarations - if self.emitFeatures: - self.gen.logMsg('diag', '*** Emitting', ftype, 'decl for', fname) - genProc(f, fname) - else: - self.gen.logMsg('diag', '*** Skipping', ftype, fname, - '(not emitting this feature)') - # Always mark feature declared, as though actually emitted - f.declared = True - # - # generateRequiredInterface - generate all interfaces required - # by an API version or extension - # interface - Element for or - def generateRequiredInterface(self, interface): - """Generate required C interface for specified API version/extension""" - # - # Loop over all features inside all tags. - # tags are ignored (handled in pass 1). - for features in interface.findall('require'): - for t in features.findall('type'): - self.generateFeature(t.get('name'), 'type', self.typedict, - self.gen.genType) - for e in features.findall('enum'): - self.generateFeature(e.get('name'), 'enum', self.enumdict, - self.gen.genEnum) - for c in features.findall('command'): - self.generateFeature(c.get('name'), 'command', self.cmddict, - self.gen.genCmd) - # - # apiGen(genOpts) - generate interface for specified versions - # genOpts - GeneratorOptions object with parameters used - # by the Generator object. - def apiGen(self, genOpts): - """Generate interfaces for the specified API type and range of versions""" - # - self.gen.logMsg('diag', '*******************************************') - self.gen.logMsg('diag', ' Registry.apiGen file:', genOpts.filename, - 'api:', genOpts.apiname, - 'profile:', genOpts.profile) - self.gen.logMsg('diag', '*******************************************') - # - self.genOpts = genOpts - # Reset required/declared flags for all features - self.apiReset() - # - # Compile regexps used to select versions & extensions - regVersions = re.compile(self.genOpts.versions) - regEmitVersions = re.compile(self.genOpts.emitversions) - regAddExtensions = re.compile(self.genOpts.addExtensions) - regRemoveExtensions = re.compile(self.genOpts.removeExtensions) - # - # Get all matching API versions & add to list of FeatureInfo - features = [] - apiMatch = False - for key in self.apidict: - fi = self.apidict[key] - api = fi.elem.get('api') - if (api == self.genOpts.apiname): - apiMatch = True - if (regVersions.match(fi.number)): - # Matches API & version #s being generated. Mark for - # emission and add to the features[] list . - # @@ Could use 'declared' instead of 'emit'? - fi.emit = (regEmitVersions.match(fi.number) != None) - features.append(fi) - if (not fi.emit): - self.gen.logMsg('diag', '*** NOT tagging feature api =', api, - 'name =', fi.name, 'number =', fi.number, - 'for emission (does not match emitversions pattern)') - else: - self.gen.logMsg('diag', '*** NOT including feature api =', api, - 'name =', fi.name, 'number =', fi.number, - '(does not match requested versions)') - else: - self.gen.logMsg('diag', '*** NOT including feature api =', api, - 'name =', fi.name, - '(does not match requested API)') - if (not apiMatch): - self.gen.logMsg('warn', '*** No matching API versions found!') - # - # Get all matching extensions & add to the list. - # Start with extensions tagged with 'api' pattern matching the API - # being generated. Add extensions matching the pattern specified in - # regExtensions, then remove extensions matching the pattern - # specified in regRemoveExtensions - for key in self.extdict: - ei = self.extdict[key] - extName = ei.name - include = False - # - # Include extension if defaultExtensions is not None and if the - # 'supported' attribute matches defaultExtensions. The regexp in - # 'supported' must exactly match defaultExtensions, so bracket - # it with ^(pat)$. - pat = '^(' + ei.elem.get('supported') + ')$' - if (self.genOpts.defaultExtensions and - re.match(pat, self.genOpts.defaultExtensions)): - self.gen.logMsg('diag', '*** Including extension', - extName, "(defaultExtensions matches the 'supported' attribute)") - include = True - # - # Include additional extensions if the extension name matches - # the regexp specified in the generator options. This allows - # forcing extensions into an interface even if they're not - # tagged appropriately in the registry. - if (regAddExtensions.match(extName) != None): - self.gen.logMsg('diag', '*** Including extension', - extName, '(matches explicitly requested extensions to add)') - include = True - # Remove extensions if the name matches the regexp specified - # in generator options. This allows forcing removal of - # extensions from an interface even if they're tagged that - # way in the registry. - if (regRemoveExtensions.match(extName) != None): - self.gen.logMsg('diag', '*** Removing extension', - extName, '(matches explicitly requested extensions to remove)') - include = False - # - # If the extension is to be included, add it to the - # extension features list. - if (include): - ei.emit = True - features.append(ei) - else: - self.gen.logMsg('diag', '*** NOT including extension', - extName, '(does not match api attribute or explicitly requested extensions)') - # - # Sort the extension features list, if a sort procedure is defined - if (self.genOpts.sortProcedure): - self.genOpts.sortProcedure(features) - # - # Pass 1: loop over requested API versions and extensions tagging - # types/commands/features as required (in an block) or no - # longer required (in an block). It is possible to remove - # a feature in one version and restore it later by requiring it in - # a later version. - # If a profile other than 'None' is being generated, it must - # match the profile attribute (if any) of the and - # tags. - self.gen.logMsg('diag', '*** PASS 1: TAG FEATURES ********************************************') - for f in features: - self.gen.logMsg('diag', '*** PASS 1: Tagging required and removed features for', - f.name) - self.requireAndRemoveFeatures(f.elem, self.genOpts.apiname, self.genOpts.profile) - # - # Pass 2: loop over specified API versions and extensions printing - # declarations for required things which haven't already been - # generated. - self.gen.logMsg('diag', '*** PASS 2: GENERATE INTERFACES FOR FEATURES ************************') - self.gen.beginFile(self.genOpts) - for f in features: - self.gen.logMsg('diag', '*** PASS 2: Generating interface for', - f.name) - emit = self.emitFeatures = f.emit - if (not emit): - self.gen.logMsg('diag', '*** PASS 2: NOT declaring feature', - f.elem.get('name'), 'because it is not tagged for emission') - # Generate the interface (or just tag its elements as having been - # emitted, if they haven't been). - self.gen.beginFeature(f.elem, emit) - self.generateRequiredInterface(f.elem) - self.gen.endFeature() - self.gen.endFile() - # - # apiReset - use between apiGen() calls to reset internal state - # - def apiReset(self): - """Reset type/enum/command dictionaries before generating another API""" - for type in self.typedict: - self.typedict[type].resetState() - for enum in self.enumdict: - self.enumdict[enum].resetState() - for cmd in self.cmddict: - self.cmddict[cmd].resetState() - for cmd in self.apidict: - self.apidict[cmd].resetState() - # - # validateGroups - check that group= attributes match actual groups - # - def validateGroups(self): - """Validate group= attributes on and tags""" - # Keep track of group names not in tags - badGroup = {} - self.gen.logMsg('diag', '*** VALIDATING GROUP ATTRIBUTES ***') - for cmd in self.reg.findall('commands/command'): - proto = cmd.find('proto') - funcname = cmd.find('proto/name').text - if ('group' in proto.attrib.keys()): - group = proto.get('group') - # self.gen.logMsg('diag', '*** Command ', funcname, ' has return group ', group) - if (group not in self.groupdict.keys()): - # self.gen.logMsg('diag', '*** Command ', funcname, ' has UNKNOWN return group ', group) - if (group not in badGroup.keys()): - badGroup[group] = 1 - else: - badGroup[group] = badGroup[group] + 1 - for param in cmd.findall('param'): - pname = param.find('name') - if (pname != None): - pname = pname.text - else: - pname = type.get('name') - if ('group' in param.attrib.keys()): - group = param.get('group') - if (group not in self.groupdict.keys()): - # self.gen.logMsg('diag', '*** Command ', funcname, ' param ', pname, ' has UNKNOWN group ', group) - if (group not in badGroup.keys()): - badGroup[group] = 1 - else: - badGroup[group] = badGroup[group] + 1 - if (len(badGroup.keys()) > 0): - self.gen.logMsg('diag', '*** SUMMARY OF UNRECOGNIZED GROUPS ***') - for key in sorted(badGroup.keys()): - self.gen.logMsg('diag', ' ', key, ' occurred ', badGroup[key], ' times') +#!/usr/bin/python3 -i +# +# Copyright 2013-2020 The Khronos Group Inc. +# SPDX-License-Identifier: Apache-2.0 + +import io,os,re,string,sys +from lxml import etree + +def write(*args, **kwargs): + file = kwargs.pop('file', sys.stdout) + end = kwargs.pop('end', '\n') + file.write(' '.join([str(arg) for arg in args])) + file.write(end) + +# noneStr - returns string argument, or "" if argument is None. +# Used in converting lxml Elements into text. +# str - string to convert +def noneStr(str): + if (str): + return str + else: + return "" + +# matchAPIProfile - returns whether an API and profile +# being generated matches an element's profile +# api - string naming the API to match +# profile - string naming the profile to match +# elem - Element which (may) have 'api' and 'profile' +# attributes to match to. +# If a tag is not present in the Element, the corresponding API +# or profile always matches. +# Otherwise, the tag must exactly match the API or profile. +# Thus, if 'profile' = core: +# with no attribute will match +# will match +# will not match +# Possible match conditions: +# Requested Element +# Profile Profile +# --------- -------- +# None None Always matches +# 'string' None Always matches +# None 'string' Does not match. Can't generate multiple APIs +# or profiles, so if an API/profile constraint +# is present, it must be asked for explicitly. +# 'string' 'string' Strings must match +# +# ** In the future, we will allow regexes for the attributes, +# not just strings, so that api="^(gl|gles2)" will match. Even +# this isn't really quite enough, we might prefer something +# like "gl(core)|gles1(common-lite)". +def matchAPIProfile(api, profile, elem): + """Match a requested API & profile name to a api & profile attributes of an Element""" + match = True + # Match 'api', if present + if ('api' in elem.attrib): + if (api == None): + raise UserWarning("No API requested, but 'api' attribute is present with value '" + + elem.get('api') + "'") + elif (api != elem.get('api')): + # Requested API doesn't match attribute + return False + if ('profile' in elem.attrib): + if (profile == None): + raise UserWarning("No profile requested, but 'profile' attribute is present with value '" + + elem.get('profile') + "'") + elif (profile != elem.get('profile')): + # Requested profile doesn't match attribute + return False + return True + +# BaseInfo - base class for information about a registry feature +# (type/group/enum/command/API/extension). +# required - should this feature be defined during header generation +# (has it been removed by a profile or version)? +# declared - has this feature been defined already? +# elem - lxml.etree Element for this feature +# resetState() - reset required/declared to initial values. Used +# prior to generating a new API interface. +class BaseInfo: + """Represents the state of a registry feature, used during API generation""" + def __init__(self, elem): + self.required = False + self.declared = False + self.elem = elem + def resetState(self): + self.required = False + self.declared = False + +# TypeInfo - registry information about a type. No additional state +# beyond BaseInfo is required. +class TypeInfo(BaseInfo): + """Represents the state of a registry type""" + def __init__(self, elem): + BaseInfo.__init__(self, elem) + +# GroupInfo - registry information about a group of related enums. +# enums - dictionary of enum names which are in the group +class GroupInfo(BaseInfo): + """Represents the state of a registry enumerant group""" + def __init__(self, elem): + BaseInfo.__init__(self, elem) + self.enums = {} + +# EnumInfo - registry information about an enum +# type - numeric type of the value of the tag +# ( '' for GLint, 'u' for GLuint, 'ull' for GLuint64 ) +class EnumInfo(BaseInfo): + """Represents the state of a registry enum""" + def __init__(self, elem): + BaseInfo.__init__(self, elem) + self.type = elem.get('type') + if (self.type == None): + self.type = '' + +# CmdInfo - registry information about a command +# glxtype - type of GLX protocol { None, 'render', 'single', 'vendor' } +# glxopcode - GLX protocol opcode { None, number } +# glxequiv - equivalent command at GLX dispatch level { None, string } +# vecequiv - equivalent vector form of a command taking multiple scalar args +# { None, string } +class CmdInfo(BaseInfo): + """Represents the state of a registry command""" + def __init__(self, elem): + BaseInfo.__init__(self, elem) + self.glxtype = None + self.glxopcode = None + self.glxequiv = None + self.vecequiv = None + +# FeatureInfo - registry information about an API +# or +# name - feature name string (e.g. 'GL_ARB_multitexture') +# number - feature version number (e.g. 1.2). +# features are unversioned and assigned version number 0. +# category - category, e.g. VERSION or ARB/KHR/OES/ETC/vendor +# emit - has this feature been defined already? +class FeatureInfo(BaseInfo): + """Represents the state of an API feature (version/extension)""" + def __init__(self, elem): + BaseInfo.__init__(self, elem) + self.name = elem.get('name') + # Determine element category (vendor). Only works + # for elements. + if (elem.tag == 'feature'): + self.category = 'VERSION' + self.number = elem.get('number') + else: + self.category = self.name.split('_', 2)[1] + self.number = "0" + self.emit = False + +# Primary sort key for regSortFeatures. +# Sorts by category of the feature name string: +# Core API features (those defined with a tag) +# ARB/KHR/OES (Khronos extensions) +# other (EXT/vendor extensions) +def regSortCategoryKey(feature): + if (feature.elem.tag == 'feature'): + return 0 + elif (feature.category == 'ARB' or + feature.category == 'KHR' or + feature.category == 'OES'): + return 1 + else: + return 2 + +# Secondary sort key for regSortFeatures. +# Sorts by extension name. +def regSortNameKey(feature): + return feature.name + +# Tertiary sort key for regSortFeatures. +# Sorts by feature version number. +# elements all have version number "0" +def regSortNumberKey(feature): + return feature.number + +# regSortFeatures - default sort procedure for features. +# Sorts by primary key of feature category, +# then by feature name within the category, +# then by version number +def regSortFeatures(featureList): + featureList.sort(key = regSortNumberKey) + featureList.sort(key = regSortNameKey) + featureList.sort(key = regSortCategoryKey) + +# GeneratorOptions - base class for options used during header production +# These options are target language independent, and used by +# Registry.apiGen() and by base OutputGenerator objects. +# +# Members +# filename - name of file to generate, or None to write to stdout. +# apiname - string matching 'apiname' attribute, e.g. 'gl'. +# profile - string specifying API profile , e.g. 'core', or None. +# versions - regex matching API versions to process interfaces for. +# Normally '.*' or r'[0-9]\.[0-9]' to match all defined versions. +# emitversions - regex matching API versions to actually emit +# interfaces for (though all requested versions are considered +# when deciding which interfaces to generate). For GL 4.3 glext.h, +# this might be r'1\.[2-5]|[2-4]\.[0-9]'. +# defaultExtensions - If not None, a string which must in its +# entirety match the pattern in the "supported" attribute of +# the . Defaults to None. Usually the same as apiname. +# addExtensions - regex matching names of additional extensions +# to include. Defaults to None. +# removeExtensions - regex matching names of extensions to +# remove (after defaultExtensions and addExtensions). Defaults +# to None. +# sortProcedure - takes a list of FeatureInfo objects and sorts +# them in place to a preferred order in the generated output. +# Default is core API versions, ARB/KHR/OES extensions, all +# other extensions, alphabetically within each group. +# The regex patterns can be None or empty, in which case they match +# nothing. +class GeneratorOptions: + """Represents options during header production from an API registry""" + def __init__(self, + filename = None, + apiname = None, + profile = None, + versions = '.*', + emitversions = '.*', + defaultExtensions = None, + addExtensions = None, + removeExtensions = None, + sortProcedure = regSortFeatures): + self.filename = filename + self.apiname = apiname + self.profile = profile + self.versions = self.emptyRegex(versions) + self.emitversions = self.emptyRegex(emitversions) + self.defaultExtensions = defaultExtensions + self.addExtensions = self.emptyRegex(addExtensions) + self.removeExtensions = self.emptyRegex(removeExtensions) + self.sortProcedure = sortProcedure + # + # Substitute a regular expression which matches no version + # or extension names for None or the empty string. + def emptyRegex(self,pat): + if (pat == None or pat == ''): + return '_nomatch_^' + else: + return pat + +# CGeneratorOptions - subclass of GeneratorOptions. +# +# Adds options used by COutputGenerator objects during C language header +# generation. +# +# Additional members +# prefixText - list of strings to prefix generated header with +# (usually a copyright statement + calling convention macros). +# protectFile - True if multiple inclusion protection should be +# generated (based on the filename) around the entire header. +# protectFeature - True if #ifndef..#endif protection should be +# generated around a feature interface in the header file. +# genFuncPointers - True if function pointer typedefs should be +# generated +# protectProto - Controls cpp protection around prototypes: +# False - no protection +# 'nonzero' - protectProtoStr must be defined to a nonzero value +# True - protectProtoStr must be defined +# protectProtoStr - #ifdef symbol to use around prototype +# declarations, if protected +# apicall - string to use for the function declaration prefix, +# such as APICALL on Windows. +# apientry - string to use for the calling convention macro, +# in typedefs, such as APIENTRY. +# apientryp - string to use for the calling convention macro +# in function pointer typedefs, such as APIENTRYP. +class CGeneratorOptions(GeneratorOptions): + """Represents options during C header production from an API registry""" + def __init__(self, + filename = None, + apiname = None, + profile = None, + versions = '.*', + emitversions = '.*', + defaultExtensions = None, + addExtensions = None, + removeExtensions = None, + sortProcedure = regSortFeatures, + prefixText = "", + genFuncPointers = True, + protectFile = True, + protectFeature = True, + protectProto = True, + protectProtoStr = True, + apicall = '', + apientry = '', + apientryp = ''): + GeneratorOptions.__init__(self, filename, apiname, profile, + versions, emitversions, defaultExtensions, + addExtensions, removeExtensions, sortProcedure) + self.prefixText = prefixText + self.genFuncPointers = genFuncPointers + self.protectFile = protectFile + self.protectFeature = protectFeature + self.protectProto = protectProto + self.protectProtoStr = protectProtoStr + self.apicall = apicall + self.apientry = apientry + self.apientryp = apientryp + +# OutputGenerator - base class for generating API interfaces. +# Manages basic logic, logging, and output file control +# Derived classes actually generate formatted output. +# +# ---- methods ---- +# OutputGenerator(errFile, warnFile, diagFile) +# errFile, warnFile, diagFile - file handles to write errors, +# warnings, diagnostics to. May be None to not write. +# logMsg(level, *args) - log messages of different categories +# level - 'error', 'warn', or 'diag'. 'error' will also +# raise a UserWarning exception +# *args - print()-style arguments +# beginFile(genOpts) - start a new interface file +# genOpts - GeneratorOptions controlling what's generated and how +# endFile() - finish an interface file, closing it when done +# beginFeature(interface, emit) - write interface for a feature +# and tag generated features as having been done. +# interface - element for the / to generate +# emit - actually write to the header only when True +# endFeature() - finish an interface. +# genType(typeinfo,name) - generate interface for a type +# typeinfo - TypeInfo for a type +# genEnum(enuminfo, name) - generate interface for an enum +# enuminfo - EnumInfo for an enum +# name - enum name +# genCmd(cmdinfo) - generate interface for a command +# cmdinfo - CmdInfo for a command +class OutputGenerator: + """Generate specified API interfaces in a specific style, such as a C header""" + def __init__(self, + errFile = sys.stderr, + warnFile = sys.stderr, + diagFile = sys.stdout): + self.outFile = None + self.errFile = errFile + self.warnFile = warnFile + self.diagFile = diagFile + # Internal state + self.featureName = None + self.genOpts = None + # + # logMsg - write a message of different categories to different + # destinations. + # level - + # 'diag' (diagnostic, voluminous) + # 'warn' (warning) + # 'error' (fatal error - raises exception after logging) + # *args - print()-style arguments to direct to corresponding log + def logMsg(self, level, *args): + """Log a message at the given level. Can be ignored or log to a file""" + if (level == 'error'): + strfile = io.StringIO() + write('ERROR:', *args, file=strfile) + if (self.errFile != None): + write(strfile.getvalue(), file=self.errFile) + raise UserWarning(strfile.getvalue()) + elif (level == 'warn'): + if (self.warnFile != None): + write('WARNING:', *args, file=self.warnFile) + elif (level == 'diag'): + if (self.diagFile != None): + write('DIAG:', *args, file=self.diagFile) + else: + raise UserWarning( + '*** FATAL ERROR in Generator.logMsg: unknown level:' + level) + # + def beginFile(self, genOpts): + self.genOpts = genOpts + # + # Open specified output file. Not done in constructor since a + # Generator can be used without writing to a file. + if (self.genOpts.filename != None): + self.outFile = open(self.genOpts.filename, 'w') + else: + self.outFile = sys.stdout + def endFile(self): + self.errFile and self.errFile.flush() + self.warnFile and self.warnFile.flush() + self.diagFile and self.diagFile.flush() + self.outFile.flush() + if (self.outFile != sys.stdout and self.outFile != sys.stderr): + self.outFile.close() + self.genOpts = None + # + def beginFeature(self, interface, emit): + self.emit = emit + self.featureName = interface.get('name') + # If there's an additional 'protect' attribute in the feature, save it + self.featureExtraProtect = interface.get('protect') + def endFeature(self): + # Derived classes responsible for emitting feature + self.featureName = None + self.featureExtraProtect = None + # + # Type generation + def genType(self, typeinfo, name): + if (self.featureName == None): + raise UserWarning('Attempt to generate type', name, + 'when not in feature') + # + # Enumerant generation + def genEnum(self, enuminfo, name): + if (self.featureName == None): + raise UserWarning('Attempt to generate enum', name, + 'when not in feature') + # + # Command generation + def genCmd(self, cmd, name): + if (self.featureName == None): + raise UserWarning('Attempt to generate command', name, + 'when not in feature') + +# COutputGenerator - subclass of OutputGenerator. +# Generates C-language API interfaces. +# +# ---- methods ---- +# COutputGenerator(errFile, warnFile, diagFile) - args as for +# OutputGenerator. Defines additional internal state. +# makeCDecls(cmd) - return C prototype and function pointer typedef for a +# Element, as a list of two strings +# cmd - Element for the +# newline() - print a newline to the output file (utility function) +# ---- methods overriding base class ---- +# beginFile(genOpts) +# endFile() +# beginFeature(interface, emit) +# endFeature() +# genType(typeinfo,name) - generate interface for a type +# genEnum(enuminfo, name) +# genCmd(cmdinfo) +class COutputGenerator(OutputGenerator): + """Generate specified API interfaces in a specific style, such as a C header""" + def __init__(self, + errFile = sys.stderr, + warnFile = sys.stderr, + diagFile = sys.stdout): + OutputGenerator.__init__(self, errFile, warnFile, diagFile) + # Internal state - accumulators for different inner block text + self.typeBody = '' + self.enumBody = '' + self.cmdBody = '' + # + # makeCDecls - return C prototype and function pointer typedef for a + # command, as a two-element list of strings. + # cmd - Element containing a tag + def makeCDecls(self, cmd): + """Generate C function pointer typedef for Element""" + proto = cmd.find('proto') + params = cmd.findall('param') + # Begin accumulating prototype and typedef strings + pdecl = self.genOpts.apicall + tdecl = 'typedef ' + # + # Insert the function return type/name. + # For prototypes, add APIENTRY macro before the name + # For typedefs, add (APIENTRYP ) around the name and + # use the PFNGLCMDNAMEPROC nameng convention. + # Done by walking the tree for element by element. + # lxml.etree has elem.text followed by (elem[i], elem[i].tail) + # for each child element and any following text + # Leading text + pdecl += noneStr(proto.text) + tdecl += noneStr(proto.text) + # For each child element, if it's a wrap in appropriate + # declaration. Otherwise append its contents and tail contents. + for elem in proto: + text = noneStr(elem.text) + tail = noneStr(elem.tail) + if (elem.tag == 'name'): + pdecl += self.genOpts.apientry + text + tail + tdecl += '(' + self.genOpts.apientryp + 'PFN' + text.upper() + 'PROC' + tail + ')' + else: + pdecl += text + tail + tdecl += text + tail + # Now add the parameter declaration list, which is identical + # for prototypes and typedefs. Concatenate all the text from + # a node without the tags. No tree walking required + # since all tags are ignored. + n = len(params) + paramdecl = ' (' + if n > 0: + for i in range(0,n): + paramdecl += ''.join([t for t in params[i].itertext()]) + if (i < n - 1): + paramdecl += ', ' + else: + paramdecl += 'void' + paramdecl += ');\n'; + return [ pdecl + paramdecl, tdecl + paramdecl ] + # + def newline(self): + write('', file=self.outFile) + # + def beginFile(self, genOpts): + OutputGenerator.beginFile(self, genOpts) + # C-specific + # + # Multiple inclusion protection & C++ wrappers. + if (genOpts.protectFile and self.genOpts.filename): + headerSym = '__' + self.genOpts.apiname + '_' + re.sub('\.h', '_h_', os.path.basename(self.genOpts.filename)) + write('#ifndef', headerSym, file=self.outFile) + write('#define', headerSym, '1', file=self.outFile) + self.newline() + write('#ifdef __cplusplus', file=self.outFile) + write('extern "C" {', file=self.outFile) + write('#endif', file=self.outFile) + self.newline() + # + # User-supplied prefix text, if any (list of strings) + if (genOpts.prefixText): + for s in genOpts.prefixText: + write(s, file=self.outFile) + # + # Some boilerplate describing what was generated - this + # will probably be removed later since the extensions + # pattern may be very long. + write('/* Generated C header for:', file=self.outFile) + write(' * API:', genOpts.apiname, file=self.outFile) + if (genOpts.profile): + write(' * Profile:', genOpts.profile, file=self.outFile) + write(' * Versions considered:', genOpts.versions, file=self.outFile) + write(' * Versions emitted:', genOpts.emitversions, file=self.outFile) + write(' * Default extensions included:', genOpts.defaultExtensions, file=self.outFile) + write(' * Additional extensions included:', genOpts.addExtensions, file=self.outFile) + write(' * Extensions removed:', genOpts.removeExtensions, file=self.outFile) + write(' */', file=self.outFile) + def endFile(self): + # C-specific + # Finish C++ wrapper and multiple inclusion protection + self.newline() + write('#ifdef __cplusplus', file=self.outFile) + write('}', file=self.outFile) + write('#endif', file=self.outFile) + if (self.genOpts.protectFile and self.genOpts.filename): + self.newline() + write('#endif', file=self.outFile) + # Finish processing in superclass + OutputGenerator.endFile(self) + def beginFeature(self, interface, emit): + # Start processing in superclass + OutputGenerator.beginFeature(self, interface, emit) + # C-specific + # Accumulate types, enums, function pointer typedefs, end function + # prototypes separately for this feature. They're only printed in + # endFeature(). + self.typeBody = '' + self.enumBody = '' + self.cmdPointerBody = '' + self.cmdBody = '' + def endFeature(self): + # C-specific + # Actually write the interface to the output file. + if (self.emit): + self.newline() + if (self.genOpts.protectFeature): + write('#ifndef', self.featureName, file=self.outFile) + write('#define', self.featureName, '1', file=self.outFile) + if (self.typeBody != ''): + write(self.typeBody, end='', file=self.outFile) + # + # Don't add additional protection for derived type declarations, + # which may be needed by other features later on. + if (self.featureExtraProtect != None): + write('#ifdef', self.featureExtraProtect, file=self.outFile) + if (self.enumBody != ''): + write(self.enumBody, end='', file=self.outFile) + if (self.genOpts.genFuncPointers and self.cmdPointerBody != ''): + write(self.cmdPointerBody, end='', file=self.outFile) + if (self.cmdBody != ''): + if (self.genOpts.protectProto == True): + prefix = '#ifdef ' + self.genOpts.protectProtoStr + '\n' + suffix = '#endif\n' + elif (self.genOpts.protectProto == 'nonzero'): + prefix = '#if ' + self.genOpts.protectProtoStr + '\n' + suffix = '#endif\n' + elif (self.genOpts.protectProto == False): + prefix = '' + suffix = '' + else: + self.gen.logMsg('warn', + '*** Unrecognized value for protectProto:', + self.genOpts.protectProto, + 'not generating prototype wrappers') + prefix = '' + suffix = '' + + write(prefix + self.cmdBody + suffix, end='', file=self.outFile) + if (self.featureExtraProtect != None): + write('#endif /*', self.featureExtraProtect, '*/', file=self.outFile) + if (self.genOpts.protectFeature): + write('#endif /*', self.featureName, '*/', file=self.outFile) + # Finish processing in superclass + OutputGenerator.endFeature(self) + # + # Type generation + def genType(self, typeinfo, name): + OutputGenerator.genType(self, typeinfo, name) + # + # Replace tags with an APIENTRY-style string + # (from self.genOpts). Copy other text through unchanged. + # If the resulting text is an empty string, don't emit it. + typeElem = typeinfo.elem + s = noneStr(typeElem.text) + for elem in typeElem: + if (elem.tag == 'apientry'): + s += self.genOpts.apientry + noneStr(elem.tail) + else: + s += noneStr(elem.text) + noneStr(elem.tail) + if (len(s) > 0): + self.typeBody += s + '\n' + # + # Enumerant generation + def genEnum(self, enuminfo, name): + OutputGenerator.genEnum(self, enuminfo, name) + # + # EnumInfo.type is a C value suffix (e.g. u, ull) + self.enumBody += '#define ' + name.ljust(33) + ' ' + enuminfo.elem.get('value') + # + # Handle non-integer 'type' fields by using it as the C value suffix + t = enuminfo.elem.get('type') + if (t != '' and t != 'i'): + self.enumBody += enuminfo.type + self.enumBody += '\n' + # + # Command generation + def genCmd(self, cmdinfo, name): + OutputGenerator.genCmd(self, cmdinfo, name) + # + decls = self.makeCDecls(cmdinfo.elem) + self.cmdBody += decls[0] + if (self.genOpts.genFuncPointers): + self.cmdPointerBody += decls[1] + +# Registry - object representing an API registry, loaded from an XML file +# Members +# tree - ElementTree containing the root +# typedict - dictionary of TypeInfo objects keyed by type name +# groupdict - dictionary of GroupInfo objects keyed by group name +# enumdict - dictionary of EnumInfo objects keyed by enum name +# cmddict - dictionary of CmdInfo objects keyed by command name +# apidict - dictionary of Elements keyed by API name +# extensions - list of Elements +# extdict - dictionary of Elements keyed by extension name +# gen - OutputGenerator object used to write headers / messages +# genOpts - GeneratorOptions object used to control which +# fetures to write and how to format them +# emitFeatures - True to actually emit features for a version / extension, +# or False to just treat them as emitted +# Public methods +# loadElementTree(etree) - load registry from specified ElementTree +# loadFile(filename) - load registry from XML file +# setGenerator(gen) - OutputGenerator to use +# parseTree() - parse the registry once loaded & create dictionaries +# dumpReg(maxlen, filehandle) - diagnostic to dump the dictionaries +# to specified file handle (default stdout). Truncates type / +# enum / command elements to maxlen characters (default 80) +# generator(g) - specify the output generator object +# apiGen(apiname, genOpts) - generate API headers for the API type +# and profile specified in genOpts, but only for the versions and +# extensions specified there. +# apiReset() - call between calls to apiGen() to reset internal state +# validateGroups() - call to verify that each or +# with a 'group' attribute matches an actual existing group. +# Private methods +# addElementInfo(elem,info,infoName,dictionary) - add feature info to dict +# lookupElementInfo(fname,dictionary) - lookup feature info in dict +class Registry: + """Represents an API registry loaded from XML""" + def __init__(self): + self.tree = None + self.typedict = {} + self.groupdict = {} + self.enumdict = {} + self.cmddict = {} + self.apidict = {} + self.extensions = [] + self.extdict = {} + # A default output generator, so commands prior to apiGen can report + # errors via the generator object. + self.gen = OutputGenerator() + self.genOpts = None + self.emitFeatures = False + def loadElementTree(self, tree): + """Load ElementTree into a Registry object and parse it""" + self.tree = tree + self.parseTree() + def loadFile(self, file): + """Load an API registry XML file into a Registry object and parse it""" + self.tree = etree.parse(file) + self.parseTree() + def setGenerator(self, gen): + """Specify output generator object. None restores the default generator""" + self.gen = gen + # addElementInfo - add information about an element to the + # corresponding dictionary + # elem - ///// Element + # info - corresponding {Type|Group|Enum|Cmd|Feature}Info object + # infoName - 'type' / 'group' / 'enum' / 'command' / 'feature' / 'extension' + # dictionary - self.{type|group|enum|cmd|api|ext}dict + # If the Element has an 'api' attribute, the dictionary key is the + # tuple (name,api). If not, the key is the name. 'name' is an + # attribute of the Element + def addElementInfo(self, elem, info, infoName, dictionary): + if ('api' in elem.attrib): + key = (elem.get('name'),elem.get('api')) + else: + key = elem.get('name') + if key in dictionary: + self.gen.logMsg('warn', '*** Attempt to redefine', + infoName, 'with key:', key) + else: + dictionary[key] = info + # + # lookupElementInfo - find a {Type|Enum|Cmd}Info object by name. + # If an object qualified by API name exists, use that. + # fname - name of type / enum / command + # dictionary - self.{type|enum|cmd}dict + def lookupElementInfo(self, fname, dictionary): + key = (fname, self.genOpts.apiname) + if (key in dictionary): + # self.gen.logMsg('diag', 'Found API-specific element for feature', fname) + return dictionary[key] + elif (fname in dictionary): + # self.gen.logMsg('diag', 'Found generic element for feature', fname) + return dictionary[fname] + else: + return None + def parseTree(self): + """Parse the registry Element, once created""" + # This must be the Element for the root + self.reg = self.tree.getroot() + # + # Create dictionary of registry types from toplevel tags + # and add 'name' attribute to each tag (where missing) + # based on its element. + # + # There's usually one block; more are OK + # Required attributes: 'name' or nested tag contents + self.typedict = {} + for type in self.reg.findall('types/type'): + # If the doesn't already have a 'name' attribute, set + # it from contents of its tag. + if (type.get('name') == None): + type.attrib['name'] = type.find('name').text + self.addElementInfo(type, TypeInfo(type), 'type', self.typedict) + # + # Create dictionary of registry groups from toplevel tags. + # + # There's usually one block; more are OK. + # Required attributes: 'name' + self.groupdict = {} + for group in self.reg.findall('groups/group'): + self.addElementInfo(group, GroupInfo(group), 'group', self.groupdict) + # + # Create dictionary of registry enums from toplevel tags + # + # There are usually many tags in different namespaces, but + # these are functional namespaces of the values, while the actual + # enum names all share the dictionary. + # Required attributes: 'name', 'value' + self.enumdict = {} + for enum in self.reg.findall('enums/enum'): + self.addElementInfo(enum, EnumInfo(enum), 'enum', self.enumdict) + # + # Create dictionary of registry commands from tags + # and add 'name' attribute to each tag (where missing) + # based on its element. + # + # There's usually only one block; more are OK. + # Required attributes: 'name' or tag contents + self.cmddict = {} + for cmd in self.reg.findall('commands/command'): + # If the doesn't already have a 'name' attribute, set + # it from contents of its tag. + if (cmd.get('name') == None): + cmd.attrib['name'] = cmd.find('proto/name').text + ci = CmdInfo(cmd) + self.addElementInfo(cmd, ci, 'command', self.cmddict) + # + # Create dictionaries of API and extension interfaces + # from toplevel and tags. + # + self.apidict = {} + for feature in self.reg.findall('feature'): + ai = FeatureInfo(feature) + self.addElementInfo(feature, ai, 'feature', self.apidict) + self.extensions = self.reg.findall('extensions/extension') + self.extdict = {} + for feature in self.extensions: + ei = FeatureInfo(feature) + self.addElementInfo(feature, ei, 'extension', self.extdict) + def dumpReg(self, maxlen = 40, filehandle = sys.stdout): + """Dump all the dictionaries constructed from the Registry object""" + write('***************************************', file=filehandle) + write(' ** Dumping Registry contents **', file=filehandle) + write('***************************************', file=filehandle) + write('// Types', file=filehandle) + for name in self.typedict: + tobj = self.typedict[name] + write(' Type', name, '->', etree.tostring(tobj.elem)[0:maxlen], file=filehandle) + write('// Groups', file=filehandle) + for name in self.groupdict: + gobj = self.groupdict[name] + write(' Group', name, '->', etree.tostring(gobj.elem)[0:maxlen], file=filehandle) + write('// Enums', file=filehandle) + for name in self.enumdict: + eobj = self.enumdict[name] + write(' Enum', name, '->', etree.tostring(eobj.elem)[0:maxlen], file=filehandle) + write('// Commands', file=filehandle) + for name in self.cmddict: + cobj = self.cmddict[name] + write(' Command', name, '->', etree.tostring(cobj.elem)[0:maxlen], file=filehandle) + write('// APIs', file=filehandle) + for key in self.apidict: + write(' API Version ', key, '->', + etree.tostring(self.apidict[key].elem)[0:maxlen], file=filehandle) + write('// Extensions', file=filehandle) + for key in self.extdict: + write(' Extension', key, '->', + etree.tostring(self.extdict[key].elem)[0:maxlen], file=filehandle) + # write('***************************************', file=filehandle) + # write(' ** Dumping XML ElementTree **', file=filehandle) + # write('***************************************', file=filehandle) + # write(etree.tostring(self.tree.getroot(),pretty_print=True), file=filehandle) + # + # typename - name of type + # required - boolean (to tag features as required or not) + def markTypeRequired(self, typename, required): + """Require (along with its dependencies) or remove (but not its dependencies) a type""" + self.gen.logMsg('diag', '*** tagging type:', typename, '-> required =', required) + # Get TypeInfo object for tag corresponding to typename + type = self.lookupElementInfo(typename, self.typedict) + if (type != None): + # Tag required type dependencies as required. + # This DOES NOT un-tag dependencies in a tag. + # See comments in markRequired() below for the reason. + if (required and ('requires' in type.elem.attrib)): + depType = type.elem.get('requires') + self.gen.logMsg('diag', '*** Generating dependent type', + depType, 'for type', typename) + self.markTypeRequired(depType, required) + type.required = required + else: + self.gen.logMsg('warn', '*** type:', typename , 'IS NOT DEFINED') + # + # features - Element for or tag + # required - boolean (to tag features as required or not) + def markRequired(self, features, required): + """Require or remove features specified in the Element""" + self.gen.logMsg('diag', '*** markRequired (features = , required =', required, ')') + # Loop over types, enums, and commands in the tag + # @@ It would be possible to respect 'api' and 'profile' attributes + # in individual features, but that's not done yet. + for typeElem in features.findall('type'): + self.markTypeRequired(typeElem.get('name'), required) + for enumElem in features.findall('enum'): + name = enumElem.get('name') + self.gen.logMsg('diag', '*** tagging enum:', name, '-> required =', required) + enum = self.lookupElementInfo(name, self.enumdict) + if (enum != None): + enum.required = required + else: + self.gen.logMsg('warn', '*** enum:', name , 'IS NOT DEFINED') + for cmdElem in features.findall('command'): + name = cmdElem.get('name') + self.gen.logMsg('diag', '*** tagging command:', name, '-> required =', required) + cmd = self.lookupElementInfo(name, self.cmddict) + if (cmd != None): + cmd.required = required + # Tag all parameter types of this command as required. + # This DOES NOT remove types of commands in a + # tag, because many other commands may use the same type. + # We could be more clever and reference count types, + # instead of using a boolean. + if (required): + # Look for in entire tree, + # not just immediate children + for ptype in cmd.elem.findall('.//ptype'): + self.gen.logMsg('diag', '*** markRequired: command implicitly requires dependent type', ptype.text) + self.markTypeRequired(ptype.text, required) + else: + self.gen.logMsg('warn', '*** command:', name, 'IS NOT DEFINED') + # + # interface - Element for or , containing + # and tags + # api - string specifying API name being generated + # profile - string specifying API profile being generated + def requireAndRemoveFeatures(self, interface, api, profile): + """Process and tags for a or """ + # marks things that are required by this version/profile + for feature in interface.findall('require'): + if (matchAPIProfile(api, profile, feature)): + self.markRequired(feature,True) + # marks things that are removed by this version/profile + for feature in interface.findall('remove'): + if (matchAPIProfile(api, profile, feature)): + self.markRequired(feature,False) + # + # generateFeature - generate a single type / enum / command, + # and all its dependencies as needed. + # fname - name of feature (// + # ftype - type of feature, 'type' | 'enum' | 'command' + # dictionary - of *Info objects - self.{type|enum|cmd}dict + # genProc - bound function pointer for self.gen.gen{Type|Enum|Cmd} + def generateFeature(self, fname, ftype, dictionary, genProc): + f = self.lookupElementInfo(fname, dictionary) + if (f == None): + # No such feature. This is an error, but reported earlier + self.gen.logMsg('diag', '*** No entry found for feature', fname, + 'returning!') + return + # + # If feature isn't required, or has already been declared, return + if (not f.required): + self.gen.logMsg('diag', '*** Skipping', ftype, fname, '(not required)') + return + if (f.declared): + self.gen.logMsg('diag', '*** Skipping', ftype, fname, '(already declared)') + return + # + # Pull in dependent type declaration(s) of the feature. + # For types, there may be one in the 'required' attribute of the element + # For commands, there may be many in tags within the element + # For enums, no dependencies are allowed (though perhasps if you + # have a uint64 enum, it should require GLuint64) + if (ftype == 'type'): + if ('requires' in f.elem.attrib): + depname = f.elem.get('requires') + self.gen.logMsg('diag', '*** Generating required dependent type', + depname) + self.generateFeature(depname, 'type', self.typedict, + self.gen.genType) + elif (ftype == 'command'): + for ptype in f.elem.findall('.//ptype'): + depname = ptype.text + self.gen.logMsg('diag', '*** Generating required parameter type', + depname) + self.generateFeature(depname, 'type', self.typedict, + self.gen.genType) + # + # Actually generate the type only if emitting declarations + if self.emitFeatures: + self.gen.logMsg('diag', '*** Emitting', ftype, 'decl for', fname) + genProc(f, fname) + else: + self.gen.logMsg('diag', '*** Skipping', ftype, fname, + '(not emitting this feature)') + # Always mark feature declared, as though actually emitted + f.declared = True + # + # generateRequiredInterface - generate all interfaces required + # by an API version or extension + # interface - Element for or + def generateRequiredInterface(self, interface): + """Generate required C interface for specified API version/extension""" + # + # Loop over all features inside all tags. + # tags are ignored (handled in pass 1). + for features in interface.findall('require'): + for t in features.findall('type'): + self.generateFeature(t.get('name'), 'type', self.typedict, + self.gen.genType) + for e in features.findall('enum'): + self.generateFeature(e.get('name'), 'enum', self.enumdict, + self.gen.genEnum) + for c in features.findall('command'): + self.generateFeature(c.get('name'), 'command', self.cmddict, + self.gen.genCmd) + # + # apiGen(genOpts) - generate interface for specified versions + # genOpts - GeneratorOptions object with parameters used + # by the Generator object. + def apiGen(self, genOpts): + """Generate interfaces for the specified API type and range of versions""" + # + self.gen.logMsg('diag', '*******************************************') + self.gen.logMsg('diag', ' Registry.apiGen file:', genOpts.filename, + 'api:', genOpts.apiname, + 'profile:', genOpts.profile) + self.gen.logMsg('diag', '*******************************************') + # + self.genOpts = genOpts + # Reset required/declared flags for all features + self.apiReset() + # + # Compile regexps used to select versions & extensions + regVersions = re.compile(self.genOpts.versions) + regEmitVersions = re.compile(self.genOpts.emitversions) + regAddExtensions = re.compile(self.genOpts.addExtensions) + regRemoveExtensions = re.compile(self.genOpts.removeExtensions) + # + # Get all matching API versions & add to list of FeatureInfo + features = [] + apiMatch = False + for key in self.apidict: + fi = self.apidict[key] + api = fi.elem.get('api') + if (api == self.genOpts.apiname): + apiMatch = True + if (regVersions.match(fi.number)): + # Matches API & version #s being generated. Mark for + # emission and add to the features[] list . + # @@ Could use 'declared' instead of 'emit'? + fi.emit = (regEmitVersions.match(fi.number) != None) + features.append(fi) + if (not fi.emit): + self.gen.logMsg('diag', '*** NOT tagging feature api =', api, + 'name =', fi.name, 'number =', fi.number, + 'for emission (does not match emitversions pattern)') + else: + self.gen.logMsg('diag', '*** NOT including feature api =', api, + 'name =', fi.name, 'number =', fi.number, + '(does not match requested versions)') + else: + self.gen.logMsg('diag', '*** NOT including feature api =', api, + 'name =', fi.name, + '(does not match requested API)') + if (not apiMatch): + self.gen.logMsg('warn', '*** No matching API versions found!') + # + # Get all matching extensions & add to the list. + # Start with extensions tagged with 'api' pattern matching the API + # being generated. Add extensions matching the pattern specified in + # regExtensions, then remove extensions matching the pattern + # specified in regRemoveExtensions + for key in self.extdict: + ei = self.extdict[key] + extName = ei.name + include = False + # + # Include extension if defaultExtensions is not None and if the + # 'supported' attribute matches defaultExtensions. The regexp in + # 'supported' must exactly match defaultExtensions, so bracket + # it with ^(pat)$. + pat = '^(' + ei.elem.get('supported') + ')$' + if (self.genOpts.defaultExtensions and + re.match(pat, self.genOpts.defaultExtensions)): + self.gen.logMsg('diag', '*** Including extension', + extName, "(defaultExtensions matches the 'supported' attribute)") + include = True + # + # Include additional extensions if the extension name matches + # the regexp specified in the generator options. This allows + # forcing extensions into an interface even if they're not + # tagged appropriately in the registry. + if (regAddExtensions.match(extName) != None): + self.gen.logMsg('diag', '*** Including extension', + extName, '(matches explicitly requested extensions to add)') + include = True + # Remove extensions if the name matches the regexp specified + # in generator options. This allows forcing removal of + # extensions from an interface even if they're tagged that + # way in the registry. + if (regRemoveExtensions.match(extName) != None): + self.gen.logMsg('diag', '*** Removing extension', + extName, '(matches explicitly requested extensions to remove)') + include = False + # + # If the extension is to be included, add it to the + # extension features list. + if (include): + ei.emit = True + features.append(ei) + else: + self.gen.logMsg('diag', '*** NOT including extension', + extName, '(does not match api attribute or explicitly requested extensions)') + # + # Sort the extension features list, if a sort procedure is defined + if (self.genOpts.sortProcedure): + self.genOpts.sortProcedure(features) + # + # Pass 1: loop over requested API versions and extensions tagging + # types/commands/features as required (in an block) or no + # longer required (in an block). It is possible to remove + # a feature in one version and restore it later by requiring it in + # a later version. + # If a profile other than 'None' is being generated, it must + # match the profile attribute (if any) of the and + # tags. + self.gen.logMsg('diag', '*** PASS 1: TAG FEATURES ********************************************') + for f in features: + self.gen.logMsg('diag', '*** PASS 1: Tagging required and removed features for', + f.name) + self.requireAndRemoveFeatures(f.elem, self.genOpts.apiname, self.genOpts.profile) + # + # Pass 2: loop over specified API versions and extensions printing + # declarations for required things which haven't already been + # generated. + self.gen.logMsg('diag', '*** PASS 2: GENERATE INTERFACES FOR FEATURES ************************') + self.gen.beginFile(self.genOpts) + for f in features: + self.gen.logMsg('diag', '*** PASS 2: Generating interface for', + f.name) + emit = self.emitFeatures = f.emit + if (not emit): + self.gen.logMsg('diag', '*** PASS 2: NOT declaring feature', + f.elem.get('name'), 'because it is not tagged for emission') + # Generate the interface (or just tag its elements as having been + # emitted, if they haven't been). + self.gen.beginFeature(f.elem, emit) + self.generateRequiredInterface(f.elem) + self.gen.endFeature() + self.gen.endFile() + # + # apiReset - use between apiGen() calls to reset internal state + # + def apiReset(self): + """Reset type/enum/command dictionaries before generating another API""" + for type in self.typedict: + self.typedict[type].resetState() + for enum in self.enumdict: + self.enumdict[enum].resetState() + for cmd in self.cmddict: + self.cmddict[cmd].resetState() + for cmd in self.apidict: + self.apidict[cmd].resetState() + # + # validateGroups - check that group= attributes match actual groups + # + def validateGroups(self): + """Validate group= attributes on and tags""" + # Keep track of group names not in tags + badGroup = {} + self.gen.logMsg('diag', '*** VALIDATING GROUP ATTRIBUTES ***') + for cmd in self.reg.findall('commands/command'): + proto = cmd.find('proto') + funcname = cmd.find('proto/name').text + if ('group' in proto.attrib.keys()): + group = proto.get('group') + # self.gen.logMsg('diag', '*** Command ', funcname, ' has return group ', group) + if (group not in self.groupdict.keys()): + # self.gen.logMsg('diag', '*** Command ', funcname, ' has UNKNOWN return group ', group) + if (group not in badGroup.keys()): + badGroup[group] = 1 + else: + badGroup[group] = badGroup[group] + 1 + for param in cmd.findall('param'): + pname = param.find('name') + if (pname != None): + pname = pname.text + else: + pname = type.get('name') + if ('group' in param.attrib.keys()): + group = param.get('group') + if (group not in self.groupdict.keys()): + # self.gen.logMsg('diag', '*** Command ', funcname, ' param ', pname, ' has UNKNOWN group ', group) + if (group not in badGroup.keys()): + badGroup[group] = 1 + else: + badGroup[group] = badGroup[group] + 1 + if (len(badGroup.keys()) > 0): + self.gen.logMsg('diag', '*** SUMMARY OF UNRECOGNIZED GROUPS ***') + for key in sorted(badGroup.keys()): + self.gen.logMsg('diag', ' ', key, ' occurred ', badGroup[key], ' times') diff --git a/StgSharp.GenerateGL/xml/registry.rnc b/StgSharp.GenerateGL/xml/registry.rnc index 0d33d1a8..b37ef667 100644 --- a/StgSharp.GenerateGL/xml/registry.rnc +++ b/StgSharp.GenerateGL/xml/registry.rnc @@ -1,289 +1,289 @@ -# Copyright 2013-2020 The Khronos Group Inc. -# SPDX-License-Identifier: Apache-2.0 - -# Relax NG schema for Khronos Registry XML -# See https://github.com/KhronosGroup/OpenGL-Registry -# -# Last modified 2013/06/14 -# This definition is subject to change (mostly in the form of additions) - -namespace xsd = "http://www.w3.org/2001/XMLSchema-datatypes" - -# Toplevel is a tag. -# May be led by an optional tag containing e.g. copyrights. -start = element registry { - ( - element comment { text } ? | - Types * | - Kinds * | - Groups * | - Enums * | - Commands * | - Feature * | - Extensions * - ) * -} - -# defines a group of types -Types = element types { - Type * -} - -# defines a single type. It is usually a C typedef but -# may contain arbitrary C code. -# name - name of this type, if not present in the tag -# api - matches a api attribute, if present -# requires - name of another type definition required by this one -# type - "group", if present, indicating a group of values in the -# corresponding definition. -# comment - unused -# - substitutes for an APIENTRY-style macro on output -# - contains typename -Type = element type { - attribute api { text } ? , - attribute requires { text } ? , - attribute name { TypeName } ? , - attribute type { text } ? , - Comment ? , - text , - element apientry { text } ? , - text , - element name { TypeName } ? , - text -} - -# defines descriptions for kinds. -Kinds = element kinds { - Kind * -} - -# defines a description for a single kind. -Kind = element kind { - Name , - attribute desc { text } -} - -# defines a group of enum groups -Groups = element groups { - Group * -} - -# defines a single enum group. Enums may -# be in multiple groups. -# name - group name -# comment - unused -# - members of the group - -Group = element group { - Name , - Comment ? , - element enum { Name } * -} - -# defines a group of enumerants -# namespace - identifies a numeric namespace -# group - identifies a functional subset of the namespace - same as group="" -# start, end - beginning and end of a numeric range in the namespace -# vendor - owner of the numeric range -# type - "bitmask", if present -# comment - unused -Enums = element enums { - attribute namespace { text } ? , - attribute group { text } ? , - attribute type { text } ? , - attribute start { Integer } ? , - attribute end { Integer } ? , - Vendor ? , - Comment ? , - (Enum | Unused) * -} -# defines a single enumerant -# value - integer (including hex) value of the enumerant -# api - matches a api attribute, if present -# type - "u" (unsigned), "ull" (uint64), or integer if not present -# name - enumerant name -# group - identifies a functional subset of the namespace -# alias - another enumerant this is semantically identical to -# comment - unused -Enum = element enum { - ( - attribute value { Integer } & - attribute api { text } ? & - attribute type { TypeSuffix } ? & - attribute name { text } & - attribute group { text } ? & - attribute alias { text } ? & - Comment ? - ) -} -# defines a range of enumerants not currently being used -# start, end - beginning and end of an unused numeric range -# vendor - unused -# comment - unused -Unused = element unused { - attribute start { Integer } , - attribute end { Integer } ? , - Vendor ? , - Comment ? -} -# defines a group of commands -# namespace - identifies a function namespace -Commands = element commands { - attribute namespace { text } ? , - Command * -} -# defines a single command -# is the C function prototype, including the return type -# are function parameters, in order -# class - type of object name (object handle). Handles with different types are not compatible. So handle created as [class=buffer] can not be passed to [class=shader] -# is a name, if present -# is the function / parameter name -# The textual contents of and should be legal C -# for those parts of a function declaration. -# - denotes function aliasing -# name - name of aliased function -# - denotes scalar / vector function equivalence -# name - name of corresponding vector form, e.g. (glColor3f -> glColor3fv) -# - information about GLX protocol -# type - "render", "single", or "vendor" for GLXRender, GLXSingle, GLXVendorPrivate{WithReply} -# opcode - numeric opcode of specified type for this function -# name - if present, protocol name (defaults to command name) -# comment - unused -Command = element command { - Comment ? , - element proto { - attribute group { text } ? , - attribute kind { text } ? , - attribute class { text } ? , - text , - element ptype { TypeName } ? , - text , - element name { text } , - text - } , - element param { - attribute group { text } ? , - attribute kind { text } ? , - attribute class { text } ? , - attribute len { text } ? , - text , - element ptype { TypeName } ? , - text , - element name { text } , - text - } * , - ( - element alias { - Name - } ? & - element vecequiv { - Name - } ? & - element glx { - attribute type { text } , - attribute opcode { xsd:integer } , - Name ? , - Comment ? - } * - ) -} -# Each defines the interface of an API version (e.g. OpenGL 1.2) -# api - API tag (e.g. 'gl', 'gles2', etc. - used internally, not -# neccessarily an actual API name -# name - version name (C preprocessor name, e.g. GL_VERSION_4_2) -# number - version number, e.g. 4.2 -# protect - additional #ifdef symbol to place around the feature -# / contains features to require or remove in -# this version -# profile - only require/remove when generated profile matches -# comment - unused -Feature = element feature { - attribute api { text } , - Name , - attribute number { xsd:float } , - attribute protect { text } ?, - Comment ? , - ( - element require { - ProfileName ? , - Comment ? , - InterfaceElement * - } | - element remove { - ProfileName ? , - Comment ? , - InterfaceElement * - } - ) * -} -Extensions = element extensions { - Extension * -} -# Defines the interface of an API . Like a -# tag, but with a slightly different api attribute. -# api - regexp pattern matching one or more API tags, indicating -# which APIs the extension is known to work with. The only -# syntax supported is {|}* and each name must -# exactly match an API being generated (implicit ^$ surrounding). -# In addition, / tags also support an -# api attribute: -# api - only require/remove these features for the matching API. -# Not a regular expression. -Extension = element extension { - Name , - attribute protect { text } ?, - attribute supported { StringGroup } ? , - Comment ? , - ( - element require { - attribute api { text } ? , - ProfileName ? , - Comment ? , - InterfaceElement * - } | - element remove { - attribute api { text } ? , - ProfileName ? , - Comment ? , - InterfaceElement * - } - ) * -} -# Contents of a / tag, defining a group -# of features to require or remove. -# / / all have attributes -# name - feature name which must match -InterfaceElement = - element type { - Name , - Comment ? - } | - element enum { - Name , - Comment ? - } | - element command { - Name , - Comment ? - } - -# Integers are allowed to be either decimal or C-hex (0x[0-9A-F]+), but -# XML Schema types don't seem to support hex notation, so we use this -# as a placeholder. -Integer = text - -# TypeName is an argument/return value C type name -TypeName = text - -# TypeSuffix is a C numeric type suffix, e.g. 'u' or 'ull' -TypeSuffix = text - -# StringGroup is a regular expression with an implicit -# '^(' and ')$' bracketing it. -StringGroup = text - -# Repeatedly used attributes -ProfileName = attribute profile { text } -Vendor = attribute vendor { text } -Comment = attribute comment { text } -Name = attribute name { text } +# Copyright 2013-2020 The Khronos Group Inc. +# SPDX-License-Identifier: Apache-2.0 + +# Relax NG schema for Khronos Registry XML +# See https://github.com/KhronosGroup/OpenGL-Registry +# +# Last modified 2013/06/14 +# This definition is subject to change (mostly in the form of additions) + +namespace xsd = "http://www.w3.org/2001/XMLSchema-datatypes" + +# Toplevel is a tag. +# May be led by an optional tag containing e.g. copyrights. +start = element registry { + ( + element comment { text } ? | + Types * | + Kinds * | + Groups * | + Enums * | + Commands * | + Feature * | + Extensions * + ) * +} + +# defines a group of types +Types = element types { + Type * +} + +# defines a single type. It is usually a C typedef but +# may contain arbitrary C code. +# name - name of this type, if not present in the tag +# api - matches a api attribute, if present +# requires - name of another type definition required by this one +# type - "group", if present, indicating a group of values in the +# corresponding definition. +# comment - unused +# - substitutes for an APIENTRY-style macro on output +# - contains typename +Type = element type { + attribute api { text } ? , + attribute requires { text } ? , + attribute name { TypeName } ? , + attribute type { text } ? , + Comment ? , + text , + element apientry { text } ? , + text , + element name { TypeName } ? , + text +} + +# defines descriptions for kinds. +Kinds = element kinds { + Kind * +} + +# defines a description for a single kind. +Kind = element kind { + Name , + attribute desc { text } +} + +# defines a group of enum groups +Groups = element groups { + Group * +} + +# defines a single enum group. Enums may +# be in multiple groups. +# name - group name +# comment - unused +# - members of the group + +Group = element group { + Name , + Comment ? , + element enum { Name } * +} + +# defines a group of enumerants +# namespace - identifies a numeric namespace +# group - identifies a functional subset of the namespace - same as group="" +# start, end - beginning and end of a numeric range in the namespace +# vendor - owner of the numeric range +# type - "bitmask", if present +# comment - unused +Enums = element enums { + attribute namespace { text } ? , + attribute group { text } ? , + attribute type { text } ? , + attribute start { Integer } ? , + attribute end { Integer } ? , + Vendor ? , + Comment ? , + (Enum | Unused) * +} +# defines a single enumerant +# value - integer (including hex) value of the enumerant +# api - matches a api attribute, if present +# type - "u" (unsigned), "ull" (uint64), or integer if not present +# name - enumerant name +# group - identifies a functional subset of the namespace +# alias - another enumerant this is semantically identical to +# comment - unused +Enum = element enum { + ( + attribute value { Integer } & + attribute api { text } ? & + attribute type { TypeSuffix } ? & + attribute name { text } & + attribute group { text } ? & + attribute alias { text } ? & + Comment ? + ) +} +# defines a range of enumerants not currently being used +# start, end - beginning and end of an unused numeric range +# vendor - unused +# comment - unused +Unused = element unused { + attribute start { Integer } , + attribute end { Integer } ? , + Vendor ? , + Comment ? +} +# defines a group of commands +# namespace - identifies a function namespace +Commands = element commands { + attribute namespace { text } ? , + Command * +} +# defines a single command +# is the C function prototype, including the return type +# are function parameters, in order +# class - type of object name (object handle). Handles with different types are not compatible. So handle created as [class=buffer] can not be passed to [class=shader] +# is a name, if present +# is the function / parameter name +# The textual contents of and should be legal C +# for those parts of a function declaration. +# - denotes function aliasing +# name - name of aliased function +# - denotes scalar / vector function equivalence +# name - name of corresponding vector form, e.g. (glColor3f -> glColor3fv) +# - information about GLX protocol +# type - "render", "single", or "vendor" for GLXRender, GLXSingle, GLXVendorPrivate{WithReply} +# opcode - numeric opcode of specified type for this function +# name - if present, protocol name (defaults to command name) +# comment - unused +Command = element command { + Comment ? , + element proto { + attribute group { text } ? , + attribute kind { text } ? , + attribute class { text } ? , + text , + element ptype { TypeName } ? , + text , + element name { text } , + text + } , + element param { + attribute group { text } ? , + attribute kind { text } ? , + attribute class { text } ? , + attribute len { text } ? , + text , + element ptype { TypeName } ? , + text , + element name { text } , + text + } * , + ( + element alias { + Name + } ? & + element vecequiv { + Name + } ? & + element glx { + attribute type { text } , + attribute opcode { xsd:integer } , + Name ? , + Comment ? + } * + ) +} +# Each defines the interface of an API version (e.g. OpenGL 1.2) +# api - API tag (e.g. 'gl', 'gles2', etc. - used internally, not +# neccessarily an actual API name +# name - version name (C preprocessor name, e.g. GL_VERSION_4_2) +# number - version number, e.g. 4.2 +# protect - additional #ifdef symbol to place around the feature +# / contains features to require or remove in +# this version +# profile - only require/remove when generated profile matches +# comment - unused +Feature = element feature { + attribute api { text } , + Name , + attribute number { xsd:float } , + attribute protect { text } ?, + Comment ? , + ( + element require { + ProfileName ? , + Comment ? , + InterfaceElement * + } | + element remove { + ProfileName ? , + Comment ? , + InterfaceElement * + } + ) * +} +Extensions = element extensions { + Extension * +} +# Defines the interface of an API . Like a +# tag, but with a slightly different api attribute. +# api - regexp pattern matching one or more API tags, indicating +# which APIs the extension is known to work with. The only +# syntax supported is {|}* and each name must +# exactly match an API being generated (implicit ^$ surrounding). +# In addition, / tags also support an +# api attribute: +# api - only require/remove these features for the matching API. +# Not a regular expression. +Extension = element extension { + Name , + attribute protect { text } ?, + attribute supported { StringGroup } ? , + Comment ? , + ( + element require { + attribute api { text } ? , + ProfileName ? , + Comment ? , + InterfaceElement * + } | + element remove { + attribute api { text } ? , + ProfileName ? , + Comment ? , + InterfaceElement * + } + ) * +} +# Contents of a / tag, defining a group +# of features to require or remove. +# / / all have attributes +# name - feature name which must match +InterfaceElement = + element type { + Name , + Comment ? + } | + element enum { + Name , + Comment ? + } | + element command { + Name , + Comment ? + } + +# Integers are allowed to be either decimal or C-hex (0x[0-9A-F]+), but +# XML Schema types don't seem to support hex notation, so we use this +# as a placeholder. +Integer = text + +# TypeName is an argument/return value C type name +TypeName = text + +# TypeSuffix is a C numeric type suffix, e.g. 'u' or 'ull' +TypeSuffix = text + +# StringGroup is a regular expression with an implicit +# '^(' and ')$' bracketing it. +StringGroup = text + +# Repeatedly used attributes +ProfileName = attribute profile { text } +Vendor = attribute vendor { text } +Comment = attribute comment { text } +Name = attribute name { text } diff --git a/StgSharp.GenerateGL/xml/testesext.c b/StgSharp.GenerateGL/xml/testesext.c index af8c28eb..8f1f2369 100644 --- a/StgSharp.GenerateGL/xml/testesext.c +++ b/StgSharp.GenerateGL/xml/testesext.c @@ -1,14 +1,14 @@ -/*% cc -I. -I../api -I../../../../../registry/trunk/egl/api/ -c % ; rm testesext.o - * - * Test to make sure gl3.h builds properly. - * Will also use SVN internal versions of gl3platform.h - * and khrplatform.h (if needed) (via GLES and KHR symlinks into - * appropriate parts of the tree). - */ -#define GL_GLEXT_PROTOTYPES -#include "GLES3/gl31.h" -#include "GLES2/gl2ext.h" - -#if GL_NV_non_square_matrices != 1 -#error "No extension GL_NV_non_square_matrices!" -#endif +/*% cc -I. -I../api -I../../../../../registry/trunk/egl/api/ -c % ; rm testesext.o + * + * Test to make sure gl3.h builds properly. + * Will also use SVN internal versions of gl3platform.h + * and khrplatform.h (if needed) (via GLES and KHR symlinks into + * appropriate parts of the tree). + */ +#define GL_GLEXT_PROTOTYPES +#include "GLES3/gl31.h" +#include "GLES2/gl2ext.h" + +#if GL_NV_non_square_matrices != 1 +#error "No extension GL_NV_non_square_matrices!" +#endif diff --git a/StgSharp.GenerateGL/xml/testglext.c b/StgSharp.GenerateGL/xml/testglext.c index 07c39ad7..aebf9282 100644 --- a/StgSharp.GenerateGL/xml/testglext.c +++ b/StgSharp.GenerateGL/xml/testglext.c @@ -1,27 +1,27 @@ -/*% /lib/cpp -I../api testglext.c > testglext.i ; cc -c % ; rm testglext.[oi] -*/ -#define GL_GLEXT_LEGACY -#include -#define GL_GLEXT_PROTOTYPES -#include "GL/glext.h" - -#define GLX_GLXEXT_LEGACY -#include - -/* Necessary to avoid token redefinition warnings */ -#undef GLX_SAMPLE_BUFFERS -#undef GLX_SAMPLES -#undef GLX_FRONT_EXT -#undef GLX_BACK_EXT - -#define GLX_GLXEXT_PROTOTYPES -#include "GL/glxext.h" - -int VERSION_4_3 = GL_VERSION_4_3; -/* These should be the same */ -int mcsor = GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES; -int mciufo = GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS; - -/* See if latest extension is included */ -int latest_ext = GL_NV_blend_equation_advanced; -GLenum latest_enum = GL_CONJOINT_NV; +/*% /lib/cpp -I../api testglext.c > testglext.i ; cc -c % ; rm testglext.[oi] +*/ +#define GL_GLEXT_LEGACY +#include +#define GL_GLEXT_PROTOTYPES +#include "GL/glext.h" + +#define GLX_GLXEXT_LEGACY +#include + +/* Necessary to avoid token redefinition warnings */ +#undef GLX_SAMPLE_BUFFERS +#undef GLX_SAMPLES +#undef GLX_FRONT_EXT +#undef GLX_BACK_EXT + +#define GLX_GLXEXT_PROTOTYPES +#include "GL/glxext.h" + +int VERSION_4_3 = GL_VERSION_4_3; +/* These should be the same */ +int mcsor = GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES; +int mciufo = GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS; + +/* See if latest extension is included */ +int latest_ext = GL_NV_blend_equation_advanced; +GLenum latest_enum = GL_CONJOINT_NV; diff --git a/StgSharp.GenerateGL/xml/vendors.txt b/StgSharp.GenerateGL/xml/vendors.txt index 58ebad06..7cccf7fe 100644 --- a/StgSharp.GenerateGL/xml/vendors.txt +++ b/StgSharp.GenerateGL/xml/vendors.txt @@ -1,58 +1,58 @@ -Miscellaneous data about extensions: - - - GLU enumerant reserved values - - Information about extension vendors (probably out of date and incomplete) - -GLU Enumerants -============== - -Value Range Definition Contact - Control (if different) - -100208 SGI - - -Definition Contact Email -Control -========== ======= ===== -OpenGL ARB Jon Leech jon 'at' alumni.caltech.edu -Khronos Jon Leech jon 'at' alumni.caltech.edu (OpenML, OpenGL ES) -Apple Bob Beretta beretta 'at' apple.com -ARM Tom Olson tom.olson 'at' arm.com -AMD and ATI Graham Sellers graham.sellers 'at' amd.com -ATI/NVIDIA Graham Sellers graham.sellers 'at' amd.com -Broadcom Gary Sweet gsweet 'at' broadcom.com -HP Andrew Wiltzius andrew.wiltzius 'at' hp.com -Imagination Graham Connor gconnor 'at' videologic.com -Intel Ian Romanick ian.d.romanick 'at' intel.com -Mesa Brian Paul brianp 'at' mesa3d.org -Microsoft Dave Aronson daronson 'at' microsoft.com -NEC Seiji Uchida uchida 'at' hpc.bs1.fc.nec.co.jp -NVIDIA James Jones jajones 'at' nvidia.com -S3 Yanjun Zhang YanjunZhang 'at' s3graphics.com -Vivante Frido Garritsen TBD -Samsung Jeff Vigil j.vigil 'at' samsung.com -Qualcomm Ashish Mathur asmathur@qti.qualcomm.com - -Out of business / acquired / unknown: - -3Dfx - Acquired by NVIDIA -3Dlabs - Acquired by Creative, refocused on mobile, renamed ZiiLabs -ADD - Out of business -ATI - Acquired by AMD -Compaq - Acquired by HP -DEC - Acquired by Compaq, then HP -E&S - No longer in the graphics business (sells planetarium displays) -HP - No longer in the graphics business (other than as a system integrator) -IBM - No longer in the graphics business (other than as a system integrator) -Intense3D - Acquired by 3Dlabs -Intergraph - Acquired by 3Dlabs. Spinoff of Intense3D. -Micron - No longer in the graphics business -KPC (Kubota) - Out of business -PGI (Pacific Graphics Inc.) - Acquired by Template Graphics Systems -Pixelfusion - No longer in the graphics business -Rendition - Acquired by Micron -SGI (Silicon Graphics Inc.) - Acquired by Silicon Graphics International, then HP -SUN - Acquired by Oracle. No longer in the graphics business. -XGI - Acquired by Silicon Integrated Systems. No longer in the graphics business. -ZiiLabs - Still has a website but appears to be inactive as of 2017-01-12. +Miscellaneous data about extensions: + + - GLU enumerant reserved values + - Information about extension vendors (probably out of date and incomplete) + +GLU Enumerants +============== + +Value Range Definition Contact + Control (if different) + +100208 SGI + + +Definition Contact Email +Control +========== ======= ===== +OpenGL ARB Jon Leech jon 'at' alumni.caltech.edu +Khronos Jon Leech jon 'at' alumni.caltech.edu (OpenML, OpenGL ES) +Apple Bob Beretta beretta 'at' apple.com +ARM Tom Olson tom.olson 'at' arm.com +AMD and ATI Graham Sellers graham.sellers 'at' amd.com +ATI/NVIDIA Graham Sellers graham.sellers 'at' amd.com +Broadcom Gary Sweet gsweet 'at' broadcom.com +HP Andrew Wiltzius andrew.wiltzius 'at' hp.com +Imagination Graham Connor gconnor 'at' videologic.com +Intel Ian Romanick ian.d.romanick 'at' intel.com +Mesa Brian Paul brianp 'at' mesa3d.org +Microsoft Dave Aronson daronson 'at' microsoft.com +NEC Seiji Uchida uchida 'at' hpc.bs1.fc.nec.co.jp +NVIDIA James Jones jajones 'at' nvidia.com +S3 Yanjun Zhang YanjunZhang 'at' s3graphics.com +Vivante Frido Garritsen TBD +Samsung Jeff Vigil j.vigil 'at' samsung.com +Qualcomm Ashish Mathur asmathur@qti.qualcomm.com + +Out of business / acquired / unknown: + +3Dfx - Acquired by NVIDIA +3Dlabs - Acquired by Creative, refocused on mobile, renamed ZiiLabs +ADD - Out of business +ATI - Acquired by AMD +Compaq - Acquired by HP +DEC - Acquired by Compaq, then HP +E&S - No longer in the graphics business (sells planetarium displays) +HP - No longer in the graphics business (other than as a system integrator) +IBM - No longer in the graphics business (other than as a system integrator) +Intense3D - Acquired by 3Dlabs +Intergraph - Acquired by 3Dlabs. Spinoff of Intense3D. +Micron - No longer in the graphics business +KPC (Kubota) - Out of business +PGI (Pacific Graphics Inc.) - Acquired by Template Graphics Systems +Pixelfusion - No longer in the graphics business +Rendition - Acquired by Micron +SGI (Silicon Graphics Inc.) - Acquired by Silicon Graphics International, then HP +SUN - Acquired by Oracle. No longer in the graphics business. +XGI - Acquired by Silicon Integrated Systems. No longer in the graphics business. +ZiiLabs - Still has a website but appears to be inactive as of 2017-01-12. diff --git a/StgSharp.GenerateGL/xml/wgl.xml b/StgSharp.GenerateGL/xml/wgl.xml index f306c192..3310cd57 100644 --- a/StgSharp.GenerateGL/xml/wgl.xml +++ b/StgSharp.GenerateGL/xml/wgl.xml @@ -1,1988 +1,1988 @@ - - - -Copyright 2013-2025 The Khronos Group Inc. -SPDX-License-Identifier: Apache-2.0 - -This file, wgl.xml, is the WGL API Registry. The canonical version of the -registry, together with documentation, schema, and Python generator scripts -used to generate C header files for WGL, can always be found in the Khronos -Registry at https://github.com/KhronosGroup/OpenGL-Registry - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - struct _GPU_DEVICE { - DWORD cb; - CHAR DeviceName[32]; - CHAR DeviceString[128]; - DWORD Flags; - RECT rcVirtualScreen; -}; - - DECLARE_HANDLE(HPBUFFERARB); - DECLARE_HANDLE(HPBUFFEREXT); - DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV); - DECLARE_HANDLE(HPVIDEODEV); - DECLARE_HANDLE(HPGPUNV); - DECLARE_HANDLE(HGPUNV); - DECLARE_HANDLE(HVIDEOINPUTDEVICENV); - typedef struct _GPU_DEVICE GPU_DEVICE; - typedef struct _GPU_DEVICE *PGPU_DEVICE; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - int ChoosePixelFormat - HDC hDc - const PIXELFORMATDESCRIPTOR *pPfd - - - int DescribePixelFormat - HDC hdc - int ipfd - UINT cjpfd - PIXELFORMATDESCRIPTOR *ppfd - - - int GetPixelFormat - HDC hdc - - - BOOL SetPixelFormat - HDC hdc - int ipfd - const PIXELFORMATDESCRIPTOR *ppfd - - - BOOL SwapBuffers - HDC hdc - - - void *wglAllocateMemoryNV - GLsizei size - GLfloat readfreq - GLfloat writefreq - GLfloat priority - - - BOOL wglAssociateImageBufferEventsI3D - HDC hDC - const HANDLE *pEvent - const LPVOID *pAddress - const DWORD *pSize - UINT count - - - BOOL wglBeginFrameTrackingI3D - - - GLboolean wglBindDisplayColorTableEXT - GLushort id - - - BOOL wglBindSwapBarrierNV - GLuint group - GLuint barrier - - - BOOL wglBindTexImageARB - HPBUFFERARB hPbuffer - int iBuffer - - - BOOL wglBindVideoCaptureDeviceNV - UINT uVideoSlot - HVIDEOINPUTDEVICENV hDevice - - - BOOL wglBindVideoDeviceNV - HDC hDc - unsigned int uVideoSlot - HVIDEOOUTPUTDEVICENV hVideoDevice - const int *piAttribList - - - BOOL wglBindVideoImageNV - HPVIDEODEV hVideoDevice - HPBUFFERARB hPbuffer - int iVideoBuffer - - - VOID wglBlitContextFramebufferAMD - HGLRC dstCtx - GLint srcX0 - GLint srcY0 - GLint srcX1 - GLint srcY1 - GLint dstX0 - GLint dstY0 - GLint dstX1 - GLint dstY1 - GLbitfield mask - GLenum filter - - - BOOL wglChoosePixelFormatARB - HDC hdc - const int *piAttribIList - const FLOAT *pfAttribFList - UINT nMaxFormats - int *piFormats - UINT *nNumFormats - - - BOOL wglChoosePixelFormatEXT - HDC hdc - const int *piAttribIList - const FLOAT *pfAttribFList - UINT nMaxFormats - int *piFormats - UINT *nNumFormats - - - BOOL wglCopyContext - HGLRC hglrcSrc - HGLRC hglrcDst - UINT mask - - - BOOL wglCopyImageSubDataNV - HGLRC hSrcRC - GLuint srcName - GLenum srcTarget - GLint srcLevel - GLint srcX - GLint srcY - GLint srcZ - HGLRC hDstRC - GLuint dstName - GLenum dstTarget - GLint dstLevel - GLint dstX - GLint dstY - GLint dstZ - GLsizei width - GLsizei height - GLsizei depth - - - HDC wglCreateAffinityDCNV - const HGPUNV *phGpuList - - - HGLRC wglCreateAssociatedContextAMD - UINT id - - - HGLRC wglCreateAssociatedContextAttribsAMD - UINT id - HGLRC hShareContext - const int *attribList - - - HANDLE wglCreateBufferRegionARB - HDC hDC - int iLayerPlane - UINT uType - - - HGLRC wglCreateContext - HDC hDc - - - HGLRC wglCreateContextAttribsARB - HDC hDC - HGLRC hShareContext - const int *attribList - - - GLboolean wglCreateDisplayColorTableEXT - GLushort id - - - LPVOID wglCreateImageBufferI3D - HDC hDC - DWORD dwSize - UINT uFlags - - - HGLRC wglCreateLayerContext - HDC hDc - int level - - - HPBUFFERARB wglCreatePbufferARB - HDC hDC - int iPixelFormat - int iWidth - int iHeight - const int *piAttribList - - - HPBUFFEREXT wglCreatePbufferEXT - HDC hDC - int iPixelFormat - int iWidth - int iHeight - const int *piAttribList - - - BOOL wglDelayBeforeSwapNV - HDC hDC - GLfloat seconds - - - BOOL wglDeleteAssociatedContextAMD - HGLRC hglrc - - - VOID wglDeleteBufferRegionARB - HANDLE hRegion - - - BOOL wglDeleteContext - HGLRC oldContext - - - BOOL wglDeleteDCNV - HDC hdc - - - BOOL wglDescribeLayerPlane - HDC hDc - int pixelFormat - int layerPlane - UINT nBytes - LAYERPLANEDESCRIPTOR *plpd - - - VOID wglDestroyDisplayColorTableEXT - GLushort id - - - BOOL wglDestroyImageBufferI3D - HDC hDC - LPVOID pAddress - - - BOOL wglDestroyPbufferARB - HPBUFFERARB hPbuffer - - - BOOL wglDestroyPbufferEXT - HPBUFFEREXT hPbuffer - - - BOOL wglDisableFrameLockI3D - - - BOOL wglDisableGenlockI3D - HDC hDC - - - BOOL wglDXCloseDeviceNV - HANDLE hDevice - - - BOOL wglDXLockObjectsNV - HANDLE hDevice - GLint count - HANDLE *hObjects - - - BOOL wglDXObjectAccessNV - HANDLE hObject - GLenum access - - - HANDLE wglDXOpenDeviceNV - void *dxDevice - - - HANDLE wglDXRegisterObjectNV - HANDLE hDevice - void *dxObject - GLuint name - GLenum type - GLenum access - - - BOOL wglDXSetResourceShareHandleNV - void *dxObject - HANDLE shareHandle - - - BOOL wglDXUnlockObjectsNV - HANDLE hDevice - GLint count - HANDLE *hObjects - - - BOOL wglDXUnregisterObjectNV - HANDLE hDevice - HANDLE hObject - - - BOOL wglEnableFrameLockI3D - - - BOOL wglEnableGenlockI3D - HDC hDC - - - BOOL wglEndFrameTrackingI3D - - - UINT wglEnumerateVideoCaptureDevicesNV - HDC hDc - HVIDEOINPUTDEVICENV *phDeviceList - - - int wglEnumerateVideoDevicesNV - HDC hDc - HVIDEOOUTPUTDEVICENV *phDeviceList - - - BOOL wglEnumGpuDevicesNV - HGPUNV hGpu - UINT iDeviceIndex - PGPU_DEVICE lpGpuDevice - - - BOOL wglEnumGpusFromAffinityDCNV - HDC hAffinityDC - UINT iGpuIndex - HGPUNV *hGpu - - - BOOL wglEnumGpusNV - UINT iGpuIndex - HGPUNV *phGpu - - - void wglFreeMemoryNV - void *pointer - - - BOOL wglGenlockSampleRateI3D - HDC hDC - UINT uRate - - - BOOL wglGenlockSourceDelayI3D - HDC hDC - UINT uDelay - - - BOOL wglGenlockSourceEdgeI3D - HDC hDC - UINT uEdge - - - BOOL wglGenlockSourceI3D - HDC hDC - UINT uSource - - - UINT wglGetContextGPUIDAMD - HGLRC hglrc - - - HGLRC wglGetCurrentAssociatedContextAMD - - - HGLRC wglGetCurrentContext - - - HDC wglGetCurrentDC - - - HDC wglGetCurrentReadDCARB - - - HDC wglGetCurrentReadDCEXT - - - PROC wglGetDefaultProcAddress - LPCSTR lpszProc - - - BOOL wglGetDigitalVideoParametersI3D - HDC hDC - int iAttribute - int *piValue - - - UINT GetEnhMetaFilePixelFormat - HENHMETAFILE hemf - UINT cbBuffer - PIXELFORMATDESCRIPTOR *ppfd - - - const char *wglGetExtensionsStringARB - HDC hdc - - - const char *wglGetExtensionsStringEXT - - - BOOL wglGetFrameUsageI3D - float *pUsage - - - BOOL wglGetGammaTableI3D - HDC hDC - int iEntries - USHORT *puRed - USHORT *puGreen - USHORT *puBlue - - - BOOL wglGetGammaTableParametersI3D - HDC hDC - int iAttribute - int *piValue - - - BOOL wglGetGenlockSampleRateI3D - HDC hDC - UINT *uRate - - - BOOL wglGetGenlockSourceDelayI3D - HDC hDC - UINT *uDelay - - - BOOL wglGetGenlockSourceEdgeI3D - HDC hDC - UINT *uEdge - - - BOOL wglGetGenlockSourceI3D - HDC hDC - UINT *uSource - - - UINT wglGetGPUIDsAMD - UINT maxCount - UINT *ids - - - INT wglGetGPUInfoAMD - UINT id - INT property - GLenum dataType - UINT size - void *data - - - int wglGetLayerPaletteEntries - HDC hdc - int iLayerPlane - int iStart - int cEntries - COLORREF *pcr - - - BOOL wglGetMscRateOML - HDC hdc - INT32 *numerator - INT32 *denominator - - - HDC wglGetPbufferDCARB - HPBUFFERARB hPbuffer - - - HDC wglGetPbufferDCEXT - HPBUFFEREXT hPbuffer - - - BOOL wglGetPixelFormatAttribfvARB - HDC hdc - int iPixelFormat - int iLayerPlane - UINT nAttributes - const int *piAttributes - FLOAT *pfValues - - - BOOL wglGetPixelFormatAttribfvEXT - HDC hdc - int iPixelFormat - int iLayerPlane - UINT nAttributes - int *piAttributes - FLOAT *pfValues - - - BOOL wglGetPixelFormatAttribivARB - HDC hdc - int iPixelFormat - int iLayerPlane - UINT nAttributes - const int *piAttributes - int *piValues - - - BOOL wglGetPixelFormatAttribivEXT - HDC hdc - int iPixelFormat - int iLayerPlane - UINT nAttributes - int *piAttributes - int *piValues - - - PROC wglGetProcAddress - LPCSTR lpszProc - - - int wglGetSwapIntervalEXT - - - BOOL wglGetSyncValuesOML - HDC hdc - INT64 *ust - INT64 *msc - INT64 *sbc - - - BOOL wglGetVideoDeviceNV - HDC hDC - int numDevices - HPVIDEODEV *hVideoDevice - - - BOOL wglGetVideoInfoNV - HPVIDEODEV hpVideoDevice - unsigned long *pulCounterOutputPbuffer - unsigned long *pulCounterOutputVideo - - - BOOL wglIsEnabledFrameLockI3D - BOOL *pFlag - - - BOOL wglIsEnabledGenlockI3D - HDC hDC - BOOL *pFlag - - - BOOL wglJoinSwapGroupNV - HDC hDC - GLuint group - - - GLboolean wglLoadDisplayColorTableEXT - const GLushort *table - GLuint length - - - BOOL wglLockVideoCaptureDeviceNV - HDC hDc - HVIDEOINPUTDEVICENV hDevice - - - BOOL wglMakeAssociatedContextCurrentAMD - HGLRC hglrc - - - BOOL wglMakeContextCurrentARB - HDC hDrawDC - HDC hReadDC - HGLRC hglrc - - - BOOL wglMakeContextCurrentEXT - HDC hDrawDC - HDC hReadDC - HGLRC hglrc - - - BOOL wglMakeCurrent - HDC hDc - HGLRC newContext - - - BOOL wglQueryCurrentContextNV - int iAttribute - int *piValue - - - BOOL wglQueryFrameCountNV - HDC hDC - GLuint *count - - - BOOL wglQueryFrameLockMasterI3D - BOOL *pFlag - - - BOOL wglQueryFrameTrackingI3D - DWORD *pFrameCount - DWORD *pMissedFrames - float *pLastMissedUsage - - - BOOL wglQueryGenlockMaxSourceDelayI3D - HDC hDC - UINT *uMaxLineDelay - UINT *uMaxPixelDelay - - - BOOL wglQueryMaxSwapGroupsNV - HDC hDC - GLuint *maxGroups - GLuint *maxBarriers - - - BOOL wglQueryPbufferARB - HPBUFFERARB hPbuffer - int iAttribute - int *piValue - - - BOOL wglQueryPbufferEXT - HPBUFFEREXT hPbuffer - int iAttribute - int *piValue - - - BOOL wglQuerySwapGroupNV - HDC hDC - GLuint *group - GLuint *barrier - - - BOOL wglQueryVideoCaptureDeviceNV - HDC hDc - HVIDEOINPUTDEVICENV hDevice - int iAttribute - int *piValue - - - BOOL wglRealizeLayerPalette - HDC hdc - int iLayerPlane - BOOL bRealize - - - BOOL wglReleaseImageBufferEventsI3D - HDC hDC - const LPVOID *pAddress - UINT count - - - int wglReleasePbufferDCARB - HPBUFFERARB hPbuffer - HDC hDC - - - int wglReleasePbufferDCEXT - HPBUFFEREXT hPbuffer - HDC hDC - - - BOOL wglReleaseTexImageARB - HPBUFFERARB hPbuffer - int iBuffer - - - BOOL wglReleaseVideoCaptureDeviceNV - HDC hDc - HVIDEOINPUTDEVICENV hDevice - - - BOOL wglReleaseVideoDeviceNV - HPVIDEODEV hVideoDevice - - - BOOL wglReleaseVideoImageNV - HPBUFFERARB hPbuffer - int iVideoBuffer - - - BOOL wglResetFrameCountNV - HDC hDC - - - BOOL wglRestoreBufferRegionARB - HANDLE hRegion - int x - int y - int width - int height - int xSrc - int ySrc - - - BOOL wglSaveBufferRegionARB - HANDLE hRegion - int x - int y - int width - int height - - - BOOL wglSendPbufferToVideoNV - HPBUFFERARB hPbuffer - int iBufferType - unsigned long *pulCounterPbuffer - BOOL bBlock - - - BOOL wglSetDigitalVideoParametersI3D - HDC hDC - int iAttribute - const int *piValue - - - BOOL wglSetGammaTableI3D - HDC hDC - int iEntries - const USHORT *puRed - const USHORT *puGreen - const USHORT *puBlue - - - BOOL wglSetGammaTableParametersI3D - HDC hDC - int iAttribute - const int *piValue - - - int wglSetLayerPaletteEntries - HDC hdc - int iLayerPlane - int iStart - int cEntries - const COLORREF *pcr - - - BOOL wglSetPbufferAttribARB - HPBUFFERARB hPbuffer - const int *piAttribList - - - BOOL wglSetStereoEmitterState3DL - HDC hDC - UINT uState - - - BOOL wglShareLists - HGLRC hrcSrvShare - HGLRC hrcSrvSource - - - INT64 wglSwapBuffersMscOML - HDC hdc - INT64 target_msc - INT64 divisor - INT64 remainder - - - BOOL wglSwapLayerBuffers - HDC hdc - UINT fuFlags - - - BOOL wglSwapIntervalEXT - int interval - - - INT64 wglSwapLayerBuffersMscOML - HDC hdc - INT fuPlanes - INT64 target_msc - INT64 divisor - INT64 remainder - - - BOOL wglUseFontBitmaps - HDC hDC - DWORD first - DWORD count - DWORD listBase - - - BOOL wglUseFontBitmapsA - HDC hDC - DWORD first - DWORD count - DWORD listBase - - - BOOL wglUseFontBitmapsW - HDC hDC - DWORD first - DWORD count - DWORD listBase - - - BOOL wglUseFontOutlines - HDC hDC - DWORD first - DWORD count - DWORD listBase - FLOAT deviation - FLOAT extrusion - int format - LPGLYPHMETRICSFLOAT lpgmf - - - BOOL wglUseFontOutlinesA - HDC hDC - DWORD first - DWORD count - DWORD listBase - FLOAT deviation - FLOAT extrusion - int format - LPGLYPHMETRICSFLOAT lpgmf - - - BOOL wglUseFontOutlinesW - HDC hDC - DWORD first - DWORD count - DWORD listBase - FLOAT deviation - FLOAT extrusion - int format - LPGLYPHMETRICSFLOAT lpgmf - - - BOOL wglWaitForMscOML - HDC hdc - INT64 target_msc - INT64 divisor - INT64 remainder - INT64 *ust - INT64 *msc - INT64 *sbc - - - BOOL wglWaitForSbcOML - HDC hdc - INT64 target_sbc - INT64 *ust - INT64 *msc - INT64 *sbc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + +Copyright 2013-2025 The Khronos Group Inc. +SPDX-License-Identifier: Apache-2.0 + +This file, wgl.xml, is the WGL API Registry. The canonical version of the +registry, together with documentation, schema, and Python generator scripts +used to generate C header files for WGL, can always be found in the Khronos +Registry at https://github.com/KhronosGroup/OpenGL-Registry + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + struct _GPU_DEVICE { + DWORD cb; + CHAR DeviceName[32]; + CHAR DeviceString[128]; + DWORD Flags; + RECT rcVirtualScreen; +}; + + DECLARE_HANDLE(HPBUFFERARB); + DECLARE_HANDLE(HPBUFFEREXT); + DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV); + DECLARE_HANDLE(HPVIDEODEV); + DECLARE_HANDLE(HPGPUNV); + DECLARE_HANDLE(HGPUNV); + DECLARE_HANDLE(HVIDEOINPUTDEVICENV); + typedef struct _GPU_DEVICE GPU_DEVICE; + typedef struct _GPU_DEVICE *PGPU_DEVICE; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + int ChoosePixelFormat + HDC hDc + const PIXELFORMATDESCRIPTOR *pPfd + + + int DescribePixelFormat + HDC hdc + int ipfd + UINT cjpfd + PIXELFORMATDESCRIPTOR *ppfd + + + int GetPixelFormat + HDC hdc + + + BOOL SetPixelFormat + HDC hdc + int ipfd + const PIXELFORMATDESCRIPTOR *ppfd + + + BOOL SwapBuffers + HDC hdc + + + void *wglAllocateMemoryNV + GLsizei size + GLfloat readfreq + GLfloat writefreq + GLfloat priority + + + BOOL wglAssociateImageBufferEventsI3D + HDC hDC + const HANDLE *pEvent + const LPVOID *pAddress + const DWORD *pSize + UINT count + + + BOOL wglBeginFrameTrackingI3D + + + GLboolean wglBindDisplayColorTableEXT + GLushort id + + + BOOL wglBindSwapBarrierNV + GLuint group + GLuint barrier + + + BOOL wglBindTexImageARB + HPBUFFERARB hPbuffer + int iBuffer + + + BOOL wglBindVideoCaptureDeviceNV + UINT uVideoSlot + HVIDEOINPUTDEVICENV hDevice + + + BOOL wglBindVideoDeviceNV + HDC hDc + unsigned int uVideoSlot + HVIDEOOUTPUTDEVICENV hVideoDevice + const int *piAttribList + + + BOOL wglBindVideoImageNV + HPVIDEODEV hVideoDevice + HPBUFFERARB hPbuffer + int iVideoBuffer + + + VOID wglBlitContextFramebufferAMD + HGLRC dstCtx + GLint srcX0 + GLint srcY0 + GLint srcX1 + GLint srcY1 + GLint dstX0 + GLint dstY0 + GLint dstX1 + GLint dstY1 + GLbitfield mask + GLenum filter + + + BOOL wglChoosePixelFormatARB + HDC hdc + const int *piAttribIList + const FLOAT *pfAttribFList + UINT nMaxFormats + int *piFormats + UINT *nNumFormats + + + BOOL wglChoosePixelFormatEXT + HDC hdc + const int *piAttribIList + const FLOAT *pfAttribFList + UINT nMaxFormats + int *piFormats + UINT *nNumFormats + + + BOOL wglCopyContext + HGLRC hglrcSrc + HGLRC hglrcDst + UINT mask + + + BOOL wglCopyImageSubDataNV + HGLRC hSrcRC + GLuint srcName + GLenum srcTarget + GLint srcLevel + GLint srcX + GLint srcY + GLint srcZ + HGLRC hDstRC + GLuint dstName + GLenum dstTarget + GLint dstLevel + GLint dstX + GLint dstY + GLint dstZ + GLsizei width + GLsizei height + GLsizei depth + + + HDC wglCreateAffinityDCNV + const HGPUNV *phGpuList + + + HGLRC wglCreateAssociatedContextAMD + UINT id + + + HGLRC wglCreateAssociatedContextAttribsAMD + UINT id + HGLRC hShareContext + const int *attribList + + + HANDLE wglCreateBufferRegionARB + HDC hDC + int iLayerPlane + UINT uType + + + HGLRC wglCreateContext + HDC hDc + + + HGLRC wglCreateContextAttribsARB + HDC hDC + HGLRC hShareContext + const int *attribList + + + GLboolean wglCreateDisplayColorTableEXT + GLushort id + + + LPVOID wglCreateImageBufferI3D + HDC hDC + DWORD dwSize + UINT uFlags + + + HGLRC wglCreateLayerContext + HDC hDc + int level + + + HPBUFFERARB wglCreatePbufferARB + HDC hDC + int iPixelFormat + int iWidth + int iHeight + const int *piAttribList + + + HPBUFFEREXT wglCreatePbufferEXT + HDC hDC + int iPixelFormat + int iWidth + int iHeight + const int *piAttribList + + + BOOL wglDelayBeforeSwapNV + HDC hDC + GLfloat seconds + + + BOOL wglDeleteAssociatedContextAMD + HGLRC hglrc + + + VOID wglDeleteBufferRegionARB + HANDLE hRegion + + + BOOL wglDeleteContext + HGLRC oldContext + + + BOOL wglDeleteDCNV + HDC hdc + + + BOOL wglDescribeLayerPlane + HDC hDc + int pixelFormat + int layerPlane + UINT nBytes + LAYERPLANEDESCRIPTOR *plpd + + + VOID wglDestroyDisplayColorTableEXT + GLushort id + + + BOOL wglDestroyImageBufferI3D + HDC hDC + LPVOID pAddress + + + BOOL wglDestroyPbufferARB + HPBUFFERARB hPbuffer + + + BOOL wglDestroyPbufferEXT + HPBUFFEREXT hPbuffer + + + BOOL wglDisableFrameLockI3D + + + BOOL wglDisableGenlockI3D + HDC hDC + + + BOOL wglDXCloseDeviceNV + HANDLE hDevice + + + BOOL wglDXLockObjectsNV + HANDLE hDevice + GLint count + HANDLE *hObjects + + + BOOL wglDXObjectAccessNV + HANDLE hObject + GLenum access + + + HANDLE wglDXOpenDeviceNV + void *dxDevice + + + HANDLE wglDXRegisterObjectNV + HANDLE hDevice + void *dxObject + GLuint name + GLenum type + GLenum access + + + BOOL wglDXSetResourceShareHandleNV + void *dxObject + HANDLE shareHandle + + + BOOL wglDXUnlockObjectsNV + HANDLE hDevice + GLint count + HANDLE *hObjects + + + BOOL wglDXUnregisterObjectNV + HANDLE hDevice + HANDLE hObject + + + BOOL wglEnableFrameLockI3D + + + BOOL wglEnableGenlockI3D + HDC hDC + + + BOOL wglEndFrameTrackingI3D + + + UINT wglEnumerateVideoCaptureDevicesNV + HDC hDc + HVIDEOINPUTDEVICENV *phDeviceList + + + int wglEnumerateVideoDevicesNV + HDC hDc + HVIDEOOUTPUTDEVICENV *phDeviceList + + + BOOL wglEnumGpuDevicesNV + HGPUNV hGpu + UINT iDeviceIndex + PGPU_DEVICE lpGpuDevice + + + BOOL wglEnumGpusFromAffinityDCNV + HDC hAffinityDC + UINT iGpuIndex + HGPUNV *hGpu + + + BOOL wglEnumGpusNV + UINT iGpuIndex + HGPUNV *phGpu + + + void wglFreeMemoryNV + void *pointer + + + BOOL wglGenlockSampleRateI3D + HDC hDC + UINT uRate + + + BOOL wglGenlockSourceDelayI3D + HDC hDC + UINT uDelay + + + BOOL wglGenlockSourceEdgeI3D + HDC hDC + UINT uEdge + + + BOOL wglGenlockSourceI3D + HDC hDC + UINT uSource + + + UINT wglGetContextGPUIDAMD + HGLRC hglrc + + + HGLRC wglGetCurrentAssociatedContextAMD + + + HGLRC wglGetCurrentContext + + + HDC wglGetCurrentDC + + + HDC wglGetCurrentReadDCARB + + + HDC wglGetCurrentReadDCEXT + + + PROC wglGetDefaultProcAddress + LPCSTR lpszProc + + + BOOL wglGetDigitalVideoParametersI3D + HDC hDC + int iAttribute + int *piValue + + + UINT GetEnhMetaFilePixelFormat + HENHMETAFILE hemf + UINT cbBuffer + PIXELFORMATDESCRIPTOR *ppfd + + + const char *wglGetExtensionsStringARB + HDC hdc + + + const char *wglGetExtensionsStringEXT + + + BOOL wglGetFrameUsageI3D + float *pUsage + + + BOOL wglGetGammaTableI3D + HDC hDC + int iEntries + USHORT *puRed + USHORT *puGreen + USHORT *puBlue + + + BOOL wglGetGammaTableParametersI3D + HDC hDC + int iAttribute + int *piValue + + + BOOL wglGetGenlockSampleRateI3D + HDC hDC + UINT *uRate + + + BOOL wglGetGenlockSourceDelayI3D + HDC hDC + UINT *uDelay + + + BOOL wglGetGenlockSourceEdgeI3D + HDC hDC + UINT *uEdge + + + BOOL wglGetGenlockSourceI3D + HDC hDC + UINT *uSource + + + UINT wglGetGPUIDsAMD + UINT maxCount + UINT *ids + + + INT wglGetGPUInfoAMD + UINT id + INT property + GLenum dataType + UINT size + void *data + + + int wglGetLayerPaletteEntries + HDC hdc + int iLayerPlane + int iStart + int cEntries + COLORREF *pcr + + + BOOL wglGetMscRateOML + HDC hdc + INT32 *numerator + INT32 *denominator + + + HDC wglGetPbufferDCARB + HPBUFFERARB hPbuffer + + + HDC wglGetPbufferDCEXT + HPBUFFEREXT hPbuffer + + + BOOL wglGetPixelFormatAttribfvARB + HDC hdc + int iPixelFormat + int iLayerPlane + UINT nAttributes + const int *piAttributes + FLOAT *pfValues + + + BOOL wglGetPixelFormatAttribfvEXT + HDC hdc + int iPixelFormat + int iLayerPlane + UINT nAttributes + int *piAttributes + FLOAT *pfValues + + + BOOL wglGetPixelFormatAttribivARB + HDC hdc + int iPixelFormat + int iLayerPlane + UINT nAttributes + const int *piAttributes + int *piValues + + + BOOL wglGetPixelFormatAttribivEXT + HDC hdc + int iPixelFormat + int iLayerPlane + UINT nAttributes + int *piAttributes + int *piValues + + + PROC wglGetProcAddress + LPCSTR lpszProc + + + int wglGetSwapIntervalEXT + + + BOOL wglGetSyncValuesOML + HDC hdc + INT64 *ust + INT64 *msc + INT64 *sbc + + + BOOL wglGetVideoDeviceNV + HDC hDC + int numDevices + HPVIDEODEV *hVideoDevice + + + BOOL wglGetVideoInfoNV + HPVIDEODEV hpVideoDevice + unsigned long *pulCounterOutputPbuffer + unsigned long *pulCounterOutputVideo + + + BOOL wglIsEnabledFrameLockI3D + BOOL *pFlag + + + BOOL wglIsEnabledGenlockI3D + HDC hDC + BOOL *pFlag + + + BOOL wglJoinSwapGroupNV + HDC hDC + GLuint group + + + GLboolean wglLoadDisplayColorTableEXT + const GLushort *table + GLuint length + + + BOOL wglLockVideoCaptureDeviceNV + HDC hDc + HVIDEOINPUTDEVICENV hDevice + + + BOOL wglMakeAssociatedContextCurrentAMD + HGLRC hglrc + + + BOOL wglMakeContextCurrentARB + HDC hDrawDC + HDC hReadDC + HGLRC hglrc + + + BOOL wglMakeContextCurrentEXT + HDC hDrawDC + HDC hReadDC + HGLRC hglrc + + + BOOL wglMakeCurrent + HDC hDc + HGLRC newContext + + + BOOL wglQueryCurrentContextNV + int iAttribute + int *piValue + + + BOOL wglQueryFrameCountNV + HDC hDC + GLuint *count + + + BOOL wglQueryFrameLockMasterI3D + BOOL *pFlag + + + BOOL wglQueryFrameTrackingI3D + DWORD *pFrameCount + DWORD *pMissedFrames + float *pLastMissedUsage + + + BOOL wglQueryGenlockMaxSourceDelayI3D + HDC hDC + UINT *uMaxLineDelay + UINT *uMaxPixelDelay + + + BOOL wglQueryMaxSwapGroupsNV + HDC hDC + GLuint *maxGroups + GLuint *maxBarriers + + + BOOL wglQueryPbufferARB + HPBUFFERARB hPbuffer + int iAttribute + int *piValue + + + BOOL wglQueryPbufferEXT + HPBUFFEREXT hPbuffer + int iAttribute + int *piValue + + + BOOL wglQuerySwapGroupNV + HDC hDC + GLuint *group + GLuint *barrier + + + BOOL wglQueryVideoCaptureDeviceNV + HDC hDc + HVIDEOINPUTDEVICENV hDevice + int iAttribute + int *piValue + + + BOOL wglRealizeLayerPalette + HDC hdc + int iLayerPlane + BOOL bRealize + + + BOOL wglReleaseImageBufferEventsI3D + HDC hDC + const LPVOID *pAddress + UINT count + + + int wglReleasePbufferDCARB + HPBUFFERARB hPbuffer + HDC hDC + + + int wglReleasePbufferDCEXT + HPBUFFEREXT hPbuffer + HDC hDC + + + BOOL wglReleaseTexImageARB + HPBUFFERARB hPbuffer + int iBuffer + + + BOOL wglReleaseVideoCaptureDeviceNV + HDC hDc + HVIDEOINPUTDEVICENV hDevice + + + BOOL wglReleaseVideoDeviceNV + HPVIDEODEV hVideoDevice + + + BOOL wglReleaseVideoImageNV + HPBUFFERARB hPbuffer + int iVideoBuffer + + + BOOL wglResetFrameCountNV + HDC hDC + + + BOOL wglRestoreBufferRegionARB + HANDLE hRegion + int x + int y + int width + int height + int xSrc + int ySrc + + + BOOL wglSaveBufferRegionARB + HANDLE hRegion + int x + int y + int width + int height + + + BOOL wglSendPbufferToVideoNV + HPBUFFERARB hPbuffer + int iBufferType + unsigned long *pulCounterPbuffer + BOOL bBlock + + + BOOL wglSetDigitalVideoParametersI3D + HDC hDC + int iAttribute + const int *piValue + + + BOOL wglSetGammaTableI3D + HDC hDC + int iEntries + const USHORT *puRed + const USHORT *puGreen + const USHORT *puBlue + + + BOOL wglSetGammaTableParametersI3D + HDC hDC + int iAttribute + const int *piValue + + + int wglSetLayerPaletteEntries + HDC hdc + int iLayerPlane + int iStart + int cEntries + const COLORREF *pcr + + + BOOL wglSetPbufferAttribARB + HPBUFFERARB hPbuffer + const int *piAttribList + + + BOOL wglSetStereoEmitterState3DL + HDC hDC + UINT uState + + + BOOL wglShareLists + HGLRC hrcSrvShare + HGLRC hrcSrvSource + + + INT64 wglSwapBuffersMscOML + HDC hdc + INT64 target_msc + INT64 divisor + INT64 remainder + + + BOOL wglSwapLayerBuffers + HDC hdc + UINT fuFlags + + + BOOL wglSwapIntervalEXT + int interval + + + INT64 wglSwapLayerBuffersMscOML + HDC hdc + INT fuPlanes + INT64 target_msc + INT64 divisor + INT64 remainder + + + BOOL wglUseFontBitmaps + HDC hDC + DWORD first + DWORD count + DWORD listBase + + + BOOL wglUseFontBitmapsA + HDC hDC + DWORD first + DWORD count + DWORD listBase + + + BOOL wglUseFontBitmapsW + HDC hDC + DWORD first + DWORD count + DWORD listBase + + + BOOL wglUseFontOutlines + HDC hDC + DWORD first + DWORD count + DWORD listBase + FLOAT deviation + FLOAT extrusion + int format + LPGLYPHMETRICSFLOAT lpgmf + + + BOOL wglUseFontOutlinesA + HDC hDC + DWORD first + DWORD count + DWORD listBase + FLOAT deviation + FLOAT extrusion + int format + LPGLYPHMETRICSFLOAT lpgmf + + + BOOL wglUseFontOutlinesW + HDC hDC + DWORD first + DWORD count + DWORD listBase + FLOAT deviation + FLOAT extrusion + int format + LPGLYPHMETRICSFLOAT lpgmf + + + BOOL wglWaitForMscOML + HDC hdc + INT64 target_msc + INT64 divisor + INT64 remainder + INT64 *ust + INT64 *msc + INT64 *sbc + + + BOOL wglWaitForSbcOML + HDC hdc + INT64 target_sbc + INT64 *ust + INT64 *msc + INT64 *sbc + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/StgSharp.GenerateGL/xml/wgltypes.txt b/StgSharp.GenerateGL/xml/wgltypes.txt index e08b32d8..aab86a9d 100644 --- a/StgSharp.GenerateGL/xml/wgltypes.txt +++ b/StgSharp.GenerateGL/xml/wgltypes.txt @@ -1,106 +1,106 @@ - struct _POINTFLOAT { - FLOAT x; - FLOAT y; -}; - typedef struct _POINTFLOAT POINTFLOAT; - typedef struct _POINTFLOAT *PPOINTFLOAT; - struct _GLYPHMETRICSFLOAT { - FLOAT gmfBlackBoxX; - FLOAT gmfBlackBoxY; - POINTFLOAT gmfptGlyphOrigin; - FLOAT gmfCellIncX; - FLOAT gmfCellIncY; -}; - typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT; - typedef struct _GLYPHMETRICSFLOAT *PGLYPHMETRICSFLOAT; - -typedef struct tagPIXELFORMATDESCRIPTOR { - WORD nSize; - WORD nVersion; - DWORD dwFlags; - BYTE iPixelType; - BYTE cColorBits; - BYTE cRedBits; - BYTE cRedShift; - BYTE cGreenBits; - BYTE cGreenShift; - BYTE cBlueBits; - BYTE cBlueShift; - BYTE cAlphaBits; - BYTE cAlphaShift; - BYTE cAccumBits; - BYTE cAccumRedBits; - BYTE cAccumGreenBits; - BYTE cAccumBlueBits; - BYTE cAccumAlphaBits; - BYTE cDepthBits; - BYTE cStencilBits; - BYTE cAuxBuffers; - BYTE iLayerType; - BYTE bReserved; - DWORD dwLayerMask; - DWORD dwVisibleMask; - DWORD dwDamageMask; -} PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR; - -PFD_DRAW_TO_WINDOW The buffer can draw to a window or device surface. -PFD_DRAW_TO_BITMAP The buffer can draw to a memory bitmap. -PFD_SUPPORT_GDI The buffer supports GDI drawing. This flag and PFD_DOUBLEBUFFER are mutually exclusive in the current generic implementation. -PFD_SUPPORT_OPENGL The buffer supports OpenGL drawing. -PFD_GENERIC_ACCELERATED The pixel format is supported by a device driver that accelerates the generic implementation. If this flag is clear and the PFD_GENERIC_FORMAT flag is set, the pixel format is supported by the generic implementation only. -PFD_GENERIC_FORMAT The pixel format is supported by the GDI software implementation, which is also known as the generic implementation. If this bit is clear, the pixel format is supported by a device driver or hardware. -PFD_NEED_PALETTE The buffer uses RGBA pixels on a palette-managed device. A logical palette is required to achieve the best results for this pixel type. Colors in the palette should be specified according to the values of the cRedBits, cRedShift, cGreenBits, cGreenShift, cBluebits, and cBlueShift members. The palette should be created and realized in the device context before calling wglMakeCurrent. -PFD_NEED_SYSTEM_PALETTE Defined in the pixel format descriptors of hardware that supports one hardware palette in 256-color mode only. For such systems to use hardware acceleration, the hardware palette must be in a fixed order (for example, 3-3-2) when in RGBA mode or must match the logical palette when in color-index mode. -PFD_DOUBLEBUFFER The buffer is double-buffered. This flag and PFD_SUPPORT_GDI are mutually exclusive in the current generic implementation. -PFD_STEREO The buffer is stereoscopic. This flag is not supported in the current generic implementation. -PFD_SWAP_LAYER_BUFFERS Indicates whether a device can swap individual layer planes with pixel formats that include double-buffered overlay or underlay planes. Otherwise all layer planes are swapped together as a group. When this flag is set, wglSwapLayerBuffers is supported. -PFD_DEPTH_DONTCARE The requested pixel format can either have or not have a depth buffer. To select a pixel format without a depth buffer, you must specify this flag. The requested pixel format can be with or without a depth buffer. Otherwise, only pixel formats with a depth buffer are considered. -PFD_DOUBLEBUFFER_DONTCARE The requested pixel format can be either single- or double-buffered. -PFD_STEREO_DONTCARE The requested pixel format can be either monoscopic or stereoscopic. -PFD_SWAP_COPY Specifies the content of the back buffer in the double-buffered main color plane following a buffer swap. Swapping the color buffers causes the content of the back buffer to be copied to the front buffer. The content of the back buffer is not affected by the swap. PFD_SWAP_COPY is a hint only and might not be provided by a driver. -PFD_SWAP_EXCHANGE Specifies the content of the back buffer in the double-buffered main color plane following a buffer swap. Swapping the color buffers causes the exchange of the back buffer's content with the front buffer's content. Following the swap, the back buffer's content contains the front buffer's content before the swap. PFD_SWAP_EXCHANGE is a hint only and might not be provided by a driver. -PFD_TYPE_RGBA RGBA pixels. Each pixel has four components in this order: red, green, blue, and alpha. -PFD_TYPE_COLORINDEX Color-index pixels. Each pixel uses a color-index value. -typedef struct tag_LAYERPLANEDESCRIPTOR { - WORD nSize; - WORD nVersion; - DWORD dwFlags; - BYTE iPixelType; - BYTE cColorBits; - BYTE cRedBits; - BYTE cRedShift; - BYTE cGreenBits; - BYTE cGreenShift; - BYTE cBlueBits; - BYTE cBlueShift; - BYTE cAlphaBits; - BYTE cAlphaShift; - BYTE cAccumBits; - BYTE cAccumRedBits; - BYTE cAccumGreenBits; - BYTE cAccumBlueBits; - BYTE cAccumAlphaBits; - BYTE cDepthBits; - BYTE cStencilBits; - BYTE cAuxBuffers; - BYTE iLayerType; - BYTE bReserved; - COLORREF crTransparent; -} LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR; -LPD_SUPPORT_OPENGL The layer plane supports OpenGL drawing. -LPD_SUPPORT_GDI The layer plane supports GDI drawing. The current implementation of OpenGL doesn't support this flag. -LPD_DOUBLEBUFFER The layer plane is double-buffered. A layer plane can be double-buffered even when the main plane is single-buffered and vice versa. -LPD_STEREO The layer plane is stereoscopic. A layer plane can be stereoscopic even when the main plane is monoscopic and vice versa. -LPD_SWAP_EXCHANGE In a double-buffered layer plane, swapping the color buffer exchanges the front buffer and back buffer contents. The back buffer then contains the contents of the front buffer before the swap. This flag is a hint only and might not be provided by a driver. -LPD_SWAP_COPY In a double-buffered layer plane, swapping the color buffer copies the back buffer contents to the front buffer. The swap does not affect the back buffer contents. This flag is a hint only and might not be provided by a driver. -LPD_TRANSPARENT The crTransparent member of this structure contains a transparent color or index value that enables underlying layers to show through this layer. All layer planes, except the lowest-numbered underlay layer, have a transparent color or index. -LPD_SHARE_DEPTH The layer plane shares the depth buffer with the main plane. -LPD_SHARE_STENCIL The layer plane shares the stencil buffer with the main plane. -LPD_SHARE_ACCUM The layer plane shares the accumulation buffer with the main plane. - -iPixelType -Specifies the type of pixel data. The following types are defined. -Value Meaning -LPD_TYPE_RGBA RGBA pixels. Each pixel has four components: red, green, blue, and alpha. -LPD_TYPE_COLORINDEX Color-index pixels. Each pixel uses a color-index value. - + struct _POINTFLOAT { + FLOAT x; + FLOAT y; +}; + typedef struct _POINTFLOAT POINTFLOAT; + typedef struct _POINTFLOAT *PPOINTFLOAT; + struct _GLYPHMETRICSFLOAT { + FLOAT gmfBlackBoxX; + FLOAT gmfBlackBoxY; + POINTFLOAT gmfptGlyphOrigin; + FLOAT gmfCellIncX; + FLOAT gmfCellIncY; +}; + typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT; + typedef struct _GLYPHMETRICSFLOAT *PGLYPHMETRICSFLOAT; + +typedef struct tagPIXELFORMATDESCRIPTOR { + WORD nSize; + WORD nVersion; + DWORD dwFlags; + BYTE iPixelType; + BYTE cColorBits; + BYTE cRedBits; + BYTE cRedShift; + BYTE cGreenBits; + BYTE cGreenShift; + BYTE cBlueBits; + BYTE cBlueShift; + BYTE cAlphaBits; + BYTE cAlphaShift; + BYTE cAccumBits; + BYTE cAccumRedBits; + BYTE cAccumGreenBits; + BYTE cAccumBlueBits; + BYTE cAccumAlphaBits; + BYTE cDepthBits; + BYTE cStencilBits; + BYTE cAuxBuffers; + BYTE iLayerType; + BYTE bReserved; + DWORD dwLayerMask; + DWORD dwVisibleMask; + DWORD dwDamageMask; +} PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR; + +PFD_DRAW_TO_WINDOW The buffer can draw to a window or device surface. +PFD_DRAW_TO_BITMAP The buffer can draw to a memory bitmap. +PFD_SUPPORT_GDI The buffer supports GDI drawing. This flag and PFD_DOUBLEBUFFER are mutually exclusive in the current generic implementation. +PFD_SUPPORT_OPENGL The buffer supports OpenGL drawing. +PFD_GENERIC_ACCELERATED The pixel format is supported by a device driver that accelerates the generic implementation. If this flag is clear and the PFD_GENERIC_FORMAT flag is set, the pixel format is supported by the generic implementation only. +PFD_GENERIC_FORMAT The pixel format is supported by the GDI software implementation, which is also known as the generic implementation. If this bit is clear, the pixel format is supported by a device driver or hardware. +PFD_NEED_PALETTE The buffer uses RGBA pixels on a palette-managed device. A logical palette is required to achieve the best results for this pixel type. Colors in the palette should be specified according to the values of the cRedBits, cRedShift, cGreenBits, cGreenShift, cBluebits, and cBlueShift members. The palette should be created and realized in the device context before calling wglMakeCurrent. +PFD_NEED_SYSTEM_PALETTE Defined in the pixel format descriptors of hardware that supports one hardware palette in 256-color mode only. For such systems to use hardware acceleration, the hardware palette must be in a fixed order (for example, 3-3-2) when in RGBA mode or must match the logical palette when in color-index mode. +PFD_DOUBLEBUFFER The buffer is double-buffered. This flag and PFD_SUPPORT_GDI are mutually exclusive in the current generic implementation. +PFD_STEREO The buffer is stereoscopic. This flag is not supported in the current generic implementation. +PFD_SWAP_LAYER_BUFFERS Indicates whether a device can swap individual layer planes with pixel formats that include double-buffered overlay or underlay planes. Otherwise all layer planes are swapped together as a group. When this flag is set, wglSwapLayerBuffers is supported. +PFD_DEPTH_DONTCARE The requested pixel format can either have or not have a depth buffer. To select a pixel format without a depth buffer, you must specify this flag. The requested pixel format can be with or without a depth buffer. Otherwise, only pixel formats with a depth buffer are considered. +PFD_DOUBLEBUFFER_DONTCARE The requested pixel format can be either single- or double-buffered. +PFD_STEREO_DONTCARE The requested pixel format can be either monoscopic or stereoscopic. +PFD_SWAP_COPY Specifies the content of the back buffer in the double-buffered main color plane following a buffer swap. Swapping the color buffers causes the content of the back buffer to be copied to the front buffer. The content of the back buffer is not affected by the swap. PFD_SWAP_COPY is a hint only and might not be provided by a driver. +PFD_SWAP_EXCHANGE Specifies the content of the back buffer in the double-buffered main color plane following a buffer swap. Swapping the color buffers causes the exchange of the back buffer's content with the front buffer's content. Following the swap, the back buffer's content contains the front buffer's content before the swap. PFD_SWAP_EXCHANGE is a hint only and might not be provided by a driver. +PFD_TYPE_RGBA RGBA pixels. Each pixel has four components in this order: red, green, blue, and alpha. +PFD_TYPE_COLORINDEX Color-index pixels. Each pixel uses a color-index value. +typedef struct tag_LAYERPLANEDESCRIPTOR { + WORD nSize; + WORD nVersion; + DWORD dwFlags; + BYTE iPixelType; + BYTE cColorBits; + BYTE cRedBits; + BYTE cRedShift; + BYTE cGreenBits; + BYTE cGreenShift; + BYTE cBlueBits; + BYTE cBlueShift; + BYTE cAlphaBits; + BYTE cAlphaShift; + BYTE cAccumBits; + BYTE cAccumRedBits; + BYTE cAccumGreenBits; + BYTE cAccumBlueBits; + BYTE cAccumAlphaBits; + BYTE cDepthBits; + BYTE cStencilBits; + BYTE cAuxBuffers; + BYTE iLayerType; + BYTE bReserved; + COLORREF crTransparent; +} LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR; +LPD_SUPPORT_OPENGL The layer plane supports OpenGL drawing. +LPD_SUPPORT_GDI The layer plane supports GDI drawing. The current implementation of OpenGL doesn't support this flag. +LPD_DOUBLEBUFFER The layer plane is double-buffered. A layer plane can be double-buffered even when the main plane is single-buffered and vice versa. +LPD_STEREO The layer plane is stereoscopic. A layer plane can be stereoscopic even when the main plane is monoscopic and vice versa. +LPD_SWAP_EXCHANGE In a double-buffered layer plane, swapping the color buffer exchanges the front buffer and back buffer contents. The back buffer then contains the contents of the front buffer before the swap. This flag is a hint only and might not be provided by a driver. +LPD_SWAP_COPY In a double-buffered layer plane, swapping the color buffer copies the back buffer contents to the front buffer. The swap does not affect the back buffer contents. This flag is a hint only and might not be provided by a driver. +LPD_TRANSPARENT The crTransparent member of this structure contains a transparent color or index value that enables underlying layers to show through this layer. All layer planes, except the lowest-numbered underlay layer, have a transparent color or index. +LPD_SHARE_DEPTH The layer plane shares the depth buffer with the main plane. +LPD_SHARE_STENCIL The layer plane shares the stencil buffer with the main plane. +LPD_SHARE_ACCUM The layer plane shares the accumulation buffer with the main plane. + +iPixelType +Specifies the type of pixel data. The following types are defined. +Value Meaning +LPD_TYPE_RGBA RGBA pixels. Each pixel has four components: red, green, blue, and alpha. +LPD_TYPE_COLORINDEX Color-index pixels. Each pixel uses a color-index value. + diff --git a/StgSharp.Graphics/Environment/Monitor.cs b/StgSharp.Graphics/Environment/Monitor.cs index a9557ecf..2f81a6bd 100644 --- a/StgSharp.Graphics/Environment/Monitor.cs +++ b/StgSharp.Graphics/Environment/Monitor.cs @@ -1,59 +1,59 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="Monitor" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Graphics -{ - public static class GraphicsEnvironment - { - - private static IntPtr[] _monitorsHandleArray; - - public static unsafe ReadOnlySpan MonitorsHandleArray - { - get - { - if (_monitorsHandleArray == null) - { - int count = 0; - IntPtr* arrayHandle = GraphicFramework.glfwGetMonitors(&count); - _monitorsHandleArray = new IntPtr[count]; - Marshal.Copy((IntPtr)arrayHandle, _monitorsHandleArray, 0, count); - Marshal.FreeHGlobal((IntPtr)arrayHandle); - } - return _monitorsHandleArray; - } - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="Monitor" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Graphics +{ + public static class GraphicsEnvironment + { + + private static IntPtr[] _monitorsHandleArray; + + public static unsafe ReadOnlySpan MonitorsHandleArray + { + get + { + if (_monitorsHandleArray == null) + { + int count = 0; + IntPtr* arrayHandle = GraphicFramework.glfwGetMonitors(&count); + _monitorsHandleArray = new IntPtr[count]; + Marshal.Copy((IntPtr)arrayHandle, _monitorsHandleArray, 0, count); + Marshal.FreeHGlobal((IntPtr)arrayHandle); + } + return _monitorsHandleArray; + } + } + + } +} diff --git a/StgSharp.Graphics/GraphicInitializer.cs b/StgSharp.Graphics/GraphicInitializer.cs index ab056672..a47753b5 100644 --- a/StgSharp.Graphics/GraphicInitializer.cs +++ b/StgSharp.Graphics/GraphicInitializer.cs @@ -1,58 +1,58 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="GraphicInitializer" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using System.Threading.Tasks; - -namespace StgSharp.Graphics -{ - public class GraphicModuel : IStaticModule - { - - public string ModuleName => "Graphics"; - - public void InitializeModule(IModuleInitializeProfile profile) - { - GraphicFramework.LoadGlfw(); - if (GraphicFramework.glfwInit() == 0) { - throw new Exception("Failed to init system graphic environment."); - } - } - - public void UninitializeModule() - { - GraphicFramework.glfwTerminate(); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="GraphicInitializer" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +using System.Threading.Tasks; + +namespace StgSharp.Graphics +{ + public class GraphicModuel : IStaticModule + { + + public string ModuleName => "Graphics"; + + public void InitializeModule(IModuleInitializeProfile profile) + { + GraphicFramework.LoadGlfw(); + if (GraphicFramework.glfwInit() == 0) { + throw new Exception("Failed to init system graphic environment."); + } + } + + public void UninitializeModule() + { + GraphicFramework.glfwTerminate(); + } + + } +} diff --git a/StgSharp.Graphics/Image.cs b/StgSharp.Graphics/Image.cs index b8dad4b4..6d40e265 100644 --- a/StgSharp.Graphics/Image.cs +++ b/StgSharp.Graphics/Image.cs @@ -1,187 +1,187 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="Image.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. -// -// ----------------------------------------------------------------------- -// ----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="Image.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.Graphics.OpenGL; -using System; -using System.Runtime.CompilerServices; - -namespace StgSharp.Graphics -{ - public class Image : IImageProvider - { - - private byte[] _data; - private ImageInfo _rawInfo; - private int _pixelUpdateCount = 0; - - internal unsafe Image() - { - _rawInfo = new ImageInfo(); - } - - internal Image(ImageInfo information) - { - _rawInfo = information; +using System; +using System.Runtime.CompilerServices; + +namespace StgSharp.Graphics +{ + public class Image : 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 (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. + /// + /// 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; - } - - 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 - }; - } - - } + 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; + } + + 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 + }; + } + + } } \ No newline at end of file diff --git a/StgSharp.Graphics/OpenGL/Buffer/TextureGL.cs b/StgSharp.Graphics/OpenGL/Buffer/TextureGL.cs index 39b25262..ff4187a0 100644 --- a/StgSharp.Graphics/OpenGL/Buffer/TextureGL.cs +++ b/StgSharp.Graphics/OpenGL/Buffer/TextureGL.cs @@ -1,276 +1,276 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="TextureGL" -// 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.Graphics; +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="TextureGL" +// 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.Graphics; using StgSharp.Mathematics; -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 - { - +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; + 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]); + public int IndexOfCurrentTexture + { + get => currentEditingTextureIndex; } - /// - /// Load an to certain texture. + 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, i.Width, i.Height, i.Channel, i.PixelLayout, - pixels:handle); - _gl.GenerateMipmap(Texture2DTarget.Texture2D); + public unsafe void LoadTexture(int index, Image i) + { + byte[] handle = i.PixelBuffer; + _gl.TextureImage2d(Texture2DTarget.Texture2D, 0, i.Channel, i.Width, 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) + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Set2dFilterProperty(int index, TextureFilter onMinify, TextureFilter onMagnify) { #if DEBUG - if (index != currentEditingTextureIndex) - { + if (index != currentEditingTextureIndex) + { throw new InvalidOperationException( - "Texture to be editted is not the one being activated."); + "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_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) + (int)onMagnify); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Set2dWrapProperty(int index, TextureWrap onHorizontial, TextureWrap onVertical) { #if DEBUG - if (index != currentEditingTextureIndex) - { + if (index != currentEditingTextureIndex) + { throw new InvalidOperationException( - "Texture to be editted is not the one being activated."); + "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); + (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; + } + + [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; + [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 static bool operator ==(TextureProperty left, TextureProperty right) - { - return left.mask == right.mask; + public TextureFilter FilterOnMagnify + { + get => mag; + set => mag = value; } - public static implicit operator TextureProperty( + 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); - } - + ) 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, - + { + + 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, - + { + + 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, - - } + { + + 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.Graphics/OpenGL/glApiManager.Load.cs b/StgSharp.Graphics/OpenGL/glApiManager.Load.cs index 8d09d27c..c4686dff 100644 --- a/StgSharp.Graphics/OpenGL/glApiManager.Load.cs +++ b/StgSharp.Graphics/OpenGL/glApiManager.Load.cs @@ -1,1589 +1,1589 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="glApiManager.Load" -// 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.Mathematics; -using System; -using System.Runtime.CompilerServices; - -namespace StgSharp.Graphics.OpenGL -{ - public static partial class glManager - { - - internal static unsafe bool LoadGLcore10( - glContextShadow* contextPtr, - delegate*, IntPtr> load) - { - if (!core10) - { - DefaultLog.InternalAppendLog("The core version 1.0 is not supported."); - return false; +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="glApiManager.Load" +// 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.Mathematics; +using System; +using System.Runtime.CompilerServices; + +namespace StgSharp.Graphics.OpenGL +{ + public static partial class glManager + { + + internal static unsafe bool LoadGLcore10( + glContextShadow* contextPtr, + delegate*, IntPtr> load) + { + if (!core10) + { + DefaultLog.InternalAppendLog("The core version 1.0 is not supported."); + return false; } #region load - contextPtr->glBlendFunc = LoadGLFunction(load, "glBlendFunc"u8); - contextPtr->glClear = LoadGLFunction(load, "glClear"u8); - contextPtr->glClearColor = LoadGLFunction(load, "glClearColor"u8); - contextPtr->glClearDepth = LoadGLFunction(load, "glClearDepth"u8); - contextPtr->glClearStencil = LoadGLFunction(load, "glClearStencil"u8); - contextPtr->glColorMask = LoadGLFunction(load, "glColorMask"u8); - contextPtr->glCullFace = LoadGLFunction(load, "glCullFace"u8); - contextPtr->glDepthFunc = LoadGLFunction(load, "glDepthFunc"u8); - contextPtr->glDepthMask = LoadGLFunction(load, "glDepthMask"u8); - contextPtr->glDepthRange = LoadGLFunction(load, "glDepthRange"u8); - contextPtr->glDisable = LoadGLFunction(load, "glDisable"u8); - contextPtr->glDrawBuffer = LoadGLFunction(load, "glDrawBuffer"u8); - contextPtr->glEnable = LoadGLFunction(load, "glEnable"u8); - contextPtr->glFinish = LoadGLFunction(load, "glFinish"u8); - contextPtr->glFlush = LoadGLFunction(load, "glFlush"u8); - contextPtr->glFrontFace = LoadGLFunction(load, "glFrontFace"u8); - contextPtr->glGetBooleanv = LoadGLFunction(load, "glGetBooleanv"u8); - contextPtr->glGetDoublev = LoadGLFunction(load, "glGetDoublev"u8); - contextPtr->glGetError = LoadGLFunction(load, "glGetError"u8); - contextPtr->glGetFloatv = LoadGLFunction(load, "glGetFloatv"u8); - contextPtr->glGetIntegerv = LoadGLFunction(load, "glGetIntegerv"u8); - contextPtr->glGetString = LoadGLFunction(load, "glGetString"u8); - contextPtr->glGetTexImage = LoadGLFunction(load, "glGetTexImage"u8); - contextPtr->glGetTexLevelParameterfv = LoadGLFunction(load, "glGetTexLevelParameterfv"u8); - contextPtr->glGetTexLevelParameteriv = LoadGLFunction(load, "glGetTexLevelParameteriv"u8); - contextPtr->glGetTexParameterfv = LoadGLFunction(load, "glGetTexParameterfv"u8); - contextPtr->glGetTexParameteriv = LoadGLFunction(load, "glGetTexParameteriv"u8); - contextPtr->glHint = LoadGLFunction(load, "glHint"u8); - contextPtr->glIsEnabled = LoadGLFunction(load, "glIsEnabled"u8); - contextPtr->glLineWidth = LoadGLFunction(load, "glLineWidth"u8); - contextPtr->glLogicOp = LoadGLFunction(load, "glLogicOp"u8); - contextPtr->glPixelStoref = LoadGLFunction(load, "glPixelStoref"u8); - contextPtr->glPixelStorei = LoadGLFunction(load, "glPixelStorei"u8); - contextPtr->glPointSize = LoadGLFunction(load, "glPointSize"u8); - contextPtr->glPolygonMode = LoadGLFunction(load, "glPolygonMode"u8); - contextPtr->glReadBuffer = LoadGLFunction(load, "glReadBuffer"u8); - contextPtr->glReadPixels = LoadGLFunction(load, "glReadPixels"u8); - contextPtr->glScissor = LoadGLFunction(load, "glScissor"u8); - contextPtr->glStencilFunc = LoadGLFunction(load, "glStencilFunc"u8); - contextPtr->glStencilMask = LoadGLFunction(load, "glStencilMask"u8); - contextPtr->glStencilOp = LoadGLFunction(load, "glStencilOp"u8); - contextPtr->glTexImage1D = LoadGLFunction(load, "glTexImage1D"u8); - contextPtr->glTexImage2D = LoadGLFunction(load, "glTexImage2D"u8); - contextPtr->glTexParameterf = LoadGLFunction(load, "glTexParameterf"u8); - contextPtr->glTexParameterfv = LoadGLFunction(load, "glTexParameterfv"u8); - contextPtr->glTexParameteri = LoadGLFunction(load, "glTexParameteri"u8); - contextPtr->glTexParameteriv = LoadGLFunction(load, "glTexParameteriv"u8); + contextPtr->glBlendFunc = LoadGLFunction(load, "glBlendFunc"u8); + contextPtr->glClear = LoadGLFunction(load, "glClear"u8); + contextPtr->glClearColor = LoadGLFunction(load, "glClearColor"u8); + contextPtr->glClearDepth = LoadGLFunction(load, "glClearDepth"u8); + contextPtr->glClearStencil = LoadGLFunction(load, "glClearStencil"u8); + contextPtr->glColorMask = LoadGLFunction(load, "glColorMask"u8); + contextPtr->glCullFace = LoadGLFunction(load, "glCullFace"u8); + contextPtr->glDepthFunc = LoadGLFunction(load, "glDepthFunc"u8); + contextPtr->glDepthMask = LoadGLFunction(load, "glDepthMask"u8); + contextPtr->glDepthRange = LoadGLFunction(load, "glDepthRange"u8); + contextPtr->glDisable = LoadGLFunction(load, "glDisable"u8); + contextPtr->glDrawBuffer = LoadGLFunction(load, "glDrawBuffer"u8); + contextPtr->glEnable = LoadGLFunction(load, "glEnable"u8); + contextPtr->glFinish = LoadGLFunction(load, "glFinish"u8); + contextPtr->glFlush = LoadGLFunction(load, "glFlush"u8); + contextPtr->glFrontFace = LoadGLFunction(load, "glFrontFace"u8); + contextPtr->glGetBooleanv = LoadGLFunction(load, "glGetBooleanv"u8); + contextPtr->glGetDoublev = LoadGLFunction(load, "glGetDoublev"u8); + contextPtr->glGetError = LoadGLFunction(load, "glGetError"u8); + contextPtr->glGetFloatv = LoadGLFunction(load, "glGetFloatv"u8); + contextPtr->glGetIntegerv = LoadGLFunction(load, "glGetIntegerv"u8); + contextPtr->glGetString = LoadGLFunction(load, "glGetString"u8); + contextPtr->glGetTexImage = LoadGLFunction(load, "glGetTexImage"u8); + contextPtr->glGetTexLevelParameterfv = LoadGLFunction(load, "glGetTexLevelParameterfv"u8); + contextPtr->glGetTexLevelParameteriv = LoadGLFunction(load, "glGetTexLevelParameteriv"u8); + contextPtr->glGetTexParameterfv = LoadGLFunction(load, "glGetTexParameterfv"u8); + contextPtr->glGetTexParameteriv = LoadGLFunction(load, "glGetTexParameteriv"u8); + contextPtr->glHint = LoadGLFunction(load, "glHint"u8); + contextPtr->glIsEnabled = LoadGLFunction(load, "glIsEnabled"u8); + contextPtr->glLineWidth = LoadGLFunction(load, "glLineWidth"u8); + contextPtr->glLogicOp = LoadGLFunction(load, "glLogicOp"u8); + contextPtr->glPixelStoref = LoadGLFunction(load, "glPixelStoref"u8); + contextPtr->glPixelStorei = LoadGLFunction(load, "glPixelStorei"u8); + contextPtr->glPointSize = LoadGLFunction(load, "glPointSize"u8); + contextPtr->glPolygonMode = LoadGLFunction(load, "glPolygonMode"u8); + contextPtr->glReadBuffer = LoadGLFunction(load, "glReadBuffer"u8); + contextPtr->glReadPixels = LoadGLFunction(load, "glReadPixels"u8); + contextPtr->glScissor = LoadGLFunction(load, "glScissor"u8); + contextPtr->glStencilFunc = LoadGLFunction(load, "glStencilFunc"u8); + contextPtr->glStencilMask = LoadGLFunction(load, "glStencilMask"u8); + contextPtr->glStencilOp = LoadGLFunction(load, "glStencilOp"u8); + contextPtr->glTexImage1D = LoadGLFunction(load, "glTexImage1D"u8); + contextPtr->glTexImage2D = LoadGLFunction(load, "glTexImage2D"u8); + contextPtr->glTexParameterf = LoadGLFunction(load, "glTexParameterf"u8); + contextPtr->glTexParameterfv = LoadGLFunction(load, "glTexParameterfv"u8); + contextPtr->glTexParameteri = LoadGLFunction(load, "glTexParameteri"u8); + contextPtr->glTexParameteriv = LoadGLFunction(load, "glTexParameteriv"u8); contextPtr->glViewport = LoadGLFunction(load, "glViewport"u8); #endregion load - DefaultLog.InternalAppendLog("Successfully load OpenGL 1.0 APIs"); - return true; - } - - internal static unsafe bool LoadGLcore11( - glContextShadow* contextPtr, - delegate*, IntPtr> load) - { - if (!core11) - { - DefaultLog.InternalAppendLog("The core version 1.1 is not supported."); - return false; + DefaultLog.InternalAppendLog("Successfully load OpenGL 1.0 APIs"); + return true; + } + + internal static unsafe bool LoadGLcore11( + glContextShadow* contextPtr, + delegate*, IntPtr> load) + { + if (!core11) + { + DefaultLog.InternalAppendLog("The core version 1.1 is not supported."); + return false; } #region load - contextPtr->glBindTexture = LoadGLFunction(load, "glBindTexture"u8); + contextPtr->glBindTexture = LoadGLFunction(load, "glBindTexture"u8); contextPtr->glCopyTexImage1D = LoadGLFunction(load, - "glCopyTexImage1D"u8); + "glCopyTexImage1D"u8); contextPtr->glCopyTexImage2D = LoadGLFunction(load, - "glCopyTexImage2D"u8); + "glCopyTexImage2D"u8); contextPtr->glCopyTexSubImage1D = LoadGLFunction(load, - "glCopyTexSubImage1D"u8); + "glCopyTexSubImage1D"u8); contextPtr->glCopyTexSubImage2D = LoadGLFunction(load, - "glCopyTexSubImage2D"u8); + "glCopyTexSubImage2D"u8); contextPtr->glDeleteTextures = LoadGLFunction(load, - "glDeleteTextures"u8); - contextPtr->glDrawArrays = LoadGLFunction(load, "glDrawArrays"u8); + "glDeleteTextures"u8); + contextPtr->glDrawArrays = LoadGLFunction(load, "glDrawArrays"u8); contextPtr->glDrawElements = LoadGLFunction(load, - "glDrawElements"u8); + "glDrawElements"u8); contextPtr->glGenTextures = LoadGLFunction(load, "glGenTextures"u8); // contextPtr->glGetPointerv =LoadGLFunction(load,"glGetPointerv"u8); - contextPtr->glIsTexture = LoadGLFunction(load, "glIsTexture"u8); - contextPtr->glPolygonOffset = LoadGLFunction(load, "glPolygonOffset"u8); + contextPtr->glIsTexture = LoadGLFunction(load, "glIsTexture"u8); + contextPtr->glPolygonOffset = LoadGLFunction(load, "glPolygonOffset"u8); contextPtr->glTexSubImage1D = LoadGLFunction(load, - "glTexSubImage1D"u8); + "glTexSubImage1D"u8); contextPtr->glTexSubImage2D = LoadGLFunction(load, "glTexSubImage2D"u8); #endregion load - DefaultLog.InternalAppendLog("Successfully load OpenGL 1.1 APIs"); - return true; - } - - internal static unsafe bool LoadGLcore12( - glContextShadow* contextPtr, - delegate*, IntPtr> load) - { - if (!core12) - { - DefaultLog.InternalAppendLog("The core version 1.2 is not supported."); - return false; + DefaultLog.InternalAppendLog("Successfully load OpenGL 1.1 APIs"); + return true; + } + + internal static unsafe bool LoadGLcore12( + glContextShadow* contextPtr, + delegate*, IntPtr> load) + { + if (!core12) + { + DefaultLog.InternalAppendLog("The core version 1.2 is not supported."); + return false; } #region load contextPtr->glCopyTexSubImage3D = LoadGLFunction(load, - "glCopyTexSubImage3D"u8); + "glCopyTexSubImage3D"u8); contextPtr->glDrawRangeElements = LoadGLFunction(load, - "glDrawRangeElements"u8); + "glDrawRangeElements"u8); contextPtr->glTexImage3D = LoadGLFunction(load, - "glTexImage3D"u8); + "glTexImage3D"u8); contextPtr->glTexSubImage3D = LoadGLFunction(load, "glTexSubImage3D"u8); #endregion load - DefaultLog.InternalAppendLog("Successfully load OpenGL 1.2 APIs"); - return true; - } - - internal static unsafe bool LoadGLcore13( - glContextShadow* contextPtr, - delegate*, IntPtr> load) - { - if (!core13) - { - DefaultLog.InternalAppendLog("The core version 1.3 is not supported."); - return false; + DefaultLog.InternalAppendLog("Successfully load OpenGL 1.2 APIs"); + return true; + } + + internal static unsafe bool LoadGLcore13( + glContextShadow* contextPtr, + delegate*, IntPtr> load) + { + if (!core13) + { + DefaultLog.InternalAppendLog("The core version 1.3 is not supported."); + return false; } #region load - contextPtr->glActiveTexture = LoadGLFunction(load, "glActiveTexture"u8); + contextPtr->glActiveTexture = LoadGLFunction(load, "glActiveTexture"u8); contextPtr->glCompressedTexImage1D = LoadGLFunction(load, - "glCompressedTexImage1D"u8); + "glCompressedTexImage1D"u8); contextPtr->glCompressedTexImage2D = LoadGLFunction(load, - "glCompressedTexImage2D"u8); + "glCompressedTexImage2D"u8); contextPtr->glCompressedTexImage3D = LoadGLFunction(load, - "glCompressedTexImage3D"u8); + "glCompressedTexImage3D"u8); contextPtr->glCompressedTexSubImage1D = LoadGLFunction(load, - "glCompressedTexSubImage1D"u8); + "glCompressedTexSubImage1D"u8); contextPtr->glCompressedTexSubImage2D = LoadGLFunction(load, - "glCompressedTexSubImage2D"u8); + "glCompressedTexSubImage2D"u8); contextPtr->glCompressedTexSubImage3D = LoadGLFunction(load, - "glCompressedTexSubImage3D"u8); + "glCompressedTexSubImage3D"u8); contextPtr->glGetCompressedTexImage = LoadGLFunction(load, - "glGetCompressedTexImage"u8); + "glGetCompressedTexImage"u8); contextPtr->glSampleCoverage = LoadGLFunction(load, "glSampleCoverage"u8); #endregion load - DefaultLog.InternalAppendLog("Successfully load OpenGL 1.3 APIs"); - return true; - } - - internal static unsafe bool LoadGLcore14( - glContextShadow* contextPtr, - delegate*, IntPtr> load) - { - if (!core14) - { - DefaultLog.InternalAppendLog("The core version 1.4 is not supported."); - return false; + DefaultLog.InternalAppendLog("Successfully load OpenGL 1.3 APIs"); + return true; + } + + internal static unsafe bool LoadGLcore14( + glContextShadow* contextPtr, + delegate*, IntPtr> load) + { + if (!core14) + { + DefaultLog.InternalAppendLog("The core version 1.4 is not supported."); + return false; } #region load contextPtr->glBlendColor = LoadGLFunction(load, - "glBlendColor"u8); - contextPtr->glBlendEquation = LoadGLFunction(load, "glBlendEquation"u8); + "glBlendColor"u8); + contextPtr->glBlendEquation = LoadGLFunction(load, "glBlendEquation"u8); contextPtr->glBlendFuncSeparate = LoadGLFunction(load, - "glBlendFuncSeparate"u8); + "glBlendFuncSeparate"u8); contextPtr->glMultiDrawArrays = LoadGLFunction(load, - "glMultiDrawArrays"u8); + "glMultiDrawArrays"u8); contextPtr->glMultiDrawElements = LoadGLFunction(load, - "glMultiDrawElements"u8); + "glMultiDrawElements"u8); contextPtr->glPointParameterf = LoadGLFunction(load, - "glPointParameterf"u8); + "glPointParameterf"u8); contextPtr->glPointParameterfv = LoadGLFunction(load, - "glPointParameterfv"u8); + "glPointParameterfv"u8); contextPtr->glPointParameteri = LoadGLFunction(load, - "glPointParameteri"u8); + "glPointParameteri"u8); contextPtr->glPointParameteriv = LoadGLFunction(load, "glPointParameteriv"u8); #endregion load - DefaultLog.InternalAppendLog("Successfully load OpenGL 1.4 APIs"); - return true; - } - - internal static unsafe bool LoadGLcore15( - glContextShadow* contextPtr, - delegate*, IntPtr> load) - { - if (!core15) - { - DefaultLog.InternalAppendLog("The core version 1.5 is not supported."); - return false; + DefaultLog.InternalAppendLog("Successfully load OpenGL 1.4 APIs"); + return true; + } + + internal static unsafe bool LoadGLcore15( + glContextShadow* contextPtr, + delegate*, IntPtr> load) + { + if (!core15) + { + DefaultLog.InternalAppendLog("The core version 1.5 is not supported."); + return false; } #region load - contextPtr->glBeginQuery = LoadGLFunction(load, "glBeginQuery"u8); - contextPtr->glBindBuffer = LoadGLFunction(load, "glBindBuffer"u8); + contextPtr->glBeginQuery = LoadGLFunction(load, "glBeginQuery"u8); + contextPtr->glBindBuffer = LoadGLFunction(load, "glBindBuffer"u8); contextPtr->glBufferData = LoadGLFunction(load, - "glBufferData"u8); + "glBufferData"u8); contextPtr->glBufferSubData = LoadGLFunction(load, - "glBufferSubData"u8); - contextPtr->glDeleteBuffers = LoadGLFunction(load, "glDeleteBuffers"u8); - contextPtr->glDeleteQueries = LoadGLFunction(load, "glDeleteQueries"u8); - contextPtr->glEndQuery = LoadGLFunction(load, "glEndQuery"u8); - contextPtr->glGenBuffers = LoadGLFunction(load, "glGenBuffers"u8); - contextPtr->glGenQueries = LoadGLFunction(load, "glGenQueries"u8); + "glBufferSubData"u8); + contextPtr->glDeleteBuffers = LoadGLFunction(load, "glDeleteBuffers"u8); + contextPtr->glDeleteQueries = LoadGLFunction(load, "glDeleteQueries"u8); + contextPtr->glEndQuery = LoadGLFunction(load, "glEndQuery"u8); + contextPtr->glGenBuffers = LoadGLFunction(load, "glGenBuffers"u8); + contextPtr->glGenQueries = LoadGLFunction(load, "glGenQueries"u8); contextPtr->glGetBufferParameteriv = LoadGLFunction(load, - "glGetBufferParameteriv"u8); + "glGetBufferParameteriv"u8); contextPtr->glGetBufferPointerv = LoadGLFunction(load, - "glGetBufferPointerv"u8); + "glGetBufferPointerv"u8); contextPtr->glGetBufferSubData = LoadGLFunction(load, - "glGetBufferSubData"u8); + "glGetBufferSubData"u8); contextPtr->glGetQueryObjectiv = LoadGLFunction(load, - "glGetQueryObjectiv"u8); + "glGetQueryObjectiv"u8); contextPtr->glGetQueryObjectuiv = LoadGLFunction(load, - "glGetQueryObjectuiv"u8); - contextPtr->glGetQueryiv = LoadGLFunction(load, "glGetQueryiv"u8); - contextPtr->glIsBuffer = LoadGLFunction(load, "glIsBuffer"u8); - contextPtr->glIsQuery = LoadGLFunction(load, "glIsQuery"u8); - contextPtr->glMapBuffer = LoadGLFunction(load, "glMapBuffer"u8); + "glGetQueryObjectuiv"u8); + contextPtr->glGetQueryiv = LoadGLFunction(load, "glGetQueryiv"u8); + contextPtr->glIsBuffer = LoadGLFunction(load, "glIsBuffer"u8); + contextPtr->glIsQuery = LoadGLFunction(load, "glIsQuery"u8); + contextPtr->glMapBuffer = LoadGLFunction(load, "glMapBuffer"u8); contextPtr->glUnmapBuffer = LoadGLFunction(load, "glUnmapBuffer"u8); #endregion load - DefaultLog.InternalAppendLog("Successfully load OpenGL 1.5 APIs"); - return true; - } - - internal static unsafe bool LoadGLcore20( - glContextShadow* contextPtr, - delegate*, IntPtr> load) - { - if (!core20) - { - DefaultLog.InternalAppendLog("The core version 2.0 is not supported."); - return false; + DefaultLog.InternalAppendLog("Successfully load OpenGL 1.5 APIs"); + return true; + } + + internal static unsafe bool LoadGLcore20( + glContextShadow* contextPtr, + delegate*, IntPtr> load) + { + if (!core20) + { + DefaultLog.InternalAppendLog("The core version 2.0 is not supported."); + return false; } #region load - contextPtr->glAttachShader = LoadGLFunction(load, "glAttachShader"u8); + contextPtr->glAttachShader = LoadGLFunction(load, "glAttachShader"u8); contextPtr->glBindAttribLocation = LoadGLFunction(load, - "glBindAttribLocation"u8); + "glBindAttribLocation"u8); contextPtr->glBlendEquationSeparate = LoadGLFunction(load, - "glBlendEquationSeparate"u8); - contextPtr->glCompileShader = LoadGLFunction(load, "glCompileShader"u8); - contextPtr->glCreateProgram = LoadGLFunction(load, "glCreateProgram"u8); - contextPtr->glCreateShader = LoadGLFunction(load, "glCreateShader"u8); - contextPtr->glDeleteProgram = LoadGLFunction(load, "glDeleteProgram"u8); - contextPtr->glDeleteShader = LoadGLFunction(load, "glDeleteShader"u8); - contextPtr->glDetachShader = LoadGLFunction(load, "glDetachShader"u8); + "glBlendEquationSeparate"u8); + contextPtr->glCompileShader = LoadGLFunction(load, "glCompileShader"u8); + contextPtr->glCreateProgram = LoadGLFunction(load, "glCreateProgram"u8); + contextPtr->glCreateShader = LoadGLFunction(load, "glCreateShader"u8); + contextPtr->glDeleteProgram = LoadGLFunction(load, "glDeleteProgram"u8); + contextPtr->glDeleteShader = LoadGLFunction(load, "glDeleteShader"u8); + contextPtr->glDetachShader = LoadGLFunction(load, "glDetachShader"u8); contextPtr->glDisableVertexAttribArray = LoadGLFunction(load, - "glDisableVertexAttribArray"u8); - contextPtr->glDrawBuffers = LoadGLFunction(load, "glDrawBuffers"u8); + "glDisableVertexAttribArray"u8); + contextPtr->glDrawBuffers = LoadGLFunction(load, "glDrawBuffers"u8); contextPtr->glEnableVertexAttribArray = LoadGLFunction(load, - "glEnableVertexAttribArray"u8); + "glEnableVertexAttribArray"u8); contextPtr->glGetActiveAttrib = LoadGLFunction(load, - "glGetActiveAttrib"u8); + "glGetActiveAttrib"u8); contextPtr->glGetActiveUniform = LoadGLFunction(load, - "glGetActiveUniform"u8); + "glGetActiveUniform"u8); contextPtr->glGetAttachedShaders = LoadGLFunction(load, - "glGetAttachedShaders"u8); + "glGetAttachedShaders"u8); contextPtr->glGetAttribLocation = LoadGLFunction(load, - "glGetAttribLocation"u8); + "glGetAttribLocation"u8); contextPtr->glGetProgramInfoLog = LoadGLFunction(load, - "glGetProgramInfoLog"u8); + "glGetProgramInfoLog"u8); contextPtr->glGetProgramiv = LoadGLFunction(load, - "glGetProgramiv"u8); + "glGetProgramiv"u8); contextPtr->glGetShaderInfoLog = LoadGLFunction(load, - "glGetShaderInfoLog"u8); + "glGetShaderInfoLog"u8); contextPtr->glGetShaderSource = LoadGLFunction(load, - "glGetShaderSource"u8); - contextPtr->glGetShaderiv = LoadGLFunction(load, "glGetShaderiv"u8); + "glGetShaderSource"u8); + contextPtr->glGetShaderiv = LoadGLFunction(load, "glGetShaderiv"u8); contextPtr->glGetUniformLocation = LoadGLFunction(load, - "glGetUniformLocation"u8); + "glGetUniformLocation"u8); contextPtr->glGetUniformfv = LoadGLFunction(load, - "glGetUniformfv"u8); + "glGetUniformfv"u8); contextPtr->glGetUniformiv = LoadGLFunction(load, - "glGetUniformiv"u8); + "glGetUniformiv"u8); contextPtr->glGetVertexAttribPointerv = LoadGLFunction(load, - "glGetVertexAttribPointerv"u8); + "glGetVertexAttribPointerv"u8); contextPtr->glGetVertexAttribdv = LoadGLFunction(load, - "glGetVertexAttribdv"u8); + "glGetVertexAttribdv"u8); contextPtr->glGetVertexAttribfv = LoadGLFunction(load, - "glGetVertexAttribfv"u8); + "glGetVertexAttribfv"u8); contextPtr->glGetVertexAttribiv = LoadGLFunction(load, - "glGetVertexAttribiv"u8); - contextPtr->glIsProgram = LoadGLFunction(load, "glIsProgram"u8); - contextPtr->glIsShader = LoadGLFunction(load, "glIsShader"u8); - contextPtr->glLinkProgram = LoadGLFunction(load, "glLinkProgram"u8); + "glGetVertexAttribiv"u8); + contextPtr->glIsProgram = LoadGLFunction(load, "glIsProgram"u8); + contextPtr->glIsShader = LoadGLFunction(load, "glIsShader"u8); + contextPtr->glLinkProgram = LoadGLFunction(load, "glLinkProgram"u8); contextPtr->glShaderSource = LoadGLFunction(load, - "glShaderSource"u8); + "glShaderSource"u8); contextPtr->glStencilFuncSeparate = LoadGLFunction(load, - "glStencilFuncSeparate"u8); + "glStencilFuncSeparate"u8); contextPtr->glStencilMaskSeparate = LoadGLFunction(load, - "glStencilMaskSeparate"u8); + "glStencilMaskSeparate"u8); contextPtr->glStencilOpSeparate = LoadGLFunction(load, - "glStencilOpSeparate"u8); - contextPtr->glUniform1f = LoadGLFunction(load, "glUniform1f"u8); - contextPtr->glUniform1fv = LoadGLFunction(load, "glUniform1fv"u8); - contextPtr->glUniform1i = LoadGLFunction(load, "glUniform1i"u8); - contextPtr->glUniform1iv = LoadGLFunction(load, "glUniform1iv"u8); - contextPtr->glUniform2f = LoadGLFunction(load, "glUniform2f"u8); - contextPtr->glUniform2fv = LoadGLFunction(load, "glUniform2fv"u8); - contextPtr->glUniform2i = LoadGLFunction(load, "glUniform2i"u8); - contextPtr->glUniform2iv = LoadGLFunction(load, "glUniform2iv"u8); + "glStencilOpSeparate"u8); + contextPtr->glUniform1f = LoadGLFunction(load, "glUniform1f"u8); + contextPtr->glUniform1fv = LoadGLFunction(load, "glUniform1fv"u8); + contextPtr->glUniform1i = LoadGLFunction(load, "glUniform1i"u8); + contextPtr->glUniform1iv = LoadGLFunction(load, "glUniform1iv"u8); + contextPtr->glUniform2f = LoadGLFunction(load, "glUniform2f"u8); + contextPtr->glUniform2fv = LoadGLFunction(load, "glUniform2fv"u8); + contextPtr->glUniform2i = LoadGLFunction(load, "glUniform2i"u8); + contextPtr->glUniform2iv = LoadGLFunction(load, "glUniform2iv"u8); contextPtr->glUniform3f = LoadGLFunction(load, - "glUniform3f"u8); - contextPtr->glUniform3fv = LoadGLFunction(load, "glUniform3fv"u8); - contextPtr->glUniform3i = LoadGLFunction(load, "glUniform3i"u8); - contextPtr->glUniform3iv = LoadGLFunction(load, "glUniform3iv"u8); + "glUniform3f"u8); + contextPtr->glUniform3fv = LoadGLFunction(load, "glUniform3fv"u8); + contextPtr->glUniform3i = LoadGLFunction(load, "glUniform3i"u8); + contextPtr->glUniform3iv = LoadGLFunction(load, "glUniform3iv"u8); contextPtr->glUniform4f = LoadGLFunction(load, - "glUniform4f"u8); - contextPtr->glUniform4fv = LoadGLFunction(load, "glUniform4fv"u8); + "glUniform4f"u8); + contextPtr->glUniform4fv = LoadGLFunction(load, "glUniform4fv"u8); contextPtr->glUniform4i = LoadGLFunction(load, - "glUniform4i"u8); - contextPtr->glUniform4iv = LoadGLFunction(load, "glUniform4iv"u8); + "glUniform4i"u8); + contextPtr->glUniform4iv = LoadGLFunction(load, "glUniform4iv"u8); contextPtr->glUniformMatrix2fv = LoadGLFunction(load, - "glUniformMatrix2fv"u8); + "glUniformMatrix2fv"u8); contextPtr->glUniformMatrix3fv = LoadGLFunction(load, - "glUniformMatrix3fv"u8); + "glUniformMatrix3fv"u8); contextPtr->glUniformMatrix4fv = LoadGLFunction(load, - "glUniformMatrix4fv"u8); - contextPtr->glUseProgram = LoadGLFunction(load, "glUseProgram"u8); - contextPtr->glValidateProgram = LoadGLFunction(load, "glValidateProgram"u8); + "glUniformMatrix4fv"u8); + contextPtr->glUseProgram = LoadGLFunction(load, "glUseProgram"u8); + contextPtr->glValidateProgram = LoadGLFunction(load, "glValidateProgram"u8); contextPtr->glVertexAttrib1d = LoadGLFunction(load, - "glVertexAttrib1d"u8); + "glVertexAttrib1d"u8); contextPtr->glVertexAttrib1dv = LoadGLFunction(load, - "glVertexAttrib1dv"u8); + "glVertexAttrib1dv"u8); contextPtr->glVertexAttrib1f = LoadGLFunction(load, - "glVertexAttrib1f"u8); + "glVertexAttrib1f"u8); contextPtr->glVertexAttrib1fv = LoadGLFunction(load, - "glVertexAttrib1fv"u8); + "glVertexAttrib1fv"u8); contextPtr->glVertexAttrib1s = LoadGLFunction(load, - "glVertexAttrib1s"u8); + "glVertexAttrib1s"u8); contextPtr->glVertexAttrib1sv = LoadGLFunction(load, - "glVertexAttrib1sv"u8); + "glVertexAttrib1sv"u8); contextPtr->glVertexAttrib2d = LoadGLFunction(load, - "glVertexAttrib2d"u8); + "glVertexAttrib2d"u8); contextPtr->glVertexAttrib2dv = LoadGLFunction(load, - "glVertexAttrib2dv"u8); + "glVertexAttrib2dv"u8); contextPtr->glVertexAttrib2f = LoadGLFunction(load, - "glVertexAttrib2f"u8); + "glVertexAttrib2f"u8); contextPtr->glVertexAttrib2fv = LoadGLFunction(load, - "glVertexAttrib2fv"u8); + "glVertexAttrib2fv"u8); contextPtr->glVertexAttrib2s = LoadGLFunction(load, - "glVertexAttrib2s"u8); + "glVertexAttrib2s"u8); contextPtr->glVertexAttrib2sv = LoadGLFunction(load, - "glVertexAttrib2sv"u8); + "glVertexAttrib2sv"u8); contextPtr->glVertexAttrib3d = LoadGLFunction(load, - "glVertexAttrib3d"u8); + "glVertexAttrib3d"u8); contextPtr->glVertexAttrib3dv = LoadGLFunction(load, - "glVertexAttrib3dv"u8); + "glVertexAttrib3dv"u8); contextPtr->glVertexAttrib3f = LoadGLFunction(load, - "glVertexAttrib3f"u8); + "glVertexAttrib3f"u8); contextPtr->glVertexAttrib3fv = LoadGLFunction(load, - "glVertexAttrib3fv"u8); + "glVertexAttrib3fv"u8); contextPtr->glVertexAttrib3s = LoadGLFunction(load, - "glVertexAttrib3s"u8); + "glVertexAttrib3s"u8); contextPtr->glVertexAttrib3sv = LoadGLFunction(load, - "glVertexAttrib3sv"u8); + "glVertexAttrib3sv"u8); contextPtr->glVertexAttrib4Nbv = LoadGLFunction(load, - "glVertexAttrib4Nbv"u8); + "glVertexAttrib4Nbv"u8); contextPtr->glVertexAttrib4Niv = LoadGLFunction(load, - "glVertexAttrib4Niv"u8); + "glVertexAttrib4Niv"u8); contextPtr->glVertexAttrib4Nsv = LoadGLFunction(load, - "glVertexAttrib4Nsv"u8); + "glVertexAttrib4Nsv"u8); contextPtr->glVertexAttrib4Nub = LoadGLFunction(load, - "glVertexAttrib4Nub"u8); + "glVertexAttrib4Nub"u8); contextPtr->glVertexAttrib4Nubv = LoadGLFunction(load, - "glVertexAttrib4Nubv"u8); + "glVertexAttrib4Nubv"u8); contextPtr->glVertexAttrib4Nuiv = LoadGLFunction(load, - "glVertexAttrib4Nuiv"u8); + "glVertexAttrib4Nuiv"u8); contextPtr->glVertexAttrib4Nusv = LoadGLFunction(load, - "glVertexAttrib4Nusv"u8); + "glVertexAttrib4Nusv"u8); contextPtr->glVertexAttrib4bv = LoadGLFunction(load, - "glVertexAttrib4bv"u8); + "glVertexAttrib4bv"u8); contextPtr->glVertexAttrib4d = LoadGLFunction(load, - "glVertexAttrib4d"u8); + "glVertexAttrib4d"u8); contextPtr->glVertexAttrib4dv = LoadGLFunction(load, - "glVertexAttrib4dv"u8); + "glVertexAttrib4dv"u8); contextPtr->glVertexAttrib4f = LoadGLFunction(load, - "glVertexAttrib4f"u8); + "glVertexAttrib4f"u8); contextPtr->glVertexAttrib4fv = LoadGLFunction(load, - "glVertexAttrib4fv"u8); + "glVertexAttrib4fv"u8); contextPtr->glVertexAttrib4iv = LoadGLFunction(load, - "glVertexAttrib4iv"u8); + "glVertexAttrib4iv"u8); contextPtr->glVertexAttrib4s = LoadGLFunction(load, - "glVertexAttrib4s"u8); + "glVertexAttrib4s"u8); contextPtr->glVertexAttrib4sv = LoadGLFunction(load, - "glVertexAttrib4sv"u8); + "glVertexAttrib4sv"u8); contextPtr->glVertexAttrib4ubv = LoadGLFunction(load, - "glVertexAttrib4ubv"u8); + "glVertexAttrib4ubv"u8); contextPtr->glVertexAttrib4uiv = LoadGLFunction(load, - "glVertexAttrib4uiv"u8); + "glVertexAttrib4uiv"u8); contextPtr->glVertexAttrib4usv = LoadGLFunction(load, - "glVertexAttrib4usv"u8); + "glVertexAttrib4usv"u8); contextPtr->glVertexAttribPointer = LoadGLFunction(load, "glVertexAttribPointer"u8); #endregion load - DefaultLog.InternalAppendLog("Successfully load OpenGL 2.0 APIs"); - return true; - } - - internal static unsafe bool LoadGLcore21( - glContextShadow* contextPtr, - delegate*, IntPtr> load) - { - if (!core21) - { - DefaultLog.InternalAppendLog("The core version 2.1 is not supported."); - return false; + DefaultLog.InternalAppendLog("Successfully load OpenGL 2.0 APIs"); + return true; + } + + internal static unsafe bool LoadGLcore21( + glContextShadow* contextPtr, + delegate*, IntPtr> load) + { + if (!core21) + { + DefaultLog.InternalAppendLog("The core version 2.1 is not supported."); + return false; } #region load contextPtr->glUniformMatrix2x3fv = LoadGLFunction(load, - "glUniformMatrix2x3fv"u8); + "glUniformMatrix2x3fv"u8); contextPtr->glUniformMatrix2x4fv = LoadGLFunction(load, - "glUniformMatrix2x4fv"u8); + "glUniformMatrix2x4fv"u8); contextPtr->glUniformMatrix3x2fv = LoadGLFunction(load, - "glUniformMatrix3x2fv"u8); + "glUniformMatrix3x2fv"u8); contextPtr->glUniformMatrix3x4fv = LoadGLFunction(load, - "glUniformMatrix3x4fv"u8); + "glUniformMatrix3x4fv"u8); contextPtr->glUniformMatrix4x2fv = LoadGLFunction(load, - "glUniformMatrix4x2fv"u8); + "glUniformMatrix4x2fv"u8); contextPtr->glUniformMatrix4x3fv = LoadGLFunction(load, "glUniformMatrix4x3fv"u8); #endregion load - DefaultLog.InternalAppendLog("Successfully load OpenGL 2.1 APIs"); - return true; - } - - internal static unsafe bool LoadGLcore30( - glContextShadow* contextPtr, - delegate*, IntPtr> load) - { - if (!core30) - { - DefaultLog.InternalAppendLog("The core version 3.0 is not supported."); - return false; + DefaultLog.InternalAppendLog("Successfully load OpenGL 2.1 APIs"); + return true; + } + + internal static unsafe bool LoadGLcore30( + glContextShadow* contextPtr, + delegate*, IntPtr> load) + { + if (!core30) + { + DefaultLog.InternalAppendLog("The core version 3.0 is not supported."); + return false; } #region load contextPtr->glBeginConditionalRender = LoadGLFunction(load, - "glBeginConditionalRender"u8); + "glBeginConditionalRender"u8); contextPtr->glBeginTransformFeedback = LoadGLFunction(load, - "glBeginTransformFeedback"u8); + "glBeginTransformFeedback"u8); contextPtr->glBindBufferBase = LoadGLFunction(load, - "glBindBufferBase"u8); + "glBindBufferBase"u8); contextPtr->glBindBufferRange = LoadGLFunction(load, - "glBindBufferRange"u8); + "glBindBufferRange"u8); contextPtr->glBindFragDataLocation = LoadGLFunction(load, - "glBindFragDataLocation"u8); + "glBindFragDataLocation"u8); contextPtr->glBindFramebuffer = LoadGLFunction(load, - "glBindFramebuffer"u8); + "glBindFramebuffer"u8); contextPtr->glBindRenderbuffer = LoadGLFunction(load, - "glBindRenderbuffer"u8); - contextPtr->glBindVertexArray = LoadGLFunction(load, "glBindVertexArray"u8); + "glBindRenderbuffer"u8); + contextPtr->glBindVertexArray = LoadGLFunction(load, "glBindVertexArray"u8); contextPtr->glBlitFramebuffer = LoadGLFunction(load, - "glBlitFramebuffer"u8); + "glBlitFramebuffer"u8); contextPtr->glCheckFramebufferStatus = LoadGLFunction(load, - "glCheckFramebufferStatus"u8); - contextPtr->glClampColor = LoadGLFunction(load, "glClampColor"u8); + "glCheckFramebufferStatus"u8); + contextPtr->glClampColor = LoadGLFunction(load, "glClampColor"u8); contextPtr->glClearBufferfi = LoadGLFunction(load, - "glClearBufferfi"u8); + "glClearBufferfi"u8); contextPtr->glClearBufferfv = LoadGLFunction(load, - "glClearBufferfv"u8); + "glClearBufferfv"u8); contextPtr->glClearBufferiv = LoadGLFunction(load, - "glClearBufferiv"u8); + "glClearBufferiv"u8); contextPtr->glClearBufferuiv = LoadGLFunction(load, - "glClearBufferuiv"u8); + "glClearBufferuiv"u8); contextPtr->glColorMaski = LoadGLFunction(load, - "glColorMaski"u8); + "glColorMaski"u8); contextPtr->glDeleteFramebuffers = LoadGLFunction(load, - "glDeleteFramebuffers"u8); + "glDeleteFramebuffers"u8); contextPtr->glDeleteRenderbuffers = LoadGLFunction(load, - "glDeleteRenderbuffers"u8); + "glDeleteRenderbuffers"u8); contextPtr->glDeleteVertexArrays = LoadGLFunction(load, - "glDeleteVertexArrays"u8); - contextPtr->glDisablei = LoadGLFunction(load, "glDisablei"u8); - contextPtr->glEnablei = LoadGLFunction(load, "glEnablei"u8); - contextPtr->glEndConditionalRender = LoadGLFunction(load, "glEndConditionalRender"u8); - contextPtr->glEndTransformFeedback = LoadGLFunction(load, "glEndTransformFeedback"u8); + "glDeleteVertexArrays"u8); + contextPtr->glDisablei = LoadGLFunction(load, "glDisablei"u8); + contextPtr->glEnablei = LoadGLFunction(load, "glEnablei"u8); + contextPtr->glEndConditionalRender = LoadGLFunction(load, "glEndConditionalRender"u8); + contextPtr->glEndTransformFeedback = LoadGLFunction(load, "glEndTransformFeedback"u8); contextPtr->glFlushMappedBufferRange = LoadGLFunction(load, - "glFlushMappedBufferRange"u8); + "glFlushMappedBufferRange"u8); contextPtr->glFramebufferRenderbuffer = LoadGLFunction(load, - "glFramebufferRenderbuffer"u8); + "glFramebufferRenderbuffer"u8); contextPtr->glFramebufferTexture1D = LoadGLFunction(load, - "glFramebufferTexture1D"u8); + "glFramebufferTexture1D"u8); contextPtr->glFramebufferTexture2D = LoadGLFunction(load, - "glFramebufferTexture2D"u8); + "glFramebufferTexture2D"u8); contextPtr->glFramebufferTexture3D = LoadGLFunction(load, - "glFramebufferTexture3D"u8); + "glFramebufferTexture3D"u8); contextPtr->glFramebufferTextureLayer = LoadGLFunction(load, - "glFramebufferTextureLayer"u8); + "glFramebufferTextureLayer"u8); contextPtr->glGenFramebuffers = LoadGLFunction(load, - "glGenFramebuffers"u8); + "glGenFramebuffers"u8); contextPtr->glGenRenderbuffers = LoadGLFunction(load, - "glGenRenderbuffers"u8); + "glGenRenderbuffers"u8); contextPtr->glGenVertexArrays = LoadGLFunction(load, - "glGenVertexArrays"u8); - contextPtr->glGenerateMipmap = LoadGLFunction(load, "glGenerateMipmap"u8); + "glGenVertexArrays"u8); + contextPtr->glGenerateMipmap = LoadGLFunction(load, "glGenerateMipmap"u8); contextPtr->glGetBooleani_v = LoadGLFunction(load, - "glGetBooleani_v"u8); + "glGetBooleani_v"u8); contextPtr->glGetFragDataLocation = LoadGLFunction(load, - "glGetFragDataLocation"u8); + "glGetFragDataLocation"u8); contextPtr->glGetFramebufferAttachmentParameteriv = LoadGLFunction(load, - "glGetFramebufferAttachmentParameteriv"u8); + "glGetFramebufferAttachmentParameteriv"u8); contextPtr->glGetIntegeri_v = LoadGLFunction(load, - "glGetIntegeri_v"u8); + "glGetIntegeri_v"u8); contextPtr->glGetRenderbufferParameteriv = LoadGLFunction(load, - "glGetRenderbufferParameteriv"u8); - contextPtr->glGetStringi = LoadGLFunction(load, "glGetStringi"u8); + "glGetRenderbufferParameteriv"u8); + contextPtr->glGetStringi = LoadGLFunction(load, "glGetStringi"u8); contextPtr->glGetTexParameterIiv = LoadGLFunction(load, - "glGetTexParameterIiv"u8); + "glGetTexParameterIiv"u8); contextPtr->glGetTexParameterIuiv = LoadGLFunction(load, - "glGetTexParameterIuiv"u8); + "glGetTexParameterIuiv"u8); contextPtr->glGetTransformFeedbackVarying = LoadGLFunction(load, - "glGetTransformFeedbackVarying"u8); + "glGetTransformFeedbackVarying"u8); contextPtr->glGetUniformuiv = LoadGLFunction(load, - "glGetUniformuiv"u8); + "glGetUniformuiv"u8); contextPtr->glGetVertexAttribIiv = LoadGLFunction(load, - "glGetVertexAttribIiv"u8); + "glGetVertexAttribIiv"u8); contextPtr->glGetVertexAttribIuiv = LoadGLFunction(load, - "glGetVertexAttribIuiv"u8); - contextPtr->glIsEnabledi = LoadGLFunction(load, "glIsEnabledi"u8); - contextPtr->glIsFramebuffer = LoadGLFunction(load, "glIsFramebuffer"u8); - contextPtr->glIsRenderbuffer = LoadGLFunction(load, "glIsRenderbuffer"u8); - contextPtr->glIsVertexArray = LoadGLFunction(load, "glIsVertexArray"u8); + "glGetVertexAttribIuiv"u8); + contextPtr->glIsEnabledi = LoadGLFunction(load, "glIsEnabledi"u8); + contextPtr->glIsFramebuffer = LoadGLFunction(load, "glIsFramebuffer"u8); + contextPtr->glIsRenderbuffer = LoadGLFunction(load, "glIsRenderbuffer"u8); + contextPtr->glIsVertexArray = LoadGLFunction(load, "glIsVertexArray"u8); contextPtr->glMapBufferRange = LoadGLFunction(load, - "glMapBufferRange"u8); + "glMapBufferRange"u8); contextPtr->glRenderbufferStorage = LoadGLFunction(load, - "glRenderbufferStorage"u8); + "glRenderbufferStorage"u8); contextPtr->glRenderbufferStorageMultisample = LoadGLFunction(load, - "glRenderbufferStorageMultisample"u8); + "glRenderbufferStorageMultisample"u8); contextPtr->glTexParameterIiv = LoadGLFunction(load, - "glTexParameterIiv"u8); + "glTexParameterIiv"u8); contextPtr->glTexParameterIuiv = LoadGLFunction(load, - "glTexParameterIuiv"u8); + "glTexParameterIuiv"u8); contextPtr->glTransformFeedbackVaryings = LoadGLFunction(load, - "glTransformFeedbackVaryings"u8); - contextPtr->glUniform1ui = LoadGLFunction(load, "glUniform1ui"u8); - contextPtr->glUniform1uiv = LoadGLFunction(load, "glUniform1uiv"u8); - contextPtr->glUniform2ui = LoadGLFunction(load, "glUniform2ui"u8); - contextPtr->glUniform2uiv = LoadGLFunction(load, "glUniform2uiv"u8); + "glTransformFeedbackVaryings"u8); + contextPtr->glUniform1ui = LoadGLFunction(load, "glUniform1ui"u8); + contextPtr->glUniform1uiv = LoadGLFunction(load, "glUniform1uiv"u8); + contextPtr->glUniform2ui = LoadGLFunction(load, "glUniform2ui"u8); + contextPtr->glUniform2uiv = LoadGLFunction(load, "glUniform2uiv"u8); contextPtr->glUniform3ui = LoadGLFunction(load, - "glUniform3ui"u8); - contextPtr->glUniform3uiv = LoadGLFunction(load, "glUniform3uiv"u8); + "glUniform3ui"u8); + contextPtr->glUniform3uiv = LoadGLFunction(load, "glUniform3uiv"u8); contextPtr->glUniform4ui = LoadGLFunction(load, - "glUniform4ui"u8); - contextPtr->glUniform4uiv = LoadGLFunction(load, "glUniform4uiv"u8); + "glUniform4ui"u8); + contextPtr->glUniform4uiv = LoadGLFunction(load, "glUniform4uiv"u8); contextPtr->glVertexAttribI1i = LoadGLFunction(load, - "glVertexAttribI1i"u8); + "glVertexAttribI1i"u8); contextPtr->glVertexAttribI1iv = LoadGLFunction(load, - "glVertexAttribI1iv"u8); + "glVertexAttribI1iv"u8); contextPtr->glVertexAttribI1ui = LoadGLFunction(load, - "glVertexAttribI1ui"u8); + "glVertexAttribI1ui"u8); contextPtr->glVertexAttribI1uiv = LoadGLFunction(load, - "glVertexAttribI1uiv"u8); + "glVertexAttribI1uiv"u8); contextPtr->glVertexAttribI2i = LoadGLFunction(load, - "glVertexAttribI2i"u8); + "glVertexAttribI2i"u8); contextPtr->glVertexAttribI2iv = LoadGLFunction(load, - "glVertexAttribI2iv"u8); + "glVertexAttribI2iv"u8); contextPtr->glVertexAttribI2ui = LoadGLFunction(load, - "glVertexAttribI2ui"u8); + "glVertexAttribI2ui"u8); contextPtr->glVertexAttribI2uiv = LoadGLFunction(load, - "glVertexAttribI2uiv"u8); + "glVertexAttribI2uiv"u8); contextPtr->glVertexAttribI3i = LoadGLFunction(load, - "glVertexAttribI3i"u8); + "glVertexAttribI3i"u8); contextPtr->glVertexAttribI3iv = LoadGLFunction(load, - "glVertexAttribI3iv"u8); + "glVertexAttribI3iv"u8); contextPtr->glVertexAttribI3ui = LoadGLFunction(load, - "glVertexAttribI3ui"u8); + "glVertexAttribI3ui"u8); contextPtr->glVertexAttribI3uiv = LoadGLFunction(load, - "glVertexAttribI3uiv"u8); + "glVertexAttribI3uiv"u8); contextPtr->glVertexAttribI4bv = LoadGLFunction(load, - "glVertexAttribI4bv"u8); + "glVertexAttribI4bv"u8); contextPtr->glVertexAttribI4i = LoadGLFunction(load, - "glVertexAttribI4i"u8); + "glVertexAttribI4i"u8); contextPtr->glVertexAttribI4iv = LoadGLFunction(load, - "glVertexAttribI4iv"u8); + "glVertexAttribI4iv"u8); contextPtr->glVertexAttribI4sv = LoadGLFunction(load, - "glVertexAttribI4sv"u8); + "glVertexAttribI4sv"u8); contextPtr->glVertexAttribI4ubv = LoadGLFunction(load, - "glVertexAttribI4ubv"u8); + "glVertexAttribI4ubv"u8); contextPtr->glVertexAttribI4ui = LoadGLFunction(load, - "glVertexAttribI4ui"u8); + "glVertexAttribI4ui"u8); contextPtr->glVertexAttribI4uiv = LoadGLFunction(load, - "glVertexAttribI4uiv"u8); + "glVertexAttribI4uiv"u8); contextPtr->glVertexAttribI4usv = LoadGLFunction(load, - "glVertexAttribI4usv"u8); + "glVertexAttribI4usv"u8); contextPtr->glVertexAttribIPointer = LoadGLFunction(load, "glVertexAttribIPointer"u8); #endregion load - DefaultLog.InternalAppendLog("Successfully load OpenGL 3.0 APIs"); - return true; - } - - internal static unsafe bool LoadGLcore31( - glContextShadow* contextPtr, - delegate*, IntPtr> load) - { - if (!core31) - { - DefaultLog.InternalAppendLog("The core version 3.1 is not supported."); - return false; + DefaultLog.InternalAppendLog("Successfully load OpenGL 3.0 APIs"); + return true; + } + + internal static unsafe bool LoadGLcore31( + glContextShadow* contextPtr, + delegate*, IntPtr> load) + { + if (!core31) + { + DefaultLog.InternalAppendLog("The core version 3.1 is not supported."); + return false; } #region load contextPtr->glBindBufferBase = LoadGLFunction(load, - "glBindBufferBase"u8); + "glBindBufferBase"u8); contextPtr->glBindBufferRange = LoadGLFunction(load, - "glBindBufferRange"u8); + "glBindBufferRange"u8); contextPtr->glCopyBufferSubData = LoadGLFunction(load, - "glCopyBufferSubData"u8); + "glCopyBufferSubData"u8); contextPtr->glDrawArraysInstanced = LoadGLFunction(load, - "glDrawArraysInstanced"u8); + "glDrawArraysInstanced"u8); contextPtr->glDrawElementsInstanced = LoadGLFunction(load, - "glDrawElementsInstanced"u8); + "glDrawElementsInstanced"u8); contextPtr->glGetActiveUniformBlockName = LoadGLFunction(load, - "glGetActiveUniformBlockName"u8); + "glGetActiveUniformBlockName"u8); contextPtr->glGetActiveUniformBlockiv = LoadGLFunction(load, - "glGetActiveUniformBlockiv"u8); + "glGetActiveUniformBlockiv"u8); contextPtr->glGetActiveUniformName = LoadGLFunction(load, - "glGetActiveUniformName"u8); + "glGetActiveUniformName"u8); contextPtr->glGetActiveUniformsiv = LoadGLFunction(load, - "glGetActiveUniformsiv"u8); + "glGetActiveUniformsiv"u8); contextPtr->glGetIntegeri_v = LoadGLFunction(load, - "glGetIntegeri_v"u8); + "glGetIntegeri_v"u8); contextPtr->glGetUniformBlockIndex = LoadGLFunction(load, - "glGetUniformBlockIndex"u8); + "glGetUniformBlockIndex"u8); contextPtr->glGetUniformIndices = LoadGLFunction(load, - "glGetUniformIndices"u8); + "glGetUniformIndices"u8); contextPtr->glPrimitiveRestartIndex = LoadGLFunction(load, - "glPrimitiveRestartIndex"u8); - contextPtr->glTexBuffer = LoadGLFunction(load, "glTexBuffer"u8); + "glPrimitiveRestartIndex"u8); + contextPtr->glTexBuffer = LoadGLFunction(load, "glTexBuffer"u8); contextPtr->glUniformBlockBinding = LoadGLFunction(load, "glUniformBlockBinding"u8); #endregion load - DefaultLog.InternalAppendLog("Successfully load OpenGL 3.1 APIs"); - return true; - } - - internal static unsafe bool LoadGLcore32( - glContextShadow* contextPtr, - delegate*, IntPtr> load) - { - if (!core32) - { - DefaultLog.InternalAppendLog("The core version 3.2 is not supported."); - return false; + DefaultLog.InternalAppendLog("Successfully load OpenGL 3.1 APIs"); + return true; + } + + internal static unsafe bool LoadGLcore32( + glContextShadow* contextPtr, + delegate*, IntPtr> load) + { + if (!core32) + { + DefaultLog.InternalAppendLog("The core version 3.2 is not supported."); + return false; } #region load contextPtr->glClientWaitSync = LoadGLFunction(load, - "glClientWaitSync"u8); - contextPtr->glDeleteSync = LoadGLFunction(load, "glDeleteSync"u8); + "glClientWaitSync"u8); + contextPtr->glDeleteSync = LoadGLFunction(load, "glDeleteSync"u8); contextPtr->glDrawElementsBaseVertex = LoadGLFunction(load, - "glDrawElementsBaseVertex"u8); + "glDrawElementsBaseVertex"u8); contextPtr->glDrawElementsInstancedBaseVertex = LoadGLFunction(load, - "glDrawElementsInstancedBaseVertex"u8); + "glDrawElementsInstancedBaseVertex"u8); contextPtr->glDrawRangeElementsBaseVertex = LoadGLFunction(load, - "glDrawRangeElementsBaseVertex"u8); - contextPtr->glFenceSync = LoadGLFunction(load, "glFenceSync"u8); + "glDrawRangeElementsBaseVertex"u8); + contextPtr->glFenceSync = LoadGLFunction(load, "glFenceSync"u8); contextPtr->glFramebufferTexture = LoadGLFunction(load, - "glFramebufferTexture"u8); + "glFramebufferTexture"u8); contextPtr->glGetBufferParameteri64v = LoadGLFunction(load, - "glGetBufferParameteri64v"u8); + "glGetBufferParameteri64v"u8); contextPtr->glGetInteger64i_v = LoadGLFunction(load, - "glGetInteger64i_v"u8); - contextPtr->glGetInteger64v = LoadGLFunction(load, "glGetInteger64v"u8); + "glGetInteger64i_v"u8); + contextPtr->glGetInteger64v = LoadGLFunction(load, "glGetInteger64v"u8); contextPtr->glGetMultisamplefv = LoadGLFunction(load, - "glGetMultisamplefv"u8); + "glGetMultisamplefv"u8); contextPtr->glGetSynciv = LoadGLFunction(load, - "glGetSynciv"u8); - contextPtr->glIsSync = LoadGLFunction(load, "glIsSync"u8); + "glGetSynciv"u8); + contextPtr->glIsSync = LoadGLFunction(load, "glIsSync"u8); contextPtr->glMultiDrawElementsBaseVertex = LoadGLFunction(load, - "glMultiDrawElementsBaseVertex"u8); - contextPtr->glProvokingVertex = LoadGLFunction(load, "glProvokingVertex"u8); - contextPtr->glSampleMaski = LoadGLFunction(load, "glSampleMaski"u8); + "glMultiDrawElementsBaseVertex"u8); + contextPtr->glProvokingVertex = LoadGLFunction(load, "glProvokingVertex"u8); + contextPtr->glSampleMaski = LoadGLFunction(load, "glSampleMaski"u8); contextPtr->glTexImage2DMultisample = LoadGLFunction(load, - "glTexImage2DMultisample"u8); + "glTexImage2DMultisample"u8); contextPtr->glTexImage3DMultisample = LoadGLFunction(load, - "glTexImage3DMultisample"u8); + "glTexImage3DMultisample"u8); contextPtr->glWaitSync = LoadGLFunction(load, "glWaitSync"u8); #endregion load - DefaultLog.InternalAppendLog("Successfully load OpenGL 3.2 APIs"); - return true; - } - - internal static unsafe bool LoadGLcore33( - glContextShadow* contextPtr, - delegate*, IntPtr> load) - { - if (!core33) - { - DefaultLog.InternalAppendLog("The core version 3.3 is not supported."); - return false; + DefaultLog.InternalAppendLog("Successfully load OpenGL 3.2 APIs"); + return true; + } + + internal static unsafe bool LoadGLcore33( + glContextShadow* contextPtr, + delegate*, IntPtr> load) + { + if (!core33) + { + DefaultLog.InternalAppendLog("The core version 3.3 is not supported."); + return false; } #region load contextPtr->glBindFragDataLocationIndexed = LoadGLFunction(load, - "glBindFragDataLocationIndexed"u8); - contextPtr->glBindSampler = LoadGLFunction(load, "glBindSampler"u8); + "glBindFragDataLocationIndexed"u8); + contextPtr->glBindSampler = LoadGLFunction(load, "glBindSampler"u8); contextPtr->glDeleteSamplers = LoadGLFunction(load, - "glDeleteSamplers"u8); - contextPtr->glGenSamplers = LoadGLFunction(load, "glGenSamplers"u8); + "glDeleteSamplers"u8); + contextPtr->glGenSamplers = LoadGLFunction(load, "glGenSamplers"u8); contextPtr->glGetFragDataIndex = LoadGLFunction(load, - "glGetFragDataIndex"u8); + "glGetFragDataIndex"u8); contextPtr->glGetQueryObjecti64v = LoadGLFunction(load, - "glGetQueryObjecti64v"u8); + "glGetQueryObjecti64v"u8); contextPtr->glGetQueryObjectui64v = LoadGLFunction(load, - "glGetQueryObjectui64v"u8); + "glGetQueryObjectui64v"u8); contextPtr->glGetSamplerParameterIiv = LoadGLFunction(load, - "glGetSamplerParameterIiv"u8); + "glGetSamplerParameterIiv"u8); contextPtr->glGetSamplerParameterIuiv = LoadGLFunction(load, - "glGetSamplerParameterIuiv"u8); + "glGetSamplerParameterIuiv"u8); contextPtr->glGetSamplerParameterfv = LoadGLFunction(load, - "glGetSamplerParameterfv"u8); + "glGetSamplerParameterfv"u8); contextPtr->glGetSamplerParameteriv = LoadGLFunction(load, - "glGetSamplerParameteriv"u8); - contextPtr->glIsSampler = LoadGLFunction(load, "glIsSampler"u8); - contextPtr->glQueryCounter = LoadGLFunction(load, "glQueryCounter"u8); + "glGetSamplerParameteriv"u8); + contextPtr->glIsSampler = LoadGLFunction(load, "glIsSampler"u8); + contextPtr->glQueryCounter = LoadGLFunction(load, "glQueryCounter"u8); contextPtr->glSamplerParameterIiv = LoadGLFunction(load, - "glSamplerParameterIiv"u8); + "glSamplerParameterIiv"u8); contextPtr->glSamplerParameterIuiv = LoadGLFunction(load, - "glSamplerParameterIuiv"u8); + "glSamplerParameterIuiv"u8); contextPtr->glSamplerParameterf = LoadGLFunction(load, - "glSamplerParameterf"u8); + "glSamplerParameterf"u8); contextPtr->glSamplerParameterfv = LoadGLFunction(load, - "glSamplerParameterfv"u8); + "glSamplerParameterfv"u8); contextPtr->glSamplerParameteri = LoadGLFunction(load, - "glSamplerParameteri"u8); + "glSamplerParameteri"u8); contextPtr->glSamplerParameteriv = LoadGLFunction(load, - "glSamplerParameteriv"u8); + "glSamplerParameteriv"u8); contextPtr->glVertexAttribDivisor = LoadGLFunction(load, - "glVertexAttribDivisor"u8); + "glVertexAttribDivisor"u8); contextPtr->glVertexAttribP1ui = LoadGLFunction(load, - "glVertexAttribP1ui"u8); + "glVertexAttribP1ui"u8); contextPtr->glVertexAttribP1uiv = LoadGLFunction(load, - "glVertexAttribP1uiv"u8); + "glVertexAttribP1uiv"u8); contextPtr->glVertexAttribP2ui = LoadGLFunction(load, - "glVertexAttribP2ui"u8); + "glVertexAttribP2ui"u8); contextPtr->glVertexAttribP2uiv = LoadGLFunction(load, - "glVertexAttribP2uiv"u8); + "glVertexAttribP2uiv"u8); contextPtr->glVertexAttribP3ui = LoadGLFunction(load, - "glVertexAttribP3ui"u8); + "glVertexAttribP3ui"u8); contextPtr->glVertexAttribP3uiv = LoadGLFunction(load, - "glVertexAttribP3uiv"u8); + "glVertexAttribP3uiv"u8); contextPtr->glVertexAttribP4ui = LoadGLFunction(load, - "glVertexAttribP4ui"u8); + "glVertexAttribP4ui"u8); contextPtr->glVertexAttribP4uiv = LoadGLFunction(load, "glVertexAttribP4uiv"u8); #endregion load - DefaultLog.InternalAppendLog("Successfully load OpenGL 3.3 APIs"); - return true; - } - - internal static unsafe bool LoadGLcore40( - glContextShadow* contextPtr, - delegate*, IntPtr> load) - { - if (!core40) - { - DefaultLog.InternalAppendLog("The core version 4.0 is not supported."); - return false; + DefaultLog.InternalAppendLog("Successfully load OpenGL 3.3 APIs"); + return true; + } + + internal static unsafe bool LoadGLcore40( + glContextShadow* contextPtr, + delegate*, IntPtr> load) + { + if (!core40) + { + DefaultLog.InternalAppendLog("The core version 4.0 is not supported."); + return false; } #region load contextPtr->glBeginQueryIndexed = LoadGLFunction(load, - "glBeginQueryIndexed"u8); + "glBeginQueryIndexed"u8); contextPtr->glBindTransformFeedback = LoadGLFunction(load, - "glBindTransformFeedback"u8); + "glBindTransformFeedback"u8); contextPtr->glBlendEquationSeparatei = LoadGLFunction(load, - "glBlendEquationSeparatei"u8); - contextPtr->glBlendEquationi = LoadGLFunction(load, "glBlendEquationi"u8); + "glBlendEquationSeparatei"u8); + contextPtr->glBlendEquationi = LoadGLFunction(load, "glBlendEquationi"u8); contextPtr->glBlendFuncSeparatei = LoadGLFunction(load, - "glBlendFuncSeparatei"u8); - contextPtr->glBlendFunci = LoadGLFunction(load, "glBlendFunci"u8); + "glBlendFuncSeparatei"u8); + contextPtr->glBlendFunci = LoadGLFunction(load, "glBlendFunci"u8); contextPtr->glDeleteTransformFeedbacks = LoadGLFunction(load, - "glDeleteTransformFeedbacks"u8); + "glDeleteTransformFeedbacks"u8); contextPtr->glDrawArraysIndirect = LoadGLFunction(load, - "glDrawArraysIndirect"u8); + "glDrawArraysIndirect"u8); contextPtr->glDrawElementsIndirect = LoadGLFunction(load, - "glDrawElementsIndirect"u8); + "glDrawElementsIndirect"u8); contextPtr->glDrawTransformFeedback = LoadGLFunction(load, - "glDrawTransformFeedback"u8); + "glDrawTransformFeedback"u8); contextPtr->glDrawTransformFeedbackStream = LoadGLFunction(load, - "glDrawTransformFeedbackStream"u8); + "glDrawTransformFeedbackStream"u8); contextPtr->glEndQueryIndexed = LoadGLFunction(load, - "glEndQueryIndexed"u8); + "glEndQueryIndexed"u8); contextPtr->glGenTransformFeedbacks = LoadGLFunction(load, - "glGenTransformFeedbacks"u8); + "glGenTransformFeedbacks"u8); contextPtr->glGetActiveSubroutineName = LoadGLFunction(load, - "glGetActiveSubroutineName"u8); + "glGetActiveSubroutineName"u8); contextPtr->glGetActiveSubroutineUniformName = LoadGLFunction(load, - "glGetActiveSubroutineUniformName"u8); + "glGetActiveSubroutineUniformName"u8); contextPtr->glGetActiveSubroutineUniformiv = LoadGLFunction(load, - "glGetActiveSubroutineUniformiv"u8); + "glGetActiveSubroutineUniformiv"u8); contextPtr->glGetProgramStageiv = LoadGLFunction(load, - "glGetProgramStageiv"u8); + "glGetProgramStageiv"u8); contextPtr->glGetQueryIndexediv = LoadGLFunction(load, - "glGetQueryIndexediv"u8); + "glGetQueryIndexediv"u8); contextPtr->glGetSubroutineIndex = LoadGLFunction(load, - "glGetSubroutineIndex"u8); + "glGetSubroutineIndex"u8); contextPtr->glGetSubroutineUniformLocation = LoadGLFunction(load, - "glGetSubroutineUniformLocation"u8); + "glGetSubroutineUniformLocation"u8); contextPtr->glGetUniformSubroutineuiv = LoadGLFunction(load, - "glGetUniformSubroutineuiv"u8); + "glGetUniformSubroutineuiv"u8); contextPtr->glGetUniformdv = LoadGLFunction(load, - "glGetUniformdv"u8); + "glGetUniformdv"u8); contextPtr->glIsTransformFeedback = LoadGLFunction(load, - "glIsTransformFeedback"u8); - contextPtr->glMinSampleShading = LoadGLFunction(load, "glMinSampleShading"u8); + "glIsTransformFeedback"u8); + contextPtr->glMinSampleShading = LoadGLFunction(load, "glMinSampleShading"u8); contextPtr->glPatchParameterfv = LoadGLFunction(load, - "glPatchParameterfv"u8); + "glPatchParameterfv"u8); contextPtr->glPatchParameteri = LoadGLFunction(load, - "glPatchParameteri"u8); + "glPatchParameteri"u8); contextPtr->glPauseTransformFeedback = LoadGLFunction(load, - "glPauseTransformFeedback"u8); + "glPauseTransformFeedback"u8); contextPtr->glResumeTransformFeedback = LoadGLFunction(load, - "glResumeTransformFeedback"u8); - contextPtr->glUniform1d = LoadGLFunction(load, "glUniform1d"u8); - contextPtr->glUniform1dv = LoadGLFunction(load, "glUniform1dv"u8); - contextPtr->glUniform2d = LoadGLFunction(load, "glUniform2d"u8); - contextPtr->glUniform2dv = LoadGLFunction(load, "glUniform2dv"u8); + "glResumeTransformFeedback"u8); + contextPtr->glUniform1d = LoadGLFunction(load, "glUniform1d"u8); + contextPtr->glUniform1dv = LoadGLFunction(load, "glUniform1dv"u8); + contextPtr->glUniform2d = LoadGLFunction(load, "glUniform2d"u8); + contextPtr->glUniform2dv = LoadGLFunction(load, "glUniform2dv"u8); contextPtr->glUniform3d = LoadGLFunction(load, - "glUniform3d"u8); - contextPtr->glUniform3dv = LoadGLFunction(load, "glUniform3dv"u8); + "glUniform3d"u8); + contextPtr->glUniform3dv = LoadGLFunction(load, "glUniform3dv"u8); contextPtr->glUniform4d = LoadGLFunction(load, - "glUniform4d"u8); - contextPtr->glUniform4dv = LoadGLFunction(load, "glUniform4dv"u8); + "glUniform4d"u8); + contextPtr->glUniform4dv = LoadGLFunction(load, "glUniform4dv"u8); contextPtr->glUniformMatrix2dv = LoadGLFunction(load, - "glUniformMatrix2dv"u8); + "glUniformMatrix2dv"u8); contextPtr->glUniformMatrix2x3dv = LoadGLFunction(load, - "glUniformMatrix2x3dv"u8); + "glUniformMatrix2x3dv"u8); contextPtr->glUniformMatrix2x4dv = LoadGLFunction(load, - "glUniformMatrix2x4dv"u8); + "glUniformMatrix2x4dv"u8); contextPtr->glUniformMatrix3dv = LoadGLFunction(load, - "glUniformMatrix3dv"u8); + "glUniformMatrix3dv"u8); contextPtr->glUniformMatrix3x2dv = LoadGLFunction(load, - "glUniformMatrix3x2dv"u8); + "glUniformMatrix3x2dv"u8); contextPtr->glUniformMatrix3x4dv = LoadGLFunction(load, - "glUniformMatrix3x4dv"u8); + "glUniformMatrix3x4dv"u8); contextPtr->glUniformMatrix4dv = LoadGLFunction(load, - "glUniformMatrix4dv"u8); + "glUniformMatrix4dv"u8); contextPtr->glUniformMatrix4x2dv = LoadGLFunction(load, - "glUniformMatrix4x2dv"u8); + "glUniformMatrix4x2dv"u8); contextPtr->glUniformMatrix4x3dv = LoadGLFunction(load, - "glUniformMatrix4x3dv"u8); + "glUniformMatrix4x3dv"u8); contextPtr->glUniformSubroutinesuiv = LoadGLFunction(load, "glUniformSubroutinesuiv"u8); #endregion load - DefaultLog.InternalAppendLog("Successfully load OpenGL 4.0 APIs"); - return true; - } - - internal static unsafe bool LoadGLcore41( - glContextShadow* contextPtr, - delegate*, IntPtr> load) - { - if (!core41) - { - DefaultLog.InternalAppendLog("The core version 4.1 is not supported."); - return false; + DefaultLog.InternalAppendLog("Successfully load OpenGL 4.0 APIs"); + return true; + } + + internal static unsafe bool LoadGLcore41( + glContextShadow* contextPtr, + delegate*, IntPtr> load) + { + if (!core41) + { + DefaultLog.InternalAppendLog("The core version 4.1 is not supported."); + return false; } #region load contextPtr->glActiveShaderProgram = LoadGLFunction(load, - "glActiveShaderProgram"u8); + "glActiveShaderProgram"u8); contextPtr->glBindProgramPipeline = LoadGLFunction(load, - "glBindProgramPipeline"u8); - contextPtr->glClearDepthf = LoadGLFunction(load, "glClearDepthf"u8); + "glBindProgramPipeline"u8); + contextPtr->glClearDepthf = LoadGLFunction(load, "glClearDepthf"u8); contextPtr->glCreateShaderProgramv = LoadGLFunction(load, - "glCreateShaderProgramv"u8); + "glCreateShaderProgramv"u8); contextPtr->glDeleteProgramPipelines = LoadGLFunction(load, - "glDeleteProgramPipelines"u8); + "glDeleteProgramPipelines"u8); contextPtr->glDepthRangeArrayv = LoadGLFunction(load, - "glDepthRangeArrayv"u8); + "glDepthRangeArrayv"u8); contextPtr->glDepthRangeIndexed = LoadGLFunction(load, - "glDepthRangeIndexed"u8); - contextPtr->glDepthRangef = LoadGLFunction(load, "glDepthRangef"u8); + "glDepthRangeIndexed"u8); + contextPtr->glDepthRangef = LoadGLFunction(load, "glDepthRangef"u8); contextPtr->glGenProgramPipelines = LoadGLFunction(load, - "glGenProgramPipelines"u8); + "glGenProgramPipelines"u8); contextPtr->glGetDoublei_v = LoadGLFunction(load, - "glGetDoublei_v"u8); + "glGetDoublei_v"u8); contextPtr->glGetFloati_v = LoadGLFunction(load, - "glGetFloati_v"u8); + "glGetFloati_v"u8); contextPtr->glGetProgramBinary = LoadGLFunction(load, - "glGetProgramBinary"u8); + "glGetProgramBinary"u8); contextPtr->glGetProgramPipelineInfoLog = LoadGLFunction(load, - "glGetProgramPipelineInfoLog"u8); + "glGetProgramPipelineInfoLog"u8); contextPtr->glGetProgramPipelineiv = LoadGLFunction(load, - "glGetProgramPipelineiv"u8); + "glGetProgramPipelineiv"u8); contextPtr->glGetShaderPrecisionFormat = LoadGLFunction(load, - "glGetShaderPrecisionFormat"u8); + "glGetShaderPrecisionFormat"u8); contextPtr->glGetVertexAttribLdv = LoadGLFunction(load, - "glGetVertexAttribLdv"u8); - contextPtr->glIsProgramPipeline = LoadGLFunction(load, "glIsProgramPipeline"u8); + "glGetVertexAttribLdv"u8); + contextPtr->glIsProgramPipeline = LoadGLFunction(load, "glIsProgramPipeline"u8); contextPtr->glProgramBinary = LoadGLFunction(load, - "glProgramBinary"u8); + "glProgramBinary"u8); contextPtr->glProgramParameteri = LoadGLFunction(load, - "glProgramParameteri"u8); + "glProgramParameteri"u8); contextPtr->glProgramUniform1d = LoadGLFunction(load, - "glProgramUniform1d"u8); + "glProgramUniform1d"u8); contextPtr->glProgramUniform1dv = LoadGLFunction(load, - "glProgramUniform1dv"u8); + "glProgramUniform1dv"u8); contextPtr->glProgramUniform1f = LoadGLFunction(load, - "glProgramUniform1f"u8); + "glProgramUniform1f"u8); contextPtr->glProgramUniform1fv = LoadGLFunction(load, - "glProgramUniform1fv"u8); + "glProgramUniform1fv"u8); contextPtr->glProgramUniform1i = LoadGLFunction(load, - "glProgramUniform1i"u8); + "glProgramUniform1i"u8); contextPtr->glProgramUniform1iv = LoadGLFunction(load, - "glProgramUniform1iv"u8); + "glProgramUniform1iv"u8); contextPtr->glProgramUniform1ui = LoadGLFunction(load, - "glProgramUniform1ui"u8); + "glProgramUniform1ui"u8); contextPtr->glProgramUniform1uiv = LoadGLFunction(load, - "glProgramUniform1uiv"u8); + "glProgramUniform1uiv"u8); contextPtr->glProgramUniform2d = LoadGLFunction(load, - "glProgramUniform2d"u8); + "glProgramUniform2d"u8); contextPtr->glProgramUniform2dv = LoadGLFunction(load, - "glProgramUniform2dv"u8); + "glProgramUniform2dv"u8); contextPtr->glProgramUniform2f = LoadGLFunction(load, - "glProgramUniform2f"u8); + "glProgramUniform2f"u8); contextPtr->glProgramUniform2fv = LoadGLFunction(load, - "glProgramUniform2fv"u8); + "glProgramUniform2fv"u8); contextPtr->glProgramUniform2i = LoadGLFunction(load, - "glProgramUniform2i"u8); + "glProgramUniform2i"u8); contextPtr->glProgramUniform2iv = LoadGLFunction(load, - "glProgramUniform2iv"u8); + "glProgramUniform2iv"u8); contextPtr->glProgramUniform2ui = LoadGLFunction(load, - "glProgramUniform2ui"u8); + "glProgramUniform2ui"u8); contextPtr->glProgramUniform2uiv = LoadGLFunction(load, - "glProgramUniform2uiv"u8); + "glProgramUniform2uiv"u8); contextPtr->glProgramUniform3d = LoadGLFunction(load, - "glProgramUniform3d"u8); + "glProgramUniform3d"u8); contextPtr->glProgramUniform3dv = LoadGLFunction(load, - "glProgramUniform3dv"u8); + "glProgramUniform3dv"u8); contextPtr->glProgramUniform3f = LoadGLFunction(load, - "glProgramUniform3f"u8); + "glProgramUniform3f"u8); contextPtr->glProgramUniform3fv = LoadGLFunction(load, - "glProgramUniform3fv"u8); + "glProgramUniform3fv"u8); contextPtr->glProgramUniform3i = LoadGLFunction(load, - "glProgramUniform3i"u8); + "glProgramUniform3i"u8); contextPtr->glProgramUniform3iv = LoadGLFunction(load, - "glProgramUniform3iv"u8); + "glProgramUniform3iv"u8); contextPtr->glProgramUniform3ui = LoadGLFunction(load, - "glProgramUniform3ui"u8); + "glProgramUniform3ui"u8); contextPtr->glProgramUniform3uiv = LoadGLFunction(load, - "glProgramUniform3uiv"u8); + "glProgramUniform3uiv"u8); contextPtr->glProgramUniform4d = LoadGLFunction(load, - "glProgramUniform4d"u8); + "glProgramUniform4d"u8); contextPtr->glProgramUniform4dv = LoadGLFunction(load, - "glProgramUniform4dv"u8); + "glProgramUniform4dv"u8); contextPtr->glProgramUniform4f = LoadGLFunction(load, - "glProgramUniform4f"u8); + "glProgramUniform4f"u8); contextPtr->glProgramUniform4fv = LoadGLFunction(load, - "glProgramUniform4fv"u8); + "glProgramUniform4fv"u8); contextPtr->glProgramUniform4i = LoadGLFunction(load, - "glProgramUniform4i"u8); + "glProgramUniform4i"u8); contextPtr->glProgramUniform4iv = LoadGLFunction(load, - "glProgramUniform4iv"u8); + "glProgramUniform4iv"u8); contextPtr->glProgramUniform4ui = LoadGLFunction(load, - "glProgramUniform4ui"u8); + "glProgramUniform4ui"u8); contextPtr->glProgramUniform4uiv = LoadGLFunction(load, - "glProgramUniform4uiv"u8); + "glProgramUniform4uiv"u8); contextPtr->glProgramUniformMatrix2dv = LoadGLFunction(load, - "glProgramUniformMatrix2dv"u8); + "glProgramUniformMatrix2dv"u8); contextPtr->glProgramUniformMatrix2fv = LoadGLFunction(load, - "glProgramUniformMatrix2fv"u8); + "glProgramUniformMatrix2fv"u8); contextPtr->glProgramUniformMatrix2x3dv = LoadGLFunction(load, - "glProgramUniformMatrix2x3dv"u8); + "glProgramUniformMatrix2x3dv"u8); contextPtr->glProgramUniformMatrix2x3fv = LoadGLFunction(load, - "glProgramUniformMatrix2x3fv"u8); + "glProgramUniformMatrix2x3fv"u8); contextPtr->glProgramUniformMatrix2x4dv = LoadGLFunction(load, - "glProgramUniformMatrix2x4dv"u8); + "glProgramUniformMatrix2x4dv"u8); contextPtr->glProgramUniformMatrix2x4fv = LoadGLFunction(load, - "glProgramUniformMatrix2x4fv"u8); + "glProgramUniformMatrix2x4fv"u8); contextPtr->glProgramUniformMatrix3dv = LoadGLFunction(load, - "glProgramUniformMatrix3dv"u8); + "glProgramUniformMatrix3dv"u8); contextPtr->glProgramUniformMatrix3fv = LoadGLFunction(load, - "glProgramUniformMatrix3fv"u8); + "glProgramUniformMatrix3fv"u8); contextPtr->glProgramUniformMatrix3x2dv = LoadGLFunction(load, - "glProgramUniformMatrix3x2dv"u8); + "glProgramUniformMatrix3x2dv"u8); contextPtr->glProgramUniformMatrix3x2fv = LoadGLFunction(load, - "glProgramUniformMatrix3x2fv"u8); + "glProgramUniformMatrix3x2fv"u8); contextPtr->glProgramUniformMatrix3x4dv = LoadGLFunction(load, - "glProgramUniformMatrix3x4dv"u8); + "glProgramUniformMatrix3x4dv"u8); contextPtr->glProgramUniformMatrix3x4fv = LoadGLFunction(load, - "glProgramUniformMatrix3x4fv"u8); + "glProgramUniformMatrix3x4fv"u8); contextPtr->glProgramUniformMatrix4dv = LoadGLFunction(load, - "glProgramUniformMatrix4dv"u8); + "glProgramUniformMatrix4dv"u8); contextPtr->glProgramUniformMatrix4fv = LoadGLFunction(load, - "glProgramUniformMatrix4fv"u8); + "glProgramUniformMatrix4fv"u8); contextPtr->glProgramUniformMatrix4x2dv = LoadGLFunction(load, - "glProgramUniformMatrix4x2dv"u8); + "glProgramUniformMatrix4x2dv"u8); contextPtr->glProgramUniformMatrix4x2fv = LoadGLFunction(load, - "glProgramUniformMatrix4x2fv"u8); + "glProgramUniformMatrix4x2fv"u8); contextPtr->glProgramUniformMatrix4x3dv = LoadGLFunction(load, - "glProgramUniformMatrix4x3dv"u8); + "glProgramUniformMatrix4x3dv"u8); contextPtr->glProgramUniformMatrix4x3fv = LoadGLFunction(load, - "glProgramUniformMatrix4x3fv"u8); + "glProgramUniformMatrix4x3fv"u8); contextPtr->glReleaseShaderCompiler = LoadGLFunction(load, - "glReleaseShaderCompiler"u8); + "glReleaseShaderCompiler"u8); contextPtr->glScissorArrayv = LoadGLFunction(load, - "glScissorArrayv"u8); + "glScissorArrayv"u8); contextPtr->glScissorIndexed = LoadGLFunction(load, - "glScissorIndexed"u8); + "glScissorIndexed"u8); contextPtr->glScissorIndexedv = LoadGLFunction(load, - "glScissorIndexedv"u8); + "glScissorIndexedv"u8); contextPtr->glShaderBinary = LoadGLFunction(load, - "glShaderBinary"u8); + "glShaderBinary"u8); contextPtr->glUseProgramStages = LoadGLFunction(load, - "glUseProgramStages"u8); + "glUseProgramStages"u8); contextPtr->glValidateProgramPipeline = LoadGLFunction(load, - "glValidateProgramPipeline"u8); + "glValidateProgramPipeline"u8); contextPtr->glVertexAttribL1d = LoadGLFunction(load, - "glVertexAttribL1d"u8); + "glVertexAttribL1d"u8); contextPtr->glVertexAttribL1dv = LoadGLFunction(load, - "glVertexAttribL1dv"u8); + "glVertexAttribL1dv"u8); contextPtr->glVertexAttribL2d = LoadGLFunction(load, - "glVertexAttribL2d"u8); + "glVertexAttribL2d"u8); contextPtr->glVertexAttribL2dv = LoadGLFunction(load, - "glVertexAttribL2dv"u8); + "glVertexAttribL2dv"u8); contextPtr->glVertexAttribL3d = LoadGLFunction(load, - "glVertexAttribL3d"u8); + "glVertexAttribL3d"u8); contextPtr->glVertexAttribL3dv = LoadGLFunction(load, - "glVertexAttribL3dv"u8); + "glVertexAttribL3dv"u8); contextPtr->glVertexAttribL4d = LoadGLFunction(load, - "glVertexAttribL4d"u8); + "glVertexAttribL4d"u8); contextPtr->glVertexAttribL4dv = LoadGLFunction(load, - "glVertexAttribL4dv"u8); + "glVertexAttribL4dv"u8); contextPtr->glVertexAttribLPointer = LoadGLFunction(load, - "glVertexAttribLPointer"u8); + "glVertexAttribLPointer"u8); contextPtr->glViewportArrayv = LoadGLFunction(load, - "glViewportArrayv"u8); + "glViewportArrayv"u8); contextPtr->glViewportIndexedf = LoadGLFunction(load, - "glViewportIndexedf"u8); + "glViewportIndexedf"u8); contextPtr->glViewportIndexedfv = LoadGLFunction(load, "glViewportIndexedfv"u8); #endregion load - DefaultLog.InternalAppendLog("Successfully load OpenGL 4.1 APIs"); - return true; - } - - internal static unsafe bool LoadGLcore42( - glContextShadow* contextPtr, - delegate*, IntPtr> load) - { - if (!core42) - { - DefaultLog.InternalAppendLog("The core version 4.2 is not supported."); - return false; + DefaultLog.InternalAppendLog("Successfully load OpenGL 4.1 APIs"); + return true; + } + + internal static unsafe bool LoadGLcore42( + glContextShadow* contextPtr, + delegate*, IntPtr> load) + { + if (!core42) + { + DefaultLog.InternalAppendLog("The core version 4.2 is not supported."); + return false; } #region load contextPtr->glBindImageTexture = LoadGLFunction(load, - "glBindImageTexture"u8); + "glBindImageTexture"u8); contextPtr->glDrawArraysInstancedBaseInstance = LoadGLFunction(load, - "glDrawArraysInstancedBaseInstance"u8); + "glDrawArraysInstancedBaseInstance"u8); contextPtr->glDrawElementsInstancedBaseInstance = LoadGLFunction(load, - "glDrawElementsInstancedBaseInstance"u8); + "glDrawElementsInstancedBaseInstance"u8); contextPtr->glDrawElementsInstancedBaseVertexBaseInstance = LoadGLFunction(load, - "glDrawElementsInstancedBaseVertexBaseInstance"u8); + "glDrawElementsInstancedBaseVertexBaseInstance"u8); contextPtr->glDrawTransformFeedbackInstanced = LoadGLFunction(load, - "glDrawTransformFeedbackInstanced"u8); + "glDrawTransformFeedbackInstanced"u8); contextPtr->glDrawTransformFeedbackStreamInstanced = LoadGLFunction(load, - "glDrawTransformFeedbackStreamInstanced"u8); + "glDrawTransformFeedbackStreamInstanced"u8); contextPtr->glGetActiveAtomicCounterBufferiv = LoadGLFunction(load, - "glGetActiveAtomicCounterBufferiv"u8); + "glGetActiveAtomicCounterBufferiv"u8); contextPtr->glGetInternalformativ = LoadGLFunction(load, - "glGetInternalformativ"u8); - contextPtr->glMemoryBarrier = LoadGLFunction(load, "glMemoryBarrier"u8); + "glGetInternalformativ"u8); + contextPtr->glMemoryBarrier = LoadGLFunction(load, "glMemoryBarrier"u8); contextPtr->glTexStorage1D = LoadGLFunction(load, - "glTexStorage1D"u8); + "glTexStorage1D"u8); contextPtr->glTexStorage2D = LoadGLFunction(load, - "glTexStorage2D"u8); + "glTexStorage2D"u8); contextPtr->glTexStorage3D = LoadGLFunction(load, "glTexStorage3D"u8); #endregion load - DefaultLog.InternalAppendLog("Successfully load OpenGL 4.2 APIs"); - return true; - } - - internal static unsafe bool LoadGLcore43( - glContextShadow* contextPtr, - delegate*, IntPtr> load) - { - if (!core43) - { - DefaultLog.InternalAppendLog("The core version 4.3 is not supported."); - return false; + DefaultLog.InternalAppendLog("Successfully load OpenGL 4.2 APIs"); + return true; + } + + internal static unsafe bool LoadGLcore43( + glContextShadow* contextPtr, + delegate*, IntPtr> load) + { + if (!core43) + { + DefaultLog.InternalAppendLog("The core version 4.3 is not supported."); + return false; } #region load contextPtr->glBindVertexBuffer = LoadGLFunction(load, - "glBindVertexBuffer"u8); + "glBindVertexBuffer"u8); contextPtr->glClearBufferData = LoadGLFunction(load, - "glClearBufferData"u8); + "glClearBufferData"u8); contextPtr->glClearBufferSubData = LoadGLFunction(load, - "glClearBufferSubData"u8); + "glClearBufferSubData"u8); contextPtr->glCopyImageSubData = LoadGLFunction(load, - "glCopyImageSubData"u8); + "glCopyImageSubData"u8); contextPtr->glDebugMessageCallback = LoadGLFunction(load, - "glDebugMessageCallback"u8); + "glDebugMessageCallback"u8); contextPtr->glDebugMessageControl = LoadGLFunction(load, - "glDebugMessageControl"u8); + "glDebugMessageControl"u8); contextPtr->glDebugMessageInsert = LoadGLFunction(load, - "glDebugMessageInsert"u8); + "glDebugMessageInsert"u8); contextPtr->glDispatchCompute = LoadGLFunction(load, - "glDispatchCompute"u8); + "glDispatchCompute"u8); contextPtr->glDispatchComputeIndirect = LoadGLFunction(load, - "glDispatchComputeIndirect"u8); + "glDispatchComputeIndirect"u8); contextPtr->glFramebufferParameteri = LoadGLFunction(load, - "glFramebufferParameteri"u8); + "glFramebufferParameteri"u8); contextPtr->glGetDebugMessageLog = LoadGLFunction(load, - "glGetDebugMessageLog"u8); + "glGetDebugMessageLog"u8); contextPtr->glGetFramebufferParameteriv = LoadGLFunction(load, - "glGetFramebufferParameteriv"u8); + "glGetFramebufferParameteriv"u8); contextPtr->glGetInternalformati64v = LoadGLFunction(load, - "glGetInternalformati64v"u8); + "glGetInternalformati64v"u8); contextPtr->glGetObjectLabel = LoadGLFunction(load, - "glGetObjectLabel"u8); + "glGetObjectLabel"u8); contextPtr->glGetObjectPtrLabel = LoadGLFunction(load, "glGetObjectPtrLabel"u8); // contextPtr->glGetPointerv =LoadGLFunction(load,"glGetPointerv"u8); contextPtr->glGetProgramInterfaceiv = LoadGLFunction(load, - "glGetProgramInterfaceiv"u8); + "glGetProgramInterfaceiv"u8); contextPtr->glGetProgramResourceIndex = LoadGLFunction(load, - "glGetProgramResourceIndex"u8); + "glGetProgramResourceIndex"u8); contextPtr->glGetProgramResourceLocation = LoadGLFunction(load, - "glGetProgramResourceLocation"u8); + "glGetProgramResourceLocation"u8); contextPtr->glGetProgramResourceLocationIndex = LoadGLFunction(load, - "glGetProgramResourceLocationIndex"u8); + "glGetProgramResourceLocationIndex"u8); contextPtr->glGetProgramResourceName = LoadGLFunction(load, - "glGetProgramResourceName"u8); + "glGetProgramResourceName"u8); contextPtr->glGetProgramResourceiv = LoadGLFunction(load, - "glGetProgramResourceiv"u8); + "glGetProgramResourceiv"u8); contextPtr->glInvalidateBufferData = LoadGLFunction(load, - "glInvalidateBufferData"u8); + "glInvalidateBufferData"u8); contextPtr->glInvalidateBufferSubData = LoadGLFunction(load, - "glInvalidateBufferSubData"u8); + "glInvalidateBufferSubData"u8); contextPtr->glInvalidateFramebuffer = LoadGLFunction(load, - "glInvalidateFramebuffer"u8); + "glInvalidateFramebuffer"u8); contextPtr->glInvalidateSubFramebuffer = LoadGLFunction(load, - "glInvalidateSubFramebuffer"u8); + "glInvalidateSubFramebuffer"u8); contextPtr->glInvalidateTexImage = LoadGLFunction(load, - "glInvalidateTexImage"u8); + "glInvalidateTexImage"u8); contextPtr->glInvalidateTexSubImage = LoadGLFunction(load, - "glInvalidateTexSubImage"u8); + "glInvalidateTexSubImage"u8); contextPtr->glMultiDrawArraysIndirect = LoadGLFunction(load, - "glMultiDrawArraysIndirect"u8); + "glMultiDrawArraysIndirect"u8); contextPtr->glMultiDrawElementsIndirect = LoadGLFunction(load, - "glMultiDrawElementsIndirect"u8); + "glMultiDrawElementsIndirect"u8); contextPtr->glObjectLabel = LoadGLFunction(load, - "glObjectLabel"u8); + "glObjectLabel"u8); contextPtr->glObjectPtrLabel = LoadGLFunction(load, - "glObjectPtrLabel"u8); - contextPtr->glPopDebugGroup = LoadGLFunction(load, "glPopDebugGroup"u8); + "glObjectPtrLabel"u8); + contextPtr->glPopDebugGroup = LoadGLFunction(load, "glPopDebugGroup"u8); contextPtr->glPushDebugGroup = LoadGLFunction(load, - "glPushDebugGroup"u8); + "glPushDebugGroup"u8); contextPtr->glShaderStorageBlockBinding = LoadGLFunction(load, - "glShaderStorageBlockBinding"u8); + "glShaderStorageBlockBinding"u8); contextPtr->glTexBufferRange = LoadGLFunction(load, - "glTexBufferRange"u8); + "glTexBufferRange"u8); contextPtr->glTexStorage2DMultisample = LoadGLFunction(load, - "glTexStorage2DMultisample"u8); + "glTexStorage2DMultisample"u8); contextPtr->glTexStorage3DMultisample = LoadGLFunction(load, - "glTexStorage3DMultisample"u8); + "glTexStorage3DMultisample"u8); contextPtr->glTextureView = LoadGLFunction(load, - "glTextureView"u8); + "glTextureView"u8); contextPtr->glVertexAttribBinding = LoadGLFunction(load, - "glVertexAttribBinding"u8); + "glVertexAttribBinding"u8); contextPtr->glVertexAttribFormat = LoadGLFunction(load, - "glVertexAttribFormat"u8); + "glVertexAttribFormat"u8); contextPtr->glVertexAttribIFormat = LoadGLFunction(load, - "glVertexAttribIFormat"u8); + "glVertexAttribIFormat"u8); contextPtr->glClearBufferData = LoadGLFunction(load, - "glClearBufferData"u8); + "glClearBufferData"u8); contextPtr->glVertexBindingDivisor = LoadGLFunction(load, "glVertexBindingDivisor"u8); #endregion load - DefaultLog.InternalAppendLog("Successfully load OpenGL 4.3 APIs"); - return true; - } - - internal static unsafe bool LoadGLcore44( - glContextShadow* contextPtr, - delegate*, IntPtr> load) - { - if (!core44) - { - DefaultLog.InternalAppendLog("The core version 4.4 is not supported."); - return false; + DefaultLog.InternalAppendLog("Successfully load OpenGL 4.3 APIs"); + return true; + } + + internal static unsafe bool LoadGLcore44( + glContextShadow* contextPtr, + delegate*, IntPtr> load) + { + if (!core44) + { + DefaultLog.InternalAppendLog("The core version 4.4 is not supported."); + return false; } #region load contextPtr->glBindBuffersBase = LoadGLFunction(load, - "glBindBuffersBase"u8); + "glBindBuffersBase"u8); contextPtr->glBindBuffersRange = LoadGLFunction(load, - "glBindBuffersRange"u8); + "glBindBuffersRange"u8); contextPtr->glBindImageTextures = LoadGLFunction(load, - "glBindImageTextures"u8); + "glBindImageTextures"u8); contextPtr->glBindSamplers = LoadGLFunction(load, - "glBindSamplers"u8); + "glBindSamplers"u8); contextPtr->glBindTextures = LoadGLFunction(load, - "glBindTextures"u8); + "glBindTextures"u8); contextPtr->glBindVertexBuffers = LoadGLFunction(load, - "glBindVertexBuffers"u8); + "glBindVertexBuffers"u8); contextPtr->glBufferStorage = LoadGLFunction(load, - "glBufferStorage"u8); + "glBufferStorage"u8); contextPtr->glClearTexImage = LoadGLFunction(load, - "glClearTexImage"u8); + "glClearTexImage"u8); contextPtr->glClearTexSubImage = LoadGLFunction(load, "glClearTexSubImage"u8); #endregion load - DefaultLog.InternalAppendLog("Successfully load OpenGL 4.4 APIs"); - return true; - } - - internal static unsafe bool LoadGLcore45( - glContextShadow* contextPtr, - delegate*, IntPtr> load) - { - if (!core45) - { - DefaultLog.InternalAppendLog("The core version 4.5 is not supported."); - return false; + DefaultLog.InternalAppendLog("Successfully load OpenGL 4.4 APIs"); + return true; + } + + internal static unsafe bool LoadGLcore45( + glContextShadow* contextPtr, + delegate*, IntPtr> load) + { + if (!core45) + { + DefaultLog.InternalAppendLog("The core version 4.5 is not supported."); + return false; } #region load contextPtr->glBindTextureUnit = LoadGLFunction(load, - "glBindTextureUnit"u8); + "glBindTextureUnit"u8); contextPtr->glBlitNamedFramebuffer = LoadGLFunction(load, - "glBlitNamedFramebuffer"u8); + "glBlitNamedFramebuffer"u8); contextPtr->glCheckNamedFramebufferStatus = LoadGLFunction(load, - "glCheckNamedFramebufferStatus"u8); + "glCheckNamedFramebufferStatus"u8); contextPtr->glClearNamedBufferData = LoadGLFunction(load, - "glClearNamedBufferData"u8); + "glClearNamedBufferData"u8); contextPtr->glClearNamedBufferSubData = LoadGLFunction(load, - "glClearNamedBufferSubData"u8); + "glClearNamedBufferSubData"u8); contextPtr->glClearNamedFramebufferfi = LoadGLFunction(load, - "glClearNamedFramebufferfi"u8); + "glClearNamedFramebufferfi"u8); contextPtr->glClearNamedFramebufferfv = LoadGLFunction(load, - "glClearNamedFramebufferfv"u8); + "glClearNamedFramebufferfv"u8); contextPtr->glClearNamedFramebufferiv = LoadGLFunction(load, - "glClearNamedFramebufferiv"u8); + "glClearNamedFramebufferiv"u8); contextPtr->glClearNamedFramebufferuiv = LoadGLFunction(load, - "glClearNamedFramebufferuiv"u8); - contextPtr->glClipControl = LoadGLFunction(load, "glClipControl"u8); + "glClearNamedFramebufferuiv"u8); + contextPtr->glClipControl = LoadGLFunction(load, "glClipControl"u8); contextPtr->glCompressedTextureSubImage1D = LoadGLFunction(load, - "glCompressedTextureSubImage1D"u8); + "glCompressedTextureSubImage1D"u8); contextPtr->glCompressedTextureSubImage2D = LoadGLFunction(load, - "glCompressedTextureSubImage2D"u8); + "glCompressedTextureSubImage2D"u8); contextPtr->glCompressedTextureSubImage3D = LoadGLFunction(load, - "glCompressedTextureSubImage3D"u8); + "glCompressedTextureSubImage3D"u8); contextPtr->glCopyNamedBufferSubData = LoadGLFunction(load, - "glCopyNamedBufferSubData"u8); + "glCopyNamedBufferSubData"u8); contextPtr->glCopyTextureSubImage1D = LoadGLFunction(load, - "glCopyTextureSubImage1D"u8); + "glCopyTextureSubImage1D"u8); contextPtr->glCopyTextureSubImage2D = LoadGLFunction(load, - "glCopyTextureSubImage2D"u8); + "glCopyTextureSubImage2D"u8); contextPtr->glCopyTextureSubImage3D = LoadGLFunction(load, - "glCopyTextureSubImage3D"u8); - contextPtr->glCreateBuffers = LoadGLFunction(load, "glCreateBuffers"u8); + "glCopyTextureSubImage3D"u8); + contextPtr->glCreateBuffers = LoadGLFunction(load, "glCreateBuffers"u8); contextPtr->glCreateFramebuffers = LoadGLFunction(load, - "glCreateFramebuffers"u8); + "glCreateFramebuffers"u8); contextPtr->glCreateProgramPipelines = LoadGLFunction(load, - "glCreateProgramPipelines"u8); + "glCreateProgramPipelines"u8); contextPtr->glCreateQueries = LoadGLFunction(load, - "glCreateQueries"u8); + "glCreateQueries"u8); contextPtr->glCreateRenderbuffers = LoadGLFunction(load, - "glCreateRenderbuffers"u8); + "glCreateRenderbuffers"u8); contextPtr->glCreateSamplers = LoadGLFunction(load, - "glCreateSamplers"u8); + "glCreateSamplers"u8); contextPtr->glCreateTextures = LoadGLFunction(load, - "glCreateTextures"u8); + "glCreateTextures"u8); contextPtr->glCreateTransformFeedbacks = LoadGLFunction(load, - "glCreateTransformFeedbacks"u8); + "glCreateTransformFeedbacks"u8); contextPtr->glCreateVertexArrays = LoadGLFunction(load, - "glCreateVertexArrays"u8); + "glCreateVertexArrays"u8); contextPtr->glDisableVertexArrayAttrib = LoadGLFunction(load, - "glDisableVertexArrayAttrib"u8); + "glDisableVertexArrayAttrib"u8); contextPtr->glEnableVertexArrayAttrib = LoadGLFunction(load, - "glEnableVertexArrayAttrib"u8); + "glEnableVertexArrayAttrib"u8); contextPtr->glFlushMappedNamedBufferRange = LoadGLFunction(load, - "glFlushMappedNamedBufferRange"u8); + "glFlushMappedNamedBufferRange"u8); contextPtr->glGenerateTextureMipmap = LoadGLFunction(load, - "glGenerateTextureMipmap"u8); + "glGenerateTextureMipmap"u8); contextPtr->glGetCompressedTextureImage = LoadGLFunction(load, - "glGetCompressedTextureImage"u8); + "glGetCompressedTextureImage"u8); contextPtr->glGetCompressedTextureSubImage = LoadGLFunction(load, - "glGetCompressedTextureSubImage"u8); + "glGetCompressedTextureSubImage"u8); contextPtr->glGetGraphicsResetStatus = LoadGLFunction(load, - "glGetGraphicsResetStatus"u8); + "glGetGraphicsResetStatus"u8); contextPtr->glGetNamedBufferParameteri64v = LoadGLFunction(load, - "glGetNamedBufferParameteri64v"u8); + "glGetNamedBufferParameteri64v"u8); contextPtr->glGetNamedBufferParameteriv = LoadGLFunction(load, - "glGetNamedBufferParameteriv"u8); + "glGetNamedBufferParameteriv"u8); contextPtr->glGetNamedBufferPointerv = LoadGLFunction(load, - "glGetNamedBufferPointerv"u8); + "glGetNamedBufferPointerv"u8); contextPtr->glGetNamedBufferSubData = LoadGLFunction(load, - "glGetNamedBufferSubData"u8); + "glGetNamedBufferSubData"u8); contextPtr->glGetNamedFramebufferAttachmentParameteriv = LoadGLFunction(load, - "glGetNamedFramebufferAttachmentParameteriv"u8); + "glGetNamedFramebufferAttachmentParameteriv"u8); contextPtr->glGetNamedFramebufferParameteriv = LoadGLFunction(load, - "glGetNamedFramebufferParameteriv"u8); + "glGetNamedFramebufferParameteriv"u8); contextPtr->glGetNamedRenderbufferParameteriv = LoadGLFunction(load, - "glGetNamedRenderbufferParameteriv"u8); + "glGetNamedRenderbufferParameteriv"u8); contextPtr->glGetQueryBufferObjecti64v = LoadGLFunction(load, - "glGetQueryBufferObjecti64v"u8); + "glGetQueryBufferObjecti64v"u8); contextPtr->glGetQueryBufferObjectiv = LoadGLFunction(load, - "glGetQueryBufferObjectiv"u8); + "glGetQueryBufferObjectiv"u8); contextPtr->glGetQueryBufferObjectui64v = LoadGLFunction(load, - "glGetQueryBufferObjectui64v"u8); + "glGetQueryBufferObjectui64v"u8); contextPtr->glGetQueryBufferObjectuiv = LoadGLFunction(load, - "glGetQueryBufferObjectuiv"u8); + "glGetQueryBufferObjectuiv"u8); contextPtr->glGetTextureImage = LoadGLFunction(load, - "glGetTextureImage"u8); + "glGetTextureImage"u8); contextPtr->glGetTextureLevelParameterfv = LoadGLFunction(load, - "glGetTextureLevelParameterfv"u8); + "glGetTextureLevelParameterfv"u8); contextPtr->glGetTextureLevelParameteriv = LoadGLFunction(load, - "glGetTextureLevelParameteriv"u8); + "glGetTextureLevelParameteriv"u8); contextPtr->glGetTextureParameterIiv = LoadGLFunction(load, - "glGetTextureParameterIiv"u8); + "glGetTextureParameterIiv"u8); contextPtr->glGetTextureParameterIuiv = LoadGLFunction(load, - "glGetTextureParameterIuiv"u8); + "glGetTextureParameterIuiv"u8); contextPtr->glGetTextureParameterfv = LoadGLFunction(load, - "glGetTextureParameterfv"u8); + "glGetTextureParameterfv"u8); contextPtr->glGetTextureParameteriv = LoadGLFunction(load, - "glGetTextureParameteriv"u8); + "glGetTextureParameteriv"u8); contextPtr->glGetTextureSubImage = LoadGLFunction(load, - "glGetTextureSubImage"u8); + "glGetTextureSubImage"u8); contextPtr->glGetTransformFeedbacki64_v = LoadGLFunction(load, - "glGetTransformFeedbacki64_v"u8); + "glGetTransformFeedbacki64_v"u8); contextPtr->glGetTransformFeedbacki_v = LoadGLFunction(load, - "glGetTransformFeedbacki_v"u8); + "glGetTransformFeedbacki_v"u8); contextPtr->glGetTransformFeedbackiv = LoadGLFunction(load, - "glGetTransformFeedbackiv"u8); + "glGetTransformFeedbackiv"u8); contextPtr->glGetVertexArrayIndexed64iv = LoadGLFunction(load, - "glGetVertexArrayIndexed64iv"u8); + "glGetVertexArrayIndexed64iv"u8); contextPtr->glGetVertexArrayIndexediv = LoadGLFunction(load, - "glGetVertexArrayIndexediv"u8); + "glGetVertexArrayIndexediv"u8); contextPtr->glGetVertexArrayiv = LoadGLFunction(load, - "glGetVertexArrayiv"u8); + "glGetVertexArrayiv"u8); contextPtr->glGetnCompressedTexImage = LoadGLFunction(load, - "glGetnCompressedTexImage"u8); + "glGetnCompressedTexImage"u8); contextPtr->glGetnTexImage = LoadGLFunction(load, - "glGetnTexImage"u8); + "glGetnTexImage"u8); contextPtr->glGetnUniformdv = LoadGLFunction(load, - "glGetnUniformdv"u8); + "glGetnUniformdv"u8); contextPtr->glGetnUniformfv = LoadGLFunction(load, - "glGetnUniformfv"u8); + "glGetnUniformfv"u8); contextPtr->glGetnUniformiv = LoadGLFunction(load, - "glGetnUniformiv"u8); + "glGetnUniformiv"u8); contextPtr->glGetnUniformuiv = LoadGLFunction(load, - "glGetnUniformuiv"u8); + "glGetnUniformuiv"u8); contextPtr->glInvalidateNamedFramebufferData = LoadGLFunction(load, - "glInvalidateNamedFramebufferData"u8); + "glInvalidateNamedFramebufferData"u8); contextPtr->glInvalidateNamedFramebufferSubData = LoadGLFunction(load, - "glInvalidateNamedFramebufferSubData"u8); + "glInvalidateNamedFramebufferSubData"u8); contextPtr->glMapNamedBuffer = LoadGLFunction(load, - "glMapNamedBuffer"u8); + "glMapNamedBuffer"u8); contextPtr->glMapNamedBufferRange = LoadGLFunction(load, - "glMapNamedBufferRange"u8); + "glMapNamedBufferRange"u8); contextPtr->glMemoryBarrierByRegion = LoadGLFunction(load, - "glMemoryBarrierByRegion"u8); + "glMemoryBarrierByRegion"u8); contextPtr->glNamedBufferData = LoadGLFunction(load, - "glNamedBufferData"u8); + "glNamedBufferData"u8); contextPtr->glNamedBufferStorage = LoadGLFunction(load, - "glNamedBufferStorage"u8); + "glNamedBufferStorage"u8); contextPtr->glNamedBufferSubData = LoadGLFunction(load, - "glNamedBufferSubData"u8); + "glNamedBufferSubData"u8); contextPtr->glNamedFramebufferDrawBuffer = LoadGLFunction(load, - "glNamedFramebufferDrawBuffer"u8); + "glNamedFramebufferDrawBuffer"u8); contextPtr->glNamedFramebufferDrawBuffers = LoadGLFunction(load, - "glNamedFramebufferDrawBuffers"u8); + "glNamedFramebufferDrawBuffers"u8); contextPtr->glNamedFramebufferParameteri = LoadGLFunction(load, - "glNamedFramebufferParameteri"u8); + "glNamedFramebufferParameteri"u8); contextPtr->glNamedFramebufferReadBuffer = LoadGLFunction(load, - "glNamedFramebufferReadBuffer"u8); + "glNamedFramebufferReadBuffer"u8); contextPtr->glNamedFramebufferRenderbuffer = LoadGLFunction(load, - "glNamedFramebufferRenderbuffer"u8); + "glNamedFramebufferRenderbuffer"u8); contextPtr->glNamedFramebufferTexture = LoadGLFunction(load, - "glNamedFramebufferTexture"u8); + "glNamedFramebufferTexture"u8); contextPtr->glNamedFramebufferTextureLayer = LoadGLFunction(load, - "glNamedFramebufferTextureLayer"u8); + "glNamedFramebufferTextureLayer"u8); contextPtr->glNamedRenderbufferStorage = LoadGLFunction(load, - "glNamedRenderbufferStorage"u8); + "glNamedRenderbufferStorage"u8); contextPtr->glNamedRenderbufferStorageMultisample = LoadGLFunction(load, - "glNamedRenderbufferStorageMultisample"u8); + "glNamedRenderbufferStorageMultisample"u8); contextPtr->glReadnPixels = LoadGLFunction(load, - "glReadnPixels"u8); - contextPtr->glTextureBarrier = LoadGLFunction(load, "glTextureBarrier"u8); + "glReadnPixels"u8); + contextPtr->glTextureBarrier = LoadGLFunction(load, "glTextureBarrier"u8); contextPtr->glTextureBuffer = LoadGLFunction(load, - "glTextureBuffer"u8); + "glTextureBuffer"u8); contextPtr->glTextureBufferRange = LoadGLFunction(load, - "glTextureBufferRange"u8); + "glTextureBufferRange"u8); contextPtr->glTextureParameterIiv = LoadGLFunction(load, - "glTextureParameterIiv"u8); + "glTextureParameterIiv"u8); contextPtr->glTextureParameterIuiv = LoadGLFunction(load, - "glTextureParameterIuiv"u8); + "glTextureParameterIuiv"u8); contextPtr->glTextureParameterf = LoadGLFunction(load, - "glTextureParameterf"u8); + "glTextureParameterf"u8); contextPtr->glTextureParameterfv = LoadGLFunction(load, - "glTextureParameterfv"u8); + "glTextureParameterfv"u8); contextPtr->glTextureParameteri = LoadGLFunction(load, - "glTextureParameteri"u8); + "glTextureParameteri"u8); contextPtr->glTextureParameteriv = LoadGLFunction(load, - "glTextureParameteriv"u8); + "glTextureParameteriv"u8); contextPtr->glTextureStorage1D = LoadGLFunction(load, - "glTextureStorage1D"u8); + "glTextureStorage1D"u8); contextPtr->glTextureStorage2D = LoadGLFunction(load, - "glTextureStorage2D"u8); + "glTextureStorage2D"u8); contextPtr->glTextureStorage2DMultisample = LoadGLFunction(load, - "glTextureStorage2DMultisample"u8); + "glTextureStorage2DMultisample"u8); contextPtr->glTextureStorage3D = LoadGLFunction(load, - "glTextureStorage3D"u8); + "glTextureStorage3D"u8); contextPtr->glTextureStorage3DMultisample = LoadGLFunction(load, - "glTextureStorage3DMultisample"u8); + "glTextureStorage3DMultisample"u8); contextPtr->glTextureSubImage1D = LoadGLFunction(load, - "glTextureSubImage1D"u8); + "glTextureSubImage1D"u8); contextPtr->glTextureSubImage2D = LoadGLFunction(load, - "glTextureSubImage2D"u8); + "glTextureSubImage2D"u8); contextPtr->glTextureSubImage3D = LoadGLFunction(load, - "glTextureSubImage3D"u8); + "glTextureSubImage3D"u8); contextPtr->glTransformFeedbackBufferBase = LoadGLFunction(load, - "glTransformFeedbackBufferBase"u8); + "glTransformFeedbackBufferBase"u8); contextPtr->glTransformFeedbackBufferRange = LoadGLFunction(load, - "glTransformFeedbackBufferRange"u8); - contextPtr->glUnmapNamedBuffer = LoadGLFunction(load, "glUnmapNamedBuffer"u8); + "glTransformFeedbackBufferRange"u8); + contextPtr->glUnmapNamedBuffer = LoadGLFunction(load, "glUnmapNamedBuffer"u8); contextPtr->glVertexArrayAttribBinding = LoadGLFunction(load, - "glVertexArrayAttribBinding"u8); + "glVertexArrayAttribBinding"u8); contextPtr->glVertexArrayAttribFormat = LoadGLFunction(load, - "glVertexArrayAttribFormat"u8); + "glVertexArrayAttribFormat"u8); contextPtr->glVertexArrayAttribIFormat = LoadGLFunction(load, - "glVertexArrayAttribIFormat"u8); + "glVertexArrayAttribIFormat"u8); contextPtr->glVertexArrayAttribLFormat = LoadGLFunction(load, - "glVertexArrayAttribLFormat"u8); + "glVertexArrayAttribLFormat"u8); contextPtr->glVertexArrayBindingDivisor = LoadGLFunction(load, - "glVertexArrayBindingDivisor"u8); + "glVertexArrayBindingDivisor"u8); contextPtr->glVertexArrayElementBuffer = LoadGLFunction(load, - "glVertexArrayElementBuffer"u8); + "glVertexArrayElementBuffer"u8); contextPtr->glVertexArrayVertexBuffer = LoadGLFunction(load, - "glVertexArrayVertexBuffer"u8); + "glVertexArrayVertexBuffer"u8); contextPtr->glVertexArrayVertexBuffers = LoadGLFunction(load, "glVertexArrayVertexBuffers"u8); #endregion load - DefaultLog.InternalAppendLog("Successfully load OpenGL 4.5 APIs"); - return true; - } - - internal static unsafe bool LoadGLcore46( - glContextShadow* contextPtr, - delegate*, IntPtr> load) - { - if (!core46) - { - DefaultLog.InternalAppendLog("The core version 4.6 is not supported."); - return false; + DefaultLog.InternalAppendLog("Successfully load OpenGL 4.5 APIs"); + return true; + } + + internal static unsafe bool LoadGLcore46( + glContextShadow* contextPtr, + delegate*, IntPtr> load) + { + if (!core46) + { + DefaultLog.InternalAppendLog("The core version 4.6 is not supported."); + return false; } #region load contextPtr->glMultiDrawArraysIndirectCount = LoadGLFunction(load, - "glMultiDrawArraysIndirectCount"u8); + "glMultiDrawArraysIndirectCount"u8); contextPtr->glMultiDrawElementsIndirectCount = LoadGLFunction(load, - "glMultiDrawElementsIndirectCount"u8); + "glMultiDrawElementsIndirectCount"u8); contextPtr->glPolygonOffsetClamp = LoadGLFunction(load, - "glPolygonOffsetClamp"u8); + "glPolygonOffsetClamp"u8); contextPtr->glSpecializeShader = LoadGLFunction(load, "glSpecializeShader"u8); #endregion load - DefaultLog.InternalAppendLog("Successfully load OpenGL 4.6 APIs"); - return true; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static unsafe IntPtr LoadGLFunction(delegate*, IntPtr> load, ReadOnlySpan name) - { - IntPtr ptr = load(name); - if (ptr == IntPtr.Zero) { - DefaultLog.InternalAppendLog($"Failed to load proc {System.Text.Encoding.UTF8.GetString(name)}."); - } - return ptr; - } - - } + DefaultLog.InternalAppendLog("Successfully load OpenGL 4.6 APIs"); + return true; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe IntPtr LoadGLFunction(delegate*, IntPtr> load, ReadOnlySpan name) + { + IntPtr ptr = load(name); + if (ptr == IntPtr.Zero) { + DefaultLog.InternalAppendLog($"Failed to load proc {System.Text.Encoding.UTF8.GetString(name)}."); + } + return ptr; + } + + } } diff --git a/StgSharp.Graphics/OpenGL/glApiManager.cs b/StgSharp.Graphics/OpenGL/glApiManager.cs index 74304e5b..1b5a0848 100644 --- a/StgSharp.Graphics/OpenGL/glApiManager.cs +++ b/StgSharp.Graphics/OpenGL/glApiManager.cs @@ -1,46 +1,46 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// 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.Internal; -using StgSharp.Mathematics; -using StgSharp.Mathematics; -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; +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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.Internal; +using StgSharp.Mathematics; +using StgSharp.Mathematics; +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 = { @@ -50,92 +50,92 @@ namespace StgSharp.Graphics.OpenGL "OpenGL SC " }; - /// - /// Load all supported OpenGL APIs and bind them to given . + /// + /// Load all supported OpenGL APIs and bind them to given . /// - /// - /// The handle to current OpenGL viewPortDisplay + /// + /// The handle to current OpenGL viewPortDisplay /// - public static unsafe void LoadOpenGLApiTo( - IntPtr contextHandle - ) - { - OpenglContext* context = (OpenglContext*)contextHandle; - if (context->glGetString != null) { - return; - } - delegate*, IntPtr> loader = &GraphicFramework.glfwGetProcAddress; - IntPtr proc = GraphicFramework.glfwGetProcAddress("glGetString"u8); - if (proc == IntPtr.Zero) + public static unsafe void LoadOpenGLApiTo( + IntPtr contextHandle + ) + { + OpenglContext* context = (OpenglContext*)contextHandle; + if (context->glGetString != null) { + 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 NotSupportedException("Cannot load gl"); - } + throw new NotSupportedException("Cannot load gl"); + } context->glGetString = (delegate*)proc; - string coreVersion; - if (context->glGetString(glVersion) == null) { - DefaultLog.InternalWriteLog("Failed to call glGetString", LogType.Error); - } - coreVersion = Marshal.PtrToStringAnsi((nint)context->glGetString(glVersion)) ?? + string coreVersion; + if (context->glGetString(glVersion) == null) { + DefaultLog.InternalWriteLog("Failed to call glGetString", LogType.Error); + } + coreVersion = Marshal.PtrToStringAnsi((nint)context->glGetString(glVersion)) ?? string.Empty; - foreach (string branch in glBranch) - { - if (coreVersion.Contains(branch, StringComparison.Ordinal)) { - coreVersion.Replace(branch, string.Empty, StringComparison.Ordinal); - } - } - string[] versionSep = coreVersion!.Split('.'); - int majorVersion = int.Parse(versionSep[0]); - int minorVersion = int.Parse(versionSep[1]); + foreach (string branch in glBranch) + { + if (coreVersion.Contains(branch, StringComparison.Ordinal)) { + coreVersion.Replace(branch, string.Empty, StringComparison.Ordinal); + } + } + string[] versionSep = coreVersion!.Split('.'); + int majorVersion = int.Parse(versionSep[0]); + int minorVersion = int.Parse(versionSep[1]); CheckCoreVersion(majorVersion, minorVersion); - if (LoadGLcore10((glContextShadow*)context, loader) && - LoadGLcore11((glContextShadow*)context, loader) && - LoadGLcore12((glContextShadow*)context, loader) && - LoadGLcore13((glContextShadow*)context, loader) && - LoadGLcore14((glContextShadow*)context, loader) && - LoadGLcore15((glContextShadow*)context, loader) && - LoadGLcore20((glContextShadow*)context, loader) && - LoadGLcore21((glContextShadow*)context, loader) && - LoadGLcore30((glContextShadow*)context, loader) && - LoadGLcore31((glContextShadow*)context, loader) && - LoadGLcore32((glContextShadow*)context, loader) && - LoadGLcore33((glContextShadow*)context, loader) && - LoadGLcore40((glContextShadow*)context, loader) && - LoadGLcore41((glContextShadow*)context, loader) && - LoadGLcore42((glContextShadow*)context, loader) && - LoadGLcore43((glContextShadow*)context, loader) && - LoadGLcore44((glContextShadow*)context, loader) && - LoadGLcore45((glContextShadow*)context, loader) && + if (LoadGLcore10((glContextShadow*)context, loader) && + LoadGLcore11((glContextShadow*)context, loader) && + LoadGLcore12((glContextShadow*)context, loader) && + LoadGLcore13((glContextShadow*)context, loader) && + LoadGLcore14((glContextShadow*)context, loader) && + LoadGLcore15((glContextShadow*)context, loader) && + LoadGLcore20((glContextShadow*)context, loader) && + LoadGLcore21((glContextShadow*)context, loader) && + LoadGLcore30((glContextShadow*)context, loader) && + LoadGLcore31((glContextShadow*)context, loader) && + LoadGLcore32((glContextShadow*)context, loader) && + LoadGLcore33((glContextShadow*)context, loader) && + LoadGLcore40((glContextShadow*)context, loader) && + LoadGLcore41((glContextShadow*)context, loader) && + LoadGLcore42((glContextShadow*)context, loader) && + LoadGLcore43((glContextShadow*)context, loader) && + LoadGLcore44((glContextShadow*)context, loader) && + LoadGLcore45((glContextShadow*)context, loader) && LoadGLcore46((glContextShadow*)context, loader)) { } - uint code = context->glGetError(); - if (code != 0) - { - Console.WriteLine(code); - throw new GlExecutionException(code); + 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) - { + int extensionCount; + context->glGetIntegerv(glConst.NUM_EXTENSIONS, &extensionCount); + if (extensionCount == 0) + { DefaultLog.InternalWriteLog( - "No supported OpenGL extensions are found.", LogType.Info); - return; + "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); + for (uint i = 0; i < extensionCount; i++) + { + byte* strPtr = context->glGetStringi(glConst.EXTENSIONS, i); + extensions.Add(Marshal.PtrToStringAnsi((IntPtr)strPtr) ?? string.Empty); } DefaultLog.InternalWriteLog( @@ -144,3283 +144,3283 @@ namespace StgSharp.Graphics.OpenGL #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("gl_AMD_blend_minmax_factor"); - } - if (extensions.Contains("gl_AMD_conservative_depth")) - { - AMD_conservative_depth = true; - extensions.Remove("gl_AMD_conservative_depth"); - } - if (extensions.Contains("gl_AMD_debug_output")) - { - AMD_debug_output = true; - extensions.Remove("gl_AMD_debug_output"); - } - if (extensions.Contains("gl_AMD_depth_clamp_separate")) - { - AMD_depth_clamp_separate = true; - extensions.Remove("gl_AMD_depth_clamp_separate"); - } - if (extensions.Contains("gl_AMD_draw_buffers_blend")) - { - AMD_draw_buffers_blend = true; - extensions.Remove("gl_AMD_draw_buffers_blend"); - } - if (extensions.Contains("gl_AMD_framebuffer_multisample_advanced")) - { - AMD_framebuffer_multisample_advanced = true; - extensions.Remove("gl_AMD_framebuffer_multisample_advanced"); - } - if (extensions.Contains("gl_AMD_framebuffer_sample_positions")) - { - AMD_framebuffer_sample_positions = true; - extensions.Remove("gl_AMD_framebuffer_sample_positions"); - } - if (extensions.Contains("gl_AMD_gcn_shader")) - { - AMD_gcn_shader = true; - extensions.Remove("gl_AMD_gcn_shader"); - } - if (extensions.Contains("gl_AMD_gpu_shader_half_float")) - { - AMD_gpu_shader_half_float = true; - extensions.Remove("gl_AMD_gpu_shader_half_float"); - } - if (extensions.Contains("gl_AMD_gpu_shader_int16")) - { - AMD_gpu_shader_int16 = true; - extensions.Remove("gl_AMD_gpu_shader_int16"); - } - if (extensions.Contains("gl_AMD_gpu_shader_int64")) - { - AMD_gpu_shader_int64 = true; - extensions.Remove("gl_AMD_gpu_shader_int64"); - } - if (extensions.Contains("gl_AMD_interleaved_elements")) - { - AMD_interleaved_elements = true; - extensions.Remove("gl_AMD_interleaved_elements"); - } - if (extensions.Contains("gl_AMD_multi_draw_indirect")) - { - AMD_multi_draw_indirect = true; - extensions.Remove("gl_AMD_multi_draw_indirect"); - } - if (extensions.Contains("gl_AMD_name_gen_delete")) - { - AMD_name_gen_delete = true; - extensions.Remove("gl_AMD_name_gen_delete"); - } - if (extensions.Contains("gl_AMD_occlusion_query_event")) - { - AMD_occlusion_query_event = true; - extensions.Remove("gl_AMD_occlusion_query_event"); - } - if (extensions.Contains("gl_AMD_performance_monitor")) - { - AMD_performance_monitor = true; - extensions.Remove("gl_AMD_performance_monitor"); - } - if (extensions.Contains("gl_AMD_pinned_memory")) - { - AMD_pinned_memory = true; - extensions.Remove("gl_AMD_pinned_memory"); - } - if (extensions.Contains("gl_AMD_query_buffer_object")) - { - AMD_query_buffer_object = true; - extensions.Remove("gl_AMD_query_buffer_object"); - } - if (extensions.Contains("gl_AMD_sample_positions")) - { - AMD_sample_positions = true; - extensions.Remove("gl_AMD_sample_positions"); - } - if (extensions.Contains("gl_AMD_seamless_cubemap_per_texture")) - { - AMD_seamless_cubemap_per_texture = true; - extensions.Remove("gl_AMD_seamless_cubemap_per_texture"); - } - if (extensions.Contains("gl_AMD_shader_atomic_counter_ops")) - { - AMD_shader_atomic_counter_ops = true; - extensions.Remove("gl_AMD_shader_atomic_counter_ops"); - } - if (extensions.Contains("gl_AMD_shader_ballot")) - { - AMD_shader_ballot = true; - extensions.Remove("gl_AMD_shader_ballot"); - } - if (extensions.Contains("gl_AMD_shader_explicit_vertex_parameter")) - { - AMD_shader_explicit_vertex_parameter = true; - extensions.Remove("gl_AMD_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("gl_AMD_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("gl_AMD_shader_image_load_store_lod"); - } - if (extensions.Contains("gl_AMD_shader_stencil_export")) - { - AMD_shader_stencil_export = true; - extensions.Remove("gl_AMD_shader_stencil_export"); - } - if (extensions.Contains("gl_AMD_shader_trinary_minmax")) - { - AMD_shader_trinary_minmax = true; - extensions.Remove("gl_AMD_shader_trinary_minmax"); - } - if (extensions.Contains("gl_AMD_sparse_texture")) - { - AMD_sparse_texture = true; - extensions.Remove("gl_AMD_sparse_texture"); - } - if (extensions.Contains("gl_AMD_stencil_operation_extended")) - { - AMD_stencil_operation_extended = true; - extensions.Remove("gl_AMD_stencil_operation_extended"); - } - if (extensions.Contains("gl_AMD_texture_gather_bias_lod")) - { - AMD_texture_gather_bias_lod = true; - extensions.Remove("gl_AMD_texture_gather_bias_lod"); - } - if (extensions.Contains("gl_AMD_texture_texture4")) - { - AMD_texture_texture4 = true; - extensions.Remove("gl_AMD_texture_texture4"); - } - if (extensions.Contains("gl_AMD_transform_feedback3_lines_triangles")) - { - AMD_transform_feedback3_lines_triangles = true; - extensions.Remove("gl_AMD_transform_feedback3_lines_triangles"); - } - if (extensions.Contains("gl_AMD_transform_feedback4")) - { - AMD_transform_feedback4 = true; - extensions.Remove("gl_AMD_transform_feedback4"); - } - if (extensions.Contains("gl_AMD_vertex_shader_layer")) - { - AMD_vertex_shader_layer = true; - extensions.Remove("gl_AMD_vertex_shader_layer"); - } - if (extensions.Contains("gl_AMD_vertex_shader_tessellator")) - { - AMD_vertex_shader_tessellator = true; - extensions.Remove("gl_AMD_vertex_shader_tessellator"); - } - if (extensions.Contains("gl_AMD_vertex_shader_viewport_index")) - { - AMD_vertex_shader_viewport_index = true; - extensions.Remove("gl_AMD_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"); + 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("gl_AMD_blend_minmax_factor"); + } + if (extensions.Contains("gl_AMD_conservative_depth")) + { + AMD_conservative_depth = true; + extensions.Remove("gl_AMD_conservative_depth"); + } + if (extensions.Contains("gl_AMD_debug_output")) + { + AMD_debug_output = true; + extensions.Remove("gl_AMD_debug_output"); + } + if (extensions.Contains("gl_AMD_depth_clamp_separate")) + { + AMD_depth_clamp_separate = true; + extensions.Remove("gl_AMD_depth_clamp_separate"); + } + if (extensions.Contains("gl_AMD_draw_buffers_blend")) + { + AMD_draw_buffers_blend = true; + extensions.Remove("gl_AMD_draw_buffers_blend"); + } + if (extensions.Contains("gl_AMD_framebuffer_multisample_advanced")) + { + AMD_framebuffer_multisample_advanced = true; + extensions.Remove("gl_AMD_framebuffer_multisample_advanced"); + } + if (extensions.Contains("gl_AMD_framebuffer_sample_positions")) + { + AMD_framebuffer_sample_positions = true; + extensions.Remove("gl_AMD_framebuffer_sample_positions"); + } + if (extensions.Contains("gl_AMD_gcn_shader")) + { + AMD_gcn_shader = true; + extensions.Remove("gl_AMD_gcn_shader"); + } + if (extensions.Contains("gl_AMD_gpu_shader_half_float")) + { + AMD_gpu_shader_half_float = true; + extensions.Remove("gl_AMD_gpu_shader_half_float"); + } + if (extensions.Contains("gl_AMD_gpu_shader_int16")) + { + AMD_gpu_shader_int16 = true; + extensions.Remove("gl_AMD_gpu_shader_int16"); + } + if (extensions.Contains("gl_AMD_gpu_shader_int64")) + { + AMD_gpu_shader_int64 = true; + extensions.Remove("gl_AMD_gpu_shader_int64"); + } + if (extensions.Contains("gl_AMD_interleaved_elements")) + { + AMD_interleaved_elements = true; + extensions.Remove("gl_AMD_interleaved_elements"); + } + if (extensions.Contains("gl_AMD_multi_draw_indirect")) + { + AMD_multi_draw_indirect = true; + extensions.Remove("gl_AMD_multi_draw_indirect"); + } + if (extensions.Contains("gl_AMD_name_gen_delete")) + { + AMD_name_gen_delete = true; + extensions.Remove("gl_AMD_name_gen_delete"); + } + if (extensions.Contains("gl_AMD_occlusion_query_event")) + { + AMD_occlusion_query_event = true; + extensions.Remove("gl_AMD_occlusion_query_event"); + } + if (extensions.Contains("gl_AMD_performance_monitor")) + { + AMD_performance_monitor = true; + extensions.Remove("gl_AMD_performance_monitor"); + } + if (extensions.Contains("gl_AMD_pinned_memory")) + { + AMD_pinned_memory = true; + extensions.Remove("gl_AMD_pinned_memory"); + } + if (extensions.Contains("gl_AMD_query_buffer_object")) + { + AMD_query_buffer_object = true; + extensions.Remove("gl_AMD_query_buffer_object"); + } + if (extensions.Contains("gl_AMD_sample_positions")) + { + AMD_sample_positions = true; + extensions.Remove("gl_AMD_sample_positions"); + } + if (extensions.Contains("gl_AMD_seamless_cubemap_per_texture")) + { + AMD_seamless_cubemap_per_texture = true; + extensions.Remove("gl_AMD_seamless_cubemap_per_texture"); + } + if (extensions.Contains("gl_AMD_shader_atomic_counter_ops")) + { + AMD_shader_atomic_counter_ops = true; + extensions.Remove("gl_AMD_shader_atomic_counter_ops"); + } + if (extensions.Contains("gl_AMD_shader_ballot")) + { + AMD_shader_ballot = true; + extensions.Remove("gl_AMD_shader_ballot"); + } + if (extensions.Contains("gl_AMD_shader_explicit_vertex_parameter")) + { + AMD_shader_explicit_vertex_parameter = true; + extensions.Remove("gl_AMD_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("gl_AMD_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("gl_AMD_shader_image_load_store_lod"); + } + if (extensions.Contains("gl_AMD_shader_stencil_export")) + { + AMD_shader_stencil_export = true; + extensions.Remove("gl_AMD_shader_stencil_export"); + } + if (extensions.Contains("gl_AMD_shader_trinary_minmax")) + { + AMD_shader_trinary_minmax = true; + extensions.Remove("gl_AMD_shader_trinary_minmax"); + } + if (extensions.Contains("gl_AMD_sparse_texture")) + { + AMD_sparse_texture = true; + extensions.Remove("gl_AMD_sparse_texture"); + } + if (extensions.Contains("gl_AMD_stencil_operation_extended")) + { + AMD_stencil_operation_extended = true; + extensions.Remove("gl_AMD_stencil_operation_extended"); + } + if (extensions.Contains("gl_AMD_texture_gather_bias_lod")) + { + AMD_texture_gather_bias_lod = true; + extensions.Remove("gl_AMD_texture_gather_bias_lod"); + } + if (extensions.Contains("gl_AMD_texture_texture4")) + { + AMD_texture_texture4 = true; + extensions.Remove("gl_AMD_texture_texture4"); + } + if (extensions.Contains("gl_AMD_transform_feedback3_lines_triangles")) + { + AMD_transform_feedback3_lines_triangles = true; + extensions.Remove("gl_AMD_transform_feedback3_lines_triangles"); + } + if (extensions.Contains("gl_AMD_transform_feedback4")) + { + AMD_transform_feedback4 = true; + extensions.Remove("gl_AMD_transform_feedback4"); + } + if (extensions.Contains("gl_AMD_vertex_shader_layer")) + { + AMD_vertex_shader_layer = true; + extensions.Remove("gl_AMD_vertex_shader_layer"); + } + if (extensions.Contains("gl_AMD_vertex_shader_tessellator")) + { + AMD_vertex_shader_tessellator = true; + extensions.Remove("gl_AMD_vertex_shader_tessellator"); + } + if (extensions.Contains("gl_AMD_vertex_shader_viewport_index")) + { + AMD_vertex_shader_viewport_index = true; + extensions.Remove("gl_AMD_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) { + } + + internal static void CheckCoreVersion( + int majorVersion, + int minorVersion + ) + { + if (majorVersion < 3) { throw new InvalidOperationException( - "StgSharp does not support OpenGL immediate mode."); + "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 == 0))) + { + core10 = true; + } else + { + goto log; } - if ((majorVersion >= 1) || ((majorVersion == 1) && (minorVersion == 1))) - { - core11 = 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 == 2))) + { + core12 = true; + } else + { + goto log; } - if ((majorVersion >= 1) || ((majorVersion == 1) && (minorVersion == 3))) - { - core13 = 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 == 4))) + { + core14 = true; + } else + { + goto log; } - if ((majorVersion >= 1) || ((majorVersion == 1) && (minorVersion == 5))) - { - core15 = 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 == 0))) + { + core20 = true; + } else + { + goto log; } - if ((majorVersion >= 2) || ((majorVersion == 2) && (minorVersion == 1))) - { - core21 = 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 == 0))) + { + core30 = true; + } else + { + goto log; } - if ((majorVersion >= 3) || ((majorVersion == 3) && (minorVersion == 1))) - { - core31 = 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 == 2))) + { + core32 = true; + } else + { + goto log; } - if ((majorVersion >= 3) || ((majorVersion == 3) && (minorVersion == 3))) - { - core33 = 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 == 0))) + { + core40 = true; + } else + { + goto log; } - if ((majorVersion >= 4) || ((majorVersion == 4) && (minorVersion == 1))) - { - core41 = 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 == 2))) + { + core42 = true; + } else + { + goto log; } - if ((majorVersion >= 4) || ((majorVersion == 4) && (minorVersion == 3))) - { - core43 = 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 == 4))) + { + core44 = true; + } else + { + goto log; } - if ((majorVersion >= 4) || ((majorVersion == 4) && (minorVersion == 5))) - { - core45 = 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; + if ((majorVersion >= 4) || ((majorVersion == 4) && (minorVersion == 6))) + { + core46 = true; + } else + { + goto log; } log: - { - DefaultLog.InternalWriteLog("Find core OpenGL version.", LogType.Info); + { + 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((nint)context.glGetString(glExtension))!; - } - - } + } + } + + internal static unsafe string GetExtensions( + this OpenglContext context + ) + { + if (context.glGetString == null) { + return string.Empty; + } + return Marshal.PtrToStringAnsi((nint)context.glGetString(glExtension))!; + } + + } } \ No newline at end of file diff --git a/StgSharp.Graphics/Pixels.cs b/StgSharp.Graphics/Pixels.cs index e33f4495..c72ef34b 100644 --- a/StgSharp.Graphics/Pixels.cs +++ b/StgSharp.Graphics/Pixels.cs @@ -1,104 +1,104 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="Pixels" -// 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 System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Text; - -namespace StgSharp.Graphics -{ - public interface IPixel - { - - public float Red { get; set; } - - public float Green { get; set; } - - public float Blue { get; set; } - - public float Alpha { get; set; } - - internal int Size { get; } - - } - - [StructLayout(LayoutKind.Explicit, Size = 32)] - public unsafe struct Pixel32RGBA : IPixel - { - - [FieldOffset(0)] private unsafe fixed byte data[4]; - [FieldOffset(0)] private readonly int mask; - - public readonly int Size => 4; - - public override bool Equals(object obj) - { - return obj is not null && obj is Pixel32RGBA pixel && this == pixel; - } - - public override readonly int GetHashCode() - { - return mask.GetHashCode(); - } - - public static bool operator !=(Pixel32RGBA left, Pixel32RGBA right) - { - return !(left == right); - } - - public static bool operator ==(Pixel32RGBA left, Pixel32RGBA right) - { - return left.mask == right.mask; - } - - float IPixel.Alpha - { - get => data[3] / 256; - set => data[3] = (byte)(value * 256); - } - - float IPixel.Blue - { - get => data[2] / 256; - set => data[2] = (byte)(value * 256); - } - - float IPixel.Green - { - get => data[1] / 256; - set => data[1] = (byte)(value * 256); - } - - float IPixel.Red - { - get => data[0] / 256; - set => data[0] = (byte)(value * 256); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="Pixels" +// 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 System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Text; + +namespace StgSharp.Graphics +{ + public interface IPixel + { + + public float Red { get; set; } + + public float Green { get; set; } + + public float Blue { get; set; } + + public float Alpha { get; set; } + + internal int Size { get; } + + } + + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe struct Pixel32RGBA : IPixel + { + + [FieldOffset(0)] private unsafe fixed byte data[4]; + [FieldOffset(0)] private readonly int mask; + + public readonly int Size => 4; + + public override bool Equals(object obj) + { + return obj is not null && obj is Pixel32RGBA pixel && this == pixel; + } + + public override readonly int GetHashCode() + { + return mask.GetHashCode(); + } + + public static bool operator !=(Pixel32RGBA left, Pixel32RGBA right) + { + return !(left == right); + } + + public static bool operator ==(Pixel32RGBA left, Pixel32RGBA right) + { + return left.mask == right.mask; + } + + float IPixel.Alpha + { + get => data[3] / 256; + set => data[3] = (byte)(value * 256); + } + + float IPixel.Blue + { + get => data[2] / 256; + set => data[2] = (byte)(value * 256); + } + + float IPixel.Green + { + get => data[1] / 256; + set => data[1] = (byte)(value * 256); + } + + float IPixel.Red + { + get => data[0] / 256; + set => data[0] = (byte)(value * 256); + } + + } +} diff --git a/StgSharp.Graphics/gl.cs b/StgSharp.Graphics/gl.cs index d29a5d5e..6d592c07 100644 --- a/StgSharp.Graphics/gl.cs +++ b/StgSharp.Graphics/gl.cs @@ -1,96 +1,96 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="gl.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.Graphics; -using StgSharp.Graphics.OpenGL; -using StgSharp.Internal; -using System; -using System.Collections.Generic; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace StgSharp.Graphics -{ - internal static partial class GraphicFramework - { - - internal static uint[] GLtype = new uint[16]; - - static GraphicFramework() - { - GLtype[(int)TypeCode.Single] = glConst.FLOAT; - GLtype[(int)TypeCode.Int32] = glConst.INT; - GLtype[(int)TypeCode.UInt32] = glConst.UNSIGNED_INT; - GLtype[(int)TypeCode.Int16] = glConst.SHORT; - GLtype[(int)TypeCode.UInt16] = glConst.UNSIGNED_SHORT; - GLtype[(int)TypeCode.SByte] = glConst.BYTE; - GLtype[(int)TypeCode.Byte] = glConst.UNSIGNED_BYTE; - } - - [LibraryImport(Native.LibName, EntryPoint = "glCheckShaderStat")] +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="gl.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.Graphics; +using StgSharp.Graphics.OpenGL; +using StgSharp.Internal; +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace StgSharp.Graphics +{ + internal static partial class GraphicFramework + { + + internal static uint[] GLtype = new uint[16]; + + static GraphicFramework() + { + GLtype[(int)TypeCode.Single] = glConst.FLOAT; + GLtype[(int)TypeCode.Int32] = glConst.INT; + GLtype[(int)TypeCode.UInt32] = glConst.UNSIGNED_INT; + GLtype[(int)TypeCode.Int16] = glConst.SHORT; + GLtype[(int)TypeCode.UInt16] = glConst.UNSIGNED_SHORT; + GLtype[(int)TypeCode.SByte] = glConst.BYTE; + GLtype[(int)TypeCode.Byte] = glConst.UNSIGNED_BYTE; + } + + [LibraryImport(Native.LibName, EntryPoint = "glCheckShaderStat")] [UnmanagedCallConv(CallConvs = [ typeof(CallConvCdecl) ])] #pragma warning disable CA5392 - internal static partial int glCheckShaderStatus( - ref OpenglContext context, - uint shaderHandle, - int key, + internal static partial int glCheckShaderStatus( + ref OpenglContext context, + uint shaderHandle, + int key, ref IntPtr logPtr); #pragma warning restore CA5392 #region ssgc api define - [LibraryImport(Native.LibName, EntryPoint = "initGL")] - [UnmanagedCallConv(CallConvs =[ typeof(CallConvCdecl) ])] - internal static partial void InternalInitGL(int majorVersion, int minorVersion); - - [LibraryImport(Native.LibName, EntryPoint = "loadGlfuncDefault", StringMarshalling = StringMarshalling.Utf8)] - [UnmanagedCallConv(CallConvs =[ typeof(CallConvCdecl) ])] - internal static partial IntPtr InternalLoadGlFuncDefault(string name); - - [LibraryImport(Native.LibName, EntryPoint = "linkShaderProgram")] - [UnmanagedCallConv(CallConvs =[ typeof(CallConvCdecl) ])] - internal static unsafe partial uint InternalLinkShaderProgram(OpenglContext* context, uint shaderProgram); - - [LibraryImport(Native.LibName, EntryPoint = "readLog")] - [UnmanagedCallConv(CallConvs =[ typeof(CallConvCdecl) ])] - internal static unsafe partial IntPtr InternalReadSSCLog(); - - [LibraryImport(Native.LibName, EntryPoint = "loadImageData", StringMarshalling = StringMarshalling.Utf8)] - [UnmanagedCallConv(CallConvs =[ typeof(CallConvCdecl) ])] - internal static unsafe partial void InternalLoadImage(string fileName, ImageInfo* output, ImageLoader loader); - - [LibraryImport(Native.LibName, EntryPoint = "unloadImageData")] - [UnmanagedCallConv(CallConvs =[ typeof(CallConvCdecl) ])] + [LibraryImport(Native.LibName, EntryPoint = "initGL")] + [UnmanagedCallConv(CallConvs =[ typeof(CallConvCdecl) ])] + internal static partial void InternalInitGL(int majorVersion, int minorVersion); + + [LibraryImport(Native.LibName, EntryPoint = "loadGlfuncDefault", StringMarshalling = StringMarshalling.Utf8)] + [UnmanagedCallConv(CallConvs =[ typeof(CallConvCdecl) ])] + internal static partial IntPtr InternalLoadGlFuncDefault(string name); + + [LibraryImport(Native.LibName, EntryPoint = "linkShaderProgram")] + [UnmanagedCallConv(CallConvs =[ typeof(CallConvCdecl) ])] + internal static unsafe partial uint InternalLinkShaderProgram(OpenglContext* context, uint shaderProgram); + + [LibraryImport(Native.LibName, EntryPoint = "readLog")] + [UnmanagedCallConv(CallConvs =[ typeof(CallConvCdecl) ])] + internal static unsafe partial IntPtr InternalReadSSCLog(); + + [LibraryImport(Native.LibName, EntryPoint = "loadImageData", StringMarshalling = StringMarshalling.Utf8)] + [UnmanagedCallConv(CallConvs =[ typeof(CallConvCdecl) ])] + internal static unsafe partial void InternalLoadImage(string fileName, ImageInfo* output, ImageLoader loader); + + [LibraryImport(Native.LibName, EntryPoint = "unloadImageData")] + [UnmanagedCallConv(CallConvs =[ typeof(CallConvCdecl) ])] internal static unsafe partial void InternalUnloadImage(ImageInfo* output); #endregion ssgc api define - } + } } diff --git a/StgSharp.Mathematics/AssemblyInfo.cs b/StgSharp.Mathematics/AssemblyInfo.cs index da2b3310..b7896aec 100644 --- a/StgSharp.Mathematics/AssemblyInfo.cs +++ b/StgSharp.Mathematics/AssemblyInfo.cs @@ -1,31 +1,31 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="AssemblyInfo" -// 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.Runtime.CompilerServices; - +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="AssemblyInfo" +// 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.Runtime.CompilerServices; + [assembly: InternalsVisibleTo("StgSharpDebug")] \ No newline at end of file diff --git a/StgSharp.Mathematics/Geometries/Coordination/CoordinationBase.cs b/StgSharp.Mathematics/Geometries/Coordination/CoordinationBase.cs index 3abdf960..0ea25ab9 100644 --- a/StgSharp.Mathematics/Geometries/Coordination/CoordinationBase.cs +++ b/StgSharp.Mathematics/Geometries/Coordination/CoordinationBase.cs @@ -1,78 +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.Graphics; - -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; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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.Graphics; + +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.Mathematics/Geometries/Coordination/PlainCoordinate.cs b/StgSharp.Mathematics/Geometries/Coordination/PlainCoordinate.cs index ba8cccc2..c37dad81 100644 --- a/StgSharp.Mathematics/Geometries/Coordination/PlainCoordinate.cs +++ b/StgSharp.Mathematics/Geometries/Coordination/PlainCoordinate.cs @@ -1,57 +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.Graphics; - -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)); - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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.Graphics; + +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.Mathematics/Geometries/Coordination/SpaceCoordinate.cs b/StgSharp.Mathematics/Geometries/Coordination/SpaceCoordinate.cs index d23ee741..b0566805 100644 --- a/StgSharp.Mathematics/Geometries/Coordination/SpaceCoordinate.cs +++ b/StgSharp.Mathematics/Geometries/Coordination/SpaceCoordinate.cs @@ -1,44 +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.Graphics; - -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) { } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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.Graphics; + +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.Mathematics/Geometries/Coordination/StreamLocalCoordinate.cs b/StgSharp.Mathematics/Geometries/Coordination/StreamLocalCoordinate.cs index 42a92e9e..94b989f9 100644 --- a/StgSharp.Mathematics/Geometries/Coordination/StreamLocalCoordinate.cs +++ b/StgSharp.Mathematics/Geometries/Coordination/StreamLocalCoordinate.cs @@ -1,43 +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 - { - } - /**/ -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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.Mathematics/Geometries/GemoryException.cs b/StgSharp.Mathematics/Geometries/GemoryException.cs index d1121199..d8117f18 100644 --- a/StgSharp.Mathematics/Geometries/GemoryException.cs +++ b/StgSharp.Mathematics/Geometries/GemoryException.cs @@ -1,61 +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) { } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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.Mathematics/Geometries/GeometryOperation/GeometryOperation.cs b/StgSharp.Mathematics/Geometries/GeometryOperation/GeometryOperation.cs index 154f5741..06522aea 100644 --- a/StgSharp.Mathematics/Geometries/GeometryOperation/GeometryOperation.cs +++ b/StgSharp.Mathematics/Geometries/GeometryOperation/GeometryOperation.cs @@ -1,113 +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.Graphics; -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 ------------------------------- -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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.Graphics; +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.Mathematics/Geometries/GeometryScaler/Angle.cs b/StgSharp.Mathematics/Geometries/GeometryScaler/Angle.cs index d927a67f..5f2cacad 100644 --- a/StgSharp.Mathematics/Geometries/GeometryScaler/Angle.cs +++ b/StgSharp.Mathematics/Geometries/GeometryScaler/Angle.cs @@ -1,220 +1,220 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// 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 / MathF.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 / MathF.PI); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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 / MathF.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 / MathF.PI); + } + + } +} diff --git a/StgSharp.Mathematics/Geometries/IGeometry.cs b/StgSharp.Mathematics/Geometries/IGeometry.cs index 9154f455..009350c8 100644 --- a/StgSharp.Mathematics/Geometries/IGeometry.cs +++ b/StgSharp.Mathematics/Geometries/IGeometry.cs @@ -1,56 +1,56 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="IGeometry" -// 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.Mathematics; -using StgSharp.Mathematics.Graphics; - -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 { get; } - #pragma warning restore CA1819 - - public CoordinationBase Coordination { get; } - - public int VertexCount { get; } - - public ReadOnlySpan VertexIndices { get; } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="IGeometry" +// 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.Mathematics; +using StgSharp.Mathematics.Graphics; + +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 { get; } + #pragma warning restore CA1819 + + public CoordinationBase Coordination { get; } + + public int VertexCount { get; } + + public ReadOnlySpan VertexIndices { get; } + + } +} diff --git a/StgSharp.Mathematics/Geometries/IGeomtryBuffer.cs b/StgSharp.Mathematics/Geometries/IGeomtryBuffer.cs index 66ebf3ac..3cb80107 100644 --- a/StgSharp.Mathematics/Geometries/IGeomtryBuffer.cs +++ b/StgSharp.Mathematics/Geometries/IGeomtryBuffer.cs @@ -1,37 +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 { } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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.Mathematics/Geometries/IInstancing.cs b/StgSharp.Mathematics/Geometries/IInstancing.cs index 092d6d4f..eeeb5fce 100644 --- a/StgSharp.Mathematics/Geometries/IInstancing.cs +++ b/StgSharp.Mathematics/Geometries/IInstancing.cs @@ -1,73 +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.Graphics; - -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); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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.Graphics; + +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.Mathematics/Geometries/IInstancingBuffer.cs b/StgSharp.Mathematics/Geometries/IInstancingBuffer.cs index 765cb66c..f1fd50bb 100644 --- a/StgSharp.Mathematics/Geometries/IInstancingBuffer.cs +++ b/StgSharp.Mathematics/Geometries/IInstancingBuffer.cs @@ -1,53 +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.Graphics; - -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; } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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.Graphics; + +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.Mathematics/Geometries/PlainGeometry/Cordinate.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Cordinate.cs index 98e1a615..6fa362cf 100644 --- a/StgSharp.Mathematics/Geometries/PlainGeometry/Cordinate.cs +++ b/StgSharp.Mathematics/Geometries/PlainGeometry/Cordinate.cs @@ -1,78 +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 ); - } - */ - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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.Mathematics/Geometries/PlainGeometry/Define/GeometryOperation.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Define/GeometryOperation.cs index b21d366e..1d59e151 100644 --- a/StgSharp.Mathematics/Geometries/PlainGeometry/Define/GeometryOperation.cs +++ b/StgSharp.Mathematics/Geometries/PlainGeometry/Define/GeometryOperation.cs @@ -1,45 +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.Graphics; - -using System.Runtime.CompilerServices; - -namespace StgSharp.Geometries -{ - public static unsafe class GeometryOperation - { - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vec3 DefaultMotion(int tick) - { - return default(Vec3); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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.Graphics; + +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.Mathematics/Geometries/PlainGeometry/Define/IPlainEntity.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Define/IPlainEntity.cs index 87bf1328..72ba974d 100644 --- a/StgSharp.Mathematics/Geometries/PlainGeometry/Define/IPlainEntity.cs +++ b/StgSharp.Mathematics/Geometries/PlainGeometry/Define/IPlainEntity.cs @@ -1,70 +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.Graphics; - -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(); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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.Graphics; + +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.Mathematics/Geometries/PlainGeometry/Define/ParticleOnPlain.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Define/ParticleOnPlain.cs index d0edd04c..ad6f2ac7 100644 --- a/StgSharp.Mathematics/Geometries/PlainGeometry/Define/ParticleOnPlain.cs +++ b/StgSharp.Mathematics/Geometries/PlainGeometry/Define/ParticleOnPlain.cs @@ -1,74 +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.Graphics; - -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(); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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.Graphics; + +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.Mathematics/Geometries/PlainGeometry/Define/PlainGeometry.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Define/PlainGeometry.cs index 270341c4..f053b0ae 100644 --- a/StgSharp.Mathematics/Geometries/PlainGeometry/Define/PlainGeometry.cs +++ b/StgSharp.Mathematics/Geometries/PlainGeometry/Define/PlainGeometry.cs @@ -1,71 +1,71 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// 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; -using StgSharp.Mathematics; -using StgSharp.Mathematics.Graphics; - -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 - } +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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; +using StgSharp.Mathematics; +using StgSharp.Mathematics.Graphics; + +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.Mathematics/Geometries/PlainGeometry/Define/PlainInstancingBuffer.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Define/PlainInstancingBuffer.cs index 7eb977cb..c6839b4f 100644 --- a/StgSharp.Mathematics/Geometries/PlainGeometry/Define/PlainInstancingBuffer.cs +++ b/StgSharp.Mathematics/Geometries/PlainGeometry/Define/PlainInstancingBuffer.cs @@ -1,187 +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.Graphics; -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 - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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.Graphics; +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.Mathematics/Geometries/PlainGeometry/Parallelogram.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Parallelogram.cs index 69de23a0..9daaf692 100644 --- a/StgSharp.Mathematics/Geometries/PlainGeometry/Parallelogram.cs +++ b/StgSharp.Mathematics/Geometries/PlainGeometry/Parallelogram.cs @@ -1,78 +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.Graphics; - -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 - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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.Graphics; + +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.Mathematics/Geometries/PlainGeometry/Plain.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Plain.cs index ac803474..adc9690b 100644 --- a/StgSharp.Mathematics/Geometries/PlainGeometry/Plain.cs +++ b/StgSharp.Mathematics/Geometries/PlainGeometry/Plain.cs @@ -1,86 +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.Graphics; - -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; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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.Graphics; + +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.Mathematics/Geometries/PlainGeometry/Polygon4.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Polygon4.cs index fffbe3d6..d7add70f 100644 --- a/StgSharp.Mathematics/Geometries/PlainGeometry/Polygon4.cs +++ b/StgSharp.Mathematics/Geometries/PlainGeometry/Polygon4.cs @@ -1,139 +1,139 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// 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.Graphics; - -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; - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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.Graphics; + +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.Mathematics/Geometries/PlainGeometry/Polygon5.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Polygon5.cs index f9d0d4de..78740d31 100644 --- a/StgSharp.Mathematics/Geometries/PlainGeometry/Polygon5.cs +++ b/StgSharp.Mathematics/Geometries/PlainGeometry/Polygon5.cs @@ -1,103 +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.Graphics; - -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; - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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.Graphics; + +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.Mathematics/Geometries/PlainGeometry/Polygon6.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Polygon6.cs index 509a32d2..73490242 100644 --- a/StgSharp.Mathematics/Geometries/PlainGeometry/Polygon6.cs +++ b/StgSharp.Mathematics/Geometries/PlainGeometry/Polygon6.cs @@ -1,84 +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.Graphics; - -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; - - } +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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.Graphics; + +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.Mathematics/Geometries/PlainGeometry/Rectangle.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Rectangle.cs index 125669c2..1052ab81 100644 --- a/StgSharp.Mathematics/Geometries/PlainGeometry/Rectangle.cs +++ b/StgSharp.Mathematics/Geometries/PlainGeometry/Rectangle.cs @@ -1,87 +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.Graphics; - -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); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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.Graphics; + +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.Mathematics/Geometries/PlainGeometry/Square.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Square.cs index d8081746..15f04494 100644 --- a/StgSharp.Mathematics/Geometries/PlainGeometry/Square.cs +++ b/StgSharp.Mathematics/Geometries/PlainGeometry/Square.cs @@ -1,47 +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) { } - } - - } +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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.Mathematics/Geometries/PlainGeometry/Triangle.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Triangle.cs index 7e0c4b04..03ac7455 100644 --- a/StgSharp.Mathematics/Geometries/PlainGeometry/Triangle.cs +++ b/StgSharp.Mathematics/Geometries/PlainGeometry/Triangle.cs @@ -1,110 +1,110 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// 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.Mathematics; -using StgSharp.Mathematics.Graphics; - -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; - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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.Mathematics; +using StgSharp.Mathematics.Graphics; + +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.Mathematics/Geometries/Point.cs b/StgSharp.Mathematics/Geometries/Point.cs index ae270da8..93018ab6 100644 --- a/StgSharp.Mathematics/Geometries/Point.cs +++ b/StgSharp.Mathematics/Geometries/Point.cs @@ -1,77 +1,77 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// 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.Graphics; - -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; } - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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.Graphics; + +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.Mathematics/Geometries/SpaceGeometry/Class1.cs b/StgSharp.Mathematics/Geometries/SpaceGeometry/Class1.cs index 17df12ed..60e2a685 100644 --- a/StgSharp.Mathematics/Geometries/SpaceGeometry/Class1.cs +++ b/StgSharp.Mathematics/Geometries/SpaceGeometry/Class1.cs @@ -1,35 +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 { } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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.Mathematics/Geometries/SpaceGeometry/TriangulatedSurface.cs b/StgSharp.Mathematics/Geometries/SpaceGeometry/TriangulatedSurface.cs index 51ed97f8..0081bf65 100644 --- a/StgSharp.Mathematics/Geometries/SpaceGeometry/TriangulatedSurface.cs +++ b/StgSharp.Mathematics/Geometries/SpaceGeometry/TriangulatedSurface.cs @@ -1,146 +1,146 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="TriangulatedSurface" -// 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.Mathematics; -using StgSharp.Mathematics; -using StgSharp.Mathematics.Graphics; - -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; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="TriangulatedSurface" +// 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.Mathematics; +using StgSharp.Mathematics; +using StgSharp.Mathematics.Graphics; + +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.Mathematics/Internal/ColumnSet2.cs b/StgSharp.Mathematics/Internal/ColumnSet2.cs index 44553ed8..f7485a7e 100644 --- a/StgSharp.Mathematics/Internal/ColumnSet2.cs +++ b/StgSharp.Mathematics/Internal/ColumnSet2.cs @@ -1,87 +1,87 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ColumnSet2.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 System; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Text; - -namespace StgSharp.Mathematics.Internal -{ - [StructLayout(LayoutKind.Explicit, Size = 12 * sizeof(float), Pack = 16)] - internal struct ColumnSet2 : IEquatable - { - - [FieldOffset(0 * sizeof(float))] internal float m00; - [FieldOffset(4 * sizeof(float))] internal float m01; - [FieldOffset(1 * sizeof(float))] internal float m10; - [FieldOffset(5 * sizeof(float))] internal float m11; - [FieldOffset(2 * sizeof(float))] internal float m20; - [FieldOffset(6 * sizeof(float))] internal float m21; - [FieldOffset(3 * sizeof(float))] internal float m30; +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ColumnSet2.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 System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Text; + +namespace StgSharp.Mathematics.Internal +{ + [StructLayout(LayoutKind.Explicit, Size = 12 * sizeof(float), Pack = 16)] + internal struct ColumnSet2 : IEquatable + { + + [FieldOffset(0 * sizeof(float))] internal float m00; + [FieldOffset(4 * sizeof(float))] internal float m01; + [FieldOffset(1 * sizeof(float))] internal float m10; + [FieldOffset(5 * sizeof(float))] internal float m11; + [FieldOffset(2 * sizeof(float))] internal float m20; + [FieldOffset(6 * sizeof(float))] internal float m21; + [FieldOffset(3 * sizeof(float))] internal float m30; [FieldOffset(7 * sizeof(float))] internal float m31; - [FieldOffset(0)] internal Vector4 colum0; - [FieldOffset(4 * sizeof(float))] internal Vector4 colum1; - - internal ColumnSet2(Vector4 c0, Vector4 c1) - { - Unsafe.SkipInit(out this); - colum0 = c0; - colum1 = c1; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override bool Equals(object? obj) - { - return (obj is ColumnSet2 mat) && Equals(mat); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public bool Equals(ColumnSet2 other) - { - return colum0.Equals(other.colum0) && colum1.Equals(other.colum1); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator !=(ColumnSet2 left, ColumnSet2 right) - { - return !(left == right); + [FieldOffset(0)] internal Vector4 colum0; + [FieldOffset(4 * sizeof(float))] internal Vector4 colum1; + + internal ColumnSet2(Vector4 c0, Vector4 c1) + { + Unsafe.SkipInit(out this); + colum0 = c0; + colum1 = c1; } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator ==(ColumnSet2 left, ColumnSet2 right) - { - return left.Equals(right); - } - - } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override bool Equals(object? obj) + { + return (obj is ColumnSet2 mat) && Equals(mat); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(ColumnSet2 other) + { + return colum0.Equals(other.colum0) && colum1.Equals(other.colum1); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(ColumnSet2 left, ColumnSet2 right) + { + return !(left == right); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(ColumnSet2 left, ColumnSet2 right) + { + return left.Equals(right); + } + + } } diff --git a/StgSharp.Mathematics/Internal/MatrixKernel.cs b/StgSharp.Mathematics/Internal/MatrixKernel.cs index 4263cf72..f00580d5 100644 --- a/StgSharp.Mathematics/Internal/MatrixKernel.cs +++ b/StgSharp.Mathematics/Internal/MatrixKernel.cs @@ -1,70 +1,70 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="MatrixKernel" -// 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 System; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace StgSharp.Mathematics -{ - public unsafe struct MatrixKernel - { - - private byte Head; - - } - - [StructLayout(LayoutKind.Sequential)] - [InlineArray(16)] - public unsafe struct MatrixKernel where T: unmanaged, INumber - { - - public static readonly int Size = 16 * sizeof(T); - - private T c0r0; - - public MatrixKernel() - { - Unsafe.SkipInit(out this); - } - - public MatrixKernel(bool clear) - { - if (!clear) { - Unsafe.SkipInit(out this); - } - } - - public ref T this[int x, int y] - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => ref Unsafe.Add(ref c0r0, (x * 4) + y); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="MatrixKernel" +// 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 System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace StgSharp.Mathematics +{ + public unsafe struct MatrixKernel + { + + private byte Head; + + } + + [StructLayout(LayoutKind.Sequential)] + [InlineArray(16)] + public unsafe struct MatrixKernel where T: unmanaged, INumber + { + + public static readonly int Size = 16 * sizeof(T); + + private T c0r0; + + public MatrixKernel() + { + Unsafe.SkipInit(out this); + } + + public MatrixKernel(bool clear) + { + if (!clear) { + Unsafe.SkipInit(out this); + } + } + + public ref T this[int x, int y] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => ref Unsafe.Add(ref c0r0, (x * 4) + y); + } + + } +} diff --git a/StgSharp.Mathematics/Internal/MatrixPanel.cs b/StgSharp.Mathematics/Internal/MatrixPanel.cs index a5be8589..edaf411e 100644 --- a/StgSharp.Mathematics/Internal/MatrixPanel.cs +++ b/StgSharp.Mathematics/Internal/MatrixPanel.cs @@ -1,199 +1,199 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="MatrixPanel" -// 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.Internal; -using StgSharp.Mathematics.Numeric; -using System; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace StgSharp.Mathematics.Numeric -{ - public unsafe struct MatrixPanel - { - - public const int AlignmentBytes = 64; - - private byte Head; - - // Allocate aligned memory for one panel; caller must free via Destroy. - public static unsafe MatrixPanel* Create() where T : unmanaged, INumber - { - return (MatrixPanel*)NativeMemory.AlignedAlloc(Size(), AlignmentBytes); - } - - public static unsafe void Destroy( - MatrixPanel* panel - ) where T : unmanaged, INumber - { - NativeMemory.AlignedFree(panel); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe Span Elements( - ref T head - ) where T : unmanaged, INumber - { - void* p = Unsafe.AsPointer(ref head); - return new Span(p, MaxElementCount()); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static int ElementSideLength() where T : unmanaged, INumber - { - return PanelSideLength(); - } - - public static int MaxElementCount() where T : unmanaged, INumber - { - int side = ElementSideLength(); - return side * side; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static nuint Size() where T : unmanaged, INumber - { - return (nuint)(MaxElementCount() * sizeof(T)); - } - - /// - /// Number of 4x4 kernels that fit in a panel for the given ISA and element T. - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static int KernelCapacity() where T : unmanaged, INumber - { - int perSide = KernelSideCount(); - return perSide * perSide; - } - - /// - /// How many 4x4 kernels fit along a single panel dimension for the given ISA. - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static int KernelSideCount() where T : unmanaged, INumber - { - SIMDID id = NumericalModule.GlobalIntrinsicMask; - switch (id.MaskByte[0] & 0b_00001111) - { - case 1: - return id.MaskByte[1] switch - { - 1 => KernelSideCountSse(), - 2 => KernelSideCountAvx2(), - 3 => KernelSideCountAvx512(), - _ => throw new NotSupportedException("Unsupported SIMD level."), - }; - default: - throw new NotSupportedException("Current hardware platform is not supported"); - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static unsafe nuint Align64( - void* p - ) - { - return ((nuint)p + (AlignmentBytes - 1)) & ~(nuint)(AlignmentBytes - 1); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static int KernelSideCountAvx2() where T : unmanaged, INumber - { - return PanelSideFromBits(256) / 4; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static int KernelSideCountAvx512() where T : unmanaged, INumber - { - return PanelSideFromBits(512) / 4; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static int KernelSideCountSse() where T : unmanaged, INumber - { - return PanelSideFromBits(128) / 4; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static int PanelSideFromBits( - int vectorBits - ) where T : unmanaged, INumber - { - int elemBits = sizeof(T) * 8; - - // Q = max(4, vectorBits/64, vectorBits/elemBits) - int by64 = vectorBits / 64; - int byElem = vectorBits / elemBits; - int side = Math.Max(4, Math.Max(by64, byElem)); - return side; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static int PanelSideLength() where T : unmanaged, INumber - { - SIMDID id = NumericalModule.GlobalIntrinsicMask; - switch (id.MaskByte[0] & 0b_00001111) - { - case 1: - return id.MaskByte[1] switch - { - 1 => PanelSideFromBits(128), - 2 => PanelSideFromBits(256), - 3 => PanelSideFromBits(512), - _ => throw new NotSupportedException("Unsupported SIMD level."), - }; - default: - throw new NotSupportedException("Current hardware platform is not supported"); - } - } - - } - - // Single POD-style panel: ZMM-compatible size. Alignment handled by allocator, not by the struct. - public unsafe struct MatrixPanel where T : unmanaged, INumber - { - - internal T Head; // first element of the panel buffer - - public ref T this[ - int column, - int row - ] - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => ref Unsafe.Add(ref Head, row * MatrixPanel.ElementSideLength() + column); - } - - public Span Elements - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => MatrixPanel.Elements(ref Head); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="MatrixPanel" +// 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.Internal; +using StgSharp.Mathematics.Numeric; +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace StgSharp.Mathematics.Numeric +{ + public unsafe struct MatrixPanel + { + + public const int AlignmentBytes = 64; + + private byte Head; + + // Allocate aligned memory for one panel; caller must free via Destroy. + public static unsafe MatrixPanel* Create() where T : unmanaged, INumber + { + return (MatrixPanel*)NativeMemory.AlignedAlloc(Size(), AlignmentBytes); + } + + public static unsafe void Destroy( + MatrixPanel* panel + ) where T : unmanaged, INumber + { + NativeMemory.AlignedFree(panel); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe Span Elements( + ref T head + ) where T : unmanaged, INumber + { + void* p = Unsafe.AsPointer(ref head); + return new Span(p, MaxElementCount()); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int ElementSideLength() where T : unmanaged, INumber + { + return PanelSideLength(); + } + + public static int MaxElementCount() where T : unmanaged, INumber + { + int side = ElementSideLength(); + return side * side; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nuint Size() where T : unmanaged, INumber + { + return (nuint)(MaxElementCount() * sizeof(T)); + } + + /// + /// Number of 4x4 kernels that fit in a panel for the given ISA and element T. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int KernelCapacity() where T : unmanaged, INumber + { + int perSide = KernelSideCount(); + return perSide * perSide; + } + + /// + /// How many 4x4 kernels fit along a single panel dimension for the given ISA. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int KernelSideCount() where T : unmanaged, INumber + { + SIMDID id = NumericalModule.GlobalIntrinsicMask; + switch (id.MaskByte[0] & 0b_00001111) + { + case 1: + return id.MaskByte[1] switch + { + 1 => KernelSideCountSse(), + 2 => KernelSideCountAvx2(), + 3 => KernelSideCountAvx512(), + _ => throw new NotSupportedException("Unsupported SIMD level."), + }; + default: + throw new NotSupportedException("Current hardware platform is not supported"); + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe nuint Align64( + void* p + ) + { + return ((nuint)p + (AlignmentBytes - 1)) & ~(nuint)(AlignmentBytes - 1); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static int KernelSideCountAvx2() where T : unmanaged, INumber + { + return PanelSideFromBits(256) / 4; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static int KernelSideCountAvx512() where T : unmanaged, INumber + { + return PanelSideFromBits(512) / 4; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static int KernelSideCountSse() where T : unmanaged, INumber + { + return PanelSideFromBits(128) / 4; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static int PanelSideFromBits( + int vectorBits + ) where T : unmanaged, INumber + { + int elemBits = sizeof(T) * 8; + + // Q = max(4, vectorBits/64, vectorBits/elemBits) + int by64 = vectorBits / 64; + int byElem = vectorBits / elemBits; + int side = Math.Max(4, Math.Max(by64, byElem)); + return side; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static int PanelSideLength() where T : unmanaged, INumber + { + SIMDID id = NumericalModule.GlobalIntrinsicMask; + switch (id.MaskByte[0] & 0b_00001111) + { + case 1: + return id.MaskByte[1] switch + { + 1 => PanelSideFromBits(128), + 2 => PanelSideFromBits(256), + 3 => PanelSideFromBits(512), + _ => throw new NotSupportedException("Unsupported SIMD level."), + }; + default: + throw new NotSupportedException("Current hardware platform is not supported"); + } + } + + } + + // Single POD-style panel: ZMM-compatible size. Alignment handled by allocator, not by the struct. + public unsafe struct MatrixPanel where T : unmanaged, INumber + { + + internal T Head; // first element of the panel buffer + + public ref T this[ + int column, + int row + ] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => ref Unsafe.Add(ref Head, row * MatrixPanel.ElementSideLength() + column); + } + + public Span Elements + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => MatrixPanel.Elements(ref Head); + } + + } +} diff --git a/StgSharp.Mathematics/Internal/ScalarPacket.cs b/StgSharp.Mathematics/Internal/ScalarPacket.cs index 2fe6fe6a..f9092365 100644 --- a/StgSharp.Mathematics/Internal/ScalarPacket.cs +++ b/StgSharp.Mathematics/Internal/ScalarPacket.cs @@ -1,64 +1,64 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ScalarPacket" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Mathematics -{ - public unsafe struct ScalarPacket - { - - private fixed ulong data[8]; - - public void BroadCast(int slotIndex, TScalar value) - where TScalar: unmanaged, INumber - where TRegister: unmanaged, IRegisterPresentation - { - if (slotIndex is < 0 or >= 8) { - throw new IndexOutOfRangeException(); - } - ref TRegister register = ref Unsafe.As(ref data[slotIndex]); - register.BroadCastFrom(value); - } - - public ref T Data(int index) where T: unmanaged, INumber - { - if (index is < 0 or >= 8) { - throw new IndexOutOfRangeException(); - } - - return ref Unsafe.As(ref data[index]); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ScalarPacket" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Mathematics +{ + public unsafe struct ScalarPacket + { + + private fixed ulong data[8]; + + public void BroadCast(int slotIndex, TScalar value) + where TScalar: unmanaged, INumber + where TRegister: unmanaged, IRegisterPresentation + { + if (slotIndex is < 0 or >= 8) { + throw new IndexOutOfRangeException(); + } + ref TRegister register = ref Unsafe.As(ref data[slotIndex]); + register.BroadCastFrom(value); + } + + public ref T Data(int index) where T: unmanaged, INumber + { + if (index is < 0 or >= 8) { + throw new IndexOutOfRangeException(); + } + + return ref Unsafe.As(ref data[index]); + } + + } +} diff --git a/StgSharp.Mathematics/Internal/UnsafeCompute.cs b/StgSharp.Mathematics/Internal/UnsafeCompute.cs index ded4f415..34fd965d 100644 --- a/StgSharp.Mathematics/Internal/UnsafeCompute.cs +++ b/StgSharp.Mathematics/Internal/UnsafeCompute.cs @@ -1,66 +1,66 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="UnsafeCompute" -// 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.Numeric; -using System.Runtime.CompilerServices; - -namespace StgSharp.Mathematics.Internal -{ - public static class UnsafeCompute - { - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe int CityHashSimplify( - char* span, - int length - ) - { - return NumericalModule.GlobalContext.city_hash_simplify(span, length); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe int CityHashSimplify( - char* span, - int begin, - int length - ) - { - return NumericalModule.GlobalContext.city_hash_simplify(span + begin, length); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe int IndexOfCharPair( - char* source, - int pairValue, - int length - ) - { - return NumericalModule.GlobalContext.index_pair(source, pairValue, length); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="UnsafeCompute" +// 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.Numeric; +using System.Runtime.CompilerServices; + +namespace StgSharp.Mathematics.Internal +{ + public static class UnsafeCompute + { + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe int CityHashSimplify( + char* span, + int length + ) + { + return NumericalModule.GlobalContext.city_hash_simplify(span, length); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe int CityHashSimplify( + char* span, + int begin, + int length + ) + { + return NumericalModule.GlobalContext.city_hash_simplify(span + begin, length); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe int IndexOfCharPair( + char* source, + int pairValue, + int length + ) + { + return NumericalModule.GlobalContext.index_pair(source, pairValue, length); + } + + } +} diff --git a/StgSharp.Mathematics/Numeric/Graphics/Matrix44.cs b/StgSharp.Mathematics/Numeric/Graphics/Matrix44.cs index e7f5be49..7baf8c93 100644 --- a/StgSharp.Mathematics/Numeric/Graphics/Matrix44.cs +++ b/StgSharp.Mathematics/Numeric/Graphics/Matrix44.cs @@ -1,280 +1,280 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="Matrix44" -// 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.Internal; -using StgSharp.Mathematics.Numeric; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; - -namespace StgSharp.Mathematics.Graphics -{ - [StructLayout(LayoutKind.Explicit, Size = (16 * sizeof(float)), Pack = 16)] - public unsafe struct Matrix44 : IEquatable - { - +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="Matrix44" +// 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.Internal; +using StgSharp.Mathematics.Numeric; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics.X86; + +namespace StgSharp.Mathematics.Graphics +{ + [StructLayout(LayoutKind.Explicit, Size = (16 * sizeof(float)), Pack = 16)] + public unsafe struct Matrix44 : IEquatable + { + [FieldOffset(0 * sizeof(float))] internal Column column; - [FieldOffset(0)] internal ColumnSet4 mat; - [FieldOffset(0)] internal MatrixKernel kernel; - - internal Matrix44( - ColumnSet4 mat - ) - { - Unsafe.SkipInit(out this); - this.mat = mat; - } - - internal Matrix44( - Vector4 vec0, - Vector4 vec1, - Vector4 vec2, - Vector4 vec3 - ) - { - Unsafe.SkipInit(out this); - mat.colum0 = vec0; - mat.colum1 = vec1; - mat.colum2 = vec2; - mat.colum3 = vec3; - } - - public Matrix44() - { - Unsafe.SkipInit(out this); - } - - public unsafe Matrix44( - float a00, - float a01, - float a02, - float a03, - float a10, - float a11, - float a12, - float a13, - float a20, - float a21, - float a22, - float a23, - float a30, - float a31, - float a32, - float a33 - ) - { - Unsafe.SkipInit(out this); - mat.colum0 = new Vector4(a00, a10, a20, a30); - mat.colum1 = new Vector4(a01, a11, a21, a31); - mat.colum2 = new Vector4(a02, a12, a22, a32); - mat.colum3 = new Vector4(a03, a13, a23, a33); - } - - public unsafe float this[ - int rowNum, - int columNum - ] - { - get + [FieldOffset(0)] internal ColumnSet4 mat; + [FieldOffset(0)] internal MatrixKernel kernel; + + internal Matrix44( + ColumnSet4 mat + ) + { + Unsafe.SkipInit(out this); + this.mat = mat; + } + + internal Matrix44( + Vector4 vec0, + Vector4 vec1, + Vector4 vec2, + Vector4 vec3 + ) + { + Unsafe.SkipInit(out this); + mat.colum0 = vec0; + mat.colum1 = vec1; + mat.colum2 = vec2; + mat.colum3 = vec3; + } + + public Matrix44() + { + Unsafe.SkipInit(out this); + } + + public unsafe Matrix44( + float a00, + float a01, + float a02, + float a03, + float a10, + float a11, + float a12, + float a13, + float a20, + float a21, + float a22, + float a23, + float a30, + float a31, + float a32, + float a33 + ) + { + Unsafe.SkipInit(out this); + mat.colum0 = new Vector4(a00, a10, a20, a30); + mat.colum1 = new Vector4(a01, a11, a21, a31); + mat.colum2 = new Vector4(a02, a12, a22, a32); + mat.colum3 = new Vector4(a03, a13, a23, a33); + } + + public unsafe float this[ + int rowNum, + int columNum + ] + { + get { #if DEBUG - if (rowNum is > 3 or < 0) - { - throw new ArgumentOutOfRangeException(nameof(columNum)); - } - if (columNum is > 3 or < 0) { - throw new ArgumentOutOfRangeException(nameof(columNum)); + if (rowNum is > 3 or < 0) + { + throw new ArgumentOutOfRangeException(nameof(columNum)); + } + if (columNum is > 3 or < 0) { + throw new ArgumentOutOfRangeException(nameof(columNum)); } #endif - return kernel[rowNum + 4 * columNum]; - } - set + return kernel[rowNum + 4 * columNum]; + } + set { #if DEBUG - if (rowNum is > 3 or < 0) - { - throw new ArgumentOutOfRangeException(nameof(columNum)); - } - if (columNum is > 3 or < 0) { - throw new ArgumentOutOfRangeException(nameof(columNum)); + if (rowNum is > 3 or < 0) + { + throw new ArgumentOutOfRangeException(nameof(columNum)); + } + if (columNum is > 3 or < 0) { + throw new ArgumentOutOfRangeException(nameof(columNum)); } #endif - kernel[rowNum + 4 * columNum] = value; - } - } - - public Matrix44 Transpose - { - get - { - Matrix44 transpose = new(); - InternalTranspose(ref transpose); - return transpose; - } - } - - public static Matrix44 Unit => new Matrix44(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - - public static Matrix44 WNegativeUnit => new Matrix44(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, - 0, 0, -1); - - public static Matrix44 XNegativeUnit => new Matrix44(-1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, - 0, 0, 1); - - public static Matrix44 YNegativeUnit => new Matrix44(1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, - 0, 0, 1); - - public static Matrix44 ZNegativeUnit => new Matrix44(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0, - 0, 0, 1); - - public ReadOnlySpan AsSpan() - { - return MemoryMarshal.CreateReadOnlySpan(ref Unsafe.As(ref mat), 16); - } - - public override bool Equals( - object? obj - ) - { - return obj is Matrix44 x && Equals(x); - } - - public bool Equals( - Matrix44 other - ) - { - return mat.Equals(other.mat); - } - - public override int GetHashCode() - { - return HashCode.Combine(mat.colum0.GetHashCode(), mat.colum1.GetHashCode(), - mat.colum2.GetHashCode(), mat.colum3.GetHashCode()); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal unsafe void InternalTranspose( - ref Matrix44 transpose - ) - { - const int f32 = 0; - fixed (MatrixKernel* source = &this.kernel, target = &transpose.kernel) { - NumericalModule.GlobalContext.mat_sk[f32].Call(MatrixIntrinsicHandle.Transpose, - null, (MatrixKernel*)source, - (MatrixKernel*)target, 0); - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe Matrix44 operator -( - Matrix44 left, - Matrix44 right - ) - { - Matrix44 ret = new(); - int f32 = MatrixElementType.F32.IntrinsicNode; - NumericalModule.GlobalContext.mat_sk[f32].Call(MatrixIntrinsicHandle.Sub, - (MatrixKernel*)&left, - (MatrixKernel*)&right, - (MatrixKernel*)&ret, 1); - return ret; + kernel[rowNum + 4 * columNum] = value; + } } - public static bool operator !=( - Matrix44 left, - Matrix44 right - ) - { - return !(left == right); + public Matrix44 Transpose + { + get + { + Matrix44 transpose = new(); + InternalTranspose(ref transpose); + return transpose; + } } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe Matrix44 operator *( - Matrix44 mat, - float value - ) - { - int f32 = MatrixElementType.F32.IntrinsicNode; - return new Matrix44(mat.mat.colum0 * value, mat.mat.colum1 * value, - mat.mat.colum2 * value, mat.mat.colum3 * value); + public static Matrix44 Unit => new Matrix44(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + + public static Matrix44 WNegativeUnit => new Matrix44(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, + 0, 0, -1); + + public static Matrix44 XNegativeUnit => new Matrix44(-1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 1); + + public static Matrix44 YNegativeUnit => new Matrix44(1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 1); + + public static Matrix44 ZNegativeUnit => new Matrix44(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0, + 0, 0, 1); + + public ReadOnlySpan AsSpan() + { + return MemoryMarshal.CreateReadOnlySpan(ref Unsafe.As(ref mat), 16); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Matrix44 operator *( - Matrix44 left, - Matrix44 right - ) - { - Matrix44 ret = new(); - int f32 = MatrixElementType.F32.IntrinsicNode; - NumericalModule.GlobalContext.mat_sk[f32].Call(MatrixIntrinsicHandle.Fma, - (MatrixKernel*)&left, - (MatrixKernel*)&right, - (MatrixKernel*)&ret, 0); - return ret; + public override bool Equals( + object? obj + ) + { + return obj is Matrix44 x && Equals(x); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe Matrix44 operator +( - Matrix44 left, - Matrix44 right - ) - { - Matrix44 ret = new(); - int f32 = MatrixElementType.F32.IntrinsicNode; - NumericalModule.GlobalContext.mat_sk[f32].Call(MatrixIntrinsicHandle.Add, - (MatrixKernel*)&left, - (MatrixKernel*)&right, - (MatrixKernel*)&ret, 1); - return ret; + public bool Equals( + Matrix44 other + ) + { + return mat.Equals(other.mat); } - public static bool operator ==( - Matrix44 left, - Matrix44 right - ) - { - return left.Equals(right); + public override int GetHashCode() + { + return HashCode.Combine(mat.colum0.GetHashCode(), mat.colum1.GetHashCode(), + mat.colum2.GetHashCode(), mat.colum3.GetHashCode()); } - [InlineArray(4)] - internal struct Column - { - - private Vec4 value; - - } - - } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal unsafe void InternalTranspose( + ref Matrix44 transpose + ) + { + const int f32 = 0; + fixed (MatrixKernel* source = &this.kernel, target = &transpose.kernel) { + NumericalModule.GlobalContext.mat_sk[f32].Call(MatrixIntrinsicHandle.Transpose, + null, (MatrixKernel*)source, + (MatrixKernel*)target, 0); + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe Matrix44 operator -( + Matrix44 left, + Matrix44 right + ) + { + Matrix44 ret = new(); + int f32 = MatrixElementType.F32.IntrinsicNode; + NumericalModule.GlobalContext.mat_sk[f32].Call(MatrixIntrinsicHandle.Sub, + (MatrixKernel*)&left, + (MatrixKernel*)&right, + (MatrixKernel*)&ret, 1); + return ret; + } + + public static bool operator !=( + Matrix44 left, + Matrix44 right + ) + { + return !(left == right); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe Matrix44 operator *( + Matrix44 mat, + float value + ) + { + int f32 = MatrixElementType.F32.IntrinsicNode; + return new Matrix44(mat.mat.colum0 * value, mat.mat.colum1 * value, + mat.mat.colum2 * value, mat.mat.colum3 * value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Matrix44 operator *( + Matrix44 left, + Matrix44 right + ) + { + Matrix44 ret = new(); + int f32 = MatrixElementType.F32.IntrinsicNode; + NumericalModule.GlobalContext.mat_sk[f32].Call(MatrixIntrinsicHandle.Fma, + (MatrixKernel*)&left, + (MatrixKernel*)&right, + (MatrixKernel*)&ret, 0); + return ret; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe Matrix44 operator +( + Matrix44 left, + Matrix44 right + ) + { + Matrix44 ret = new(); + int f32 = MatrixElementType.F32.IntrinsicNode; + NumericalModule.GlobalContext.mat_sk[f32].Call(MatrixIntrinsicHandle.Add, + (MatrixKernel*)&left, + (MatrixKernel*)&right, + (MatrixKernel*)&ret, 1); + return ret; + } + + public static bool operator ==( + Matrix44 left, + Matrix44 right + ) + { + return left.Equals(right); + } + + [InlineArray(4)] + internal struct Column + { + + private Vec4 value; + + } + + } } diff --git a/StgSharp.Mathematics/Numeric/Graphics/Vec2.cs b/StgSharp.Mathematics/Numeric/Graphics/Vec2.cs index f555e9ba..2b048a57 100644 --- a/StgSharp.Mathematics/Numeric/Graphics/Vec2.cs +++ b/StgSharp.Mathematics/Numeric/Graphics/Vec2.cs @@ -1,162 +1,162 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="Vec2" -// 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.Mathematics; -using StgSharp.Mathematics.Numeric; -using System.Net.Http.Headers; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace StgSharp.Mathematics.Graphics +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="Vec2" +// 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.Mathematics; +using StgSharp.Mathematics.Numeric; +using System.Net.Http.Headers; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace StgSharp.Mathematics.Graphics { - /// - /// A two dimension vector defined by two elements. Vec2 in World are default used as colum - /// vector. + /// + /// A two dimension vector defined by two elements. Vec2 in World are default used as colum + /// vector. /// - [StructLayout(LayoutKind.Explicit, Size = 16, Pack = 16)] - public struct Vec2 : IUnmanagedVector - { - + [StructLayout(LayoutKind.Explicit, Size = 16, Pack = 16)] + public struct Vec2 : IUnmanagedVector + { + [FieldOffset(0)] internal unsafe fixed float num[2]; - [FieldOffset(0)] + [FieldOffset(0)] internal M128 reg; - [FieldOffset(0)] + [FieldOffset(0)] internal Vector2 v; - [FieldOffset(0)] - public float X; - [FieldOffset(4)] - public float Y; - - internal Vec2(Vector2 vec) - { - Unsafe.SkipInit(out reg); - Unsafe.SkipInit(out X); - Unsafe.SkipInit(out Y); - v = vec; - } - - internal Vec2(M128 vec) - { - Unsafe.SkipInit(out reg); - Unsafe.SkipInit(out X); - Unsafe.SkipInit(out Y); - reg = vec; - reg.Member(1) = 0; - } - - public Vec2(float x, float y) - { - v = new Vector2(x, y); - } - - public static Vec2 Unit => new Vec2(1, 1); - - public static Vec2 Zero => new Vec2(0, 0); - - public static Vec2 One - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => new Vec2(1, 1); - } - - public Vec2 XY - { - readonly get => this; - set => this = value; - } - - public Vec3 XYZ - { - readonly get => new(reg); - set - { - reg = value.reg; - reg.Member(1) = 0; - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public float Cross(Vec2 right) - { - return X * right.Y - Y * right.X; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public float Dot(Vec2 vec) - { - return Vector2.Dot(v, vec.v); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vec2 operator -(Vec2 left, Vec2 right) - { - return new Vec2(left.v - right.v); + [FieldOffset(0)] + public float X; + [FieldOffset(4)] + public float Y; + + internal Vec2(Vector2 vec) + { + Unsafe.SkipInit(out reg); + Unsafe.SkipInit(out X); + Unsafe.SkipInit(out Y); + v = vec; } - public static bool operator !=(Vec2 left, Vec2 right) - { - return !(left == right); + internal Vec2(M128 vec) + { + Unsafe.SkipInit(out reg); + Unsafe.SkipInit(out X); + Unsafe.SkipInit(out Y); + reg = vec; + reg.Member(1) = 0; } - public static Vec2 operator *(Vec2 vec, float value) - { - return new Vec2(vec.v * value); - } - public static Vec2 operator *(float value, Vec2 vec) - { - return new Vec2(vec.v * value); + public Vec2(float x, float y) + { + v = new Vector2(x, y); } - public static Vec2 operator /(Vec2 vec, float value) - { - return new Vec2(vec.v / value); + public static Vec2 Unit => new Vec2(1, 1); + + public static Vec2 Zero => new Vec2(0, 0); + + public static Vec2 One + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => new Vec2(1, 1); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vec2 operator +(Vec2 left, Vec2 right) - { - return new Vec2(left.v + right.v); + public Vec2 XY + { + readonly get => this; + set => this = value; } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator ==(Vec2 left, Vec2 right) - { - return left.v == right.v; + public Vec3 XYZ + { + readonly get => new(reg); + set + { + reg = value.reg; + reg.Member(1) = 0; + } } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static implicit operator Vec2((float, float) tuple) - { - return new Vec2(tuple.Item1, tuple.Item2); - } - - } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float Cross(Vec2 right) + { + return X * right.Y - Y * right.X; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float Dot(Vec2 vec) + { + return Vector2.Dot(v, vec.v); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Vec2 operator -(Vec2 left, Vec2 right) + { + return new Vec2(left.v - right.v); + } + + public static bool operator !=(Vec2 left, Vec2 right) + { + return !(left == right); + } + + public static Vec2 operator *(Vec2 vec, float value) + { + return new Vec2(vec.v * value); + } + public static Vec2 operator *(float value, Vec2 vec) + { + return new Vec2(vec.v * value); + } + + public static Vec2 operator /(Vec2 vec, float value) + { + return new Vec2(vec.v / value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Vec2 operator +(Vec2 left, Vec2 right) + { + return new Vec2(left.v + right.v); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(Vec2 left, Vec2 right) + { + return left.v == right.v; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator Vec2((float, float) tuple) + { + return new Vec2(tuple.Item1, tuple.Item2); + } + + } } diff --git a/StgSharp.Mathematics/Numeric/Graphics/Vec3.cs b/StgSharp.Mathematics/Numeric/Graphics/Vec3.cs index b2eebc3c..1db4398c 100644 --- a/StgSharp.Mathematics/Numeric/Graphics/Vec3.cs +++ b/StgSharp.Mathematics/Numeric/Graphics/Vec3.cs @@ -1,236 +1,236 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="Vec3" -// 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.Mathematics; -using StgSharp.Mathematics.Numeric; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace StgSharp.Mathematics.Graphics -{ - [CollectionBuilder(typeof(Vec3), nameof(FromSpan))] - [StructLayout(LayoutKind.Explicit, Size = 16, Pack = 16)] - public struct Vec3 : IEquatable, IUnmanagedVector, IEnumerable - { - - [FieldOffset(0)] internal unsafe fixed float num[3]; +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="Vec3" +// 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.Mathematics; +using StgSharp.Mathematics.Numeric; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace StgSharp.Mathematics.Graphics +{ + [CollectionBuilder(typeof(Vec3), nameof(FromSpan))] + [StructLayout(LayoutKind.Explicit, Size = 16, Pack = 16)] + public struct Vec3 : IEquatable, IUnmanagedVector, IEnumerable + { + + [FieldOffset(0)] internal unsafe fixed float num[3]; [FieldOffset(0)] internal M128 reg; [FieldOffset(0)] internal Vector3 v; - [FieldOffset(0)] public float X; - [FieldOffset(4)] public float Y; - [FieldOffset(8)] public float Z; - - internal Vec3(M128 vector) - { - Unsafe.SkipInit(out this); - reg = vector; - reg.Member(3) = 0; - } - - internal Vec3(Vector3 vector) - { - v = vector; - } - - public Vec3() - { - Unsafe.SkipInit(out this); - } - - public Vec3(Vec2 xy, float z) - { - Unsafe.SkipInit(out this); - reg = xy.reg; - Z = z; - } - - public Vec3(float x, float y, float z) - { - Unsafe.SkipInit(out this); - v = new Vector3(x, y, z); - } - - public unsafe Vec2 XY - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - readonly get => new(reg); - [MethodImpl(MethodImplOptions.AggressiveInlining)] - set => Unsafe.As(ref v) = value.v; - } - - public Vec3 XYZ - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - readonly get => new(v); - [MethodImpl(MethodImplOptions.AggressiveInlining)] - set => this = value; - } - - public static Vec3 Zero => new(0, 0, 0); - - public static Vec3 One => new(1, 1, 1); - - public static Vec3 UnitX => new(1, 0, 0); - - public static Vec3 UnitY => new(0, 1, 0); - - public static Vec3 UnitZ => new(0, 0, 1); - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vec3 Cross(Vec3 left, Vec3 right) - { - return Linear.Cross(left, right); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public readonly float Dot(Vec3 right) - { - return Vector3.Dot(v, right.v); - } - - public readonly bool Equals(Vec3 other) - { - return reg == other.reg; - } - - public override readonly bool Equals(object obj) - { - return obj is not null && obj is Vec3 vec && this == vec; - } - - public static Vec3 FromSpan(ReadOnlySpan span) - { - Vec3 v = new(); - span.CopyTo(MemoryMarshal.CreateSpan(ref v.X, 3)); - return v; - } - - public unsafe IEnumerator GetEnumerator() - { - for (int i = 0; i < 3; i++) { - yield return reg.Member(i); - } - } - - public override unsafe int GetHashCode() - { - fixed (float* add = &X) { - return HashCode.Combine(X, Y, Z, (ulong)add); - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public readonly float GetMaxValue() - { - float ret = X; - ret = ret > Y ? ret : Y; - ret = ret > Z ? ret : Z; - return ret; - } - - public static bool IsParallel(Vec3 left, Vec3 right) - { - return Cross(left, right) == Zero; - } - - public override readonly string ToString() - { - return $"[{X},{Y},{Z}]"; - } - - public readonly string ToString(string sample) - { - return $"[{X.ToString(sample)},{Y.ToString(sample)},{Z.ToString(sample)}]"; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vec3 operator -(Vec3 vec) - { - return new Vec3(-vec.v); + [FieldOffset(0)] public float X; + [FieldOffset(4)] public float Y; + [FieldOffset(8)] public float Z; + + internal Vec3(M128 vector) + { + Unsafe.SkipInit(out this); + reg = vector; + reg.Member(3) = 0; } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vec3 operator -(Vec3 left, Vec3 right) - { - return new Vec3(left.v - right.v); + internal Vec3(Vector3 vector) + { + v = vector; } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator !=(Vec3 left, Vec3 right) - { - return left.v != right.v; + public Vec3() + { + Unsafe.SkipInit(out this); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vec3 operator *(Vec3 vec, float value) - { - return new Vec3(vec.v * value); + public Vec3(Vec2 xy, float z) + { + Unsafe.SkipInit(out this); + reg = xy.reg; + Z = z; } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float operator *(Vec3 left, Vec3 right) - { - return Vector3.Dot(left.v, right.v); + public Vec3(float x, float y, float z) + { + Unsafe.SkipInit(out this); + v = new Vector3(x, y, z); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vec3 operator /(Vec3 vec, float value) - { - return new Vec3(vec.v / value); + public unsafe Vec2 XY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(reg); + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set => Unsafe.As(ref v) = value.v; } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vec3 operator +(Vec3 left, Vec3 right) - { - return new Vec3(left.v + right.v); + public Vec3 XYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(v); + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set => this = value; } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator ==(Vec3 left, Vec3 right) - { - return left.v == right.v; + public static Vec3 Zero => new(0, 0, 0); + + public static Vec3 One => new(1, 1, 1); + + public static Vec3 UnitX => new(1, 0, 0); + + public static Vec3 UnitY => new(0, 1, 0); + + public static Vec3 UnitZ => new(0, 0, 1); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Vec3 Cross(Vec3 left, Vec3 right) + { + return Linear.Cross(left, right); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe implicit operator Vec3((float, float, float) tuple) - { - return Unsafe.As<(float,float,float), Vec3>(ref tuple); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float Dot(Vec3 right) + { + return Vector3.Dot(v, right.v); + } + + public readonly bool Equals(Vec3 other) + { + return reg == other.reg; + } + + public override readonly bool Equals(object obj) + { + return obj is not null && obj is Vec3 vec && this == vec; + } + + public static Vec3 FromSpan(ReadOnlySpan span) + { + Vec3 v = new(); + span.CopyTo(MemoryMarshal.CreateSpan(ref v.X, 3)); + return v; + } + + public unsafe IEnumerator GetEnumerator() + { + for (int i = 0; i < 3; i++) { + yield return reg.Member(i); + } + } + + public override unsafe int GetHashCode() + { + fixed (float* add = &X) { + return HashCode.Combine(X, Y, Z, (ulong)add); + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float GetMaxValue() + { + float ret = X; + ret = ret > Y ? ret : Y; + ret = ret > Z ? ret : Z; + return ret; + } + + public static bool IsParallel(Vec3 left, Vec3 right) + { + return Cross(left, right) == Zero; + } + + public override readonly string ToString() + { + return $"[{X},{Y},{Z}]"; + } + + public readonly string ToString(string sample) + { + return $"[{X.ToString(sample)},{Y.ToString(sample)},{Z.ToString(sample)}]"; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Vec3 operator -(Vec3 vec) + { + return new Vec3(-vec.v); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Vec3 operator -(Vec3 left, Vec3 right) + { + return new Vec3(left.v - right.v); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(Vec3 left, Vec3 right) + { + return left.v != right.v; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Vec3 operator *(Vec3 vec, float value) + { + return new Vec3(vec.v * value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float operator *(Vec3 left, Vec3 right) + { + return Vector3.Dot(left.v, right.v); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Vec3 operator /(Vec3 vec, float value) + { + return new Vec3(vec.v / value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Vec3 operator +(Vec3 left, Vec3 right) + { + return new Vec3(left.v + right.v); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(Vec3 left, Vec3 right) + { + return left.v == right.v; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe implicit operator Vec3((float, float, float) tuple) + { + return Unsafe.As<(float,float,float), Vec3>(ref tuple); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + } } diff --git a/StgSharp.Mathematics/Numeric/Graphics/Vec4.cs b/StgSharp.Mathematics/Numeric/Graphics/Vec4.cs index aca4cb12..8264a950 100644 --- a/StgSharp.Mathematics/Numeric/Graphics/Vec4.cs +++ b/StgSharp.Mathematics/Numeric/Graphics/Vec4.cs @@ -1,251 +1,251 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="Vec4" -// 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.Internal; -using StgSharp.Mathematics.Numeric; -using System; -using System.Data.Common; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace StgSharp.Mathematics.Graphics -{ - [CollectionBuilder(builderType:typeof(Vec4), methodName: nameof(Vec4.FromSpan))] - [StructLayout(LayoutKind.Explicit, Size = 16, Pack = 16)] - public unsafe struct Vec4 : IEquatable, IUnmanagedVector - { - +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="Vec4" +// 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.Internal; +using StgSharp.Mathematics.Numeric; +using System; +using System.Data.Common; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace StgSharp.Mathematics.Graphics +{ + [CollectionBuilder(builderType:typeof(Vec4), methodName: nameof(Vec4.FromSpan))] + [StructLayout(LayoutKind.Explicit, Size = 16, Pack = 16)] + public unsafe struct Vec4 : IEquatable, IUnmanagedVector + { + [FieldOffset(0)] internal unsafe fixed float num[4]; [FieldOffset(0)] internal M128 reg; - [FieldOffset(0)] internal Vector4 vec; + [FieldOffset(0)] internal Vector4 vec; [FieldOffset(12)] public float W; - [FieldOffset(0)] public float X; - [FieldOffset(4)] public float Y; - [FieldOffset(8)] public float Z; - - internal Vec4( - Vector4 v - ) - { - Unsafe.SkipInit(out X); - Unsafe.SkipInit(out Y); - Unsafe.SkipInit(out Z); - Unsafe.SkipInit(out W); + [FieldOffset(0)] public float X; + [FieldOffset(4)] public float Y; + [FieldOffset(8)] public float Z; + + internal Vec4( + Vector4 v + ) + { + Unsafe.SkipInit(out X); + Unsafe.SkipInit(out Y); + Unsafe.SkipInit(out Z); + Unsafe.SkipInit(out W); Unsafe.SkipInit(out reg); - vec = v; - } - - internal Vec4( - M128 v - ) - { - Unsafe.SkipInit(out X); - Unsafe.SkipInit(out Y); - Unsafe.SkipInit(out Z); - Unsafe.SkipInit(out W); + vec = v; + } + + internal Vec4( + M128 v + ) + { + Unsafe.SkipInit(out X); + Unsafe.SkipInit(out Y); + Unsafe.SkipInit(out Z); + Unsafe.SkipInit(out W); Unsafe.SkipInit(out vec); - reg = v; - } - - public Vec4( - Vec3 v3, - float w - ) - { - Unsafe.SkipInit(out X); - Unsafe.SkipInit(out Y); - Unsafe.SkipInit(out Z); - Unsafe.SkipInit(out W); - reg = v3.reg; - W = w; - } - - public Vec4( - float x, - float y, - float z, - float w - ) - { - vec = new Vector4(x, y, z, w); - } - - public unsafe Vec2 XY - { - get => new Vec2(reg); - set - { - X = value.X; - Y = value.Y; - } - } - - public unsafe Vec3 XYZ - { - get => new Vec3(reg); - set - { - float w = W; - reg = value.reg; - W = w; - } - } - - public static Vec4 One - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => new Vec4(1, 1, 1, 1); - } - - public static Vec4 Zero - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => new Vec4(0, 0, 0, 0); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vec4 Add( - Vec4 left, - Vec4 right - ) - { - return left + right; - } - - public ReadOnlySpan AsSpan() - { - return MemoryMarshal.CreateReadOnlySpan(ref reg.Member(0), 4); - } - - public override bool Equals( - object obj - ) - { - return obj is Vec4 v && v == this; - } - - public static Vec4 FromSpan( - ReadOnlySpan span - ) - { - if (span.Length < 4) { - throw new ArgumentException("Span length must be at least 4.", nameof(span)); + reg = v; + } + + public Vec4( + Vec3 v3, + float w + ) + { + Unsafe.SkipInit(out X); + Unsafe.SkipInit(out Y); + Unsafe.SkipInit(out Z); + Unsafe.SkipInit(out W); + reg = v3.reg; + W = w; + } + + public Vec4( + float x, + float y, + float z, + float w + ) + { + vec = new Vector4(x, y, z, w); + } + + public unsafe Vec2 XY + { + get => new Vec2(reg); + set + { + X = value.X; + Y = value.Y; + } + } + + public unsafe Vec3 XYZ + { + get => new Vec3(reg); + set + { + float w = W; + reg = value.reg; + W = w; + } + } + + public static Vec4 One + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => new Vec4(1, 1, 1, 1); + } + + public static Vec4 Zero + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => new Vec4(0, 0, 0, 0); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Vec4 Add( + Vec4 left, + Vec4 right + ) + { + return left + right; + } + + public ReadOnlySpan AsSpan() + { + return MemoryMarshal.CreateReadOnlySpan(ref reg.Member(0), 4); + } + + public override bool Equals( + object obj + ) + { + return obj is Vec4 v && v == this; + } + + public static Vec4 FromSpan( + ReadOnlySpan span + ) + { + if (span.Length < 4) { + throw new ArgumentException("Span length must be at least 4.", nameof(span)); } // Read 4 floats as a Vector4 in one operation without per-element copy. - Vector4 v = MemoryMarshal.Read(MemoryMarshal.AsBytes(span)); - return new Vec4(v); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public ReadOnlySpan.Enumerator GetEnumerator() - { - return AsSpan().GetEnumerator(); - } - - public override int GetHashCode() - { - return vec.GetHashCode(); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vec4 Subtract( - Vec4 left, - Vec4 right - ) - { - return left - right; - } - - public override string ToString() - { - return vec.ToString(); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vec4 operator -( - Vec4 left, - Vec4 right - ) - { - return new Vec4(left.vec - right.vec); + Vector4 v = MemoryMarshal.Read(MemoryMarshal.AsBytes(span)); + return new Vec4(v); } - public static bool operator !=( - Vec4 left, - Vec4 right - ) - { - return !(left == right); + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ReadOnlySpan.Enumerator GetEnumerator() + { + return AsSpan().GetEnumerator(); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vec4 operator *( - Matrix44 mat, - Vec4 vec - ) - { - Matrix44 transpose = mat.Transpose; - return new Vec4(Vector4.Dot(transpose.mat.colum0, vec.vec), - Vector4.Dot(transpose.mat.colum1, vec.vec), - Vector4.Dot(transpose.mat.colum2, vec.vec), - Vector4.Dot(transpose.mat.colum3, vec.vec)); + public override int GetHashCode() + { + return vec.GetHashCode(); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vec4 operator +( - Vec4 left, - Vec4 right - ) - { - return new Vec4(left.vec + right.vec); + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Vec4 Subtract( + Vec4 left, + Vec4 right + ) + { + return left - right; } - public static bool operator ==( - Vec4 left, - Vec4 right - ) - { - return left.vec == right.vec; - } - - bool IEquatable.Equals( - Vec4 other - ) - { - return vec == other.vec; - } - - } + public override string ToString() + { + return vec.ToString(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Vec4 operator -( + Vec4 left, + Vec4 right + ) + { + return new Vec4(left.vec - right.vec); + } + + public static bool operator !=( + Vec4 left, + Vec4 right + ) + { + return !(left == right); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Vec4 operator *( + Matrix44 mat, + Vec4 vec + ) + { + Matrix44 transpose = mat.Transpose; + return new Vec4(Vector4.Dot(transpose.mat.colum0, vec.vec), + Vector4.Dot(transpose.mat.colum1, vec.vec), + Vector4.Dot(transpose.mat.colum2, vec.vec), + Vector4.Dot(transpose.mat.colum3, vec.vec)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Vec4 operator +( + Vec4 left, + Vec4 right + ) + { + return new Vec4(left.vec + right.vec); + } + + public static bool operator ==( + Vec4 left, + Vec4 right + ) + { + return left.vec == right.vec; + } + + bool IEquatable.Equals( + Vec4 other + ) + { + return vec == other.vec; + } + + } } \ No newline at end of file diff --git a/StgSharp.Mathematics/Numeric/Linear/Matrix.Create.cs b/StgSharp.Mathematics/Numeric/Linear/Matrix.Create.cs index 2fc891f8..b6b3ff7b 100644 --- a/StgSharp.Mathematics/Numeric/Linear/Matrix.Create.cs +++ b/StgSharp.Mathematics/Numeric/Linear/Matrix.Create.cs @@ -1,101 +1,101 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="Matrix.Create" -// 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.Mathematics; -using StgSharp.Mathematics.Memory; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Mathematics.Numeric -{ - public unsafe partial class Matrix - { - - private const int KernelSideLength = 4; - - public static Matrix Create( - int columnLength, - int rowLength, - MatrixLayout layout, - HybridLayerSegregatedFitAllocator allocator) - { +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="Matrix.Create" +// 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.Mathematics; +using StgSharp.Mathematics.Memory; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Mathematics.Numeric +{ + public unsafe partial class Matrix + { + + private const int KernelSideLength = 4; + + public static Matrix Create( + int columnLength, + int rowLength, + MatrixLayout layout, + HybridLayerSegregatedFitAllocator allocator) + { ArgumentNullException.ThrowIfNull(allocator); ArgumentOutOfRangeException.ThrowIfNegativeOrZero(columnLength); ArgumentOutOfRangeException.ThrowIfNegativeOrZero(rowLength); - int kernelColumns = DivideRoundUp(columnLength, KernelSideLength); + int kernelColumns = DivideRoundUp(columnLength, KernelSideLength); int kernelRows = DivideRoundUp(rowLength, KernelSideLength); - if (layout is MatrixLayout.UpperTriangle or MatrixLayout.LowerTriangle) - { - if (kernelColumns != kernelRows) { - throw new ArgumentException("Triangular layouts require square matrices."); - } + if (layout is MatrixLayout.UpperTriangle or MatrixLayout.LowerTriangle) + { + if (kernelColumns != kernelRows) { + throw new ArgumentException("Triangular layouts require square matrices."); + } } - long kernelCount = layout switch - { - MatrixLayout.DenseRectangle => (long)kernelColumns * kernelRows, - MatrixLayout.UpperTriangle => TriangularKernelCount(kernelColumns), - MatrixLayout.LowerTriangle => TriangularKernelCount(kernelRows), - _ => throw new ArgumentOutOfRangeException(nameof(layout)) + long kernelCount = layout switch + { + MatrixLayout.DenseRectangle => (long)kernelColumns * kernelRows, + MatrixLayout.UpperTriangle => TriangularKernelCount(kernelColumns), + MatrixLayout.LowerTriangle => TriangularKernelCount(kernelRows), + _ => throw new ArgumentOutOfRangeException(nameof(layout)) }; - long requiredBytes = kernelCount * MatrixKernel.Size; + long requiredBytes = kernelCount * MatrixKernel.Size; ArgumentOutOfRangeException.ThrowIfNegativeOrZero(requiredBytes, nameof(requiredBytes)); - HybridLayerSegregatedFitAllocationHandle handle = allocator.Alloc((uint)requiredBytes); + HybridLayerSegregatedFitAllocationHandle handle = allocator.Alloc((uint)requiredBytes); MatrixStorageHLSF storage = new MatrixStorageHLSF(allocator, handle); - Matrix matrix = new Matrix(MatrixKernelBoarder.Create(layout), new MatrixSize(columnLength, rowLength, - kernelColumns, + Matrix matrix = new Matrix(MatrixKernelBoarder.Create(layout), new MatrixSize(columnLength, rowLength, + kernelColumns, kernelRows), storage); - return matrix; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static int DivideRoundUp(int value, int divisor) - { - return (value + (divisor - 1)) / divisor; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static long TriangularKernelCount(int order) - { - long n = order; - return (n * (n + 1L)) / 2L; - } - - } + return matrix; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static int DivideRoundUp(int value, int divisor) + { + return (value + (divisor - 1)) / divisor; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static long TriangularKernelCount(int order) + { + long n = order; + return (n * (n + 1L)) / 2L; + } + + } } diff --git a/StgSharp.Mathematics/Numeric/Linear/Matrix.cs b/StgSharp.Mathematics/Numeric/Linear/Matrix.cs index 8ab28496..7a084c8b 100644 --- a/StgSharp.Mathematics/Numeric/Linear/Matrix.cs +++ b/StgSharp.Mathematics/Numeric/Linear/Matrix.cs @@ -1,204 +1,204 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="Matrix" -// 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.Numeric; -using System; -using System.Numerics; -using System.Runtime.CompilerServices; - -// using hlsfHandle = global::StgSharp.HighPerformance.Memory.HybridLayerSegregatedFitAllocationHandle; - -namespace StgSharp.Mathematics.Numeric -{ - public unsafe partial class Matrix where T : unmanaged, INumber - { - - private protected static readonly int t_count = 16 / sizeof(T); - - private protected static readonly int t_size = sizeof(T); - private readonly MatrixKernelBoarder _boarder; - private readonly MatrixSize _size; - private readonly MatrixStorage _buffer; - - private protected Matrix( - MatrixKernelBoarder boarder, - MatrixSize size, - MatrixStorage buffer - - ) - { - _boarder = boarder; - _size = size; - _buffer = buffer; - } - - public T this[ - int x, - int y - ] - { - get - { - if (y < 0 || y > _size.ElementColumnLength || x < 0 || x > _size.ElementRowLength) { - throw new ArgumentOutOfRangeException($"Index [{x},{y}] is out of matrix index range."); - } - long offset = GetElementOffset(x, y); - if (offset < 0) { - return T.Zero; - } - return ((T*)Buffer)[offset]; - } - set - { - if (y < 0 || y > _size.ElementColumnLength || x < 0 || x > _size.ElementRowLength) { - throw new ArgumentOutOfRangeException($"Index [{x},{y}] is out of matrix index range."); - } - long offset = GetElementOffset(x, y); - if (offset < 0) { - return; - } - ((T*)Buffer)[offset] = value; - } - } - - /// - /// Matlab style indexer to generate a new matrix - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - public unsafe Matrix this[ - ReadOnlySpan column, - ReadOnlySpan row - ] - { - get { throw new NotImplementedException(); } - set { throw new NotImplementedException(); } - } - - /// - /// Length of the matrix in columns. - /// - public int ColumnLength => _size.ElementColumnLength; - - /// - /// Length of the matrix in rows. - /// - public int RowLength => _size.ElementRowLength; - - public MatrixLayout Layout { get; init; } - - internal MatrixKernel* Buffer - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => (MatrixKernel*)_buffer.BufferPointer; - } - - protected internal int KernelColumnLength => _size.KernelColumnLength; - - protected internal int KernelRowLength => _size.KernelRowLength; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public unsafe ref MatrixKernel GetMatrixKernel( - int x, - int y - ) - { - return ref _boarder.IsInBuffer(x, y, in _size) ? - ref _buffer[_boarder.GetIndexOffset(x, y, in _size)] : - ref Unsafe.NullRef>(); - } - - internal long GetElementOffset( - int x, - int y - ) - { - int - k_c = y / 4, - c = y % 4, - k_r = x / 4, - r = x % 4; - if (!_boarder.IsInBuffer(k_r, k_c, in _size)) { - return -1; - } - long kernelOffset = _boarder.GetIndexOffset(k_r, k_c, in _size); - - return kernelOffset * 16 + 4 * r + c; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal unsafe ref T GetElementUnsafe( - int x, - int y - ) - { - // Caller guarantees: indices in range, layout is dense square. - int k_c = y / 4; - int k_r = x / 4; - int c = y % 4; - int r = x % 4; - - ref MatrixKernel kernel = ref _buffer[_boarder.GetIndexOffset(k_r, k_c, in _size)]; - return ref kernel[c, r]; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal unsafe MatrixKernel* GetKernelAddressUnsafe( - int x, - int y - ) - { - return Buffer + _boarder.GetIndexOffset(x, y, in _size); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal unsafe ref MatrixKernel GetKernelUnsafe( - int x, - int y - ) - { - // Caller guarantees: indices in range, layout is dense square. - int k_c = y / 4; - int k_r = x / 4; - int c = y % 4; - int r = x % 4; - return ref _buffer[_boarder.GetIndexOffset(k_c, k_r, in _size)]; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="Matrix" +// 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.Numeric; +using System; +using System.Numerics; +using System.Runtime.CompilerServices; + +// using hlsfHandle = global::StgSharp.HighPerformance.Memory.HybridLayerSegregatedFitAllocationHandle; + +namespace StgSharp.Mathematics.Numeric +{ + public unsafe partial class Matrix where T : unmanaged, INumber + { + + private protected static readonly int t_count = 16 / sizeof(T); + + private protected static readonly int t_size = sizeof(T); + private readonly MatrixKernelBoarder _boarder; + private readonly MatrixSize _size; + private readonly MatrixStorage _buffer; + + private protected Matrix( + MatrixKernelBoarder boarder, + MatrixSize size, + MatrixStorage buffer + + ) + { + _boarder = boarder; + _size = size; + _buffer = buffer; + } + + public T this[ + int x, + int y + ] + { + get + { + if (y < 0 || y > _size.ElementColumnLength || x < 0 || x > _size.ElementRowLength) { + throw new ArgumentOutOfRangeException($"Index [{x},{y}] is out of matrix index range."); + } + long offset = GetElementOffset(x, y); + if (offset < 0) { + return T.Zero; + } + return ((T*)Buffer)[offset]; + } + set + { + if (y < 0 || y > _size.ElementColumnLength || x < 0 || x > _size.ElementRowLength) { + throw new ArgumentOutOfRangeException($"Index [{x},{y}] is out of matrix index range."); + } + long offset = GetElementOffset(x, y); + if (offset < 0) { + return; + } + ((T*)Buffer)[offset] = value; + } + } + + /// + /// Matlab style indexer to generate a new matrix + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public unsafe Matrix this[ + ReadOnlySpan column, + ReadOnlySpan row + ] + { + get { throw new NotImplementedException(); } + set { throw new NotImplementedException(); } + } + + /// + /// Length of the matrix in columns. + /// + public int ColumnLength => _size.ElementColumnLength; + + /// + /// Length of the matrix in rows. + /// + public int RowLength => _size.ElementRowLength; + + public MatrixLayout Layout { get; init; } + + internal MatrixKernel* Buffer + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => (MatrixKernel*)_buffer.BufferPointer; + } + + protected internal int KernelColumnLength => _size.KernelColumnLength; + + protected internal int KernelRowLength => _size.KernelRowLength; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe ref MatrixKernel GetMatrixKernel( + int x, + int y + ) + { + return ref _boarder.IsInBuffer(x, y, in _size) ? + ref _buffer[_boarder.GetIndexOffset(x, y, in _size)] : + ref Unsafe.NullRef>(); + } + + internal long GetElementOffset( + int x, + int y + ) + { + int + k_c = y / 4, + c = y % 4, + k_r = x / 4, + r = x % 4; + if (!_boarder.IsInBuffer(k_r, k_c, in _size)) { + return -1; + } + long kernelOffset = _boarder.GetIndexOffset(k_r, k_c, in _size); + + return kernelOffset * 16 + 4 * r + c; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal unsafe ref T GetElementUnsafe( + int x, + int y + ) + { + // Caller guarantees: indices in range, layout is dense square. + int k_c = y / 4; + int k_r = x / 4; + int c = y % 4; + int r = x % 4; + + ref MatrixKernel kernel = ref _buffer[_boarder.GetIndexOffset(k_r, k_c, in _size)]; + return ref kernel[c, r]; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal unsafe MatrixKernel* GetKernelAddressUnsafe( + int x, + int y + ) + { + return Buffer + _boarder.GetIndexOffset(x, y, in _size); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal unsafe ref MatrixKernel GetKernelUnsafe( + int x, + int y + ) + { + // Caller guarantees: indices in range, layout is dense square. + int k_c = y / 4; + int k_r = x / 4; + int c = y % 4; + int r = x % 4; + return ref _buffer[_boarder.GetIndexOffset(k_c, k_r, in _size)]; + } + + } +} diff --git a/StgSharp.Mathematics/Numeric/Linear/MatrixStorage.cs b/StgSharp.Mathematics/Numeric/Linear/MatrixStorage.cs index 9fa5e1b3..f38567c6 100644 --- a/StgSharp.Mathematics/Numeric/Linear/MatrixStorage.cs +++ b/StgSharp.Mathematics/Numeric/Linear/MatrixStorage.cs @@ -1,72 +1,72 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="MatrixStorage" -// 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.Mathematics; -using StgSharp.Mathematics.Memory; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Text; +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="MatrixStorage" +// 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.Mathematics; +using StgSharp.Mathematics.Memory; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; using System.Threading.Tasks; -using HLSFAllocator = global::StgSharp.Mathematics.Memory.HybridLayerSegregatedFitAllocator; -using HLSFHandle = global::StgSharp.Mathematics.Memory.HybridLayerSegregatedFitAllocationHandle; - -namespace StgSharp.Mathematics.Numeric -{ - public abstract class MatrixStorage : IDisposable where T: unmanaged, INumber - { - - internal unsafe ref MatrixKernel this[long index] - { - get { return ref Unsafe.AsRef>(BufferPointer + MatrixKernel.Size * index); } - } - - protected internal abstract unsafe T* BufferPointer { get; } - - public abstract void Dispose(); - - } - - internal class MatrixStorageHLSF(HLSFAllocator allocator, HLSFHandle handle) : MatrixStorage - where T: unmanaged, INumber - { - - internal HLSFAllocator _allocator = allocator; - internal HLSFHandle _handle = handle; - - protected internal override unsafe T* BufferPointer => (T*)_handle.Pointer; - - public override void Dispose() - { - allocator.Free(_handle); - } - - } +using HLSFAllocator = global::StgSharp.Mathematics.Memory.HybridLayerSegregatedFitAllocator; +using HLSFHandle = global::StgSharp.Mathematics.Memory.HybridLayerSegregatedFitAllocationHandle; + +namespace StgSharp.Mathematics.Numeric +{ + public abstract class MatrixStorage : IDisposable where T: unmanaged, INumber + { + + internal unsafe ref MatrixKernel this[long index] + { + get { return ref Unsafe.AsRef>(BufferPointer + MatrixKernel.Size * index); } + } + + protected internal abstract unsafe T* BufferPointer { get; } + + public abstract void Dispose(); + + } + + internal class MatrixStorageHLSF(HLSFAllocator allocator, HLSFHandle handle) : MatrixStorage + where T: unmanaged, INumber + { + + internal HLSFAllocator _allocator = allocator; + internal HLSFHandle _handle = handle; + + protected internal override unsafe T* BufferPointer => (T*)_handle.Pointer; + + public override void Dispose() + { + allocator.Free(_handle); + } + + } } diff --git a/StgSharp.Mathematics/Numeric/NumericalModule.cs b/StgSharp.Mathematics/Numeric/NumericalModule.cs index dff8ab4e..3861adfe 100644 --- a/StgSharp.Mathematics/Numeric/NumericalModule.cs +++ b/StgSharp.Mathematics/Numeric/NumericalModule.cs @@ -1,90 +1,90 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="NumericalModule" -// 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.Internal; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Mathematics.Numeric -{ - public class NumericalModule : IStaticModule - { - - public static unsafe int DefaultSIMDAlignment - { - get - { - SIMDID id = GlobalIntrinsicMask; - return (id.MaskByte[0] & 0b_00001111) switch - { - 1 => id.MaskByte[1] switch - { - 1 => 16, - 2 => 32, - 3 => 64, - 4 => 64, - 5 => 64, - _ => 8, - }, - _ => 8, - }; - } - } - - public string ModuleName => "Math.Numerical"; - - internal static IntrinsicContext GlobalContext - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get; - } = new(); - - internal static SIMDID GlobalIntrinsicMask { get; set; } - - public void InitializeModule() - { - throw new NotImplementedException(); - } - - public void InitializeModule( - IModuleInitializeProfile profile - ) - { - MatrixParallel.Init(); - } - - public void UninitializeModule() - { - throw new NotImplementedException(); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="NumericalModule" +// 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.Internal; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Mathematics.Numeric +{ + public class NumericalModule : IStaticModule + { + + public static unsafe int DefaultSIMDAlignment + { + get + { + SIMDID id = GlobalIntrinsicMask; + return (id.MaskByte[0] & 0b_00001111) switch + { + 1 => id.MaskByte[1] switch + { + 1 => 16, + 2 => 32, + 3 => 64, + 4 => 64, + 5 => 64, + _ => 8, + }, + _ => 8, + }; + } + } + + public string ModuleName => "Math.Numerical"; + + internal static IntrinsicContext GlobalContext + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get; + } = new(); + + internal static SIMDID GlobalIntrinsicMask { get; set; } + + public void InitializeModule() + { + throw new NotImplementedException(); + } + + public void InitializeModule( + IModuleInitializeProfile profile + ) + { + MatrixParallel.Init(); + } + + public void UninitializeModule() + { + throw new NotImplementedException(); + } + + } +} diff --git a/StgSharp.Mathematics/Numeric/Runtime/MatrixParallel.Publish.cs b/StgSharp.Mathematics/Numeric/Runtime/MatrixParallel.Publish.cs index 52b94b92..09462fdc 100644 --- a/StgSharp.Mathematics/Numeric/Runtime/MatrixParallel.Publish.cs +++ b/StgSharp.Mathematics/Numeric/Runtime/MatrixParallel.Publish.cs @@ -1,76 +1,76 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="MatrixParallel.Publish" -// 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.Mathematics; -using StgSharp.Mathematics.Internal; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Mathematics.Numeric -{ - public static partial class MatrixParallel - { - - private const int MIN_TASK_PER_THREAD = 256; +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="MatrixParallel.Publish" +// 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.Mathematics; +using StgSharp.Mathematics.Internal; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Mathematics.Numeric +{ + public static partial class MatrixParallel + { + + private const int MIN_TASK_PER_THREAD = 256; private const int REC_TASK_PER_THREAD = 1024; [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static unsafe MatrixParallelWrap ScheduleTask( - MatrixParallelTask* package - ) - { - return ScheduleBufferTask(package); - } - - private static unsafe MatrixParallelWrap ScheduleBufferTask( - MatrixParallelTask* package - ) - { - /* - int primCount = package->PrimCount; - int secCount = package->SecCount; + internal static unsafe MatrixParallelWrap ScheduleTask( + MatrixParallelTask* package + ) + { + return ScheduleBufferTask(package); + } + + private static unsafe MatrixParallelWrap ScheduleBufferTask( + MatrixParallelTask* package + ) + { + /* + int primCount = package->PrimCount; + int secCount = package->SecCount; long count = (long)primCount * secCount; - /**/ + /**/ // Console.WriteLine($"amount of kernels is {count}"); - long recommendCount = /*count / /**/ 1024; - MatrixParallelThread[] pool = LeadParallel((int)recommendCount); - MatrixParallelWrap wrap = new MatrixParallelWrap(pool); - wrap.TaskQueue = MatrixParallelQueue.Rent(package); - return wrap; - } - - } + long recommendCount = /*count / /**/ 1024; + MatrixParallelThread[] pool = LeadParallel((int)recommendCount); + MatrixParallelWrap wrap = new MatrixParallelWrap(pool); + wrap.TaskQueue = MatrixParallelQueue.Rent(package); + return wrap; + } + + } } diff --git a/StgSharp.Mathematics/Numeric/Runtime/MatrixParallel.cs b/StgSharp.Mathematics/Numeric/Runtime/MatrixParallel.cs index 3af5785b..74da6aca 100644 --- a/StgSharp.Mathematics/Numeric/Runtime/MatrixParallel.cs +++ b/StgSharp.Mathematics/Numeric/Runtime/MatrixParallel.cs @@ -1,134 +1,134 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="MatrixParallel" -// 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.Internal; -using StgSharp.Mathematics.Internal; -using StgSharp.Mathematics.Internal; -using StgSharp.Mathematics.Memory; -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - -namespace StgSharp.Mathematics.Numeric -{ - public static partial class MatrixParallel - { - - private static bool _meaningful; - - private static CapacityFixedStack _threads; - - private static ConcurrentDictionary contextMap; - - private static SlabAllocator contextAllocator; - - public static bool IsParallelSupported { get; } = Environment.ProcessorCount > 6; - - public static bool IsParallelMeaningful => Environment.ProcessorCount > 6 && IsInitialized; - - private static bool IsInitialized { get; set; } = false; - - internal static unsafe IntrinsicContext* GetContext( - SIMDID simd - ) - { - if (!IsParallelSupported) { - return null; - } - if (contextMap.TryGetValue(simd, out nint handle)) - { - return (IntrinsicContext*)handle; - } else - { - IntrinsicContext* context = (IntrinsicContext*)contextAllocator.Allocate(); - - return context; - } - } - - internal static void Init() - { - if (IsInitialized) { - return; - } - if (!IsParallelSupported) - { - IsInitialized = true; - return; - } - MatrixParallelFactory.Init(); - contextAllocator = SlabAllocator.Create(4, SlabBufferLayout.Chunked, false); - contextMap = []; - int count = Environment.ProcessorCount; - _threads = new(count); - for (int i = 0; i < count; i++) - { - MatrixParallelThread thread = new MatrixParallelThread(i); - _threads.Push(thread); - SpinWait.SpinUntil(() => thread.State == MatrixThreadState.Ready); - } - - // TODO 构建全局的保底上下文 - foreach (MatrixParallelThread thread in _threads) { } - if (contextMap.Keys.Count == 1) - { - for (int i = 0; i < 4; i++) - { - MatrixParallelThread thread = _threads.Pop(); - thread.Dispose(); - } - } else - { - // TODO 排序并丢弃四个能力最弱线程 - } - _awaitingLeaderHandle = new AwaitingQueue(); - IsInitialized = true; - } - - [LibraryImport(Native.LibName, EntryPoint = "sn_compare_simd")] - [UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])] - private static unsafe partial ulong CompareSIMDID( - IntrinsicContext* context, - ulong id - ); - - [LibraryImport(Native.LibName, EntryPoint = "load_intrinsic_function")] - [UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])] - private static unsafe partial void LoadIntrinsicFunction( - IntrinsicContext* context, - ulong id - ); - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="MatrixParallel" +// 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.Internal; +using StgSharp.Mathematics.Internal; +using StgSharp.Mathematics.Internal; +using StgSharp.Mathematics.Memory; +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace StgSharp.Mathematics.Numeric +{ + public static partial class MatrixParallel + { + + private static bool _meaningful; + + private static CapacityFixedStack _threads; + + private static ConcurrentDictionary contextMap; + + private static SlabAllocator contextAllocator; + + public static bool IsParallelSupported { get; } = Environment.ProcessorCount > 6; + + public static bool IsParallelMeaningful => Environment.ProcessorCount > 6 && IsInitialized; + + private static bool IsInitialized { get; set; } = false; + + internal static unsafe IntrinsicContext* GetContext( + SIMDID simd + ) + { + if (!IsParallelSupported) { + return null; + } + if (contextMap.TryGetValue(simd, out nint handle)) + { + return (IntrinsicContext*)handle; + } else + { + IntrinsicContext* context = (IntrinsicContext*)contextAllocator.Allocate(); + + return context; + } + } + + internal static void Init() + { + if (IsInitialized) { + return; + } + if (!IsParallelSupported) + { + IsInitialized = true; + return; + } + MatrixParallelFactory.Init(); + contextAllocator = SlabAllocator.Create(4, SlabBufferLayout.Chunked, false); + contextMap = []; + int count = Environment.ProcessorCount; + _threads = new(count); + for (int i = 0; i < count; i++) + { + MatrixParallelThread thread = new MatrixParallelThread(i); + _threads.Push(thread); + SpinWait.SpinUntil(() => thread.State == MatrixThreadState.Ready); + } + + // TODO 构建全局的保底上下文 + foreach (MatrixParallelThread thread in _threads) { } + if (contextMap.Keys.Count == 1) + { + for (int i = 0; i < 4; i++) + { + MatrixParallelThread thread = _threads.Pop(); + thread.Dispose(); + } + } else + { + // TODO 排序并丢弃四个能力最弱线程 + } + _awaitingLeaderHandle = new AwaitingQueue(); + IsInitialized = true; + } + + [LibraryImport(Native.LibName, EntryPoint = "sn_compare_simd")] + [UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])] + private static unsafe partial ulong CompareSIMDID( + IntrinsicContext* context, + ulong id + ); + + [LibraryImport(Native.LibName, EntryPoint = "load_intrinsic_function")] + [UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])] + private static unsafe partial void LoadIntrinsicFunction( + IntrinsicContext* context, + ulong id + ); + + } +} diff --git a/StgSharp.Mathematics/Numeric/Runtime/MatrixTaskFactory.cs b/StgSharp.Mathematics/Numeric/Runtime/MatrixTaskFactory.cs index 933ad4d8..197f83b0 100644 --- a/StgSharp.Mathematics/Numeric/Runtime/MatrixTaskFactory.cs +++ b/StgSharp.Mathematics/Numeric/Runtime/MatrixTaskFactory.cs @@ -1,49 +1,49 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="MatrixTaskFactory" -// 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.Internal; -using StgSharp.Mathematics.Memory; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Text; -using System.Threading; +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="MatrixTaskFactory" +// 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.Internal; +using StgSharp.Mathematics.Memory; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading; using System.Threading.Tasks; -using hlsfAllocator = StgSharp.Mathematics.Memory.HybridLayerSegregatedFitAllocator; - -namespace StgSharp.Mathematics.Numeric -{ - internal static unsafe class MatrixParallelFactory - { - +using hlsfAllocator = StgSharp.Mathematics.Memory.HybridLayerSegregatedFitAllocator; + +namespace StgSharp.Mathematics.Numeric +{ + internal static unsafe class MatrixParallelFactory + { + private static hlsfAllocator _intermediateResult; private static @@ -58,60 +58,60 @@ namespace StgSharp.Mathematics.Numeric private static SlabAllocator _wrapAllocator; - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static MatrixParallelTask* CreateBaseTask() - { - MatrixParallelTask* p = (MatrixParallelTask*)_wrapAllocator.Allocate(); - Span s = new Span((byte*)p, sizeof(MatrixParallelTask)); - s.Fill(0); - return p; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ScalarPacket* CreateScalarPacket() - { - ScalarPacket* p = (ScalarPacket*)_scalarAllocator.Allocate(); - return p; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe MatrixParallelTask* FromExistPackage( - MatrixParallelTask* exist - ) - { - MatrixParallelTask* ptr = (MatrixParallelTask*)_wrapAllocator.Allocate(); - MatrixParallelTask.Copy(exist, ptr); - return ptr; - } - + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static MatrixParallelTask* CreateBaseTask() + { + MatrixParallelTask* p = (MatrixParallelTask*)_wrapAllocator.Allocate(); + Span s = new Span((byte*)p, sizeof(MatrixParallelTask)); + s.Fill(0); + return p; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ScalarPacket* CreateScalarPacket() + { + ScalarPacket* p = (ScalarPacket*)_scalarAllocator.Allocate(); + return p; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe MatrixParallelTask* FromExistPackage( + MatrixParallelTask* exist + ) + { + MatrixParallelTask* ptr = (MatrixParallelTask*)_wrapAllocator.Allocate(); + MatrixParallelTask.Copy(exist, ptr); + return ptr; + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void Release( - ScalarPacket* source - ) - { - _scalarAllocator.Free((nuint)source); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void Release( - MatrixParallelTask* source - ) - { - _wrapAllocator.Free((nuint)source); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void Init() - { - if (_intermediateResult is null) - { - _intermediateResult = new hlsfAllocator(64 * 16 * 16); - _scalarAllocator = SlabAllocator.Create(64 * 1024, SlabBufferLayout.Chunked); + public static void Release( + ScalarPacket* source + ) + { + _scalarAllocator.Free((nuint)source); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void Release( + MatrixParallelTask* source + ) + { + _wrapAllocator.Free((nuint)source); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void Init() + { + if (_intermediateResult is null) + { + _intermediateResult = new hlsfAllocator(64 * 16 * 16); + _scalarAllocator = SlabAllocator.Create(64 * 1024, SlabBufferLayout.Chunked); _wrapAllocator = SlabAllocator. - Create(128 * 1024, SlabBufferLayout.Chunked); - } - } - - } + Create(128 * 1024, SlabBufferLayout.Chunked); + } + } + + } } \ No newline at end of file diff --git a/StgSharp.Mathematics/StgSharp.Mathematics.csproj b/StgSharp.Mathematics/StgSharp.Mathematics.csproj index ebd0bd33..f1848ab2 100644 --- a/StgSharp.Mathematics/StgSharp.Mathematics.csproj +++ b/StgSharp.Mathematics/StgSharp.Mathematics.csproj @@ -1,12 +1,12 @@ - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/StgSharp.Model/StgSharp.Model.csproj b/StgSharp.Model/StgSharp.Model.csproj index d72373c0..d089af23 100644 --- a/StgSharp.Model/StgSharp.Model.csproj +++ b/StgSharp.Model/StgSharp.Model.csproj @@ -1,7 +1,7 @@ - - - - - - - + + + + + + + diff --git a/StgSharp.Native/.clang-format b/StgSharp.Native/.clang-format index fecdb71c..89332e75 100644 --- a/StgSharp.Native/.clang-format +++ b/StgSharp.Native/.clang-format @@ -1,747 +1,747 @@ -# Format Style Options - Created with Clang Power Tools ---- -AccessModifierOffset: -4 -AlignAfterOpenBracket: Align -AlignConsecutiveAssignments: false -AlignConsecutiveDeclarations: false -AlignEscapedNewlines: Left -AlignOperands: true -AlignTrailingComments: false -AllowAllParametersOfDeclarationOnNextLine: false -AllowShortBlocksOnASingleLine: false -AllowShortCaseLabelsOnASingleLine: false -AllowShortFunctionsOnASingleLine: None -AllowShortIfStatementsOnASingleLine: false -AllowShortLoopsOnASingleLine: false -AlwaysBreakAfterDefinitionReturnType: None -AlwaysBreakAfterReturnType: None -AlwaysBreakBeforeMultilineStrings: false -AlwaysBreakTemplateDeclarations: false -BinPackArguments: true -BinPackParameters: true -BraceWrapping: - AfterCaseLabel: false - AfterClass: false - AfterControlStatement: false - AfterEnum: false - AfterFunction: true - AfterNamespace: true - AfterObjCDeclaration: false - AfterStruct: false - AfterUnion: false - AfterExternBlock: false - BeforeCatch: false - BeforeElse: false - IndentBraces: false - SplitEmptyFunction: true - SplitEmptyRecord: true - SplitEmptyNamespace: true - BeforeLambdaBody: false - BeforeWhile: false -BreakBeforeBinaryOperators: None -BreakBeforeBraces: Custom -BreakBeforeInheritanceComma: false -BreakBeforeTernaryOperators: false -BreakConstructorInitializers: BeforeComma -BreakAfterJavaFieldAnnotations: false -BreakStringLiterals: false -ColumnLimit: 100 -CommentPragmas: '^ IWYU pragma:' -CompactNamespaces: false -ConstructorInitializerAllOnOneLineOrOnePerLine: false -ConstructorInitializerIndentWidth : 8 -ContinuationIndentWidth: 8 -Cpp11BracedListStyle: false -DerivePointerAlignment: false -ExperimentalAutoDetectBinPacking: false -FixNamespaceComments: false -ForEachMacros: - - '__ata_qc_for_each' - - '__bio_for_each_bvec' - - '__bio_for_each_segment' - - '__evlist__for_each_entry' - - '__evlist__for_each_entry_continue' - - '__evlist__for_each_entry_from' - - '__evlist__for_each_entry_reverse' - - '__evlist__for_each_entry_safe' - - '__for_each_mem_range' - - '__for_each_mem_range_rev' - - '__for_each_thread' - - '__hlist_for_each_rcu' - - '__map__for_each_symbol_by_name' - - '__pci_bus_for_each_res0' - - '__pci_bus_for_each_res1' - - '__pci_dev_for_each_res0' - - '__pci_dev_for_each_res1' - - '__perf_evlist__for_each_entry' - - '__perf_evlist__for_each_entry_reverse' - - '__perf_evlist__for_each_entry_safe' - - '__rq_for_each_bio' - - '__shost_for_each_device' - - '__sym_for_each' - - 'apei_estatus_for_each_section' - - 'ata_for_each_dev' - - 'ata_for_each_link' - - 'ata_qc_for_each' - - 'ata_qc_for_each_raw' - - 'ata_qc_for_each_with_internal' - - 'ax25_for_each' - - 'ax25_uid_for_each' - - 'bio_for_each_bvec' - - 'bio_for_each_bvec_all' - - 'bio_for_each_folio_all' - - 'bio_for_each_integrity_vec' - - 'bio_for_each_segment' - - 'bio_for_each_segment_all' - - 'bio_list_for_each' - - 'bip_for_each_vec' - - 'bond_for_each_slave' - - 'bond_for_each_slave_rcu' - - 'bpf_for_each' - - 'bpf_for_each_reg_in_vstate' - - 'bpf_for_each_reg_in_vstate_mask' - - 'bpf_for_each_spilled_reg' - - 'bpf_object__for_each_map' - - 'bpf_object__for_each_program' - - 'btree_for_each_safe128' - - 'btree_for_each_safe32' - - 'btree_for_each_safe64' - - 'btree_for_each_safel' - - 'card_for_each_dev' - - 'cgroup_taskset_for_each' - - 'cgroup_taskset_for_each_leader' - - 'cpu_aggr_map__for_each_idx' - - 'cpufreq_for_each_efficient_entry_idx' - - 'cpufreq_for_each_entry' - - 'cpufreq_for_each_entry_idx' - - 'cpufreq_for_each_valid_entry' - - 'cpufreq_for_each_valid_entry_idx' - - 'css_for_each_child' - - 'css_for_each_descendant_post' - - 'css_for_each_descendant_pre' - - 'damon_for_each_region' - - 'damon_for_each_region_from' - - 'damon_for_each_region_safe' - - 'damon_for_each_scheme' - - 'damon_for_each_scheme_safe' - - 'damon_for_each_target' - - 'damon_for_each_target_safe' - - 'damos_for_each_filter' - - 'damos_for_each_filter_safe' - - 'damos_for_each_quota_goal' - - 'damos_for_each_quota_goal_safe' - - 'data__for_each_file' - - 'data__for_each_file_new' - - 'data__for_each_file_start' - - 'device_for_each_child_node' - - 'device_for_each_child_node_scoped' - - 'dma_fence_array_for_each' - - 'dma_fence_chain_for_each' - - 'dma_fence_unwrap_for_each' - - 'dma_resv_for_each_fence' - - 'dma_resv_for_each_fence_unlocked' - - 'do_for_each_ftrace_op' - - 'drm_atomic_crtc_for_each_plane' - - 'drm_atomic_crtc_state_for_each_plane' - - 'drm_atomic_crtc_state_for_each_plane_state' - - 'drm_atomic_for_each_plane_damage' - - 'drm_client_for_each_connector_iter' - - 'drm_client_for_each_modeset' - - 'drm_connector_for_each_possible_encoder' - - 'drm_exec_for_each_locked_object' - - 'drm_exec_for_each_locked_object_reverse' - - 'drm_for_each_bridge_in_chain' - - 'drm_for_each_connector_iter' - - 'drm_for_each_crtc' - - 'drm_for_each_crtc_reverse' - - 'drm_for_each_encoder' - - 'drm_for_each_encoder_mask' - - 'drm_for_each_fb' - - 'drm_for_each_legacy_plane' - - 'drm_for_each_plane' - - 'drm_for_each_plane_mask' - - 'drm_for_each_privobj' - - 'drm_gem_for_each_gpuvm_bo' - - 'drm_gem_for_each_gpuvm_bo_safe' - - 'drm_gpuva_for_each_op' - - 'drm_gpuva_for_each_op_from_reverse' - - 'drm_gpuva_for_each_op_reverse' - - 'drm_gpuva_for_each_op_safe' - - 'drm_gpuvm_bo_for_each_va' - - 'drm_gpuvm_bo_for_each_va_safe' - - 'drm_gpuvm_for_each_va' - - 'drm_gpuvm_for_each_va_range' - - 'drm_gpuvm_for_each_va_range_safe' - - 'drm_gpuvm_for_each_va_safe' - - 'drm_mm_for_each_hole' - - 'drm_mm_for_each_node' - - 'drm_mm_for_each_node_in_range' - - 'drm_mm_for_each_node_safe' - - 'dsa_switch_for_each_available_port' - - 'dsa_switch_for_each_cpu_port' - - 'dsa_switch_for_each_cpu_port_continue_reverse' - - 'dsa_switch_for_each_port' - - 'dsa_switch_for_each_port_continue_reverse' - - 'dsa_switch_for_each_port_safe' - - 'dsa_switch_for_each_user_port' - - 'dsa_switch_for_each_user_port_continue_reverse' - - 'dsa_tree_for_each_cpu_port' - - 'dsa_tree_for_each_user_port' - - 'dsa_tree_for_each_user_port_continue_reverse' - - 'dso__for_each_symbol' - - 'elf_hash_for_each_possible' - - 'elf_symtab__for_each_symbol' - - 'evlist__for_each_cpu' - - 'evlist__for_each_entry' - - 'evlist__for_each_entry_continue' - - 'evlist__for_each_entry_from' - - 'evlist__for_each_entry_reverse' - - 'evlist__for_each_entry_safe' - - 'flow_action_for_each' - - 'for_each_acpi_consumer_dev' - - 'for_each_acpi_dev_match' - - 'for_each_active_dev_scope' - - 'for_each_active_drhd_unit' - - 'for_each_active_iommu' - - 'for_each_active_route' - - 'for_each_aggr_pgid' - - 'for_each_and_bit' - - 'for_each_andnot_bit' - - 'for_each_available_child_of_node' - - 'for_each_available_child_of_node_scoped' - - 'for_each_bench' - - 'for_each_bio' - - 'for_each_board_func_rsrc' - - 'for_each_btf_ext_rec' - - 'for_each_btf_ext_sec' - - 'for_each_bvec' - - 'for_each_card_auxs' - - 'for_each_card_auxs_safe' - - 'for_each_card_components' - - 'for_each_card_dapms' - - 'for_each_card_pre_auxs' - - 'for_each_card_prelinks' - - 'for_each_card_rtds' - - 'for_each_card_rtds_safe' - - 'for_each_card_widgets' - - 'for_each_card_widgets_safe' - - 'for_each_cgroup_storage_type' - - 'for_each_child_of_node' - - 'for_each_child_of_node_scoped' - - 'for_each_clear_bit' - - 'for_each_clear_bit_from' - - 'for_each_clear_bitrange' - - 'for_each_clear_bitrange_from' - - 'for_each_cmd' - - 'for_each_cmsghdr' - - 'for_each_collection' - - 'for_each_comp_order' - - 'for_each_compatible_node' - - 'for_each_component_dais' - - 'for_each_component_dais_safe' - - 'for_each_conduit' - - 'for_each_console' - - 'for_each_console_srcu' - - 'for_each_cpu' - - 'for_each_cpu_and' - - 'for_each_cpu_andnot' - - 'for_each_cpu_from' - - 'for_each_cpu_or' - - 'for_each_cpu_wrap' - - 'for_each_dapm_widgets' - - 'for_each_dedup_cand' - - 'for_each_dev_addr' - - 'for_each_dev_scope' - - 'for_each_dma_cap_mask' - - 'for_each_dpcm_be' - - 'for_each_dpcm_be_rollback' - - 'for_each_dpcm_be_safe' - - 'for_each_dpcm_fe' - - 'for_each_drhd_unit' - - 'for_each_dss_dev' - - 'for_each_efi_memory_desc' - - 'for_each_efi_memory_desc_in_map' - - 'for_each_element' - - 'for_each_element_extid' - - 'for_each_element_id' - - 'for_each_enabled_cpu' - - 'for_each_endpoint_of_node' - - 'for_each_event' - - 'for_each_event_tps' - - 'for_each_evictable_lru' - - 'for_each_fib6_node_rt_rcu' - - 'for_each_fib6_walker_rt' - - 'for_each_file_lock' - - 'for_each_free_mem_pfn_range_in_zone_from' - - 'for_each_free_mem_range' - - 'for_each_free_mem_range_reverse' - - 'for_each_func_rsrc' - - 'for_each_gpiochip_node' - - 'for_each_group_evsel' - - 'for_each_group_evsel_head' - - 'for_each_group_member' - - 'for_each_group_member_head' - - 'for_each_hstate' - - 'for_each_hwgpio' - - 'for_each_if' - - 'for_each_inject_fn' - - 'for_each_insn' - - 'for_each_insn_op_loc' - - 'for_each_insn_prefix' - - 'for_each_intid' - - 'for_each_iommu' - - 'for_each_ip_tunnel_rcu' - - 'for_each_irq_nr' - - 'for_each_lang' - - 'for_each_link_ch_maps' - - 'for_each_link_codecs' - - 'for_each_link_cpus' - - 'for_each_link_platforms' - - 'for_each_lru' - - 'for_each_matching_node' - - 'for_each_matching_node_and_match' - - 'for_each_media_entity_data_link' - - 'for_each_mem_pfn_range' - - 'for_each_mem_range' - - 'for_each_mem_range_rev' - - 'for_each_mem_region' - - 'for_each_member' - - 'for_each_memory' - - 'for_each_migratetype_order' - - 'for_each_missing_reg' - - 'for_each_mle_subelement' - - 'for_each_mod_mem_type' - - 'for_each_net' - - 'for_each_net_continue_reverse' - - 'for_each_net_rcu' - - 'for_each_netdev' - - 'for_each_netdev_continue' - - 'for_each_netdev_continue_rcu' - - 'for_each_netdev_continue_reverse' - - 'for_each_netdev_dump' - - 'for_each_netdev_feature' - - 'for_each_netdev_in_bond_rcu' - - 'for_each_netdev_rcu' - - 'for_each_netdev_reverse' - - 'for_each_netdev_safe' - - 'for_each_new_connector_in_state' - - 'for_each_new_crtc_in_state' - - 'for_each_new_mst_mgr_in_state' - - 'for_each_new_plane_in_state' - - 'for_each_new_plane_in_state_reverse' - - 'for_each_new_private_obj_in_state' - - 'for_each_new_reg' - - 'for_each_nhlt_endpoint' - - 'for_each_nhlt_endpoint_fmtcfg' - - 'for_each_nhlt_fmtcfg' - - 'for_each_node' - - 'for_each_node_by_name' - - 'for_each_node_by_type' - - 'for_each_node_mask' - - 'for_each_node_state' - - 'for_each_node_with_cpus' - - 'for_each_node_with_property' - - 'for_each_nonreserved_multicast_dest_pgid' - - 'for_each_numa_hop_mask' - - 'for_each_of_allnodes' - - 'for_each_of_allnodes_from' - - 'for_each_of_cpu_node' - - 'for_each_of_pci_range' - - 'for_each_old_connector_in_state' - - 'for_each_old_crtc_in_state' - - 'for_each_old_mst_mgr_in_state' - - 'for_each_old_plane_in_state' - - 'for_each_old_private_obj_in_state' - - 'for_each_oldnew_connector_in_state' - - 'for_each_oldnew_crtc_in_state' - - 'for_each_oldnew_mst_mgr_in_state' - - 'for_each_oldnew_plane_in_state' - - 'for_each_oldnew_plane_in_state_reverse' - - 'for_each_oldnew_private_obj_in_state' - - 'for_each_online_cpu' - - 'for_each_online_node' - - 'for_each_online_pgdat' - - 'for_each_or_bit' - - 'for_each_path' - - 'for_each_pci_bridge' - - 'for_each_pci_dev' - - 'for_each_pcm_streams' - - 'for_each_physmem_range' - - 'for_each_populated_zone' - - 'for_each_possible_cpu' - - 'for_each_present_blessed_reg' - - 'for_each_present_cpu' - - 'for_each_prime_number' - - 'for_each_prime_number_from' - - 'for_each_probe_cache_entry' - - 'for_each_process' - - 'for_each_process_thread' - - 'for_each_prop_codec_conf' - - 'for_each_prop_dai_codec' - - 'for_each_prop_dai_cpu' - - 'for_each_prop_dlc_codecs' - - 'for_each_prop_dlc_cpus' - - 'for_each_prop_dlc_platforms' - - 'for_each_property_of_node' - - 'for_each_reg' - - 'for_each_reg_filtered' - - 'for_each_reloc' - - 'for_each_reloc_from' - - 'for_each_requested_gpio' - - 'for_each_requested_gpio_in_range' - - 'for_each_reserved_child_of_node' - - 'for_each_reserved_mem_range' - - 'for_each_reserved_mem_region' - - 'for_each_rtd_ch_maps' - - 'for_each_rtd_codec_dais' - - 'for_each_rtd_components' - - 'for_each_rtd_cpu_dais' - - 'for_each_rtd_dais' - - 'for_each_rtd_dais_reverse' - - 'for_each_sband_iftype_data' - - 'for_each_script' - - 'for_each_sec' - - 'for_each_set_bit' - - 'for_each_set_bit_from' - - 'for_each_set_bit_wrap' - - 'for_each_set_bitrange' - - 'for_each_set_bitrange_from' - - 'for_each_set_clump8' - - 'for_each_sg' - - 'for_each_sg_dma_page' - - 'for_each_sg_page' - - 'for_each_sgtable_dma_page' - - 'for_each_sgtable_dma_sg' - - 'for_each_sgtable_page' - - 'for_each_sgtable_sg' - - 'for_each_sibling_event' - - 'for_each_sta_active_link' - - 'for_each_subelement' - - 'for_each_subelement_extid' - - 'for_each_subelement_id' - - 'for_each_sublist' - - 'for_each_subsystem' - - 'for_each_supported_activate_fn' - - 'for_each_supported_inject_fn' - - 'for_each_sym' - - 'for_each_test' - - 'for_each_thread' - - 'for_each_token' - - 'for_each_unicast_dest_pgid' - - 'for_each_valid_link' - - 'for_each_vif_active_link' - - 'for_each_vma' - - 'for_each_vma_range' - - 'for_each_vsi' - - 'for_each_wakeup_source' - - 'for_each_zone' - - 'for_each_zone_zonelist' - - 'for_each_zone_zonelist_nodemask' - - 'func_for_each_insn' - - 'fwnode_for_each_available_child_node' - - 'fwnode_for_each_child_node' - - 'fwnode_for_each_parent_node' - - 'fwnode_graph_for_each_endpoint' - - 'gadget_for_each_ep' - - 'genradix_for_each' - - 'genradix_for_each_from' - - 'genradix_for_each_reverse' - - 'hash_for_each' - - 'hash_for_each_possible' - - 'hash_for_each_possible_rcu' - - 'hash_for_each_possible_rcu_notrace' - - 'hash_for_each_possible_safe' - - 'hash_for_each_rcu' - - 'hash_for_each_safe' - - 'hashmap__for_each_entry' - - 'hashmap__for_each_entry_safe' - - 'hashmap__for_each_key_entry' - - 'hashmap__for_each_key_entry_safe' - - 'hctx_for_each_ctx' - - 'hists__for_each_format' - - 'hists__for_each_sort_list' - - 'hlist_bl_for_each_entry' - - 'hlist_bl_for_each_entry_rcu' - - 'hlist_bl_for_each_entry_safe' - - 'hlist_for_each' - - 'hlist_for_each_entry' - - 'hlist_for_each_entry_continue' - - 'hlist_for_each_entry_continue_rcu' - - 'hlist_for_each_entry_continue_rcu_bh' - - 'hlist_for_each_entry_from' - - 'hlist_for_each_entry_from_rcu' - - 'hlist_for_each_entry_rcu' - - 'hlist_for_each_entry_rcu_bh' - - 'hlist_for_each_entry_rcu_notrace' - - 'hlist_for_each_entry_safe' - - 'hlist_for_each_entry_srcu' - - 'hlist_for_each_safe' - - 'hlist_nulls_for_each_entry' - - 'hlist_nulls_for_each_entry_from' - - 'hlist_nulls_for_each_entry_rcu' - - 'hlist_nulls_for_each_entry_safe' - - 'i3c_bus_for_each_i2cdev' - - 'i3c_bus_for_each_i3cdev' - - 'idr_for_each_entry' - - 'idr_for_each_entry_continue' - - 'idr_for_each_entry_continue_ul' - - 'idr_for_each_entry_ul' - - 'in_dev_for_each_ifa_rcu' - - 'in_dev_for_each_ifa_rtnl' - - 'inet_bind_bucket_for_each' - - 'interval_tree_for_each_span' - - 'intlist__for_each_entry' - - 'intlist__for_each_entry_safe' - - 'kcore_copy__for_each_phdr' - - 'key_for_each' - - 'key_for_each_safe' - - 'klp_for_each_func' - - 'klp_for_each_func_safe' - - 'klp_for_each_func_static' - - 'klp_for_each_object' - - 'klp_for_each_object_safe' - - 'klp_for_each_object_static' - - 'kunit_suite_for_each_test_case' - - 'kvm_for_each_memslot' - - 'kvm_for_each_memslot_in_gfn_range' - - 'kvm_for_each_vcpu' - - 'libbpf_nla_for_each_attr' - - 'list_for_each' - - 'list_for_each_codec' - - 'list_for_each_codec_safe' - - 'list_for_each_continue' - - 'list_for_each_entry' - - 'list_for_each_entry_continue' - - 'list_for_each_entry_continue_rcu' - - 'list_for_each_entry_continue_reverse' - - 'list_for_each_entry_from' - - 'list_for_each_entry_from_rcu' - - 'list_for_each_entry_from_reverse' - - 'list_for_each_entry_lockless' - - 'list_for_each_entry_rcu' - - 'list_for_each_entry_reverse' - - 'list_for_each_entry_safe' - - 'list_for_each_entry_safe_continue' - - 'list_for_each_entry_safe_from' - - 'list_for_each_entry_safe_reverse' - - 'list_for_each_entry_srcu' - - 'list_for_each_from' - - 'list_for_each_prev' - - 'list_for_each_prev_safe' - - 'list_for_each_rcu' - - 'list_for_each_reverse' - - 'list_for_each_safe' - - 'llist_for_each' - - 'llist_for_each_entry' - - 'llist_for_each_entry_safe' - - 'llist_for_each_safe' - - 'lwq_for_each_safe' - - 'map__for_each_symbol' - - 'map__for_each_symbol_by_name' - - 'mas_for_each' - - 'mci_for_each_dimm' - - 'media_device_for_each_entity' - - 'media_device_for_each_intf' - - 'media_device_for_each_link' - - 'media_device_for_each_pad' - - 'media_entity_for_each_pad' - - 'media_pipeline_for_each_entity' - - 'media_pipeline_for_each_pad' - - 'mlx5_lag_for_each_peer_mdev' - - 'msi_domain_for_each_desc' - - 'msi_for_each_desc' - - 'mt_for_each' - - 'nanddev_io_for_each_page' - - 'netdev_for_each_lower_dev' - - 'netdev_for_each_lower_private' - - 'netdev_for_each_lower_private_rcu' - - 'netdev_for_each_mc_addr' - - 'netdev_for_each_synced_mc_addr' - - 'netdev_for_each_synced_uc_addr' - - 'netdev_for_each_uc_addr' - - 'netdev_for_each_upper_dev_rcu' - - 'netdev_hw_addr_list_for_each' - - 'nft_rule_for_each_expr' - - 'nla_for_each_attr' - - 'nla_for_each_attr_type' - - 'nla_for_each_nested' - - 'nla_for_each_nested_type' - - 'nlmsg_for_each_attr' - - 'nlmsg_for_each_msg' - - 'nr_neigh_for_each' - - 'nr_neigh_for_each_safe' - - 'nr_node_for_each' - - 'nr_node_for_each_safe' - - 'of_for_each_phandle' - - 'of_property_for_each_string' - - 'of_property_for_each_u32' - - 'pci_bus_for_each_resource' - - 'pci_dev_for_each_resource' - - 'pcl_for_each_chunk' - - 'pcl_for_each_segment' - - 'pcm_for_each_format' - - 'perf_config_items__for_each_entry' - - 'perf_config_sections__for_each_entry' - - 'perf_config_set__for_each_entry' - - 'perf_cpu_map__for_each_cpu' - - 'perf_cpu_map__for_each_cpu_skip_any' - - 'perf_cpu_map__for_each_idx' - - 'perf_evlist__for_each_entry' - - 'perf_evlist__for_each_entry_reverse' - - 'perf_evlist__for_each_entry_safe' - - 'perf_evlist__for_each_evsel' - - 'perf_evlist__for_each_mmap' - - 'perf_hpp_list__for_each_format' - - 'perf_hpp_list__for_each_format_safe' - - 'perf_hpp_list__for_each_sort_list' - - 'perf_hpp_list__for_each_sort_list_safe' - - 'perf_tool_event__for_each_event' - - 'plist_for_each' - - 'plist_for_each_continue' - - 'plist_for_each_entry' - - 'plist_for_each_entry_continue' - - 'plist_for_each_entry_safe' - - 'plist_for_each_safe' - - 'pnp_for_each_card' - - 'pnp_for_each_dev' - - 'protocol_for_each_card' - - 'protocol_for_each_dev' - - 'queue_for_each_hw_ctx' - - 'radix_tree_for_each_slot' - - 'radix_tree_for_each_tagged' - - 'rb_for_each' - - 'rbtree_postorder_for_each_entry_safe' - - 'rdma_for_each_block' - - 'rdma_for_each_port' - - 'rdma_umem_for_each_dma_block' - - 'resort_rb__for_each_entry' - - 'resource_list_for_each_entry' - - 'resource_list_for_each_entry_safe' - - 'rhl_for_each_entry_rcu' - - 'rhl_for_each_rcu' - - 'rht_for_each' - - 'rht_for_each_entry' - - 'rht_for_each_entry_from' - - 'rht_for_each_entry_rcu' - - 'rht_for_each_entry_rcu_from' - - 'rht_for_each_entry_safe' - - 'rht_for_each_from' - - 'rht_for_each_rcu' - - 'rht_for_each_rcu_from' - - 'rq_for_each_bvec' - - 'rq_for_each_segment' - - 'rq_list_for_each' - - 'rq_list_for_each_safe' - - 'sample_read_group__for_each' - - 'scsi_for_each_prot_sg' - - 'scsi_for_each_sg' - - 'sctp_for_each_hentry' - - 'sctp_skb_for_each' - - 'sec_for_each_insn' - - 'sec_for_each_insn_continue' - - 'sec_for_each_insn_from' - - 'sec_for_each_sym' - - 'shdma_for_each_chan' - - 'shost_for_each_device' - - 'sk_for_each' - - 'sk_for_each_bound' - - 'sk_for_each_entry_offset_rcu' - - 'sk_for_each_from' - - 'sk_for_each_rcu' - - 'sk_for_each_safe' - - 'sk_nulls_for_each' - - 'sk_nulls_for_each_from' - - 'sk_nulls_for_each_rcu' - - 'snd_array_for_each' - - 'snd_pcm_group_for_each_entry' - - 'snd_soc_dapm_widget_for_each_path' - - 'snd_soc_dapm_widget_for_each_path_safe' - - 'snd_soc_dapm_widget_for_each_sink_path' - - 'snd_soc_dapm_widget_for_each_source_path' - - 'sparsebit_for_each_set_range' - - 'strlist__for_each_entry' - - 'strlist__for_each_entry_safe' - - 'sym_for_each_insn' - - 'sym_for_each_insn_continue_reverse' - - 'symbols__for_each_entry' - - 'tb_property_for_each' - - 'tcf_act_for_each_action' - - 'tcf_exts_for_each_action' - - 'ttm_resource_manager_for_each_res' - - 'udp_portaddr_for_each_entry' - - 'udp_portaddr_for_each_entry_rcu' - - 'usb_hub_for_each_child' - - 'v4l2_device_for_each_subdev' - - 'v4l2_m2m_for_each_dst_buf' - - 'v4l2_m2m_for_each_dst_buf_safe' - - 'v4l2_m2m_for_each_src_buf' - - 'v4l2_m2m_for_each_src_buf_safe' - - 'virtio_device_for_each_vq' - - 'while_for_each_ftrace_op' - - 'xa_for_each' - - 'xa_for_each_marked' - - 'xa_for_each_range' - - 'xa_for_each_start' - - 'xas_for_each' - - 'xas_for_each_conflict' - - 'xas_for_each_marked' - - 'xbc_array_for_each_value' - - 'xbc_for_each_key_value' - - 'xbc_node_for_each_array_value' - - 'xbc_node_for_each_child' - - 'xbc_node_for_each_key_value' - - 'xbc_node_for_each_subkey' - - 'ynl_attr_for_each' - - 'ynl_attr_for_each_nested' - - 'ynl_attr_for_each_payload' - - 'zorro_for_each_dev' -IncludeBlocks: Preserve -IncludeCategories: - - Regex: '.*' - Priority: 1 -IncludeIsMainRegex: (Test)?$ -IndentCaseLabels: false -IndentGotoLabels: false -IndentPPDirectives: None -IndentWidth: 8 -IndentWrappedFunctionNames: false -JavaScriptQuotes: Leave -JavaScriptWrapImports: true -KeepEmptyLinesAtTheStartOfBlocks: false -MacroBlockBegin: '' -MacroBlockEnd: '' -MaxEmptyLinesToKeep: 1 -NamespaceIndentation: None -ObjCBinPackProtocolList: Auto -ObjCBlockIndentWidth: 8 -ObjCSpaceAfterProperty: true -ObjCSpaceBeforeProtocolList: true -PenaltyBreakAssignment: 10 -PenaltyBreakBeforeFirstCallParameter: 30 -PenaltyBreakComment: 10 -PenaltyBreakFirstLessLess: 0 -PenaltyBreakString: 10 -PenaltyExcessCharacter: 100 -PenaltyReturnTypeOnItsOwnLine: 60 -PointerAlignment: Right -ReflowComments: false -SortIncludes: false -SortUsingDeclarations: false -SpaceAfterCStyleCast: false -SpaceAfterTemplateKeyword: true -SpaceBeforeAssignmentOperators: true -SpaceBeforeCtorInitializerColon: true -SpaceBeforeInheritanceColon: true -SpaceBeforeParens: ControlStatementsExceptForEachMacros -SpaceBeforeRangeBasedForLoopColon: true -SpaceInEmptyParentheses: false -SpacesBeforeTrailingComments: 1 -SpacesInAngles: false -SpacesInContainerLiterals: false -SpacesInCStyleCastParentheses: false -SpacesInParentheses: false -SpacesInSquareBrackets: false -Standard: Cpp03 -TabWidth: 8 -UseTab: Never -... +# Format Style Options - Created with Clang Power Tools +--- +AccessModifierOffset: -4 +AlignAfterOpenBracket: Align +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: false +AlignEscapedNewlines: Left +AlignOperands: true +AlignTrailingComments: false +AllowAllParametersOfDeclarationOnNextLine: false +AllowShortBlocksOnASingleLine: false +AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: None +AllowShortIfStatementsOnASingleLine: false +AllowShortLoopsOnASingleLine: false +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: false +AlwaysBreakTemplateDeclarations: false +BinPackArguments: true +BinPackParameters: true +BraceWrapping: + AfterCaseLabel: false + AfterClass: false + AfterControlStatement: false + AfterEnum: false + AfterFunction: true + AfterNamespace: true + AfterObjCDeclaration: false + AfterStruct: false + AfterUnion: false + AfterExternBlock: false + BeforeCatch: false + BeforeElse: false + IndentBraces: false + SplitEmptyFunction: true + SplitEmptyRecord: true + SplitEmptyNamespace: true + BeforeLambdaBody: false + BeforeWhile: false +BreakBeforeBinaryOperators: None +BreakBeforeBraces: Custom +BreakBeforeInheritanceComma: false +BreakBeforeTernaryOperators: false +BreakConstructorInitializers: BeforeComma +BreakAfterJavaFieldAnnotations: false +BreakStringLiterals: false +ColumnLimit: 100 +CommentPragmas: '^ IWYU pragma:' +CompactNamespaces: false +ConstructorInitializerAllOnOneLineOrOnePerLine: false +ConstructorInitializerIndentWidth : 8 +ContinuationIndentWidth: 8 +Cpp11BracedListStyle: false +DerivePointerAlignment: false +ExperimentalAutoDetectBinPacking: false +FixNamespaceComments: false +ForEachMacros: + - '__ata_qc_for_each' + - '__bio_for_each_bvec' + - '__bio_for_each_segment' + - '__evlist__for_each_entry' + - '__evlist__for_each_entry_continue' + - '__evlist__for_each_entry_from' + - '__evlist__for_each_entry_reverse' + - '__evlist__for_each_entry_safe' + - '__for_each_mem_range' + - '__for_each_mem_range_rev' + - '__for_each_thread' + - '__hlist_for_each_rcu' + - '__map__for_each_symbol_by_name' + - '__pci_bus_for_each_res0' + - '__pci_bus_for_each_res1' + - '__pci_dev_for_each_res0' + - '__pci_dev_for_each_res1' + - '__perf_evlist__for_each_entry' + - '__perf_evlist__for_each_entry_reverse' + - '__perf_evlist__for_each_entry_safe' + - '__rq_for_each_bio' + - '__shost_for_each_device' + - '__sym_for_each' + - 'apei_estatus_for_each_section' + - 'ata_for_each_dev' + - 'ata_for_each_link' + - 'ata_qc_for_each' + - 'ata_qc_for_each_raw' + - 'ata_qc_for_each_with_internal' + - 'ax25_for_each' + - 'ax25_uid_for_each' + - 'bio_for_each_bvec' + - 'bio_for_each_bvec_all' + - 'bio_for_each_folio_all' + - 'bio_for_each_integrity_vec' + - 'bio_for_each_segment' + - 'bio_for_each_segment_all' + - 'bio_list_for_each' + - 'bip_for_each_vec' + - 'bond_for_each_slave' + - 'bond_for_each_slave_rcu' + - 'bpf_for_each' + - 'bpf_for_each_reg_in_vstate' + - 'bpf_for_each_reg_in_vstate_mask' + - 'bpf_for_each_spilled_reg' + - 'bpf_object__for_each_map' + - 'bpf_object__for_each_program' + - 'btree_for_each_safe128' + - 'btree_for_each_safe32' + - 'btree_for_each_safe64' + - 'btree_for_each_safel' + - 'card_for_each_dev' + - 'cgroup_taskset_for_each' + - 'cgroup_taskset_for_each_leader' + - 'cpu_aggr_map__for_each_idx' + - 'cpufreq_for_each_efficient_entry_idx' + - 'cpufreq_for_each_entry' + - 'cpufreq_for_each_entry_idx' + - 'cpufreq_for_each_valid_entry' + - 'cpufreq_for_each_valid_entry_idx' + - 'css_for_each_child' + - 'css_for_each_descendant_post' + - 'css_for_each_descendant_pre' + - 'damon_for_each_region' + - 'damon_for_each_region_from' + - 'damon_for_each_region_safe' + - 'damon_for_each_scheme' + - 'damon_for_each_scheme_safe' + - 'damon_for_each_target' + - 'damon_for_each_target_safe' + - 'damos_for_each_filter' + - 'damos_for_each_filter_safe' + - 'damos_for_each_quota_goal' + - 'damos_for_each_quota_goal_safe' + - 'data__for_each_file' + - 'data__for_each_file_new' + - 'data__for_each_file_start' + - 'device_for_each_child_node' + - 'device_for_each_child_node_scoped' + - 'dma_fence_array_for_each' + - 'dma_fence_chain_for_each' + - 'dma_fence_unwrap_for_each' + - 'dma_resv_for_each_fence' + - 'dma_resv_for_each_fence_unlocked' + - 'do_for_each_ftrace_op' + - 'drm_atomic_crtc_for_each_plane' + - 'drm_atomic_crtc_state_for_each_plane' + - 'drm_atomic_crtc_state_for_each_plane_state' + - 'drm_atomic_for_each_plane_damage' + - 'drm_client_for_each_connector_iter' + - 'drm_client_for_each_modeset' + - 'drm_connector_for_each_possible_encoder' + - 'drm_exec_for_each_locked_object' + - 'drm_exec_for_each_locked_object_reverse' + - 'drm_for_each_bridge_in_chain' + - 'drm_for_each_connector_iter' + - 'drm_for_each_crtc' + - 'drm_for_each_crtc_reverse' + - 'drm_for_each_encoder' + - 'drm_for_each_encoder_mask' + - 'drm_for_each_fb' + - 'drm_for_each_legacy_plane' + - 'drm_for_each_plane' + - 'drm_for_each_plane_mask' + - 'drm_for_each_privobj' + - 'drm_gem_for_each_gpuvm_bo' + - 'drm_gem_for_each_gpuvm_bo_safe' + - 'drm_gpuva_for_each_op' + - 'drm_gpuva_for_each_op_from_reverse' + - 'drm_gpuva_for_each_op_reverse' + - 'drm_gpuva_for_each_op_safe' + - 'drm_gpuvm_bo_for_each_va' + - 'drm_gpuvm_bo_for_each_va_safe' + - 'drm_gpuvm_for_each_va' + - 'drm_gpuvm_for_each_va_range' + - 'drm_gpuvm_for_each_va_range_safe' + - 'drm_gpuvm_for_each_va_safe' + - 'drm_mm_for_each_hole' + - 'drm_mm_for_each_node' + - 'drm_mm_for_each_node_in_range' + - 'drm_mm_for_each_node_safe' + - 'dsa_switch_for_each_available_port' + - 'dsa_switch_for_each_cpu_port' + - 'dsa_switch_for_each_cpu_port_continue_reverse' + - 'dsa_switch_for_each_port' + - 'dsa_switch_for_each_port_continue_reverse' + - 'dsa_switch_for_each_port_safe' + - 'dsa_switch_for_each_user_port' + - 'dsa_switch_for_each_user_port_continue_reverse' + - 'dsa_tree_for_each_cpu_port' + - 'dsa_tree_for_each_user_port' + - 'dsa_tree_for_each_user_port_continue_reverse' + - 'dso__for_each_symbol' + - 'elf_hash_for_each_possible' + - 'elf_symtab__for_each_symbol' + - 'evlist__for_each_cpu' + - 'evlist__for_each_entry' + - 'evlist__for_each_entry_continue' + - 'evlist__for_each_entry_from' + - 'evlist__for_each_entry_reverse' + - 'evlist__for_each_entry_safe' + - 'flow_action_for_each' + - 'for_each_acpi_consumer_dev' + - 'for_each_acpi_dev_match' + - 'for_each_active_dev_scope' + - 'for_each_active_drhd_unit' + - 'for_each_active_iommu' + - 'for_each_active_route' + - 'for_each_aggr_pgid' + - 'for_each_and_bit' + - 'for_each_andnot_bit' + - 'for_each_available_child_of_node' + - 'for_each_available_child_of_node_scoped' + - 'for_each_bench' + - 'for_each_bio' + - 'for_each_board_func_rsrc' + - 'for_each_btf_ext_rec' + - 'for_each_btf_ext_sec' + - 'for_each_bvec' + - 'for_each_card_auxs' + - 'for_each_card_auxs_safe' + - 'for_each_card_components' + - 'for_each_card_dapms' + - 'for_each_card_pre_auxs' + - 'for_each_card_prelinks' + - 'for_each_card_rtds' + - 'for_each_card_rtds_safe' + - 'for_each_card_widgets' + - 'for_each_card_widgets_safe' + - 'for_each_cgroup_storage_type' + - 'for_each_child_of_node' + - 'for_each_child_of_node_scoped' + - 'for_each_clear_bit' + - 'for_each_clear_bit_from' + - 'for_each_clear_bitrange' + - 'for_each_clear_bitrange_from' + - 'for_each_cmd' + - 'for_each_cmsghdr' + - 'for_each_collection' + - 'for_each_comp_order' + - 'for_each_compatible_node' + - 'for_each_component_dais' + - 'for_each_component_dais_safe' + - 'for_each_conduit' + - 'for_each_console' + - 'for_each_console_srcu' + - 'for_each_cpu' + - 'for_each_cpu_and' + - 'for_each_cpu_andnot' + - 'for_each_cpu_from' + - 'for_each_cpu_or' + - 'for_each_cpu_wrap' + - 'for_each_dapm_widgets' + - 'for_each_dedup_cand' + - 'for_each_dev_addr' + - 'for_each_dev_scope' + - 'for_each_dma_cap_mask' + - 'for_each_dpcm_be' + - 'for_each_dpcm_be_rollback' + - 'for_each_dpcm_be_safe' + - 'for_each_dpcm_fe' + - 'for_each_drhd_unit' + - 'for_each_dss_dev' + - 'for_each_efi_memory_desc' + - 'for_each_efi_memory_desc_in_map' + - 'for_each_element' + - 'for_each_element_extid' + - 'for_each_element_id' + - 'for_each_enabled_cpu' + - 'for_each_endpoint_of_node' + - 'for_each_event' + - 'for_each_event_tps' + - 'for_each_evictable_lru' + - 'for_each_fib6_node_rt_rcu' + - 'for_each_fib6_walker_rt' + - 'for_each_file_lock' + - 'for_each_free_mem_pfn_range_in_zone_from' + - 'for_each_free_mem_range' + - 'for_each_free_mem_range_reverse' + - 'for_each_func_rsrc' + - 'for_each_gpiochip_node' + - 'for_each_group_evsel' + - 'for_each_group_evsel_head' + - 'for_each_group_member' + - 'for_each_group_member_head' + - 'for_each_hstate' + - 'for_each_hwgpio' + - 'for_each_if' + - 'for_each_inject_fn' + - 'for_each_insn' + - 'for_each_insn_op_loc' + - 'for_each_insn_prefix' + - 'for_each_intid' + - 'for_each_iommu' + - 'for_each_ip_tunnel_rcu' + - 'for_each_irq_nr' + - 'for_each_lang' + - 'for_each_link_ch_maps' + - 'for_each_link_codecs' + - 'for_each_link_cpus' + - 'for_each_link_platforms' + - 'for_each_lru' + - 'for_each_matching_node' + - 'for_each_matching_node_and_match' + - 'for_each_media_entity_data_link' + - 'for_each_mem_pfn_range' + - 'for_each_mem_range' + - 'for_each_mem_range_rev' + - 'for_each_mem_region' + - 'for_each_member' + - 'for_each_memory' + - 'for_each_migratetype_order' + - 'for_each_missing_reg' + - 'for_each_mle_subelement' + - 'for_each_mod_mem_type' + - 'for_each_net' + - 'for_each_net_continue_reverse' + - 'for_each_net_rcu' + - 'for_each_netdev' + - 'for_each_netdev_continue' + - 'for_each_netdev_continue_rcu' + - 'for_each_netdev_continue_reverse' + - 'for_each_netdev_dump' + - 'for_each_netdev_feature' + - 'for_each_netdev_in_bond_rcu' + - 'for_each_netdev_rcu' + - 'for_each_netdev_reverse' + - 'for_each_netdev_safe' + - 'for_each_new_connector_in_state' + - 'for_each_new_crtc_in_state' + - 'for_each_new_mst_mgr_in_state' + - 'for_each_new_plane_in_state' + - 'for_each_new_plane_in_state_reverse' + - 'for_each_new_private_obj_in_state' + - 'for_each_new_reg' + - 'for_each_nhlt_endpoint' + - 'for_each_nhlt_endpoint_fmtcfg' + - 'for_each_nhlt_fmtcfg' + - 'for_each_node' + - 'for_each_node_by_name' + - 'for_each_node_by_type' + - 'for_each_node_mask' + - 'for_each_node_state' + - 'for_each_node_with_cpus' + - 'for_each_node_with_property' + - 'for_each_nonreserved_multicast_dest_pgid' + - 'for_each_numa_hop_mask' + - 'for_each_of_allnodes' + - 'for_each_of_allnodes_from' + - 'for_each_of_cpu_node' + - 'for_each_of_pci_range' + - 'for_each_old_connector_in_state' + - 'for_each_old_crtc_in_state' + - 'for_each_old_mst_mgr_in_state' + - 'for_each_old_plane_in_state' + - 'for_each_old_private_obj_in_state' + - 'for_each_oldnew_connector_in_state' + - 'for_each_oldnew_crtc_in_state' + - 'for_each_oldnew_mst_mgr_in_state' + - 'for_each_oldnew_plane_in_state' + - 'for_each_oldnew_plane_in_state_reverse' + - 'for_each_oldnew_private_obj_in_state' + - 'for_each_online_cpu' + - 'for_each_online_node' + - 'for_each_online_pgdat' + - 'for_each_or_bit' + - 'for_each_path' + - 'for_each_pci_bridge' + - 'for_each_pci_dev' + - 'for_each_pcm_streams' + - 'for_each_physmem_range' + - 'for_each_populated_zone' + - 'for_each_possible_cpu' + - 'for_each_present_blessed_reg' + - 'for_each_present_cpu' + - 'for_each_prime_number' + - 'for_each_prime_number_from' + - 'for_each_probe_cache_entry' + - 'for_each_process' + - 'for_each_process_thread' + - 'for_each_prop_codec_conf' + - 'for_each_prop_dai_codec' + - 'for_each_prop_dai_cpu' + - 'for_each_prop_dlc_codecs' + - 'for_each_prop_dlc_cpus' + - 'for_each_prop_dlc_platforms' + - 'for_each_property_of_node' + - 'for_each_reg' + - 'for_each_reg_filtered' + - 'for_each_reloc' + - 'for_each_reloc_from' + - 'for_each_requested_gpio' + - 'for_each_requested_gpio_in_range' + - 'for_each_reserved_child_of_node' + - 'for_each_reserved_mem_range' + - 'for_each_reserved_mem_region' + - 'for_each_rtd_ch_maps' + - 'for_each_rtd_codec_dais' + - 'for_each_rtd_components' + - 'for_each_rtd_cpu_dais' + - 'for_each_rtd_dais' + - 'for_each_rtd_dais_reverse' + - 'for_each_sband_iftype_data' + - 'for_each_script' + - 'for_each_sec' + - 'for_each_set_bit' + - 'for_each_set_bit_from' + - 'for_each_set_bit_wrap' + - 'for_each_set_bitrange' + - 'for_each_set_bitrange_from' + - 'for_each_set_clump8' + - 'for_each_sg' + - 'for_each_sg_dma_page' + - 'for_each_sg_page' + - 'for_each_sgtable_dma_page' + - 'for_each_sgtable_dma_sg' + - 'for_each_sgtable_page' + - 'for_each_sgtable_sg' + - 'for_each_sibling_event' + - 'for_each_sta_active_link' + - 'for_each_subelement' + - 'for_each_subelement_extid' + - 'for_each_subelement_id' + - 'for_each_sublist' + - 'for_each_subsystem' + - 'for_each_supported_activate_fn' + - 'for_each_supported_inject_fn' + - 'for_each_sym' + - 'for_each_test' + - 'for_each_thread' + - 'for_each_token' + - 'for_each_unicast_dest_pgid' + - 'for_each_valid_link' + - 'for_each_vif_active_link' + - 'for_each_vma' + - 'for_each_vma_range' + - 'for_each_vsi' + - 'for_each_wakeup_source' + - 'for_each_zone' + - 'for_each_zone_zonelist' + - 'for_each_zone_zonelist_nodemask' + - 'func_for_each_insn' + - 'fwnode_for_each_available_child_node' + - 'fwnode_for_each_child_node' + - 'fwnode_for_each_parent_node' + - 'fwnode_graph_for_each_endpoint' + - 'gadget_for_each_ep' + - 'genradix_for_each' + - 'genradix_for_each_from' + - 'genradix_for_each_reverse' + - 'hash_for_each' + - 'hash_for_each_possible' + - 'hash_for_each_possible_rcu' + - 'hash_for_each_possible_rcu_notrace' + - 'hash_for_each_possible_safe' + - 'hash_for_each_rcu' + - 'hash_for_each_safe' + - 'hashmap__for_each_entry' + - 'hashmap__for_each_entry_safe' + - 'hashmap__for_each_key_entry' + - 'hashmap__for_each_key_entry_safe' + - 'hctx_for_each_ctx' + - 'hists__for_each_format' + - 'hists__for_each_sort_list' + - 'hlist_bl_for_each_entry' + - 'hlist_bl_for_each_entry_rcu' + - 'hlist_bl_for_each_entry_safe' + - 'hlist_for_each' + - 'hlist_for_each_entry' + - 'hlist_for_each_entry_continue' + - 'hlist_for_each_entry_continue_rcu' + - 'hlist_for_each_entry_continue_rcu_bh' + - 'hlist_for_each_entry_from' + - 'hlist_for_each_entry_from_rcu' + - 'hlist_for_each_entry_rcu' + - 'hlist_for_each_entry_rcu_bh' + - 'hlist_for_each_entry_rcu_notrace' + - 'hlist_for_each_entry_safe' + - 'hlist_for_each_entry_srcu' + - 'hlist_for_each_safe' + - 'hlist_nulls_for_each_entry' + - 'hlist_nulls_for_each_entry_from' + - 'hlist_nulls_for_each_entry_rcu' + - 'hlist_nulls_for_each_entry_safe' + - 'i3c_bus_for_each_i2cdev' + - 'i3c_bus_for_each_i3cdev' + - 'idr_for_each_entry' + - 'idr_for_each_entry_continue' + - 'idr_for_each_entry_continue_ul' + - 'idr_for_each_entry_ul' + - 'in_dev_for_each_ifa_rcu' + - 'in_dev_for_each_ifa_rtnl' + - 'inet_bind_bucket_for_each' + - 'interval_tree_for_each_span' + - 'intlist__for_each_entry' + - 'intlist__for_each_entry_safe' + - 'kcore_copy__for_each_phdr' + - 'key_for_each' + - 'key_for_each_safe' + - 'klp_for_each_func' + - 'klp_for_each_func_safe' + - 'klp_for_each_func_static' + - 'klp_for_each_object' + - 'klp_for_each_object_safe' + - 'klp_for_each_object_static' + - 'kunit_suite_for_each_test_case' + - 'kvm_for_each_memslot' + - 'kvm_for_each_memslot_in_gfn_range' + - 'kvm_for_each_vcpu' + - 'libbpf_nla_for_each_attr' + - 'list_for_each' + - 'list_for_each_codec' + - 'list_for_each_codec_safe' + - 'list_for_each_continue' + - 'list_for_each_entry' + - 'list_for_each_entry_continue' + - 'list_for_each_entry_continue_rcu' + - 'list_for_each_entry_continue_reverse' + - 'list_for_each_entry_from' + - 'list_for_each_entry_from_rcu' + - 'list_for_each_entry_from_reverse' + - 'list_for_each_entry_lockless' + - 'list_for_each_entry_rcu' + - 'list_for_each_entry_reverse' + - 'list_for_each_entry_safe' + - 'list_for_each_entry_safe_continue' + - 'list_for_each_entry_safe_from' + - 'list_for_each_entry_safe_reverse' + - 'list_for_each_entry_srcu' + - 'list_for_each_from' + - 'list_for_each_prev' + - 'list_for_each_prev_safe' + - 'list_for_each_rcu' + - 'list_for_each_reverse' + - 'list_for_each_safe' + - 'llist_for_each' + - 'llist_for_each_entry' + - 'llist_for_each_entry_safe' + - 'llist_for_each_safe' + - 'lwq_for_each_safe' + - 'map__for_each_symbol' + - 'map__for_each_symbol_by_name' + - 'mas_for_each' + - 'mci_for_each_dimm' + - 'media_device_for_each_entity' + - 'media_device_for_each_intf' + - 'media_device_for_each_link' + - 'media_device_for_each_pad' + - 'media_entity_for_each_pad' + - 'media_pipeline_for_each_entity' + - 'media_pipeline_for_each_pad' + - 'mlx5_lag_for_each_peer_mdev' + - 'msi_domain_for_each_desc' + - 'msi_for_each_desc' + - 'mt_for_each' + - 'nanddev_io_for_each_page' + - 'netdev_for_each_lower_dev' + - 'netdev_for_each_lower_private' + - 'netdev_for_each_lower_private_rcu' + - 'netdev_for_each_mc_addr' + - 'netdev_for_each_synced_mc_addr' + - 'netdev_for_each_synced_uc_addr' + - 'netdev_for_each_uc_addr' + - 'netdev_for_each_upper_dev_rcu' + - 'netdev_hw_addr_list_for_each' + - 'nft_rule_for_each_expr' + - 'nla_for_each_attr' + - 'nla_for_each_attr_type' + - 'nla_for_each_nested' + - 'nla_for_each_nested_type' + - 'nlmsg_for_each_attr' + - 'nlmsg_for_each_msg' + - 'nr_neigh_for_each' + - 'nr_neigh_for_each_safe' + - 'nr_node_for_each' + - 'nr_node_for_each_safe' + - 'of_for_each_phandle' + - 'of_property_for_each_string' + - 'of_property_for_each_u32' + - 'pci_bus_for_each_resource' + - 'pci_dev_for_each_resource' + - 'pcl_for_each_chunk' + - 'pcl_for_each_segment' + - 'pcm_for_each_format' + - 'perf_config_items__for_each_entry' + - 'perf_config_sections__for_each_entry' + - 'perf_config_set__for_each_entry' + - 'perf_cpu_map__for_each_cpu' + - 'perf_cpu_map__for_each_cpu_skip_any' + - 'perf_cpu_map__for_each_idx' + - 'perf_evlist__for_each_entry' + - 'perf_evlist__for_each_entry_reverse' + - 'perf_evlist__for_each_entry_safe' + - 'perf_evlist__for_each_evsel' + - 'perf_evlist__for_each_mmap' + - 'perf_hpp_list__for_each_format' + - 'perf_hpp_list__for_each_format_safe' + - 'perf_hpp_list__for_each_sort_list' + - 'perf_hpp_list__for_each_sort_list_safe' + - 'perf_tool_event__for_each_event' + - 'plist_for_each' + - 'plist_for_each_continue' + - 'plist_for_each_entry' + - 'plist_for_each_entry_continue' + - 'plist_for_each_entry_safe' + - 'plist_for_each_safe' + - 'pnp_for_each_card' + - 'pnp_for_each_dev' + - 'protocol_for_each_card' + - 'protocol_for_each_dev' + - 'queue_for_each_hw_ctx' + - 'radix_tree_for_each_slot' + - 'radix_tree_for_each_tagged' + - 'rb_for_each' + - 'rbtree_postorder_for_each_entry_safe' + - 'rdma_for_each_block' + - 'rdma_for_each_port' + - 'rdma_umem_for_each_dma_block' + - 'resort_rb__for_each_entry' + - 'resource_list_for_each_entry' + - 'resource_list_for_each_entry_safe' + - 'rhl_for_each_entry_rcu' + - 'rhl_for_each_rcu' + - 'rht_for_each' + - 'rht_for_each_entry' + - 'rht_for_each_entry_from' + - 'rht_for_each_entry_rcu' + - 'rht_for_each_entry_rcu_from' + - 'rht_for_each_entry_safe' + - 'rht_for_each_from' + - 'rht_for_each_rcu' + - 'rht_for_each_rcu_from' + - 'rq_for_each_bvec' + - 'rq_for_each_segment' + - 'rq_list_for_each' + - 'rq_list_for_each_safe' + - 'sample_read_group__for_each' + - 'scsi_for_each_prot_sg' + - 'scsi_for_each_sg' + - 'sctp_for_each_hentry' + - 'sctp_skb_for_each' + - 'sec_for_each_insn' + - 'sec_for_each_insn_continue' + - 'sec_for_each_insn_from' + - 'sec_for_each_sym' + - 'shdma_for_each_chan' + - 'shost_for_each_device' + - 'sk_for_each' + - 'sk_for_each_bound' + - 'sk_for_each_entry_offset_rcu' + - 'sk_for_each_from' + - 'sk_for_each_rcu' + - 'sk_for_each_safe' + - 'sk_nulls_for_each' + - 'sk_nulls_for_each_from' + - 'sk_nulls_for_each_rcu' + - 'snd_array_for_each' + - 'snd_pcm_group_for_each_entry' + - 'snd_soc_dapm_widget_for_each_path' + - 'snd_soc_dapm_widget_for_each_path_safe' + - 'snd_soc_dapm_widget_for_each_sink_path' + - 'snd_soc_dapm_widget_for_each_source_path' + - 'sparsebit_for_each_set_range' + - 'strlist__for_each_entry' + - 'strlist__for_each_entry_safe' + - 'sym_for_each_insn' + - 'sym_for_each_insn_continue_reverse' + - 'symbols__for_each_entry' + - 'tb_property_for_each' + - 'tcf_act_for_each_action' + - 'tcf_exts_for_each_action' + - 'ttm_resource_manager_for_each_res' + - 'udp_portaddr_for_each_entry' + - 'udp_portaddr_for_each_entry_rcu' + - 'usb_hub_for_each_child' + - 'v4l2_device_for_each_subdev' + - 'v4l2_m2m_for_each_dst_buf' + - 'v4l2_m2m_for_each_dst_buf_safe' + - 'v4l2_m2m_for_each_src_buf' + - 'v4l2_m2m_for_each_src_buf_safe' + - 'virtio_device_for_each_vq' + - 'while_for_each_ftrace_op' + - 'xa_for_each' + - 'xa_for_each_marked' + - 'xa_for_each_range' + - 'xa_for_each_start' + - 'xas_for_each' + - 'xas_for_each_conflict' + - 'xas_for_each_marked' + - 'xbc_array_for_each_value' + - 'xbc_for_each_key_value' + - 'xbc_node_for_each_array_value' + - 'xbc_node_for_each_child' + - 'xbc_node_for_each_key_value' + - 'xbc_node_for_each_subkey' + - 'ynl_attr_for_each' + - 'ynl_attr_for_each_nested' + - 'ynl_attr_for_each_payload' + - 'zorro_for_each_dev' +IncludeBlocks: Preserve +IncludeCategories: + - Regex: '.*' + Priority: 1 +IncludeIsMainRegex: (Test)?$ +IndentCaseLabels: false +IndentGotoLabels: false +IndentPPDirectives: None +IndentWidth: 8 +IndentWrappedFunctionNames: false +JavaScriptQuotes: Leave +JavaScriptWrapImports: true +KeepEmptyLinesAtTheStartOfBlocks: false +MacroBlockBegin: '' +MacroBlockEnd: '' +MaxEmptyLinesToKeep: 1 +NamespaceIndentation: None +ObjCBinPackProtocolList: Auto +ObjCBlockIndentWidth: 8 +ObjCSpaceAfterProperty: true +ObjCSpaceBeforeProtocolList: true +PenaltyBreakAssignment: 10 +PenaltyBreakBeforeFirstCallParameter: 30 +PenaltyBreakComment: 10 +PenaltyBreakFirstLessLess: 0 +PenaltyBreakString: 10 +PenaltyExcessCharacter: 100 +PenaltyReturnTypeOnItsOwnLine: 60 +PointerAlignment: Right +ReflowComments: false +SortIncludes: false +SortUsingDeclarations: false +SpaceAfterCStyleCast: false +SpaceAfterTemplateKeyword: true +SpaceBeforeAssignmentOperators: true +SpaceBeforeCtorInitializerColon: true +SpaceBeforeInheritanceColon: true +SpaceBeforeParens: ControlStatementsExceptForEachMacros +SpaceBeforeRangeBasedForLoopColon: true +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 1 +SpacesInAngles: false +SpacesInContainerLiterals: false +SpacesInCStyleCastParentheses: false +SpacesInParentheses: false +SpacesInSquareBrackets: false +Standard: Cpp03 +TabWidth: 8 +UseTab: Never +... diff --git a/StgSharp.Native/CMakeLists.txt b/StgSharp.Native/CMakeLists.txt index 0ac74a2f..87df33d4 100644 --- a/StgSharp.Native/CMakeLists.txt +++ b/StgSharp.Native/CMakeLists.txt @@ -1,36 +1,36 @@ -cmake_minimum_required(VERSION 3.16) -project(StgSharp.Native C) - -# Include helper for external libraries if present -include(${CMAKE_CURRENT_LIST_DIR}/ExternalLibs.cmake OPTIONAL) - -# Add main source directory -# Follow naming convention: prefer sn-src/sn-head (StgSharp native naming). -if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/sn-src) - add_subdirectory(sn-src) -elseif(EXISTS ${CMAKE_CURRENT_LIST_DIR}/src) - add_subdirectory(src) -else() - message(STATUS "No sn-src/ or src/ directory in StgSharp.Native; create one to add sources.") -endif() - -# Register include directories according to naming convention: sn-head preferred -if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/sn-head) - include_directories(${CMAKE_CURRENT_LIST_DIR}/sn-head) -elseif(EXISTS ${CMAKE_CURRENT_LIST_DIR}/include) - include_directories(${CMAKE_CURRENT_LIST_DIR}/include) -endif() - -# Discover external libraries laid out under external/ (each with head/ and lib/) -if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/external) - file(GLOB EXTERNAL_DIRS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/external/*) - foreach(_d ${EXTERNAL_DIRS}) - if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/external/${_d}") - if(COMMAND use_external_lib) - use_external_lib(${_d} "${CMAKE_CURRENT_SOURCE_DIR}/external/${_d}") - else() - message(STATUS "External lib '${_d}' found at external/${_d} (no use_external_lib defined).") - endif() - endif() - endforeach() -endif() +cmake_minimum_required(VERSION 3.16) +project(StgSharp.Native C) + +# Include helper for external libraries if present +include(${CMAKE_CURRENT_LIST_DIR}/ExternalLibs.cmake OPTIONAL) + +# Add main source directory +# Follow naming convention: prefer sn-src/sn-head (StgSharp native naming). +if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/sn-src) + add_subdirectory(sn-src) +elseif(EXISTS ${CMAKE_CURRENT_LIST_DIR}/src) + add_subdirectory(src) +else() + message(STATUS "No sn-src/ or src/ directory in StgSharp.Native; create one to add sources.") +endif() + +# Register include directories according to naming convention: sn-head preferred +if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/sn-head) + include_directories(${CMAKE_CURRENT_LIST_DIR}/sn-head) +elseif(EXISTS ${CMAKE_CURRENT_LIST_DIR}/include) + include_directories(${CMAKE_CURRENT_LIST_DIR}/include) +endif() + +# Discover external libraries laid out under external/ (each with head/ and lib/) +if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/external) + file(GLOB EXTERNAL_DIRS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/external/*) + foreach(_d ${EXTERNAL_DIRS}) + if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/external/${_d}") + if(COMMAND use_external_lib) + use_external_lib(${_d} "${CMAKE_CURRENT_SOURCE_DIR}/external/${_d}") + else() + message(STATUS "External lib '${_d}' found at external/${_d} (no use_external_lib defined).") + endif() + endif() + endforeach() +endif() diff --git a/StgSharp.Native/ExternalLibs.cmake b/StgSharp.Native/ExternalLibs.cmake index 2e7b3c49..cdd27bb3 100644 --- a/StgSharp.Native/ExternalLibs.cmake +++ b/StgSharp.Native/ExternalLibs.cmake @@ -1,30 +1,30 @@ -# Helper for external libs layout: external//{head,lib} -# Provides function `use_external_lib( )` that sets include directories -# and attempts to link static/shared libs found under lib/. - -function(use_external_lib NAME PATH) - # Expect headers in ${PATH}/head and libs in ${PATH}/lib - set(HEAD_DIR "${PATH}/head") - set(LIB_DIR "${PATH}/lib") - - if(EXISTS "${HEAD_DIR}") - message(STATUS "Registering external include: ${HEAD_DIR}") - include_directories(${HEAD_DIR}) - else() - message(WARNING "External lib ${NAME} missing head/ directory at ${HEAD_DIR}") - endif() - - if(EXISTS "${LIB_DIR}") - # try to find static/shared libs inside LIB_DIR - file(GLOB LIB_FILES RELATIVE ${LIB_DIR} ${LIB_DIR}/*) - foreach(_lib ${LIB_FILES}) - if(_lib MATCHES ".*\\.(a|lib|so|dylib)$") - message(STATUS "Found library for ${NAME}: ${LIB_DIR}/${_lib}") - # Consumer targets should link explicitly; provide variable for convenience - set(EXTERNAL_LIB_${NAME} "${LIB_DIR}/${_lib}" PARENT_SCOPE) - endif() - endforeach() - else() - message(STATUS "No lib/ directory for external lib ${NAME} at ${LIB_DIR}") - endif() -endfunction() +# Helper for external libs layout: external//{head,lib} +# Provides function `use_external_lib( )` that sets include directories +# and attempts to link static/shared libs found under lib/. + +function(use_external_lib NAME PATH) + # Expect headers in ${PATH}/head and libs in ${PATH}/lib + set(HEAD_DIR "${PATH}/head") + set(LIB_DIR "${PATH}/lib") + + if(EXISTS "${HEAD_DIR}") + message(STATUS "Registering external include: ${HEAD_DIR}") + include_directories(${HEAD_DIR}) + else() + message(WARNING "External lib ${NAME} missing head/ directory at ${HEAD_DIR}") + endif() + + if(EXISTS "${LIB_DIR}") + # try to find static/shared libs inside LIB_DIR + file(GLOB LIB_FILES RELATIVE ${LIB_DIR} ${LIB_DIR}/*) + foreach(_lib ${LIB_FILES}) + if(_lib MATCHES ".*\\.(a|lib|so|dylib)$") + message(STATUS "Found library for ${NAME}: ${LIB_DIR}/${_lib}") + # Consumer targets should link explicitly; provide variable for convenience + set(EXTERNAL_LIB_${NAME} "${LIB_DIR}/${_lib}" PARENT_SCOPE) + endif() + endforeach() + else() + message(STATUS "No lib/ directory for external lib ${NAME} at ${LIB_DIR}") + endif() +endfunction() diff --git a/StgSharp.Native/README.md b/StgSharp.Native/README.md index ea9e4c5e..d9b4555d 100644 --- a/StgSharp.Native/README.md +++ b/StgSharp.Native/README.md @@ -1,11 +1,11 @@ -StgSharp.Native layout - -Conventions: -- src/ : project C sources and CMakeLists.txt calling add_library/add_executable -- include/ : public headers (if used) -- external/ : third-party libraries, each library lives in its own folder - - / - - head/ : header files for the library - - lib/ : static or shared lib files (or CMake build for that lib) - -The root `CMakeLists.txt` in this folder includes `ExternalLibs.cmake` if present. +StgSharp.Native layout + +Conventions: +- src/ : project C sources and CMakeLists.txt calling add_library/add_executable +- include/ : public headers (if used) +- external/ : third-party libraries, each library lives in its own folder + - / + - head/ : header files for the library + - lib/ : static or shared lib files (or CMake build for that lib) + +The root `CMakeLists.txt` in this folder includes `ExternalLibs.cmake` if present. diff --git a/StgSharp.Native/SIMDID.x86.md b/StgSharp.Native/SIMDID.x86.md index 6239c905..2df8db89 100644 --- a/StgSharp.Native/SIMDID.x86.md +++ b/StgSharp.Native/SIMDID.x86.md @@ -1,282 +1,282 @@ -# SIMDID (x86-64) 64-bit Specification (Completed per fixed layout) - -This document completes the **64-bit SIMDID** bit layout as specified, with emphasis on the design of the **AVX512 Feature section ([31..16])**, so it can cover the messy AVX-512 subsets while keeping branching logic compact. It also allocates an **AVX Feature byte** adjacent to the AVX512/AMX regions for AVX-family capabilities, and an **AVX10 Feature byte** for the converged AVX10 ISA. - -> Convention: bit0 is the least significant bit (LSB). Only x86-64 interpreter semantics are defined here; the header's Root ISA allows extension to other architectures. - ---- - -## 1) ASCII Bit Layout (Final) - -``` -SIMDID (64 bits) [63 ........................................................ 0] -+----------+-----------+-----------+----------------+----------------+----------------+--------+-------+ -| [63..56] | [55..48] | [47..40] | [39..32] | [31..16] | [15..8] | [7..4] | [3..0]| -| uArchHi | AVX10Feat | AVX Feat | AMX Future | AVX512 Feature | MainLevel | Manuf | Root | -+----------+-----------+-----------+----------------+----------------+----------------+--------+-------+ -``` - -- **[3..0] Root ISA**: Root ISA type (selects interpreter) -- **[7..4] Manufacture**: Vendor info (Intel/AMD for x86) -- **[15..8] MainLevel**: Main ISA level (ascending, shared bit semantics) -- **[31..16] AVX512 Feature**: AVX-512 features/subsets/implementation form (key part) -- **[39..32] AMX Future**: AMX features (few bits for now) -- **[47..40] AVX Feature**: AVX-family capabilities (base requires AVX+AVX2; key extensions include FMA/F16C) -- **[55..48] AVX10 Feature**: AVX10 converged ISA version and vector width support -- **[63..56] uArchHi**: Optional microarchitecture/policy hints (default 0, no functional impact). - ---- - -## 2) Root ISA ([3..0]) - -Suggested encoding (minimal usable set, expandable if needed): - -| Value | Root ISA | -|---:|----------| -| 0 | Unknown | -| 1 | x86-64 | -| 2 | AArch64 | -| 3 | PPC64LE | -| 4 | RISC-V | -| 5 | LoongArch | -| 6..15 | Reserved | - -> Note: Apple Silicon is architecturally AArch64 and uses `Root ISA = 2`. Apple vs Qualcomm vs other AArch64 vendors are distinguished via the **Manufacture** nibble under the AArch64 interpreter, not via a separate Root ISA value. - ---- - -## 3) Manufacture ([7..4]) - -For **x86-64**: - -| Value | Manufacture | -|---:|-------------| -| 0 | Unknown/Other | -| 1 | Intel | -| 2 | AMD | -| 3 | VIA/Zhaoxin | -| 4 | Hygon (海光) | -| 5..15 | Reserved | - -For **AArch64**: - -| Value | Manufacture | -|---:|-------------| -| 0 | Unknown/Other | -| 1 | Apple | -| 2 | Qualcomm | -| 3 | MediaTek | -| 4 | Ampere | -| 5..15 | Reserved | - -For other Root ISAs, this nibble is defined by their interpreters. - ---- - -## 4) MainLevel ([15..8], ascending) - -"Shared bits and ascending" means higher values indicate higher capability (or later scheduling order). Suggested values: - -| Value | MainLevel | -|---:|-----------| -| 0 | NONE | -| 1 | SSE (full SSE family: SSE1..SSE4.2) | -| 2 | AVX2 | -| 3 | AVX2_FMA | -| 4 | AVX2_FMA_F16C (from this level onward, 16-bit types are supported) | -| 5 | AVX512 (check [31..16]) | -| 6 | AMX | -| 7 | AVX10 (check [55..48]) | -| 8..255 | Reserved | - -> Scheduling suggestion: `MainLevel` is the primary switch; only when `MainLevel >= AVX512` should `AVX512 Feature` be parsed; only when `MainLevel >= AMX` should `AMX Future` be parsed; only when `MainLevel >= AVX10` should `AVX10 Feature` be parsed. AVX Feature sits beside AMX/AVX512 and is meaningful when AVX or higher is present. - ---- - -## 5) AVX512 Feature ([31..16]) Design Goals (Compact) - -1) **Base AVX512 one-shot check**: Use 1 bit for the bundle `F + CD + VL + DQ + BW`, avoiding multiple subset checks. -2) **Glue vs native**: Use an implementation field to distinguish `AVX512-DUAL` (glue/downclock risk) from `AVX512-NATIVE` (full 512-bit ALU). -3) **Niche/AI extensions separated**: VNNI, BF16/FP16, and similar extensions each get a dedicated bit so the base path stays simple. - ---- - -## 6) AVX512 Feature Bit Layout ([31..16] = 16 bits, compact) - -AVX512 Feature (bits 31..16) - -| **bit** | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | -|-----------|-----|-----|------|------|------|-------|------|------|-------|-------|----|------|----|----|----|----| -| **Usage** | R | R | FP16 | BF16 | VNNI | VBMI2 | VBMI | R/AI | Impl1 | Impl0 | R | BASE | R | R | R | R | - -Notes: - -- **BASE (bit 20)**: Base AVX512 bundle, indicating `F + CD + VL + DQ + BW` are all present. If set to 1, the detecting side must guarantee these subsets are all available. -- **AVX512_IMPL ([23..22], 2-bit)**: 512-bit execution width policy — not port count, not frequency behaviour. - -| Value | Meaning | -|---:|------| -| 0 | Unknown — cannot determine; use conservative 256-bit kernels | -| 1 | DUAL-PUMP — single 256-bit ALU executes 512-bit ops as two consecutive 256-bit micro-ops; ZMM throughput halved (example: AMD Zen4, Family 0x19) | -| 2 | NATIVE — genuine 512-bit execution unit(s); full ZMM throughput (Intel all models including SKX; AMD Zen5 Family 0x1A and later) | -| 3 | Reserved | - -> **Note**: Intel SKX/CLX/CPX have two 512-bit FMA ports (port-0 + port-5) and are **NATIVE** — genuine 512-bit throughput. Intel downclocking on heavy ZMM workloads is a separate concern not encoded here. DUAL-PUMP applies only where a single 256-bit unit fires twice per 512-bit op (AMD Zen4-style). - -- **VBMI/VBMI2/VNNI/BF16/FP16 ([29..25])**: Commonly needed niche or AI-related small-type extensions; set as needed. -- **R/AI (bit 24)**: Reserved for future AI or other non-crypto extensions. -- **[31..30], [21], [19..16]**: Reserved for future allocation. - ---- - -## 7) AVX Feature Byte ([47..40], 8 bits) - -Purpose: compact AVX-family capability encoding adjacent to AVX512/AMX. Base requirement: AVX **and** AVX2 present. Key extensions: FMA and F16C. Additional bits reserved for other extensions. - -AVX Feature (bits 47..40) - -| bit | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | -|-----|----|----|----|----|----|----|----|----| -| use | R | R | R | DUAL | F16C | FMA | AVX2 | AVX | - -Rules: -- **AVX (bit 40)**: AVX present. -- **AVX2 (bit 41)**: AVX2 present. For the AVX feature byte to be considered valid, both AVX and AVX2 must be set. -- **FMA (bit 42)**: FMA present. -- **F16C (bit 43)**: F16C present. -- **DUAL (bit 44)**: YMM execution is **glued/split-lane** (two fused 128-bit units rather than a native 256-bit path). Detection: AMD Zen1/Zen+ (Family 0x17, model < 0x30), Hygon (all, Zen1-based), VIA/Zhaoxin (all). When set, code using YMM operations may incur split-register overhead; prefer 128-bit SSE paths on these targets. -- **[45..47]**: Reserved for other AVX-family extensions (e.g., IFMA, XOP) as needed. - ---- - -## 8) AVX10 Feature Byte ([55..48], 8 bits) - -Purpose: encode the converged AVX10 ISA version and supported vector widths. AVX10 unifies and replaces the fragmented AVX-512 subset model; a single version number implies a defined set of instructions (e.g., AVX10.1 implies F+CD+VL+DQ+BW+VBMI+VBMI2+VNNI+BF16+FP16 converged). The width bits indicate what maximum vector width the hardware actually implements. - -**CPUID detection**: `CPUID leaf 0x24, subleaf 0`. -- EBX[7:0] = AVX10 converged ISA version number (≥ 1 if supported). -- EBX[16] = 128-bit vector support (always 1 when AVX10 is present). -- EBX[17] = 256-bit vector support. -- EBX[18] = 512-bit vector support. - -AVX10 Feature (bits 55..48) - -| bit | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | -|-----|----|----|----| ---- | ---- |----|----|------| -| use | R | R | R | 512W | 256W | V2 | V1 | AVX10 | - -Rules: -- **AVX10 (bit 48)**: CPU declares AVX10 converged ISA support (leaf 0x24 reports a valid version ≥ 1). -- **V1 (bit 49)**: AVX10 version ≥ 1 (AVX10.1). Set when `EBX[7:0] >= 1`. -- **V2 (bit 50)**: AVX10 version ≥ 2 (AVX10.2). Set when `EBX[7:0] >= 2`. -- **256W (bit 51)**: Hardware supports 256-bit vector width for AVX10 instructions (`EBX[17]` == 1). -- **512W (bit 52)**: Hardware supports 512-bit vector width for AVX10 instructions (`EBX[18]` == 1). -- **[53..55]**: Reserved for future AVX10 versions (V3, V4...) or additional width/feature bits. - -> Note: When `AVX10 == 1`, the 128-bit width is always implied and does not need a dedicated bit. `V1` and `V2` are cumulative — if `V2` is set, `V1` must also be set. - -**Relationship with AVX512 Feature**: -- AVX10 is a superset specification. When `MainLevel == AVX10`, the `AVX512 Feature` field may still be populated for backward-compatible code paths (e.g., checking `AVX512_IMPL` to select DUAL vs NATIVE 512-bit policy). -- AVX10/256 hardware does **not** support 512-bit operations; code should check `512W` before using zmm registers. - ---- - -## 9) "AVX512BASE" Determination (Single Check) - -- **Rule**: `BASE=1` implies `F+CD+VL+DQ+BW` are all present; no need for per-subset checks. Detection must keep this consistent; if not all subsets are present, set to 0. -- **Runtime branching**: - - If `MainLevel < AVX512`: fall back to AVX2/FMA path. - - Otherwise: - - Check `BASE`; if 0, fall back to AVX2/FMA (or treat as detection failure). - - Check `AVX512_IMPL`: `DUAL` uses 256-bit/downclock-safe path, `NATIVE` uses 512-bit path. - - When small-type/AI capabilities are required, consult `VNNI/BF16/FP16/VBMI/VBMI2` bits. - - If `MainLevel == AVX10`: prefer AVX10 Feature for capability checks; `AVX512 Feature` remains valid for legacy branching. - ---- - -## 10) AMX Future ([39..32], 8 bits) - -A single byte is reserved; define three common bits for now, leave the rest reserved: - -| bit (relative to [39..32]) | Name | Note | -|---:|------|------| -| 0 | AMX_TILE | Tile base | -| 1 | AMX_INT8 | INT8 tile | -| 2 | AMX_BF16 | BF16 tile | -| 3..7 | Reserved | | - -When `MainLevel < AMX`, this byte can be all zeros. - ---- - -## 11) uArchHi ([63..56], 8 bits) - -Purpose: **bitmask** byte encoding core topology classification and SIMD execution-width policy for the detected core. All bits default to 0. - -uArchHi bitmask layout: - -| bit (relative to [63..56]) | Name | Note | -|---:|------|------| -| 0 | HYBRID_E | E-core (efficiency/small core) in a hybrid-topology processor (e.g., Intel Alder Lake+ E-core) | -| 1 | HYBRID_P | P-core (performance/big core) in a hybrid-topology processor (e.g., Intel Alder Lake+ P-core) | -| 2 | SIMD_DUAL | SIMD execution is glued/dual (not full-width). Summary flag: set when `AVX_DUAL=1` **or** `AVX512_IMPL=DUAL`. | -| 3..7 | Reserved | | - -Core topology encoding (bits [1..0], numerically comparable — higher = stronger): - -| bits [1..0] | Value | Meaning | -|:-----------:|:-----:|----------| -| 00 | 0 | Unknown — undetected hybrid type or pre-CPUID.1A hardware | -| 01 | 1 | **Hybrid-E** — efficiency/small core (a3) | -| 10 | 2 | **Hybrid-P** — performance/big core (a2) | -| 11 | 3 | **Unified** — confirmed non-hybrid; full-topology core (a1) | - -The 2-bit field is directly comparable as an unsigned integer: `unified(3) > P-core(2) > E-core(1) > unknown(0)`. - -Detection: -- **Non-hybrid (unified)**: if `CPUID.7.0 EDX[15]` (HYBRID) is **not** set, the CPU is confirmed non-hybrid → set both `HYBRID_P` and `HYBRID_E` (topology = 11). -- **Hybrid P-core**: HYBRID flag set and `CPUID.0x1A.0 EAX[31:24] == 0x40` → set only `HYBRID_P` (topology = 10). -- **Hybrid E-core**: HYBRID flag set and `CPUID.0x1A.0 EAX[31:24] == 0x20` → set only `HYBRID_E` (topology = 01). -- **Unknown hybrid** (flag set but core type unrecognised): leave topology at 00. -- **SIMD_DUAL**: set when any of the following: `AVX Feature DUAL=1` (glued YMM), or `AVX512_IMPL=DUAL`. - -`sn_get_unite_simd` computes topology bits [1..0] with bitwise **AND** (conservative intersection — weaker topology wins) and SIMD_DUAL with bitwise **OR** (dual if either core is dual). `sn_compare_simd` compares topology value numerically as step 6 and SIMD_DUAL as the final (step 7) tie-break. - ---- - -## 12) Minimal Detection-Side Fill Rules (x86-64) - -1) Set `RootISA = x86-64`, `Manufacture = Intel / AMD / Hygon / VIA`. -2) Compute `MainLevel` (per ascending rule). -3) If `MainLevel >= AVX512`: - - If `F+CD+VL+DQ+BW` are all present, set `BASE = 1`; otherwise `BASE = 0`. - - Set `AVX512_IMPL`: - - **Intel (all)**: NATIVE — all Intel AVX-512 CPUs have genuine 512-bit execution units - - **AMD Zen4 (Family 0x19)**: DUAL — single 256-bit ALU, dual-pump - - **AMD Zen5+ (Family 0x1A+)**: NATIVE — native full-width 512-bit units - - **AMD other/future**: UNKNOWN (conservative) - - **Hygon**: UNKNOWN (AVX-512 characteristics unclear) - - **VIA/other**: UNKNOWN - - When VNNI/BF16/FP16/VBMI/VBMI2 are detected, set the corresponding bits. -4) If `MainLevel >= AMX`: fill the AMX byte. -5) When AVX/AVX2 are present, populate the AVX Feature byte: set `AVX` and `AVX2`; set `FMA` and `F16C` when detected; set `DUAL` when the YMM execution path is split/glued (AMD Zen1/Zen+ Family 0x17 model < 0x30, Hygon all models, VIA/Zhaoxin all models). -6) **AVX10 detection** (requires `CPUID leaf 7 subleaf 1, EDX[19] == 1` as the AVX10 convergence bit): - - If AVX10 is indicated, query `CPUID leaf 0x24, subleaf 0`: - - Read `EBX[7:0]` for version number; set `AVX10`, `V1`, and optionally `V2`. - - Read `EBX[17]` for 256-bit support → set `256W`. - - Read `EBX[18]` for 512-bit support → set `512W`. - - Promote `MainLevel` to `AVX10` (value 7). - - The `AVX512 Feature` field should still be filled for backward compatibility. -7) Populate uArchHi: - - If `CPUID.7.0 EDX[15]` (HYBRID) **not** set: set `HYBRID_P | HYBRID_E` (unified = 11). - - If HYBRID is set, read `CPUID.0x1A.0 EAX[31:24]`: - - `0x40` (P-core) → set only `HYBRID_P` (topology = 10). - - `0x20` (E-core) → set only `HYBRID_E` (topology = 01). - - Otherwise leave topology at 00 (unknown hybrid). - - If `AVX Feature DUAL=1` or `AVX512_IMPL=DUAL`, set `SIMD_DUAL`. - ---- - -## 13) Choice for High Bits Reservation - +# SIMDID (x86-64) 64-bit Specification (Completed per fixed layout) + +This document completes the **64-bit SIMDID** bit layout as specified, with emphasis on the design of the **AVX512 Feature section ([31..16])**, so it can cover the messy AVX-512 subsets while keeping branching logic compact. It also allocates an **AVX Feature byte** adjacent to the AVX512/AMX regions for AVX-family capabilities, and an **AVX10 Feature byte** for the converged AVX10 ISA. + +> Convention: bit0 is the least significant bit (LSB). Only x86-64 interpreter semantics are defined here; the header's Root ISA allows extension to other architectures. + +--- + +## 1) ASCII Bit Layout (Final) + +``` +SIMDID (64 bits) [63 ........................................................ 0] ++----------+-----------+-----------+----------------+----------------+----------------+--------+-------+ +| [63..56] | [55..48] | [47..40] | [39..32] | [31..16] | [15..8] | [7..4] | [3..0]| +| uArchHi | AVX10Feat | AVX Feat | AMX Future | AVX512 Feature | MainLevel | Manuf | Root | ++----------+-----------+-----------+----------------+----------------+----------------+--------+-------+ +``` + +- **[3..0] Root ISA**: Root ISA type (selects interpreter) +- **[7..4] Manufacture**: Vendor info (Intel/AMD for x86) +- **[15..8] MainLevel**: Main ISA level (ascending, shared bit semantics) +- **[31..16] AVX512 Feature**: AVX-512 features/subsets/implementation form (key part) +- **[39..32] AMX Future**: AMX features (few bits for now) +- **[47..40] AVX Feature**: AVX-family capabilities (base requires AVX+AVX2; key extensions include FMA/F16C) +- **[55..48] AVX10 Feature**: AVX10 converged ISA version and vector width support +- **[63..56] uArchHi**: Optional microarchitecture/policy hints (default 0, no functional impact). + +--- + +## 2) Root ISA ([3..0]) + +Suggested encoding (minimal usable set, expandable if needed): + +| Value | Root ISA | +|---:|----------| +| 0 | Unknown | +| 1 | x86-64 | +| 2 | AArch64 | +| 3 | PPC64LE | +| 4 | RISC-V | +| 5 | LoongArch | +| 6..15 | Reserved | + +> Note: Apple Silicon is architecturally AArch64 and uses `Root ISA = 2`. Apple vs Qualcomm vs other AArch64 vendors are distinguished via the **Manufacture** nibble under the AArch64 interpreter, not via a separate Root ISA value. + +--- + +## 3) Manufacture ([7..4]) + +For **x86-64**: + +| Value | Manufacture | +|---:|-------------| +| 0 | Unknown/Other | +| 1 | Intel | +| 2 | AMD | +| 3 | VIA/Zhaoxin | +| 4 | Hygon (海光) | +| 5..15 | Reserved | + +For **AArch64**: + +| Value | Manufacture | +|---:|-------------| +| 0 | Unknown/Other | +| 1 | Apple | +| 2 | Qualcomm | +| 3 | MediaTek | +| 4 | Ampere | +| 5..15 | Reserved | + +For other Root ISAs, this nibble is defined by their interpreters. + +--- + +## 4) MainLevel ([15..8], ascending) + +"Shared bits and ascending" means higher values indicate higher capability (or later scheduling order). Suggested values: + +| Value | MainLevel | +|---:|-----------| +| 0 | NONE | +| 1 | SSE (full SSE family: SSE1..SSE4.2) | +| 2 | AVX2 | +| 3 | AVX2_FMA | +| 4 | AVX2_FMA_F16C (from this level onward, 16-bit types are supported) | +| 5 | AVX512 (check [31..16]) | +| 6 | AMX | +| 7 | AVX10 (check [55..48]) | +| 8..255 | Reserved | + +> Scheduling suggestion: `MainLevel` is the primary switch; only when `MainLevel >= AVX512` should `AVX512 Feature` be parsed; only when `MainLevel >= AMX` should `AMX Future` be parsed; only when `MainLevel >= AVX10` should `AVX10 Feature` be parsed. AVX Feature sits beside AMX/AVX512 and is meaningful when AVX or higher is present. + +--- + +## 5) AVX512 Feature ([31..16]) Design Goals (Compact) + +1) **Base AVX512 one-shot check**: Use 1 bit for the bundle `F + CD + VL + DQ + BW`, avoiding multiple subset checks. +2) **Glue vs native**: Use an implementation field to distinguish `AVX512-DUAL` (glue/downclock risk) from `AVX512-NATIVE` (full 512-bit ALU). +3) **Niche/AI extensions separated**: VNNI, BF16/FP16, and similar extensions each get a dedicated bit so the base path stays simple. + +--- + +## 6) AVX512 Feature Bit Layout ([31..16] = 16 bits, compact) + +AVX512 Feature (bits 31..16) + +| **bit** | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | +|-----------|-----|-----|------|------|------|-------|------|------|-------|-------|----|------|----|----|----|----| +| **Usage** | R | R | FP16 | BF16 | VNNI | VBMI2 | VBMI | R/AI | Impl1 | Impl0 | R | BASE | R | R | R | R | + +Notes: + +- **BASE (bit 20)**: Base AVX512 bundle, indicating `F + CD + VL + DQ + BW` are all present. If set to 1, the detecting side must guarantee these subsets are all available. +- **AVX512_IMPL ([23..22], 2-bit)**: 512-bit execution width policy — not port count, not frequency behaviour. + +| Value | Meaning | +|---:|------| +| 0 | Unknown — cannot determine; use conservative 256-bit kernels | +| 1 | DUAL-PUMP — single 256-bit ALU executes 512-bit ops as two consecutive 256-bit micro-ops; ZMM throughput halved (example: AMD Zen4, Family 0x19) | +| 2 | NATIVE — genuine 512-bit execution unit(s); full ZMM throughput (Intel all models including SKX; AMD Zen5 Family 0x1A and later) | +| 3 | Reserved | + +> **Note**: Intel SKX/CLX/CPX have two 512-bit FMA ports (port-0 + port-5) and are **NATIVE** — genuine 512-bit throughput. Intel downclocking on heavy ZMM workloads is a separate concern not encoded here. DUAL-PUMP applies only where a single 256-bit unit fires twice per 512-bit op (AMD Zen4-style). + +- **VBMI/VBMI2/VNNI/BF16/FP16 ([29..25])**: Commonly needed niche or AI-related small-type extensions; set as needed. +- **R/AI (bit 24)**: Reserved for future AI or other non-crypto extensions. +- **[31..30], [21], [19..16]**: Reserved for future allocation. + +--- + +## 7) AVX Feature Byte ([47..40], 8 bits) + +Purpose: compact AVX-family capability encoding adjacent to AVX512/AMX. Base requirement: AVX **and** AVX2 present. Key extensions: FMA and F16C. Additional bits reserved for other extensions. + +AVX Feature (bits 47..40) + +| bit | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | +|-----|----|----|----|----|----|----|----|----| +| use | R | R | R | DUAL | F16C | FMA | AVX2 | AVX | + +Rules: +- **AVX (bit 40)**: AVX present. +- **AVX2 (bit 41)**: AVX2 present. For the AVX feature byte to be considered valid, both AVX and AVX2 must be set. +- **FMA (bit 42)**: FMA present. +- **F16C (bit 43)**: F16C present. +- **DUAL (bit 44)**: YMM execution is **glued/split-lane** (two fused 128-bit units rather than a native 256-bit path). Detection: AMD Zen1/Zen+ (Family 0x17, model < 0x30), Hygon (all, Zen1-based), VIA/Zhaoxin (all). When set, code using YMM operations may incur split-register overhead; prefer 128-bit SSE paths on these targets. +- **[45..47]**: Reserved for other AVX-family extensions (e.g., IFMA, XOP) as needed. + +--- + +## 8) AVX10 Feature Byte ([55..48], 8 bits) + +Purpose: encode the converged AVX10 ISA version and supported vector widths. AVX10 unifies and replaces the fragmented AVX-512 subset model; a single version number implies a defined set of instructions (e.g., AVX10.1 implies F+CD+VL+DQ+BW+VBMI+VBMI2+VNNI+BF16+FP16 converged). The width bits indicate what maximum vector width the hardware actually implements. + +**CPUID detection**: `CPUID leaf 0x24, subleaf 0`. +- EBX[7:0] = AVX10 converged ISA version number (≥ 1 if supported). +- EBX[16] = 128-bit vector support (always 1 when AVX10 is present). +- EBX[17] = 256-bit vector support. +- EBX[18] = 512-bit vector support. + +AVX10 Feature (bits 55..48) + +| bit | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | +|-----|----|----|----| ---- | ---- |----|----|------| +| use | R | R | R | 512W | 256W | V2 | V1 | AVX10 | + +Rules: +- **AVX10 (bit 48)**: CPU declares AVX10 converged ISA support (leaf 0x24 reports a valid version ≥ 1). +- **V1 (bit 49)**: AVX10 version ≥ 1 (AVX10.1). Set when `EBX[7:0] >= 1`. +- **V2 (bit 50)**: AVX10 version ≥ 2 (AVX10.2). Set when `EBX[7:0] >= 2`. +- **256W (bit 51)**: Hardware supports 256-bit vector width for AVX10 instructions (`EBX[17]` == 1). +- **512W (bit 52)**: Hardware supports 512-bit vector width for AVX10 instructions (`EBX[18]` == 1). +- **[53..55]**: Reserved for future AVX10 versions (V3, V4...) or additional width/feature bits. + +> Note: When `AVX10 == 1`, the 128-bit width is always implied and does not need a dedicated bit. `V1` and `V2` are cumulative — if `V2` is set, `V1` must also be set. + +**Relationship with AVX512 Feature**: +- AVX10 is a superset specification. When `MainLevel == AVX10`, the `AVX512 Feature` field may still be populated for backward-compatible code paths (e.g., checking `AVX512_IMPL` to select DUAL vs NATIVE 512-bit policy). +- AVX10/256 hardware does **not** support 512-bit operations; code should check `512W` before using zmm registers. + +--- + +## 9) "AVX512BASE" Determination (Single Check) + +- **Rule**: `BASE=1` implies `F+CD+VL+DQ+BW` are all present; no need for per-subset checks. Detection must keep this consistent; if not all subsets are present, set to 0. +- **Runtime branching**: + - If `MainLevel < AVX512`: fall back to AVX2/FMA path. + - Otherwise: + - Check `BASE`; if 0, fall back to AVX2/FMA (or treat as detection failure). + - Check `AVX512_IMPL`: `DUAL` uses 256-bit/downclock-safe path, `NATIVE` uses 512-bit path. + - When small-type/AI capabilities are required, consult `VNNI/BF16/FP16/VBMI/VBMI2` bits. + - If `MainLevel == AVX10`: prefer AVX10 Feature for capability checks; `AVX512 Feature` remains valid for legacy branching. + +--- + +## 10) AMX Future ([39..32], 8 bits) + +A single byte is reserved; define three common bits for now, leave the rest reserved: + +| bit (relative to [39..32]) | Name | Note | +|---:|------|------| +| 0 | AMX_TILE | Tile base | +| 1 | AMX_INT8 | INT8 tile | +| 2 | AMX_BF16 | BF16 tile | +| 3..7 | Reserved | | + +When `MainLevel < AMX`, this byte can be all zeros. + +--- + +## 11) uArchHi ([63..56], 8 bits) + +Purpose: **bitmask** byte encoding core topology classification and SIMD execution-width policy for the detected core. All bits default to 0. + +uArchHi bitmask layout: + +| bit (relative to [63..56]) | Name | Note | +|---:|------|------| +| 0 | HYBRID_E | E-core (efficiency/small core) in a hybrid-topology processor (e.g., Intel Alder Lake+ E-core) | +| 1 | HYBRID_P | P-core (performance/big core) in a hybrid-topology processor (e.g., Intel Alder Lake+ P-core) | +| 2 | SIMD_DUAL | SIMD execution is glued/dual (not full-width). Summary flag: set when `AVX_DUAL=1` **or** `AVX512_IMPL=DUAL`. | +| 3..7 | Reserved | | + +Core topology encoding (bits [1..0], numerically comparable — higher = stronger): + +| bits [1..0] | Value | Meaning | +|:-----------:|:-----:|----------| +| 00 | 0 | Unknown — undetected hybrid type or pre-CPUID.1A hardware | +| 01 | 1 | **Hybrid-E** — efficiency/small core (a3) | +| 10 | 2 | **Hybrid-P** — performance/big core (a2) | +| 11 | 3 | **Unified** — confirmed non-hybrid; full-topology core (a1) | + +The 2-bit field is directly comparable as an unsigned integer: `unified(3) > P-core(2) > E-core(1) > unknown(0)`. + +Detection: +- **Non-hybrid (unified)**: if `CPUID.7.0 EDX[15]` (HYBRID) is **not** set, the CPU is confirmed non-hybrid → set both `HYBRID_P` and `HYBRID_E` (topology = 11). +- **Hybrid P-core**: HYBRID flag set and `CPUID.0x1A.0 EAX[31:24] == 0x40` → set only `HYBRID_P` (topology = 10). +- **Hybrid E-core**: HYBRID flag set and `CPUID.0x1A.0 EAX[31:24] == 0x20` → set only `HYBRID_E` (topology = 01). +- **Unknown hybrid** (flag set but core type unrecognised): leave topology at 00. +- **SIMD_DUAL**: set when any of the following: `AVX Feature DUAL=1` (glued YMM), or `AVX512_IMPL=DUAL`. + +`sn_get_unite_simd` computes topology bits [1..0] with bitwise **AND** (conservative intersection — weaker topology wins) and SIMD_DUAL with bitwise **OR** (dual if either core is dual). `sn_compare_simd` compares topology value numerically as step 6 and SIMD_DUAL as the final (step 7) tie-break. + +--- + +## 12) Minimal Detection-Side Fill Rules (x86-64) + +1) Set `RootISA = x86-64`, `Manufacture = Intel / AMD / Hygon / VIA`. +2) Compute `MainLevel` (per ascending rule). +3) If `MainLevel >= AVX512`: + - If `F+CD+VL+DQ+BW` are all present, set `BASE = 1`; otherwise `BASE = 0`. + - Set `AVX512_IMPL`: + - **Intel (all)**: NATIVE — all Intel AVX-512 CPUs have genuine 512-bit execution units + - **AMD Zen4 (Family 0x19)**: DUAL — single 256-bit ALU, dual-pump + - **AMD Zen5+ (Family 0x1A+)**: NATIVE — native full-width 512-bit units + - **AMD other/future**: UNKNOWN (conservative) + - **Hygon**: UNKNOWN (AVX-512 characteristics unclear) + - **VIA/other**: UNKNOWN + - When VNNI/BF16/FP16/VBMI/VBMI2 are detected, set the corresponding bits. +4) If `MainLevel >= AMX`: fill the AMX byte. +5) When AVX/AVX2 are present, populate the AVX Feature byte: set `AVX` and `AVX2`; set `FMA` and `F16C` when detected; set `DUAL` when the YMM execution path is split/glued (AMD Zen1/Zen+ Family 0x17 model < 0x30, Hygon all models, VIA/Zhaoxin all models). +6) **AVX10 detection** (requires `CPUID leaf 7 subleaf 1, EDX[19] == 1` as the AVX10 convergence bit): + - If AVX10 is indicated, query `CPUID leaf 0x24, subleaf 0`: + - Read `EBX[7:0]` for version number; set `AVX10`, `V1`, and optionally `V2`. + - Read `EBX[17]` for 256-bit support → set `256W`. + - Read `EBX[18]` for 512-bit support → set `512W`. + - Promote `MainLevel` to `AVX10` (value 7). + - The `AVX512 Feature` field should still be filled for backward compatibility. +7) Populate uArchHi: + - If `CPUID.7.0 EDX[15]` (HYBRID) **not** set: set `HYBRID_P | HYBRID_E` (unified = 11). + - If HYBRID is set, read `CPUID.0x1A.0 EAX[31:24]`: + - `0x40` (P-core) → set only `HYBRID_P` (topology = 10). + - `0x20` (E-core) → set only `HYBRID_E` (topology = 01). + - Otherwise leave topology at 00 (unknown hybrid). + - If `AVX Feature DUAL=1` or `AVX512_IMPL=DUAL`, set `SIMD_DUAL`. + +--- + +## 13) Choice for High Bits Reservation + `[31..24]` is reserved for AVX512 extensions/AI. `[47..45]` is reserved for AVX-family extensions (bit 44 is now `DUAL`). `[55..53]` is reserved for future AVX10 versions. uArchHi `[63..56]` bits [3..7] are reserved; bits [0..2] encode hybrid topology and SIMD-dual policy. \ No newline at end of file diff --git a/StgSharp.Native/StgSharp.Native.vcxproj b/StgSharp.Native/StgSharp.Native.vcxproj index 7e899e45..215167c9 100644 --- a/StgSharp.Native/StgSharp.Native.vcxproj +++ b/StgSharp.Native/StgSharp.Native.vcxproj @@ -1,218 +1,218 @@ - - - - - - - - Debug - x64 - - - Debug - ARM64 - - - Release - x64 - - - Release - ARM64 - - - PerformanceDebug - x64 - - - PerformanceDebug - ARM64 - - - - - - - 17.0 - Win32Proj - {20cbff26-6746-402e-992c-7b643e9423eb} - StgSharpC - 10.0 - StgSharp.Native - - - - - - - - DynamicLibrary - true - Unicode - false - v143 - - - - DynamicLibrary - false - true - Unicode - v143 - - - - DynamicLibrary - false - true - Unicode - v143 - - - - - - - - - - - - - - - - - <_ArchTag Condition="'$(Platform)'=='x64'">x64 - <_ArchTag Condition="'$(Platform)'=='ARM64'">arm64 - - $(SolutionDir)build\win-$(_ArchTag)\ - $(SolutionDir)obj\$(ProjectName)\$(Configuration)\$(Platform)\ - - - true - false - - - false - true - false - - - - - - - Level3 - true - true - Default - stdc11 - true - Speed - $(ProjectDir)lib;$(ProjectDir)sn-head;%(AdditionalIncludeDirectories) - - - - Windows - opengl32.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) - - - - - - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - Disabled - true - All - true - - - true - - - true - - - - - - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - true - All - CompileAsC - - - true - true - false - LinkVerbose - UseLinkTimeCodeGeneration - - - - - - AnySuitable - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + Debug + x64 + + + Debug + ARM64 + + + Release + x64 + + + Release + ARM64 + + + PerformanceDebug + x64 + + + PerformanceDebug + ARM64 + + + + + + + 17.0 + Win32Proj + {20cbff26-6746-402e-992c-7b643e9423eb} + StgSharpC + 10.0 + StgSharp.Native + + + + + + + + DynamicLibrary + true + Unicode + false + v143 + + + + DynamicLibrary + false + true + Unicode + v143 + + + + DynamicLibrary + false + true + Unicode + v143 + + + + + + + + + + + + + + + + + <_ArchTag Condition="'$(Platform)'=='x64'">x64 + <_ArchTag Condition="'$(Platform)'=='ARM64'">arm64 + + $(SolutionDir)build\win-$(_ArchTag)\ + $(SolutionDir)obj\$(ProjectName)\$(Configuration)\$(Platform)\ + + + true + false + + + false + true + false + + + + + + + Level3 + true + true + Default + stdc11 + true + Speed + $(ProjectDir)lib;$(ProjectDir)sn-head;%(AdditionalIncludeDirectories) + + + + Windows + opengl32.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) + + + + + + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + Disabled + true + All + true + + + true + + + true + + + + + + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + true + All + CompileAsC + + + true + true + false + LinkVerbose + UseLinkTimeCodeGeneration + + + + + + AnySuitable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StgSharp.Native/StgSharp.Native.vcxproj.filters b/StgSharp.Native/StgSharp.Native.vcxproj.filters index 43e5a309..b2ea2a86 100644 --- a/StgSharp.Native/StgSharp.Native.vcxproj.filters +++ b/StgSharp.Native/StgSharp.Native.vcxproj.filters @@ -1,130 +1,130 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {fbd74b53-5314-4d9d-a788-07bd1b413f74} - - - - - 源文件 - - - 源文件 - - - 源文件 - - - 源文件 - - - 源文件 - - - 源文件 - - - 源文件 - - - 源文件 - - - 源文件 - - - 源文件 - - - 源文件 - - - 源文件 - - - 源文件 - - - 源文件 - - - 源文件 - - - 源文件 - - - - - 头文件 - - - 头文件 - - - 头文件 - - - 头文件 - - - 头文件 - - - 头文件 - - - 头文件 - - - 头文件 - - - 头文件 - - - 头文件 - - - 头文件 - - - 头文件 - - - 头文件 - - - 头文件 - - - - - 资源文件 - - - 资源文件 - - - - - Document - - - Document - - + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {fbd74b53-5314-4d9d-a788-07bd1b413f74} + + + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + + + 头文件 + + + 头文件 + + + 头文件 + + + 头文件 + + + 头文件 + + + 头文件 + + + 头文件 + + + 头文件 + + + 头文件 + + + 头文件 + + + 头文件 + + + 头文件 + + + 头文件 + + + 头文件 + + + + + 资源文件 + + + 资源文件 + + + + + Document + + + Document + + \ No newline at end of file diff --git a/StgSharp.Native/StgSharp.Native.vcxproj.user b/StgSharp.Native/StgSharp.Native.vcxproj.user index 4924f356..6e73c83d 100644 --- a/StgSharp.Native/StgSharp.Native.vcxproj.user +++ b/StgSharp.Native/StgSharp.Native.vcxproj.user @@ -1,7 +1,7 @@ - - - - $(SolutionDir)Output\x64\Debug\net6.0\StgSharpDebug.exe - WindowsLocalDebugger - + + + + $(SolutionDir)Output\x64\Debug\net6.0\StgSharpDebug.exe + WindowsLocalDebugger + \ No newline at end of file diff --git a/StgSharp.Native/naming.md b/StgSharp.Native/naming.md index 1275482d..30bd11e2 100644 --- a/StgSharp.Native/naming.md +++ b/StgSharp.Native/naming.md @@ -1,9 +1,9 @@ -# StgSharp c file naming regulation - -| Name Header | Description | -|:-------:|:--------| -|sn-|Stgsharp Native lib self operation| -|k-|Matrix kernel operation| -|str-|SIMD boosted stream operation| -|load-|Context loading operation| +# StgSharp c file naming regulation + +| Name Header | Description | +|:-------:|:--------| +|sn-|Stgsharp Native lib self operation| +|k-|Matrix kernel operation| +|str-|SIMD boosted stream operation| +|load-|Context loading operation| |##OTHER##-|File from another open source lib with name ##OTHER##| \ No newline at end of file diff --git a/StgSharp.Native/sn-head/StgSharpC.h b/StgSharp.Native/sn-head/StgSharpC.h index 19964360..7730729e 100644 --- a/StgSharp.Native/sn-head/StgSharpC.h +++ b/StgSharp.Native/sn-head/StgSharpC.h @@ -1,73 +1,73 @@ -#ifdef _MSC_VER -#pragma once -#endif - -#ifndef SSC -#define SSC - -#include "ssc_internal.h" - -#define STBIDEF SSCAPI -#include "stb_image.h" - -#include "gl.h" -#include "wgl.h" -#include "glfw3.h" -#include -#include - -#ifndef SSCAPI_DEFINE - -#ifdef _WIN32 -#define SSCAPI __declspec(dllexport) -#elif defined _LINUX_ -#define SSCAPI __attribute__((dllexport)) -#elif defined _APPLE_ -#define SSCAPI __attribute__((visibility("default"))) -#else -#define SSCAPI -#endif - -#endif // ! SSCAPI_DEFINE - -#if __cplusplus -extern "C" { -#endif - -#define byte char -#define cs_char uint16_t -#define ssc_null_assert(ptr) assert(ptr != NULL) - -#define ALIGN(simdVec) _mm_loadu_ps(&simdVec) -#define ALIGN256(simdVec) _mm256_loadu_ps(&simdVec) -#define ALIGN512(simdVec) _mm512_loadu_ps(&simdVec) - -typedef struct Image { - int width; - int height; - int channel; - char *pixelPtr; -} Image; - -typedef char *(*imageLoader)(char const *filename, int *x, int *y, int *channels_in_file, - int desired_channels); - -SSCAPI char infolog[512]; -SSCAPI int SSCDECL glCheckShaderStat(GladGLContext *context, uint64_t shaderHandle, int key, - char **logRef); -SSCAPI void SSCDECL initGL(int majorVersion, int minorVersion); -SSCAPI unsigned int SSCDECL linkShaderProgram(GladGLContext *context, GLuint shadertype); -SSCAPI void SSCDECL loadImageData(char *location, Image *out, imageLoader loader); -SSCAPI GLFWglproc SSCDECL loadGlfuncDefault(char *procName); -SSCAPI void SSCDECL unloadImageData(Image *out); -SSCAPI char *SSCDECL readLog(void); - -#pragma endregion - -SSCAPI int SSCDECL load_intrinsic_function(void *intrinsic_context); - -#ifdef __cplusplus -} -#endif - -#endif +#ifdef _MSC_VER +#pragma once +#endif + +#ifndef SSC +#define SSC + +#include "ssc_internal.h" + +#define STBIDEF SSCAPI +#include "stb_image.h" + +#include "gl.h" +#include "wgl.h" +#include "glfw3.h" +#include +#include + +#ifndef SSCAPI_DEFINE + +#ifdef _WIN32 +#define SSCAPI __declspec(dllexport) +#elif defined _LINUX_ +#define SSCAPI __attribute__((dllexport)) +#elif defined _APPLE_ +#define SSCAPI __attribute__((visibility("default"))) +#else +#define SSCAPI +#endif + +#endif // ! SSCAPI_DEFINE + +#if __cplusplus +extern "C" { +#endif + +#define byte char +#define cs_char uint16_t +#define ssc_null_assert(ptr) assert(ptr != NULL) + +#define ALIGN(simdVec) _mm_loadu_ps(&simdVec) +#define ALIGN256(simdVec) _mm256_loadu_ps(&simdVec) +#define ALIGN512(simdVec) _mm512_loadu_ps(&simdVec) + +typedef struct Image { + int width; + int height; + int channel; + char *pixelPtr; +} Image; + +typedef char *(*imageLoader)(char const *filename, int *x, int *y, int *channels_in_file, + int desired_channels); + +SSCAPI char infolog[512]; +SSCAPI int SSCDECL glCheckShaderStat(GladGLContext *context, uint64_t shaderHandle, int key, + char **logRef); +SSCAPI void SSCDECL initGL(int majorVersion, int minorVersion); +SSCAPI unsigned int SSCDECL linkShaderProgram(GladGLContext *context, GLuint shadertype); +SSCAPI void SSCDECL loadImageData(char *location, Image *out, imageLoader loader); +SSCAPI GLFWglproc SSCDECL loadGlfuncDefault(char *procName); +SSCAPI void SSCDECL unloadImageData(Image *out); +SSCAPI char *SSCDECL readLog(void); + +#pragma endregion + +SSCAPI int SSCDECL load_intrinsic_function(void *intrinsic_context); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/StgSharp.Native/sn-head/StgSharpNative.h b/StgSharp.Native/sn-head/StgSharpNative.h index d936e11c..563a9ef0 100644 --- a/StgSharp.Native/sn-head/StgSharpNative.h +++ b/StgSharp.Native/sn-head/StgSharpNative.h @@ -1,81 +1,81 @@ -#ifdef _MSC_VER -#pragma once -#endif - -#ifndef SNative -#define SNative - -#include "sn_internal.h" -#include "sn_target.h" - -#define STBIDEF SN_API -#include "../lib/stbi/stb_image.h" - -#include "gl.h" -#include "wgl.h" -#define GLFWAPI INTERNAL -#include "glfw\glfw3.h" -#include -#include -#include - -#ifndef SN_APIDEF - -#ifdef _WIN32 -#define SN_API __declspec(dllexport) -#elif defined _LINUX_ -#define SN_API __attribute__((dllexport)) -#elif defined _APPLE_ -#define SN_API __attribute__((visibility("default"))) -#else -#define SN_API -#endif - -#endif // ! SN_APIDEF - -#if __cplusplus -extern "C" { -#endif - -#define byte char -#define cs_char uint16_t -#define sn_null_assert(ptr) assert(ptr != NULL) - -#define ALIGN(simdVec) _mm_loadu_ps(&simdVec) -#define ALIGN256(simdVec) _mm256_loadu_ps(&simdVec) -#define ALIGN512(simdVec) _mm512_loadu_ps(&simdVec) - -typedef struct Image { - int width; - int height; - int channel; - char *pixelPtr; -} Image; - -typedef char *(*imageLoader)(char const *filename, int *x, int *y, int *channels_in_file, - int desired_channels); - -SN_API char infolog[512]; -SN_API int SN_DECL glCheckShaderStat(GladGLContext *context, uint64_t shaderHandle, int key, - char **logRef); -SN_API void SN_DECL initGL(int majorVersion, int minorVersion); -SN_API unsigned int SN_DECL linkShaderProgram(GladGLContext *context, GLuint shadertype); -SN_API void SN_DECL loadImageData(char *location, Image *out, imageLoader loader); -SN_API GLFWglproc SN_DECL loadGlfuncDefault(char *procName); -SN_API void SN_DECL unloadImageData(Image *out); -SN_API char *SN_DECL readLog(void); -SN_API void SN_DECL load_glfw_functions(GLFWFunctionTable *table); -SN_API void SN_DECL load_intrinsic_function(void *intrinsic_context, uint64_t id); -SN_API SIMDID SN_DECL sn_get_simd_level_global(); -/* Per-core variant: always re-executes CPUID, never caches. - * Must be called on the target core (after affinity is set). */ -SN_API SIMDID SN_DECL sn_get_simd_level_local(); -SN_API SIMDID SN_DECL sn_get_unite_simd(SIMDID left, SIMDID right); -SN_API int SN_DECL sn_compare_simd(SIMDID left, SIMDID right); -SN_API void SN_DECL sn_set_thread_affinity(int core_id); - -#ifdef __cplusplus -} -#endif - -#endif +#ifdef _MSC_VER +#pragma once +#endif + +#ifndef SNative +#define SNative + +#include "sn_internal.h" +#include "sn_target.h" + +#define STBIDEF SN_API +#include "../lib/stbi/stb_image.h" + +#include "gl.h" +#include "wgl.h" +#define GLFWAPI INTERNAL +#include "glfw\glfw3.h" +#include +#include +#include + +#ifndef SN_APIDEF + +#ifdef _WIN32 +#define SN_API __declspec(dllexport) +#elif defined _LINUX_ +#define SN_API __attribute__((dllexport)) +#elif defined _APPLE_ +#define SN_API __attribute__((visibility("default"))) +#else +#define SN_API +#endif + +#endif // ! SN_APIDEF + +#if __cplusplus +extern "C" { +#endif + +#define byte char +#define cs_char uint16_t +#define sn_null_assert(ptr) assert(ptr != NULL) + +#define ALIGN(simdVec) _mm_loadu_ps(&simdVec) +#define ALIGN256(simdVec) _mm256_loadu_ps(&simdVec) +#define ALIGN512(simdVec) _mm512_loadu_ps(&simdVec) + +typedef struct Image { + int width; + int height; + int channel; + char *pixelPtr; +} Image; + +typedef char *(*imageLoader)(char const *filename, int *x, int *y, int *channels_in_file, + int desired_channels); + +SN_API char infolog[512]; +SN_API int SN_DECL glCheckShaderStat(GladGLContext *context, uint64_t shaderHandle, int key, + char **logRef); +SN_API void SN_DECL initGL(int majorVersion, int minorVersion); +SN_API unsigned int SN_DECL linkShaderProgram(GladGLContext *context, GLuint shadertype); +SN_API void SN_DECL loadImageData(char *location, Image *out, imageLoader loader); +SN_API GLFWglproc SN_DECL loadGlfuncDefault(char *procName); +SN_API void SN_DECL unloadImageData(Image *out); +SN_API char *SN_DECL readLog(void); +SN_API void SN_DECL load_glfw_functions(GLFWFunctionTable *table); +SN_API void SN_DECL load_intrinsic_function(void *intrinsic_context, uint64_t id); +SN_API SIMDID SN_DECL sn_get_simd_level_global(); +/* Per-core variant: always re-executes CPUID, never caches. + * Must be called on the target core (after affinity is set). */ +SN_API SIMDID SN_DECL sn_get_simd_level_local(); +SN_API SIMDID SN_DECL sn_get_unite_simd(SIMDID left, SIMDID right); +SN_API int SN_DECL sn_compare_simd(SIMDID left, SIMDID right); +SN_API void SN_DECL sn_set_thread_affinity(int core_id); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/StgSharp.Native/sn-head/gl.h b/StgSharp.Native/sn-head/gl.h index 053f65d3..96c942a7 100644 --- a/StgSharp.Native/sn-head/gl.h +++ b/StgSharp.Native/sn-head/gl.h @@ -1,10775 +1,10775 @@ -/* clang-format off */ - - -/** - * Loader generated by glad 2.0.5 on Fri Feb 16 00:51:02 2024 - * - * SPDX-License-Identifier: (WTFPL OR CC0-1.0) AND Apache-2.0 - * - * Generator: C/C++ - * Specification: gl - * Extensions: 619 - * - * APIs: - * - gl:core=4.6 - * - * Options: - * - ALIAS = False - * - DEBUG = False - * - HEADER_ONLY = False - * - LOADER = False - * - MX = True - * - ON_DEMAND = False - * - * Commandline: - * --api='gl:core=4.6' --extensions='GL_3DFX_multisample,GL_3DFX_tbuffer,GL_3DFX_texture_compression_FXT1,GL_AMD_blend_minmax_factor,GL_AMD_conservative_depth,GL_AMD_debug_output,GL_AMD_depth_clamp_separate,GL_AMD_draw_buffers_blend,GL_AMD_framebuffer_multisample_advanced,GL_AMD_framebuffer_sample_positions,GL_AMD_gcn_shader,GL_AMD_gpu_shader_half_float,GL_AMD_gpu_shader_int16,GL_AMD_gpu_shader_int64,GL_AMD_interleaved_elements,GL_AMD_multi_draw_indirect,GL_AMD_name_gen_delete,GL_AMD_occlusion_query_event,GL_AMD_performance_monitor,GL_AMD_pinned_memory,GL_AMD_query_buffer_object,GL_AMD_sample_positions,GL_AMD_seamless_cubemap_per_texture,GL_AMD_shader_atomic_counter_ops,GL_AMD_shader_ballot,GL_AMD_shader_explicit_vertex_parameter,GL_AMD_shader_gpu_shader_half_float_fetch,GL_AMD_shader_image_load_store_lod,GL_AMD_shader_stencil_export,GL_AMD_shader_trinary_minmax,GL_AMD_sparse_texture,GL_AMD_stencil_operation_extended,GL_AMD_texture_gather_bias_lod,GL_AMD_texture_texture4,GL_AMD_transform_feedback3_lines_triangles,GL_AMD_transform_feedback4,GL_AMD_vertex_shader_layer,GL_AMD_vertex_shader_tessellator,GL_AMD_vertex_shader_viewport_index,GL_APPLE_aux_depth_stencil,GL_APPLE_client_storage,GL_APPLE_element_array,GL_APPLE_fence,GL_APPLE_float_pixels,GL_APPLE_flush_buffer_range,GL_APPLE_object_purgeable,GL_APPLE_rgb_422,GL_APPLE_row_bytes,GL_APPLE_specular_vector,GL_APPLE_texture_range,GL_APPLE_transform_hint,GL_APPLE_vertex_array_object,GL_APPLE_vertex_array_range,GL_APPLE_vertex_program_evaluators,GL_APPLE_ycbcr_422,GL_ARB_ES2_compatibility,GL_ARB_ES3_1_compatibility,GL_ARB_ES3_2_compatibility,GL_ARB_ES3_compatibility,GL_ARB_arrays_of_arrays,GL_ARB_base_instance,GL_ARB_bindless_texture,GL_ARB_blend_func_extended,GL_ARB_buffer_storage,GL_ARB_cl_event,GL_ARB_clear_buffer_object,GL_ARB_clear_texture,GL_ARB_clip_control,GL_ARB_color_buffer_float,GL_ARB_compatibility,GL_ARB_compressed_texture_pixel_storage,GL_ARB_compute_shader,GL_ARB_compute_variable_group_size,GL_ARB_conditional_render_inverted,GL_ARB_conservative_depth,GL_ARB_copy_buffer,GL_ARB_copy_image,GL_ARB_cull_distance,GL_ARB_debug_output,GL_ARB_depth_buffer_float,GL_ARB_depth_clamp,GL_ARB_depth_texture,GL_ARB_derivative_control,GL_ARB_direct_state_access,GL_ARB_draw_buffers,GL_ARB_draw_buffers_blend,GL_ARB_draw_elements_base_vertex,GL_ARB_draw_indirect,GL_ARB_draw_instanced,GL_ARB_enhanced_layouts,GL_ARB_explicit_attrib_location,GL_ARB_explicit_uniform_location,GL_ARB_fragment_coord_conventions,GL_ARB_fragment_layer_viewport,GL_ARB_fragment_program,GL_ARB_fragment_program_shadow,GL_ARB_fragment_shader,GL_ARB_fragment_shader_interlock,GL_ARB_framebuffer_no_attachments,GL_ARB_framebuffer_object,GL_ARB_framebuffer_sRGB,GL_ARB_geometry_shader4,GL_ARB_get_program_binary,GL_ARB_get_texture_sub_image,GL_ARB_gl_spirv,GL_ARB_gpu_shader5,GL_ARB_gpu_shader_fp64,GL_ARB_gpu_shader_int64,GL_ARB_half_float_pixel,GL_ARB_half_float_vertex,GL_ARB_imaging,GL_ARB_indirect_parameters,GL_ARB_instanced_arrays,GL_ARB_internalformat_query,GL_ARB_internalformat_query2,GL_ARB_invalidate_subdata,GL_ARB_map_buffer_alignment,GL_ARB_map_buffer_range,GL_ARB_matrix_palette,GL_ARB_multi_bind,GL_ARB_multi_draw_indirect,GL_ARB_multisample,GL_ARB_multitexture,GL_ARB_occlusion_query,GL_ARB_occlusion_query2,GL_ARB_parallel_shader_compile,GL_ARB_pipeline_statistics_query,GL_ARB_pixel_buffer_object,GL_ARB_point_parameters,GL_ARB_point_sprite,GL_ARB_polygon_offset_clamp,GL_ARB_post_depth_coverage,GL_ARB_program_interface_query,GL_ARB_provoking_vertex,GL_ARB_query_buffer_object,GL_ARB_robust_buffer_access_behavior,GL_ARB_robustness,GL_ARB_robustness_isolation,GL_ARB_sample_locations,GL_ARB_sample_shading,GL_ARB_sampler_objects,GL_ARB_seamless_cube_map,GL_ARB_seamless_cubemap_per_texture,GL_ARB_separate_shader_objects,GL_ARB_shader_atomic_counter_ops,GL_ARB_shader_atomic_counters,GL_ARB_shader_ballot,GL_ARB_shader_bit_encoding,GL_ARB_shader_clock,GL_ARB_shader_draw_parameters,GL_ARB_shader_group_vote,GL_ARB_shader_image_load_store,GL_ARB_shader_image_size,GL_ARB_shader_objects,GL_ARB_shader_precision,GL_ARB_shader_stencil_export,GL_ARB_shader_storage_buffer_object,GL_ARB_shader_subroutine,GL_ARB_shader_texture_image_samples,GL_ARB_shader_texture_lod,GL_ARB_shader_viewport_layer_array,GL_ARB_shading_language_100,GL_ARB_shading_language_420pack,GL_ARB_shading_language_include,GL_ARB_shading_language_packing,GL_ARB_shadow,GL_ARB_shadow_ambient,GL_ARB_sparse_buffer,GL_ARB_sparse_texture,GL_ARB_sparse_texture2,GL_ARB_sparse_texture_clamp,GL_ARB_spirv_extensions,GL_ARB_stencil_texturing,GL_ARB_sync,GL_ARB_tessellation_shader,GL_ARB_texture_barrier,GL_ARB_texture_border_clamp,GL_ARB_texture_buffer_object,GL_ARB_texture_buffer_object_rgb32,GL_ARB_texture_buffer_range,GL_ARB_texture_compression,GL_ARB_texture_compression_bptc,GL_ARB_texture_compression_rgtc,GL_ARB_texture_cube_map,GL_ARB_texture_cube_map_array,GL_ARB_texture_env_add,GL_ARB_texture_env_combine,GL_ARB_texture_env_crossbar,GL_ARB_texture_env_dot3,GL_ARB_texture_filter_anisotropic,GL_ARB_texture_filter_minmax,GL_ARB_texture_float,GL_ARB_texture_gather,GL_ARB_texture_mirror_clamp_to_edge,GL_ARB_texture_mirrored_repeat,GL_ARB_texture_multisample,GL_ARB_texture_non_power_of_two,GL_ARB_texture_query_levels,GL_ARB_texture_query_lod,GL_ARB_texture_rectangle,GL_ARB_texture_rg,GL_ARB_texture_rgb10_a2ui,GL_ARB_texture_stencil8,GL_ARB_texture_storage,GL_ARB_texture_storage_multisample,GL_ARB_texture_swizzle,GL_ARB_texture_view,GL_ARB_timer_query,GL_ARB_transform_feedback2,GL_ARB_transform_feedback3,GL_ARB_transform_feedback_instanced,GL_ARB_transform_feedback_overflow_query,GL_ARB_transpose_matrix,GL_ARB_uniform_buffer_object,GL_ARB_vertex_array_bgra,GL_ARB_vertex_array_object,GL_ARB_vertex_attrib_64bit,GL_ARB_vertex_attrib_binding,GL_ARB_vertex_blend,GL_ARB_vertex_buffer_object,GL_ARB_vertex_program,GL_ARB_vertex_shader,GL_ARB_vertex_type_10f_11f_11f_rev,GL_ARB_vertex_type_2_10_10_10_rev,GL_ARB_viewport_array,GL_ARB_window_pos,GL_ATI_draw_buffers,GL_ATI_element_array,GL_ATI_envmap_bumpmap,GL_ATI_fragment_shader,GL_ATI_map_object_buffer,GL_ATI_meminfo,GL_ATI_pixel_format_float,GL_ATI_pn_triangles,GL_ATI_separate_stencil,GL_ATI_text_fragment_shader,GL_ATI_texture_env_combine3,GL_ATI_texture_float,GL_ATI_texture_mirror_once,GL_ATI_vertex_array_object,GL_ATI_vertex_attrib_array_object,GL_ATI_vertex_streams,GL_EXT_422_pixels,GL_EXT_EGL_image_storage,GL_EXT_EGL_sync,GL_EXT_abgr,GL_EXT_bgra,GL_EXT_bindable_uniform,GL_EXT_blend_color,GL_EXT_blend_equation_separate,GL_EXT_blend_func_separate,GL_EXT_blend_logic_op,GL_EXT_blend_minmax,GL_EXT_blend_subtract,GL_EXT_clip_volume_hint,GL_EXT_cmyka,GL_EXT_color_subtable,GL_EXT_compiled_vertex_array,GL_EXT_convolution,GL_EXT_coordinate_frame,GL_EXT_copy_texture,GL_EXT_cull_vertex,GL_EXT_debug_label,GL_EXT_debug_marker,GL_EXT_depth_bounds_test,GL_EXT_direct_state_access,GL_EXT_draw_buffers2,GL_EXT_draw_instanced,GL_EXT_draw_range_elements,GL_EXT_external_buffer,GL_EXT_fog_coord,GL_EXT_framebuffer_blit,GL_EXT_framebuffer_blit_layers,GL_EXT_framebuffer_multisample,GL_EXT_framebuffer_multisample_blit_scaled,GL_EXT_framebuffer_object,GL_EXT_framebuffer_sRGB,GL_EXT_geometry_shader4,GL_EXT_gpu_program_parameters,GL_EXT_gpu_shader4,GL_EXT_histogram,GL_EXT_index_array_formats,GL_EXT_index_func,GL_EXT_index_material,GL_EXT_index_texture,GL_EXT_light_texture,GL_EXT_memory_object,GL_EXT_memory_object_fd,GL_EXT_memory_object_win32,GL_EXT_misc_attribute,GL_EXT_multi_draw_arrays,GL_EXT_multisample,GL_EXT_multiview_tessellation_geometry_shader,GL_EXT_multiview_texture_multisample,GL_EXT_multiview_timer_query,GL_EXT_packed_depth_stencil,GL_EXT_packed_float,GL_EXT_packed_pixels,GL_EXT_paletted_texture,GL_EXT_pixel_buffer_object,GL_EXT_pixel_transform,GL_EXT_pixel_transform_color_table,GL_EXT_point_parameters,GL_EXT_polygon_offset,GL_EXT_polygon_offset_clamp,GL_EXT_post_depth_coverage,GL_EXT_provoking_vertex,GL_EXT_raster_multisample,GL_EXT_rescale_normal,GL_EXT_secondary_color,GL_EXT_semaphore,GL_EXT_semaphore_fd,GL_EXT_semaphore_win32,GL_EXT_separate_shader_objects,GL_EXT_separate_specular_color,GL_EXT_shader_framebuffer_fetch,GL_EXT_shader_framebuffer_fetch_non_coherent,GL_EXT_shader_image_load_formatted,GL_EXT_shader_image_load_store,GL_EXT_shader_integer_mix,GL_EXT_shader_samples_identical,GL_EXT_shadow_funcs,GL_EXT_shared_texture_palette,GL_EXT_sparse_texture2,GL_EXT_stencil_clear_tag,GL_EXT_stencil_two_side,GL_EXT_stencil_wrap,GL_EXT_subtexture,GL_EXT_texture,GL_EXT_texture3D,GL_EXT_texture_array,GL_EXT_texture_buffer_object,GL_EXT_texture_compression_latc,GL_EXT_texture_compression_rgtc,GL_EXT_texture_compression_s3tc,GL_EXT_texture_cube_map,GL_EXT_texture_env_add,GL_EXT_texture_env_combine,GL_EXT_texture_env_dot3,GL_EXT_texture_filter_anisotropic,GL_EXT_texture_filter_minmax,GL_EXT_texture_integer,GL_EXT_texture_lod_bias,GL_EXT_texture_mirror_clamp,GL_EXT_texture_object,GL_EXT_texture_perturb_normal,GL_EXT_texture_sRGB,GL_EXT_texture_sRGB_R8,GL_EXT_texture_sRGB_RG8,GL_EXT_texture_sRGB_decode,GL_EXT_texture_shadow_lod,GL_EXT_texture_shared_exponent,GL_EXT_texture_snorm,GL_EXT_texture_storage,GL_EXT_texture_swizzle,GL_EXT_timer_query,GL_EXT_transform_feedback,GL_EXT_vertex_array,GL_EXT_vertex_array_bgra,GL_EXT_vertex_attrib_64bit,GL_EXT_vertex_shader,GL_EXT_vertex_weighting,GL_EXT_win32_keyed_mutex,GL_EXT_window_rectangles,GL_EXT_x11_sync_object,GL_GREMEDY_frame_terminator,GL_GREMEDY_string_marker,GL_HP_convolution_border_modes,GL_HP_image_transform,GL_HP_occlusion_test,GL_HP_texture_lighting,GL_IBM_cull_vertex,GL_IBM_multimode_draw_arrays,GL_IBM_rasterpos_clip,GL_IBM_static_data,GL_IBM_texture_mirrored_repeat,GL_IBM_vertex_array_lists,GL_INGR_blend_func_separate,GL_INGR_color_clamp,GL_INGR_interlace_read,GL_INTEL_blackhole_render,GL_INTEL_conservative_rasterization,GL_INTEL_fragment_shader_ordering,GL_INTEL_framebuffer_CMAA,GL_INTEL_map_texture,GL_INTEL_parallel_arrays,GL_INTEL_performance_query,GL_KHR_blend_equation_advanced,GL_KHR_blend_equation_advanced_coherent,GL_KHR_context_flush_control,GL_KHR_debug,GL_KHR_no_error,GL_KHR_parallel_shader_compile,GL_KHR_robust_buffer_access_behavior,GL_KHR_robustness,GL_KHR_shader_subgroup,GL_KHR_texture_compression_astc_hdr,GL_KHR_texture_compression_astc_ldr,GL_KHR_texture_compression_astc_sliced_3d,GL_MESAX_texture_stack,GL_MESA_framebuffer_flip_x,GL_MESA_framebuffer_flip_y,GL_MESA_framebuffer_swap_xy,GL_MESA_pack_invert,GL_MESA_program_binary_formats,GL_MESA_resize_buffers,GL_MESA_shader_integer_functions,GL_MESA_tile_raster_order,GL_MESA_window_pos,GL_MESA_ycbcr_texture,GL_NVX_blend_equation_advanced_multi_draw_buffers,GL_NVX_conditional_render,GL_NVX_gpu_memory_info,GL_NVX_gpu_multicast2,GL_NVX_linked_gpu_multicast,GL_NVX_progress_fence,GL_NV_alpha_to_coverage_dither_control,GL_NV_bindless_multi_draw_indirect,GL_NV_bindless_multi_draw_indirect_count,GL_NV_bindless_texture,GL_NV_blend_equation_advanced,GL_NV_blend_equation_advanced_coherent,GL_NV_blend_minmax_factor,GL_NV_blend_square,GL_NV_clip_space_w_scaling,GL_NV_command_list,GL_NV_compute_program5,GL_NV_compute_shader_derivatives,GL_NV_conditional_render,GL_NV_conservative_raster,GL_NV_conservative_raster_dilate,GL_NV_conservative_raster_pre_snap,GL_NV_conservative_raster_pre_snap_triangles,GL_NV_conservative_raster_underestimation,GL_NV_copy_depth_to_color,GL_NV_copy_image,GL_NV_deep_texture3D,GL_NV_depth_buffer_float,GL_NV_depth_clamp,GL_NV_draw_texture,GL_NV_draw_vulkan_image,GL_NV_evaluators,GL_NV_explicit_multisample,GL_NV_fence,GL_NV_fill_rectangle,GL_NV_float_buffer,GL_NV_fog_distance,GL_NV_fragment_coverage_to_color,GL_NV_fragment_program,GL_NV_fragment_program2,GL_NV_fragment_program4,GL_NV_fragment_program_option,GL_NV_fragment_shader_barycentric,GL_NV_fragment_shader_interlock,GL_NV_framebuffer_mixed_samples,GL_NV_framebuffer_multisample_coverage,GL_NV_geometry_program4,GL_NV_geometry_shader4,GL_NV_geometry_shader_passthrough,GL_NV_gpu_multicast,GL_NV_gpu_program4,GL_NV_gpu_program5,GL_NV_gpu_program5_mem_extended,GL_NV_gpu_shader5,GL_NV_half_float,GL_NV_internalformat_sample_query,GL_NV_light_max_exponent,GL_NV_memory_attachment,GL_NV_memory_object_sparse,GL_NV_mesh_shader,GL_NV_multisample_coverage,GL_NV_multisample_filter_hint,GL_NV_occlusion_query,GL_NV_packed_depth_stencil,GL_NV_parameter_buffer_object,GL_NV_parameter_buffer_object2,GL_NV_path_rendering,GL_NV_path_rendering_shared_edge,GL_NV_pixel_data_range,GL_NV_point_sprite,GL_NV_present_video,GL_NV_primitive_restart,GL_NV_primitive_shading_rate,GL_NV_query_resource,GL_NV_query_resource_tag,GL_NV_register_combiners,GL_NV_register_combiners2,GL_NV_representative_fragment_test,GL_NV_robustness_video_memory_purge,GL_NV_sample_locations,GL_NV_sample_mask_override_coverage,GL_NV_scissor_exclusive,GL_NV_shader_atomic_counters,GL_NV_shader_atomic_float,GL_NV_shader_atomic_float64,GL_NV_shader_atomic_fp16_vector,GL_NV_shader_atomic_int64,GL_NV_shader_buffer_load,GL_NV_shader_buffer_store,GL_NV_shader_storage_buffer_object,GL_NV_shader_subgroup_partitioned,GL_NV_shader_texture_footprint,GL_NV_shader_thread_group,GL_NV_shader_thread_shuffle,GL_NV_shading_rate_image,GL_NV_stereo_view_rendering,GL_NV_tessellation_program5,GL_NV_texgen_emboss,GL_NV_texgen_reflection,GL_NV_texture_barrier,GL_NV_texture_compression_vtc,GL_NV_texture_env_combine4,GL_NV_texture_expand_normal,GL_NV_texture_multisample,GL_NV_texture_rectangle,GL_NV_texture_rectangle_compressed,GL_NV_texture_shader,GL_NV_texture_shader2,GL_NV_texture_shader3,GL_NV_timeline_semaphore,GL_NV_transform_feedback,GL_NV_transform_feedback2,GL_NV_uniform_buffer_std430_layout,GL_NV_uniform_buffer_unified_memory,GL_NV_vdpau_interop,GL_NV_vdpau_interop2,GL_NV_vertex_array_range,GL_NV_vertex_array_range2,GL_NV_vertex_attrib_integer_64bit,GL_NV_vertex_buffer_unified_memory,GL_NV_vertex_program,GL_NV_vertex_program1_1,GL_NV_vertex_program2,GL_NV_vertex_program2_option,GL_NV_vertex_program3,GL_NV_vertex_program4,GL_NV_video_capture,GL_NV_viewport_array2,GL_NV_viewport_swizzle,GL_OES_byte_coordinates,GL_OES_compressed_paletted_texture,GL_OES_fixed_point,GL_OES_query_matrix,GL_OES_read_format,GL_OES_single_precision,GL_OML_interlace,GL_OML_resample,GL_OML_subsample,GL_OVR_multiview,GL_OVR_multiview2,GL_PGI_misc_hints,GL_PGI_vertex_hints,GL_REND_screen_coordinates,GL_S3_s3tc,GL_SGIS_detail_texture,GL_SGIS_fog_function,GL_SGIS_generate_mipmap,GL_SGIS_multisample,GL_SGIS_pixel_texture,GL_SGIS_point_line_texgen,GL_SGIS_point_parameters,GL_SGIS_sharpen_texture,GL_SGIS_texture4D,GL_SGIS_texture_border_clamp,GL_SGIS_texture_color_mask,GL_SGIS_texture_edge_clamp,GL_SGIS_texture_filter4,GL_SGIS_texture_lod,GL_SGIS_texture_select,GL_SGIX_async,GL_SGIX_async_histogram,GL_SGIX_async_pixel,GL_SGIX_blend_alpha_minmax,GL_SGIX_calligraphic_fragment,GL_SGIX_clipmap,GL_SGIX_convolution_accuracy,GL_SGIX_depth_pass_instrument,GL_SGIX_depth_texture,GL_SGIX_flush_raster,GL_SGIX_fog_offset,GL_SGIX_fragment_lighting,GL_SGIX_framezoom,GL_SGIX_igloo_interface,GL_SGIX_instruments,GL_SGIX_interlace,GL_SGIX_ir_instrument1,GL_SGIX_list_priority,GL_SGIX_pixel_texture,GL_SGIX_pixel_tiles,GL_SGIX_polynomial_ffd,GL_SGIX_reference_plane,GL_SGIX_resample,GL_SGIX_scalebias_hint,GL_SGIX_shadow,GL_SGIX_shadow_ambient,GL_SGIX_sprite,GL_SGIX_subsample,GL_SGIX_tag_sample_buffer,GL_SGIX_texture_add_env,GL_SGIX_texture_coordinate_clamp,GL_SGIX_texture_lod_bias,GL_SGIX_texture_multi_buffer,GL_SGIX_texture_scale_bias,GL_SGIX_vertex_preclip,GL_SGIX_ycrcb,GL_SGIX_ycrcb_subsample,GL_SGIX_ycrcba,GL_SGI_color_matrix,GL_SGI_color_table,GL_SGI_texture_color_table,GL_SUNX_constant_data,GL_SUN_convolution_border_modes,GL_SUN_global_alpha,GL_SUN_mesh_array,GL_SUN_slice_accum,GL_SUN_triangle_list,GL_SUN_vertex,GL_WIN_phong_shading,GL_WIN_specular_fog' c --mx - * - * Online: - * http://glad.sh/#api=gl%3Acore%3D4.6&generator=c&options=MX - * - */ - -#ifndef GLAD_GL_H_ -#define GLAD_GL_H_ - -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wreserved-id-macro" -#endif -#ifdef __gl_h_ -#error OpenGL (gl.h) header already included (API: gl), remove previous include! -#endif -#define __gl_h_ 1 -#ifdef __gl3_h_ -#error OpenGL (gl3.h) header already included (API: gl), remove previous include! -#endif -#define __gl3_h_ 1 -#ifdef __glext_h_ -#error OpenGL (glext.h) header already included (API: gl), remove previous include! -#endif -#define __glext_h_ 1 -#ifdef __gl3ext_h_ -#error OpenGL (gl3ext.h) header already included (API: gl), remove previous include! -#endif -#define __gl3ext_h_ 1 -#ifdef __clang__ -#pragma clang diagnostic pop -#endif - -#define GLAD_GL -#define GLAD_OPTION_GL_MX - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef GLAD_PLATFORM_H_ -#define GLAD_PLATFORM_H_ - -#ifndef GLAD_PLATFORM_WIN32 -#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__) -#define GLAD_PLATFORM_WIN32 1 -#else -#define GLAD_PLATFORM_WIN32 0 -#endif -#endif - -#ifndef GLAD_PLATFORM_APPLE -#ifdef __APPLE__ -#define GLAD_PLATFORM_APPLE 1 -#else -#define GLAD_PLATFORM_APPLE 0 -#endif -#endif - -#ifndef GLAD_PLATFORM_EMSCRIPTEN -#ifdef __EMSCRIPTEN__ -#define GLAD_PLATFORM_EMSCRIPTEN 1 -#else -#define GLAD_PLATFORM_EMSCRIPTEN 0 -#endif -#endif - -#ifndef GLAD_PLATFORM_UWP -#if defined(_MSC_VER) && !defined(GLAD_INTERNAL_HAVE_WINAPIFAMILY) -#ifdef __has_include -#if __has_include() -#define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1 -#endif -#elif _MSC_VER >= 1700 && !_USING_V110_SDK71_ -#define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1 -#endif -#endif - -#ifdef GLAD_INTERNAL_HAVE_WINAPIFAMILY -#include -#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && \ - WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) -#define GLAD_PLATFORM_UWP 1 -#endif -#endif - -#ifndef GLAD_PLATFORM_UWP -#define GLAD_PLATFORM_UWP 0 -#endif -#endif - -#ifdef __GNUC__ -#define GLAD_GNUC_EXTENSION __extension__ -#else -#define GLAD_GNUC_EXTENSION -#endif - -#define GLAD_UNUSED(x) (void)(x) - -#ifndef GLAD_API_CALL -#if defined(GLAD_API_CALL_EXPORT) -#if GLAD_PLATFORM_WIN32 || defined(__CYGWIN__) -#if defined(GLAD_API_CALL_EXPORT_BUILD) -#if defined(__GNUC__) -#define GLAD_API_CALL __attribute__((dllexport)) extern -#else -#define GLAD_API_CALL __declspec(dllexport) extern -#endif -#else -#if defined(__GNUC__) -#define GLAD_API_CALL __attribute__((dllimport)) extern -#else -#define GLAD_API_CALL __declspec(dllimport) extern -#endif -#endif -#elif defined(__GNUC__) && defined(GLAD_API_CALL_EXPORT_BUILD) -#define GLAD_API_CALL __attribute__((visibility("default"))) extern -#else -#define GLAD_API_CALL extern -#endif -#else -#define GLAD_API_CALL extern -#endif -#endif - -#ifdef APIENTRY -#define GLAD_API_PTR APIENTRY -#elif GLAD_PLATFORM_WIN32 -#define GLAD_API_PTR __stdcall -#else -#define GLAD_API_PTR -#endif - -#ifndef GLAPI -#define GLAPI GLAD_API_CALL -#endif - -#ifndef GLAPIENTRY -#define GLAPIENTRY GLAD_API_PTR -#endif - -#define GLAD_MAKE_VERSION(major, minor) (major * 10000 + minor) -#define GLAD_VERSION_MAJOR(version) (version / 10000) -#define GLAD_VERSION_MINOR(version) (version % 10000) - -#define GLAD_GENERATOR_VERSION "2.0.5" - -typedef void (*GLADapiproc)(void); - -typedef GLADapiproc (*GLADloadfunc)(const char *name); -typedef GLADapiproc (*GLADuserptrloadfunc)(void *userptr, const char *name); - -typedef void (*GLADprecallback)(const char *name, GLADapiproc apiproc, int len_args, ...); -typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apiproc, int len_args, - ...); - -#endif /* GLAD_PLATFORM_H_ */ - -#define GL_1PASS_EXT 0x80A1 -#define GL_1PASS_SGIS 0x80A1 -#define GL_2PASS_0_EXT 0x80A2 -#define GL_2PASS_0_SGIS 0x80A2 -#define GL_2PASS_1_EXT 0x80A3 -#define GL_2PASS_1_SGIS 0x80A3 -#define GL_2X_BIT_ATI 0x00000001 -#define GL_422_AVERAGE_EXT 0x80CE -#define GL_422_EXT 0x80CC -#define GL_422_REV_AVERAGE_EXT 0x80CF -#define GL_422_REV_EXT 0x80CD -#define GL_4PASS_0_EXT 0x80A4 -#define GL_4PASS_0_SGIS 0x80A4 -#define GL_4PASS_1_EXT 0x80A5 -#define GL_4PASS_1_SGIS 0x80A5 -#define GL_4PASS_2_EXT 0x80A6 -#define GL_4PASS_2_SGIS 0x80A6 -#define GL_4PASS_3_EXT 0x80A7 -#define GL_4PASS_3_SGIS 0x80A7 -#define GL_4X_BIT_ATI 0x00000002 -#define GL_8X_BIT_ATI 0x00000004 -#define GL_ABGR_EXT 0x8000 -#define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD -#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9 -#define GL_ACTIVE_ATTRIBUTES 0x8B89 -#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A -#define GL_ACTIVE_PROGRAM 0x8259 -#define GL_ACTIVE_PROGRAM_EXT 0x8B8D -#define GL_ACTIVE_RESOURCES 0x92F5 -#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911 -#define GL_ACTIVE_SUBROUTINES 0x8DE5 -#define GL_ACTIVE_SUBROUTINE_MAX_LENGTH 0x8E48 -#define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6 -#define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47 -#define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49 -#define GL_ACTIVE_TEXTURE 0x84E0 -#define GL_ACTIVE_TEXTURE_ARB 0x84E0 -#define GL_ACTIVE_UNIFORMS 0x8B86 -#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 -#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 -#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 -#define GL_ACTIVE_VARIABLES 0x9305 -#define GL_ACTIVE_VARYINGS_NV 0x8C81 -#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82 -#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5 -#define GL_ADD_ATI 0x8963 -#define GL_ADD_SIGNED_ARB 0x8574 -#define GL_ADD_SIGNED_EXT 0x8574 -#define GL_ADJACENT_PAIRS_NV 0x90AE -#define GL_AFFINE_2D_NV 0x9092 -#define GL_AFFINE_3D_NV 0x9094 -#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E -#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210 -#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211 -#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E -#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F -#define GL_ALL_BARRIER_BITS 0xFFFFFFFF -#define GL_ALL_BARRIER_BITS_EXT 0xFFFFFFFF -#define GL_ALL_COMPLETED_NV 0x84F2 -#define GL_ALL_PIXELS_AMD 0xFFFFFFFF -#define GL_ALL_SHADER_BITS 0xFFFFFFFF -#define GL_ALL_STATIC_DATA_IBM 103060 -#define GL_ALPHA 0x1906 -#define GL_ALPHA12_EXT 0x803D -#define GL_ALPHA16F_ARB 0x881C -#define GL_ALPHA16F_EXT 0x881C -#define GL_ALPHA16I_EXT 0x8D8A -#define GL_ALPHA16UI_EXT 0x8D78 -#define GL_ALPHA16_EXT 0x803E -#define GL_ALPHA16_SNORM 0x9018 -#define GL_ALPHA32F_ARB 0x8816 -#define GL_ALPHA32F_EXT 0x8816 -#define GL_ALPHA32I_EXT 0x8D84 -#define GL_ALPHA32UI_EXT 0x8D72 -#define GL_ALPHA4_EXT 0x803B -#define GL_ALPHA8I_EXT 0x8D90 -#define GL_ALPHA8UI_EXT 0x8D7E -#define GL_ALPHA8_EXT 0x803C -#define GL_ALPHA8_SNORM 0x9014 -#define GL_ALPHA_FLOAT16_APPLE 0x881C -#define GL_ALPHA_FLOAT16_ATI 0x881C -#define GL_ALPHA_FLOAT32_APPLE 0x8816 -#define GL_ALPHA_FLOAT32_ATI 0x8816 -#define GL_ALPHA_INTEGER_EXT 0x8D97 -#define GL_ALPHA_MAX_CLAMP_INGR 0x8567 -#define GL_ALPHA_MAX_SGIX 0x8321 -#define GL_ALPHA_MIN_CLAMP_INGR 0x8563 -#define GL_ALPHA_MIN_SGIX 0x8320 -#define GL_ALPHA_REF_COMMAND_NV 0x000F -#define GL_ALPHA_SNORM 0x9010 -#define GL_ALPHA_TO_COVERAGE_DITHER_DEFAULT_NV 0x934D -#define GL_ALPHA_TO_COVERAGE_DITHER_DISABLE_NV 0x934F -#define GL_ALPHA_TO_COVERAGE_DITHER_ENABLE_NV 0x934E -#define GL_ALPHA_TO_COVERAGE_DITHER_MODE_NV 0x92BF -#define GL_ALREADY_SIGNALED 0x911A -#define GL_ALWAYS 0x0207 -#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C -#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D -#define GL_AND 0x1501 -#define GL_AND_INVERTED 0x1504 -#define GL_AND_REVERSE 0x1502 -#define GL_ANY_SAMPLES_PASSED 0x8C2F -#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A -#define GL_ARC_TO_NV 0xFE -#define GL_ARRAY_BUFFER 0x8892 -#define GL_ARRAY_BUFFER_ARB 0x8892 -#define GL_ARRAY_BUFFER_BINDING 0x8894 -#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894 -#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9 -#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8 -#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766 -#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767 -#define GL_ARRAY_SIZE 0x92FB -#define GL_ARRAY_STRIDE 0x92FE -#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D -#define GL_ASYNC_HISTOGRAM_SGIX 0x832C -#define GL_ASYNC_MARKER_SGIX 0x8329 -#define GL_ASYNC_READ_PIXELS_SGIX 0x835E -#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C -#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000 -#define GL_ATOMIC_COUNTER_BARRIER_BIT_EXT 0x00001000 -#define GL_ATOMIC_COUNTER_BUFFER 0x92C0 -#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5 -#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6 -#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1 -#define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4 -#define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_MESH_SHADER_NV 0x959E -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TASK_SHADER_NV 0x959F -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7 -#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3 -#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2 -#define GL_ATTACHED_MEMORY_OBJECT_NV 0x95A4 -#define GL_ATTACHED_MEMORY_OFFSET_NV 0x95A5 -#define GL_ATTACHED_SHADERS 0x8B85 -#define GL_ATTENUATION_EXT 0x834D -#define GL_ATTRIBUTE_ADDRESS_COMMAND_NV 0x0009 -#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645 -#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623 -#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624 -#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625 -#define GL_AUTO_GENERATE_MIPMAP 0x8295 -#define GL_AUX_DEPTH_STENCIL_APPLE 0x8A14 -#define GL_AVERAGE_EXT 0x8335 -#define GL_AVERAGE_HP 0x8160 -#define GL_BACK 0x0405 -#define GL_BACK_LEFT 0x0402 -#define GL_BACK_NORMALS_HINT_PGI 0x1A223 -#define GL_BACK_PRIMARY_COLOR_NV 0x8C77 -#define GL_BACK_RIGHT 0x0403 -#define GL_BACK_SECONDARY_COLOR_NV 0x8C78 -#define GL_BEVEL_NV 0x90A6 -#define GL_BGR 0x80E0 -#define GL_BGRA 0x80E1 -#define GL_BGRA8_EXT 0x93A1 -#define GL_BGRA_EXT 0x80E1 -#define GL_BGRA_INTEGER 0x8D9B -#define GL_BGRA_INTEGER_EXT 0x8D9B -#define GL_BGR_EXT 0x80E0 -#define GL_BGR_INTEGER 0x8D9A -#define GL_BGR_INTEGER_EXT 0x8D9A -#define GL_BIAS_BIT_ATI 0x00000008 -#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541 -#define GL_BINORMAL_ARRAY_EXT 0x843A -#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443 -#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441 -#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440 -#define GL_BLACKHOLE_RENDER_INTEL 0x83FC -#define GL_BLEND 0x0BE2 -#define GL_BLEND_ADVANCED_COHERENT_KHR 0x9285 -#define GL_BLEND_ADVANCED_COHERENT_NV 0x9285 -#define GL_BLEND_COLOR 0x8005 -#define GL_BLEND_COLOR_COMMAND_NV 0x000B -#define GL_BLEND_COLOR_EXT 0x8005 -#define GL_BLEND_DST 0x0BE0 -#define GL_BLEND_DST_ALPHA 0x80CA -#define GL_BLEND_DST_ALPHA_EXT 0x80CA -#define GL_BLEND_DST_RGB 0x80C8 -#define GL_BLEND_DST_RGB_EXT 0x80C8 -#define GL_BLEND_EQUATION 0x8009 -#define GL_BLEND_EQUATION_ALPHA 0x883D -#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D -#define GL_BLEND_EQUATION_EXT 0x8009 -#define GL_BLEND_EQUATION_RGB 0x8009 -#define GL_BLEND_EQUATION_RGB_EXT 0x8009 -#define GL_BLEND_OVERLAP_NV 0x9281 -#define GL_BLEND_PREMULTIPLIED_SRC_NV 0x9280 -#define GL_BLEND_SRC 0x0BE1 -#define GL_BLEND_SRC_ALPHA 0x80CB -#define GL_BLEND_SRC_ALPHA_EXT 0x80CB -#define GL_BLEND_SRC_RGB 0x80C9 -#define GL_BLEND_SRC_RGB_EXT 0x80C9 -#define GL_BLOCK_INDEX 0x92FD -#define GL_BLUE 0x1905 -#define GL_BLUE_BIT_ATI 0x00000004 -#define GL_BLUE_INTEGER 0x8D96 -#define GL_BLUE_INTEGER_EXT 0x8D96 -#define GL_BLUE_MAX_CLAMP_INGR 0x8566 -#define GL_BLUE_MIN_CLAMP_INGR 0x8562 -#define GL_BLUE_NV 0x1905 -#define GL_BOLD_BIT_NV 0x01 -#define GL_BOOL 0x8B56 -#define GL_BOOL_ARB 0x8B56 -#define GL_BOOL_VEC2 0x8B57 -#define GL_BOOL_VEC2_ARB 0x8B57 -#define GL_BOOL_VEC3 0x8B58 -#define GL_BOOL_VEC3_ARB 0x8B58 -#define GL_BOOL_VEC4 0x8B59 -#define GL_BOOL_VEC4_ARB 0x8B59 -#define GL_BOUNDING_BOX_NV 0x908D -#define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C -#define GL_BUFFER 0x82E0 -#define GL_BUFFER_ACCESS 0x88BB -#define GL_BUFFER_ACCESS_ARB 0x88BB -#define GL_BUFFER_ACCESS_FLAGS 0x911F -#define GL_BUFFER_BINDING 0x9302 -#define GL_BUFFER_DATA_SIZE 0x9303 -#define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13 -#define GL_BUFFER_GPU_ADDRESS_NV 0x8F1D -#define GL_BUFFER_IMMUTABLE_STORAGE 0x821F -#define GL_BUFFER_MAPPED 0x88BC -#define GL_BUFFER_MAPPED_ARB 0x88BC -#define GL_BUFFER_MAP_LENGTH 0x9120 -#define GL_BUFFER_MAP_OFFSET 0x9121 -#define GL_BUFFER_MAP_POINTER 0x88BD -#define GL_BUFFER_MAP_POINTER_ARB 0x88BD -#define GL_BUFFER_OBJECT_APPLE 0x85B3 -#define GL_BUFFER_OBJECT_EXT 0x9151 -#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12 -#define GL_BUFFER_SIZE 0x8764 -#define GL_BUFFER_SIZE_ARB 0x8764 -#define GL_BUFFER_STORAGE_FLAGS 0x8220 -#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200 -#define GL_BUFFER_UPDATE_BARRIER_BIT_EXT 0x00000200 -#define GL_BUFFER_USAGE 0x8765 -#define GL_BUFFER_USAGE_ARB 0x8765 -#define GL_BUFFER_VARIABLE 0x92E5 -#define GL_BUMP_ENVMAP_ATI 0x877B -#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777 -#define GL_BUMP_ROT_MATRIX_ATI 0x8775 -#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776 -#define GL_BUMP_TARGET_ATI 0x877C -#define GL_BUMP_TEX_UNITS_ATI 0x8778 -#define GL_BYTE 0x1400 -#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183 -#define GL_CAVEAT_SUPPORT 0x82B8 -#define GL_CCW 0x0901 -#define GL_CIRCULAR_CCW_ARC_TO_NV 0xF8 -#define GL_CIRCULAR_CW_ARC_TO_NV 0xFA -#define GL_CIRCULAR_TANGENT_ARC_TO_NV 0xFC -#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B -#define GL_CLAMP_READ_COLOR 0x891C -#define GL_CLAMP_READ_COLOR_ARB 0x891C -#define GL_CLAMP_TO_BORDER 0x812D -#define GL_CLAMP_TO_BORDER_ARB 0x812D -#define GL_CLAMP_TO_BORDER_SGIS 0x812D -#define GL_CLAMP_TO_EDGE 0x812F -#define GL_CLAMP_TO_EDGE_SGIS 0x812F -#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A -#define GL_CLEAR 0x1500 -#define GL_CLEAR_BUFFER 0x82B4 -#define GL_CLEAR_TEXTURE 0x9365 -#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 -#define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT 0x00004000 -#define GL_CLIENT_STORAGE_BIT 0x0200 -#define GL_CLIPPING_INPUT_PRIMITIVES 0x82F6 -#define GL_CLIPPING_INPUT_PRIMITIVES_ARB 0x82F6 -#define GL_CLIPPING_OUTPUT_PRIMITIVES 0x82F7 -#define GL_CLIPPING_OUTPUT_PRIMITIVES_ARB 0x82F7 -#define GL_CLIP_DEPTH_MODE 0x935D -#define GL_CLIP_DISTANCE0 0x3000 -#define GL_CLIP_DISTANCE1 0x3001 -#define GL_CLIP_DISTANCE2 0x3002 -#define GL_CLIP_DISTANCE3 0x3003 -#define GL_CLIP_DISTANCE4 0x3004 -#define GL_CLIP_DISTANCE5 0x3005 -#define GL_CLIP_DISTANCE6 0x3006 -#define GL_CLIP_DISTANCE7 0x3007 -#define GL_CLIP_DISTANCE_NV 0x8C7A -#define GL_CLIP_FAR_HINT_PGI 0x1A221 -#define GL_CLIP_NEAR_HINT_PGI 0x1A220 -#define GL_CLIP_ORIGIN 0x935C -#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0 -#define GL_CLOSE_PATH_NV 0x00 -#define GL_CMYKA_EXT 0x800D -#define GL_CMYK_EXT 0x800C -#define GL_CND0_ATI 0x896B -#define GL_CND_ATI 0x896A -#define GL_COLOR 0x1800 -#define GL_COLOR3_BIT_PGI 0x00010000 -#define GL_COLOR4_BIT_PGI 0x00020000 -#define GL_COLORBURN_KHR 0x929A -#define GL_COLORBURN_NV 0x929A -#define GL_COLORDODGE_KHR 0x9299 -#define GL_COLORDODGE_NV 0x9299 -#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975 -#define GL_COLOR_ARRAY_ADDRESS_NV 0x8F23 -#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898 -#define GL_COLOR_ARRAY_COUNT_EXT 0x8084 -#define GL_COLOR_ARRAY_EXT 0x8076 -#define GL_COLOR_ARRAY_LENGTH_NV 0x8F2D -#define GL_COLOR_ARRAY_LIST_IBM 103072 -#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082 -#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7 -#define GL_COLOR_ARRAY_POINTER_EXT 0x8090 -#define GL_COLOR_ARRAY_SIZE_EXT 0x8081 -#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083 -#define GL_COLOR_ARRAY_TYPE_EXT 0x8082 -#define GL_COLOR_ATTACHMENT0 0x8CE0 -#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 -#define GL_COLOR_ATTACHMENT1 0x8CE1 -#define GL_COLOR_ATTACHMENT10 0x8CEA -#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA -#define GL_COLOR_ATTACHMENT11 0x8CEB -#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB -#define GL_COLOR_ATTACHMENT12 0x8CEC -#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC -#define GL_COLOR_ATTACHMENT13 0x8CED -#define GL_COLOR_ATTACHMENT13_EXT 0x8CED -#define GL_COLOR_ATTACHMENT14 0x8CEE -#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE -#define GL_COLOR_ATTACHMENT15 0x8CEF -#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF -#define GL_COLOR_ATTACHMENT16 0x8CF0 -#define GL_COLOR_ATTACHMENT17 0x8CF1 -#define GL_COLOR_ATTACHMENT18 0x8CF2 -#define GL_COLOR_ATTACHMENT19 0x8CF3 -#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1 -#define GL_COLOR_ATTACHMENT2 0x8CE2 -#define GL_COLOR_ATTACHMENT20 0x8CF4 -#define GL_COLOR_ATTACHMENT21 0x8CF5 -#define GL_COLOR_ATTACHMENT22 0x8CF6 -#define GL_COLOR_ATTACHMENT23 0x8CF7 -#define GL_COLOR_ATTACHMENT24 0x8CF8 -#define GL_COLOR_ATTACHMENT25 0x8CF9 -#define GL_COLOR_ATTACHMENT26 0x8CFA -#define GL_COLOR_ATTACHMENT27 0x8CFB -#define GL_COLOR_ATTACHMENT28 0x8CFC -#define GL_COLOR_ATTACHMENT29 0x8CFD -#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2 -#define GL_COLOR_ATTACHMENT3 0x8CE3 -#define GL_COLOR_ATTACHMENT30 0x8CFE -#define GL_COLOR_ATTACHMENT31 0x8CFF -#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3 -#define GL_COLOR_ATTACHMENT4 0x8CE4 -#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4 -#define GL_COLOR_ATTACHMENT5 0x8CE5 -#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5 -#define GL_COLOR_ATTACHMENT6 0x8CE6 -#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6 -#define GL_COLOR_ATTACHMENT7 0x8CE7 -#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7 -#define GL_COLOR_ATTACHMENT8 0x8CE8 -#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8 -#define GL_COLOR_ATTACHMENT9 0x8CE9 -#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9 -#define GL_COLOR_BUFFER_BIT 0x00004000 -#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835 -#define GL_COLOR_CLEAR_VALUE 0x0C22 -#define GL_COLOR_COMPONENTS 0x8283 -#define GL_COLOR_ENCODING 0x8296 -#define GL_COLOR_FLOAT_APPLE 0x8A0F -#define GL_COLOR_INDEX12_EXT 0x80E6 -#define GL_COLOR_INDEX16_EXT 0x80E7 -#define GL_COLOR_INDEX1_EXT 0x80E2 -#define GL_COLOR_INDEX2_EXT 0x80E3 -#define GL_COLOR_INDEX4_EXT 0x80E4 -#define GL_COLOR_INDEX8_EXT 0x80E5 -#define GL_COLOR_LOGIC_OP 0x0BF2 -#define GL_COLOR_MATRIX_SGI 0x80B1 -#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2 -#define GL_COLOR_RENDERABLE 0x8286 -#define GL_COLOR_SAMPLES_NV 0x8E20 -#define GL_COLOR_SUM_ARB 0x8458 -#define GL_COLOR_SUM_CLAMP_NV 0x854F -#define GL_COLOR_SUM_EXT 0x8458 -#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD -#define GL_COLOR_TABLE_BIAS_SGI 0x80D7 -#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC -#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8 -#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB -#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF -#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE -#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA -#define GL_COLOR_TABLE_SCALE_SGI 0x80D6 -#define GL_COLOR_TABLE_SGI 0x80D0 -#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9 -#define GL_COLOR_WRITEMASK 0x0C23 -#define GL_COMBINE4_NV 0x8503 -#define GL_COMBINER0_NV 0x8550 -#define GL_COMBINER1_NV 0x8551 -#define GL_COMBINER2_NV 0x8552 -#define GL_COMBINER3_NV 0x8553 -#define GL_COMBINER4_NV 0x8554 -#define GL_COMBINER5_NV 0x8555 -#define GL_COMBINER6_NV 0x8556 -#define GL_COMBINER7_NV 0x8557 -#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545 -#define GL_COMBINER_AB_OUTPUT_NV 0x854A -#define GL_COMBINER_BIAS_NV 0x8549 -#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546 -#define GL_COMBINER_CD_OUTPUT_NV 0x854B -#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544 -#define GL_COMBINER_INPUT_NV 0x8542 -#define GL_COMBINER_MAPPING_NV 0x8543 -#define GL_COMBINER_MUX_SUM_NV 0x8547 -#define GL_COMBINER_SCALE_NV 0x8548 -#define GL_COMBINER_SUM_OUTPUT_NV 0x854C -#define GL_COMBINE_ALPHA_ARB 0x8572 -#define GL_COMBINE_ALPHA_EXT 0x8572 -#define GL_COMBINE_ARB 0x8570 -#define GL_COMBINE_EXT 0x8570 -#define GL_COMBINE_RGB_ARB 0x8571 -#define GL_COMBINE_RGB_EXT 0x8571 -#define GL_COMMAND_BARRIER_BIT 0x00000040 -#define GL_COMMAND_BARRIER_BIT_EXT 0x00000040 -#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E -#define GL_COMPARE_REF_TO_TEXTURE 0x884E -#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E -#define GL_COMPATIBLE_SUBROUTINES 0x8E4B -#define GL_COMPILE_STATUS 0x8B81 -#define GL_COMPLETION_STATUS_ARB 0x91B1 -#define GL_COMPLETION_STATUS_KHR 0x91B1 -#define GL_COMPRESSED_ALPHA_ARB 0x84E9 -#define GL_COMPRESSED_INTENSITY_ARB 0x84EC -#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB -#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72 -#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA -#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70 -#define GL_COMPRESSED_R11_EAC 0x9270 -#define GL_COMPRESSED_RED 0x8225 -#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD -#define GL_COMPRESSED_RED_RGTC1 0x8DBB -#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB -#define GL_COMPRESSED_RG 0x8226 -#define GL_COMPRESSED_RG11_EAC 0x9272 -#define GL_COMPRESSED_RGB 0x84ED -#define GL_COMPRESSED_RGB8_ETC2 0x9274 -#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 -#define GL_COMPRESSED_RGBA 0x84EE -#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 -#define GL_COMPRESSED_RGBA_ARB 0x84EE -#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB -#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8 -#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9 -#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA -#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC -#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD -#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0 -#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1 -#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2 -#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3 -#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4 -#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5 -#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6 -#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7 -#define GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C -#define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C -#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1 -#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 -#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 -#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 -#define GL_COMPRESSED_RGB_ARB 0x84ED -#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E -#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E -#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F -#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F -#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0 -#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 -#define GL_COMPRESSED_RG_RGTC2 0x8DBD -#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73 -#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71 -#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 -#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE -#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC -#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC -#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 -#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE -#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B -#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A -#define GL_COMPRESSED_SRGB 0x8C48 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7 -#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 -#define GL_COMPRESSED_SRGB8_ETC2 0x9275 -#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 -#define GL_COMPRESSED_SRGB_ALPHA 0x8C49 -#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D -#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D -#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49 -#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D -#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E -#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F -#define GL_COMPRESSED_SRGB_EXT 0x8C48 -#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C -#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 -#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3 -#define GL_COMPUTE_PROGRAM_NV 0x90FB -#define GL_COMPUTE_PROGRAM_PARAMETER_BUFFER_NV 0x90FC -#define GL_COMPUTE_SHADER 0x91B9 -#define GL_COMPUTE_SHADER_BIT 0x00000020 -#define GL_COMPUTE_SHADER_INVOCATIONS 0x82F5 -#define GL_COMPUTE_SHADER_INVOCATIONS_ARB 0x82F5 -#define GL_COMPUTE_SUBROUTINE 0x92ED -#define GL_COMPUTE_SUBROUTINE_UNIFORM 0x92F3 -#define GL_COMPUTE_TEXTURE 0x82A0 -#define GL_COMPUTE_WORK_GROUP_SIZE 0x8267 -#define GL_COMP_BIT_ATI 0x00000002 -#define GL_CONDITION_SATISFIED 0x911C -#define GL_CONFORMANT_NV 0x9374 -#define GL_CONIC_CURVE_TO_NV 0x1A -#define GL_CONJOINT_NV 0x9284 -#define GL_CONSERVATIVE_RASTERIZATION_INTEL 0x83FE -#define GL_CONSERVATIVE_RASTERIZATION_NV 0x9346 -#define GL_CONSERVATIVE_RASTER_DILATE_GRANULARITY_NV 0x937B -#define GL_CONSERVATIVE_RASTER_DILATE_NV 0x9379 -#define GL_CONSERVATIVE_RASTER_DILATE_RANGE_NV 0x937A -#define GL_CONSERVATIVE_RASTER_MODE_NV 0x954D -#define GL_CONSERVATIVE_RASTER_MODE_POST_SNAP_NV 0x954E -#define GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_NV 0x9550 -#define GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV 0x954F -#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD -#define GL_CONSTANT_ALPHA 0x8003 -#define GL_CONSTANT_ALPHA_EXT 0x8003 -#define GL_CONSTANT_ARB 0x8576 -#define GL_CONSTANT_BORDER_HP 0x8151 -#define GL_CONSTANT_COLOR 0x8001 -#define GL_CONSTANT_COLOR0_NV 0x852A -#define GL_CONSTANT_COLOR1_NV 0x852B -#define GL_CONSTANT_COLOR_EXT 0x8001 -#define GL_CONSTANT_EXT 0x8576 -#define GL_CONST_EYE_NV 0x86E5 -#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002 -#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001 -#define GL_CONTEXT_FLAGS 0x821E -#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002 -#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001 -#define GL_CONTEXT_FLAG_NO_ERROR_BIT 0x00000008 -#define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008 -#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT 0x00000004 -#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004 -#define GL_CONTEXT_LOST 0x0507 -#define GL_CONTEXT_PROFILE_MASK 0x9126 -#define GL_CONTEXT_RELEASE_BEHAVIOR 0x82FB -#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82FC -#define GL_CONTEXT_ROBUST_ACCESS 0x90F3 -#define GL_CONTINUOUS_AMD 0x9007 -#define GL_CONTRAST_NV 0x92A1 -#define GL_CONVEX_HULL_NV 0x908B -#define GL_CONVOLUTION_1D_EXT 0x8010 -#define GL_CONVOLUTION_2D_EXT 0x8011 -#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154 -#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013 -#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015 -#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014 -#define GL_CONVOLUTION_FORMAT_EXT 0x8017 -#define GL_CONVOLUTION_HEIGHT_EXT 0x8019 -#define GL_CONVOLUTION_HINT_SGIX 0x8316 -#define GL_CONVOLUTION_WIDTH_EXT 0x8018 -#define GL_CON_0_ATI 0x8941 -#define GL_CON_10_ATI 0x894B -#define GL_CON_11_ATI 0x894C -#define GL_CON_12_ATI 0x894D -#define GL_CON_13_ATI 0x894E -#define GL_CON_14_ATI 0x894F -#define GL_CON_15_ATI 0x8950 -#define GL_CON_16_ATI 0x8951 -#define GL_CON_17_ATI 0x8952 -#define GL_CON_18_ATI 0x8953 -#define GL_CON_19_ATI 0x8954 -#define GL_CON_1_ATI 0x8942 -#define GL_CON_20_ATI 0x8955 -#define GL_CON_21_ATI 0x8956 -#define GL_CON_22_ATI 0x8957 -#define GL_CON_23_ATI 0x8958 -#define GL_CON_24_ATI 0x8959 -#define GL_CON_25_ATI 0x895A -#define GL_CON_26_ATI 0x895B -#define GL_CON_27_ATI 0x895C -#define GL_CON_28_ATI 0x895D -#define GL_CON_29_ATI 0x895E -#define GL_CON_2_ATI 0x8943 -#define GL_CON_30_ATI 0x895F -#define GL_CON_31_ATI 0x8960 -#define GL_CON_3_ATI 0x8944 -#define GL_CON_4_ATI 0x8945 -#define GL_CON_5_ATI 0x8946 -#define GL_CON_6_ATI 0x8947 -#define GL_CON_7_ATI 0x8948 -#define GL_CON_8_ATI 0x8949 -#define GL_CON_9_ATI 0x894A -#define GL_COORD_REPLACE_ARB 0x8862 -#define GL_COORD_REPLACE_NV 0x8862 -#define GL_COPY 0x1503 -#define GL_COPY_INVERTED 0x150C -#define GL_COPY_READ_BUFFER 0x8F36 -#define GL_COPY_READ_BUFFER_BINDING 0x8F36 -#define GL_COPY_WRITE_BUFFER 0x8F37 -#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 -#define GL_COUNTER_RANGE_AMD 0x8BC1 -#define GL_COUNTER_TYPE_AMD 0x8BC0 -#define GL_COUNT_DOWN_NV 0x9089 -#define GL_COUNT_UP_NV 0x9088 -#define GL_COVERAGE_MODULATION_NV 0x9332 -#define GL_COVERAGE_MODULATION_TABLE_NV 0x9331 -#define GL_COVERAGE_MODULATION_TABLE_SIZE_NV 0x9333 -#define GL_CUBIC_CURVE_TO_NV 0x0C -#define GL_CUBIC_EXT 0x8334 -#define GL_CUBIC_HP 0x815F -#define GL_CULL_FACE 0x0B44 -#define GL_CULL_FACE_MODE 0x0B45 -#define GL_CULL_FRAGMENT_NV 0x86E7 -#define GL_CULL_MODES_NV 0x86E0 -#define GL_CULL_VERTEX_EXT 0x81AA -#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB -#define GL_CULL_VERTEX_IBM 103050 -#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC -#define GL_CURRENT_ATTRIB_NV 0x8626 -#define GL_CURRENT_BINORMAL_EXT 0x843C -#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453 -#define GL_CURRENT_MATRIX_ARB 0x8641 -#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845 -#define GL_CURRENT_MATRIX_NV 0x8641 -#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640 -#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640 -#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865 -#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843 -#define GL_CURRENT_PROGRAM 0x8B8D -#define GL_CURRENT_QUERY 0x8865 -#define GL_CURRENT_QUERY_ARB 0x8865 -#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406 -#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459 -#define GL_CURRENT_TANGENT_EXT 0x843B -#define GL_CURRENT_TIME_NV 0x8E28 -#define GL_CURRENT_VERTEX_ATTRIB 0x8626 -#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626 -#define GL_CURRENT_VERTEX_EXT 0x87E2 -#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B -#define GL_CURRENT_WEIGHT_ARB 0x86A8 -#define GL_CW 0x0900 -#define GL_D3D12_FENCE_VALUE_EXT 0x9595 -#define GL_DARKEN_KHR 0x9297 -#define GL_DARKEN_NV 0x9297 -#define GL_DATA_BUFFER_AMD 0x9151 -#define GL_DEBUG_CALLBACK_FUNCTION 0x8244 -#define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244 -#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245 -#define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245 -#define GL_DEBUG_CATEGORY_API_ERROR_AMD 0x9149 -#define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F -#define GL_DEBUG_CATEGORY_DEPRECATION_AMD 0x914B -#define GL_DEBUG_CATEGORY_OTHER_AMD 0x9150 -#define GL_DEBUG_CATEGORY_PERFORMANCE_AMD 0x914D -#define GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD 0x914E -#define GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD 0x914C -#define GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD 0x914A -#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D -#define GL_DEBUG_LOGGED_MESSAGES 0x9145 -#define GL_DEBUG_LOGGED_MESSAGES_AMD 0x9145 -#define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145 -#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243 -#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243 -#define GL_DEBUG_OUTPUT 0x92E0 -#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242 -#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242 -#define GL_DEBUG_SEVERITY_HIGH 0x9146 -#define GL_DEBUG_SEVERITY_HIGH_AMD 0x9146 -#define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146 -#define GL_DEBUG_SEVERITY_LOW 0x9148 -#define GL_DEBUG_SEVERITY_LOW_AMD 0x9148 -#define GL_DEBUG_SEVERITY_LOW_ARB 0x9148 -#define GL_DEBUG_SEVERITY_MEDIUM 0x9147 -#define GL_DEBUG_SEVERITY_MEDIUM_AMD 0x9147 -#define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147 -#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B -#define GL_DEBUG_SOURCE_API 0x8246 -#define GL_DEBUG_SOURCE_API_ARB 0x8246 -#define GL_DEBUG_SOURCE_APPLICATION 0x824A -#define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A -#define GL_DEBUG_SOURCE_OTHER 0x824B -#define GL_DEBUG_SOURCE_OTHER_ARB 0x824B -#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248 -#define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248 -#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249 -#define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249 -#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247 -#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247 -#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D -#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D -#define GL_DEBUG_TYPE_ERROR 0x824C -#define GL_DEBUG_TYPE_ERROR_ARB 0x824C -#define GL_DEBUG_TYPE_MARKER 0x8268 -#define GL_DEBUG_TYPE_OTHER 0x8251 -#define GL_DEBUG_TYPE_OTHER_ARB 0x8251 -#define GL_DEBUG_TYPE_PERFORMANCE 0x8250 -#define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250 -#define GL_DEBUG_TYPE_POP_GROUP 0x826A -#define GL_DEBUG_TYPE_PORTABILITY 0x824F -#define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F -#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269 -#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E -#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E -#define GL_DECODE_EXT 0x8A49 -#define GL_DECR 0x1E03 -#define GL_DECR_WRAP 0x8508 -#define GL_DECR_WRAP_EXT 0x8508 -#define GL_DEDICATED_MEMORY_OBJECT_EXT 0x9581 -#define GL_DEFORMATIONS_MASK_SGIX 0x8196 -#define GL_DELETE_STATUS 0x8B80 -#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9 -#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA -#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858 -#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859 -#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A -#define GL_DEPTH 0x1801 -#define GL_DEPTH24_STENCIL8 0x88F0 -#define GL_DEPTH24_STENCIL8_EXT 0x88F0 -#define GL_DEPTH32F_STENCIL8 0x8CAD -#define GL_DEPTH32F_STENCIL8_NV 0x8DAC -#define GL_DEPTH_ATTACHMENT 0x8D00 -#define GL_DEPTH_ATTACHMENT_EXT 0x8D00 -#define GL_DEPTH_BOUNDS_EXT 0x8891 -#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890 -#define GL_DEPTH_BUFFER_BIT 0x00000100 -#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF -#define GL_DEPTH_CLAMP 0x864F -#define GL_DEPTH_CLAMP_FAR_AMD 0x901F -#define GL_DEPTH_CLAMP_NEAR_AMD 0x901E -#define GL_DEPTH_CLAMP_NV 0x864F -#define GL_DEPTH_CLEAR_VALUE 0x0B73 -#define GL_DEPTH_COMPONENT 0x1902 -#define GL_DEPTH_COMPONENT16 0x81A5 -#define GL_DEPTH_COMPONENT16_ARB 0x81A5 -#define GL_DEPTH_COMPONENT16_SGIX 0x81A5 -#define GL_DEPTH_COMPONENT24 0x81A6 -#define GL_DEPTH_COMPONENT24_ARB 0x81A6 -#define GL_DEPTH_COMPONENT24_SGIX 0x81A6 -#define GL_DEPTH_COMPONENT32 0x81A7 -#define GL_DEPTH_COMPONENT32F 0x8CAC -#define GL_DEPTH_COMPONENT32F_NV 0x8DAB -#define GL_DEPTH_COMPONENT32_ARB 0x81A7 -#define GL_DEPTH_COMPONENT32_SGIX 0x81A7 -#define GL_DEPTH_COMPONENTS 0x8284 -#define GL_DEPTH_FUNC 0x0B74 -#define GL_DEPTH_RANGE 0x0B70 -#define GL_DEPTH_RENDERABLE 0x8287 -#define GL_DEPTH_SAMPLES_NV 0x932D -#define GL_DEPTH_STENCIL 0x84F9 -#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A -#define GL_DEPTH_STENCIL_EXT 0x84F9 -#define GL_DEPTH_STENCIL_NV 0x84F9 -#define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA -#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F -#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E -#define GL_DEPTH_TEST 0x0B71 -#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B -#define GL_DEPTH_WRITEMASK 0x0B72 -#define GL_DETACHED_BUFFERS_NV 0x95AB -#define GL_DETACHED_MEMORY_INCARNATION_NV 0x95A9 -#define GL_DETACHED_TEXTURES_NV 0x95AA -#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096 -#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095 -#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C -#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A -#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B -#define GL_DEVICE_LUID_EXT 0x9599 -#define GL_DEVICE_NODE_MASK_EXT 0x959A -#define GL_DEVICE_UUID_EXT 0x9597 -#define GL_DIFFERENCE_KHR 0x929E -#define GL_DIFFERENCE_NV 0x929E -#define GL_DISCARD_ATI 0x8763 -#define GL_DISCARD_NV 0x8530 -#define GL_DISCRETE_AMD 0x9006 -#define GL_DISJOINT_NV 0x9283 -#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE -#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF -#define GL_DISTANCE_ATTENUATION_EXT 0x8129 -#define GL_DISTANCE_ATTENUATION_SGIS 0x8129 -#define GL_DITHER 0x0BD0 -#define GL_DONT_CARE 0x1100 -#define GL_DOT2_ADD_ATI 0x896C -#define GL_DOT3_ATI 0x8966 -#define GL_DOT3_RGBA_ARB 0x86AF -#define GL_DOT3_RGBA_EXT 0x8741 -#define GL_DOT3_RGB_ARB 0x86AE -#define GL_DOT3_RGB_EXT 0x8740 -#define GL_DOT4_ATI 0x8967 -#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D -#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3 -#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED -#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1 -#define GL_DOT_PRODUCT_NV 0x86EC -#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B -#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2 -#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C -#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE -#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF -#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0 -#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E -#define GL_DOUBLE 0x140A -#define GL_DOUBLEBUFFER 0x0C32 -#define GL_DOUBLE_MAT2 0x8F46 -#define GL_DOUBLE_MAT2_EXT 0x8F46 -#define GL_DOUBLE_MAT2x3 0x8F49 -#define GL_DOUBLE_MAT2x3_EXT 0x8F49 -#define GL_DOUBLE_MAT2x4 0x8F4A -#define GL_DOUBLE_MAT2x4_EXT 0x8F4A -#define GL_DOUBLE_MAT3 0x8F47 -#define GL_DOUBLE_MAT3_EXT 0x8F47 -#define GL_DOUBLE_MAT3x2 0x8F4B -#define GL_DOUBLE_MAT3x2_EXT 0x8F4B -#define GL_DOUBLE_MAT3x4 0x8F4C -#define GL_DOUBLE_MAT3x4_EXT 0x8F4C -#define GL_DOUBLE_MAT4 0x8F48 -#define GL_DOUBLE_MAT4_EXT 0x8F48 -#define GL_DOUBLE_MAT4x2 0x8F4D -#define GL_DOUBLE_MAT4x2_EXT 0x8F4D -#define GL_DOUBLE_MAT4x3 0x8F4E -#define GL_DOUBLE_MAT4x3_EXT 0x8F4E -#define GL_DOUBLE_VEC2 0x8FFC -#define GL_DOUBLE_VEC2_EXT 0x8FFC -#define GL_DOUBLE_VEC3 0x8FFD -#define GL_DOUBLE_VEC3_EXT 0x8FFD -#define GL_DOUBLE_VEC4 0x8FFE -#define GL_DOUBLE_VEC4_EXT 0x8FFE -#define GL_DRAW_ARRAYS_COMMAND_NV 0x0003 -#define GL_DRAW_ARRAYS_INSTANCED_COMMAND_NV 0x0007 -#define GL_DRAW_ARRAYS_STRIP_COMMAND_NV 0x0005 -#define GL_DRAW_BUFFER 0x0C01 -#define GL_DRAW_BUFFER0 0x8825 -#define GL_DRAW_BUFFER0_ARB 0x8825 -#define GL_DRAW_BUFFER0_ATI 0x8825 -#define GL_DRAW_BUFFER1 0x8826 -#define GL_DRAW_BUFFER10 0x882F -#define GL_DRAW_BUFFER10_ARB 0x882F -#define GL_DRAW_BUFFER10_ATI 0x882F -#define GL_DRAW_BUFFER11 0x8830 -#define GL_DRAW_BUFFER11_ARB 0x8830 -#define GL_DRAW_BUFFER11_ATI 0x8830 -#define GL_DRAW_BUFFER12 0x8831 -#define GL_DRAW_BUFFER12_ARB 0x8831 -#define GL_DRAW_BUFFER12_ATI 0x8831 -#define GL_DRAW_BUFFER13 0x8832 -#define GL_DRAW_BUFFER13_ARB 0x8832 -#define GL_DRAW_BUFFER13_ATI 0x8832 -#define GL_DRAW_BUFFER14 0x8833 -#define GL_DRAW_BUFFER14_ARB 0x8833 -#define GL_DRAW_BUFFER14_ATI 0x8833 -#define GL_DRAW_BUFFER15 0x8834 -#define GL_DRAW_BUFFER15_ARB 0x8834 -#define GL_DRAW_BUFFER15_ATI 0x8834 -#define GL_DRAW_BUFFER1_ARB 0x8826 -#define GL_DRAW_BUFFER1_ATI 0x8826 -#define GL_DRAW_BUFFER2 0x8827 -#define GL_DRAW_BUFFER2_ARB 0x8827 -#define GL_DRAW_BUFFER2_ATI 0x8827 -#define GL_DRAW_BUFFER3 0x8828 -#define GL_DRAW_BUFFER3_ARB 0x8828 -#define GL_DRAW_BUFFER3_ATI 0x8828 -#define GL_DRAW_BUFFER4 0x8829 -#define GL_DRAW_BUFFER4_ARB 0x8829 -#define GL_DRAW_BUFFER4_ATI 0x8829 -#define GL_DRAW_BUFFER5 0x882A -#define GL_DRAW_BUFFER5_ARB 0x882A -#define GL_DRAW_BUFFER5_ATI 0x882A -#define GL_DRAW_BUFFER6 0x882B -#define GL_DRAW_BUFFER6_ARB 0x882B -#define GL_DRAW_BUFFER6_ATI 0x882B -#define GL_DRAW_BUFFER7 0x882C -#define GL_DRAW_BUFFER7_ARB 0x882C -#define GL_DRAW_BUFFER7_ATI 0x882C -#define GL_DRAW_BUFFER8 0x882D -#define GL_DRAW_BUFFER8_ARB 0x882D -#define GL_DRAW_BUFFER8_ATI 0x882D -#define GL_DRAW_BUFFER9 0x882E -#define GL_DRAW_BUFFER9_ARB 0x882E -#define GL_DRAW_BUFFER9_ATI 0x882E -#define GL_DRAW_ELEMENTS_COMMAND_NV 0x0002 -#define GL_DRAW_ELEMENTS_INSTANCED_COMMAND_NV 0x0006 -#define GL_DRAW_ELEMENTS_STRIP_COMMAND_NV 0x0004 -#define GL_DRAW_FRAMEBUFFER 0x8CA9 -#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CA6 -#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9 -#define GL_DRAW_INDIRECT_ADDRESS_NV 0x8F41 -#define GL_DRAW_INDIRECT_BUFFER 0x8F3F -#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43 -#define GL_DRAW_INDIRECT_LENGTH_NV 0x8F42 -#define GL_DRAW_INDIRECT_UNIFIED_NV 0x8F40 -#define GL_DRAW_PIXELS_APPLE 0x8A0A -#define GL_DRIVER_UUID_EXT 0x9598 -#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B -#define GL_DSDT8_MAG8_NV 0x870A -#define GL_DSDT8_NV 0x8709 -#define GL_DSDT_MAG_INTENSITY_NV 0x86DC -#define GL_DSDT_MAG_NV 0x86F6 -#define GL_DSDT_MAG_VIB_NV 0x86F7 -#define GL_DSDT_NV 0x86F5 -#define GL_DST_ALPHA 0x0304 -#define GL_DST_ATOP_NV 0x928F -#define GL_DST_COLOR 0x0306 -#define GL_DST_IN_NV 0x928B -#define GL_DST_NV 0x9287 -#define GL_DST_OUT_NV 0x928D -#define GL_DST_OVER_NV 0x9289 -#define GL_DS_BIAS_NV 0x8716 -#define GL_DS_SCALE_NV 0x8710 -#define GL_DT_BIAS_NV 0x8717 -#define GL_DT_SCALE_NV 0x8711 -#define GL_DU8DV8_ATI 0x877A -#define GL_DUAL_ALPHA12_SGIS 0x8112 -#define GL_DUAL_ALPHA16_SGIS 0x8113 -#define GL_DUAL_ALPHA4_SGIS 0x8110 -#define GL_DUAL_ALPHA8_SGIS 0x8111 -#define GL_DUAL_INTENSITY12_SGIS 0x811A -#define GL_DUAL_INTENSITY16_SGIS 0x811B -#define GL_DUAL_INTENSITY4_SGIS 0x8118 -#define GL_DUAL_INTENSITY8_SGIS 0x8119 -#define GL_DUAL_LUMINANCE12_SGIS 0x8116 -#define GL_DUAL_LUMINANCE16_SGIS 0x8117 -#define GL_DUAL_LUMINANCE4_SGIS 0x8114 -#define GL_DUAL_LUMINANCE8_SGIS 0x8115 -#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C -#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D -#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124 -#define GL_DUDV_ATI 0x8779 -#define GL_DUP_FIRST_CUBIC_CURVE_TO_NV 0xF2 -#define GL_DUP_LAST_CUBIC_CURVE_TO_NV 0xF4 -#define GL_DYNAMIC_ATI 0x8761 -#define GL_DYNAMIC_COPY 0x88EA -#define GL_DYNAMIC_COPY_ARB 0x88EA -#define GL_DYNAMIC_DRAW 0x88E8 -#define GL_DYNAMIC_DRAW_ARB 0x88E8 -#define GL_DYNAMIC_READ 0x88E9 -#define GL_DYNAMIC_READ_ARB 0x88E9 -#define GL_DYNAMIC_STORAGE_BIT 0x0100 -#define GL_EDGEFLAG_BIT_PGI 0x00040000 -#define GL_EDGE_FLAG_ARRAY_ADDRESS_NV 0x8F26 -#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B -#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D -#define GL_EDGE_FLAG_ARRAY_EXT 0x8079 -#define GL_EDGE_FLAG_ARRAY_LENGTH_NV 0x8F30 -#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075 -#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085 -#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093 -#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C -#define GL_EFFECTIVE_RASTER_SAMPLES_EXT 0x932C -#define GL_EIGHTH_BIT_ATI 0x00000020 -#define GL_ELEMENT_ADDRESS_COMMAND_NV 0x0008 -#define GL_ELEMENT_ARRAY_ADDRESS_NV 0x8F29 -#define GL_ELEMENT_ARRAY_APPLE 0x8A0C -#define GL_ELEMENT_ARRAY_ATI 0x8768 -#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002 -#define GL_ELEMENT_ARRAY_BARRIER_BIT_EXT 0x00000002 -#define GL_ELEMENT_ARRAY_BUFFER 0x8893 -#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895 -#define GL_ELEMENT_ARRAY_LENGTH_NV 0x8F33 -#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x8A0E -#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A -#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8A0D -#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769 -#define GL_ELEMENT_ARRAY_UNIFIED_NV 0x8F1F -#define GL_EMBOSS_CONSTANT_NV 0x855E -#define GL_EMBOSS_LIGHT_NV 0x855D -#define GL_EMBOSS_MAP_NV 0x855F -#define GL_EQUAL 0x0202 -#define GL_EQUIV 0x1509 -#define GL_EVAL_2D_NV 0x86C0 -#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5 -#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1 -#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6 -#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0 -#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1 -#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2 -#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3 -#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4 -#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5 -#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7 -#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8 -#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9 -#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA -#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB -#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC -#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD -#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE -#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF -#define GL_EXCLUSION_KHR 0x92A0 -#define GL_EXCLUSION_NV 0x92A0 -#define GL_EXCLUSIVE_EXT 0x8F11 -#define GL_EXPAND_NEGATE_NV 0x8539 -#define GL_EXPAND_NORMAL_NV 0x8538 -#define GL_EXTENSIONS 0x1F03 -#define GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD 0x9160 -#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2 -#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0 -#define GL_EYE_LINE_SGIS 0x81F6 -#define GL_EYE_PLANE 0x2502 -#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C -#define GL_EYE_POINT_SGIS 0x81F4 -#define GL_EYE_RADIAL_NV 0x855B -#define GL_E_TIMES_F_NV 0x8531 -#define GL_FACTOR_MAX_AMD 0x901D -#define GL_FACTOR_MIN_AMD 0x901C -#define GL_FAILURE_NV 0x9030 -#define GL_FALSE 0 -#define GL_FASTEST 0x1101 -#define GL_FENCE_APPLE 0x8A0B -#define GL_FENCE_CONDITION_NV 0x84F4 -#define GL_FENCE_STATUS_NV 0x84F3 -#define GL_FIELDS_NV 0x8E27 -#define GL_FIELD_LOWER_NV 0x9023 -#define GL_FIELD_UPPER_NV 0x9022 -#define GL_FILE_NAME_NV 0x9074 -#define GL_FILL 0x1B02 -#define GL_FILL_RECTANGLE_NV 0x933C -#define GL_FILTER 0x829A -#define GL_FILTER4_SGIS 0x8146 -#define GL_FIRST_TO_REST_NV 0x90AF -#define GL_FIRST_VERTEX_CONVENTION 0x8E4D -#define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D -#define GL_FIXED 0x140C -#define GL_FIXED_OES 0x140C -#define GL_FIXED_ONLY 0x891D -#define GL_FIXED_ONLY_ARB 0x891D -#define GL_FLOAT 0x1406 -#define GL_FLOAT16_MAT2_AMD 0x91C5 -#define GL_FLOAT16_MAT2x3_AMD 0x91C8 -#define GL_FLOAT16_MAT2x4_AMD 0x91C9 -#define GL_FLOAT16_MAT3_AMD 0x91C6 -#define GL_FLOAT16_MAT3x2_AMD 0x91CA -#define GL_FLOAT16_MAT3x4_AMD 0x91CB -#define GL_FLOAT16_MAT4_AMD 0x91C7 -#define GL_FLOAT16_MAT4x2_AMD 0x91CC -#define GL_FLOAT16_MAT4x3_AMD 0x91CD -#define GL_FLOAT16_NV 0x8FF8 -#define GL_FLOAT16_VEC2_NV 0x8FF9 -#define GL_FLOAT16_VEC3_NV 0x8FFA -#define GL_FLOAT16_VEC4_NV 0x8FFB -#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD -#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD -#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D -#define GL_FLOAT_MAT2 0x8B5A -#define GL_FLOAT_MAT2_ARB 0x8B5A -#define GL_FLOAT_MAT2x3 0x8B65 -#define GL_FLOAT_MAT2x4 0x8B66 -#define GL_FLOAT_MAT3 0x8B5B -#define GL_FLOAT_MAT3_ARB 0x8B5B -#define GL_FLOAT_MAT3x2 0x8B67 -#define GL_FLOAT_MAT3x4 0x8B68 -#define GL_FLOAT_MAT4 0x8B5C -#define GL_FLOAT_MAT4_ARB 0x8B5C -#define GL_FLOAT_MAT4x2 0x8B69 -#define GL_FLOAT_MAT4x3 0x8B6A -#define GL_FLOAT_R16_NV 0x8884 -#define GL_FLOAT_R32_NV 0x8885 -#define GL_FLOAT_RG16_NV 0x8886 -#define GL_FLOAT_RG32_NV 0x8887 -#define GL_FLOAT_RGB16_NV 0x8888 -#define GL_FLOAT_RGB32_NV 0x8889 -#define GL_FLOAT_RGBA16_NV 0x888A -#define GL_FLOAT_RGBA32_NV 0x888B -#define GL_FLOAT_RGBA_MODE_NV 0x888E -#define GL_FLOAT_RGBA_NV 0x8883 -#define GL_FLOAT_RGB_NV 0x8882 -#define GL_FLOAT_RG_NV 0x8881 -#define GL_FLOAT_R_NV 0x8880 -#define GL_FLOAT_VEC2 0x8B50 -#define GL_FLOAT_VEC2_ARB 0x8B50 -#define GL_FLOAT_VEC3 0x8B51 -#define GL_FLOAT_VEC3_ARB 0x8B51 -#define GL_FLOAT_VEC4 0x8B52 -#define GL_FLOAT_VEC4_ARB 0x8B52 -#define GL_FOG 0x0B60 -#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D -#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457 -#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076 -#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086 -#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456 -#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455 -#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454 -#define GL_FOG_COORDINATE_EXT 0x8451 -#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450 -#define GL_FOG_COORD_ARRAY_ADDRESS_NV 0x8F28 -#define GL_FOG_COORD_ARRAY_LENGTH_NV 0x8F32 -#define GL_FOG_DISTANCE_MODE_NV 0x855A -#define GL_FOG_FUNC_POINTS_SGIS 0x812B -#define GL_FOG_FUNC_SGIS 0x812A -#define GL_FOG_OFFSET_SGIX 0x8198 -#define GL_FOG_OFFSET_VALUE_SGIX 0x8199 -#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC -#define GL_FONT_ASCENDER_BIT_NV 0x00200000 -#define GL_FONT_DESCENDER_BIT_NV 0x00400000 -#define GL_FONT_GLYPHS_AVAILABLE_NV 0x9368 -#define GL_FONT_HAS_KERNING_BIT_NV 0x10000000 -#define GL_FONT_HEIGHT_BIT_NV 0x00800000 -#define GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV 0x02000000 -#define GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV 0x01000000 -#define GL_FONT_NUM_GLYPH_INDICES_BIT_NV 0x20000000 -#define GL_FONT_TARGET_UNAVAILABLE_NV 0x9369 -#define GL_FONT_UNAVAILABLE_NV 0x936A -#define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000 -#define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000 -#define GL_FONT_UNINTELLIGIBLE_NV 0x936B -#define GL_FONT_UNITS_PER_EM_BIT_NV 0x00100000 -#define GL_FONT_X_MAX_BOUNDS_BIT_NV 0x00040000 -#define GL_FONT_X_MIN_BOUNDS_BIT_NV 0x00010000 -#define GL_FONT_Y_MAX_BOUNDS_BIT_NV 0x00080000 -#define GL_FONT_Y_MIN_BOUNDS_BIT_NV 0x00020000 -#define GL_FORCE_BLUE_TO_ONE_NV 0x8860 -#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983 -#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982 -#define GL_FRACTIONAL_EVEN 0x8E7C -#define GL_FRACTIONAL_ODD 0x8E7B -#define GL_FRAGMENT_COLOR_EXT 0x834C -#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402 -#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403 -#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401 -#define GL_FRAGMENT_COVERAGE_COLOR_NV 0x92DE -#define GL_FRAGMENT_COVERAGE_TO_COLOR_NV 0x92DD -#define GL_FRAGMENT_DEPTH_EXT 0x8452 -#define GL_FRAGMENT_INPUT_NV 0x936D -#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D -#define GL_FRAGMENT_LIGHT0_SGIX 0x840C -#define GL_FRAGMENT_LIGHT1_SGIX 0x840D -#define GL_FRAGMENT_LIGHT2_SGIX 0x840E -#define GL_FRAGMENT_LIGHT3_SGIX 0x840F -#define GL_FRAGMENT_LIGHT4_SGIX 0x8410 -#define GL_FRAGMENT_LIGHT5_SGIX 0x8411 -#define GL_FRAGMENT_LIGHT6_SGIX 0x8412 -#define GL_FRAGMENT_LIGHT7_SGIX 0x8413 -#define GL_FRAGMENT_LIGHTING_SGIX 0x8400 -#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A -#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408 -#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B -#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409 -#define GL_FRAGMENT_MATERIAL_EXT 0x8349 -#define GL_FRAGMENT_NORMAL_EXT 0x834A -#define GL_FRAGMENT_PROGRAM_ARB 0x8804 -#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873 -#define GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV 0x8E5D -#define GL_FRAGMENT_PROGRAM_NV 0x8870 -#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4 -#define GL_FRAGMENT_SHADER 0x8B30 -#define GL_FRAGMENT_SHADER_ARB 0x8B30 -#define GL_FRAGMENT_SHADER_ATI 0x8920 -#define GL_FRAGMENT_SHADER_BIT 0x00000002 -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B -#define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT 0x8A52 -#define GL_FRAGMENT_SHADER_INVOCATIONS 0x82F4 -#define GL_FRAGMENT_SHADER_INVOCATIONS_ARB 0x82F4 -#define GL_FRAGMENT_SUBROUTINE 0x92EC -#define GL_FRAGMENT_SUBROUTINE_UNIFORM 0x92F2 -#define GL_FRAGMENT_TEXTURE 0x829F -#define GL_FRAMEBUFFER 0x8D40 -#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 -#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 -#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 -#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 -#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 -#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 -#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7 -#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7 -#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 -#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR 0x9632 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR 0x9630 -#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400 -#define GL_FRAMEBUFFER_BARRIER_BIT_EXT 0x00000400 -#define GL_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6 -#define GL_FRAMEBUFFER_BLEND 0x828B -#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 -#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5 -#define GL_FRAMEBUFFER_DEFAULT 0x8218 -#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314 -#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311 -#define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312 -#define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313 -#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310 -#define GL_FRAMEBUFFER_EXT 0x8D40 -#define GL_FRAMEBUFFER_FLIP_X_MESA 0x8BBC -#define GL_FRAMEBUFFER_FLIP_Y_MESA 0x8BBB -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9 -#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB -#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB -#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56 -#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC -#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC -#define GL_FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR 0x9633 -#define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_ARB 0x9342 -#define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV 0x9342 -#define GL_FRAMEBUFFER_RENDERABLE 0x8289 -#define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A -#define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_ARB 0x9343 -#define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV 0x9343 -#define GL_FRAMEBUFFER_SRGB 0x8DB9 -#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA -#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9 -#define GL_FRAMEBUFFER_SWAP_XY_MESA 0x8BBD -#define GL_FRAMEBUFFER_UNDEFINED 0x8219 -#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD -#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD -#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C -#define GL_FRAMEZOOM_SGIX 0x818B -#define GL_FRAME_NV 0x8E26 -#define GL_FRONT 0x0404 -#define GL_FRONT_AND_BACK 0x0408 -#define GL_FRONT_FACE 0x0B46 -#define GL_FRONT_FACE_COMMAND_NV 0x0012 -#define GL_FRONT_LEFT 0x0400 -#define GL_FRONT_RIGHT 0x0401 -#define GL_FULL_RANGE_EXT 0x87E1 -#define GL_FULL_STIPPLE_HINT_PGI 0x1A219 -#define GL_FULL_SUPPORT 0x82B7 -#define GL_FUNC_ADD 0x8006 -#define GL_FUNC_ADD_EXT 0x8006 -#define GL_FUNC_REVERSE_SUBTRACT 0x800B -#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B -#define GL_FUNC_SUBTRACT 0x800A -#define GL_FUNC_SUBTRACT_EXT 0x800A -#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192 -#define GL_GENERATE_MIPMAP_SGIS 0x8191 -#define GL_GENERIC_ATTRIB_NV 0x8C7D -#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002 -#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194 -#define GL_GEOMETRY_INPUT_TYPE 0x8917 -#define GL_GEOMETRY_INPUT_TYPE_ARB 0x8DDB -#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB -#define GL_GEOMETRY_OUTPUT_TYPE 0x8918 -#define GL_GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC -#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC -#define GL_GEOMETRY_PROGRAM_NV 0x8C26 -#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3 -#define GL_GEOMETRY_SHADER 0x8DD9 -#define GL_GEOMETRY_SHADER_ARB 0x8DD9 -#define GL_GEOMETRY_SHADER_BIT 0x00000004 -#define GL_GEOMETRY_SHADER_EXT 0x8DD9 -#define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F -#define GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED 0x82F3 -#define GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB 0x82F3 -#define GL_GEOMETRY_SUBROUTINE 0x92EB -#define GL_GEOMETRY_SUBROUTINE_UNIFORM 0x92F1 -#define GL_GEOMETRY_TEXTURE 0x829E -#define GL_GEOMETRY_VERTICES_OUT 0x8916 -#define GL_GEOMETRY_VERTICES_OUT_ARB 0x8DDA -#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA -#define GL_GEQUAL 0x0206 -#define GL_GET_TEXTURE_IMAGE_FORMAT 0x8291 -#define GL_GET_TEXTURE_IMAGE_TYPE 0x8292 -#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA -#define GL_GLOBAL_ALPHA_SUN 0x81D9 -#define GL_GLYPH_HAS_KERNING_BIT_NV 0x100 -#define GL_GLYPH_HEIGHT_BIT_NV 0x02 -#define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10 -#define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04 -#define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08 -#define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80 -#define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20 -#define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40 -#define GL_GLYPH_WIDTH_BIT_NV 0x01 -#define GL_GPU_ADDRESS_NV 0x8F34 -#define GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX 0x9049 -#define GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX 0x9047 -#define GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B -#define GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX 0x904A -#define GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX 0x9048 -#define GL_GREATER 0x0204 -#define GL_GREEN 0x1904 -#define GL_GREEN_BIT_ATI 0x00000002 -#define GL_GREEN_INTEGER 0x8D95 -#define GL_GREEN_INTEGER_EXT 0x8D95 -#define GL_GREEN_MAX_CLAMP_INGR 0x8565 -#define GL_GREEN_MIN_CLAMP_INGR 0x8561 -#define GL_GREEN_NV 0x1904 -#define GL_GUILTY_CONTEXT_RESET 0x8253 -#define GL_GUILTY_CONTEXT_RESET_ARB 0x8253 -#define GL_HALF_APPLE 0x140B -#define GL_HALF_BIAS_NEGATE_NV 0x853B -#define GL_HALF_BIAS_NORMAL_NV 0x853A -#define GL_HALF_BIT_ATI 0x00000008 -#define GL_HALF_FLOAT 0x140B -#define GL_HALF_FLOAT_ARB 0x140B -#define GL_HALF_FLOAT_NV 0x140B -#define GL_HANDLE_TYPE_D3D11_IMAGE_EXT 0x958B -#define GL_HANDLE_TYPE_D3D11_IMAGE_KMT_EXT 0x958C -#define GL_HANDLE_TYPE_D3D12_FENCE_EXT 0x9594 -#define GL_HANDLE_TYPE_D3D12_RESOURCE_EXT 0x958A -#define GL_HANDLE_TYPE_D3D12_TILEPOOL_EXT 0x9589 -#define GL_HANDLE_TYPE_OPAQUE_FD_EXT 0x9586 -#define GL_HANDLE_TYPE_OPAQUE_WIN32_EXT 0x9587 -#define GL_HANDLE_TYPE_OPAQUE_WIN32_KMT_EXT 0x9588 -#define GL_HARDLIGHT_KHR 0x929B -#define GL_HARDLIGHT_NV 0x929B -#define GL_HARDMIX_NV 0x92A9 -#define GL_HIGH_FLOAT 0x8DF2 -#define GL_HIGH_INT 0x8DF5 -#define GL_HILO16_NV 0x86F8 -#define GL_HILO8_NV 0x885E -#define GL_HILO_NV 0x86F4 -#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B -#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A -#define GL_HISTOGRAM_EXT 0x8024 -#define GL_HISTOGRAM_FORMAT_EXT 0x8027 -#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029 -#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C -#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028 -#define GL_HISTOGRAM_SINK_EXT 0x802D -#define GL_HISTOGRAM_WIDTH_EXT 0x8026 -#define GL_HI_BIAS_NV 0x8714 -#define GL_HI_SCALE_NV 0x870E -#define GL_HORIZONTAL_LINE_TO_NV 0x06 -#define GL_HSL_COLOR_KHR 0x92AF -#define GL_HSL_COLOR_NV 0x92AF -#define GL_HSL_HUE_KHR 0x92AD -#define GL_HSL_HUE_NV 0x92AD -#define GL_HSL_LUMINOSITY_KHR 0x92B0 -#define GL_HSL_LUMINOSITY_NV 0x92B0 -#define GL_HSL_SATURATION_KHR 0x92AE -#define GL_HSL_SATURATION_NV 0x92AE -#define GL_IDENTITY_NV 0x862A -#define GL_IGNORE_BORDER_HP 0x8150 -#define GL_IMAGE_1D 0x904C -#define GL_IMAGE_1D_ARRAY 0x9052 -#define GL_IMAGE_1D_ARRAY_EXT 0x9052 -#define GL_IMAGE_1D_EXT 0x904C -#define GL_IMAGE_2D 0x904D -#define GL_IMAGE_2D_ARRAY 0x9053 -#define GL_IMAGE_2D_ARRAY_EXT 0x9053 -#define GL_IMAGE_2D_EXT 0x904D -#define GL_IMAGE_2D_MULTISAMPLE 0x9055 -#define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056 -#define GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9056 -#define GL_IMAGE_2D_MULTISAMPLE_EXT 0x9055 -#define GL_IMAGE_2D_RECT 0x904F -#define GL_IMAGE_2D_RECT_EXT 0x904F -#define GL_IMAGE_3D 0x904E -#define GL_IMAGE_3D_EXT 0x904E -#define GL_IMAGE_BINDING_ACCESS 0x8F3E -#define GL_IMAGE_BINDING_ACCESS_EXT 0x8F3E -#define GL_IMAGE_BINDING_FORMAT 0x906E -#define GL_IMAGE_BINDING_FORMAT_EXT 0x906E -#define GL_IMAGE_BINDING_LAYER 0x8F3D -#define GL_IMAGE_BINDING_LAYERED 0x8F3C -#define GL_IMAGE_BINDING_LAYERED_EXT 0x8F3C -#define GL_IMAGE_BINDING_LAYER_EXT 0x8F3D -#define GL_IMAGE_BINDING_LEVEL 0x8F3B -#define GL_IMAGE_BINDING_LEVEL_EXT 0x8F3B -#define GL_IMAGE_BINDING_NAME 0x8F3A -#define GL_IMAGE_BINDING_NAME_EXT 0x8F3A -#define GL_IMAGE_BUFFER 0x9051 -#define GL_IMAGE_BUFFER_EXT 0x9051 -#define GL_IMAGE_CLASS_10_10_10_2 0x82C3 -#define GL_IMAGE_CLASS_11_11_10 0x82C2 -#define GL_IMAGE_CLASS_1_X_16 0x82BE -#define GL_IMAGE_CLASS_1_X_32 0x82BB -#define GL_IMAGE_CLASS_1_X_8 0x82C1 -#define GL_IMAGE_CLASS_2_X_16 0x82BD -#define GL_IMAGE_CLASS_2_X_32 0x82BA -#define GL_IMAGE_CLASS_2_X_8 0x82C0 -#define GL_IMAGE_CLASS_4_X_16 0x82BC -#define GL_IMAGE_CLASS_4_X_32 0x82B9 -#define GL_IMAGE_CLASS_4_X_8 0x82BF -#define GL_IMAGE_COMPATIBILITY_CLASS 0x82A8 -#define GL_IMAGE_CUBE 0x9050 -#define GL_IMAGE_CUBE_EXT 0x9050 -#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054 -#define GL_IMAGE_CUBE_MAP_ARRAY_EXT 0x9054 -#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E -#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9 -#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8 -#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7 -#define GL_IMAGE_MAG_FILTER_HP 0x815C -#define GL_IMAGE_MIN_FILTER_HP 0x815D -#define GL_IMAGE_PIXEL_FORMAT 0x82A9 -#define GL_IMAGE_PIXEL_TYPE 0x82AA -#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159 -#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A -#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B -#define GL_IMAGE_SCALE_X_HP 0x8155 -#define GL_IMAGE_SCALE_Y_HP 0x8156 -#define GL_IMAGE_TEXEL_SIZE 0x82A7 -#define GL_IMAGE_TRANSFORM_2D_HP 0x8161 -#define GL_IMAGE_TRANSLATE_X_HP 0x8157 -#define GL_IMAGE_TRANSLATE_Y_HP 0x8158 -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B -#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A -#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A -#define GL_INCLUSIVE_EXT 0x8F10 -#define GL_INCR 0x1E02 -#define GL_INCR_WRAP 0x8507 -#define GL_INCR_WRAP_EXT 0x8507 -#define GL_INDEX_ARRAY_ADDRESS_NV 0x8F24 -#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899 -#define GL_INDEX_ARRAY_COUNT_EXT 0x8087 -#define GL_INDEX_ARRAY_EXT 0x8077 -#define GL_INDEX_ARRAY_LENGTH_NV 0x8F2E -#define GL_INDEX_ARRAY_LIST_IBM 103073 -#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083 -#define GL_INDEX_ARRAY_POINTER_EXT 0x8091 -#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086 -#define GL_INDEX_ARRAY_TYPE_EXT 0x8085 -#define GL_INDEX_BIT_PGI 0x00080000 -#define GL_INDEX_MATERIAL_EXT 0x81B8 -#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA -#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9 -#define GL_INDEX_TEST_EXT 0x81B5 -#define GL_INDEX_TEST_FUNC_EXT 0x81B6 -#define GL_INDEX_TEST_REF_EXT 0x81B7 -#define GL_INFO_LOG_LENGTH 0x8B84 -#define GL_INNOCENT_CONTEXT_RESET 0x8254 -#define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254 -#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180 -#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181 -#define GL_INT 0x1404 -#define GL_INT16_NV 0x8FE4 -#define GL_INT16_VEC2_NV 0x8FE5 -#define GL_INT16_VEC3_NV 0x8FE6 -#define GL_INT16_VEC4_NV 0x8FE7 -#define GL_INT64_ARB 0x140E -#define GL_INT64_NV 0x140E -#define GL_INT64_VEC2_ARB 0x8FE9 -#define GL_INT64_VEC2_NV 0x8FE9 -#define GL_INT64_VEC3_ARB 0x8FEA -#define GL_INT64_VEC3_NV 0x8FEA -#define GL_INT64_VEC4_ARB 0x8FEB -#define GL_INT64_VEC4_NV 0x8FEB -#define GL_INT8_NV 0x8FE0 -#define GL_INT8_VEC2_NV 0x8FE1 -#define GL_INT8_VEC3_NV 0x8FE2 -#define GL_INT8_VEC4_NV 0x8FE3 -#define GL_INTENSITY12_EXT 0x804C -#define GL_INTENSITY16F_ARB 0x881D -#define GL_INTENSITY16I_EXT 0x8D8B -#define GL_INTENSITY16UI_EXT 0x8D79 -#define GL_INTENSITY16_EXT 0x804D -#define GL_INTENSITY16_SNORM 0x901B -#define GL_INTENSITY32F_ARB 0x8817 -#define GL_INTENSITY32I_EXT 0x8D85 -#define GL_INTENSITY32UI_EXT 0x8D73 -#define GL_INTENSITY4_EXT 0x804A -#define GL_INTENSITY8I_EXT 0x8D91 -#define GL_INTENSITY8UI_EXT 0x8D7F -#define GL_INTENSITY8_EXT 0x804B -#define GL_INTENSITY8_SNORM 0x9017 -#define GL_INTENSITY_EXT 0x8049 -#define GL_INTENSITY_FLOAT16_APPLE 0x881D -#define GL_INTENSITY_FLOAT16_ATI 0x881D -#define GL_INTENSITY_FLOAT32_APPLE 0x8817 -#define GL_INTENSITY_FLOAT32_ATI 0x8817 -#define GL_INTENSITY_SNORM 0x9013 -#define GL_INTERLACE_OML 0x8980 -#define GL_INTERLACE_READ_INGR 0x8568 -#define GL_INTERLACE_READ_OML 0x8981 -#define GL_INTERLACE_SGIX 0x8094 -#define GL_INTERLEAVED_ATTRIBS 0x8C8C -#define GL_INTERLEAVED_ATTRIBS_EXT 0x8C8C -#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C -#define GL_INTERNALFORMAT_ALPHA_SIZE 0x8274 -#define GL_INTERNALFORMAT_ALPHA_TYPE 0x827B -#define GL_INTERNALFORMAT_BLUE_SIZE 0x8273 -#define GL_INTERNALFORMAT_BLUE_TYPE 0x827A -#define GL_INTERNALFORMAT_DEPTH_SIZE 0x8275 -#define GL_INTERNALFORMAT_DEPTH_TYPE 0x827C -#define GL_INTERNALFORMAT_GREEN_SIZE 0x8272 -#define GL_INTERNALFORMAT_GREEN_TYPE 0x8279 -#define GL_INTERNALFORMAT_PREFERRED 0x8270 -#define GL_INTERNALFORMAT_RED_SIZE 0x8271 -#define GL_INTERNALFORMAT_RED_TYPE 0x8278 -#define GL_INTERNALFORMAT_SHARED_SIZE 0x8277 -#define GL_INTERNALFORMAT_STENCIL_SIZE 0x8276 -#define GL_INTERNALFORMAT_STENCIL_TYPE 0x827D -#define GL_INTERNALFORMAT_SUPPORTED 0x826F -#define GL_INTERPOLATE_ARB 0x8575 -#define GL_INTERPOLATE_EXT 0x8575 -#define GL_INT_2_10_10_10_REV 0x8D9F -#define GL_INT_IMAGE_1D 0x9057 -#define GL_INT_IMAGE_1D_ARRAY 0x905D -#define GL_INT_IMAGE_1D_ARRAY_EXT 0x905D -#define GL_INT_IMAGE_1D_EXT 0x9057 -#define GL_INT_IMAGE_2D 0x9058 -#define GL_INT_IMAGE_2D_ARRAY 0x905E -#define GL_INT_IMAGE_2D_ARRAY_EXT 0x905E -#define GL_INT_IMAGE_2D_EXT 0x9058 -#define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060 -#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061 -#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9061 -#define GL_INT_IMAGE_2D_MULTISAMPLE_EXT 0x9060 -#define GL_INT_IMAGE_2D_RECT 0x905A -#define GL_INT_IMAGE_2D_RECT_EXT 0x905A -#define GL_INT_IMAGE_3D 0x9059 -#define GL_INT_IMAGE_3D_EXT 0x9059 -#define GL_INT_IMAGE_BUFFER 0x905C -#define GL_INT_IMAGE_BUFFER_EXT 0x905C -#define GL_INT_IMAGE_CUBE 0x905B -#define GL_INT_IMAGE_CUBE_EXT 0x905B -#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F -#define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x905F -#define GL_INT_SAMPLER_1D 0x8DC9 -#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE -#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE -#define GL_INT_SAMPLER_1D_EXT 0x8DC9 -#define GL_INT_SAMPLER_2D 0x8DCA -#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF -#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF -#define GL_INT_SAMPLER_2D_EXT 0x8DCA -#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109 -#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C -#define GL_INT_SAMPLER_2D_RECT 0x8DCD -#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD -#define GL_INT_SAMPLER_3D 0x8DCB -#define GL_INT_SAMPLER_3D_EXT 0x8DCB -#define GL_INT_SAMPLER_BUFFER 0x8DD0 -#define GL_INT_SAMPLER_BUFFER_AMD 0x9002 -#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0 -#define GL_INT_SAMPLER_CUBE 0x8DCC -#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC -#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E -#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E -#define GL_INT_SAMPLER_RENDERBUFFER_NV 0x8E57 -#define GL_INT_VEC2 0x8B53 -#define GL_INT_VEC2_ARB 0x8B53 -#define GL_INT_VEC3 0x8B54 -#define GL_INT_VEC3_ARB 0x8B54 -#define GL_INT_VEC4 0x8B55 -#define GL_INT_VEC4_ARB 0x8B55 -#define GL_INVALID_ENUM 0x0500 -#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 -#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506 -#define GL_INVALID_INDEX 0xFFFFFFFF -#define GL_INVALID_OPERATION 0x0502 -#define GL_INVALID_VALUE 0x0501 -#define GL_INVARIANT_DATATYPE_EXT 0x87EB -#define GL_INVARIANT_EXT 0x87C2 -#define GL_INVARIANT_VALUE_EXT 0x87EA -#define GL_INVERSE_NV 0x862B -#define GL_INVERSE_TRANSPOSE_NV 0x862D -#define GL_INVERT 0x150A -#define GL_INVERTED_SCREEN_W_REND 0x8491 -#define GL_INVERT_OVG_NV 0x92B4 -#define GL_INVERT_RGB_NV 0x92A3 -#define GL_IR_INSTRUMENT1_SGIX 0x817F -#define GL_ISOLINES 0x8E7A -#define GL_IS_PER_PATCH 0x92E7 -#define GL_IS_ROW_MAJOR 0x9300 -#define GL_ITALIC_BIT_NV 0x02 -#define GL_IUI_N3F_V2F_EXT 0x81AF -#define GL_IUI_N3F_V3F_EXT 0x81B0 -#define GL_IUI_V2F_EXT 0x81AD -#define GL_IUI_V3F_EXT 0x81AE -#define GL_KEEP 0x1E00 -#define GL_LARGE_CCW_ARC_TO_NV 0x16 -#define GL_LARGE_CW_ARC_TO_NV 0x18 -#define GL_LAST_VERTEX_CONVENTION 0x8E4E -#define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E -#define GL_LAST_VIDEO_CAPTURE_STATUS_NV 0x9027 -#define GL_LAYER_NV 0x8DAA -#define GL_LAYER_PROVOKING_VERTEX 0x825E -#define GL_LAYOUT_COLOR_ATTACHMENT_EXT 0x958E -#define GL_LAYOUT_DEFAULT_INTEL 0 -#define GL_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_EXT 0x9531 -#define GL_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_EXT 0x9530 -#define GL_LAYOUT_DEPTH_STENCIL_ATTACHMENT_EXT 0x958F -#define GL_LAYOUT_DEPTH_STENCIL_READ_ONLY_EXT 0x9590 -#define GL_LAYOUT_GENERAL_EXT 0x958D -#define GL_LAYOUT_LINEAR_CPU_CACHED_INTEL 2 -#define GL_LAYOUT_LINEAR_INTEL 1 -#define GL_LAYOUT_SHADER_READ_ONLY_EXT 0x9591 -#define GL_LAYOUT_TRANSFER_DST_EXT 0x9593 -#define GL_LAYOUT_TRANSFER_SRC_EXT 0x9592 -#define GL_LEFT 0x0406 -#define GL_LEQUAL 0x0203 -#define GL_LERP_ATI 0x8969 -#define GL_LESS 0x0201 -#define GL_LGPU_SEPARATE_STORAGE_BIT_NVX 0x0800 -#define GL_LIGHTEN_KHR 0x9298 -#define GL_LIGHTEN_NV 0x9298 -#define GL_LIGHT_ENV_MODE_SGIX 0x8407 -#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8 -#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0 -#define GL_LINE 0x1B01 -#define GL_LINEAR 0x2601 -#define GL_LINEARBURN_NV 0x92A5 -#define GL_LINEARDODGE_NV 0x92A4 -#define GL_LINEARLIGHT_NV 0x92A7 -#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170 -#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F -#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098 -#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099 -#define GL_LINEAR_DETAIL_SGIS 0x8097 -#define GL_LINEAR_MIPMAP_LINEAR 0x2703 -#define GL_LINEAR_MIPMAP_NEAREST 0x2701 -#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE -#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF -#define GL_LINEAR_SHARPEN_SGIS 0x80AD -#define GL_LINEAR_TILING_EXT 0x9585 -#define GL_LINES 0x0001 -#define GL_LINES_ADJACENCY 0x000A -#define GL_LINES_ADJACENCY_ARB 0x000A -#define GL_LINES_ADJACENCY_EXT 0x000A -#define GL_LINE_LOOP 0x0002 -#define GL_LINE_SMOOTH 0x0B20 -#define GL_LINE_SMOOTH_HINT 0x0C52 -#define GL_LINE_STRIP 0x0003 -#define GL_LINE_STRIP_ADJACENCY 0x000B -#define GL_LINE_STRIP_ADJACENCY_ARB 0x000B -#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B -#define GL_LINE_TO_NV 0x04 -#define GL_LINE_WIDTH 0x0B21 -#define GL_LINE_WIDTH_COMMAND_NV 0x000D -#define GL_LINE_WIDTH_GRANULARITY 0x0B23 -#define GL_LINE_WIDTH_RANGE 0x0B22 -#define GL_LINK_STATUS 0x8B82 -#define GL_LIST_PRIORITY_SGIX 0x8182 -#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED -#define GL_LOCAL_CONSTANT_EXT 0x87C3 -#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC -#define GL_LOCAL_EXT 0x87C4 -#define GL_LOCATION 0x930E -#define GL_LOCATION_COMPONENT 0x934A -#define GL_LOCATION_INDEX 0x930F -#define GL_LOGIC_OP_MODE 0x0BF0 -#define GL_LOSE_CONTEXT_ON_RESET 0x8252 -#define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 -#define GL_LOWER_LEFT 0x8CA1 -#define GL_LOW_FLOAT 0x8DF0 -#define GL_LOW_INT 0x8DF3 -#define GL_LO_BIAS_NV 0x8715 -#define GL_LO_SCALE_NV 0x870F -#define GL_LUID_SIZE_EXT 8 -#define GL_LUMINANCE12_ALPHA12_EXT 0x8047 -#define GL_LUMINANCE12_ALPHA4_EXT 0x8046 -#define GL_LUMINANCE12_EXT 0x8041 -#define GL_LUMINANCE16F_ARB 0x881E -#define GL_LUMINANCE16F_EXT 0x881E -#define GL_LUMINANCE16I_EXT 0x8D8C -#define GL_LUMINANCE16UI_EXT 0x8D7A -#define GL_LUMINANCE16_ALPHA16_EXT 0x8048 -#define GL_LUMINANCE16_ALPHA16_SNORM 0x901A -#define GL_LUMINANCE16_EXT 0x8042 -#define GL_LUMINANCE16_SNORM 0x9019 -#define GL_LUMINANCE32F_ARB 0x8818 -#define GL_LUMINANCE32F_EXT 0x8818 -#define GL_LUMINANCE32I_EXT 0x8D86 -#define GL_LUMINANCE32UI_EXT 0x8D74 -#define GL_LUMINANCE4_ALPHA4_EXT 0x8043 -#define GL_LUMINANCE4_EXT 0x803F -#define GL_LUMINANCE6_ALPHA2_EXT 0x8044 -#define GL_LUMINANCE8I_EXT 0x8D92 -#define GL_LUMINANCE8UI_EXT 0x8D80 -#define GL_LUMINANCE8_ALPHA8_EXT 0x8045 -#define GL_LUMINANCE8_ALPHA8_SNORM 0x9016 -#define GL_LUMINANCE8_EXT 0x8040 -#define GL_LUMINANCE8_SNORM 0x9015 -#define GL_LUMINANCE_ALPHA16F_ARB 0x881F -#define GL_LUMINANCE_ALPHA16F_EXT 0x881F -#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D -#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B -#define GL_LUMINANCE_ALPHA32F_ARB 0x8819 -#define GL_LUMINANCE_ALPHA32F_EXT 0x8819 -#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87 -#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75 -#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93 -#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81 -#define GL_LUMINANCE_ALPHA_FLOAT16_APPLE 0x881F -#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F -#define GL_LUMINANCE_ALPHA_FLOAT32_APPLE 0x8819 -#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819 -#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D -#define GL_LUMINANCE_ALPHA_SNORM 0x9012 -#define GL_LUMINANCE_FLOAT16_APPLE 0x881E -#define GL_LUMINANCE_FLOAT16_ATI 0x881E -#define GL_LUMINANCE_FLOAT32_APPLE 0x8818 -#define GL_LUMINANCE_FLOAT32_ATI 0x8818 -#define GL_LUMINANCE_INTEGER_EXT 0x8D9C -#define GL_LUMINANCE_SNORM 0x9011 -#define GL_MAD_ATI 0x8968 -#define GL_MAGNITUDE_BIAS_NV 0x8718 -#define GL_MAGNITUDE_SCALE_NV 0x8712 -#define GL_MAJOR_VERSION 0x821B -#define GL_MANUAL_GENERATE_MIPMAP 0x8294 -#define GL_MAP1_BINORMAL_EXT 0x8446 -#define GL_MAP1_TANGENT_EXT 0x8444 -#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660 -#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A -#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B -#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C -#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D -#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E -#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F -#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661 -#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662 -#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663 -#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664 -#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665 -#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666 -#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667 -#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668 -#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669 -#define GL_MAP2_BINORMAL_EXT 0x8447 -#define GL_MAP2_TANGENT_EXT 0x8445 -#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670 -#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A -#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B -#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C -#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D -#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E -#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F -#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671 -#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672 -#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673 -#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674 -#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675 -#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676 -#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677 -#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678 -#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679 -#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3 -#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4 -#define GL_MAP_COHERENT_BIT 0x0080 -#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 -#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 -#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 -#define GL_MAP_PERSISTENT_BIT 0x0040 -#define GL_MAP_READ_BIT 0x0001 -#define GL_MAP_TESSELLATION_NV 0x86C2 -#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 -#define GL_MAP_WRITE_BIT 0x0002 -#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C -#define GL_MATRIX0_ARB 0x88C0 -#define GL_MATRIX0_NV 0x8630 -#define GL_MATRIX10_ARB 0x88CA -#define GL_MATRIX11_ARB 0x88CB -#define GL_MATRIX12_ARB 0x88CC -#define GL_MATRIX13_ARB 0x88CD -#define GL_MATRIX14_ARB 0x88CE -#define GL_MATRIX15_ARB 0x88CF -#define GL_MATRIX16_ARB 0x88D0 -#define GL_MATRIX17_ARB 0x88D1 -#define GL_MATRIX18_ARB 0x88D2 -#define GL_MATRIX19_ARB 0x88D3 -#define GL_MATRIX1_ARB 0x88C1 -#define GL_MATRIX1_NV 0x8631 -#define GL_MATRIX20_ARB 0x88D4 -#define GL_MATRIX21_ARB 0x88D5 -#define GL_MATRIX22_ARB 0x88D6 -#define GL_MATRIX23_ARB 0x88D7 -#define GL_MATRIX24_ARB 0x88D8 -#define GL_MATRIX25_ARB 0x88D9 -#define GL_MATRIX26_ARB 0x88DA -#define GL_MATRIX27_ARB 0x88DB -#define GL_MATRIX28_ARB 0x88DC -#define GL_MATRIX29_ARB 0x88DD -#define GL_MATRIX2_ARB 0x88C2 -#define GL_MATRIX2_NV 0x8632 -#define GL_MATRIX30_ARB 0x88DE -#define GL_MATRIX31_ARB 0x88DF -#define GL_MATRIX3_ARB 0x88C3 -#define GL_MATRIX3_NV 0x8633 -#define GL_MATRIX4_ARB 0x88C4 -#define GL_MATRIX4_NV 0x8634 -#define GL_MATRIX5_ARB 0x88C5 -#define GL_MATRIX5_NV 0x8635 -#define GL_MATRIX6_ARB 0x88C6 -#define GL_MATRIX6_NV 0x8636 -#define GL_MATRIX7_ARB 0x88C7 -#define GL_MATRIX7_NV 0x8637 -#define GL_MATRIX8_ARB 0x88C8 -#define GL_MATRIX9_ARB 0x88C9 -#define GL_MATRIX_EXT 0x87C0 -#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844 -#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849 -#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846 -#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848 -#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847 -#define GL_MATRIX_PALETTE_ARB 0x8840 -#define GL_MATRIX_STRIDE 0x92FF -#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000 -#define GL_MAT_AMBIENT_BIT_PGI 0x00100000 -#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000 -#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000 -#define GL_MAT_EMISSION_BIT_PGI 0x00800000 -#define GL_MAT_SHININESS_BIT_PGI 0x02000000 -#define GL_MAT_SPECULAR_BIT_PGI 0x04000000 -#define GL_MAX 0x8008 -#define GL_MAX_3D_TEXTURE_SIZE 0x8073 -#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073 -#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138 -#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405 -#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF -#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF -#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360 -#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D -#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361 -#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F -#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC -#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8 -#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED -#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177 -#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178 -#define GL_MAX_CLIP_DISTANCES 0x0D32 -#define GL_MAX_COARSE_FRAGMENT_SAMPLES_NV 0x955F -#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF -#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF -#define GL_MAX_COLOR_FRAMEBUFFER_SAMPLES_AMD 0x91B3 -#define GL_MAX_COLOR_FRAMEBUFFER_STORAGE_SAMPLES_AMD 0x91B4 -#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3 -#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E -#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7 -#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1 -#define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES 0x82FA -#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266 -#define GL_MAX_COMBINED_DIMENSIONS 0x8282 -#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 -#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32 -#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF -#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39 -#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT 0x8F39 -#define GL_MAX_COMBINED_MESH_UNIFORM_COMPONENTS_NV 0x8E67 -#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39 -#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC -#define GL_MAX_COMBINED_TASK_UNIFORM_COMPONENTS_NV 0x8E6F -#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E -#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D -#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E -#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 -#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265 -#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264 -#define GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB 0x90EB -#define GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB 0x91BF -#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD -#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB -#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262 -#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC -#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB -#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263 -#define GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB 0x9344 -#define GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB 0x9345 -#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE -#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB -#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF -#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B -#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C -#define GL_MAX_CULL_DISTANCES 0x82F9 -#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C -#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144 -#define GL_MAX_DEBUG_LOGGED_MESSAGES_AMD 0x9144 -#define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144 -#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143 -#define GL_MAX_DEBUG_MESSAGE_LENGTH_AMD 0x9143 -#define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143 -#define GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV 0x90D1 -#define GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV 0x90D0 -#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197 -#define GL_MAX_DEPTH 0x8280 -#define GL_MAX_DEPTH_STENCIL_FRAMEBUFFER_SAMPLES_AMD 0x91B5 -#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F -#define GL_MAX_DETACHED_BUFFERS_NV 0x95AD -#define GL_MAX_DETACHED_TEXTURES_NV 0x95AC -#define GL_MAX_DRAW_BUFFERS 0x8824 -#define GL_MAX_DRAW_BUFFERS_ARB 0x8824 -#define GL_MAX_DRAW_BUFFERS_ATI 0x8824 -#define GL_MAX_DRAW_MESH_TASKS_COUNT_NV 0x953D -#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC -#define GL_MAX_ELEMENTS_INDICES 0x80E9 -#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9 -#define GL_MAX_ELEMENTS_VERTICES 0x80E8 -#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8 -#define GL_MAX_ELEMENT_INDEX 0x8D6B -#define GL_MAX_EXT 0x8008 -#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C -#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6 -#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0 -#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3 -#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE -#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 -#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C -#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5C -#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404 -#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868 -#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA -#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D -#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 -#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49 -#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD -#define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316 -#define GL_MAX_FRAMEBUFFER_LAYERS 0x9317 -#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318 -#define GL_MAX_FRAMEBUFFER_WIDTH 0x9315 -#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D -#define GL_MAX_GENERAL_COMBINERS_NV 0x854D -#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5 -#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF -#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4 -#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD -#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123 -#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124 -#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0 -#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0 -#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0 -#define GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV 0x8E5A -#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A -#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7 -#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29 -#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29 -#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29 -#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1 -#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1 -#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1 -#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C -#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF -#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF -#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF -#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD -#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD -#define GL_MAX_HEIGHT 0x827F -#define GL_MAX_IMAGE_SAMPLES 0x906D -#define GL_MAX_IMAGE_SAMPLES_EXT 0x906D -#define GL_MAX_IMAGE_UNITS 0x8F38 -#define GL_MAX_IMAGE_UNITS_EXT 0x8F38 -#define GL_MAX_INTEGER_SAMPLES 0x9110 -#define GL_MAX_LABEL_LENGTH 0x82E8 -#define GL_MAX_LAYERS 0x8281 -#define GL_MAX_LGPU_GPUS_NVX 0x92BA -#define GL_MAX_MAP_TESSELLATION_NV 0x86D6 -#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841 -#define GL_MAX_MESH_ATOMIC_COUNTERS_NV 0x8E65 -#define GL_MAX_MESH_ATOMIC_COUNTER_BUFFERS_NV 0x8E64 -#define GL_MAX_MESH_IMAGE_UNIFORMS_NV 0x8E62 -#define GL_MAX_MESH_OUTPUT_PRIMITIVES_NV 0x9539 -#define GL_MAX_MESH_OUTPUT_VERTICES_NV 0x9538 -#define GL_MAX_MESH_SHADER_STORAGE_BLOCKS_NV 0x8E66 -#define GL_MAX_MESH_TEXTURE_IMAGE_UNITS_NV 0x8E61 -#define GL_MAX_MESH_TOTAL_MEMORY_SIZE_NV 0x9536 -#define GL_MAX_MESH_UNIFORM_BLOCKS_NV 0x8E60 -#define GL_MAX_MESH_UNIFORM_COMPONENTS_NV 0x8E63 -#define GL_MAX_MESH_VIEWS_NV 0x9557 -#define GL_MAX_MESH_WORK_GROUP_INVOCATIONS_NV 0x95A2 -#define GL_MAX_MESH_WORK_GROUP_SIZE_NV 0x953B -#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11 -#define GL_MAX_NAME_LENGTH 0x92F6 -#define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7 -#define GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8 -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB -#define GL_MAX_PALETTE_MATRICES_ARB 0x8842 -#define GL_MAX_PATCH_VERTICES 0x8E7D -#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337 -#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1 -#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1 -#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B -#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD -#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908 -#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5 -#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5 -#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4 -#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5 -#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6 -#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6 -#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1 -#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4 -#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8 -#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7 -#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F -#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E -#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3 -#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E -#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF -#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3 -#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB -#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7 -#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810 -#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F -#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27 -#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9 -#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0 -#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1 -#define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV 0x86D8 -#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909 -#define GL_MAX_PROGRAM_SUBROUTINE_NUM_NV 0x8F45 -#define GL_MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV 0x8F44 -#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5 -#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 -#define GL_MAX_PROGRAM_TEXEL_OFFSET_EXT 0x8905 -#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905 -#define GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB 0x8F9F -#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F -#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F -#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5F -#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D -#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C -#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28 -#define GL_MAX_RASTER_SAMPLES_EXT 0x9329 -#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7 -#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8 -#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8 -#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8 -#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 -#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8 -#define GL_MAX_SAMPLES 0x8D57 -#define GL_MAX_SAMPLES_EXT 0x8D57 -#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59 -#define GL_MAX_SAMPLE_MASK_WORDS_NV 0x8E59 -#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 -#define GL_MAX_SHADER_BUFFER_ADDRESS_NV 0x8F35 -#define GL_MAX_SHADER_COMPILER_THREADS_ARB 0x91B0 -#define GL_MAX_SHADER_COMPILER_THREADS_KHR 0x91B0 -#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE -#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD -#define GL_MAX_SHININESS_NV 0x8504 -#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD 0x9199 -#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB 0x9199 -#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS 0x919A -#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB 0x919A -#define GL_MAX_SPARSE_TEXTURE_SIZE_AMD 0x9198 -#define GL_MAX_SPARSE_TEXTURE_SIZE_ARB 0x9198 -#define GL_MAX_SPOT_EXPONENT_NV 0x8505 -#define GL_MAX_SUBPIXEL_PRECISION_BIAS_BITS_NV 0x9349 -#define GL_MAX_SUBROUTINES 0x8DE7 -#define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8 -#define GL_MAX_TASK_ATOMIC_COUNTERS_NV 0x8E6D -#define GL_MAX_TASK_ATOMIC_COUNTER_BUFFERS_NV 0x8E6C -#define GL_MAX_TASK_IMAGE_UNIFORMS_NV 0x8E6A -#define GL_MAX_TASK_OUTPUT_COUNT_NV 0x953A -#define GL_MAX_TASK_SHADER_STORAGE_BLOCKS_NV 0x8E6E -#define GL_MAX_TASK_TEXTURE_IMAGE_UNITS_NV 0x8E69 -#define GL_MAX_TASK_TOTAL_MEMORY_SIZE_NV 0x9537 -#define GL_MAX_TASK_UNIFORM_BLOCKS_NV 0x8E68 -#define GL_MAX_TASK_UNIFORM_COMPONENTS_NV 0x8E6B -#define GL_MAX_TASK_WORK_GROUP_INVOCATIONS_NV 0x95A3 -#define GL_MAX_TASK_WORK_GROUP_SIZE_NV 0x953C -#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3 -#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD -#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB -#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C -#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83 -#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8 -#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81 -#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85 -#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89 -#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F -#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4 -#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE -#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC -#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D -#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86 -#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9 -#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82 -#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A -#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80 -#define GL_MAX_TESS_GEN_LEVEL 0x8E7E -#define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84 -#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B -#define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B -#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B -#define GL_MAX_TEXTURE_COORDS_ARB 0x8871 -#define GL_MAX_TEXTURE_COORDS_NV 0x8871 -#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 -#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872 -#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872 -#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD -#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD -#define GL_MAX_TEXTURE_MAX_ANISOTROPY 0x84FF -#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF -#define GL_MAX_TEXTURE_SIZE 0x0D33 -#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 -#define GL_MAX_TIMELINE_SEMAPHORE_VALUE_DIFFERENCE_NV 0x95B6 -#define GL_MAX_TRACK_MATRICES_NV 0x862F -#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E -#define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70 -#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A -#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A -#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV 0x8C8A -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80 -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80 -#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 -#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F -#define GL_MAX_UNIFORM_LOCATIONS 0x826E -#define GL_MAX_VARYING_COMPONENTS 0x8B4B -#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B -#define GL_MAX_VARYING_FLOATS 0x8B4B -#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B -#define GL_MAX_VARYING_VECTORS 0x8DFC -#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520 -#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2 -#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC -#define GL_MAX_VERTEX_ATTRIBS 0x8869 -#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869 -#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA -#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9 -#define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5 -#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2 -#define GL_MAX_VERTEX_HINT_PGI 0x1A22D -#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA -#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 -#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5 -#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7 -#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9 -#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8 -#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6 -#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6 -#define GL_MAX_VERTEX_STREAMS 0x8E71 -#define GL_MAX_VERTEX_STREAMS_ATI 0x876B -#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C -#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C -#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B -#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A -#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A -#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB -#define GL_MAX_VERTEX_UNITS_ARB 0x86A4 -#define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE -#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE -#define GL_MAX_VIEWPORTS 0x825B -#define GL_MAX_VIEWPORT_DIMS 0x0D3A -#define GL_MAX_VIEWS_OVR 0x9631 -#define GL_MAX_WIDTH 0x827E -#define GL_MAX_WINDOW_RECTANGLES_EXT 0x8F14 -#define GL_MEDIUM_FLOAT 0x8DF1 -#define GL_MEDIUM_INT 0x8DF4 -#define GL_MEMORY_ATTACHABLE_ALIGNMENT_NV 0x95A6 -#define GL_MEMORY_ATTACHABLE_NV 0x95A8 -#define GL_MEMORY_ATTACHABLE_SIZE_NV 0x95A7 -#define GL_MESH_OUTPUT_PER_PRIMITIVE_GRANULARITY_NV 0x9543 -#define GL_MESH_OUTPUT_PER_VERTEX_GRANULARITY_NV 0x92DF -#define GL_MESH_OUTPUT_TYPE_NV 0x957B -#define GL_MESH_PRIMITIVES_OUT_NV 0x957A -#define GL_MESH_SHADER_BIT_NV 0x00000040 -#define GL_MESH_SHADER_NV 0x9559 -#define GL_MESH_SUBROUTINE_NV 0x957C -#define GL_MESH_SUBROUTINE_UNIFORM_NV 0x957E -#define GL_MESH_VERTICES_OUT_NV 0x9579 -#define GL_MESH_WORK_GROUP_SIZE_NV 0x953E -#define GL_MIN 0x8007 -#define GL_MINMAX_EXT 0x802E -#define GL_MINMAX_FORMAT_EXT 0x802F -#define GL_MINMAX_SINK_EXT 0x8030 -#define GL_MINOR_VERSION 0x821C -#define GL_MINUS_CLAMPED_NV 0x92B3 -#define GL_MINUS_NV 0x929F -#define GL_MIN_EXT 0x8007 -#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B -#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5B -#define GL_MIN_LOD_WARNING_AMD 0x919C -#define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC -#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 -#define GL_MIN_PROGRAM_TEXEL_OFFSET_EXT 0x8904 -#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904 -#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E -#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E -#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5E -#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37 -#define GL_MIN_SAMPLE_SHADING_VALUE_ARB 0x8C37 -#define GL_MIN_SPARSE_LEVEL_AMD 0x919B -#define GL_MIPMAP 0x8293 -#define GL_MIRRORED_REPEAT 0x8370 -#define GL_MIRRORED_REPEAT_ARB 0x8370 -#define GL_MIRRORED_REPEAT_IBM 0x8370 -#define GL_MIRROR_CLAMP_ATI 0x8742 -#define GL_MIRROR_CLAMP_EXT 0x8742 -#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912 -#define GL_MIRROR_CLAMP_TO_EDGE 0x8743 -#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743 -#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743 -#define GL_MITER_REVERT_NV 0x90A7 -#define GL_MITER_TRUNCATE_NV 0x90A8 -#define GL_MIXED_DEPTH_SAMPLES_SUPPORTED_NV 0x932F -#define GL_MIXED_STENCIL_SAMPLES_SUPPORTED_NV 0x9330 -#define GL_MODELVIEW0_ARB 0x1700 -#define GL_MODELVIEW0_EXT 0x1700 -#define GL_MODELVIEW0_MATRIX_EXT 0x0BA6 -#define GL_MODELVIEW0_STACK_DEPTH_EXT 0x0BA3 -#define GL_MODELVIEW10_ARB 0x872A -#define GL_MODELVIEW11_ARB 0x872B -#define GL_MODELVIEW12_ARB 0x872C -#define GL_MODELVIEW13_ARB 0x872D -#define GL_MODELVIEW14_ARB 0x872E -#define GL_MODELVIEW15_ARB 0x872F -#define GL_MODELVIEW16_ARB 0x8730 -#define GL_MODELVIEW17_ARB 0x8731 -#define GL_MODELVIEW18_ARB 0x8732 -#define GL_MODELVIEW19_ARB 0x8733 -#define GL_MODELVIEW1_ARB 0x850A -#define GL_MODELVIEW1_EXT 0x850A -#define GL_MODELVIEW1_MATRIX_EXT 0x8506 -#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502 -#define GL_MODELVIEW20_ARB 0x8734 -#define GL_MODELVIEW21_ARB 0x8735 -#define GL_MODELVIEW22_ARB 0x8736 -#define GL_MODELVIEW23_ARB 0x8737 -#define GL_MODELVIEW24_ARB 0x8738 -#define GL_MODELVIEW25_ARB 0x8739 -#define GL_MODELVIEW26_ARB 0x873A -#define GL_MODELVIEW27_ARB 0x873B -#define GL_MODELVIEW28_ARB 0x873C -#define GL_MODELVIEW29_ARB 0x873D -#define GL_MODELVIEW2_ARB 0x8722 -#define GL_MODELVIEW30_ARB 0x873E -#define GL_MODELVIEW31_ARB 0x873F -#define GL_MODELVIEW3_ARB 0x8723 -#define GL_MODELVIEW4_ARB 0x8724 -#define GL_MODELVIEW5_ARB 0x8725 -#define GL_MODELVIEW6_ARB 0x8726 -#define GL_MODELVIEW7_ARB 0x8727 -#define GL_MODELVIEW8_ARB 0x8728 -#define GL_MODELVIEW9_ARB 0x8729 -#define GL_MODELVIEW_PROJECTION_NV 0x8629 -#define GL_MODULATE_ADD_ATI 0x8744 -#define GL_MODULATE_SIGNED_ADD_ATI 0x8745 -#define GL_MODULATE_SUBTRACT_ATI 0x8746 -#define GL_MOVE_TO_CONTINUES_NV 0x90B6 -#define GL_MOVE_TO_NV 0x02 -#define GL_MOVE_TO_RESETS_NV 0x90B5 -#define GL_MOV_ATI 0x8961 -#define GL_MULTICAST_GPUS_NV 0x92BA -#define GL_MULTICAST_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9549 -#define GL_MULTIPLY_KHR 0x9294 -#define GL_MULTIPLY_NV 0x9294 -#define GL_MULTISAMPLE 0x809D -#define GL_MULTISAMPLES_NV 0x9371 -#define GL_MULTISAMPLE_3DFX 0x86B2 -#define GL_MULTISAMPLE_ARB 0x809D -#define GL_MULTISAMPLE_BIT_3DFX 0x20000000 -#define GL_MULTISAMPLE_BIT_ARB 0x20000000 -#define GL_MULTISAMPLE_BIT_EXT 0x20000000 -#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12 -#define GL_MULTISAMPLE_EXT 0x809D -#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534 -#define GL_MULTISAMPLE_LINE_WIDTH_GRANULARITY_ARB 0x9382 -#define GL_MULTISAMPLE_LINE_WIDTH_RANGE_ARB 0x9381 -#define GL_MULTISAMPLE_RASTERIZATION_ALLOWED_EXT 0x932B -#define GL_MULTISAMPLE_SGIS 0x809D -#define GL_MUL_ATI 0x8964 -#define GL_MVP_MATRIX_EXT 0x87E3 -#define GL_NAMED_STRING_LENGTH_ARB 0x8DE9 -#define GL_NAMED_STRING_TYPE_ARB 0x8DEA -#define GL_NAME_LENGTH 0x92F9 -#define GL_NAND 0x150E -#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203 -#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204 -#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202 -#define GL_NEAREST 0x2600 -#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E -#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D -#define GL_NEAREST_MIPMAP_LINEAR 0x2702 -#define GL_NEAREST_MIPMAP_NEAREST 0x2700 -#define GL_NEGATE_BIT_ATI 0x00000004 -#define GL_NEGATIVE_ONE_EXT 0x87DF -#define GL_NEGATIVE_ONE_TO_ONE 0x935E -#define GL_NEGATIVE_W_EXT 0x87DC -#define GL_NEGATIVE_X_EXT 0x87D9 -#define GL_NEGATIVE_Y_EXT 0x87DA -#define GL_NEGATIVE_Z_EXT 0x87DB -#define GL_NEVER 0x0200 -#define GL_NEXT_BUFFER_NV -2 -#define GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV 0x9025 -#define GL_NICEST 0x1102 -#define GL_NONE 0 -#define GL_NOOP 0x1505 -#define GL_NOP_COMMAND_NV 0x0001 -#define GL_NOR 0x1508 -#define GL_NORMALIZED_RANGE_EXT 0x87E0 -#define GL_NORMAL_ARRAY_ADDRESS_NV 0x8F22 -#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897 -#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080 -#define GL_NORMAL_ARRAY_EXT 0x8075 -#define GL_NORMAL_ARRAY_LENGTH_NV 0x8F2C -#define GL_NORMAL_ARRAY_LIST_IBM 103071 -#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081 -#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6 -#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F -#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F -#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E -#define GL_NORMAL_BIT_PGI 0x08000000 -#define GL_NORMAL_MAP_ARB 0x8511 -#define GL_NORMAL_MAP_EXT 0x8511 -#define GL_NORMAL_MAP_NV 0x8511 -#define GL_NOTEQUAL 0x0205 -#define GL_NO_ERROR 0 -#define GL_NO_RESET_NOTIFICATION 0x8261 -#define GL_NO_RESET_NOTIFICATION_ARB 0x8261 -#define GL_NUM_ACTIVE_VARIABLES 0x9304 -#define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2 -#define GL_NUM_DEVICE_UUIDS_EXT 0x9596 -#define GL_NUM_EXTENSIONS 0x821D -#define GL_NUM_FILL_STREAMS_NV 0x8E29 -#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F -#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E -#define GL_NUM_GENERAL_COMBINERS_NV 0x854E -#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973 -#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971 -#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972 -#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974 -#define GL_NUM_PASSES_ATI 0x8970 -#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE -#define GL_NUM_SAMPLE_COUNTS 0x9380 -#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 -#define GL_NUM_SHADING_LANGUAGE_VERSIONS 0x82E9 -#define GL_NUM_SPARSE_LEVELS_ARB 0x91AA -#define GL_NUM_SPIR_V_EXTENSIONS 0x9554 -#define GL_NUM_SUPPORTED_MULTISAMPLE_MODES_AMD 0x91B6 -#define GL_NUM_TILING_TYPES_EXT 0x9582 -#define GL_NUM_VIDEO_CAPTURE_STREAMS_NV 0x9024 -#define GL_NUM_VIRTUAL_PAGE_SIZES_ARB 0x91A8 -#define GL_NUM_WINDOW_RECTANGLES_EXT 0x8F15 -#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89 -#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A -#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86 -#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87 -#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85 -#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764 -#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765 -#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81 -#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80 -#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3 -#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1 -#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84 -#define GL_OBJECT_LINE_SGIS 0x81F7 -#define GL_OBJECT_LINK_STATUS_ARB 0x8B82 -#define GL_OBJECT_POINT_SGIS 0x81F5 -#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88 -#define GL_OBJECT_SUBTYPE_ARB 0x8B4F -#define GL_OBJECT_TYPE 0x9112 -#define GL_OBJECT_TYPE_ARB 0x8B4E -#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83 -#define GL_OCCLUSION_QUERY_EVENT_MASK_AMD 0x874F -#define GL_OCCLUSION_TEST_HP 0x8165 -#define GL_OCCLUSION_TEST_RESULT_HP 0x8166 -#define GL_OFFSET 0x92FC -#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856 -#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857 -#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854 -#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855 -#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850 -#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851 -#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852 -#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853 -#define GL_OFFSET_TEXTURE_2D_BIAS_NV 0x86E3 -#define GL_OFFSET_TEXTURE_2D_MATRIX_NV 0x86E1 -#define GL_OFFSET_TEXTURE_2D_NV 0x86E8 -#define GL_OFFSET_TEXTURE_2D_SCALE_NV 0x86E2 -#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3 -#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1 -#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C -#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D -#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2 -#define GL_ONE 1 -#define GL_ONE_EXT 0x87DE -#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 -#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004 -#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 -#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002 -#define GL_ONE_MINUS_DST_ALPHA 0x0305 -#define GL_ONE_MINUS_DST_COLOR 0x0307 -#define GL_ONE_MINUS_SRC1_ALPHA 0x88FB -#define GL_ONE_MINUS_SRC1_COLOR 0x88FA -#define GL_ONE_MINUS_SRC_ALPHA 0x0303 -#define GL_ONE_MINUS_SRC_COLOR 0x0301 -#define GL_OPERAND0_ALPHA_ARB 0x8598 -#define GL_OPERAND0_ALPHA_EXT 0x8598 -#define GL_OPERAND0_RGB_ARB 0x8590 -#define GL_OPERAND0_RGB_EXT 0x8590 -#define GL_OPERAND1_ALPHA_ARB 0x8599 -#define GL_OPERAND1_ALPHA_EXT 0x8599 -#define GL_OPERAND1_RGB_ARB 0x8591 -#define GL_OPERAND1_RGB_EXT 0x8591 -#define GL_OPERAND2_ALPHA_ARB 0x859A -#define GL_OPERAND2_ALPHA_EXT 0x859A -#define GL_OPERAND2_RGB_ARB 0x8592 -#define GL_OPERAND2_RGB_EXT 0x8592 -#define GL_OPERAND3_ALPHA_NV 0x859B -#define GL_OPERAND3_RGB_NV 0x8593 -#define GL_OPTIMAL_TILING_EXT 0x9584 -#define GL_OP_ADD_EXT 0x8787 -#define GL_OP_CLAMP_EXT 0x878E -#define GL_OP_CROSS_PRODUCT_EXT 0x8797 -#define GL_OP_DOT3_EXT 0x8784 -#define GL_OP_DOT4_EXT 0x8785 -#define GL_OP_EXP_BASE_2_EXT 0x8791 -#define GL_OP_FLOOR_EXT 0x878F -#define GL_OP_FRAC_EXT 0x8789 -#define GL_OP_INDEX_EXT 0x8782 -#define GL_OP_LOG_BASE_2_EXT 0x8792 -#define GL_OP_MADD_EXT 0x8788 -#define GL_OP_MAX_EXT 0x878A -#define GL_OP_MIN_EXT 0x878B -#define GL_OP_MOV_EXT 0x8799 -#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798 -#define GL_OP_MUL_EXT 0x8786 -#define GL_OP_NEGATE_EXT 0x8783 -#define GL_OP_POWER_EXT 0x8793 -#define GL_OP_RECIP_EXT 0x8794 -#define GL_OP_RECIP_SQRT_EXT 0x8795 -#define GL_OP_ROUND_EXT 0x8790 -#define GL_OP_SET_GE_EXT 0x878C -#define GL_OP_SET_LT_EXT 0x878D -#define GL_OP_SUB_EXT 0x8796 -#define GL_OR 0x1507 -#define GL_OR_INVERTED 0x150D -#define GL_OR_REVERSE 0x150B -#define GL_OUTPUT_COLOR0_EXT 0x879B -#define GL_OUTPUT_COLOR1_EXT 0x879C -#define GL_OUTPUT_FOG_EXT 0x87BD -#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D -#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7 -#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8 -#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9 -#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA -#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB -#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC -#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD -#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE -#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF -#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0 -#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E -#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1 -#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2 -#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3 -#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4 -#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5 -#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6 -#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7 -#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8 -#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9 -#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA -#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F -#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB -#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC -#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0 -#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1 -#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2 -#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3 -#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4 -#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5 -#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6 -#define GL_OUTPUT_VERTEX_EXT 0x879A -#define GL_OUT_OF_MEMORY 0x0505 -#define GL_OVERLAY_KHR 0x9296 -#define GL_OVERLAY_NV 0x9296 -#define GL_PACK_ALIGNMENT 0x0D05 -#define GL_PACK_CMYK_HINT_EXT 0x800E -#define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D -#define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C -#define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E -#define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B -#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131 -#define GL_PACK_IMAGE_HEIGHT 0x806C -#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C -#define GL_PACK_INVERT_MESA 0x8758 -#define GL_PACK_LSB_FIRST 0x0D01 -#define GL_PACK_RESAMPLE_OML 0x8984 -#define GL_PACK_RESAMPLE_SGIX 0x842E -#define GL_PACK_ROW_BYTES_APPLE 0x8A15 -#define GL_PACK_ROW_LENGTH 0x0D02 -#define GL_PACK_SKIP_IMAGES 0x806B -#define GL_PACK_SKIP_IMAGES_EXT 0x806B -#define GL_PACK_SKIP_PIXELS 0x0D04 -#define GL_PACK_SKIP_ROWS 0x0D03 -#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130 -#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0 -#define GL_PACK_SWAP_BYTES 0x0D00 -#define GL_PALETTE4_R5_G6_B5_OES 0x8B92 -#define GL_PALETTE4_RGB5_A1_OES 0x8B94 -#define GL_PALETTE4_RGB8_OES 0x8B90 -#define GL_PALETTE4_RGBA4_OES 0x8B93 -#define GL_PALETTE4_RGBA8_OES 0x8B91 -#define GL_PALETTE8_R5_G6_B5_OES 0x8B97 -#define GL_PALETTE8_RGB5_A1_OES 0x8B99 -#define GL_PALETTE8_RGB8_OES 0x8B95 -#define GL_PALETTE8_RGBA4_OES 0x8B98 -#define GL_PALETTE8_RGBA8_OES 0x8B96 -#define GL_PARALLEL_ARRAYS_INTEL 0x83F4 -#define GL_PARAMETER_BUFFER 0x80EE -#define GL_PARAMETER_BUFFER_ARB 0x80EE -#define GL_PARAMETER_BUFFER_BINDING 0x80EF -#define GL_PARAMETER_BUFFER_BINDING_ARB 0x80EF -#define GL_PARTIAL_SUCCESS_NV 0x902E -#define GL_PASS_THROUGH_NV 0x86E6 -#define GL_PATCHES 0x000E -#define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73 -#define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74 -#define GL_PATCH_VERTICES 0x8E72 -#define GL_PATH_CLIENT_LENGTH_NV 0x907F -#define GL_PATH_COMMAND_COUNT_NV 0x909D -#define GL_PATH_COMPUTED_LENGTH_NV 0x90A0 -#define GL_PATH_COORD_COUNT_NV 0x909E -#define GL_PATH_COVER_DEPTH_FUNC_NV 0x90BF -#define GL_PATH_DASH_ARRAY_COUNT_NV 0x909F -#define GL_PATH_DASH_CAPS_NV 0x907B -#define GL_PATH_DASH_OFFSET_NV 0x907E -#define GL_PATH_DASH_OFFSET_RESET_NV 0x90B4 -#define GL_PATH_END_CAPS_NV 0x9076 -#define GL_PATH_ERROR_POSITION_NV 0x90AB -#define GL_PATH_FILL_BOUNDING_BOX_NV 0x90A1 -#define GL_PATH_FILL_COVER_MODE_NV 0x9082 -#define GL_PATH_FILL_MASK_NV 0x9081 -#define GL_PATH_FILL_MODE_NV 0x9080 -#define GL_PATH_FORMAT_PS_NV 0x9071 -#define GL_PATH_FORMAT_SVG_NV 0x9070 -#define GL_PATH_GEN_COEFF_NV 0x90B1 -#define GL_PATH_GEN_COMPONENTS_NV 0x90B3 -#define GL_PATH_GEN_MODE_NV 0x90B0 -#define GL_PATH_INITIAL_DASH_CAP_NV 0x907C -#define GL_PATH_INITIAL_END_CAP_NV 0x9077 -#define GL_PATH_JOIN_STYLE_NV 0x9079 -#define GL_PATH_MAX_MODELVIEW_STACK_DEPTH_NV 0x0D36 -#define GL_PATH_MAX_PROJECTION_STACK_DEPTH_NV 0x0D38 -#define GL_PATH_MITER_LIMIT_NV 0x907A -#define GL_PATH_MODELVIEW_MATRIX_NV 0x0BA6 -#define GL_PATH_MODELVIEW_NV 0x1700 -#define GL_PATH_MODELVIEW_STACK_DEPTH_NV 0x0BA3 -#define GL_PATH_OBJECT_BOUNDING_BOX_NV 0x908A -#define GL_PATH_PROJECTION_MATRIX_NV 0x0BA7 -#define GL_PATH_PROJECTION_NV 0x1701 -#define GL_PATH_PROJECTION_STACK_DEPTH_NV 0x0BA4 -#define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD -#define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE -#define GL_PATH_STENCIL_FUNC_NV 0x90B7 -#define GL_PATH_STENCIL_REF_NV 0x90B8 -#define GL_PATH_STENCIL_VALUE_MASK_NV 0x90B9 -#define GL_PATH_STROKE_BOUNDING_BOX_NV 0x90A2 -#define GL_PATH_STROKE_COVER_MODE_NV 0x9083 -#define GL_PATH_STROKE_MASK_NV 0x9084 -#define GL_PATH_STROKE_WIDTH_NV 0x9075 -#define GL_PATH_TERMINAL_DASH_CAP_NV 0x907D -#define GL_PATH_TERMINAL_END_CAP_NV 0x9078 -#define GL_PATH_TRANSPOSE_MODELVIEW_MATRIX_NV 0x84E3 -#define GL_PATH_TRANSPOSE_PROJECTION_MATRIX_NV 0x84E4 -#define GL_PERCENTAGE_AMD 0x8BC3 -#define GL_PERFMON_RESULT_AMD 0x8BC6 -#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 -#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 -#define GL_PERFORMANCE_MONITOR_AMD 0x9152 -#define GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL 0x94FC -#define GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL 0x94FB -#define GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL 0x94FA -#define GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL 0x94F8 -#define GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL 0x94F9 -#define GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL 0x94FF -#define GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL 0x94F1 -#define GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL 0x94F2 -#define GL_PERFQUERY_COUNTER_EVENT_INTEL 0x94F0 -#define GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL 0x94FE -#define GL_PERFQUERY_COUNTER_RAW_INTEL 0x94F4 -#define GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL 0x94F3 -#define GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL 0x94F5 -#define GL_PERFQUERY_DONOT_FLUSH_INTEL 0x83F9 -#define GL_PERFQUERY_FLUSH_INTEL 0x83FA -#define GL_PERFQUERY_GLOBAL_CONTEXT_INTEL 0x00000001 -#define GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL 0x9500 -#define GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL 0x94FD -#define GL_PERFQUERY_SINGLE_CONTEXT_INTEL 0x00000000 -#define GL_PERFQUERY_WAIT_INTEL 0x83FB -#define GL_PERTURB_EXT 0x85AE -#define GL_PER_GPU_STORAGE_BIT_NV 0x0800 -#define GL_PER_GPU_STORAGE_NV 0x9548 -#define GL_PER_STAGE_CONSTANTS_NV 0x8535 -#define GL_PHONG_HINT_WIN 0x80EB -#define GL_PHONG_WIN 0x80EA -#define GL_PINLIGHT_NV 0x92A8 -#define GL_PIXELS_PER_SAMPLE_PATTERN_X_AMD 0x91AE -#define GL_PIXELS_PER_SAMPLE_PATTERN_Y_AMD 0x91AF -#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080 -#define GL_PIXEL_BUFFER_BARRIER_BIT_EXT 0x00000080 -#define GL_PIXEL_COUNTER_BITS_NV 0x8864 -#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867 -#define GL_PIXEL_COUNT_NV 0x8866 -#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333 -#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355 -#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354 -#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356 -#define GL_PIXEL_MAG_FILTER_EXT 0x8331 -#define GL_PIXEL_MIN_FILTER_EXT 0x8332 -#define GL_PIXEL_PACK_BUFFER 0x88EB -#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB -#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED -#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED -#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED -#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB -#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3 -#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4 -#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2 -#define GL_PIXEL_TEXTURE_SGIS 0x8353 -#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B -#define GL_PIXEL_TEX_GEN_SGIX 0x8139 -#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E -#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F -#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145 -#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144 -#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143 -#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142 -#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141 -#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140 -#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330 -#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338 -#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336 -#define GL_PIXEL_UNPACK_BUFFER 0x88EC -#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC -#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF -#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF -#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF -#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC -#define GL_PLUS_CLAMPED_ALPHA_NV 0x92B2 -#define GL_PLUS_CLAMPED_NV 0x92B1 -#define GL_PLUS_DARKER_NV 0x9292 -#define GL_PLUS_NV 0x9291 -#define GL_PN_TRIANGLES_ATI 0x87F0 -#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3 -#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7 -#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8 -#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2 -#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6 -#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5 -#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4 -#define GL_POINT 0x1B00 -#define GL_POINTS 0x0000 -#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129 -#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 -#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128 -#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128 -#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128 -#define GL_POINT_SIZE 0x0B11 -#define GL_POINT_SIZE_GRANULARITY 0x0B13 -#define GL_POINT_SIZE_MAX_ARB 0x8127 -#define GL_POINT_SIZE_MAX_EXT 0x8127 -#define GL_POINT_SIZE_MAX_SGIS 0x8127 -#define GL_POINT_SIZE_MIN_ARB 0x8126 -#define GL_POINT_SIZE_MIN_EXT 0x8126 -#define GL_POINT_SIZE_MIN_SGIS 0x8126 -#define GL_POINT_SIZE_RANGE 0x0B12 -#define GL_POINT_SPRITE_ARB 0x8861 -#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 -#define GL_POINT_SPRITE_NV 0x8861 -#define GL_POINT_SPRITE_R_MODE_NV 0x8863 -#define GL_POLYGON_MODE 0x0B40 -#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039 -#define GL_POLYGON_OFFSET_CLAMP 0x8E1B -#define GL_POLYGON_OFFSET_CLAMP_EXT 0x8E1B -#define GL_POLYGON_OFFSET_COMMAND_NV 0x000E -#define GL_POLYGON_OFFSET_EXT 0x8037 -#define GL_POLYGON_OFFSET_FACTOR 0x8038 -#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038 -#define GL_POLYGON_OFFSET_FILL 0x8037 -#define GL_POLYGON_OFFSET_LINE 0x2A02 -#define GL_POLYGON_OFFSET_POINT 0x2A01 -#define GL_POLYGON_OFFSET_UNITS 0x2A00 -#define GL_POLYGON_SMOOTH 0x0B41 -#define GL_POLYGON_SMOOTH_HINT 0x0C53 -#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB -#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7 -#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA -#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6 -#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2 -#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9 -#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5 -#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8 -#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4 -#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023 -#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F -#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022 -#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E -#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1 -#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021 -#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D -#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020 -#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C -#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162 -#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B -#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179 -#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C -#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A -#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8 -#define GL_PRESENT_DURATION_NV 0x8E2B -#define GL_PRESENT_TIME_NV 0x8E2A -#define GL_PRESERVE_ATI 0x8762 -#define GL_PREVIOUS_ARB 0x8578 -#define GL_PREVIOUS_EXT 0x8578 -#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4 -#define GL_PRIMARY_COLOR_ARB 0x8577 -#define GL_PRIMARY_COLOR_EXT 0x8577 -#define GL_PRIMARY_COLOR_NV 0x852C -#define GL_PRIMITIVES_GENERATED 0x8C87 -#define GL_PRIMITIVES_GENERATED_EXT 0x8C87 -#define GL_PRIMITIVES_GENERATED_NV 0x8C87 -#define GL_PRIMITIVES_SUBMITTED 0x82EF -#define GL_PRIMITIVES_SUBMITTED_ARB 0x82EF -#define GL_PRIMITIVE_BOUNDING_BOX_ARB 0x92BE -#define GL_PRIMITIVE_ID_NV 0x8C7C -#define GL_PRIMITIVE_RESTART 0x8F9D -#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 -#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221 -#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E -#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559 -#define GL_PRIMITIVE_RESTART_NV 0x8558 -#define GL_PROGRAM 0x82E2 -#define GL_PROGRAMMABLE_SAMPLE_LOCATION_ARB 0x9341 -#define GL_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9341 -#define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_ARB 0x9340 -#define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV 0x9340 -#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0 -#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805 -#define GL_PROGRAM_ATTRIBS_ARB 0x88AC -#define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906 -#define GL_PROGRAM_BINARY_FORMATS 0x87FF -#define GL_PROGRAM_BINARY_FORMAT_MESA 0x875F -#define GL_PROGRAM_BINARY_LENGTH 0x8741 -#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 -#define GL_PROGRAM_BINDING_ARB 0x8677 -#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B -#define GL_PROGRAM_ERROR_POSITION_NV 0x864B -#define GL_PROGRAM_ERROR_STRING_ARB 0x8874 -#define GL_PROGRAM_ERROR_STRING_NV 0x8874 -#define GL_PROGRAM_FORMAT_ARB 0x8876 -#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875 -#define GL_PROGRAM_INPUT 0x92E3 -#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0 -#define GL_PROGRAM_LENGTH_ARB 0x8627 -#define GL_PROGRAM_LENGTH_NV 0x8627 -#define GL_PROGRAM_MATRIX_EXT 0x8E2D -#define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F -#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2 -#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808 -#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE -#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2 -#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA -#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6 -#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A -#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809 -#define GL_PROGRAM_OBJECT_ARB 0x8B40 -#define GL_PROGRAM_OBJECT_EXT 0x8B40 -#define GL_PROGRAM_OUTPUT 0x92E4 -#define GL_PROGRAM_PARAMETERS_ARB 0x88A8 -#define GL_PROGRAM_PARAMETER_NV 0x8644 -#define GL_PROGRAM_PIPELINE 0x82E4 -#define GL_PROGRAM_PIPELINE_BINDING 0x825A -#define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F -#define GL_PROGRAM_POINT_SIZE 0x8642 -#define GL_PROGRAM_POINT_SIZE_ARB 0x8642 -#define GL_PROGRAM_POINT_SIZE_EXT 0x8642 -#define GL_PROGRAM_RESIDENT_NV 0x8647 -#define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907 -#define GL_PROGRAM_SEPARABLE 0x8258 -#define GL_PROGRAM_STRING_ARB 0x8628 -#define GL_PROGRAM_STRING_NV 0x8628 -#define GL_PROGRAM_TARGET_NV 0x8646 -#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4 -#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807 -#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806 -#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6 -#define GL_PROTECTED_MEMORY_OBJECT_EXT 0x959B -#define GL_PROVOKING_VERTEX 0x8E4F -#define GL_PROVOKING_VERTEX_EXT 0x8E4F -#define GL_PROXY_COLOR_TABLE_SGI 0x80D3 -#define GL_PROXY_HISTOGRAM_EXT 0x8025 -#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5 -#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4 -#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163 -#define GL_PROXY_TEXTURE_1D 0x8063 -#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19 -#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19 -#define GL_PROXY_TEXTURE_1D_EXT 0x8063 -#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B -#define GL_PROXY_TEXTURE_2D 0x8064 -#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B -#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B -#define GL_PROXY_TEXTURE_2D_EXT 0x8064 -#define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101 -#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103 -#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C -#define GL_PROXY_TEXTURE_3D 0x8070 -#define GL_PROXY_TEXTURE_3D_EXT 0x8070 -#define GL_PROXY_TEXTURE_4D_SGIS 0x8135 -#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD -#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B -#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B -#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B -#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B -#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B -#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7 -#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7 -#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7 -#define GL_PURGEABLE_APPLE 0x8A1D -#define GL_PURGED_CONTEXT_RESET_NV 0x92BB -#define GL_QUADRATIC_CURVE_TO_NV 0x0A -#define GL_QUADS 0x0007 -#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C -#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C -#define GL_QUAD_ALPHA4_SGIS 0x811E -#define GL_QUAD_ALPHA8_SGIS 0x811F -#define GL_QUAD_INTENSITY4_SGIS 0x8122 -#define GL_QUAD_INTENSITY8_SGIS 0x8123 -#define GL_QUAD_LUMINANCE4_SGIS 0x8120 -#define GL_QUAD_LUMINANCE8_SGIS 0x8121 -#define GL_QUAD_MESH_SUN 0x8614 -#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125 -#define GL_QUARTER_BIT_ATI 0x00000010 -#define GL_QUERY 0x82E3 -#define GL_QUERY_ALL_EVENT_BITS_AMD 0xFFFFFFFF -#define GL_QUERY_BUFFER 0x9192 -#define GL_QUERY_BUFFER_AMD 0x9192 -#define GL_QUERY_BUFFER_BARRIER_BIT 0x00008000 -#define GL_QUERY_BUFFER_BINDING 0x9193 -#define GL_QUERY_BUFFER_BINDING_AMD 0x9193 -#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16 -#define GL_QUERY_BY_REGION_NO_WAIT_INVERTED 0x8E1A -#define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16 -#define GL_QUERY_BY_REGION_WAIT 0x8E15 -#define GL_QUERY_BY_REGION_WAIT_INVERTED 0x8E19 -#define GL_QUERY_BY_REGION_WAIT_NV 0x8E15 -#define GL_QUERY_COUNTER_BITS 0x8864 -#define GL_QUERY_COUNTER_BITS_ARB 0x8864 -#define GL_QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD 0x00000008 -#define GL_QUERY_DEPTH_FAIL_EVENT_BIT_AMD 0x00000002 -#define GL_QUERY_DEPTH_PASS_EVENT_BIT_AMD 0x00000001 -#define GL_QUERY_NO_WAIT 0x8E14 -#define GL_QUERY_NO_WAIT_INVERTED 0x8E18 -#define GL_QUERY_NO_WAIT_NV 0x8E14 -#define GL_QUERY_OBJECT_AMD 0x9153 -#define GL_QUERY_OBJECT_EXT 0x9153 -#define GL_QUERY_RESOURCE_BUFFEROBJECT_NV 0x9547 -#define GL_QUERY_RESOURCE_MEMTYPE_VIDMEM_NV 0x9542 -#define GL_QUERY_RESOURCE_RENDERBUFFER_NV 0x9546 -#define GL_QUERY_RESOURCE_SYS_RESERVED_NV 0x9544 -#define GL_QUERY_RESOURCE_TEXTURE_NV 0x9545 -#define GL_QUERY_RESOURCE_TYPE_VIDMEM_ALLOC_NV 0x9540 -#define GL_QUERY_RESULT 0x8866 -#define GL_QUERY_RESULT_ARB 0x8866 -#define GL_QUERY_RESULT_AVAILABLE 0x8867 -#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867 -#define GL_QUERY_RESULT_NO_WAIT 0x9194 -#define GL_QUERY_RESULT_NO_WAIT_AMD 0x9194 -#define GL_QUERY_STENCIL_FAIL_EVENT_BIT_AMD 0x00000004 -#define GL_QUERY_TARGET 0x82EA -#define GL_QUERY_WAIT 0x8E13 -#define GL_QUERY_WAIT_INVERTED 0x8E17 -#define GL_QUERY_WAIT_NV 0x8E13 -#define GL_R11F_G11F_B10F 0x8C3A -#define GL_R11F_G11F_B10F_EXT 0x8C3A -#define GL_R16 0x822A -#define GL_R16F 0x822D -#define GL_R16F_EXT 0x822D -#define GL_R16I 0x8233 -#define GL_R16UI 0x8234 -#define GL_R16_SNORM 0x8F98 -#define GL_R1UI_C3F_V3F_SUN 0x85C6 -#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8 -#define GL_R1UI_C4UB_V3F_SUN 0x85C5 -#define GL_R1UI_N3F_V3F_SUN 0x85C7 -#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB -#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA -#define GL_R1UI_T2F_V3F_SUN 0x85C9 -#define GL_R1UI_V3F_SUN 0x85C4 -#define GL_R32F 0x822E -#define GL_R32F_EXT 0x822E -#define GL_R32I 0x8235 -#define GL_R32UI 0x8236 -#define GL_R3_G3_B2 0x2A10 -#define GL_R8 0x8229 -#define GL_R8I 0x8231 -#define GL_R8UI 0x8232 -#define GL_R8_EXT 0x8229 -#define GL_R8_SNORM 0x8F94 -#define GL_RASTERIZER_DISCARD 0x8C89 -#define GL_RASTERIZER_DISCARD_EXT 0x8C89 -#define GL_RASTERIZER_DISCARD_NV 0x8C89 -#define GL_RASTER_FIXED_SAMPLE_LOCATIONS_EXT 0x932A -#define GL_RASTER_MULTISAMPLE_EXT 0x9327 -#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262 -#define GL_RASTER_SAMPLES_EXT 0x9328 -#define GL_READ_BUFFER 0x0C02 -#define GL_READ_FRAMEBUFFER 0x8CA8 -#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA -#define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA -#define GL_READ_FRAMEBUFFER_EXT 0x8CA8 -#define GL_READ_ONLY 0x88B8 -#define GL_READ_ONLY_ARB 0x88B8 -#define GL_READ_PIXELS 0x828C -#define GL_READ_PIXELS_FORMAT 0x828D -#define GL_READ_PIXELS_TYPE 0x828E -#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B -#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879 -#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D -#define GL_READ_WRITE 0x88BA -#define GL_READ_WRITE_ARB 0x88BA -#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE -#define GL_RECT_NV 0xF6 -#define GL_RED 0x1903 -#define GL_REDUCE_EXT 0x8016 -#define GL_RED_BIT_ATI 0x00000001 -#define GL_RED_INTEGER 0x8D94 -#define GL_RED_INTEGER_EXT 0x8D94 -#define GL_RED_MAX_CLAMP_INGR 0x8564 -#define GL_RED_MIN_CLAMP_INGR 0x8560 -#define GL_RED_NV 0x1903 -#define GL_RED_SNORM 0x8F90 -#define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B -#define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A -#define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309 -#define GL_REFERENCED_BY_MESH_SHADER_NV 0x95A0 -#define GL_REFERENCED_BY_TASK_SHADER_NV 0x95A1 -#define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307 -#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308 -#define GL_REFERENCED_BY_VERTEX_SHADER 0x9306 -#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E -#define GL_REFERENCE_PLANE_SGIX 0x817D -#define GL_REFLECTION_MAP_ARB 0x8512 -#define GL_REFLECTION_MAP_EXT 0x8512 -#define GL_REFLECTION_MAP_NV 0x8512 -#define GL_REGISTER_COMBINERS_NV 0x8522 -#define GL_REG_0_ATI 0x8921 -#define GL_REG_10_ATI 0x892B -#define GL_REG_11_ATI 0x892C -#define GL_REG_12_ATI 0x892D -#define GL_REG_13_ATI 0x892E -#define GL_REG_14_ATI 0x892F -#define GL_REG_15_ATI 0x8930 -#define GL_REG_16_ATI 0x8931 -#define GL_REG_17_ATI 0x8932 -#define GL_REG_18_ATI 0x8933 -#define GL_REG_19_ATI 0x8934 -#define GL_REG_1_ATI 0x8922 -#define GL_REG_20_ATI 0x8935 -#define GL_REG_21_ATI 0x8936 -#define GL_REG_22_ATI 0x8937 -#define GL_REG_23_ATI 0x8938 -#define GL_REG_24_ATI 0x8939 -#define GL_REG_25_ATI 0x893A -#define GL_REG_26_ATI 0x893B -#define GL_REG_27_ATI 0x893C -#define GL_REG_28_ATI 0x893D -#define GL_REG_29_ATI 0x893E -#define GL_REG_2_ATI 0x8923 -#define GL_REG_30_ATI 0x893F -#define GL_REG_31_ATI 0x8940 -#define GL_REG_3_ATI 0x8924 -#define GL_REG_4_ATI 0x8925 -#define GL_REG_5_ATI 0x8926 -#define GL_REG_6_ATI 0x8927 -#define GL_REG_7_ATI 0x8928 -#define GL_REG_8_ATI 0x8929 -#define GL_REG_9_ATI 0x892A -#define GL_RELATIVE_ARC_TO_NV 0xFF -#define GL_RELATIVE_CONIC_CURVE_TO_NV 0x1B -#define GL_RELATIVE_CUBIC_CURVE_TO_NV 0x0D -#define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07 -#define GL_RELATIVE_LARGE_CCW_ARC_TO_NV 0x17 -#define GL_RELATIVE_LARGE_CW_ARC_TO_NV 0x19 -#define GL_RELATIVE_LINE_TO_NV 0x05 -#define GL_RELATIVE_MOVE_TO_NV 0x03 -#define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B -#define GL_RELATIVE_RECT_NV 0xF7 -#define GL_RELATIVE_ROUNDED_RECT2_NV 0xEB -#define GL_RELATIVE_ROUNDED_RECT4_NV 0xED -#define GL_RELATIVE_ROUNDED_RECT8_NV 0xEF -#define GL_RELATIVE_ROUNDED_RECT_NV 0xE9 -#define GL_RELATIVE_SMALL_CCW_ARC_TO_NV 0x13 -#define GL_RELATIVE_SMALL_CW_ARC_TO_NV 0x15 -#define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11 -#define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F -#define GL_RELATIVE_VERTICAL_LINE_TO_NV 0x09 -#define GL_RELEASED_APPLE 0x8A19 -#define GL_RENDERBUFFER 0x8D41 -#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 -#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53 -#define GL_RENDERBUFFER_BINDING 0x8CA7 -#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7 -#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 -#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52 -#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10 -#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB -#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 -#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54 -#define GL_RENDERBUFFER_EXT 0x8D41 -#define GL_RENDERBUFFER_FREE_MEMORY_ATI 0x87FD -#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 -#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51 -#define GL_RENDERBUFFER_HEIGHT 0x8D43 -#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43 -#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 -#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44 -#define GL_RENDERBUFFER_RED_SIZE 0x8D50 -#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50 -#define GL_RENDERBUFFER_SAMPLES 0x8CAB -#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB -#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 -#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55 -#define GL_RENDERBUFFER_STORAGE_SAMPLES_AMD 0x91B2 -#define GL_RENDERBUFFER_WIDTH 0x8D42 -#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42 -#define GL_RENDERER 0x1F01 -#define GL_RENDER_GPU_MASK_NV 0x9558 -#define GL_REPEAT 0x2901 -#define GL_REPLACE 0x1E01 -#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3 -#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2 -#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0 -#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1 -#define GL_REPLACEMENT_CODE_SUN 0x81D8 -#define GL_REPLACE_EXT 0x8062 -#define GL_REPLACE_MIDDLE_SUN 0x0002 -#define GL_REPLACE_OLDEST_SUN 0x0003 -#define GL_REPLACE_VALUE_AMD 0x874B -#define GL_REPLICATE_BORDER_HP 0x8153 -#define GL_REPRESENTATIVE_FRAGMENT_TEST_NV 0x937F -#define GL_RESAMPLE_AVERAGE_OML 0x8988 -#define GL_RESAMPLE_DECIMATE_OML 0x8989 -#define GL_RESAMPLE_DECIMATE_SGIX 0x8430 -#define GL_RESAMPLE_REPLICATE_OML 0x8986 -#define GL_RESAMPLE_REPLICATE_SGIX 0x8433 -#define GL_RESAMPLE_ZERO_FILL_OML 0x8987 -#define GL_RESAMPLE_ZERO_FILL_SGIX 0x8434 -#define GL_RESCALE_NORMAL_EXT 0x803A -#define GL_RESET_NOTIFICATION_STRATEGY 0x8256 -#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 -#define GL_RESTART_PATH_NV 0xF0 -#define GL_RESTART_SUN 0x0001 -#define GL_RETAINED_APPLE 0x8A1B -#define GL_RG 0x8227 -#define GL_RG16 0x822C -#define GL_RG16F 0x822F -#define GL_RG16F_EXT 0x822F -#define GL_RG16I 0x8239 -#define GL_RG16UI 0x823A -#define GL_RG16_SNORM 0x8F99 -#define GL_RG32F 0x8230 -#define GL_RG32F_EXT 0x8230 -#define GL_RG32I 0x823B -#define GL_RG32UI 0x823C -#define GL_RG8 0x822B -#define GL_RG8I 0x8237 -#define GL_RG8UI 0x8238 -#define GL_RG8_EXT 0x822B -#define GL_RG8_SNORM 0x8F95 -#define GL_RGB 0x1907 -#define GL_RGB10 0x8052 -#define GL_RGB10_A2 0x8059 -#define GL_RGB10_A2UI 0x906F -#define GL_RGB10_A2_EXT 0x8059 -#define GL_RGB10_EXT 0x8052 -#define GL_RGB12 0x8053 -#define GL_RGB12_EXT 0x8053 -#define GL_RGB16 0x8054 -#define GL_RGB16F 0x881B -#define GL_RGB16F_ARB 0x881B -#define GL_RGB16F_EXT 0x881B -#define GL_RGB16I 0x8D89 -#define GL_RGB16I_EXT 0x8D89 -#define GL_RGB16UI 0x8D77 -#define GL_RGB16UI_EXT 0x8D77 -#define GL_RGB16_EXT 0x8054 -#define GL_RGB16_SNORM 0x8F9A -#define GL_RGB2_EXT 0x804E -#define GL_RGB32F 0x8815 -#define GL_RGB32F_ARB 0x8815 -#define GL_RGB32F_EXT 0x8815 -#define GL_RGB32I 0x8D83 -#define GL_RGB32I_EXT 0x8D83 -#define GL_RGB32UI 0x8D71 -#define GL_RGB32UI_EXT 0x8D71 -#define GL_RGB4 0x804F -#define GL_RGB4_EXT 0x804F -#define GL_RGB4_S3TC 0x83A1 -#define GL_RGB5 0x8050 -#define GL_RGB565 0x8D62 -#define GL_RGB5_A1 0x8057 -#define GL_RGB5_A1_EXT 0x8057 -#define GL_RGB5_EXT 0x8050 -#define GL_RGB8 0x8051 -#define GL_RGB8I 0x8D8F -#define GL_RGB8I_EXT 0x8D8F -#define GL_RGB8UI 0x8D7D -#define GL_RGB8UI_EXT 0x8D7D -#define GL_RGB8_EXT 0x8051 -#define GL_RGB8_SNORM 0x8F96 -#define GL_RGB9_E5 0x8C3D -#define GL_RGB9_E5_EXT 0x8C3D -#define GL_RGBA 0x1908 -#define GL_RGBA12 0x805A -#define GL_RGBA12_EXT 0x805A -#define GL_RGBA16 0x805B -#define GL_RGBA16F 0x881A -#define GL_RGBA16F_ARB 0x881A -#define GL_RGBA16F_EXT 0x881A -#define GL_RGBA16I 0x8D88 -#define GL_RGBA16I_EXT 0x8D88 -#define GL_RGBA16UI 0x8D76 -#define GL_RGBA16UI_EXT 0x8D76 -#define GL_RGBA16_EXT 0x805B -#define GL_RGBA16_SNORM 0x8F9B -#define GL_RGBA2 0x8055 -#define GL_RGBA2_EXT 0x8055 -#define GL_RGBA32F 0x8814 -#define GL_RGBA32F_ARB 0x8814 -#define GL_RGBA32F_EXT 0x8814 -#define GL_RGBA32I 0x8D82 -#define GL_RGBA32I_EXT 0x8D82 -#define GL_RGBA32UI 0x8D70 -#define GL_RGBA32UI_EXT 0x8D70 -#define GL_RGBA4 0x8056 -#define GL_RGBA4_DXT5_S3TC 0x83A5 -#define GL_RGBA4_EXT 0x8056 -#define GL_RGBA4_S3TC 0x83A3 -#define GL_RGBA8 0x8058 -#define GL_RGBA8I 0x8D8E -#define GL_RGBA8I_EXT 0x8D8E -#define GL_RGBA8UI 0x8D7C -#define GL_RGBA8UI_EXT 0x8D7C -#define GL_RGBA8_EXT 0x8058 -#define GL_RGBA8_SNORM 0x8F97 -#define GL_RGBA_DXT5_S3TC 0x83A4 -#define GL_RGBA_FLOAT16_APPLE 0x881A -#define GL_RGBA_FLOAT16_ATI 0x881A -#define GL_RGBA_FLOAT32_APPLE 0x8814 -#define GL_RGBA_FLOAT32_ATI 0x8814 -#define GL_RGBA_FLOAT_MODE_ARB 0x8820 -#define GL_RGBA_FLOAT_MODE_ATI 0x8820 -#define GL_RGBA_INTEGER 0x8D99 -#define GL_RGBA_INTEGER_EXT 0x8D99 -#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E -#define GL_RGBA_S3TC 0x83A2 -#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C -#define GL_RGBA_SNORM 0x8F93 -#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9 -#define GL_RGB_422_APPLE 0x8A1F -#define GL_RGB_FLOAT16_APPLE 0x881B -#define GL_RGB_FLOAT16_ATI 0x881B -#define GL_RGB_FLOAT32_APPLE 0x8815 -#define GL_RGB_FLOAT32_ATI 0x8815 -#define GL_RGB_INTEGER 0x8D98 -#define GL_RGB_INTEGER_EXT 0x8D98 -#define GL_RGB_RAW_422_APPLE 0x8A51 -#define GL_RGB_S3TC 0x83A0 -#define GL_RGB_SCALE_ARB 0x8573 -#define GL_RGB_SCALE_EXT 0x8573 -#define GL_RGB_SNORM 0x8F92 -#define GL_RG_INTEGER 0x8228 -#define GL_RG_SNORM 0x8F91 -#define GL_RIGHT 0x0407 -#define GL_ROUNDED_RECT2_NV 0xEA -#define GL_ROUNDED_RECT4_NV 0xEC -#define GL_ROUNDED_RECT8_NV 0xEE -#define GL_ROUNDED_RECT_NV 0xE8 -#define GL_ROUND_NV 0x90A4 -#define GL_SAMPLER 0x82E6 -#define GL_SAMPLER_1D 0x8B5D -#define GL_SAMPLER_1D_ARB 0x8B5D -#define GL_SAMPLER_1D_ARRAY 0x8DC0 -#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0 -#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3 -#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3 -#define GL_SAMPLER_1D_SHADOW 0x8B61 -#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61 -#define GL_SAMPLER_2D 0x8B5E -#define GL_SAMPLER_2D_ARB 0x8B5E -#define GL_SAMPLER_2D_ARRAY 0x8DC1 -#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1 -#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 -#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4 -#define GL_SAMPLER_2D_MULTISAMPLE 0x9108 -#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B -#define GL_SAMPLER_2D_RECT 0x8B63 -#define GL_SAMPLER_2D_RECT_ARB 0x8B63 -#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64 -#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64 -#define GL_SAMPLER_2D_SHADOW 0x8B62 -#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62 -#define GL_SAMPLER_3D 0x8B5F -#define GL_SAMPLER_3D_ARB 0x8B5F -#define GL_SAMPLER_BINDING 0x8919 -#define GL_SAMPLER_BUFFER 0x8DC2 -#define GL_SAMPLER_BUFFER_AMD 0x9001 -#define GL_SAMPLER_BUFFER_EXT 0x8DC2 -#define GL_SAMPLER_CUBE 0x8B60 -#define GL_SAMPLER_CUBE_ARB 0x8B60 -#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C -#define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C -#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D -#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D -#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 -#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5 -#define GL_SAMPLER_OBJECT_AMD 0x9155 -#define GL_SAMPLER_RENDERBUFFER_NV 0x8E56 -#define GL_SAMPLES 0x80A9 -#define GL_SAMPLES_3DFX 0x86B4 -#define GL_SAMPLES_ARB 0x80A9 -#define GL_SAMPLES_EXT 0x80A9 -#define GL_SAMPLES_PASSED 0x8914 -#define GL_SAMPLES_PASSED_ARB 0x8914 -#define GL_SAMPLES_SGIS 0x80A9 -#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E -#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E -#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E -#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE 0x809F -#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F -#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F -#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F -#define GL_SAMPLE_BUFFERS 0x80A8 -#define GL_SAMPLE_BUFFERS_3DFX 0x86B3 -#define GL_SAMPLE_BUFFERS_ARB 0x80A8 -#define GL_SAMPLE_BUFFERS_EXT 0x80A8 -#define GL_SAMPLE_BUFFERS_SGIS 0x80A8 -#define GL_SAMPLE_COVERAGE 0x80A0 -#define GL_SAMPLE_COVERAGE_ARB 0x80A0 -#define GL_SAMPLE_COVERAGE_INVERT 0x80AB -#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB -#define GL_SAMPLE_COVERAGE_VALUE 0x80AA -#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA -#define GL_SAMPLE_LOCATION_ARB 0x8E50 -#define GL_SAMPLE_LOCATION_NV 0x8E50 -#define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_ARB 0x933F -#define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV 0x933F -#define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_ARB 0x933E -#define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV 0x933E -#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_ARB 0x933D -#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV 0x933D -#define GL_SAMPLE_MASK 0x8E51 -#define GL_SAMPLE_MASK_EXT 0x80A0 -#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB -#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB -#define GL_SAMPLE_MASK_NV 0x8E51 -#define GL_SAMPLE_MASK_SGIS 0x80A0 -#define GL_SAMPLE_MASK_VALUE 0x8E52 -#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA -#define GL_SAMPLE_MASK_VALUE_NV 0x8E52 -#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA -#define GL_SAMPLE_PATTERN_EXT 0x80AC -#define GL_SAMPLE_PATTERN_SGIS 0x80AC -#define GL_SAMPLE_POSITION 0x8E50 -#define GL_SAMPLE_POSITION_NV 0x8E50 -#define GL_SAMPLE_SHADING 0x8C36 -#define GL_SAMPLE_SHADING_ARB 0x8C36 -#define GL_SATURATE_BIT_ATI 0x00000040 -#define GL_SCALAR_EXT 0x87BE -#define GL_SCALEBIAS_HINT_SGIX 0x8322 -#define GL_SCALED_RESOLVE_FASTEST_EXT 0x90BA -#define GL_SCALED_RESOLVE_NICEST_EXT 0x90BB -#define GL_SCALE_BY_FOUR_NV 0x853F -#define GL_SCALE_BY_ONE_HALF_NV 0x8540 -#define GL_SCALE_BY_TWO_NV 0x853E -#define GL_SCISSOR_BOX 0x0C10 -#define GL_SCISSOR_BOX_EXCLUSIVE_NV 0x9556 -#define GL_SCISSOR_COMMAND_NV 0x0011 -#define GL_SCISSOR_TEST 0x0C11 -#define GL_SCISSOR_TEST_EXCLUSIVE_NV 0x9555 -#define GL_SCREEN_COORDINATES_REND 0x8490 -#define GL_SCREEN_KHR 0x9295 -#define GL_SCREEN_NV 0x9295 -#define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27 -#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C -#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E -#define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31 -#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077 -#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087 -#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D -#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A -#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C -#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B -#define GL_SECONDARY_COLOR_NV 0x852D -#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D -#define GL_SEMAPHORE_TYPE_BINARY_NV 0x95B4 -#define GL_SEMAPHORE_TYPE_NV 0x95B3 -#define GL_SEMAPHORE_TYPE_TIMELINE_NV 0x95B5 -#define GL_SEPARABLE_2D_EXT 0x8012 -#define GL_SEPARATE_ATTRIBS 0x8C8D -#define GL_SEPARATE_ATTRIBS_EXT 0x8C8D -#define GL_SEPARATE_ATTRIBS_NV 0x8C8D -#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA -#define GL_SET 0x150F -#define GL_SET_AMD 0x874A -#define GL_SHADER 0x82E1 -#define GL_SHADER_BINARY_FORMATS 0x8DF8 -#define GL_SHADER_BINARY_FORMAT_SPIR_V 0x9551 -#define GL_SHADER_BINARY_FORMAT_SPIR_V_ARB 0x9551 -#define GL_SHADER_COMPILER 0x8DFA -#define GL_SHADER_CONSISTENT_NV 0x86DD -#define GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV 0x00000010 -#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020 -#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT 0x00000020 -#define GL_SHADER_IMAGE_ATOMIC 0x82A6 -#define GL_SHADER_IMAGE_LOAD 0x82A4 -#define GL_SHADER_IMAGE_STORE 0x82A5 -#define GL_SHADER_INCLUDE_ARB 0x8DAE -#define GL_SHADER_OBJECT_ARB 0x8B48 -#define GL_SHADER_OBJECT_EXT 0x8B48 -#define GL_SHADER_OPERATION_NV 0x86DF -#define GL_SHADER_SOURCE_LENGTH 0x8B88 -#define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000 -#define GL_SHADER_STORAGE_BLOCK 0x92E6 -#define GL_SHADER_STORAGE_BUFFER 0x90D2 -#define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3 -#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF -#define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5 -#define GL_SHADER_STORAGE_BUFFER_START 0x90D4 -#define GL_SHADER_TYPE 0x8B4F -#define GL_SHADING_LANGUAGE_VERSION 0x8B8C -#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C -#define GL_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV 0x956F -#define GL_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV 0x9566 -#define GL_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV 0x9567 -#define GL_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV 0x9568 -#define GL_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV 0x9569 -#define GL_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV 0x956A -#define GL_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV 0x956B -#define GL_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV 0x9565 -#define GL_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV 0x956C -#define GL_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV 0x956D -#define GL_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV 0x956E -#define GL_SHADING_RATE_IMAGE_BINDING_NV 0x955B -#define GL_SHADING_RATE_IMAGE_NV 0x9563 -#define GL_SHADING_RATE_IMAGE_PALETTE_COUNT_NV 0x95B2 -#define GL_SHADING_RATE_IMAGE_PALETTE_SIZE_NV 0x955E -#define GL_SHADING_RATE_IMAGE_PER_PRIMITIVE_NV 0x95B1 -#define GL_SHADING_RATE_IMAGE_TEXEL_HEIGHT_NV 0x955D -#define GL_SHADING_RATE_IMAGE_TEXEL_WIDTH_NV 0x955C -#define GL_SHADING_RATE_NO_INVOCATIONS_NV 0x9564 -#define GL_SHADING_RATE_SAMPLE_ORDER_DEFAULT_NV 0x95AE -#define GL_SHADING_RATE_SAMPLE_ORDER_PIXEL_MAJOR_NV 0x95AF -#define GL_SHADING_RATE_SAMPLE_ORDER_SAMPLE_MAJOR_NV 0x95B0 -#define GL_SHADOW_AMBIENT_SGIX 0x80BF -#define GL_SHADOW_ATTENUATION_EXT 0x834E -#define GL_SHARED_EDGE_NV 0xC0 -#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB -#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0 -#define GL_SHORT 0x1402 -#define GL_SIGNALED 0x9119 -#define GL_SIGNED_ALPHA8_NV 0x8706 -#define GL_SIGNED_ALPHA_NV 0x8705 -#define GL_SIGNED_HILO16_NV 0x86FA -#define GL_SIGNED_HILO8_NV 0x885F -#define GL_SIGNED_HILO_NV 0x86F9 -#define GL_SIGNED_IDENTITY_NV 0x853C -#define GL_SIGNED_INTENSITY8_NV 0x8708 -#define GL_SIGNED_INTENSITY_NV 0x8707 -#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704 -#define GL_SIGNED_LUMINANCE8_NV 0x8702 -#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703 -#define GL_SIGNED_LUMINANCE_NV 0x8701 -#define GL_SIGNED_NEGATE_NV 0x853D -#define GL_SIGNED_NORMALIZED 0x8F9C -#define GL_SIGNED_RGB8_NV 0x86FF -#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D -#define GL_SIGNED_RGBA8_NV 0x86FC -#define GL_SIGNED_RGBA_NV 0x86FB -#define GL_SIGNED_RGB_NV 0x86FE -#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C -#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC -#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE -#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD -#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF -#define GL_SINGLE_COLOR_EXT 0x81F9 -#define GL_SKIP_COMPONENTS1_NV -6 -#define GL_SKIP_COMPONENTS2_NV -5 -#define GL_SKIP_COMPONENTS3_NV -4 -#define GL_SKIP_COMPONENTS4_NV -3 -#define GL_SKIP_DECODE_EXT 0x8A4A -#define GL_SKIP_MISSING_GLYPH_NV 0x90A9 -#define GL_SLICE_ACCUM_SUN 0x85CC -#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45 -#define GL_SLUMINANCE8_EXT 0x8C47 -#define GL_SLUMINANCE_ALPHA_EXT 0x8C44 -#define GL_SLUMINANCE_EXT 0x8C46 -#define GL_SMALL_CCW_ARC_TO_NV 0x12 -#define GL_SMALL_CW_ARC_TO_NV 0x14 -#define GL_SMOOTH_CUBIC_CURVE_TO_NV 0x10 -#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 -#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 -#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 -#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 -#define GL_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0E -#define GL_SM_COUNT_NV 0x933B -#define GL_SOFTLIGHT_KHR 0x929C -#define GL_SOFTLIGHT_NV 0x929C -#define GL_SOURCE0_ALPHA_ARB 0x8588 -#define GL_SOURCE0_ALPHA_EXT 0x8588 -#define GL_SOURCE0_RGB_ARB 0x8580 -#define GL_SOURCE0_RGB_EXT 0x8580 -#define GL_SOURCE1_ALPHA 0x8589 -#define GL_SOURCE1_ALPHA_ARB 0x8589 -#define GL_SOURCE1_ALPHA_EXT 0x8589 -#define GL_SOURCE1_RGB_ARB 0x8581 -#define GL_SOURCE1_RGB_EXT 0x8581 -#define GL_SOURCE2_ALPHA_ARB 0x858A -#define GL_SOURCE2_ALPHA_EXT 0x858A -#define GL_SOURCE2_RGB_ARB 0x8582 -#define GL_SOURCE2_RGB_EXT 0x8582 -#define GL_SOURCE3_ALPHA_NV 0x858B -#define GL_SOURCE3_RGB_NV 0x8583 -#define GL_SPARE0_NV 0x852E -#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532 -#define GL_SPARE1_NV 0x852F -#define GL_SPARSE_BUFFER_PAGE_SIZE_ARB 0x82F8 -#define GL_SPARSE_STORAGE_BIT_ARB 0x0400 -#define GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB 0x91A9 -#define GL_SPIR_V_BINARY 0x9552 -#define GL_SPIR_V_BINARY_ARB 0x9552 -#define GL_SPIR_V_EXTENSIONS 0x9553 -#define GL_SPRITE_AXIAL_SGIX 0x814C -#define GL_SPRITE_AXIS_SGIX 0x814A -#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E -#define GL_SPRITE_MODE_SGIX 0x8149 -#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D -#define GL_SPRITE_SGIX 0x8148 -#define GL_SPRITE_TRANSLATION_SGIX 0x814B -#define GL_SQUARE_NV 0x90A3 -#define GL_SR8_EXT 0x8FBD -#define GL_SRC1_ALPHA 0x8589 -#define GL_SRC1_COLOR 0x88F9 -#define GL_SRC_ALPHA 0x0302 -#define GL_SRC_ALPHA_SATURATE 0x0308 -#define GL_SRC_ATOP_NV 0x928E -#define GL_SRC_COLOR 0x0300 -#define GL_SRC_IN_NV 0x928A -#define GL_SRC_NV 0x9286 -#define GL_SRC_OUT_NV 0x928C -#define GL_SRC_OVER_NV 0x9288 -#define GL_SRG8_EXT 0x8FBE -#define GL_SRGB 0x8C40 -#define GL_SRGB8 0x8C41 -#define GL_SRGB8_ALPHA8 0x8C43 -#define GL_SRGB8_ALPHA8_EXT 0x8C43 -#define GL_SRGB8_EXT 0x8C41 -#define GL_SRGB_ALPHA 0x8C42 -#define GL_SRGB_ALPHA_EXT 0x8C42 -#define GL_SRGB_DECODE_ARB 0x8299 -#define GL_SRGB_EXT 0x8C40 -#define GL_SRGB_READ 0x8297 -#define GL_SRGB_WRITE 0x8298 -#define GL_STACK_OVERFLOW 0x0503 -#define GL_STACK_UNDERFLOW 0x0504 -#define GL_STANDARD_FONT_FORMAT_NV 0x936C -#define GL_STANDARD_FONT_NAME_NV 0x9072 -#define GL_STATIC_ATI 0x8760 -#define GL_STATIC_COPY 0x88E6 -#define GL_STATIC_COPY_ARB 0x88E6 -#define GL_STATIC_DRAW 0x88E4 -#define GL_STATIC_DRAW_ARB 0x88E4 -#define GL_STATIC_READ 0x88E5 -#define GL_STATIC_READ_ARB 0x88E5 -#define GL_STATIC_VERTEX_ARRAY_IBM 103061 -#define GL_STENCIL 0x1802 -#define GL_STENCIL_ATTACHMENT 0x8D20 -#define GL_STENCIL_ATTACHMENT_EXT 0x8D20 -#define GL_STENCIL_BACK_FAIL 0x8801 -#define GL_STENCIL_BACK_FAIL_ATI 0x8801 -#define GL_STENCIL_BACK_FUNC 0x8800 -#define GL_STENCIL_BACK_FUNC_ATI 0x8800 -#define GL_STENCIL_BACK_OP_VALUE_AMD 0x874D -#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 -#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802 -#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 -#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803 -#define GL_STENCIL_BACK_REF 0x8CA3 -#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 -#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 -#define GL_STENCIL_BUFFER_BIT 0x00000400 -#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3 -#define GL_STENCIL_CLEAR_VALUE 0x0B91 -#define GL_STENCIL_COMPONENTS 0x8285 -#define GL_STENCIL_FAIL 0x0B94 -#define GL_STENCIL_FUNC 0x0B92 -#define GL_STENCIL_INDEX 0x1901 -#define GL_STENCIL_INDEX1 0x8D46 -#define GL_STENCIL_INDEX16 0x8D49 -#define GL_STENCIL_INDEX16_EXT 0x8D49 -#define GL_STENCIL_INDEX1_EXT 0x8D46 -#define GL_STENCIL_INDEX4 0x8D47 -#define GL_STENCIL_INDEX4_EXT 0x8D47 -#define GL_STENCIL_INDEX8 0x8D48 -#define GL_STENCIL_INDEX8_EXT 0x8D48 -#define GL_STENCIL_OP_VALUE_AMD 0x874C -#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 -#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 -#define GL_STENCIL_REF 0x0B97 -#define GL_STENCIL_REF_COMMAND_NV 0x000C -#define GL_STENCIL_RENDERABLE 0x8288 -#define GL_STENCIL_SAMPLES_NV 0x932E -#define GL_STENCIL_TAG_BITS_EXT 0x88F2 -#define GL_STENCIL_TEST 0x0B90 -#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910 -#define GL_STENCIL_VALUE_MASK 0x0B93 -#define GL_STENCIL_WRITEMASK 0x0B98 -#define GL_STEREO 0x0C33 -#define GL_STORAGE_CACHED_APPLE 0x85BE -#define GL_STORAGE_CLIENT_APPLE 0x85B4 -#define GL_STORAGE_PRIVATE_APPLE 0x85BD -#define GL_STORAGE_SHARED_APPLE 0x85BF -#define GL_STREAM_COPY 0x88E2 -#define GL_STREAM_COPY_ARB 0x88E2 -#define GL_STREAM_DRAW 0x88E0 -#define GL_STREAM_DRAW_ARB 0x88E0 -#define GL_STREAM_RASTERIZATION_AMD 0x91A0 -#define GL_STREAM_READ 0x88E1 -#define GL_STREAM_READ_ARB 0x88E1 -#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216 -#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217 -#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218 -#define GL_SUBGROUP_FEATURE_ARITHMETIC_BIT_KHR 0x00000004 -#define GL_SUBGROUP_FEATURE_BALLOT_BIT_KHR 0x00000008 -#define GL_SUBGROUP_FEATURE_BASIC_BIT_KHR 0x00000001 -#define GL_SUBGROUP_FEATURE_CLUSTERED_BIT_KHR 0x00000040 -#define GL_SUBGROUP_FEATURE_PARTITIONED_BIT_NV 0x00000100 -#define GL_SUBGROUP_FEATURE_QUAD_BIT_KHR 0x00000080 -#define GL_SUBGROUP_FEATURE_SHUFFLE_BIT_KHR 0x00000010 -#define GL_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT_KHR 0x00000020 -#define GL_SUBGROUP_FEATURE_VOTE_BIT_KHR 0x00000002 -#define GL_SUBGROUP_QUAD_ALL_STAGES_KHR 0x9535 -#define GL_SUBGROUP_SIZE_KHR 0x9532 -#define GL_SUBGROUP_SUPPORTED_FEATURES_KHR 0x9534 -#define GL_SUBGROUP_SUPPORTED_STAGES_KHR 0x9533 -#define GL_SUBPIXEL_BITS 0x0D50 -#define GL_SUBPIXEL_PRECISION_BIAS_X_BITS_NV 0x9347 -#define GL_SUBPIXEL_PRECISION_BIAS_Y_BITS_NV 0x9348 -#define GL_SUBSAMPLE_DISTANCE_AMD 0x883F -#define GL_SUBTRACT_ARB 0x84E7 -#define GL_SUB_ATI 0x8965 -#define GL_SUCCESS_NV 0x902F -#define GL_SUPERSAMPLE_SCALE_X_NV 0x9372 -#define GL_SUPERSAMPLE_SCALE_Y_NV 0x9373 -#define GL_SUPPORTED_MULTISAMPLE_MODES_AMD 0x91B7 -#define GL_SURFACE_MAPPED_NV 0x8700 -#define GL_SURFACE_REGISTERED_NV 0x86FD -#define GL_SURFACE_STATE_NV 0x86EB -#define GL_SWIZZLE_STQ_ATI 0x8977 -#define GL_SWIZZLE_STQ_DQ_ATI 0x8979 -#define GL_SWIZZLE_STRQ_ATI 0x897A -#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B -#define GL_SWIZZLE_STR_ATI 0x8976 -#define GL_SWIZZLE_STR_DR_ATI 0x8978 -#define GL_SYNC_CL_EVENT_ARB 0x8240 -#define GL_SYNC_CL_EVENT_COMPLETE_ARB 0x8241 -#define GL_SYNC_CONDITION 0x9113 -#define GL_SYNC_FENCE 0x9116 -#define GL_SYNC_FLAGS 0x9115 -#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 -#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 -#define GL_SYNC_STATUS 0x9114 -#define GL_SYNC_X11_FENCE_EXT 0x90E1 -#define GL_SYSTEM_FONT_NAME_NV 0x9073 -#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3 -#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4 -#define GL_T2F_IUI_V2F_EXT 0x81B1 -#define GL_T2F_IUI_V3F_EXT 0x81B2 -#define GL_TABLE_TOO_LARGE_EXT 0x8031 -#define GL_TANGENT_ARRAY_EXT 0x8439 -#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442 -#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F -#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E -#define GL_TASK_SHADER_BIT_NV 0x00000080 -#define GL_TASK_SHADER_NV 0x955A -#define GL_TASK_SUBROUTINE_NV 0x957D -#define GL_TASK_SUBROUTINE_UNIFORM_NV 0x957F -#define GL_TASK_WORK_GROUP_SIZE_NV 0x953F -#define GL_TERMINATE_SEQUENCE_COMMAND_NV 0x0000 -#define GL_TESSELLATION_FACTOR_AMD 0x9005 -#define GL_TESSELLATION_MODE_AMD 0x9004 -#define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75 -#define GL_TESS_CONTROL_PROGRAM_NV 0x891E -#define GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV 0x8C74 -#define GL_TESS_CONTROL_SHADER 0x8E88 -#define GL_TESS_CONTROL_SHADER_BIT 0x00000008 -#define GL_TESS_CONTROL_SHADER_PATCHES 0x82F1 -#define GL_TESS_CONTROL_SHADER_PATCHES_ARB 0x82F1 -#define GL_TESS_CONTROL_SUBROUTINE 0x92E9 -#define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF -#define GL_TESS_CONTROL_TEXTURE 0x829C -#define GL_TESS_EVALUATION_PROGRAM_NV 0x891F -#define GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV 0x8C75 -#define GL_TESS_EVALUATION_SHADER 0x8E87 -#define GL_TESS_EVALUATION_SHADER_BIT 0x00000010 -#define GL_TESS_EVALUATION_SHADER_INVOCATIONS 0x82F2 -#define GL_TESS_EVALUATION_SHADER_INVOCATIONS_ARB 0x82F2 -#define GL_TESS_EVALUATION_SUBROUTINE 0x92EA -#define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0 -#define GL_TESS_EVALUATION_TEXTURE 0x829D -#define GL_TESS_GEN_MODE 0x8E76 -#define GL_TESS_GEN_POINT_MODE 0x8E79 -#define GL_TESS_GEN_SPACING 0x8E77 -#define GL_TESS_GEN_VERTEX_ORDER 0x8E78 -#define GL_TEXCOORD1_BIT_PGI 0x10000000 -#define GL_TEXCOORD2_BIT_PGI 0x20000000 -#define GL_TEXCOORD3_BIT_PGI 0x40000000 -#define GL_TEXCOORD4_BIT_PGI 0x80000000 -#define GL_TEXTURE 0x1702 -#define GL_TEXTURE0 0x84C0 -#define GL_TEXTURE0_ARB 0x84C0 -#define GL_TEXTURE1 0x84C1 -#define GL_TEXTURE10 0x84CA -#define GL_TEXTURE10_ARB 0x84CA -#define GL_TEXTURE11 0x84CB -#define GL_TEXTURE11_ARB 0x84CB -#define GL_TEXTURE12 0x84CC -#define GL_TEXTURE12_ARB 0x84CC -#define GL_TEXTURE13 0x84CD -#define GL_TEXTURE13_ARB 0x84CD -#define GL_TEXTURE14 0x84CE -#define GL_TEXTURE14_ARB 0x84CE -#define GL_TEXTURE15 0x84CF -#define GL_TEXTURE15_ARB 0x84CF -#define GL_TEXTURE16 0x84D0 -#define GL_TEXTURE16_ARB 0x84D0 -#define GL_TEXTURE17 0x84D1 -#define GL_TEXTURE17_ARB 0x84D1 -#define GL_TEXTURE18 0x84D2 -#define GL_TEXTURE18_ARB 0x84D2 -#define GL_TEXTURE19 0x84D3 -#define GL_TEXTURE19_ARB 0x84D3 -#define GL_TEXTURE1_ARB 0x84C1 -#define GL_TEXTURE2 0x84C2 -#define GL_TEXTURE20 0x84D4 -#define GL_TEXTURE20_ARB 0x84D4 -#define GL_TEXTURE21 0x84D5 -#define GL_TEXTURE21_ARB 0x84D5 -#define GL_TEXTURE22 0x84D6 -#define GL_TEXTURE22_ARB 0x84D6 -#define GL_TEXTURE23 0x84D7 -#define GL_TEXTURE23_ARB 0x84D7 -#define GL_TEXTURE24 0x84D8 -#define GL_TEXTURE24_ARB 0x84D8 -#define GL_TEXTURE25 0x84D9 -#define GL_TEXTURE25_ARB 0x84D9 -#define GL_TEXTURE26 0x84DA -#define GL_TEXTURE26_ARB 0x84DA -#define GL_TEXTURE27 0x84DB -#define GL_TEXTURE27_ARB 0x84DB -#define GL_TEXTURE28 0x84DC -#define GL_TEXTURE28_ARB 0x84DC -#define GL_TEXTURE29 0x84DD -#define GL_TEXTURE29_ARB 0x84DD -#define GL_TEXTURE2_ARB 0x84C2 -#define GL_TEXTURE3 0x84C3 -#define GL_TEXTURE30 0x84DE -#define GL_TEXTURE30_ARB 0x84DE -#define GL_TEXTURE31 0x84DF -#define GL_TEXTURE31_ARB 0x84DF -#define GL_TEXTURE3_ARB 0x84C3 -#define GL_TEXTURE4 0x84C4 -#define GL_TEXTURE4_ARB 0x84C4 -#define GL_TEXTURE5 0x84C5 -#define GL_TEXTURE5_ARB 0x84C5 -#define GL_TEXTURE6 0x84C6 -#define GL_TEXTURE6_ARB 0x84C6 -#define GL_TEXTURE7 0x84C7 -#define GL_TEXTURE7_ARB 0x84C7 -#define GL_TEXTURE8 0x84C8 -#define GL_TEXTURE8_ARB 0x84C8 -#define GL_TEXTURE9 0x84C9 -#define GL_TEXTURE9_ARB 0x84C9 -#define GL_TEXTURE_1D 0x0DE0 -#define GL_TEXTURE_1D_ARRAY 0x8C18 -#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18 -#define GL_TEXTURE_1D_BINDING_EXT 0x8068 -#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D -#define GL_TEXTURE_1D_STACK_MESAX 0x8759 -#define GL_TEXTURE_2D 0x0DE1 -#define GL_TEXTURE_2D_ARRAY 0x8C1A -#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A -#define GL_TEXTURE_2D_BINDING_EXT 0x8069 -#define GL_TEXTURE_2D_MULTISAMPLE 0x9100 -#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102 -#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E -#define GL_TEXTURE_2D_STACK_MESAX 0x875A -#define GL_TEXTURE_3D 0x806F -#define GL_TEXTURE_3D_BINDING_EXT 0x806A -#define GL_TEXTURE_3D_EXT 0x806F -#define GL_TEXTURE_4DSIZE_SGIS 0x8136 -#define GL_TEXTURE_4D_BINDING_SGIS 0x814F -#define GL_TEXTURE_4D_SGIS 0x8134 -#define GL_TEXTURE_ALPHA_SIZE 0x805F -#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F -#define GL_TEXTURE_ALPHA_TYPE 0x8C13 -#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13 -#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F -#define GL_TEXTURE_BASE_LEVEL 0x813C -#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C -#define GL_TEXTURE_BINDING_1D 0x8068 -#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C -#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C -#define GL_TEXTURE_BINDING_2D 0x8069 -#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D -#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D -#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104 -#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105 -#define GL_TEXTURE_BINDING_3D 0x806A -#define GL_TEXTURE_BINDING_BUFFER 0x8C2C -#define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C -#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C -#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 -#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514 -#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A -#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A -#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514 -#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6 -#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6 -#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6 -#define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53 -#define GL_TEXTURE_BLUE_SIZE 0x805E -#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E -#define GL_TEXTURE_BLUE_TYPE 0x8C12 -#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12 -#define GL_TEXTURE_BORDER_COLOR 0x1004 -#define GL_TEXTURE_BORDER_VALUES_NV 0x871A -#define GL_TEXTURE_BUFFER 0x8C2A -#define GL_TEXTURE_BUFFER_ARB 0x8C2A -#define GL_TEXTURE_BUFFER_BINDING 0x8C2A -#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D -#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D -#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D -#define GL_TEXTURE_BUFFER_EXT 0x8C2A -#define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E -#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E -#define GL_TEXTURE_BUFFER_OFFSET 0x919D -#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F -#define GL_TEXTURE_BUFFER_SIZE 0x919E -#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171 -#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176 -#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172 -#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175 -#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173 -#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174 -#define GL_TEXTURE_COLOR_SAMPLES_NV 0x9046 -#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC -#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF -#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF -#define GL_TEXTURE_COMPARE_FUNC 0x884D -#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D -#define GL_TEXTURE_COMPARE_MODE 0x884C -#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C -#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B -#define GL_TEXTURE_COMPARE_SGIX 0x819A -#define GL_TEXTURE_COMPRESSED 0x86A1 -#define GL_TEXTURE_COMPRESSED_ARB 0x86A1 -#define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2 -#define GL_TEXTURE_COMPRESSED_BLOCK_SIZE 0x82B3 -#define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1 -#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 -#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0 -#define GL_TEXTURE_COMPRESSION_HINT 0x84EF -#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF -#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6 -#define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25 -#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A -#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B -#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078 -#define GL_TEXTURE_COORD_ARRAY_LENGTH_NV 0x8F2F -#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074 -#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084 -#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8 -#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092 -#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088 -#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A -#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089 -#define GL_TEXTURE_COORD_NV 0x8C79 -#define GL_TEXTURE_COVERAGE_SAMPLES_NV 0x9045 -#define GL_TEXTURE_CUBE_MAP 0x8513 -#define GL_TEXTURE_CUBE_MAP_ARB 0x8513 -#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009 -#define GL_TEXTURE_CUBE_MAP_ARRAY_ARB 0x9009 -#define GL_TEXTURE_CUBE_MAP_EXT 0x8513 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519 -#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F -#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001 -#define GL_TEXTURE_DEFORMATION_SGIX 0x8195 -#define GL_TEXTURE_DEPTH 0x8071 -#define GL_TEXTURE_DEPTH_EXT 0x8071 -#define GL_TEXTURE_DEPTH_SIZE 0x884A -#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A -#define GL_TEXTURE_DEPTH_TYPE 0x8C16 -#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16 -#define GL_TEXTURE_DS_SIZE_NV 0x871D -#define GL_TEXTURE_DT_SIZE_NV 0x871E -#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE -#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008 -#define GL_TEXTURE_FETCH_BARRIER_BIT_EXT 0x00000008 -#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147 -#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500 -#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107 -#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C -#define GL_TEXTURE_FREE_MEMORY_ATI 0x87FC -#define GL_TEXTURE_GATHER 0x82A2 -#define GL_TEXTURE_GATHER_SHADOW 0x82A3 -#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D -#define GL_TEXTURE_GREEN_SIZE 0x805D -#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D -#define GL_TEXTURE_GREEN_TYPE 0x8C11 -#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11 -#define GL_TEXTURE_HEIGHT 0x1001 -#define GL_TEXTURE_HI_SIZE_NV 0x871B -#define GL_TEXTURE_IMAGE_FORMAT 0x828F -#define GL_TEXTURE_IMAGE_TYPE 0x8290 -#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F -#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F -#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF -#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED -#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061 -#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15 -#define GL_TEXTURE_INTERNAL_FORMAT 0x1003 -#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C -#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167 -#define GL_TEXTURE_LIGHT_EXT 0x8350 -#define GL_TEXTURE_LOD_BIAS 0x8501 -#define GL_TEXTURE_LOD_BIAS_EXT 0x8501 -#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190 -#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E -#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F -#define GL_TEXTURE_LO_SIZE_NV 0x871C -#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060 -#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14 -#define GL_TEXTURE_MAG_FILTER 0x2800 -#define GL_TEXTURE_MAG_SIZE_NV 0x871F -#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351 -#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352 -#define GL_TEXTURE_MAX_ANISOTROPY 0x84FE -#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE -#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B -#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369 -#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A -#define GL_TEXTURE_MAX_LEVEL 0x813D -#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D -#define GL_TEXTURE_MAX_LOD 0x813B -#define GL_TEXTURE_MAX_LOD_SGIS 0x813B -#define GL_TEXTURE_MEMORY_LAYOUT_INTEL 0x83FF -#define GL_TEXTURE_MIN_FILTER 0x2801 -#define GL_TEXTURE_MIN_LOD 0x813A -#define GL_TEXTURE_MIN_LOD_SGIS 0x813A -#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E -#define GL_TEXTURE_NORMAL_EXT 0x85AF -#define GL_TEXTURE_POST_SPECULAR_HP 0x8168 -#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169 -#define GL_TEXTURE_PRIORITY_EXT 0x8066 -#define GL_TEXTURE_RANGE_LENGTH_APPLE 0x85B7 -#define GL_TEXTURE_RANGE_POINTER_APPLE 0x85B8 -#define GL_TEXTURE_RECTANGLE 0x84F5 -#define GL_TEXTURE_RECTANGLE_ARB 0x84F5 -#define GL_TEXTURE_RECTANGLE_NV 0x84F5 -#define GL_TEXTURE_REDUCTION_MODE_ARB 0x9366 -#define GL_TEXTURE_REDUCTION_MODE_EXT 0x9366 -#define GL_TEXTURE_RED_SIZE 0x805C -#define GL_TEXTURE_RED_SIZE_EXT 0x805C -#define GL_TEXTURE_RED_TYPE 0x8C10 -#define GL_TEXTURE_RED_TYPE_ARB 0x8C10 -#define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54 -#define GL_TEXTURE_RENDERBUFFER_NV 0x8E55 -#define GL_TEXTURE_RESIDENT_EXT 0x8067 -#define GL_TEXTURE_SAMPLES 0x9106 -#define GL_TEXTURE_SHADER_NV 0x86DE -#define GL_TEXTURE_SHADOW 0x82A1 -#define GL_TEXTURE_SHARED_SIZE 0x8C3F -#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F -#define GL_TEXTURE_SPARSE_ARB 0x91A6 -#define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48 -#define GL_TEXTURE_STENCIL_SIZE 0x88F1 -#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1 -#define GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC -#define GL_TEXTURE_STORAGE_SPARSE_BIT_AMD 0x00000001 -#define GL_TEXTURE_SWIZZLE_A 0x8E45 -#define GL_TEXTURE_SWIZZLE_A_EXT 0x8E45 -#define GL_TEXTURE_SWIZZLE_B 0x8E44 -#define GL_TEXTURE_SWIZZLE_B_EXT 0x8E44 -#define GL_TEXTURE_SWIZZLE_G 0x8E43 -#define GL_TEXTURE_SWIZZLE_G_EXT 0x8E43 -#define GL_TEXTURE_SWIZZLE_R 0x8E42 -#define GL_TEXTURE_SWIZZLE_RGBA 0x8E46 -#define GL_TEXTURE_SWIZZLE_RGBA_EXT 0x8E46 -#define GL_TEXTURE_SWIZZLE_R_EXT 0x8E42 -#define GL_TEXTURE_TARGET 0x1006 -#define GL_TEXTURE_TILING_EXT 0x9580 -#define GL_TEXTURE_TOO_LARGE_EXT 0x8065 -#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F -#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100 -#define GL_TEXTURE_UPDATE_BARRIER_BIT_EXT 0x00000100 -#define GL_TEXTURE_VIEW 0x82B5 -#define GL_TEXTURE_VIEW_MIN_LAYER 0x82DD -#define GL_TEXTURE_VIEW_MIN_LEVEL 0x82DB -#define GL_TEXTURE_VIEW_NUM_LAYERS 0x82DE -#define GL_TEXTURE_VIEW_NUM_LEVELS 0x82DC -#define GL_TEXTURE_WIDTH 0x1000 -#define GL_TEXTURE_WRAP_Q_SGIS 0x8137 -#define GL_TEXTURE_WRAP_R 0x8072 -#define GL_TEXTURE_WRAP_R_EXT 0x8072 -#define GL_TEXTURE_WRAP_S 0x2802 -#define GL_TEXTURE_WRAP_T 0x2803 -#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200 -#define GL_TILE_RASTER_ORDER_FIXED_MESA 0x8BB8 -#define GL_TILE_RASTER_ORDER_INCREASING_X_MESA 0x8BB9 -#define GL_TILE_RASTER_ORDER_INCREASING_Y_MESA 0x8BBA -#define GL_TILING_TYPES_EXT 0x9583 -#define GL_TIMELINE_SEMAPHORE_VALUE_NV 0x9595 -#define GL_TIMEOUT_EXPIRED 0x911B -#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFF -#define GL_TIMESTAMP 0x8E28 -#define GL_TIME_ELAPSED 0x88BF -#define GL_TIME_ELAPSED_EXT 0x88BF -#define GL_TOP_LEVEL_ARRAY_SIZE 0x930C -#define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D -#define GL_TRACK_MATRIX_NV 0x8648 -#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649 -#define GL_TRANSFORM_FEEDBACK 0x8E22 -#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 -#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E -#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800 -#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT 0x00000800 -#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 -#define GL_TRANSFORM_FEEDBACK_BINDING_NV 0x8E25 -#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E -#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24 -#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24 -#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F -#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F -#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F -#define GL_TRANSFORM_FEEDBACK_BUFFER_EXT 0x8C8E -#define GL_TRANSFORM_FEEDBACK_BUFFER_INDEX 0x934B -#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F -#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F -#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F -#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E -#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23 -#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23 -#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 -#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85 -#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85 -#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 -#define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84 -#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84 -#define GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE 0x934C -#define GL_TRANSFORM_FEEDBACK_NV 0x8E22 -#define GL_TRANSFORM_FEEDBACK_OVERFLOW 0x82EC -#define GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB 0x82EC -#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 -#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 -#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88 -#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88 -#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86 -#define GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW 0x82ED -#define GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB 0x82ED -#define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4 -#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 -#define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83 -#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83 -#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 -#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76 -#define GL_TRANSFORM_HINT_APPLE 0x85B1 -#define GL_TRANSLATE_2D_NV 0x9090 -#define GL_TRANSLATE_3D_NV 0x9091 -#define GL_TRANSLATE_X_NV 0x908E -#define GL_TRANSLATE_Y_NV 0x908F -#define GL_TRANSPOSE_AFFINE_2D_NV 0x9096 -#define GL_TRANSPOSE_AFFINE_3D_NV 0x9098 -#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6 -#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7 -#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3 -#define GL_TRANSPOSE_NV 0x862C -#define GL_TRANSPOSE_PROGRAM_MATRIX_EXT 0x8E2E -#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4 -#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5 -#define GL_TRIANGLES 0x0004 -#define GL_TRIANGLES_ADJACENCY 0x000C -#define GL_TRIANGLES_ADJACENCY_ARB 0x000C -#define GL_TRIANGLES_ADJACENCY_EXT 0x000C -#define GL_TRIANGLE_FAN 0x0006 -#define GL_TRIANGLE_LIST_SUN 0x81D7 -#define GL_TRIANGLE_MESH_SUN 0x8615 -#define GL_TRIANGLE_STRIP 0x0005 -#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D -#define GL_TRIANGLE_STRIP_ADJACENCY_ARB 0x000D -#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D -#define GL_TRIANGULAR_NV 0x90A5 -#define GL_TRUE 1 -#define GL_TYPE 0x92FA -#define GL_UNCORRELATED_NV 0x9282 -#define GL_UNDEFINED_APPLE 0x8A1C -#define GL_UNDEFINED_VERTEX 0x8260 -#define GL_UNIFORM 0x92E1 -#define GL_UNIFORM_ADDRESS_COMMAND_NV 0x000A -#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C -#define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA -#define GL_UNIFORM_BARRIER_BIT 0x00000004 -#define GL_UNIFORM_BARRIER_BIT_EXT 0x00000004 -#define GL_UNIFORM_BLOCK 0x92E2 -#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 -#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 -#define GL_UNIFORM_BLOCK_BINDING 0x8A3F -#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 -#define GL_UNIFORM_BLOCK_INDEX 0x8A3A -#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC -#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_MESH_SHADER_NV 0x959C -#define GL_UNIFORM_BLOCK_REFERENCED_BY_TASK_SHADER_NV 0x959D -#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 -#define GL_UNIFORM_BUFFER 0x8A11 -#define GL_UNIFORM_BUFFER_ADDRESS_NV 0x936F -#define GL_UNIFORM_BUFFER_BINDING 0x8A28 -#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF -#define GL_UNIFORM_BUFFER_EXT 0x8DEE -#define GL_UNIFORM_BUFFER_LENGTH_NV 0x9370 -#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 -#define GL_UNIFORM_BUFFER_SIZE 0x8A2A -#define GL_UNIFORM_BUFFER_START 0x8A29 -#define GL_UNIFORM_BUFFER_UNIFIED_NV 0x936E -#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E -#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D -#define GL_UNIFORM_NAME_LENGTH 0x8A39 -#define GL_UNIFORM_OFFSET 0x8A3B -#define GL_UNIFORM_SIZE 0x8A38 -#define GL_UNIFORM_TYPE 0x8A37 -#define GL_UNKNOWN_CONTEXT_RESET 0x8255 -#define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255 -#define GL_UNPACK_ALIGNMENT 0x0CF5 -#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2 -#define GL_UNPACK_CMYK_HINT_EXT 0x800F -#define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129 -#define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128 -#define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A -#define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127 -#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5 -#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133 -#define GL_UNPACK_IMAGE_HEIGHT 0x806E -#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E -#define GL_UNPACK_LSB_FIRST 0x0CF1 -#define GL_UNPACK_RESAMPLE_OML 0x8985 -#define GL_UNPACK_RESAMPLE_SGIX 0x842F -#define GL_UNPACK_ROW_BYTES_APPLE 0x8A16 -#define GL_UNPACK_ROW_LENGTH 0x0CF2 -#define GL_UNPACK_SKIP_IMAGES 0x806D -#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D -#define GL_UNPACK_SKIP_PIXELS 0x0CF4 -#define GL_UNPACK_SKIP_ROWS 0x0CF3 -#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132 -#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1 -#define GL_UNPACK_SWAP_BYTES 0x0CF0 -#define GL_UNSIGNALED 0x9118 -#define GL_UNSIGNED_BYTE 0x1401 -#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 -#define GL_UNSIGNED_BYTE_3_3_2 0x8032 -#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032 -#define GL_UNSIGNED_IDENTITY_NV 0x8536 -#define GL_UNSIGNED_INT 0x1405 -#define GL_UNSIGNED_INT16_NV 0x8FF0 -#define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1 -#define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2 -#define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3 -#define GL_UNSIGNED_INT64_AMD 0x8BC2 -#define GL_UNSIGNED_INT64_ARB 0x140F -#define GL_UNSIGNED_INT64_NV 0x140F -#define GL_UNSIGNED_INT64_VEC2_ARB 0x8FF5 -#define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5 -#define GL_UNSIGNED_INT64_VEC3_ARB 0x8FF6 -#define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6 -#define GL_UNSIGNED_INT64_VEC4_ARB 0x8FF7 -#define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7 -#define GL_UNSIGNED_INT8_NV 0x8FEC -#define GL_UNSIGNED_INT8_VEC2_NV 0x8FED -#define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE -#define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF -#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B -#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B -#define GL_UNSIGNED_INT_10_10_10_2 0x8036 -#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036 -#define GL_UNSIGNED_INT_24_8 0x84FA -#define GL_UNSIGNED_INT_24_8_EXT 0x84FA -#define GL_UNSIGNED_INT_24_8_NV 0x84FA -#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 -#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E -#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E -#define GL_UNSIGNED_INT_8_8_8_8 0x8035 -#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035 -#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 -#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB -#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB -#define GL_UNSIGNED_INT_IMAGE_1D 0x9062 -#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068 -#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT 0x9068 -#define GL_UNSIGNED_INT_IMAGE_1D_EXT 0x9062 -#define GL_UNSIGNED_INT_IMAGE_2D 0x9063 -#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069 -#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT 0x9069 -#define GL_UNSIGNED_INT_IMAGE_2D_EXT 0x9063 -#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B -#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C -#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x906C -#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT 0x906B -#define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065 -#define GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT 0x9065 -#define GL_UNSIGNED_INT_IMAGE_3D 0x9064 -#define GL_UNSIGNED_INT_IMAGE_3D_EXT 0x9064 -#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067 -#define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT 0x9067 -#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066 -#define GL_UNSIGNED_INT_IMAGE_CUBE_EXT 0x9066 -#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A -#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A -#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA -#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1 -#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6 -#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6 -#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1 -#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 -#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 -#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7 -#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2 -#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A -#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D -#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5 -#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5 -#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 -#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3 -#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8 -#define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003 -#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8 -#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 -#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4 -#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F -#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F -#define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58 -#define GL_UNSIGNED_INT_VEC2 0x8DC6 -#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6 -#define GL_UNSIGNED_INT_VEC3 0x8DC7 -#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7 -#define GL_UNSIGNED_INT_VEC4 0x8DC8 -#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8 -#define GL_UNSIGNED_INVERT_NV 0x8537 -#define GL_UNSIGNED_NORMALIZED 0x8C17 -#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17 -#define GL_UNSIGNED_SHORT 0x1403 -#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 -#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 -#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 -#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 -#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034 -#define GL_UNSIGNED_SHORT_5_6_5 0x8363 -#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 -#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA -#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA -#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB -#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB -#define GL_UPLOAD_GPU_MASK_NVX 0x954A -#define GL_UPPER_LEFT 0x8CA2 -#define GL_USE_MISSING_GLYPH_NV 0x90AA -#define GL_UTF16_NV 0x909B -#define GL_UTF8_NV 0x909A -#define GL_UUID_SIZE_EXT 16 -#define GL_VALIDATE_STATUS 0x8B83 -#define GL_VARIABLE_A_NV 0x8523 -#define GL_VARIABLE_B_NV 0x8524 -#define GL_VARIABLE_C_NV 0x8525 -#define GL_VARIABLE_D_NV 0x8526 -#define GL_VARIABLE_E_NV 0x8527 -#define GL_VARIABLE_F_NV 0x8528 -#define GL_VARIABLE_G_NV 0x8529 -#define GL_VARIANT_ARRAY_EXT 0x87E8 -#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9 -#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6 -#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7 -#define GL_VARIANT_DATATYPE_EXT 0x87E5 -#define GL_VARIANT_EXT 0x87C1 -#define GL_VARIANT_VALUE_EXT 0x87E4 -#define GL_VBO_FREE_MEMORY_ATI 0x87FB -#define GL_VECTOR_EXT 0x87BF -#define GL_VENDOR 0x1F00 -#define GL_VERSION 0x1F02 -#define GL_VERTEX23_BIT_PGI 0x00000004 -#define GL_VERTEX4_BIT_PGI 0x00000008 -#define GL_VERTEX_ARRAY 0x8074 -#define GL_VERTEX_ARRAY_ADDRESS_NV 0x8F21 -#define GL_VERTEX_ARRAY_BINDING 0x85B5 -#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5 -#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896 -#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D -#define GL_VERTEX_ARRAY_EXT 0x8074 -#define GL_VERTEX_ARRAY_LENGTH_NV 0x8F2B -#define GL_VERTEX_ARRAY_LIST_IBM 103070 -#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080 -#define GL_VERTEX_ARRAY_OBJECT_AMD 0x9154 -#define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154 -#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5 -#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E -#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D -#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E -#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E -#define GL_VERTEX_ARRAY_RANGE_NV 0x851D -#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521 -#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521 -#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F -#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533 -#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A -#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F -#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C -#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B -#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650 -#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A -#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B -#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C -#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D -#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E -#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F -#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651 -#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652 -#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653 -#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654 -#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655 -#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656 -#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657 -#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658 -#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659 -#define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20 -#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001 -#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT 0x00000001 -#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F -#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F -#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE -#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD -#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT 0x88FD -#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD -#define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV 0x8F2A -#define GL_VERTEX_ATTRIB_ARRAY_LONG 0x874E -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A -#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 -#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625 -#define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E -#define GL_VERTEX_ATTRIB_BINDING 0x82D4 -#define GL_VERTEX_ATTRIB_MAP1_APPLE 0x8A00 -#define GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE 0x8A03 -#define GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE 0x8A05 -#define GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE 0x8A04 -#define GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE 0x8A02 -#define GL_VERTEX_ATTRIB_MAP2_APPLE 0x8A01 -#define GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE 0x8A07 -#define GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE 0x8A09 -#define GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE 0x8A08 -#define GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE 0x8A06 -#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5 -#define GL_VERTEX_BINDING_BUFFER 0x8F4F -#define GL_VERTEX_BINDING_DIVISOR 0x82D6 -#define GL_VERTEX_BINDING_OFFSET 0x82D7 -#define GL_VERTEX_BINDING_STRIDE 0x82D8 -#define GL_VERTEX_BLEND_ARB 0x86A7 -#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B -#define GL_VERTEX_DATA_HINT_PGI 0x1A22A -#define GL_VERTEX_ELEMENT_SWIZZLE_AMD 0x91A4 -#define GL_VERTEX_ID_NV 0x8C7B -#define GL_VERTEX_ID_SWIZZLE_AMD 0x91A5 -#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF -#define GL_VERTEX_PRECLIP_SGIX 0x83EE -#define GL_VERTEX_PROGRAM_ARB 0x8620 -#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A -#define GL_VERTEX_PROGRAM_NV 0x8620 -#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2 -#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 -#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642 -#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642 -#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643 -#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643 -#define GL_VERTEX_SHADER 0x8B31 -#define GL_VERTEX_SHADER_ARB 0x8B31 -#define GL_VERTEX_SHADER_BINDING_EXT 0x8781 -#define GL_VERTEX_SHADER_BIT 0x00000001 -#define GL_VERTEX_SHADER_EXT 0x8780 -#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF -#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1 -#define GL_VERTEX_SHADER_INVOCATIONS 0x82F0 -#define GL_VERTEX_SHADER_INVOCATIONS_ARB 0x82F0 -#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3 -#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2 -#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4 -#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0 -#define GL_VERTEX_SOURCE_ATI 0x8774 -#define GL_VERTEX_STATE_PROGRAM_NV 0x8621 -#define GL_VERTEX_STREAM0_ATI 0x876C -#define GL_VERTEX_STREAM1_ATI 0x876D -#define GL_VERTEX_STREAM2_ATI 0x876E -#define GL_VERTEX_STREAM3_ATI 0x876F -#define GL_VERTEX_STREAM4_ATI 0x8770 -#define GL_VERTEX_STREAM5_ATI 0x8771 -#define GL_VERTEX_STREAM6_ATI 0x8772 -#define GL_VERTEX_STREAM7_ATI 0x8773 -#define GL_VERTEX_SUBROUTINE 0x92E8 -#define GL_VERTEX_SUBROUTINE_UNIFORM 0x92EE -#define GL_VERTEX_TEXTURE 0x829B -#define GL_VERTEX_WEIGHTING_EXT 0x8509 -#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C -#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510 -#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D -#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F -#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E -#define GL_VERTICAL_LINE_TO_NV 0x08 -#define GL_VERTICES_SUBMITTED 0x82EE -#define GL_VERTICES_SUBMITTED_ARB 0x82EE -#define GL_VIBRANCE_BIAS_NV 0x8719 -#define GL_VIBRANCE_SCALE_NV 0x8713 -#define GL_VIDEO_BUFFER_BINDING_NV 0x9021 -#define GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV 0x902D -#define GL_VIDEO_BUFFER_NV 0x9020 -#define GL_VIDEO_BUFFER_PITCH_NV 0x9028 -#define GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV 0x903B -#define GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV 0x903A -#define GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV 0x9039 -#define GL_VIDEO_CAPTURE_FRAME_WIDTH_NV 0x9038 -#define GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV 0x903C -#define GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV 0x9026 -#define GL_VIDEO_COLOR_CONVERSION_MATRIX_NV 0x9029 -#define GL_VIDEO_COLOR_CONVERSION_MAX_NV 0x902A -#define GL_VIDEO_COLOR_CONVERSION_MIN_NV 0x902B -#define GL_VIDEO_COLOR_CONVERSION_OFFSET_NV 0x902C -#define GL_VIEWPORT 0x0BA2 -#define GL_VIEWPORT_BOUNDS_RANGE 0x825D -#define GL_VIEWPORT_COMMAND_NV 0x0010 -#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F -#define GL_VIEWPORT_POSITION_W_SCALE_NV 0x937C -#define GL_VIEWPORT_POSITION_W_SCALE_X_COEFF_NV 0x937D -#define GL_VIEWPORT_POSITION_W_SCALE_Y_COEFF_NV 0x937E -#define GL_VIEWPORT_SUBPIXEL_BITS 0x825C -#define GL_VIEWPORT_SWIZZLE_NEGATIVE_W_NV 0x9357 -#define GL_VIEWPORT_SWIZZLE_NEGATIVE_X_NV 0x9351 -#define GL_VIEWPORT_SWIZZLE_NEGATIVE_Y_NV 0x9353 -#define GL_VIEWPORT_SWIZZLE_NEGATIVE_Z_NV 0x9355 -#define GL_VIEWPORT_SWIZZLE_POSITIVE_W_NV 0x9356 -#define GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV 0x9350 -#define GL_VIEWPORT_SWIZZLE_POSITIVE_Y_NV 0x9352 -#define GL_VIEWPORT_SWIZZLE_POSITIVE_Z_NV 0x9354 -#define GL_VIEWPORT_SWIZZLE_W_NV 0x935B -#define GL_VIEWPORT_SWIZZLE_X_NV 0x9358 -#define GL_VIEWPORT_SWIZZLE_Y_NV 0x9359 -#define GL_VIEWPORT_SWIZZLE_Z_NV 0x935A -#define GL_VIEW_CLASS_128_BITS 0x82C4 -#define GL_VIEW_CLASS_16_BITS 0x82CA -#define GL_VIEW_CLASS_24_BITS 0x82C9 -#define GL_VIEW_CLASS_32_BITS 0x82C8 -#define GL_VIEW_CLASS_48_BITS 0x82C7 -#define GL_VIEW_CLASS_64_BITS 0x82C6 -#define GL_VIEW_CLASS_8_BITS 0x82CB -#define GL_VIEW_CLASS_96_BITS 0x82C5 -#define GL_VIEW_CLASS_ASTC_10x10_RGBA 0x9393 -#define GL_VIEW_CLASS_ASTC_10x5_RGBA 0x9390 -#define GL_VIEW_CLASS_ASTC_10x6_RGBA 0x9391 -#define GL_VIEW_CLASS_ASTC_10x8_RGBA 0x9392 -#define GL_VIEW_CLASS_ASTC_12x10_RGBA 0x9394 -#define GL_VIEW_CLASS_ASTC_12x12_RGBA 0x9395 -#define GL_VIEW_CLASS_ASTC_4x4_RGBA 0x9388 -#define GL_VIEW_CLASS_ASTC_5x4_RGBA 0x9389 -#define GL_VIEW_CLASS_ASTC_5x5_RGBA 0x938A -#define GL_VIEW_CLASS_ASTC_6x5_RGBA 0x938B -#define GL_VIEW_CLASS_ASTC_6x6_RGBA 0x938C -#define GL_VIEW_CLASS_ASTC_8x5_RGBA 0x938D -#define GL_VIEW_CLASS_ASTC_8x6_RGBA 0x938E -#define GL_VIEW_CLASS_ASTC_8x8_RGBA 0x938F -#define GL_VIEW_CLASS_BPTC_FLOAT 0x82D3 -#define GL_VIEW_CLASS_BPTC_UNORM 0x82D2 -#define GL_VIEW_CLASS_EAC_R11 0x9383 -#define GL_VIEW_CLASS_EAC_RG11 0x9384 -#define GL_VIEW_CLASS_ETC2_EAC_RGBA 0x9387 -#define GL_VIEW_CLASS_ETC2_RGB 0x9385 -#define GL_VIEW_CLASS_ETC2_RGBA 0x9386 -#define GL_VIEW_CLASS_RGTC1_RED 0x82D0 -#define GL_VIEW_CLASS_RGTC2_RG 0x82D1 -#define GL_VIEW_CLASS_S3TC_DXT1_RGB 0x82CC -#define GL_VIEW_CLASS_S3TC_DXT1_RGBA 0x82CD -#define GL_VIEW_CLASS_S3TC_DXT3_RGBA 0x82CE -#define GL_VIEW_CLASS_S3TC_DXT5_RGBA 0x82CF -#define GL_VIEW_COMPATIBILITY_CLASS 0x82B6 -#define GL_VIRTUAL_PAGE_SIZE_INDEX_ARB 0x91A7 -#define GL_VIRTUAL_PAGE_SIZE_X_AMD 0x9195 -#define GL_VIRTUAL_PAGE_SIZE_X_ARB 0x9195 -#define GL_VIRTUAL_PAGE_SIZE_Y_AMD 0x9196 -#define GL_VIRTUAL_PAGE_SIZE_Y_ARB 0x9196 -#define GL_VIRTUAL_PAGE_SIZE_Z_AMD 0x9197 -#define GL_VIRTUAL_PAGE_SIZE_Z_ARB 0x9197 -#define GL_VIVIDLIGHT_NV 0x92A6 -#define GL_VOLATILE_APPLE 0x8A1A -#define GL_WAIT_FAILED 0x911D -#define GL_WARPS_PER_SM_NV 0x933A -#define GL_WARP_SIZE_NV 0x9339 -#define GL_WEIGHTED_AVERAGE_ARB 0x9367 -#define GL_WEIGHTED_AVERAGE_EXT 0x9367 -#define GL_WEIGHT_ARRAY_ARB 0x86AD -#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E -#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC -#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB -#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA -#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9 -#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6 -#define GL_WIDE_LINE_HINT_PGI 0x1A222 -#define GL_WINDOW_RECTANGLE_EXT 0x8F12 -#define GL_WINDOW_RECTANGLE_MODE_EXT 0x8F13 -#define GL_WRAP_BORDER_SUN 0x81D4 -#define GL_WRITE_DISCARD_NV 0x88BE -#define GL_WRITE_ONLY 0x88B9 -#define GL_WRITE_ONLY_ARB 0x88B9 -#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A -#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878 -#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C -#define GL_W_EXT 0x87D8 -#define GL_XOR 0x1506 -#define GL_XOR_NV 0x1506 -#define GL_X_EXT 0x87D5 -#define GL_YCBAYCR8A_4224_NV 0x9032 -#define GL_YCBCR_422_APPLE 0x85B9 -#define GL_YCBCR_MESA 0x8757 -#define GL_YCBYCR8_422_NV 0x9031 -#define GL_YCRCBA_SGIX 0x8319 -#define GL_YCRCB_422_SGIX 0x81BB -#define GL_YCRCB_444_SGIX 0x81BC -#define GL_YCRCB_SGIX 0x8318 -#define GL_Y_EXT 0x87D6 -#define GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV 0x9036 -#define GL_Z4Y12Z4CB12Z4CR12_444_NV 0x9037 -#define GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV 0x9035 -#define GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV 0x9034 -#define GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV 0x9033 -#define GL_ZERO 0 -#define GL_ZERO_EXT 0x87DD -#define GL_ZERO_TO_ONE 0x935F -#define GL_Z_EXT 0x87D7 - -#include "khrplatform.h" -typedef unsigned int GLenum; -typedef unsigned char GLboolean; -typedef unsigned int GLbitfield; -typedef void GLvoid; -typedef khronos_int8_t GLbyte; -typedef khronos_uint8_t GLubyte; -typedef khronos_int16_t GLshort; -typedef khronos_uint16_t GLushort; -typedef int GLint; -typedef unsigned int GLuint; -typedef khronos_int32_t GLclampx; -typedef int GLsizei; -typedef khronos_float_t GLfloat; -typedef khronos_float_t GLclampf; -typedef double GLdouble; -typedef double GLclampd; -typedef void *GLeglClientBufferEXT; -typedef void *GLeglImageOES; -typedef char GLchar; -typedef char GLcharARB; -#ifdef __APPLE__ -typedef void *GLhandleARB; -#else -typedef unsigned int GLhandleARB; -#endif -typedef khronos_uint16_t GLhalf; -typedef khronos_uint16_t GLhalfARB; -typedef khronos_int32_t GLfixed; -#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \ - (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060) -typedef khronos_intptr_t GLintptr; -#else -typedef khronos_intptr_t GLintptr; -#endif -#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \ - (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060) -typedef khronos_intptr_t GLintptrARB; -#else -typedef khronos_intptr_t GLintptrARB; -#endif -#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \ - (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060) -typedef khronos_ssize_t GLsizeiptr; -#else -typedef khronos_ssize_t GLsizeiptr; -#endif -#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \ - (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060) -typedef khronos_ssize_t GLsizeiptrARB; -#else -typedef khronos_ssize_t GLsizeiptrARB; -#endif -typedef khronos_int64_t GLint64; -typedef khronos_int64_t GLint64EXT; -typedef khronos_uint64_t GLuint64; -typedef khronos_uint64_t GLuint64EXT; -typedef struct __GLsync *GLsync; -struct _cl_context; -struct _cl_event; -typedef void(GLAD_API_PTR *GLDEBUGPROC)(GLenum source, GLenum type, GLuint id, GLenum severity, - GLsizei length, const GLchar *message, - const void *userParam); -typedef void(GLAD_API_PTR *GLDEBUGPROCARB)(GLenum source, GLenum type, GLuint id, GLenum severity, - GLsizei length, const GLchar *message, - const void *userParam); -typedef void(GLAD_API_PTR *GLDEBUGPROCKHR)(GLenum source, GLenum type, GLuint id, GLenum severity, - GLsizei length, const GLchar *message, - const void *userParam); -typedef void(GLAD_API_PTR *GLDEBUGPROCAMD)(GLuint id, GLenum category, GLenum severity, - GLsizei length, const GLchar *message, void *userParam); -typedef unsigned short GLhalfNV; -typedef GLintptr GLvdpauSurfaceNV; -typedef void(GLAD_API_PTR *GLVULKANPROCNV)(void); - -#define GL_VERSION_1_0 1 -#define GL_VERSION_1_1 1 -#define GL_VERSION_1_2 1 -#define GL_VERSION_1_3 1 -#define GL_VERSION_1_4 1 -#define GL_VERSION_1_5 1 -#define GL_VERSION_2_0 1 -#define GL_VERSION_2_1 1 -#define GL_VERSION_3_0 1 -#define GL_VERSION_3_1 1 -#define GL_VERSION_3_2 1 -#define GL_VERSION_3_3 1 -#define GL_VERSION_4_0 1 -#define GL_VERSION_4_1 1 -#define GL_VERSION_4_2 1 -#define GL_VERSION_4_3 1 -#define GL_VERSION_4_4 1 -#define GL_VERSION_4_5 1 -#define GL_VERSION_4_6 1 -#define GL_3DFX_multisample 1 -#define GL_3DFX_tbuffer 1 -#define GL_3DFX_texture_compression_FXT1 1 -#define GL_AMD_blend_minmax_factor 1 -#define GL_AMD_conservative_depth 1 -#define GL_AMD_debug_output 1 -#define GL_AMD_depth_clamp_separate 1 -#define GL_AMD_draw_buffers_blend 1 -#define GL_AMD_framebuffer_multisample_advanced 1 -#define GL_AMD_framebuffer_sample_positions 1 -#define GL_AMD_gcn_shader 1 -#define GL_AMD_gpu_shader_half_float 1 -#define GL_AMD_gpu_shader_int16 1 -#define GL_AMD_gpu_shader_int64 1 -#define GL_AMD_interleaved_elements 1 -#define GL_AMD_multi_draw_indirect 1 -#define GL_AMD_name_gen_delete 1 -#define GL_AMD_occlusion_query_event 1 -#define GL_AMD_performance_monitor 1 -#define GL_AMD_pinned_memory 1 -#define GL_AMD_query_buffer_object 1 -#define GL_AMD_sample_positions 1 -#define GL_AMD_seamless_cubemap_per_texture 1 -#define GL_AMD_shader_atomic_counter_ops 1 -#define GL_AMD_shader_ballot 1 -#define GL_AMD_shader_explicit_vertex_parameter 1 -#define GL_AMD_shader_gpu_shader_half_float_fetch 1 -#define GL_AMD_shader_image_load_store_lod 1 -#define GL_AMD_shader_stencil_export 1 -#define GL_AMD_shader_trinary_minmax 1 -#define GL_AMD_sparse_texture 1 -#define GL_AMD_stencil_operation_extended 1 -#define GL_AMD_texture_gather_bias_lod 1 -#define GL_AMD_texture_texture4 1 -#define GL_AMD_transform_feedback3_lines_triangles 1 -#define GL_AMD_transform_feedback4 1 -#define GL_AMD_vertex_shader_layer 1 -#define GL_AMD_vertex_shader_tessellator 1 -#define GL_AMD_vertex_shader_viewport_index 1 -#define GL_APPLE_aux_depth_stencil 1 -#define GL_APPLE_client_storage 1 -#define GL_APPLE_element_array 1 -#define GL_APPLE_fence 1 -#define GL_APPLE_float_pixels 1 -#define GL_APPLE_flush_buffer_range 1 -#define GL_APPLE_object_purgeable 1 -#define GL_APPLE_rgb_422 1 -#define GL_APPLE_row_bytes 1 -#define GL_APPLE_specular_vector 1 -#define GL_APPLE_texture_range 1 -#define GL_APPLE_transform_hint 1 -#define GL_APPLE_vertex_array_object 1 -#define GL_APPLE_vertex_array_range 1 -#define GL_APPLE_vertex_program_evaluators 1 -#define GL_APPLE_ycbcr_422 1 -#define GL_ARB_ES2_compatibility 1 -#define GL_ARB_ES3_1_compatibility 1 -#define GL_ARB_ES3_2_compatibility 1 -#define GL_ARB_ES3_compatibility 1 -#define GL_ARB_arrays_of_arrays 1 -#define GL_ARB_base_instance 1 -#define GL_ARB_bindless_texture 1 -#define GL_ARB_blend_func_extended 1 -#define GL_ARB_buffer_storage 1 -#define GL_ARB_cl_event 1 -#define GL_ARB_clear_buffer_object 1 -#define GL_ARB_clear_texture 1 -#define GL_ARB_clip_control 1 -#define GL_ARB_color_buffer_float 1 -#define GL_ARB_compatibility 1 -#define GL_ARB_compressed_texture_pixel_storage 1 -#define GL_ARB_compute_shader 1 -#define GL_ARB_compute_variable_group_size 1 -#define GL_ARB_conditional_render_inverted 1 -#define GL_ARB_conservative_depth 1 -#define GL_ARB_copy_buffer 1 -#define GL_ARB_copy_image 1 -#define GL_ARB_cull_distance 1 -#define GL_ARB_debug_output 1 -#define GL_ARB_depth_buffer_float 1 -#define GL_ARB_depth_clamp 1 -#define GL_ARB_depth_texture 1 -#define GL_ARB_derivative_control 1 -#define GL_ARB_direct_state_access 1 -#define GL_ARB_draw_buffers 1 -#define GL_ARB_draw_buffers_blend 1 -#define GL_ARB_draw_elements_base_vertex 1 -#define GL_ARB_draw_indirect 1 -#define GL_ARB_draw_instanced 1 -#define GL_ARB_enhanced_layouts 1 -#define GL_ARB_explicit_attrib_location 1 -#define GL_ARB_explicit_uniform_location 1 -#define GL_ARB_fragment_coord_conventions 1 -#define GL_ARB_fragment_layer_viewport 1 -#define GL_ARB_fragment_program 1 -#define GL_ARB_fragment_program_shadow 1 -#define GL_ARB_fragment_shader 1 -#define GL_ARB_fragment_shader_interlock 1 -#define GL_ARB_framebuffer_no_attachments 1 -#define GL_ARB_framebuffer_object 1 -#define GL_ARB_framebuffer_sRGB 1 -#define GL_ARB_geometry_shader4 1 -#define GL_ARB_get_program_binary 1 -#define GL_ARB_get_texture_sub_image 1 -#define GL_ARB_gl_spirv 1 -#define GL_ARB_gpu_shader5 1 -#define GL_ARB_gpu_shader_fp64 1 -#define GL_ARB_gpu_shader_int64 1 -#define GL_ARB_half_float_pixel 1 -#define GL_ARB_half_float_vertex 1 -#define GL_ARB_imaging 1 -#define GL_ARB_indirect_parameters 1 -#define GL_ARB_instanced_arrays 1 -#define GL_ARB_internalformat_query 1 -#define GL_ARB_internalformat_query2 1 -#define GL_ARB_invalidate_subdata 1 -#define GL_ARB_map_buffer_alignment 1 -#define GL_ARB_map_buffer_range 1 -#define GL_ARB_matrix_palette 1 -#define GL_ARB_multi_bind 1 -#define GL_ARB_multi_draw_indirect 1 -#define GL_ARB_multisample 1 -#define GL_ARB_multitexture 1 -#define GL_ARB_occlusion_query 1 -#define GL_ARB_occlusion_query2 1 -#define GL_ARB_parallel_shader_compile 1 -#define GL_ARB_pipeline_statistics_query 1 -#define GL_ARB_pixel_buffer_object 1 -#define GL_ARB_point_parameters 1 -#define GL_ARB_point_sprite 1 -#define GL_ARB_polygon_offset_clamp 1 -#define GL_ARB_post_depth_coverage 1 -#define GL_ARB_program_interface_query 1 -#define GL_ARB_provoking_vertex 1 -#define GL_ARB_query_buffer_object 1 -#define GL_ARB_robust_buffer_access_behavior 1 -#define GL_ARB_robustness 1 -#define GL_ARB_robustness_isolation 1 -#define GL_ARB_sample_locations 1 -#define GL_ARB_sample_shading 1 -#define GL_ARB_sampler_objects 1 -#define GL_ARB_seamless_cube_map 1 -#define GL_ARB_seamless_cubemap_per_texture 1 -#define GL_ARB_separate_shader_objects 1 -#define GL_ARB_shader_atomic_counter_ops 1 -#define GL_ARB_shader_atomic_counters 1 -#define GL_ARB_shader_ballot 1 -#define GL_ARB_shader_bit_encoding 1 -#define GL_ARB_shader_clock 1 -#define GL_ARB_shader_draw_parameters 1 -#define GL_ARB_shader_group_vote 1 -#define GL_ARB_shader_image_load_store 1 -#define GL_ARB_shader_image_size 1 -#define GL_ARB_shader_objects 1 -#define GL_ARB_shader_precision 1 -#define GL_ARB_shader_stencil_export 1 -#define GL_ARB_shader_storage_buffer_object 1 -#define GL_ARB_shader_subroutine 1 -#define GL_ARB_shader_texture_image_samples 1 -#define GL_ARB_shader_texture_lod 1 -#define GL_ARB_shader_viewport_layer_array 1 -#define GL_ARB_shading_language_100 1 -#define GL_ARB_shading_language_420pack 1 -#define GL_ARB_shading_language_include 1 -#define GL_ARB_shading_language_packing 1 -#define GL_ARB_shadow 1 -#define GL_ARB_shadow_ambient 1 -#define GL_ARB_sparse_buffer 1 -#define GL_ARB_sparse_texture 1 -#define GL_ARB_sparse_texture2 1 -#define GL_ARB_sparse_texture_clamp 1 -#define GL_ARB_spirv_extensions 1 -#define GL_ARB_stencil_texturing 1 -#define GL_ARB_sync 1 -#define GL_ARB_tessellation_shader 1 -#define GL_ARB_texture_barrier 1 -#define GL_ARB_texture_border_clamp 1 -#define GL_ARB_texture_buffer_object 1 -#define GL_ARB_texture_buffer_object_rgb32 1 -#define GL_ARB_texture_buffer_range 1 -#define GL_ARB_texture_compression 1 -#define GL_ARB_texture_compression_bptc 1 -#define GL_ARB_texture_compression_rgtc 1 -#define GL_ARB_texture_cube_map 1 -#define GL_ARB_texture_cube_map_array 1 -#define GL_ARB_texture_env_add 1 -#define GL_ARB_texture_env_combine 1 -#define GL_ARB_texture_env_crossbar 1 -#define GL_ARB_texture_env_dot3 1 -#define GL_ARB_texture_filter_anisotropic 1 -#define GL_ARB_texture_filter_minmax 1 -#define GL_ARB_texture_float 1 -#define GL_ARB_texture_gather 1 -#define GL_ARB_texture_mirror_clamp_to_edge 1 -#define GL_ARB_texture_mirrored_repeat 1 -#define GL_ARB_texture_multisample 1 -#define GL_ARB_texture_non_power_of_two 1 -#define GL_ARB_texture_query_levels 1 -#define GL_ARB_texture_query_lod 1 -#define GL_ARB_texture_rectangle 1 -#define GL_ARB_texture_rg 1 -#define GL_ARB_texture_rgb10_a2ui 1 -#define GL_ARB_texture_stencil8 1 -#define GL_ARB_texture_storage 1 -#define GL_ARB_texture_storage_multisample 1 -#define GL_ARB_texture_swizzle 1 -#define GL_ARB_texture_view 1 -#define GL_ARB_timer_query 1 -#define GL_ARB_transform_feedback2 1 -#define GL_ARB_transform_feedback3 1 -#define GL_ARB_transform_feedback_instanced 1 -#define GL_ARB_transform_feedback_overflow_query 1 -#define GL_ARB_transpose_matrix 1 -#define GL_ARB_uniform_buffer_object 1 -#define GL_ARB_vertex_array_bgra 1 -#define GL_ARB_vertex_array_object 1 -#define GL_ARB_vertex_attrib_64bit 1 -#define GL_ARB_vertex_attrib_binding 1 -#define GL_ARB_vertex_blend 1 -#define GL_ARB_vertex_buffer_object 1 -#define GL_ARB_vertex_program 1 -#define GL_ARB_vertex_shader 1 -#define GL_ARB_vertex_type_10f_11f_11f_rev 1 -#define GL_ARB_vertex_type_2_10_10_10_rev 1 -#define GL_ARB_viewport_array 1 -#define GL_ARB_window_pos 1 -#define GL_ATI_draw_buffers 1 -#define GL_ATI_element_array 1 -#define GL_ATI_envmap_bumpmap 1 -#define GL_ATI_fragment_shader 1 -#define GL_ATI_map_object_buffer 1 -#define GL_ATI_meminfo 1 -#define GL_ATI_pixel_format_float 1 -#define GL_ATI_pn_triangles 1 -#define GL_ATI_separate_stencil 1 -#define GL_ATI_text_fragment_shader 1 -#define GL_ATI_texture_env_combine3 1 -#define GL_ATI_texture_float 1 -#define GL_ATI_texture_mirror_once 1 -#define GL_ATI_vertex_array_object 1 -#define GL_ATI_vertex_attrib_array_object 1 -#define GL_ATI_vertex_streams 1 -#define GL_EXT_422_pixels 1 -#define GL_EXT_EGL_image_storage 1 -#define GL_EXT_EGL_sync 1 -#define GL_EXT_abgr 1 -#define GL_EXT_bgra 1 -#define GL_EXT_bindable_uniform 1 -#define GL_EXT_blend_color 1 -#define GL_EXT_blend_equation_separate 1 -#define GL_EXT_blend_func_separate 1 -#define GL_EXT_blend_logic_op 1 -#define GL_EXT_blend_minmax 1 -#define GL_EXT_blend_subtract 1 -#define GL_EXT_clip_volume_hint 1 -#define GL_EXT_cmyka 1 -#define GL_EXT_color_subtable 1 -#define GL_EXT_compiled_vertex_array 1 -#define GL_EXT_convolution 1 -#define GL_EXT_coordinate_frame 1 -#define GL_EXT_copy_texture 1 -#define GL_EXT_cull_vertex 1 -#define GL_EXT_debug_label 1 -#define GL_EXT_debug_marker 1 -#define GL_EXT_depth_bounds_test 1 -#define GL_EXT_direct_state_access 1 -#define GL_EXT_draw_buffers2 1 -#define GL_EXT_draw_instanced 1 -#define GL_EXT_draw_range_elements 1 -#define GL_EXT_external_buffer 1 -#define GL_EXT_fog_coord 1 -#define GL_EXT_framebuffer_blit 1 -#define GL_EXT_framebuffer_blit_layers 1 -#define GL_EXT_framebuffer_multisample 1 -#define GL_EXT_framebuffer_multisample_blit_scaled 1 -#define GL_EXT_framebuffer_object 1 -#define GL_EXT_framebuffer_sRGB 1 -#define GL_EXT_geometry_shader4 1 -#define GL_EXT_gpu_program_parameters 1 -#define GL_EXT_gpu_shader4 1 -#define GL_EXT_histogram 1 -#define GL_EXT_index_array_formats 1 -#define GL_EXT_index_func 1 -#define GL_EXT_index_material 1 -#define GL_EXT_index_texture 1 -#define GL_EXT_light_texture 1 -#define GL_EXT_memory_object 1 -#define GL_EXT_memory_object_fd 1 -#define GL_EXT_memory_object_win32 1 -#define GL_EXT_misc_attribute 1 -#define GL_EXT_multi_draw_arrays 1 -#define GL_EXT_multisample 1 -#define GL_EXT_multiview_tessellation_geometry_shader 1 -#define GL_EXT_multiview_texture_multisample 1 -#define GL_EXT_multiview_timer_query 1 -#define GL_EXT_packed_depth_stencil 1 -#define GL_EXT_packed_float 1 -#define GL_EXT_packed_pixels 1 -#define GL_EXT_paletted_texture 1 -#define GL_EXT_pixel_buffer_object 1 -#define GL_EXT_pixel_transform 1 -#define GL_EXT_pixel_transform_color_table 1 -#define GL_EXT_point_parameters 1 -#define GL_EXT_polygon_offset 1 -#define GL_EXT_polygon_offset_clamp 1 -#define GL_EXT_post_depth_coverage 1 -#define GL_EXT_provoking_vertex 1 -#define GL_EXT_raster_multisample 1 -#define GL_EXT_rescale_normal 1 -#define GL_EXT_secondary_color 1 -#define GL_EXT_semaphore 1 -#define GL_EXT_semaphore_fd 1 -#define GL_EXT_semaphore_win32 1 -#define GL_EXT_separate_shader_objects 1 -#define GL_EXT_separate_specular_color 1 -#define GL_EXT_shader_framebuffer_fetch 1 -#define GL_EXT_shader_framebuffer_fetch_non_coherent 1 -#define GL_EXT_shader_image_load_formatted 1 -#define GL_EXT_shader_image_load_store 1 -#define GL_EXT_shader_integer_mix 1 -#define GL_EXT_shader_samples_identical 1 -#define GL_EXT_shadow_funcs 1 -#define GL_EXT_shared_texture_palette 1 -#define GL_EXT_sparse_texture2 1 -#define GL_EXT_stencil_clear_tag 1 -#define GL_EXT_stencil_two_side 1 -#define GL_EXT_stencil_wrap 1 -#define GL_EXT_subtexture 1 -#define GL_EXT_texture 1 -#define GL_EXT_texture3D 1 -#define GL_EXT_texture_array 1 -#define GL_EXT_texture_buffer_object 1 -#define GL_EXT_texture_compression_latc 1 -#define GL_EXT_texture_compression_rgtc 1 -#define GL_EXT_texture_compression_s3tc 1 -#define GL_EXT_texture_cube_map 1 -#define GL_EXT_texture_env_add 1 -#define GL_EXT_texture_env_combine 1 -#define GL_EXT_texture_env_dot3 1 -#define GL_EXT_texture_filter_anisotropic 1 -#define GL_EXT_texture_filter_minmax 1 -#define GL_EXT_texture_integer 1 -#define GL_EXT_texture_lod_bias 1 -#define GL_EXT_texture_mirror_clamp 1 -#define GL_EXT_texture_object 1 -#define GL_EXT_texture_perturb_normal 1 -#define GL_EXT_texture_sRGB 1 -#define GL_EXT_texture_sRGB_R8 1 -#define GL_EXT_texture_sRGB_RG8 1 -#define GL_EXT_texture_sRGB_decode 1 -#define GL_EXT_texture_shadow_lod 1 -#define GL_EXT_texture_shared_exponent 1 -#define GL_EXT_texture_snorm 1 -#define GL_EXT_texture_storage 1 -#define GL_EXT_texture_swizzle 1 -#define GL_EXT_timer_query 1 -#define GL_EXT_transform_feedback 1 -#define GL_EXT_vertex_array 1 -#define GL_EXT_vertex_array_bgra 1 -#define GL_EXT_vertex_attrib_64bit 1 -#define GL_EXT_vertex_shader 1 -#define GL_EXT_vertex_weighting 1 -#define GL_EXT_win32_keyed_mutex 1 -#define GL_EXT_window_rectangles 1 -#define GL_EXT_x11_sync_object 1 -#define GL_GREMEDY_frame_terminator 1 -#define GL_GREMEDY_string_marker 1 -#define GL_HP_convolution_border_modes 1 -#define GL_HP_image_transform 1 -#define GL_HP_occlusion_test 1 -#define GL_HP_texture_lighting 1 -#define GL_IBM_cull_vertex 1 -#define GL_IBM_multimode_draw_arrays 1 -#define GL_IBM_rasterpos_clip 1 -#define GL_IBM_static_data 1 -#define GL_IBM_texture_mirrored_repeat 1 -#define GL_IBM_vertex_array_lists 1 -#define GL_INGR_blend_func_separate 1 -#define GL_INGR_color_clamp 1 -#define GL_INGR_interlace_read 1 -#define GL_INTEL_blackhole_render 1 -#define GL_INTEL_conservative_rasterization 1 -#define GL_INTEL_fragment_shader_ordering 1 -#define GL_INTEL_framebuffer_CMAA 1 -#define GL_INTEL_map_texture 1 -#define GL_INTEL_parallel_arrays 1 -#define GL_INTEL_performance_query 1 -#define GL_KHR_blend_equation_advanced 1 -#define GL_KHR_blend_equation_advanced_coherent 1 -#define GL_KHR_context_flush_control 1 -#define GL_KHR_debug 1 -#define GL_KHR_no_error 1 -#define GL_KHR_parallel_shader_compile 1 -#define GL_KHR_robust_buffer_access_behavior 1 -#define GL_KHR_robustness 1 -#define GL_KHR_shader_subgroup 1 -#define GL_KHR_texture_compression_astc_hdr 1 -#define GL_KHR_texture_compression_astc_ldr 1 -#define GL_KHR_texture_compression_astc_sliced_3d 1 -#define GL_MESAX_texture_stack 1 -#define GL_MESA_framebuffer_flip_x 1 -#define GL_MESA_framebuffer_flip_y 1 -#define GL_MESA_framebuffer_swap_xy 1 -#define GL_MESA_pack_invert 1 -#define GL_MESA_program_binary_formats 1 -#define GL_MESA_resize_buffers 1 -#define GL_MESA_shader_integer_functions 1 -#define GL_MESA_tile_raster_order 1 -#define GL_MESA_window_pos 1 -#define GL_MESA_ycbcr_texture 1 -#define GL_NVX_blend_equation_advanced_multi_draw_buffers 1 -#define GL_NVX_conditional_render 1 -#define GL_NVX_gpu_memory_info 1 -#define GL_NVX_gpu_multicast2 1 -#define GL_NVX_linked_gpu_multicast 1 -#define GL_NVX_progress_fence 1 -#define GL_NV_alpha_to_coverage_dither_control 1 -#define GL_NV_bindless_multi_draw_indirect 1 -#define GL_NV_bindless_multi_draw_indirect_count 1 -#define GL_NV_bindless_texture 1 -#define GL_NV_blend_equation_advanced 1 -#define GL_NV_blend_equation_advanced_coherent 1 -#define GL_NV_blend_minmax_factor 1 -#define GL_NV_blend_square 1 -#define GL_NV_clip_space_w_scaling 1 -#define GL_NV_command_list 1 -#define GL_NV_compute_program5 1 -#define GL_NV_compute_shader_derivatives 1 -#define GL_NV_conditional_render 1 -#define GL_NV_conservative_raster 1 -#define GL_NV_conservative_raster_dilate 1 -#define GL_NV_conservative_raster_pre_snap 1 -#define GL_NV_conservative_raster_pre_snap_triangles 1 -#define GL_NV_conservative_raster_underestimation 1 -#define GL_NV_copy_depth_to_color 1 -#define GL_NV_copy_image 1 -#define GL_NV_deep_texture3D 1 -#define GL_NV_depth_buffer_float 1 -#define GL_NV_depth_clamp 1 -#define GL_NV_draw_texture 1 -#define GL_NV_draw_vulkan_image 1 -#define GL_NV_evaluators 1 -#define GL_NV_explicit_multisample 1 -#define GL_NV_fence 1 -#define GL_NV_fill_rectangle 1 -#define GL_NV_float_buffer 1 -#define GL_NV_fog_distance 1 -#define GL_NV_fragment_coverage_to_color 1 -#define GL_NV_fragment_program 1 -#define GL_NV_fragment_program2 1 -#define GL_NV_fragment_program4 1 -#define GL_NV_fragment_program_option 1 -#define GL_NV_fragment_shader_barycentric 1 -#define GL_NV_fragment_shader_interlock 1 -#define GL_NV_framebuffer_mixed_samples 1 -#define GL_NV_framebuffer_multisample_coverage 1 -#define GL_NV_geometry_program4 1 -#define GL_NV_geometry_shader4 1 -#define GL_NV_geometry_shader_passthrough 1 -#define GL_NV_gpu_multicast 1 -#define GL_NV_gpu_program4 1 -#define GL_NV_gpu_program5 1 -#define GL_NV_gpu_program5_mem_extended 1 -#define GL_NV_gpu_shader5 1 -#define GL_NV_half_float 1 -#define GL_NV_internalformat_sample_query 1 -#define GL_NV_light_max_exponent 1 -#define GL_NV_memory_attachment 1 -#define GL_NV_memory_object_sparse 1 -#define GL_NV_mesh_shader 1 -#define GL_NV_multisample_coverage 1 -#define GL_NV_multisample_filter_hint 1 -#define GL_NV_occlusion_query 1 -#define GL_NV_packed_depth_stencil 1 -#define GL_NV_parameter_buffer_object 1 -#define GL_NV_parameter_buffer_object2 1 -#define GL_NV_path_rendering 1 -#define GL_NV_path_rendering_shared_edge 1 -#define GL_NV_pixel_data_range 1 -#define GL_NV_point_sprite 1 -#define GL_NV_present_video 1 -#define GL_NV_primitive_restart 1 -#define GL_NV_primitive_shading_rate 1 -#define GL_NV_query_resource 1 -#define GL_NV_query_resource_tag 1 -#define GL_NV_register_combiners 1 -#define GL_NV_register_combiners2 1 -#define GL_NV_representative_fragment_test 1 -#define GL_NV_robustness_video_memory_purge 1 -#define GL_NV_sample_locations 1 -#define GL_NV_sample_mask_override_coverage 1 -#define GL_NV_scissor_exclusive 1 -#define GL_NV_shader_atomic_counters 1 -#define GL_NV_shader_atomic_float 1 -#define GL_NV_shader_atomic_float64 1 -#define GL_NV_shader_atomic_fp16_vector 1 -#define GL_NV_shader_atomic_int64 1 -#define GL_NV_shader_buffer_load 1 -#define GL_NV_shader_buffer_store 1 -#define GL_NV_shader_storage_buffer_object 1 -#define GL_NV_shader_subgroup_partitioned 1 -#define GL_NV_shader_texture_footprint 1 -#define GL_NV_shader_thread_group 1 -#define GL_NV_shader_thread_shuffle 1 -#define GL_NV_shading_rate_image 1 -#define GL_NV_stereo_view_rendering 1 -#define GL_NV_tessellation_program5 1 -#define GL_NV_texgen_emboss 1 -#define GL_NV_texgen_reflection 1 -#define GL_NV_texture_barrier 1 -#define GL_NV_texture_compression_vtc 1 -#define GL_NV_texture_env_combine4 1 -#define GL_NV_texture_expand_normal 1 -#define GL_NV_texture_multisample 1 -#define GL_NV_texture_rectangle 1 -#define GL_NV_texture_rectangle_compressed 1 -#define GL_NV_texture_shader 1 -#define GL_NV_texture_shader2 1 -#define GL_NV_texture_shader3 1 -#define GL_NV_timeline_semaphore 1 -#define GL_NV_transform_feedback 1 -#define GL_NV_transform_feedback2 1 -#define GL_NV_uniform_buffer_std430_layout 1 -#define GL_NV_uniform_buffer_unified_memory 1 -#define GL_NV_vdpau_interop 1 -#define GL_NV_vdpau_interop2 1 -#define GL_NV_vertex_array_range 1 -#define GL_NV_vertex_array_range2 1 -#define GL_NV_vertex_attrib_integer_64bit 1 -#define GL_NV_vertex_buffer_unified_memory 1 -#define GL_NV_vertex_program 1 -#define GL_NV_vertex_program1_1 1 -#define GL_NV_vertex_program2 1 -#define GL_NV_vertex_program2_option 1 -#define GL_NV_vertex_program3 1 -#define GL_NV_vertex_program4 1 -#define GL_NV_video_capture 1 -#define GL_NV_viewport_array2 1 -#define GL_NV_viewport_swizzle 1 -#define GL_OES_byte_coordinates 1 -#define GL_OES_compressed_paletted_texture 1 -#define GL_OES_fixed_point 1 -#define GL_OES_query_matrix 1 -#define GL_OES_read_format 1 -#define GL_OES_single_precision 1 -#define GL_OML_interlace 1 -#define GL_OML_resample 1 -#define GL_OML_subsample 1 -#define GL_OVR_multiview 1 -#define GL_OVR_multiview2 1 -#define GL_PGI_misc_hints 1 -#define GL_PGI_vertex_hints 1 -#define GL_REND_screen_coordinates 1 -#define GL_S3_s3tc 1 -#define GL_SGIS_detail_texture 1 -#define GL_SGIS_fog_function 1 -#define GL_SGIS_generate_mipmap 1 -#define GL_SGIS_multisample 1 -#define GL_SGIS_pixel_texture 1 -#define GL_SGIS_point_line_texgen 1 -#define GL_SGIS_point_parameters 1 -#define GL_SGIS_sharpen_texture 1 -#define GL_SGIS_texture4D 1 -#define GL_SGIS_texture_border_clamp 1 -#define GL_SGIS_texture_color_mask 1 -#define GL_SGIS_texture_edge_clamp 1 -#define GL_SGIS_texture_filter4 1 -#define GL_SGIS_texture_lod 1 -#define GL_SGIS_texture_select 1 -#define GL_SGIX_async 1 -#define GL_SGIX_async_histogram 1 -#define GL_SGIX_async_pixel 1 -#define GL_SGIX_blend_alpha_minmax 1 -#define GL_SGIX_calligraphic_fragment 1 -#define GL_SGIX_clipmap 1 -#define GL_SGIX_convolution_accuracy 1 -#define GL_SGIX_depth_pass_instrument 1 -#define GL_SGIX_depth_texture 1 -#define GL_SGIX_flush_raster 1 -#define GL_SGIX_fog_offset 1 -#define GL_SGIX_fragment_lighting 1 -#define GL_SGIX_framezoom 1 -#define GL_SGIX_igloo_interface 1 -#define GL_SGIX_instruments 1 -#define GL_SGIX_interlace 1 -#define GL_SGIX_ir_instrument1 1 -#define GL_SGIX_list_priority 1 -#define GL_SGIX_pixel_texture 1 -#define GL_SGIX_pixel_tiles 1 -#define GL_SGIX_polynomial_ffd 1 -#define GL_SGIX_reference_plane 1 -#define GL_SGIX_resample 1 -#define GL_SGIX_scalebias_hint 1 -#define GL_SGIX_shadow 1 -#define GL_SGIX_shadow_ambient 1 -#define GL_SGIX_sprite 1 -#define GL_SGIX_subsample 1 -#define GL_SGIX_tag_sample_buffer 1 -#define GL_SGIX_texture_add_env 1 -#define GL_SGIX_texture_coordinate_clamp 1 -#define GL_SGIX_texture_lod_bias 1 -#define GL_SGIX_texture_multi_buffer 1 -#define GL_SGIX_texture_scale_bias 1 -#define GL_SGIX_vertex_preclip 1 -#define GL_SGIX_ycrcb 1 -#define GL_SGIX_ycrcb_subsample 1 -#define GL_SGIX_ycrcba 1 -#define GL_SGI_color_matrix 1 -#define GL_SGI_color_table 1 -#define GL_SGI_texture_color_table 1 -#define GL_SUNX_constant_data 1 -#define GL_SUN_convolution_border_modes 1 -#define GL_SUN_global_alpha 1 -#define GL_SUN_mesh_array 1 -#define GL_SUN_slice_accum 1 -#define GL_SUN_triangle_list 1 -#define GL_SUN_vertex 1 -#define GL_WIN_phong_shading 1 -#define GL_WIN_specular_fog 1 - -typedef void(GLAD_API_PTR *PFNGLACCUMXOESPROC)(GLenum op, GLfixed value); -typedef GLboolean(GLAD_API_PTR *PFNGLACQUIREKEYEDMUTEXWIN32EXTPROC)(GLuint memory, GLuint64 key, - GLuint timeout); -typedef void(GLAD_API_PTR *PFNGLACTIVEPROGRAMEXTPROC)(GLuint program); -typedef void(GLAD_API_PTR *PFNGLACTIVESHADERPROGRAMPROC)(GLuint pipeline, GLuint program); -typedef void(GLAD_API_PTR *PFNGLACTIVESTENCILFACEEXTPROC)(GLenum face); -typedef void(GLAD_API_PTR *PFNGLACTIVETEXTUREPROC)(GLenum texture); -typedef void(GLAD_API_PTR *PFNGLACTIVETEXTUREARBPROC)(GLenum texture); -typedef void(GLAD_API_PTR *PFNGLACTIVEVARYINGNVPROC)(GLuint program, const GLchar *name); -typedef void(GLAD_API_PTR *PFNGLALPHAFRAGMENTOP1ATIPROC)(GLenum op, GLuint dst, GLuint dstMod, - GLuint arg1, GLuint arg1Rep, - GLuint arg1Mod); -typedef void(GLAD_API_PTR *PFNGLALPHAFRAGMENTOP2ATIPROC)(GLenum op, GLuint dst, GLuint dstMod, - GLuint arg1, GLuint arg1Rep, - GLuint arg1Mod, GLuint arg2, - GLuint arg2Rep, GLuint arg2Mod); -typedef void(GLAD_API_PTR *PFNGLALPHAFRAGMENTOP3ATIPROC)( - GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, - GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); -typedef void(GLAD_API_PTR *PFNGLALPHAFUNCXOESPROC)(GLenum func, GLfixed ref); -typedef void(GLAD_API_PTR *PFNGLALPHATOCOVERAGEDITHERCONTROLNVPROC)(GLenum mode); -typedef void(GLAD_API_PTR *PFNGLAPPLYFRAMEBUFFERATTACHMENTCMAAINTELPROC)(void); -typedef void(GLAD_API_PTR *PFNGLAPPLYTEXTUREEXTPROC)(GLenum mode); -typedef GLboolean(GLAD_API_PTR *PFNGLAREPROGRAMSRESIDENTNVPROC)(GLsizei n, const GLuint *programs, - GLboolean *residences); -typedef GLboolean(GLAD_API_PTR *PFNGLARETEXTURESRESIDENTEXTPROC)(GLsizei n, const GLuint *textures, - GLboolean *residences); -typedef void(GLAD_API_PTR *PFNGLARRAYELEMENTEXTPROC)(GLint i); -typedef void(GLAD_API_PTR *PFNGLARRAYOBJECTATIPROC)(GLenum array, GLint size, GLenum type, - GLsizei stride, GLuint buffer, GLuint offset); -typedef GLuint(GLAD_API_PTR *PFNGLASYNCCOPYBUFFERSUBDATANVXPROC)( - GLsizei waitSemaphoreCount, const GLuint *waitSemaphoreArray, - const GLuint64 *fenceValueArray, GLuint readGpu, GLbitfield writeGpuMask, GLuint readBuffer, - GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size, - GLsizei signalSemaphoreCount, const GLuint *signalSemaphoreArray, - const GLuint64 *signalValueArray); -typedef GLuint(GLAD_API_PTR *PFNGLASYNCCOPYIMAGESUBDATANVXPROC)( - GLsizei waitSemaphoreCount, const GLuint *waitSemaphoreArray, - const GLuint64 *waitValueArray, GLuint srcGpu, GLbitfield dstGpuMask, GLuint srcName, - GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, - GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, - GLsizei srcHeight, GLsizei srcDepth, GLsizei signalSemaphoreCount, - const GLuint *signalSemaphoreArray, const GLuint64 *signalValueArray); -typedef void(GLAD_API_PTR *PFNGLASYNCMARKERSGIXPROC)(GLuint marker); -typedef void(GLAD_API_PTR *PFNGLATTACHOBJECTARBPROC)(GLhandleARB containerObj, GLhandleARB obj); -typedef void(GLAD_API_PTR *PFNGLATTACHSHADERPROC)(GLuint program, GLuint shader); -typedef void(GLAD_API_PTR *PFNGLBEGINCONDITIONALRENDERPROC)(GLuint id, GLenum mode); -typedef void(GLAD_API_PTR *PFNGLBEGINCONDITIONALRENDERNVPROC)(GLuint id, GLenum mode); -typedef void(GLAD_API_PTR *PFNGLBEGINCONDITIONALRENDERNVXPROC)(GLuint id); -typedef void(GLAD_API_PTR *PFNGLBEGINFRAGMENTSHADERATIPROC)(void); -typedef void(GLAD_API_PTR *PFNGLBEGINOCCLUSIONQUERYNVPROC)(GLuint id); -typedef void(GLAD_API_PTR *PFNGLBEGINPERFMONITORAMDPROC)(GLuint monitor); -typedef void(GLAD_API_PTR *PFNGLBEGINPERFQUERYINTELPROC)(GLuint queryHandle); -typedef void(GLAD_API_PTR *PFNGLBEGINQUERYPROC)(GLenum target, GLuint id); -typedef void(GLAD_API_PTR *PFNGLBEGINQUERYARBPROC)(GLenum target, GLuint id); -typedef void(GLAD_API_PTR *PFNGLBEGINQUERYINDEXEDPROC)(GLenum target, GLuint index, GLuint id); -typedef void(GLAD_API_PTR *PFNGLBEGINTRANSFORMFEEDBACKPROC)(GLenum primitiveMode); -typedef void(GLAD_API_PTR *PFNGLBEGINTRANSFORMFEEDBACKEXTPROC)(GLenum primitiveMode); -typedef void(GLAD_API_PTR *PFNGLBEGINTRANSFORMFEEDBACKNVPROC)(GLenum primitiveMode); -typedef void(GLAD_API_PTR *PFNGLBEGINVERTEXSHADEREXTPROC)(void); -typedef void(GLAD_API_PTR *PFNGLBEGINVIDEOCAPTURENVPROC)(GLuint video_capture_slot); -typedef void(GLAD_API_PTR *PFNGLBINDATTRIBLOCATIONPROC)(GLuint program, GLuint index, - const GLchar *name); -typedef void(GLAD_API_PTR *PFNGLBINDATTRIBLOCATIONARBPROC)(GLhandleARB programObj, GLuint index, - const GLcharARB *name); -typedef void(GLAD_API_PTR *PFNGLBINDBUFFERPROC)(GLenum target, GLuint buffer); -typedef void(GLAD_API_PTR *PFNGLBINDBUFFERARBPROC)(GLenum target, GLuint buffer); -typedef void(GLAD_API_PTR *PFNGLBINDBUFFERBASEPROC)(GLenum target, GLuint index, GLuint buffer); -typedef void(GLAD_API_PTR *PFNGLBINDBUFFERBASEEXTPROC)(GLenum target, GLuint index, GLuint buffer); -typedef void(GLAD_API_PTR *PFNGLBINDBUFFERBASENVPROC)(GLenum target, GLuint index, GLuint buffer); -typedef void(GLAD_API_PTR *PFNGLBINDBUFFEROFFSETEXTPROC)(GLenum target, GLuint index, GLuint buffer, - GLintptr offset); -typedef void(GLAD_API_PTR *PFNGLBINDBUFFEROFFSETNVPROC)(GLenum target, GLuint index, GLuint buffer, - GLintptr offset); -typedef void(GLAD_API_PTR *PFNGLBINDBUFFERRANGEPROC)(GLenum target, GLuint index, GLuint buffer, - GLintptr offset, GLsizeiptr size); -typedef void(GLAD_API_PTR *PFNGLBINDBUFFERRANGEEXTPROC)(GLenum target, GLuint index, GLuint buffer, - GLintptr offset, GLsizeiptr size); -typedef void(GLAD_API_PTR *PFNGLBINDBUFFERRANGENVPROC)(GLenum target, GLuint index, GLuint buffer, - GLintptr offset, GLsizeiptr size); -typedef void(GLAD_API_PTR *PFNGLBINDBUFFERSBASEPROC)(GLenum target, GLuint first, GLsizei count, - const GLuint *buffers); -typedef void(GLAD_API_PTR *PFNGLBINDBUFFERSRANGEPROC)(GLenum target, GLuint first, GLsizei count, - const GLuint *buffers, - const GLintptr *offsets, - const GLsizeiptr *sizes); -typedef void(GLAD_API_PTR *PFNGLBINDFRAGDATALOCATIONPROC)(GLuint program, GLuint color, - const GLchar *name); -typedef void(GLAD_API_PTR *PFNGLBINDFRAGDATALOCATIONEXTPROC)(GLuint program, GLuint color, - const GLchar *name); -typedef void(GLAD_API_PTR *PFNGLBINDFRAGDATALOCATIONINDEXEDPROC)(GLuint program, GLuint colorNumber, - GLuint index, const GLchar *name); -typedef void(GLAD_API_PTR *PFNGLBINDFRAGMENTSHADERATIPROC)(GLuint id); -typedef void(GLAD_API_PTR *PFNGLBINDFRAMEBUFFERPROC)(GLenum target, GLuint framebuffer); -typedef void(GLAD_API_PTR *PFNGLBINDFRAMEBUFFEREXTPROC)(GLenum target, GLuint framebuffer); -typedef void(GLAD_API_PTR *PFNGLBINDIMAGETEXTUREPROC)(GLuint unit, GLuint texture, GLint level, - GLboolean layered, GLint layer, GLenum access, - GLenum format); -typedef void(GLAD_API_PTR *PFNGLBINDIMAGETEXTUREEXTPROC)(GLuint index, GLuint texture, GLint level, - GLboolean layered, GLint layer, - GLenum access, GLint format); -typedef void(GLAD_API_PTR *PFNGLBINDIMAGETEXTURESPROC)(GLuint first, GLsizei count, - const GLuint *textures); -typedef GLuint(GLAD_API_PTR *PFNGLBINDLIGHTPARAMETEREXTPROC)(GLenum light, GLenum value); -typedef GLuint(GLAD_API_PTR *PFNGLBINDMATERIALPARAMETEREXTPROC)(GLenum face, GLenum value); -typedef void(GLAD_API_PTR *PFNGLBINDMULTITEXTUREEXTPROC)(GLenum texunit, GLenum target, - GLuint texture); -typedef GLuint(GLAD_API_PTR *PFNGLBINDPARAMETEREXTPROC)(GLenum value); -typedef void(GLAD_API_PTR *PFNGLBINDPROGRAMARBPROC)(GLenum target, GLuint program); -typedef void(GLAD_API_PTR *PFNGLBINDPROGRAMNVPROC)(GLenum target, GLuint id); -typedef void(GLAD_API_PTR *PFNGLBINDPROGRAMPIPELINEPROC)(GLuint pipeline); -typedef void(GLAD_API_PTR *PFNGLBINDRENDERBUFFERPROC)(GLenum target, GLuint renderbuffer); -typedef void(GLAD_API_PTR *PFNGLBINDRENDERBUFFEREXTPROC)(GLenum target, GLuint renderbuffer); -typedef void(GLAD_API_PTR *PFNGLBINDSAMPLERPROC)(GLuint unit, GLuint sampler); -typedef void(GLAD_API_PTR *PFNGLBINDSAMPLERSPROC)(GLuint first, GLsizei count, - const GLuint *samplers); -typedef void(GLAD_API_PTR *PFNGLBINDSHADINGRATEIMAGENVPROC)(GLuint texture); -typedef GLuint(GLAD_API_PTR *PFNGLBINDTEXGENPARAMETEREXTPROC)(GLenum unit, GLenum coord, - GLenum value); -typedef void(GLAD_API_PTR *PFNGLBINDTEXTUREPROC)(GLenum target, GLuint texture); -typedef void(GLAD_API_PTR *PFNGLBINDTEXTUREEXTPROC)(GLenum target, GLuint texture); -typedef void(GLAD_API_PTR *PFNGLBINDTEXTUREUNITPROC)(GLuint unit, GLuint texture); -typedef GLuint(GLAD_API_PTR *PFNGLBINDTEXTUREUNITPARAMETEREXTPROC)(GLenum unit, GLenum value); -typedef void(GLAD_API_PTR *PFNGLBINDTEXTURESPROC)(GLuint first, GLsizei count, - const GLuint *textures); -typedef void(GLAD_API_PTR *PFNGLBINDTRANSFORMFEEDBACKPROC)(GLenum target, GLuint id); -typedef void(GLAD_API_PTR *PFNGLBINDTRANSFORMFEEDBACKNVPROC)(GLenum target, GLuint id); -typedef void(GLAD_API_PTR *PFNGLBINDVERTEXARRAYPROC)(GLuint array); -typedef void(GLAD_API_PTR *PFNGLBINDVERTEXARRAYAPPLEPROC)(GLuint array); -typedef void(GLAD_API_PTR *PFNGLBINDVERTEXBUFFERPROC)(GLuint bindingindex, GLuint buffer, - GLintptr offset, GLsizei stride); -typedef void(GLAD_API_PTR *PFNGLBINDVERTEXBUFFERSPROC)(GLuint first, GLsizei count, - const GLuint *buffers, - const GLintptr *offsets, - const GLsizei *strides); -typedef void(GLAD_API_PTR *PFNGLBINDVERTEXSHADEREXTPROC)(GLuint id); -typedef void(GLAD_API_PTR *PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC)(GLuint video_capture_slot, - GLuint stream, - GLenum frame_region, - GLintptrARB offset); -typedef void(GLAD_API_PTR *PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC)(GLuint video_capture_slot, - GLuint stream, - GLenum frame_region, - GLenum target, GLuint texture); -typedef void(GLAD_API_PTR *PFNGLBINORMAL3BEXTPROC)(GLbyte bx, GLbyte by, GLbyte bz); -typedef void(GLAD_API_PTR *PFNGLBINORMAL3BVEXTPROC)(const GLbyte *v); -typedef void(GLAD_API_PTR *PFNGLBINORMAL3DEXTPROC)(GLdouble bx, GLdouble by, GLdouble bz); -typedef void(GLAD_API_PTR *PFNGLBINORMAL3DVEXTPROC)(const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLBINORMAL3FEXTPROC)(GLfloat bx, GLfloat by, GLfloat bz); -typedef void(GLAD_API_PTR *PFNGLBINORMAL3FVEXTPROC)(const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLBINORMAL3IEXTPROC)(GLint bx, GLint by, GLint bz); -typedef void(GLAD_API_PTR *PFNGLBINORMAL3IVEXTPROC)(const GLint *v); -typedef void(GLAD_API_PTR *PFNGLBINORMAL3SEXTPROC)(GLshort bx, GLshort by, GLshort bz); -typedef void(GLAD_API_PTR *PFNGLBINORMAL3SVEXTPROC)(const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLBINORMALPOINTEREXTPROC)(GLenum type, GLsizei stride, - const void *pointer); -typedef void(GLAD_API_PTR *PFNGLBITMAPXOESPROC)(GLsizei width, GLsizei height, GLfixed xorig, - GLfixed yorig, GLfixed xmove, GLfixed ymove, - const GLubyte *bitmap); -typedef void(GLAD_API_PTR *PFNGLBLENDBARRIERKHRPROC)(void); -typedef void(GLAD_API_PTR *PFNGLBLENDBARRIERNVPROC)(void); -typedef void(GLAD_API_PTR *PFNGLBLENDCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, - GLfloat alpha); -typedef void(GLAD_API_PTR *PFNGLBLENDCOLOREXTPROC)(GLfloat red, GLfloat green, GLfloat blue, - GLfloat alpha); -typedef void(GLAD_API_PTR *PFNGLBLENDCOLORXOESPROC)(GLfixed red, GLfixed green, GLfixed blue, - GLfixed alpha); -typedef void(GLAD_API_PTR *PFNGLBLENDEQUATIONPROC)(GLenum mode); -typedef void(GLAD_API_PTR *PFNGLBLENDEQUATIONEXTPROC)(GLenum mode); -typedef void(GLAD_API_PTR *PFNGLBLENDEQUATIONINDEXEDAMDPROC)(GLuint buf, GLenum mode); -typedef void(GLAD_API_PTR *PFNGLBLENDEQUATIONSEPARATEPROC)(GLenum modeRGB, GLenum modeAlpha); -typedef void(GLAD_API_PTR *PFNGLBLENDEQUATIONSEPARATEEXTPROC)(GLenum modeRGB, GLenum modeAlpha); -typedef void(GLAD_API_PTR *PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC)(GLuint buf, GLenum modeRGB, - GLenum modeAlpha); -typedef void(GLAD_API_PTR *PFNGLBLENDEQUATIONSEPARATEIPROC)(GLuint buf, GLenum modeRGB, - GLenum modeAlpha); -typedef void(GLAD_API_PTR *PFNGLBLENDEQUATIONSEPARATEIARBPROC)(GLuint buf, GLenum modeRGB, - GLenum modeAlpha); -typedef void(GLAD_API_PTR *PFNGLBLENDEQUATIONIPROC)(GLuint buf, GLenum mode); -typedef void(GLAD_API_PTR *PFNGLBLENDEQUATIONIARBPROC)(GLuint buf, GLenum mode); -typedef void(GLAD_API_PTR *PFNGLBLENDFUNCPROC)(GLenum sfactor, GLenum dfactor); -typedef void(GLAD_API_PTR *PFNGLBLENDFUNCINDEXEDAMDPROC)(GLuint buf, GLenum src, GLenum dst); -typedef void(GLAD_API_PTR *PFNGLBLENDFUNCSEPARATEPROC)(GLenum sfactorRGB, GLenum dfactorRGB, - GLenum sfactorAlpha, GLenum dfactorAlpha); -typedef void(GLAD_API_PTR *PFNGLBLENDFUNCSEPARATEEXTPROC)(GLenum sfactorRGB, GLenum dfactorRGB, - GLenum sfactorAlpha, GLenum dfactorAlpha); -typedef void(GLAD_API_PTR *PFNGLBLENDFUNCSEPARATEINGRPROC)(GLenum sfactorRGB, GLenum dfactorRGB, - GLenum sfactorAlpha, - GLenum dfactorAlpha); -typedef void(GLAD_API_PTR *PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC)(GLuint buf, GLenum srcRGB, - GLenum dstRGB, GLenum srcAlpha, - GLenum dstAlpha); -typedef void(GLAD_API_PTR *PFNGLBLENDFUNCSEPARATEIPROC)(GLuint buf, GLenum srcRGB, GLenum dstRGB, - GLenum srcAlpha, GLenum dstAlpha); -typedef void(GLAD_API_PTR *PFNGLBLENDFUNCSEPARATEIARBPROC)(GLuint buf, GLenum srcRGB, GLenum dstRGB, - GLenum srcAlpha, GLenum dstAlpha); -typedef void(GLAD_API_PTR *PFNGLBLENDFUNCIPROC)(GLuint buf, GLenum src, GLenum dst); -typedef void(GLAD_API_PTR *PFNGLBLENDFUNCIARBPROC)(GLuint buf, GLenum src, GLenum dst); -typedef void(GLAD_API_PTR *PFNGLBLENDPARAMETERINVPROC)(GLenum pname, GLint value); -typedef void(GLAD_API_PTR *PFNGLBLITFRAMEBUFFERPROC)(GLint srcX0, GLint srcY0, GLint srcX1, - GLint srcY1, GLint dstX0, GLint dstY0, - GLint dstX1, GLint dstY1, GLbitfield mask, - GLenum filter); -typedef void(GLAD_API_PTR *PFNGLBLITFRAMEBUFFEREXTPROC)(GLint srcX0, GLint srcY0, GLint srcX1, - GLint srcY1, GLint dstX0, GLint dstY0, - GLint dstX1, GLint dstY1, GLbitfield mask, - GLenum filter); -typedef void(GLAD_API_PTR *PFNGLBLITFRAMEBUFFERLAYEREXTPROC)(GLint srcX0, GLint srcY0, GLint srcX1, - GLint srcY1, GLint srcLayer, - GLint dstX0, GLint dstY0, GLint dstX1, - GLint dstY1, GLint dstLayer, - GLbitfield mask, GLenum filter); -typedef void(GLAD_API_PTR *PFNGLBLITFRAMEBUFFERLAYERSEXTPROC)(GLint srcX0, GLint srcY0, GLint srcX1, - GLint srcY1, GLint dstX0, GLint dstY0, - GLint dstX1, GLint dstY1, - GLbitfield mask, GLenum filter); -typedef void(GLAD_API_PTR *PFNGLBLITNAMEDFRAMEBUFFERPROC)(GLuint readFramebuffer, - GLuint drawFramebuffer, GLint srcX0, - GLint srcY0, GLint srcX1, GLint srcY1, - GLint dstX0, GLint dstY0, GLint dstX1, - GLint dstY1, GLbitfield mask, - GLenum filter); -typedef void(GLAD_API_PTR *PFNGLBUFFERADDRESSRANGENVPROC)(GLenum pname, GLuint index, - GLuint64EXT address, GLsizeiptr length); -typedef void(GLAD_API_PTR *PFNGLBUFFERATTACHMEMORYNVPROC)(GLenum target, GLuint memory, - GLuint64 offset); -typedef void(GLAD_API_PTR *PFNGLBUFFERDATAPROC)(GLenum target, GLsizeiptr size, const void *data, - GLenum usage); -typedef void(GLAD_API_PTR *PFNGLBUFFERDATAARBPROC)(GLenum target, GLsizeiptrARB size, - const void *data, GLenum usage); -typedef void(GLAD_API_PTR *PFNGLBUFFERPAGECOMMITMENTARBPROC)(GLenum target, GLintptr offset, - GLsizeiptr size, GLboolean commit); -typedef void(GLAD_API_PTR *PFNGLBUFFERPAGECOMMITMENTMEMNVPROC)(GLenum target, GLintptr offset, - GLsizeiptr size, GLuint memory, - GLuint64 memOffset, - GLboolean commit); -typedef void(GLAD_API_PTR *PFNGLBUFFERPARAMETERIAPPLEPROC)(GLenum target, GLenum pname, - GLint param); -typedef void(GLAD_API_PTR *PFNGLBUFFERSTORAGEPROC)(GLenum target, GLsizeiptr size, const void *data, - GLbitfield flags); -typedef void(GLAD_API_PTR *PFNGLBUFFERSTORAGEEXTERNALEXTPROC)(GLenum target, GLintptr offset, - GLsizeiptr size, - GLeglClientBufferEXT clientBuffer, - GLbitfield flags); -typedef void(GLAD_API_PTR *PFNGLBUFFERSTORAGEMEMEXTPROC)(GLenum target, GLsizeiptr size, - GLuint memory, GLuint64 offset); -typedef void(GLAD_API_PTR *PFNGLBUFFERSUBDATAPROC)(GLenum target, GLintptr offset, GLsizeiptr size, - const void *data); -typedef void(GLAD_API_PTR *PFNGLBUFFERSUBDATAARBPROC)(GLenum target, GLintptrARB offset, - GLsizeiptrARB size, const void *data); -typedef void(GLAD_API_PTR *PFNGLCALLCOMMANDLISTNVPROC)(GLuint list); -typedef GLenum(GLAD_API_PTR *PFNGLCHECKFRAMEBUFFERSTATUSPROC)(GLenum target); -typedef GLenum(GLAD_API_PTR *PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC)(GLenum target); -typedef GLenum(GLAD_API_PTR *PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC)(GLuint framebuffer, - GLenum target); -typedef GLenum(GLAD_API_PTR *PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC)(GLuint framebuffer, - GLenum target); -typedef void(GLAD_API_PTR *PFNGLCLAMPCOLORPROC)(GLenum target, GLenum clamp); -typedef void(GLAD_API_PTR *PFNGLCLAMPCOLORARBPROC)(GLenum target, GLenum clamp); -typedef void(GLAD_API_PTR *PFNGLCLEARPROC)(GLbitfield mask); -typedef void(GLAD_API_PTR *PFNGLCLEARACCUMXOESPROC)(GLfixed red, GLfixed green, GLfixed blue, - GLfixed alpha); -typedef void(GLAD_API_PTR *PFNGLCLEARBUFFERDATAPROC)(GLenum target, GLenum internalformat, - GLenum format, GLenum type, const void *data); -typedef void(GLAD_API_PTR *PFNGLCLEARBUFFERSUBDATAPROC)(GLenum target, GLenum internalformat, - GLintptr offset, GLsizeiptr size, - GLenum format, GLenum type, - const void *data); -typedef void(GLAD_API_PTR *PFNGLCLEARBUFFERFIPROC)(GLenum buffer, GLint drawbuffer, GLfloat depth, - GLint stencil); -typedef void(GLAD_API_PTR *PFNGLCLEARBUFFERFVPROC)(GLenum buffer, GLint drawbuffer, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLCLEARBUFFERIVPROC)(GLenum buffer, GLint drawbuffer, - const GLint *value); -typedef void(GLAD_API_PTR *PFNGLCLEARBUFFERUIVPROC)(GLenum buffer, GLint drawbuffer, - const GLuint *value); -typedef void(GLAD_API_PTR *PFNGLCLEARCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, - GLfloat alpha); -typedef void(GLAD_API_PTR *PFNGLCLEARCOLORIIEXTPROC)(GLint red, GLint green, GLint blue, - GLint alpha); -typedef void(GLAD_API_PTR *PFNGLCLEARCOLORIUIEXTPROC)(GLuint red, GLuint green, GLuint blue, - GLuint alpha); -typedef void(GLAD_API_PTR *PFNGLCLEARCOLORXOESPROC)(GLfixed red, GLfixed green, GLfixed blue, - GLfixed alpha); -typedef void(GLAD_API_PTR *PFNGLCLEARDEPTHPROC)(GLdouble depth); -typedef void(GLAD_API_PTR *PFNGLCLEARDEPTHDNVPROC)(GLdouble depth); -typedef void(GLAD_API_PTR *PFNGLCLEARDEPTHFPROC)(GLfloat d); -typedef void(GLAD_API_PTR *PFNGLCLEARDEPTHFOESPROC)(GLclampf depth); -typedef void(GLAD_API_PTR *PFNGLCLEARDEPTHXOESPROC)(GLfixed depth); -typedef void(GLAD_API_PTR *PFNGLCLEARNAMEDBUFFERDATAPROC)(GLuint buffer, GLenum internalformat, - GLenum format, GLenum type, - const void *data); -typedef void(GLAD_API_PTR *PFNGLCLEARNAMEDBUFFERDATAEXTPROC)(GLuint buffer, GLenum internalformat, - GLenum format, GLenum type, - const void *data); -typedef void(GLAD_API_PTR *PFNGLCLEARNAMEDBUFFERSUBDATAPROC)(GLuint buffer, GLenum internalformat, - GLintptr offset, GLsizeiptr size, - GLenum format, GLenum type, - const void *data); -typedef void(GLAD_API_PTR *PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC)(GLuint buffer, - GLenum internalformat, - GLsizeiptr offset, GLsizeiptr size, - GLenum format, GLenum type, - const void *data); -typedef void(GLAD_API_PTR *PFNGLCLEARNAMEDFRAMEBUFFERFIPROC)(GLuint framebuffer, GLenum buffer, - GLint drawbuffer, GLfloat depth, - GLint stencil); -typedef void(GLAD_API_PTR *PFNGLCLEARNAMEDFRAMEBUFFERFVPROC)(GLuint framebuffer, GLenum buffer, - GLint drawbuffer, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLCLEARNAMEDFRAMEBUFFERIVPROC)(GLuint framebuffer, GLenum buffer, - GLint drawbuffer, const GLint *value); -typedef void(GLAD_API_PTR *PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC)(GLuint framebuffer, GLenum buffer, - GLint drawbuffer, - const GLuint *value); -typedef void(GLAD_API_PTR *PFNGLCLEARSTENCILPROC)(GLint s); -typedef void(GLAD_API_PTR *PFNGLCLEARTEXIMAGEPROC)(GLuint texture, GLint level, GLenum format, - GLenum type, const void *data); -typedef void(GLAD_API_PTR *PFNGLCLEARTEXSUBIMAGEPROC)(GLuint texture, GLint level, GLint xoffset, - GLint yoffset, GLint zoffset, GLsizei width, - GLsizei height, GLsizei depth, GLenum format, - GLenum type, const void *data); -typedef void(GLAD_API_PTR *PFNGLCLIENTACTIVETEXTUREARBPROC)(GLenum texture); -typedef void(GLAD_API_PTR *PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC)(GLenum stream); -typedef void(GLAD_API_PTR *PFNGLCLIENTATTRIBDEFAULTEXTPROC)(GLbitfield mask); -typedef void(GLAD_API_PTR *PFNGLCLIENTWAITSEMAPHOREUI64NVXPROC)(GLsizei fenceObjectCount, - const GLuint *semaphoreArray, - const GLuint64 *fenceValueArray); -typedef GLenum(GLAD_API_PTR *PFNGLCLIENTWAITSYNCPROC)(GLsync sync, GLbitfield flags, - GLuint64 timeout); -typedef void(GLAD_API_PTR *PFNGLCLIPCONTROLPROC)(GLenum origin, GLenum depth); -typedef void(GLAD_API_PTR *PFNGLCLIPPLANEFOESPROC)(GLenum plane, const GLfloat *equation); -typedef void(GLAD_API_PTR *PFNGLCLIPPLANEXOESPROC)(GLenum plane, const GLfixed *equation); -typedef void(GLAD_API_PTR *PFNGLCOLOR3FVERTEX3FSUNPROC)(GLfloat r, GLfloat g, GLfloat b, GLfloat x, - GLfloat y, GLfloat z); -typedef void(GLAD_API_PTR *PFNGLCOLOR3FVERTEX3FVSUNPROC)(const GLfloat *c, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLCOLOR3HNVPROC)(GLhalfNV red, GLhalfNV green, GLhalfNV blue); -typedef void(GLAD_API_PTR *PFNGLCOLOR3HVNVPROC)(const GLhalfNV *v); -typedef void(GLAD_API_PTR *PFNGLCOLOR3XOESPROC)(GLfixed red, GLfixed green, GLfixed blue); -typedef void(GLAD_API_PTR *PFNGLCOLOR3XVOESPROC)(const GLfixed *components); -typedef void(GLAD_API_PTR *PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC)(GLfloat r, GLfloat g, GLfloat b, - GLfloat a, GLfloat nx, GLfloat ny, - GLfloat nz, GLfloat x, GLfloat y, - GLfloat z); -typedef void(GLAD_API_PTR *PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC)(const GLfloat *c, const GLfloat *n, - const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLCOLOR4HNVPROC)(GLhalfNV red, GLhalfNV green, GLhalfNV blue, - GLhalfNV alpha); -typedef void(GLAD_API_PTR *PFNGLCOLOR4HVNVPROC)(const GLhalfNV *v); -typedef void(GLAD_API_PTR *PFNGLCOLOR4UBVERTEX2FSUNPROC)(GLubyte r, GLubyte g, GLubyte b, GLubyte a, - GLfloat x, GLfloat y); -typedef void(GLAD_API_PTR *PFNGLCOLOR4UBVERTEX2FVSUNPROC)(const GLubyte *c, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLCOLOR4UBVERTEX3FSUNPROC)(GLubyte r, GLubyte g, GLubyte b, GLubyte a, - GLfloat x, GLfloat y, GLfloat z); -typedef void(GLAD_API_PTR *PFNGLCOLOR4UBVERTEX3FVSUNPROC)(const GLubyte *c, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLCOLOR4XOESPROC)(GLfixed red, GLfixed green, GLfixed blue, - GLfixed alpha); -typedef void(GLAD_API_PTR *PFNGLCOLOR4XVOESPROC)(const GLfixed *components); -typedef void(GLAD_API_PTR *PFNGLCOLORFORMATNVPROC)(GLint size, GLenum type, GLsizei stride); -typedef void(GLAD_API_PTR *PFNGLCOLORFRAGMENTOP1ATIPROC)(GLenum op, GLuint dst, GLuint dstMask, - GLuint dstMod, GLuint arg1, GLuint arg1Rep, - GLuint arg1Mod); -typedef void(GLAD_API_PTR *PFNGLCOLORFRAGMENTOP2ATIPROC)(GLenum op, GLuint dst, GLuint dstMask, - GLuint dstMod, GLuint arg1, GLuint arg1Rep, - GLuint arg1Mod, GLuint arg2, - GLuint arg2Rep, GLuint arg2Mod); -typedef void(GLAD_API_PTR *PFNGLCOLORFRAGMENTOP3ATIPROC)(GLenum op, GLuint dst, GLuint dstMask, - GLuint dstMod, GLuint arg1, GLuint arg1Rep, - GLuint arg1Mod, GLuint arg2, - GLuint arg2Rep, GLuint arg2Mod, - GLuint arg3, GLuint arg3Rep, - GLuint arg3Mod); -typedef void(GLAD_API_PTR *PFNGLCOLORMASKPROC)(GLboolean red, GLboolean green, GLboolean blue, - GLboolean alpha); -typedef void(GLAD_API_PTR *PFNGLCOLORMASKINDEXEDEXTPROC)(GLuint index, GLboolean r, GLboolean g, - GLboolean b, GLboolean a); -typedef void(GLAD_API_PTR *PFNGLCOLORMASKIPROC)(GLuint index, GLboolean r, GLboolean g, GLboolean b, - GLboolean a); -typedef void(GLAD_API_PTR *PFNGLCOLORPOINTEREXTPROC)(GLint size, GLenum type, GLsizei stride, - GLsizei count, const void *pointer); -typedef void(GLAD_API_PTR *PFNGLCOLORPOINTERLISTIBMPROC)(GLint size, GLenum type, GLint stride, - const void **pointer, GLint ptrstride); -typedef void(GLAD_API_PTR *PFNGLCOLORPOINTERVINTELPROC)(GLint size, GLenum type, - const void **pointer); -typedef void(GLAD_API_PTR *PFNGLCOLORSUBTABLEEXTPROC)(GLenum target, GLsizei start, GLsizei count, - GLenum format, GLenum type, const void *data); -typedef void(GLAD_API_PTR *PFNGLCOLORTABLEEXTPROC)(GLenum target, GLenum internalFormat, - GLsizei width, GLenum format, GLenum type, - const void *table); -typedef void(GLAD_API_PTR *PFNGLCOLORTABLEPARAMETERFVSGIPROC)(GLenum target, GLenum pname, - const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLCOLORTABLEPARAMETERIVSGIPROC)(GLenum target, GLenum pname, - const GLint *params); -typedef void(GLAD_API_PTR *PFNGLCOLORTABLESGIPROC)(GLenum target, GLenum internalformat, - GLsizei width, GLenum format, GLenum type, - const void *table); -typedef void(GLAD_API_PTR *PFNGLCOMBINERINPUTNVPROC)(GLenum stage, GLenum portion, GLenum variable, - GLenum input, GLenum mapping, - GLenum componentUsage); -typedef void(GLAD_API_PTR *PFNGLCOMBINEROUTPUTNVPROC)(GLenum stage, GLenum portion, GLenum abOutput, - GLenum cdOutput, GLenum sumOutput, - GLenum scale, GLenum bias, - GLboolean abDotProduct, - GLboolean cdDotProduct, GLboolean muxSum); -typedef void(GLAD_API_PTR *PFNGLCOMBINERPARAMETERFNVPROC)(GLenum pname, GLfloat param); -typedef void(GLAD_API_PTR *PFNGLCOMBINERPARAMETERFVNVPROC)(GLenum pname, const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLCOMBINERPARAMETERINVPROC)(GLenum pname, GLint param); -typedef void(GLAD_API_PTR *PFNGLCOMBINERPARAMETERIVNVPROC)(GLenum pname, const GLint *params); -typedef void(GLAD_API_PTR *PFNGLCOMBINERSTAGEPARAMETERFVNVPROC)(GLenum stage, GLenum pname, - const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLCOMMANDLISTSEGMENTSNVPROC)(GLuint list, GLuint segments); -typedef void(GLAD_API_PTR *PFNGLCOMPILECOMMANDLISTNVPROC)(GLuint list); -typedef void(GLAD_API_PTR *PFNGLCOMPILESHADERPROC)(GLuint shader); -typedef void(GLAD_API_PTR *PFNGLCOMPILESHADERARBPROC)(GLhandleARB shaderObj); -typedef void(GLAD_API_PTR *PFNGLCOMPILESHADERINCLUDEARBPROC)(GLuint shader, GLsizei count, - const GLchar *const *path, - const GLint *length); -typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC)( - GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, - GLint border, GLsizei imageSize, const void *bits); -typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC)( - GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, - GLsizei height, GLint border, GLsizei imageSize, const void *bits); -typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC)( - GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, - GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits); -typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC)(GLenum texunit, GLenum target, - GLint level, GLint xoffset, - GLsizei width, GLenum format, - GLsizei imageSize, - const void *bits); -typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC)( - GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLsizei imageSize, const void *bits); -typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC)( - GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, - GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, - const void *bits); -typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXIMAGE1DPROC)(GLenum target, GLint level, - GLenum internalformat, GLsizei width, - GLint border, GLsizei imageSize, - const void *data); -typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXIMAGE1DARBPROC)(GLenum target, GLint level, - GLenum internalformat, GLsizei width, - GLint border, GLsizei imageSize, - const void *data); -typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXIMAGE2DPROC)(GLenum target, GLint level, - GLenum internalformat, GLsizei width, - GLsizei height, GLint border, - GLsizei imageSize, const void *data); -typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXIMAGE2DARBPROC)(GLenum target, GLint level, - GLenum internalformat, GLsizei width, - GLsizei height, GLint border, - GLsizei imageSize, const void *data); -typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXIMAGE3DPROC)(GLenum target, GLint level, - GLenum internalformat, GLsizei width, - GLsizei height, GLsizei depth, - GLint border, GLsizei imageSize, - const void *data); -typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXIMAGE3DARBPROC)(GLenum target, GLint level, - GLenum internalformat, GLsizei width, - GLsizei height, GLsizei depth, - GLint border, GLsizei imageSize, - const void *data); -typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC)(GLenum target, GLint level, - GLint xoffset, GLsizei width, - GLenum format, GLsizei imageSize, - const void *data); -typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC)(GLenum target, GLint level, - GLint xoffset, GLsizei width, - GLenum format, GLsizei imageSize, - const void *data); -typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)(GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLenum format, GLsizei imageSize, - const void *data); -typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC)(GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLenum format, GLsizei imageSize, - const void *data); -typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC)( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, - GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); -typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC)( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, - GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); -typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC)(GLuint texture, GLenum target, - GLint level, GLenum internalformat, - GLsizei width, GLint border, - GLsizei imageSize, - const void *bits); -typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC)(GLuint texture, GLenum target, - GLint level, GLenum internalformat, - GLsizei width, GLsizei height, - GLint border, GLsizei imageSize, - const void *bits); -typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC)( - GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, - GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits); -typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC)(GLuint texture, GLint level, - GLint xoffset, GLsizei width, - GLenum format, GLsizei imageSize, - const void *data); -typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC)(GLuint texture, GLenum target, - GLint level, GLint xoffset, - GLsizei width, GLenum format, - GLsizei imageSize, - const void *bits); -typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC)(GLuint texture, GLint level, - GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLenum format, GLsizei imageSize, - const void *data); -typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC)( - GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLsizei imageSize, const void *bits); -typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC)( - GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, - GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); -typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC)( - GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, - GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, - const void *bits); -typedef void(GLAD_API_PTR *PFNGLCONSERVATIVERASTERPARAMETERFNVPROC)(GLenum pname, GLfloat value); -typedef void(GLAD_API_PTR *PFNGLCONSERVATIVERASTERPARAMETERINVPROC)(GLenum pname, GLint param); -typedef void(GLAD_API_PTR *PFNGLCONVOLUTIONFILTER1DEXTPROC)(GLenum target, GLenum internalformat, - GLsizei width, GLenum format, - GLenum type, const void *image); -typedef void(GLAD_API_PTR *PFNGLCONVOLUTIONFILTER2DEXTPROC)(GLenum target, GLenum internalformat, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - const void *image); -typedef void(GLAD_API_PTR *PFNGLCONVOLUTIONPARAMETERFEXTPROC)(GLenum target, GLenum pname, - GLfloat params); -typedef void(GLAD_API_PTR *PFNGLCONVOLUTIONPARAMETERFVEXTPROC)(GLenum target, GLenum pname, - const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLCONVOLUTIONPARAMETERIEXTPROC)(GLenum target, GLenum pname, - GLint params); -typedef void(GLAD_API_PTR *PFNGLCONVOLUTIONPARAMETERIVEXTPROC)(GLenum target, GLenum pname, - const GLint *params); -typedef void(GLAD_API_PTR *PFNGLCONVOLUTIONPARAMETERXOESPROC)(GLenum target, GLenum pname, - GLfixed param); -typedef void(GLAD_API_PTR *PFNGLCONVOLUTIONPARAMETERXVOESPROC)(GLenum target, GLenum pname, - const GLfixed *params); -typedef void(GLAD_API_PTR *PFNGLCOPYBUFFERSUBDATAPROC)(GLenum readTarget, GLenum writeTarget, - GLintptr readOffset, GLintptr writeOffset, - GLsizeiptr size); -typedef void(GLAD_API_PTR *PFNGLCOPYCOLORSUBTABLEEXTPROC)(GLenum target, GLsizei start, GLint x, - GLint y, GLsizei width); -typedef void(GLAD_API_PTR *PFNGLCOPYCOLORTABLESGIPROC)(GLenum target, GLenum internalformat, - GLint x, GLint y, GLsizei width); -typedef void(GLAD_API_PTR *PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC)(GLenum target, - GLenum internalformat, GLint x, - GLint y, GLsizei width); -typedef void(GLAD_API_PTR *PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC)(GLenum target, - GLenum internalformat, GLint x, - GLint y, GLsizei width, - GLsizei height); -typedef void(GLAD_API_PTR *PFNGLCOPYIMAGESUBDATAPROC)(GLuint srcName, GLenum srcTarget, - GLint srcLevel, GLint srcX, GLint srcY, - GLint srcZ, GLuint dstName, GLenum dstTarget, - GLint dstLevel, GLint dstX, GLint dstY, - GLint dstZ, GLsizei srcWidth, - GLsizei srcHeight, GLsizei srcDepth); -typedef void(GLAD_API_PTR *PFNGLCOPYIMAGESUBDATANVPROC)( - GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, - GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, - GLsizei width, GLsizei height, GLsizei depth); -typedef void(GLAD_API_PTR *PFNGLCOPYMULTITEXIMAGE1DEXTPROC)(GLenum texunit, GLenum target, - GLint level, GLenum internalformat, - GLint x, GLint y, GLsizei width, - GLint border); -typedef void(GLAD_API_PTR *PFNGLCOPYMULTITEXIMAGE2DEXTPROC)(GLenum texunit, GLenum target, - GLint level, GLenum internalformat, - GLint x, GLint y, GLsizei width, - GLsizei height, GLint border); -typedef void(GLAD_API_PTR *PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC)(GLenum texunit, GLenum target, - GLint level, GLint xoffset, GLint x, - GLint y, GLsizei width); -typedef void(GLAD_API_PTR *PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC)(GLenum texunit, GLenum target, - GLint level, GLint xoffset, - GLint yoffset, GLint x, GLint y, - GLsizei width, GLsizei height); -typedef void(GLAD_API_PTR *PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC)(GLenum texunit, GLenum target, - GLint level, GLint xoffset, - GLint yoffset, GLint zoffset, - GLint x, GLint y, GLsizei width, - GLsizei height); -typedef void(GLAD_API_PTR *PFNGLCOPYNAMEDBUFFERSUBDATAPROC)(GLuint readBuffer, GLuint writeBuffer, - GLintptr readOffset, - GLintptr writeOffset, GLsizeiptr size); -typedef void(GLAD_API_PTR *PFNGLCOPYPATHNVPROC)(GLuint resultPath, GLuint srcPath); -typedef void(GLAD_API_PTR *PFNGLCOPYTEXIMAGE1DPROC)(GLenum target, GLint level, - GLenum internalformat, GLint x, GLint y, - GLsizei width, GLint border); -typedef void(GLAD_API_PTR *PFNGLCOPYTEXIMAGE1DEXTPROC)(GLenum target, GLint level, - GLenum internalformat, GLint x, GLint y, - GLsizei width, GLint border); -typedef void(GLAD_API_PTR *PFNGLCOPYTEXIMAGE2DPROC)(GLenum target, GLint level, - GLenum internalformat, GLint x, GLint y, - GLsizei width, GLsizei height, GLint border); -typedef void(GLAD_API_PTR *PFNGLCOPYTEXIMAGE2DEXTPROC)(GLenum target, GLint level, - GLenum internalformat, GLint x, GLint y, - GLsizei width, GLsizei height, GLint border); -typedef void(GLAD_API_PTR *PFNGLCOPYTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, - GLint x, GLint y, GLsizei width); -typedef void(GLAD_API_PTR *PFNGLCOPYTEXSUBIMAGE1DEXTPROC)(GLenum target, GLint level, GLint xoffset, - GLint x, GLint y, GLsizei width); -typedef void(GLAD_API_PTR *PFNGLCOPYTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLint x, GLint y, - GLsizei width, GLsizei height); -typedef void(GLAD_API_PTR *PFNGLCOPYTEXSUBIMAGE2DEXTPROC)(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLint x, GLint y, - GLsizei width, GLsizei height); -typedef void(GLAD_API_PTR *PFNGLCOPYTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLint zoffset, GLint x, - GLint y, GLsizei width, GLsizei height); -typedef void(GLAD_API_PTR *PFNGLCOPYTEXSUBIMAGE3DEXTPROC)(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLint zoffset, GLint x, - GLint y, GLsizei width, GLsizei height); -typedef void(GLAD_API_PTR *PFNGLCOPYTEXTUREIMAGE1DEXTPROC)(GLuint texture, GLenum target, - GLint level, GLenum internalformat, - GLint x, GLint y, GLsizei width, - GLint border); -typedef void(GLAD_API_PTR *PFNGLCOPYTEXTUREIMAGE2DEXTPROC)(GLuint texture, GLenum target, - GLint level, GLenum internalformat, - GLint x, GLint y, GLsizei width, - GLsizei height, GLint border); -typedef void(GLAD_API_PTR *PFNGLCOPYTEXTURESUBIMAGE1DPROC)(GLuint texture, GLint level, - GLint xoffset, GLint x, GLint y, - GLsizei width); -typedef void(GLAD_API_PTR *PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC)(GLuint texture, GLenum target, - GLint level, GLint xoffset, GLint x, - GLint y, GLsizei width); -typedef void(GLAD_API_PTR *PFNGLCOPYTEXTURESUBIMAGE2DPROC)(GLuint texture, GLint level, - GLint xoffset, GLint yoffset, GLint x, - GLint y, GLsizei width, GLsizei height); -typedef void(GLAD_API_PTR *PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC)(GLuint texture, GLenum target, - GLint level, GLint xoffset, - GLint yoffset, GLint x, GLint y, - GLsizei width, GLsizei height); -typedef void(GLAD_API_PTR *PFNGLCOPYTEXTURESUBIMAGE3DPROC)(GLuint texture, GLint level, - GLint xoffset, GLint yoffset, - GLint zoffset, GLint x, GLint y, - GLsizei width, GLsizei height); -typedef void(GLAD_API_PTR *PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC)(GLuint texture, GLenum target, - GLint level, GLint xoffset, - GLint yoffset, GLint zoffset, GLint x, - GLint y, GLsizei width, - GLsizei height); -typedef void(GLAD_API_PTR *PFNGLCOVERFILLPATHINSTANCEDNVPROC)(GLsizei numPaths, GLenum pathNameType, - const void *paths, GLuint pathBase, - GLenum coverMode, - GLenum transformType, - const GLfloat *transformValues); -typedef void(GLAD_API_PTR *PFNGLCOVERFILLPATHNVPROC)(GLuint path, GLenum coverMode); -typedef void(GLAD_API_PTR *PFNGLCOVERSTROKEPATHINSTANCEDNVPROC)( - GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, - GLenum transformType, const GLfloat *transformValues); -typedef void(GLAD_API_PTR *PFNGLCOVERSTROKEPATHNVPROC)(GLuint path, GLenum coverMode); -typedef void(GLAD_API_PTR *PFNGLCOVERAGEMODULATIONNVPROC)(GLenum components); -typedef void(GLAD_API_PTR *PFNGLCOVERAGEMODULATIONTABLENVPROC)(GLsizei n, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLCREATEBUFFERSPROC)(GLsizei n, GLuint *buffers); -typedef void(GLAD_API_PTR *PFNGLCREATECOMMANDLISTSNVPROC)(GLsizei n, GLuint *lists); -typedef void(GLAD_API_PTR *PFNGLCREATEFRAMEBUFFERSPROC)(GLsizei n, GLuint *framebuffers); -typedef void(GLAD_API_PTR *PFNGLCREATEMEMORYOBJECTSEXTPROC)(GLsizei n, GLuint *memoryObjects); -typedef void(GLAD_API_PTR *PFNGLCREATEPERFQUERYINTELPROC)(GLuint queryId, GLuint *queryHandle); -typedef GLuint(GLAD_API_PTR *PFNGLCREATEPROGRAMPROC)(void); -typedef GLhandleARB(GLAD_API_PTR *PFNGLCREATEPROGRAMOBJECTARBPROC)(void); -typedef void(GLAD_API_PTR *PFNGLCREATEPROGRAMPIPELINESPROC)(GLsizei n, GLuint *pipelines); -typedef GLuint(GLAD_API_PTR *PFNGLCREATEPROGRESSFENCENVXPROC)(void); -typedef void(GLAD_API_PTR *PFNGLCREATEQUERIESPROC)(GLenum target, GLsizei n, GLuint *ids); -typedef void(GLAD_API_PTR *PFNGLCREATERENDERBUFFERSPROC)(GLsizei n, GLuint *renderbuffers); -typedef void(GLAD_API_PTR *PFNGLCREATESAMPLERSPROC)(GLsizei n, GLuint *samplers); -typedef void(GLAD_API_PTR *PFNGLCREATESEMAPHORESNVPROC)(GLsizei n, GLuint *semaphores); -typedef GLuint(GLAD_API_PTR *PFNGLCREATESHADERPROC)(GLenum type); -typedef GLhandleARB(GLAD_API_PTR *PFNGLCREATESHADEROBJECTARBPROC)(GLenum shaderType); -typedef GLuint(GLAD_API_PTR *PFNGLCREATESHADERPROGRAMEXTPROC)(GLenum type, const GLchar *string); -typedef GLuint(GLAD_API_PTR *PFNGLCREATESHADERPROGRAMVPROC)(GLenum type, GLsizei count, - const GLchar *const *strings); -typedef void(GLAD_API_PTR *PFNGLCREATESTATESNVPROC)(GLsizei n, GLuint *states); -typedef GLsync(GLAD_API_PTR *PFNGLCREATESYNCFROMCLEVENTARBPROC)(struct _cl_context *context, - struct _cl_event *event, - GLbitfield flags); -typedef void(GLAD_API_PTR *PFNGLCREATETEXTURESPROC)(GLenum target, GLsizei n, GLuint *textures); -typedef void(GLAD_API_PTR *PFNGLCREATETRANSFORMFEEDBACKSPROC)(GLsizei n, GLuint *ids); -typedef void(GLAD_API_PTR *PFNGLCREATEVERTEXARRAYSPROC)(GLsizei n, GLuint *arrays); -typedef void(GLAD_API_PTR *PFNGLCULLFACEPROC)(GLenum mode); -typedef void(GLAD_API_PTR *PFNGLCULLPARAMETERDVEXTPROC)(GLenum pname, GLdouble *params); -typedef void(GLAD_API_PTR *PFNGLCULLPARAMETERFVEXTPROC)(GLenum pname, GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLCURRENTPALETTEMATRIXARBPROC)(GLint index); -typedef void(GLAD_API_PTR *PFNGLDEBUGMESSAGECALLBACKPROC)(GLDEBUGPROC callback, - const void *userParam); -typedef void(GLAD_API_PTR *PFNGLDEBUGMESSAGECALLBACKAMDPROC)(GLDEBUGPROCAMD callback, - void *userParam); -typedef void(GLAD_API_PTR *PFNGLDEBUGMESSAGECALLBACKARBPROC)(GLDEBUGPROCARB callback, - const void *userParam); -typedef void(GLAD_API_PTR *PFNGLDEBUGMESSAGECONTROLPROC)(GLenum source, GLenum type, - GLenum severity, GLsizei count, - const GLuint *ids, GLboolean enabled); -typedef void(GLAD_API_PTR *PFNGLDEBUGMESSAGECONTROLARBPROC)(GLenum source, GLenum type, - GLenum severity, GLsizei count, - const GLuint *ids, GLboolean enabled); -typedef void(GLAD_API_PTR *PFNGLDEBUGMESSAGEENABLEAMDPROC)(GLenum category, GLenum severity, - GLsizei count, const GLuint *ids, - GLboolean enabled); -typedef void(GLAD_API_PTR *PFNGLDEBUGMESSAGEINSERTPROC)(GLenum source, GLenum type, GLuint id, - GLenum severity, GLsizei length, - const GLchar *buf); -typedef void(GLAD_API_PTR *PFNGLDEBUGMESSAGEINSERTAMDPROC)(GLenum category, GLenum severity, - GLuint id, GLsizei length, - const GLchar *buf); -typedef void(GLAD_API_PTR *PFNGLDEBUGMESSAGEINSERTARBPROC)(GLenum source, GLenum type, GLuint id, - GLenum severity, GLsizei length, - const GLchar *buf); -typedef void(GLAD_API_PTR *PFNGLDEFORMSGIXPROC)(GLbitfield mask); -typedef void(GLAD_API_PTR *PFNGLDEFORMATIONMAP3DSGIXPROC)(GLenum target, GLdouble u1, GLdouble u2, - GLint ustride, GLint uorder, GLdouble v1, - GLdouble v2, GLint vstride, GLint vorder, - GLdouble w1, GLdouble w2, GLint wstride, - GLint worder, const GLdouble *points); -typedef void(GLAD_API_PTR *PFNGLDEFORMATIONMAP3FSGIXPROC)(GLenum target, GLfloat u1, GLfloat u2, - GLint ustride, GLint uorder, GLfloat v1, - GLfloat v2, GLint vstride, GLint vorder, - GLfloat w1, GLfloat w2, GLint wstride, - GLint worder, const GLfloat *points); -typedef void(GLAD_API_PTR *PFNGLDELETEASYNCMARKERSSGIXPROC)(GLuint marker, GLsizei range); -typedef void(GLAD_API_PTR *PFNGLDELETEBUFFERSPROC)(GLsizei n, const GLuint *buffers); -typedef void(GLAD_API_PTR *PFNGLDELETEBUFFERSARBPROC)(GLsizei n, const GLuint *buffers); -typedef void(GLAD_API_PTR *PFNGLDELETECOMMANDLISTSNVPROC)(GLsizei n, const GLuint *lists); -typedef void(GLAD_API_PTR *PFNGLDELETEFENCESAPPLEPROC)(GLsizei n, const GLuint *fences); -typedef void(GLAD_API_PTR *PFNGLDELETEFENCESNVPROC)(GLsizei n, const GLuint *fences); -typedef void(GLAD_API_PTR *PFNGLDELETEFRAGMENTSHADERATIPROC)(GLuint id); -typedef void(GLAD_API_PTR *PFNGLDELETEFRAMEBUFFERSPROC)(GLsizei n, const GLuint *framebuffers); -typedef void(GLAD_API_PTR *PFNGLDELETEFRAMEBUFFERSEXTPROC)(GLsizei n, const GLuint *framebuffers); -typedef void(GLAD_API_PTR *PFNGLDELETEMEMORYOBJECTSEXTPROC)(GLsizei n, const GLuint *memoryObjects); -typedef void(GLAD_API_PTR *PFNGLDELETENAMEDSTRINGARBPROC)(GLint namelen, const GLchar *name); -typedef void(GLAD_API_PTR *PFNGLDELETENAMESAMDPROC)(GLenum identifier, GLuint num, - const GLuint *names); -typedef void(GLAD_API_PTR *PFNGLDELETEOBJECTARBPROC)(GLhandleARB obj); -typedef void(GLAD_API_PTR *PFNGLDELETEOCCLUSIONQUERIESNVPROC)(GLsizei n, const GLuint *ids); -typedef void(GLAD_API_PTR *PFNGLDELETEPATHSNVPROC)(GLuint path, GLsizei range); -typedef void(GLAD_API_PTR *PFNGLDELETEPERFMONITORSAMDPROC)(GLsizei n, GLuint *monitors); -typedef void(GLAD_API_PTR *PFNGLDELETEPERFQUERYINTELPROC)(GLuint queryHandle); -typedef void(GLAD_API_PTR *PFNGLDELETEPROGRAMPROC)(GLuint program); -typedef void(GLAD_API_PTR *PFNGLDELETEPROGRAMPIPELINESPROC)(GLsizei n, const GLuint *pipelines); -typedef void(GLAD_API_PTR *PFNGLDELETEPROGRAMSARBPROC)(GLsizei n, const GLuint *programs); -typedef void(GLAD_API_PTR *PFNGLDELETEPROGRAMSNVPROC)(GLsizei n, const GLuint *programs); -typedef void(GLAD_API_PTR *PFNGLDELETEQUERIESPROC)(GLsizei n, const GLuint *ids); -typedef void(GLAD_API_PTR *PFNGLDELETEQUERIESARBPROC)(GLsizei n, const GLuint *ids); -typedef void(GLAD_API_PTR *PFNGLDELETEQUERYRESOURCETAGNVPROC)(GLsizei n, const GLint *tagIds); -typedef void(GLAD_API_PTR *PFNGLDELETERENDERBUFFERSPROC)(GLsizei n, const GLuint *renderbuffers); -typedef void(GLAD_API_PTR *PFNGLDELETERENDERBUFFERSEXTPROC)(GLsizei n, const GLuint *renderbuffers); -typedef void(GLAD_API_PTR *PFNGLDELETESAMPLERSPROC)(GLsizei count, const GLuint *samplers); -typedef void(GLAD_API_PTR *PFNGLDELETESEMAPHORESEXTPROC)(GLsizei n, const GLuint *semaphores); -typedef void(GLAD_API_PTR *PFNGLDELETESHADERPROC)(GLuint shader); -typedef void(GLAD_API_PTR *PFNGLDELETESTATESNVPROC)(GLsizei n, const GLuint *states); -typedef void(GLAD_API_PTR *PFNGLDELETESYNCPROC)(GLsync sync); -typedef void(GLAD_API_PTR *PFNGLDELETETEXTURESPROC)(GLsizei n, const GLuint *textures); -typedef void(GLAD_API_PTR *PFNGLDELETETEXTURESEXTPROC)(GLsizei n, const GLuint *textures); -typedef void(GLAD_API_PTR *PFNGLDELETETRANSFORMFEEDBACKSPROC)(GLsizei n, const GLuint *ids); -typedef void(GLAD_API_PTR *PFNGLDELETETRANSFORMFEEDBACKSNVPROC)(GLsizei n, const GLuint *ids); -typedef void(GLAD_API_PTR *PFNGLDELETEVERTEXARRAYSPROC)(GLsizei n, const GLuint *arrays); -typedef void(GLAD_API_PTR *PFNGLDELETEVERTEXARRAYSAPPLEPROC)(GLsizei n, const GLuint *arrays); -typedef void(GLAD_API_PTR *PFNGLDELETEVERTEXSHADEREXTPROC)(GLuint id); -typedef void(GLAD_API_PTR *PFNGLDEPTHBOUNDSEXTPROC)(GLclampd zmin, GLclampd zmax); -typedef void(GLAD_API_PTR *PFNGLDEPTHBOUNDSDNVPROC)(GLdouble zmin, GLdouble zmax); -typedef void(GLAD_API_PTR *PFNGLDEPTHFUNCPROC)(GLenum func); -typedef void(GLAD_API_PTR *PFNGLDEPTHMASKPROC)(GLboolean flag); -typedef void(GLAD_API_PTR *PFNGLDEPTHRANGEPROC)(GLdouble n, GLdouble f); -typedef void(GLAD_API_PTR *PFNGLDEPTHRANGEARRAYDVNVPROC)(GLuint first, GLsizei count, - const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLDEPTHRANGEARRAYVPROC)(GLuint first, GLsizei count, - const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLDEPTHRANGEINDEXEDPROC)(GLuint index, GLdouble n, GLdouble f); -typedef void(GLAD_API_PTR *PFNGLDEPTHRANGEINDEXEDDNVPROC)(GLuint index, GLdouble n, GLdouble f); -typedef void(GLAD_API_PTR *PFNGLDEPTHRANGEDNVPROC)(GLdouble zNear, GLdouble zFar); -typedef void(GLAD_API_PTR *PFNGLDEPTHRANGEFPROC)(GLfloat n, GLfloat f); -typedef void(GLAD_API_PTR *PFNGLDEPTHRANGEFOESPROC)(GLclampf n, GLclampf f); -typedef void(GLAD_API_PTR *PFNGLDEPTHRANGEXOESPROC)(GLfixed n, GLfixed f); -typedef void(GLAD_API_PTR *PFNGLDETACHOBJECTARBPROC)(GLhandleARB containerObj, - GLhandleARB attachedObj); -typedef void(GLAD_API_PTR *PFNGLDETACHSHADERPROC)(GLuint program, GLuint shader); -typedef void(GLAD_API_PTR *PFNGLDETAILTEXFUNCSGISPROC)(GLenum target, GLsizei n, - const GLfloat *points); -typedef void(GLAD_API_PTR *PFNGLDISABLEPROC)(GLenum cap); -typedef void(GLAD_API_PTR *PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC)(GLenum array, GLuint index); -typedef void(GLAD_API_PTR *PFNGLDISABLECLIENTSTATEIEXTPROC)(GLenum array, GLuint index); -typedef void(GLAD_API_PTR *PFNGLDISABLEINDEXEDEXTPROC)(GLenum target, GLuint index); -typedef void(GLAD_API_PTR *PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC)(GLuint id); -typedef void(GLAD_API_PTR *PFNGLDISABLEVERTEXARRAYATTRIBPROC)(GLuint vaobj, GLuint index); -typedef void(GLAD_API_PTR *PFNGLDISABLEVERTEXARRAYATTRIBEXTPROC)(GLuint vaobj, GLuint index); -typedef void(GLAD_API_PTR *PFNGLDISABLEVERTEXARRAYEXTPROC)(GLuint vaobj, GLenum array); -typedef void(GLAD_API_PTR *PFNGLDISABLEVERTEXATTRIBAPPLEPROC)(GLuint index, GLenum pname); -typedef void(GLAD_API_PTR *PFNGLDISABLEVERTEXATTRIBARRAYPROC)(GLuint index); -typedef void(GLAD_API_PTR *PFNGLDISABLEVERTEXATTRIBARRAYARBPROC)(GLuint index); -typedef void(GLAD_API_PTR *PFNGLDISABLEIPROC)(GLenum target, GLuint index); -typedef void(GLAD_API_PTR *PFNGLDISPATCHCOMPUTEPROC)(GLuint num_groups_x, GLuint num_groups_y, - GLuint num_groups_z); -typedef void(GLAD_API_PTR *PFNGLDISPATCHCOMPUTEGROUPSIZEARBPROC)( - GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, - GLuint group_size_y, GLuint group_size_z); -typedef void(GLAD_API_PTR *PFNGLDISPATCHCOMPUTEINDIRECTPROC)(GLintptr indirect); -typedef void(GLAD_API_PTR *PFNGLDRAWARRAYSPROC)(GLenum mode, GLint first, GLsizei count); -typedef void(GLAD_API_PTR *PFNGLDRAWARRAYSEXTPROC)(GLenum mode, GLint first, GLsizei count); -typedef void(GLAD_API_PTR *PFNGLDRAWARRAYSINDIRECTPROC)(GLenum mode, const void *indirect); -typedef void(GLAD_API_PTR *PFNGLDRAWARRAYSINSTANCEDPROC)(GLenum mode, GLint first, GLsizei count, - GLsizei instancecount); -typedef void(GLAD_API_PTR *PFNGLDRAWARRAYSINSTANCEDARBPROC)(GLenum mode, GLint first, GLsizei count, - GLsizei primcount); -typedef void(GLAD_API_PTR *PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC)(GLenum mode, GLint first, - GLsizei count, - GLsizei instancecount, - GLuint baseinstance); -typedef void(GLAD_API_PTR *PFNGLDRAWARRAYSINSTANCEDEXTPROC)(GLenum mode, GLint start, GLsizei count, - GLsizei primcount); -typedef void(GLAD_API_PTR *PFNGLDRAWBUFFERPROC)(GLenum buf); -typedef void(GLAD_API_PTR *PFNGLDRAWBUFFERSPROC)(GLsizei n, const GLenum *bufs); -typedef void(GLAD_API_PTR *PFNGLDRAWBUFFERSARBPROC)(GLsizei n, const GLenum *bufs); -typedef void(GLAD_API_PTR *PFNGLDRAWBUFFERSATIPROC)(GLsizei n, const GLenum *bufs); -typedef void(GLAD_API_PTR *PFNGLDRAWCOMMANDSADDRESSNVPROC)(GLenum primitiveMode, - const GLuint64 *indirects, - const GLsizei *sizes, GLuint count); -typedef void(GLAD_API_PTR *PFNGLDRAWCOMMANDSNVPROC)(GLenum primitiveMode, GLuint buffer, - const GLintptr *indirects, const GLsizei *sizes, - GLuint count); -typedef void(GLAD_API_PTR *PFNGLDRAWCOMMANDSSTATESADDRESSNVPROC)(const GLuint64 *indirects, - const GLsizei *sizes, - const GLuint *states, - const GLuint *fbos, GLuint count); -typedef void(GLAD_API_PTR *PFNGLDRAWCOMMANDSSTATESNVPROC)(GLuint buffer, const GLintptr *indirects, - const GLsizei *sizes, - const GLuint *states, const GLuint *fbos, - GLuint count); -typedef void(GLAD_API_PTR *PFNGLDRAWELEMENTARRAYAPPLEPROC)(GLenum mode, GLint first, GLsizei count); -typedef void(GLAD_API_PTR *PFNGLDRAWELEMENTARRAYATIPROC)(GLenum mode, GLsizei count); -typedef void(GLAD_API_PTR *PFNGLDRAWELEMENTSPROC)(GLenum mode, GLsizei count, GLenum type, - const void *indices); -typedef void(GLAD_API_PTR *PFNGLDRAWELEMENTSBASEVERTEXPROC)(GLenum mode, GLsizei count, GLenum type, - const void *indices, GLint basevertex); -typedef void(GLAD_API_PTR *PFNGLDRAWELEMENTSINDIRECTPROC)(GLenum mode, GLenum type, - const void *indirect); -typedef void(GLAD_API_PTR *PFNGLDRAWELEMENTSINSTANCEDPROC)(GLenum mode, GLsizei count, GLenum type, - const void *indices, - GLsizei instancecount); -typedef void(GLAD_API_PTR *PFNGLDRAWELEMENTSINSTANCEDARBPROC)(GLenum mode, GLsizei count, - GLenum type, const void *indices, - GLsizei primcount); -typedef void(GLAD_API_PTR *PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC)(GLenum mode, GLsizei count, - GLenum type, - const void *indices, - GLsizei instancecount, - GLuint baseinstance); -typedef void(GLAD_API_PTR *PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC)(GLenum mode, GLsizei count, - GLenum type, - const void *indices, - GLsizei instancecount, - GLint basevertex); -typedef void(GLAD_API_PTR *PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC)( - GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, - GLint basevertex, GLuint baseinstance); -typedef void(GLAD_API_PTR *PFNGLDRAWELEMENTSINSTANCEDEXTPROC)(GLenum mode, GLsizei count, - GLenum type, const void *indices, - GLsizei primcount); -typedef void(GLAD_API_PTR *PFNGLDRAWMESHARRAYSSUNPROC)(GLenum mode, GLint first, GLsizei count, - GLsizei width); -typedef void(GLAD_API_PTR *PFNGLDRAWMESHTASKSINDIRECTNVPROC)(GLintptr indirect); -typedef void(GLAD_API_PTR *PFNGLDRAWMESHTASKSNVPROC)(GLuint first, GLuint count); -typedef void(GLAD_API_PTR *PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC)(GLenum mode, GLuint start, - GLuint end, GLint first, - GLsizei count); -typedef void(GLAD_API_PTR *PFNGLDRAWRANGEELEMENTARRAYATIPROC)(GLenum mode, GLuint start, GLuint end, - GLsizei count); -typedef void(GLAD_API_PTR *PFNGLDRAWRANGEELEMENTSPROC)(GLenum mode, GLuint start, GLuint end, - GLsizei count, GLenum type, - const void *indices); -typedef void(GLAD_API_PTR *PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC)(GLenum mode, GLuint start, - GLuint end, GLsizei count, - GLenum type, const void *indices, - GLint basevertex); -typedef void(GLAD_API_PTR *PFNGLDRAWRANGEELEMENTSEXTPROC)(GLenum mode, GLuint start, GLuint end, - GLsizei count, GLenum type, - const void *indices); -typedef void(GLAD_API_PTR *PFNGLDRAWTEXTURENVPROC)(GLuint texture, GLuint sampler, GLfloat x0, - GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, - GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1); -typedef void(GLAD_API_PTR *PFNGLDRAWTRANSFORMFEEDBACKPROC)(GLenum mode, GLuint id); -typedef void(GLAD_API_PTR *PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC)(GLenum mode, GLuint id, - GLsizei instancecount); -typedef void(GLAD_API_PTR *PFNGLDRAWTRANSFORMFEEDBACKNVPROC)(GLenum mode, GLuint id); -typedef void(GLAD_API_PTR *PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC)(GLenum mode, GLuint id, - GLuint stream); -typedef void(GLAD_API_PTR *PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC)(GLenum mode, GLuint id, - GLuint stream, - GLsizei instancecount); -typedef void(GLAD_API_PTR *PFNGLDRAWVKIMAGENVPROC)(GLuint64 vkImage, GLuint sampler, GLfloat x0, - GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, - GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1); -typedef void(GLAD_API_PTR *PFNGLEGLIMAGETARGETTEXSTORAGEEXTPROC)(GLenum target, GLeglImageOES image, - const GLint *attrib_list); -typedef void(GLAD_API_PTR *PFNGLEGLIMAGETARGETTEXTURESTORAGEEXTPROC)(GLuint texture, - GLeglImageOES image, - const GLint *attrib_list); -typedef void(GLAD_API_PTR *PFNGLEDGEFLAGFORMATNVPROC)(GLsizei stride); -typedef void(GLAD_API_PTR *PFNGLEDGEFLAGPOINTEREXTPROC)(GLsizei stride, GLsizei count, - const GLboolean *pointer); -typedef void(GLAD_API_PTR *PFNGLEDGEFLAGPOINTERLISTIBMPROC)(GLint stride, const GLboolean **pointer, - GLint ptrstride); -typedef void(GLAD_API_PTR *PFNGLELEMENTPOINTERAPPLEPROC)(GLenum type, const void *pointer); -typedef void(GLAD_API_PTR *PFNGLELEMENTPOINTERATIPROC)(GLenum type, const void *pointer); -typedef void(GLAD_API_PTR *PFNGLENABLEPROC)(GLenum cap); -typedef void(GLAD_API_PTR *PFNGLENABLECLIENTSTATEINDEXEDEXTPROC)(GLenum array, GLuint index); -typedef void(GLAD_API_PTR *PFNGLENABLECLIENTSTATEIEXTPROC)(GLenum array, GLuint index); -typedef void(GLAD_API_PTR *PFNGLENABLEINDEXEDEXTPROC)(GLenum target, GLuint index); -typedef void(GLAD_API_PTR *PFNGLENABLEVARIANTCLIENTSTATEEXTPROC)(GLuint id); -typedef void(GLAD_API_PTR *PFNGLENABLEVERTEXARRAYATTRIBPROC)(GLuint vaobj, GLuint index); -typedef void(GLAD_API_PTR *PFNGLENABLEVERTEXARRAYATTRIBEXTPROC)(GLuint vaobj, GLuint index); -typedef void(GLAD_API_PTR *PFNGLENABLEVERTEXARRAYEXTPROC)(GLuint vaobj, GLenum array); -typedef void(GLAD_API_PTR *PFNGLENABLEVERTEXATTRIBAPPLEPROC)(GLuint index, GLenum pname); -typedef void(GLAD_API_PTR *PFNGLENABLEVERTEXATTRIBARRAYPROC)(GLuint index); -typedef void(GLAD_API_PTR *PFNGLENABLEVERTEXATTRIBARRAYARBPROC)(GLuint index); -typedef void(GLAD_API_PTR *PFNGLENABLEIPROC)(GLenum target, GLuint index); -typedef void(GLAD_API_PTR *PFNGLENDCONDITIONALRENDERPROC)(void); -typedef void(GLAD_API_PTR *PFNGLENDCONDITIONALRENDERNVPROC)(void); -typedef void(GLAD_API_PTR *PFNGLENDCONDITIONALRENDERNVXPROC)(void); -typedef void(GLAD_API_PTR *PFNGLENDFRAGMENTSHADERATIPROC)(void); -typedef void(GLAD_API_PTR *PFNGLENDOCCLUSIONQUERYNVPROC)(void); -typedef void(GLAD_API_PTR *PFNGLENDPERFMONITORAMDPROC)(GLuint monitor); -typedef void(GLAD_API_PTR *PFNGLENDPERFQUERYINTELPROC)(GLuint queryHandle); -typedef void(GLAD_API_PTR *PFNGLENDQUERYPROC)(GLenum target); -typedef void(GLAD_API_PTR *PFNGLENDQUERYARBPROC)(GLenum target); -typedef void(GLAD_API_PTR *PFNGLENDQUERYINDEXEDPROC)(GLenum target, GLuint index); -typedef void(GLAD_API_PTR *PFNGLENDTRANSFORMFEEDBACKPROC)(void); -typedef void(GLAD_API_PTR *PFNGLENDTRANSFORMFEEDBACKEXTPROC)(void); -typedef void(GLAD_API_PTR *PFNGLENDTRANSFORMFEEDBACKNVPROC)(void); -typedef void(GLAD_API_PTR *PFNGLENDVERTEXSHADEREXTPROC)(void); -typedef void(GLAD_API_PTR *PFNGLENDVIDEOCAPTURENVPROC)(GLuint video_capture_slot); -typedef void(GLAD_API_PTR *PFNGLEVALCOORD1XOESPROC)(GLfixed u); -typedef void(GLAD_API_PTR *PFNGLEVALCOORD1XVOESPROC)(const GLfixed *coords); -typedef void(GLAD_API_PTR *PFNGLEVALCOORD2XOESPROC)(GLfixed u, GLfixed v); -typedef void(GLAD_API_PTR *PFNGLEVALCOORD2XVOESPROC)(const GLfixed *coords); -typedef void(GLAD_API_PTR *PFNGLEVALMAPSNVPROC)(GLenum target, GLenum mode); -typedef void(GLAD_API_PTR *PFNGLEVALUATEDEPTHVALUESARBPROC)(void); -typedef void(GLAD_API_PTR *PFNGLEXECUTEPROGRAMNVPROC)(GLenum target, GLuint id, - const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLEXTRACTCOMPONENTEXTPROC)(GLuint res, GLuint src, GLuint num); -typedef void(GLAD_API_PTR *PFNGLFEEDBACKBUFFERXOESPROC)(GLsizei n, GLenum type, - const GLfixed *buffer); -typedef GLsync(GLAD_API_PTR *PFNGLFENCESYNCPROC)(GLenum condition, GLbitfield flags); -typedef void(GLAD_API_PTR *PFNGLFINALCOMBINERINPUTNVPROC)(GLenum variable, GLenum input, - GLenum mapping, GLenum componentUsage); -typedef void(GLAD_API_PTR *PFNGLFINISHPROC)(void); -typedef GLint(GLAD_API_PTR *PFNGLFINISHASYNCSGIXPROC)(GLuint *markerp); -typedef void(GLAD_API_PTR *PFNGLFINISHFENCEAPPLEPROC)(GLuint fence); -typedef void(GLAD_API_PTR *PFNGLFINISHFENCENVPROC)(GLuint fence); -typedef void(GLAD_API_PTR *PFNGLFINISHOBJECTAPPLEPROC)(GLenum object, GLint name); -typedef void(GLAD_API_PTR *PFNGLFINISHTEXTURESUNXPROC)(void); -typedef void(GLAD_API_PTR *PFNGLFLUSHPROC)(void); -typedef void(GLAD_API_PTR *PFNGLFLUSHMAPPEDBUFFERRANGEPROC)(GLenum target, GLintptr offset, - GLsizeiptr length); -typedef void(GLAD_API_PTR *PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC)(GLenum target, GLintptr offset, - GLsizeiptr size); -typedef void(GLAD_API_PTR *PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC)(GLuint buffer, GLintptr offset, - GLsizeiptr length); -typedef void(GLAD_API_PTR *PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC)(GLuint buffer, GLintptr offset, - GLsizeiptr length); -typedef void(GLAD_API_PTR *PFNGLFLUSHPIXELDATARANGENVPROC)(GLenum target); -typedef void(GLAD_API_PTR *PFNGLFLUSHRASTERSGIXPROC)(void); -typedef void(GLAD_API_PTR *PFNGLFLUSHSTATICDATAIBMPROC)(GLenum target); -typedef void(GLAD_API_PTR *PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC)(GLsizei length, void *pointer); -typedef void(GLAD_API_PTR *PFNGLFLUSHVERTEXARRAYRANGENVPROC)(void); -typedef void(GLAD_API_PTR *PFNGLFOGCOORDFORMATNVPROC)(GLenum type, GLsizei stride); -typedef void(GLAD_API_PTR *PFNGLFOGCOORDPOINTEREXTPROC)(GLenum type, GLsizei stride, - const void *pointer); -typedef void(GLAD_API_PTR *PFNGLFOGCOORDPOINTERLISTIBMPROC)(GLenum type, GLint stride, - const void **pointer, GLint ptrstride); -typedef void(GLAD_API_PTR *PFNGLFOGCOORDDEXTPROC)(GLdouble coord); -typedef void(GLAD_API_PTR *PFNGLFOGCOORDDVEXTPROC)(const GLdouble *coord); -typedef void(GLAD_API_PTR *PFNGLFOGCOORDFEXTPROC)(GLfloat coord); -typedef void(GLAD_API_PTR *PFNGLFOGCOORDFVEXTPROC)(const GLfloat *coord); -typedef void(GLAD_API_PTR *PFNGLFOGCOORDHNVPROC)(GLhalfNV fog); -typedef void(GLAD_API_PTR *PFNGLFOGCOORDHVNVPROC)(const GLhalfNV *fog); -typedef void(GLAD_API_PTR *PFNGLFOGFUNCSGISPROC)(GLsizei n, const GLfloat *points); -typedef void(GLAD_API_PTR *PFNGLFOGXOESPROC)(GLenum pname, GLfixed param); -typedef void(GLAD_API_PTR *PFNGLFOGXVOESPROC)(GLenum pname, const GLfixed *param); -typedef void(GLAD_API_PTR *PFNGLFRAGMENTCOLORMATERIALSGIXPROC)(GLenum face, GLenum mode); -typedef void(GLAD_API_PTR *PFNGLFRAGMENTCOVERAGECOLORNVPROC)(GLuint color); -typedef void(GLAD_API_PTR *PFNGLFRAGMENTLIGHTMODELFSGIXPROC)(GLenum pname, GLfloat param); -typedef void(GLAD_API_PTR *PFNGLFRAGMENTLIGHTMODELFVSGIXPROC)(GLenum pname, const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLFRAGMENTLIGHTMODELISGIXPROC)(GLenum pname, GLint param); -typedef void(GLAD_API_PTR *PFNGLFRAGMENTLIGHTMODELIVSGIXPROC)(GLenum pname, const GLint *params); -typedef void(GLAD_API_PTR *PFNGLFRAGMENTLIGHTFSGIXPROC)(GLenum light, GLenum pname, GLfloat param); -typedef void(GLAD_API_PTR *PFNGLFRAGMENTLIGHTFVSGIXPROC)(GLenum light, GLenum pname, - const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLFRAGMENTLIGHTISGIXPROC)(GLenum light, GLenum pname, GLint param); -typedef void(GLAD_API_PTR *PFNGLFRAGMENTLIGHTIVSGIXPROC)(GLenum light, GLenum pname, - const GLint *params); -typedef void(GLAD_API_PTR *PFNGLFRAGMENTMATERIALFSGIXPROC)(GLenum face, GLenum pname, - GLfloat param); -typedef void(GLAD_API_PTR *PFNGLFRAGMENTMATERIALFVSGIXPROC)(GLenum face, GLenum pname, - const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLFRAGMENTMATERIALISGIXPROC)(GLenum face, GLenum pname, GLint param); -typedef void(GLAD_API_PTR *PFNGLFRAGMENTMATERIALIVSGIXPROC)(GLenum face, GLenum pname, - const GLint *params); -typedef void(GLAD_API_PTR *PFNGLFRAMETERMINATORGREMEDYPROC)(void); -typedef void(GLAD_API_PTR *PFNGLFRAMEZOOMSGIXPROC)(GLint factor); -typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC)(GLuint framebuffer, GLenum mode); -typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC)(GLuint framebuffer, GLsizei n, - const GLenum *bufs); -typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERFETCHBARRIEREXTPROC)(void); -typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERPARAMETERIPROC)(GLenum target, GLenum pname, - GLint param); -typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERPARAMETERIMESAPROC)(GLenum target, GLenum pname, - GLint param); -typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERREADBUFFEREXTPROC)(GLuint framebuffer, GLenum mode); -typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERRENDERBUFFERPROC)(GLenum target, GLenum attachment, - GLenum renderbuffertarget, - GLuint renderbuffer); -typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC)(GLenum target, GLenum attachment, - GLenum renderbuffertarget, - GLuint renderbuffer); -typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERSAMPLELOCATIONSFVARBPROC)(GLenum target, GLuint start, - GLsizei count, - const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERSAMPLELOCATIONSFVNVPROC)(GLenum target, GLuint start, - GLsizei count, - const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERSAMPLEPOSITIONSFVAMDPROC)(GLenum target, - GLuint numsamples, - GLuint pixelindex, - const GLfloat *values); -typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTUREPROC)(GLenum target, GLenum attachment, - GLuint texture, GLint level); -typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURE1DPROC)(GLenum target, GLenum attachment, - GLenum textarget, GLuint texture, - GLint level); -typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURE1DEXTPROC)(GLenum target, GLenum attachment, - GLenum textarget, GLuint texture, - GLint level); -typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURE2DPROC)(GLenum target, GLenum attachment, - GLenum textarget, GLuint texture, - GLint level); -typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURE2DEXTPROC)(GLenum target, GLenum attachment, - GLenum textarget, GLuint texture, - GLint level); -typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURE3DPROC)(GLenum target, GLenum attachment, - GLenum textarget, GLuint texture, - GLint level, GLint zoffset); -typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURE3DEXTPROC)(GLenum target, GLenum attachment, - GLenum textarget, GLuint texture, - GLint level, GLint zoffset); -typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTUREARBPROC)(GLenum target, GLenum attachment, - GLuint texture, GLint level); -typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTUREEXTPROC)(GLenum target, GLenum attachment, - GLuint texture, GLint level); -typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTUREFACEARBPROC)(GLenum target, GLenum attachment, - GLuint texture, GLint level, - GLenum face); -typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC)(GLenum target, GLenum attachment, - GLuint texture, GLint level, - GLenum face); -typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURELAYERPROC)(GLenum target, GLenum attachment, - GLuint texture, GLint level, - GLint layer); -typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURELAYERARBPROC)(GLenum target, GLenum attachment, - GLuint texture, GLint level, - GLint layer); -typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC)(GLenum target, GLenum attachment, - GLuint texture, GLint level, - GLint layer); -typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC)(GLenum target, - GLenum attachment, - GLuint texture, GLint level, - GLint baseViewIndex, - GLsizei numViews); -typedef void(GLAD_API_PTR *PFNGLFREEOBJECTBUFFERATIPROC)(GLuint buffer); -typedef void(GLAD_API_PTR *PFNGLFRONTFACEPROC)(GLenum mode); -typedef void(GLAD_API_PTR *PFNGLFRUSTUMFOESPROC)(GLfloat l, GLfloat r, GLfloat b, GLfloat t, - GLfloat n, GLfloat f); -typedef void(GLAD_API_PTR *PFNGLFRUSTUMXOESPROC)(GLfixed l, GLfixed r, GLfixed b, GLfixed t, - GLfixed n, GLfixed f); -typedef GLuint(GLAD_API_PTR *PFNGLGENASYNCMARKERSSGIXPROC)(GLsizei range); -typedef void(GLAD_API_PTR *PFNGLGENBUFFERSPROC)(GLsizei n, GLuint *buffers); -typedef void(GLAD_API_PTR *PFNGLGENBUFFERSARBPROC)(GLsizei n, GLuint *buffers); -typedef void(GLAD_API_PTR *PFNGLGENFENCESAPPLEPROC)(GLsizei n, GLuint *fences); -typedef void(GLAD_API_PTR *PFNGLGENFENCESNVPROC)(GLsizei n, GLuint *fences); -typedef GLuint(GLAD_API_PTR *PFNGLGENFRAGMENTSHADERSATIPROC)(GLuint range); -typedef void(GLAD_API_PTR *PFNGLGENFRAMEBUFFERSPROC)(GLsizei n, GLuint *framebuffers); -typedef void(GLAD_API_PTR *PFNGLGENFRAMEBUFFERSEXTPROC)(GLsizei n, GLuint *framebuffers); -typedef void(GLAD_API_PTR *PFNGLGENNAMESAMDPROC)(GLenum identifier, GLuint num, GLuint *names); -typedef void(GLAD_API_PTR *PFNGLGENOCCLUSIONQUERIESNVPROC)(GLsizei n, GLuint *ids); -typedef GLuint(GLAD_API_PTR *PFNGLGENPATHSNVPROC)(GLsizei range); -typedef void(GLAD_API_PTR *PFNGLGENPERFMONITORSAMDPROC)(GLsizei n, GLuint *monitors); -typedef void(GLAD_API_PTR *PFNGLGENPROGRAMPIPELINESPROC)(GLsizei n, GLuint *pipelines); -typedef void(GLAD_API_PTR *PFNGLGENPROGRAMSARBPROC)(GLsizei n, GLuint *programs); -typedef void(GLAD_API_PTR *PFNGLGENPROGRAMSNVPROC)(GLsizei n, GLuint *programs); -typedef void(GLAD_API_PTR *PFNGLGENQUERIESPROC)(GLsizei n, GLuint *ids); -typedef void(GLAD_API_PTR *PFNGLGENQUERIESARBPROC)(GLsizei n, GLuint *ids); -typedef void(GLAD_API_PTR *PFNGLGENQUERYRESOURCETAGNVPROC)(GLsizei n, GLint *tagIds); -typedef void(GLAD_API_PTR *PFNGLGENRENDERBUFFERSPROC)(GLsizei n, GLuint *renderbuffers); -typedef void(GLAD_API_PTR *PFNGLGENRENDERBUFFERSEXTPROC)(GLsizei n, GLuint *renderbuffers); -typedef void(GLAD_API_PTR *PFNGLGENSAMPLERSPROC)(GLsizei count, GLuint *samplers); -typedef void(GLAD_API_PTR *PFNGLGENSEMAPHORESEXTPROC)(GLsizei n, GLuint *semaphores); -typedef GLuint(GLAD_API_PTR *PFNGLGENSYMBOLSEXTPROC)(GLenum datatype, GLenum storagetype, - GLenum range, GLuint components); -typedef void(GLAD_API_PTR *PFNGLGENTEXTURESPROC)(GLsizei n, GLuint *textures); -typedef void(GLAD_API_PTR *PFNGLGENTEXTURESEXTPROC)(GLsizei n, GLuint *textures); -typedef void(GLAD_API_PTR *PFNGLGENTRANSFORMFEEDBACKSPROC)(GLsizei n, GLuint *ids); -typedef void(GLAD_API_PTR *PFNGLGENTRANSFORMFEEDBACKSNVPROC)(GLsizei n, GLuint *ids); -typedef void(GLAD_API_PTR *PFNGLGENVERTEXARRAYSPROC)(GLsizei n, GLuint *arrays); -typedef void(GLAD_API_PTR *PFNGLGENVERTEXARRAYSAPPLEPROC)(GLsizei n, GLuint *arrays); -typedef GLuint(GLAD_API_PTR *PFNGLGENVERTEXSHADERSEXTPROC)(GLuint range); -typedef void(GLAD_API_PTR *PFNGLGENERATEMIPMAPPROC)(GLenum target); -typedef void(GLAD_API_PTR *PFNGLGENERATEMIPMAPEXTPROC)(GLenum target); -typedef void(GLAD_API_PTR *PFNGLGENERATEMULTITEXMIPMAPEXTPROC)(GLenum texunit, GLenum target); -typedef void(GLAD_API_PTR *PFNGLGENERATETEXTUREMIPMAPPROC)(GLuint texture); -typedef void(GLAD_API_PTR *PFNGLGENERATETEXTUREMIPMAPEXTPROC)(GLuint texture, GLenum target); -typedef void(GLAD_API_PTR *PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC)(GLuint program, - GLuint bufferIndex, - GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETACTIVEATTRIBPROC)(GLuint program, GLuint index, GLsizei bufSize, - GLsizei *length, GLint *size, GLenum *type, - GLchar *name); -typedef void(GLAD_API_PTR *PFNGLGETACTIVEATTRIBARBPROC)(GLhandleARB programObj, GLuint index, - GLsizei maxLength, GLsizei *length, - GLint *size, GLenum *type, GLcharARB *name); -typedef void(GLAD_API_PTR *PFNGLGETACTIVESUBROUTINENAMEPROC)(GLuint program, GLenum shadertype, - GLuint index, GLsizei bufSize, - GLsizei *length, GLchar *name); -typedef void(GLAD_API_PTR *PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC)(GLuint program, - GLenum shadertype, GLuint index, - GLsizei bufSize, - GLsizei *length, GLchar *name); -typedef void(GLAD_API_PTR *PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC)(GLuint program, GLenum shadertype, - GLuint index, GLenum pname, - GLint *values); -typedef void(GLAD_API_PTR *PFNGLGETACTIVEUNIFORMPROC)(GLuint program, GLuint index, GLsizei bufSize, - GLsizei *length, GLint *size, GLenum *type, - GLchar *name); -typedef void(GLAD_API_PTR *PFNGLGETACTIVEUNIFORMARBPROC)(GLhandleARB programObj, GLuint index, - GLsizei maxLength, GLsizei *length, - GLint *size, GLenum *type, - GLcharARB *name); -typedef void(GLAD_API_PTR *PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC)(GLuint program, - GLuint uniformBlockIndex, - GLsizei bufSize, GLsizei *length, - GLchar *uniformBlockName); -typedef void(GLAD_API_PTR *PFNGLGETACTIVEUNIFORMBLOCKIVPROC)(GLuint program, - GLuint uniformBlockIndex, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETACTIVEUNIFORMNAMEPROC)(GLuint program, GLuint uniformIndex, - GLsizei bufSize, GLsizei *length, - GLchar *uniformName); -typedef void(GLAD_API_PTR *PFNGLGETACTIVEUNIFORMSIVPROC)(GLuint program, GLsizei uniformCount, - const GLuint *uniformIndices, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETACTIVEVARYINGNVPROC)(GLuint program, GLuint index, - GLsizei bufSize, GLsizei *length, - GLsizei *size, GLenum *type, GLchar *name); -typedef void(GLAD_API_PTR *PFNGLGETARRAYOBJECTFVATIPROC)(GLenum array, GLenum pname, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETARRAYOBJECTIVATIPROC)(GLenum array, GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETATTACHEDOBJECTSARBPROC)(GLhandleARB containerObj, - GLsizei maxCount, GLsizei *count, - GLhandleARB *obj); -typedef void(GLAD_API_PTR *PFNGLGETATTACHEDSHADERSPROC)(GLuint program, GLsizei maxCount, - GLsizei *count, GLuint *shaders); -typedef GLint(GLAD_API_PTR *PFNGLGETATTRIBLOCATIONPROC)(GLuint program, const GLchar *name); -typedef GLint(GLAD_API_PTR *PFNGLGETATTRIBLOCATIONARBPROC)(GLhandleARB programObj, - const GLcharARB *name); -typedef void(GLAD_API_PTR *PFNGLGETBOOLEANINDEXEDVEXTPROC)(GLenum target, GLuint index, - GLboolean *data); -typedef void(GLAD_API_PTR *PFNGLGETBOOLEANI_VPROC)(GLenum target, GLuint index, GLboolean *data); -typedef void(GLAD_API_PTR *PFNGLGETBOOLEANVPROC)(GLenum pname, GLboolean *data); -typedef void(GLAD_API_PTR *PFNGLGETBUFFERPARAMETERI64VPROC)(GLenum target, GLenum pname, - GLint64 *params); -typedef void(GLAD_API_PTR *PFNGLGETBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETBUFFERPARAMETERIVARBPROC)(GLenum target, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETBUFFERPARAMETERUI64VNVPROC)(GLenum target, GLenum pname, - GLuint64EXT *params); -typedef void(GLAD_API_PTR *PFNGLGETBUFFERPOINTERVPROC)(GLenum target, GLenum pname, void **params); -typedef void(GLAD_API_PTR *PFNGLGETBUFFERPOINTERVARBPROC)(GLenum target, GLenum pname, - void **params); -typedef void(GLAD_API_PTR *PFNGLGETBUFFERSUBDATAPROC)(GLenum target, GLintptr offset, - GLsizeiptr size, void *data); -typedef void(GLAD_API_PTR *PFNGLGETBUFFERSUBDATAARBPROC)(GLenum target, GLintptrARB offset, - GLsizeiptrARB size, void *data); -typedef void(GLAD_API_PTR *PFNGLGETCLIPPLANEFOESPROC)(GLenum plane, GLfloat *equation); -typedef void(GLAD_API_PTR *PFNGLGETCLIPPLANEXOESPROC)(GLenum plane, GLfixed *equation); -typedef void(GLAD_API_PTR *PFNGLGETCOLORTABLEEXTPROC)(GLenum target, GLenum format, GLenum type, - void *data); -typedef void(GLAD_API_PTR *PFNGLGETCOLORTABLEPARAMETERFVEXTPROC)(GLenum target, GLenum pname, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETCOLORTABLEPARAMETERFVSGIPROC)(GLenum target, GLenum pname, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETCOLORTABLEPARAMETERIVEXTPROC)(GLenum target, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETCOLORTABLEPARAMETERIVSGIPROC)(GLenum target, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETCOLORTABLESGIPROC)(GLenum target, GLenum format, GLenum type, - void *table); -typedef void(GLAD_API_PTR *PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC)(GLenum stage, GLenum portion, - GLenum variable, GLenum pname, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC)(GLenum stage, GLenum portion, - GLenum variable, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC)(GLenum stage, GLenum portion, - GLenum pname, GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC)(GLenum stage, GLenum portion, - GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC)(GLenum stage, GLenum pname, - GLfloat *params); -typedef GLuint(GLAD_API_PTR *PFNGLGETCOMMANDHEADERNVPROC)(GLenum tokenID, GLuint size); -typedef void(GLAD_API_PTR *PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC)(GLenum texunit, GLenum target, - GLint lod, void *img); -typedef void(GLAD_API_PTR *PFNGLGETCOMPRESSEDTEXIMAGEPROC)(GLenum target, GLint level, void *img); -typedef void(GLAD_API_PTR *PFNGLGETCOMPRESSEDTEXIMAGEARBPROC)(GLenum target, GLint level, - void *img); -typedef void(GLAD_API_PTR *PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC)(GLuint texture, GLint level, - GLsizei bufSize, void *pixels); -typedef void(GLAD_API_PTR *PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC)(GLuint texture, GLenum target, - GLint lod, void *img); -typedef void(GLAD_API_PTR *PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC)(GLuint texture, GLint level, - GLint xoffset, GLint yoffset, - GLint zoffset, GLsizei width, - GLsizei height, GLsizei depth, - GLsizei bufSize, void *pixels); -typedef void(GLAD_API_PTR *PFNGLGETCONVOLUTIONFILTEREXTPROC)(GLenum target, GLenum format, - GLenum type, void *image); -typedef void(GLAD_API_PTR *PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC)(GLenum target, GLenum pname, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC)(GLenum target, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETCONVOLUTIONPARAMETERXVOESPROC)(GLenum target, GLenum pname, - GLfixed *params); -typedef void(GLAD_API_PTR *PFNGLGETCOVERAGEMODULATIONTABLENVPROC)(GLsizei bufSize, GLfloat *v); -typedef GLuint(GLAD_API_PTR *PFNGLGETDEBUGMESSAGELOGPROC)(GLuint count, GLsizei bufSize, - GLenum *sources, GLenum *types, - GLuint *ids, GLenum *severities, - GLsizei *lengths, GLchar *messageLog); -typedef GLuint(GLAD_API_PTR *PFNGLGETDEBUGMESSAGELOGAMDPROC)(GLuint count, GLsizei bufSize, - GLenum *categories, GLenum *severities, - GLuint *ids, GLsizei *lengths, - GLchar *message); -typedef GLuint(GLAD_API_PTR *PFNGLGETDEBUGMESSAGELOGARBPROC)(GLuint count, GLsizei bufSize, - GLenum *sources, GLenum *types, - GLuint *ids, GLenum *severities, - GLsizei *lengths, GLchar *messageLog); -typedef void(GLAD_API_PTR *PFNGLGETDETAILTEXFUNCSGISPROC)(GLenum target, GLfloat *points); -typedef void(GLAD_API_PTR *PFNGLGETDOUBLEINDEXEDVEXTPROC)(GLenum target, GLuint index, - GLdouble *data); -typedef void(GLAD_API_PTR *PFNGLGETDOUBLEI_VPROC)(GLenum target, GLuint index, GLdouble *data); -typedef void(GLAD_API_PTR *PFNGLGETDOUBLEI_VEXTPROC)(GLenum pname, GLuint index, GLdouble *params); -typedef void(GLAD_API_PTR *PFNGLGETDOUBLEVPROC)(GLenum pname, GLdouble *data); -typedef GLenum(GLAD_API_PTR *PFNGLGETERRORPROC)(void); -typedef void(GLAD_API_PTR *PFNGLGETFENCEIVNVPROC)(GLuint fence, GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC)(GLenum variable, - GLenum pname, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC)(GLenum variable, - GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETFIRSTPERFQUERYIDINTELPROC)(GLuint *queryId); -typedef void(GLAD_API_PTR *PFNGLGETFIXEDVOESPROC)(GLenum pname, GLfixed *params); -typedef void(GLAD_API_PTR *PFNGLGETFLOATINDEXEDVEXTPROC)(GLenum target, GLuint index, - GLfloat *data); -typedef void(GLAD_API_PTR *PFNGLGETFLOATI_VPROC)(GLenum target, GLuint index, GLfloat *data); -typedef void(GLAD_API_PTR *PFNGLGETFLOATI_VEXTPROC)(GLenum pname, GLuint index, GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETFLOATVPROC)(GLenum pname, GLfloat *data); -typedef void(GLAD_API_PTR *PFNGLGETFOGFUNCSGISPROC)(GLfloat *points); -typedef GLint(GLAD_API_PTR *PFNGLGETFRAGDATAINDEXPROC)(GLuint program, const GLchar *name); -typedef GLint(GLAD_API_PTR *PFNGLGETFRAGDATALOCATIONPROC)(GLuint program, const GLchar *name); -typedef GLint(GLAD_API_PTR *PFNGLGETFRAGDATALOCATIONEXTPROC)(GLuint program, const GLchar *name); -typedef void(GLAD_API_PTR *PFNGLGETFRAGMENTLIGHTFVSGIXPROC)(GLenum light, GLenum pname, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETFRAGMENTLIGHTIVSGIXPROC)(GLenum light, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETFRAGMENTMATERIALFVSGIXPROC)(GLenum face, GLenum pname, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETFRAGMENTMATERIALIVSGIXPROC)(GLenum face, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)(GLenum target, - GLenum attachment, - GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC)(GLenum target, - GLenum attachment, - GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETFRAMEBUFFERPARAMETERFVAMDPROC)(GLenum target, GLenum pname, - GLuint numsamples, - GLuint pixelindex, GLsizei size, - GLfloat *values); -typedef void(GLAD_API_PTR *PFNGLGETFRAMEBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC)(GLuint framebuffer, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETFRAMEBUFFERPARAMETERIVMESAPROC)(GLenum target, GLenum pname, - GLint *params); -typedef GLenum(GLAD_API_PTR *PFNGLGETGRAPHICSRESETSTATUSPROC)(void); -typedef GLenum(GLAD_API_PTR *PFNGLGETGRAPHICSRESETSTATUSARBPROC)(void); -typedef GLhandleARB(GLAD_API_PTR *PFNGLGETHANDLEARBPROC)(GLenum pname); -typedef void(GLAD_API_PTR *PFNGLGETHISTOGRAMEXTPROC)(GLenum target, GLboolean reset, GLenum format, - GLenum type, void *values); -typedef void(GLAD_API_PTR *PFNGLGETHISTOGRAMPARAMETERFVEXTPROC)(GLenum target, GLenum pname, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETHISTOGRAMPARAMETERIVEXTPROC)(GLenum target, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETHISTOGRAMPARAMETERXVOESPROC)(GLenum target, GLenum pname, - GLfixed *params); -typedef GLuint64(GLAD_API_PTR *PFNGLGETIMAGEHANDLEARBPROC)(GLuint texture, GLint level, - GLboolean layered, GLint layer, - GLenum format); -typedef GLuint64(GLAD_API_PTR *PFNGLGETIMAGEHANDLENVPROC)(GLuint texture, GLint level, - GLboolean layered, GLint layer, - GLenum format); -typedef void(GLAD_API_PTR *PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC)(GLenum target, GLenum pname, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC)(GLenum target, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETINFOLOGARBPROC)(GLhandleARB obj, GLsizei maxLength, - GLsizei *length, GLcharARB *infoLog); -typedef GLint(GLAD_API_PTR *PFNGLGETINSTRUMENTSSGIXPROC)(void); -typedef void(GLAD_API_PTR *PFNGLGETINTEGER64I_VPROC)(GLenum target, GLuint index, GLint64 *data); -typedef void(GLAD_API_PTR *PFNGLGETINTEGER64VPROC)(GLenum pname, GLint64 *data); -typedef void(GLAD_API_PTR *PFNGLGETINTEGERINDEXEDVEXTPROC)(GLenum target, GLuint index, - GLint *data); -typedef void(GLAD_API_PTR *PFNGLGETINTEGERI_VPROC)(GLenum target, GLuint index, GLint *data); -typedef void(GLAD_API_PTR *PFNGLGETINTEGERUI64I_VNVPROC)(GLenum value, GLuint index, - GLuint64EXT *result); -typedef void(GLAD_API_PTR *PFNGLGETINTEGERUI64VNVPROC)(GLenum value, GLuint64EXT *result); -typedef void(GLAD_API_PTR *PFNGLGETINTEGERVPROC)(GLenum pname, GLint *data); -typedef void(GLAD_API_PTR *PFNGLGETINTERNALFORMATSAMPLEIVNVPROC)(GLenum target, - GLenum internalformat, - GLsizei samples, GLenum pname, - GLsizei count, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETINTERNALFORMATI64VPROC)(GLenum target, GLenum internalformat, - GLenum pname, GLsizei count, - GLint64 *params); -typedef void(GLAD_API_PTR *PFNGLGETINTERNALFORMATIVPROC)(GLenum target, GLenum internalformat, - GLenum pname, GLsizei count, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETINVARIANTBOOLEANVEXTPROC)(GLuint id, GLenum value, - GLboolean *data); -typedef void(GLAD_API_PTR *PFNGLGETINVARIANTFLOATVEXTPROC)(GLuint id, GLenum value, GLfloat *data); -typedef void(GLAD_API_PTR *PFNGLGETINVARIANTINTEGERVEXTPROC)(GLuint id, GLenum value, GLint *data); -typedef void(GLAD_API_PTR *PFNGLGETLIGHTXOESPROC)(GLenum light, GLenum pname, GLfixed *params); -typedef void(GLAD_API_PTR *PFNGLGETLISTPARAMETERFVSGIXPROC)(GLuint list, GLenum pname, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETLISTPARAMETERIVSGIXPROC)(GLuint list, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC)(GLuint id, GLenum value, - GLboolean *data); -typedef void(GLAD_API_PTR *PFNGLGETLOCALCONSTANTFLOATVEXTPROC)(GLuint id, GLenum value, - GLfloat *data); -typedef void(GLAD_API_PTR *PFNGLGETLOCALCONSTANTINTEGERVEXTPROC)(GLuint id, GLenum value, - GLint *data); -typedef void(GLAD_API_PTR *PFNGLGETMAPATTRIBPARAMETERFVNVPROC)(GLenum target, GLuint index, - GLenum pname, GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETMAPATTRIBPARAMETERIVNVPROC)(GLenum target, GLuint index, - GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETMAPCONTROLPOINTSNVPROC)(GLenum target, GLuint index, GLenum type, - GLsizei ustride, GLsizei vstride, - GLboolean packed, void *points); -typedef void(GLAD_API_PTR *PFNGLGETMAPPARAMETERFVNVPROC)(GLenum target, GLenum pname, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETMAPPARAMETERIVNVPROC)(GLenum target, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETMAPXVOESPROC)(GLenum target, GLenum query, GLfixed *v); -typedef void(GLAD_API_PTR *PFNGLGETMATERIALXOESPROC)(GLenum face, GLenum pname, GLfixed param); -typedef void(GLAD_API_PTR *PFNGLGETMEMORYOBJECTDETACHEDRESOURCESUIVNVPROC)( - GLuint memory, GLenum pname, GLint first, GLsizei count, GLuint *params); -typedef void(GLAD_API_PTR *PFNGLGETMEMORYOBJECTPARAMETERIVEXTPROC)(GLuint memoryObject, - GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETMINMAXEXTPROC)(GLenum target, GLboolean reset, GLenum format, - GLenum type, void *values); -typedef void(GLAD_API_PTR *PFNGLGETMINMAXPARAMETERFVEXTPROC)(GLenum target, GLenum pname, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETMINMAXPARAMETERIVEXTPROC)(GLenum target, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETMULTITEXENVFVEXTPROC)(GLenum texunit, GLenum target, - GLenum pname, GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETMULTITEXENVIVEXTPROC)(GLenum texunit, GLenum target, - GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETMULTITEXGENDVEXTPROC)(GLenum texunit, GLenum coord, GLenum pname, - GLdouble *params); -typedef void(GLAD_API_PTR *PFNGLGETMULTITEXGENFVEXTPROC)(GLenum texunit, GLenum coord, GLenum pname, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETMULTITEXGENIVEXTPROC)(GLenum texunit, GLenum coord, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETMULTITEXIMAGEEXTPROC)(GLenum texunit, GLenum target, GLint level, - GLenum format, GLenum type, void *pixels); -typedef void(GLAD_API_PTR *PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC)(GLenum texunit, GLenum target, - GLint level, GLenum pname, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC)(GLenum texunit, GLenum target, - GLint level, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETMULTITEXPARAMETERIIVEXTPROC)(GLenum texunit, GLenum target, - GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETMULTITEXPARAMETERIUIVEXTPROC)(GLenum texunit, GLenum target, - GLenum pname, GLuint *params); -typedef void(GLAD_API_PTR *PFNGLGETMULTITEXPARAMETERFVEXTPROC)(GLenum texunit, GLenum target, - GLenum pname, GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETMULTITEXPARAMETERIVEXTPROC)(GLenum texunit, GLenum target, - GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETMULTISAMPLEFVPROC)(GLenum pname, GLuint index, GLfloat *val); -typedef void(GLAD_API_PTR *PFNGLGETMULTISAMPLEFVNVPROC)(GLenum pname, GLuint index, GLfloat *val); -typedef void(GLAD_API_PTR *PFNGLGETNAMEDBUFFERPARAMETERI64VPROC)(GLuint buffer, GLenum pname, - GLint64 *params); -typedef void(GLAD_API_PTR *PFNGLGETNAMEDBUFFERPARAMETERIVPROC)(GLuint buffer, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC)(GLuint buffer, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC)(GLuint buffer, GLenum pname, - GLuint64EXT *params); -typedef void(GLAD_API_PTR *PFNGLGETNAMEDBUFFERPOINTERVPROC)(GLuint buffer, GLenum pname, - void **params); -typedef void(GLAD_API_PTR *PFNGLGETNAMEDBUFFERPOINTERVEXTPROC)(GLuint buffer, GLenum pname, - void **params); -typedef void(GLAD_API_PTR *PFNGLGETNAMEDBUFFERSUBDATAPROC)(GLuint buffer, GLintptr offset, - GLsizeiptr size, void *data); -typedef void(GLAD_API_PTR *PFNGLGETNAMEDBUFFERSUBDATAEXTPROC)(GLuint buffer, GLintptr offset, - GLsizeiptr size, void *data); -typedef void(GLAD_API_PTR *PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC)(GLuint framebuffer, - GLenum attachment, - GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC)(GLuint framebuffer, - GLenum attachment, - GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETNAMEDFRAMEBUFFERPARAMETERFVAMDPROC)( - GLuint framebuffer, GLenum pname, GLuint numsamples, GLuint pixelindex, GLsizei size, - GLfloat *values); -typedef void(GLAD_API_PTR *PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC)(GLuint framebuffer, - GLenum pname, GLint *param); -typedef void(GLAD_API_PTR *PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC)(GLuint framebuffer, - GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC)(GLuint program, - GLenum target, - GLuint index, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC)(GLuint program, - GLenum target, - GLuint index, - GLuint *params); -typedef void(GLAD_API_PTR *PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC)(GLuint program, - GLenum target, GLuint index, - GLdouble *params); -typedef void(GLAD_API_PTR *PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC)(GLuint program, - GLenum target, GLuint index, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETNAMEDPROGRAMSTRINGEXTPROC)(GLuint program, GLenum target, - GLenum pname, void *string); -typedef void(GLAD_API_PTR *PFNGLGETNAMEDPROGRAMIVEXTPROC)(GLuint program, GLenum target, - GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC)(GLuint renderbuffer, - GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC)(GLuint renderbuffer, - GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETNAMEDSTRINGARBPROC)(GLint namelen, const GLchar *name, - GLsizei bufSize, GLint *stringlen, - GLchar *string); -typedef void(GLAD_API_PTR *PFNGLGETNAMEDSTRINGIVARBPROC)(GLint namelen, const GLchar *name, - GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETNEXTPERFQUERYIDINTELPROC)(GLuint queryId, GLuint *nextQueryId); -typedef void(GLAD_API_PTR *PFNGLGETOBJECTBUFFERFVATIPROC)(GLuint buffer, GLenum pname, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETOBJECTBUFFERIVATIPROC)(GLuint buffer, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETOBJECTLABELPROC)(GLenum identifier, GLuint name, GLsizei bufSize, - GLsizei *length, GLchar *label); -typedef void(GLAD_API_PTR *PFNGLGETOBJECTLABELEXTPROC)(GLenum type, GLuint object, GLsizei bufSize, - GLsizei *length, GLchar *label); -typedef void(GLAD_API_PTR *PFNGLGETOBJECTPARAMETERFVARBPROC)(GLhandleARB obj, GLenum pname, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETOBJECTPARAMETERIVAPPLEPROC)(GLenum objectType, GLuint name, - GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETOBJECTPARAMETERIVARBPROC)(GLhandleARB obj, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETOBJECTPTRLABELPROC)(const void *ptr, GLsizei bufSize, - GLsizei *length, GLchar *label); -typedef void(GLAD_API_PTR *PFNGLGETOCCLUSIONQUERYIVNVPROC)(GLuint id, GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETOCCLUSIONQUERYUIVNVPROC)(GLuint id, GLenum pname, - GLuint *params); -typedef void(GLAD_API_PTR *PFNGLGETPATHCOMMANDSNVPROC)(GLuint path, GLubyte *commands); -typedef void(GLAD_API_PTR *PFNGLGETPATHCOORDSNVPROC)(GLuint path, GLfloat *coords); -typedef void(GLAD_API_PTR *PFNGLGETPATHDASHARRAYNVPROC)(GLuint path, GLfloat *dashArray); -typedef GLfloat(GLAD_API_PTR *PFNGLGETPATHLENGTHNVPROC)(GLuint path, GLsizei startSegment, - GLsizei numSegments); -typedef void(GLAD_API_PTR *PFNGLGETPATHMETRICRANGENVPROC)(GLbitfield metricQueryMask, - GLuint firstPathName, GLsizei numPaths, - GLsizei stride, GLfloat *metrics); -typedef void(GLAD_API_PTR *PFNGLGETPATHMETRICSNVPROC)(GLbitfield metricQueryMask, GLsizei numPaths, - GLenum pathNameType, const void *paths, - GLuint pathBase, GLsizei stride, - GLfloat *metrics); -typedef void(GLAD_API_PTR *PFNGLGETPATHPARAMETERFVNVPROC)(GLuint path, GLenum pname, - GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLGETPATHPARAMETERIVNVPROC)(GLuint path, GLenum pname, GLint *value); -typedef void(GLAD_API_PTR *PFNGLGETPATHSPACINGNVPROC)(GLenum pathListMode, GLsizei numPaths, - GLenum pathNameType, const void *paths, - GLuint pathBase, GLfloat advanceScale, - GLfloat kerningScale, GLenum transformType, - GLfloat *returnedSpacing); -typedef void(GLAD_API_PTR *PFNGLGETPERFCOUNTERINFOINTELPROC)( - GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, - GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, - GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, - GLuint64 *rawCounterMaxValue); -typedef void(GLAD_API_PTR *PFNGLGETPERFMONITORCOUNTERDATAAMDPROC)(GLuint monitor, GLenum pname, - GLsizei dataSize, GLuint *data, - GLint *bytesWritten); -typedef void(GLAD_API_PTR *PFNGLGETPERFMONITORCOUNTERINFOAMDPROC)(GLuint group, GLuint counter, - GLenum pname, void *data); -typedef void(GLAD_API_PTR *PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC)(GLuint group, GLuint counter, - GLsizei bufSize, - GLsizei *length, - GLchar *counterString); -typedef void(GLAD_API_PTR *PFNGLGETPERFMONITORCOUNTERSAMDPROC)(GLuint group, GLint *numCounters, - GLint *maxActiveCounters, - GLsizei counterSize, - GLuint *counters); -typedef void(GLAD_API_PTR *PFNGLGETPERFMONITORGROUPSTRINGAMDPROC)(GLuint group, GLsizei bufSize, - GLsizei *length, - GLchar *groupString); -typedef void(GLAD_API_PTR *PFNGLGETPERFMONITORGROUPSAMDPROC)(GLint *numGroups, GLsizei groupsSize, - GLuint *groups); -typedef void(GLAD_API_PTR *PFNGLGETPERFQUERYDATAINTELPROC)(GLuint queryHandle, GLuint flags, - GLsizei dataSize, void *data, - GLuint *bytesWritten); -typedef void(GLAD_API_PTR *PFNGLGETPERFQUERYIDBYNAMEINTELPROC)(GLchar *queryName, GLuint *queryId); -typedef void(GLAD_API_PTR *PFNGLGETPERFQUERYINFOINTELPROC)(GLuint queryId, GLuint queryNameLength, - GLchar *queryName, GLuint *dataSize, - GLuint *noCounters, GLuint *noInstances, - GLuint *capsMask); -typedef void(GLAD_API_PTR *PFNGLGETPIXELMAPXVPROC)(GLenum map, GLint size, GLfixed *values); -typedef void(GLAD_API_PTR *PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC)(GLenum pname, GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC)(GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC)(GLenum target, GLenum pname, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC)(GLenum target, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETPOINTERINDEXEDVEXTPROC)(GLenum target, GLuint index, - void **data); -typedef void(GLAD_API_PTR *PFNGLGETPOINTERI_VEXTPROC)(GLenum pname, GLuint index, void **params); -typedef void(GLAD_API_PTR *PFNGLGETPOINTERVPROC)(GLenum pname, void **params); -typedef void(GLAD_API_PTR *PFNGLGETPOINTERVEXTPROC)(GLenum pname, void **params); -typedef void(GLAD_API_PTR *PFNGLGETPROGRAMBINARYPROC)(GLuint program, GLsizei bufSize, - GLsizei *length, GLenum *binaryFormat, - void *binary); -typedef void(GLAD_API_PTR *PFNGLGETPROGRAMENVPARAMETERIIVNVPROC)(GLenum target, GLuint index, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC)(GLenum target, GLuint index, - GLuint *params); -typedef void(GLAD_API_PTR *PFNGLGETPROGRAMENVPARAMETERDVARBPROC)(GLenum target, GLuint index, - GLdouble *params); -typedef void(GLAD_API_PTR *PFNGLGETPROGRAMENVPARAMETERFVARBPROC)(GLenum target, GLuint index, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETPROGRAMINFOLOGPROC)(GLuint program, GLsizei bufSize, - GLsizei *length, GLchar *infoLog); -typedef void(GLAD_API_PTR *PFNGLGETPROGRAMINTERFACEIVPROC)(GLuint program, GLenum programInterface, - GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC)(GLenum target, GLuint index, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC)(GLenum target, GLuint index, - GLuint *params); -typedef void(GLAD_API_PTR *PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC)(GLenum target, GLuint index, - GLdouble *params); -typedef void(GLAD_API_PTR *PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC)(GLenum target, GLuint index, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC)(GLuint id, GLsizei len, - const GLubyte *name, - GLdouble *params); -typedef void(GLAD_API_PTR *PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC)(GLuint id, GLsizei len, - const GLubyte *name, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETPROGRAMPARAMETERDVNVPROC)(GLenum target, GLuint index, - GLenum pname, GLdouble *params); -typedef void(GLAD_API_PTR *PFNGLGETPROGRAMPARAMETERFVNVPROC)(GLenum target, GLuint index, - GLenum pname, GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETPROGRAMPIPELINEINFOLOGPROC)(GLuint pipeline, GLsizei bufSize, - GLsizei *length, GLchar *infoLog); -typedef void(GLAD_API_PTR *PFNGLGETPROGRAMPIPELINEIVPROC)(GLuint pipeline, GLenum pname, - GLint *params); -typedef GLuint(GLAD_API_PTR *PFNGLGETPROGRAMRESOURCEINDEXPROC)(GLuint program, - GLenum programInterface, - const GLchar *name); -typedef GLint(GLAD_API_PTR *PFNGLGETPROGRAMRESOURCELOCATIONPROC)(GLuint program, - GLenum programInterface, - const GLchar *name); -typedef GLint(GLAD_API_PTR *PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC)(GLuint program, - GLenum programInterface, - const GLchar *name); -typedef void(GLAD_API_PTR *PFNGLGETPROGRAMRESOURCENAMEPROC)(GLuint program, GLenum programInterface, - GLuint index, GLsizei bufSize, - GLsizei *length, GLchar *name); -typedef void(GLAD_API_PTR *PFNGLGETPROGRAMRESOURCEFVNVPROC)(GLuint program, GLenum programInterface, - GLuint index, GLsizei propCount, - const GLenum *props, GLsizei count, - GLsizei *length, GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETPROGRAMRESOURCEIVPROC)(GLuint program, GLenum programInterface, - GLuint index, GLsizei propCount, - const GLenum *props, GLsizei count, - GLsizei *length, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETPROGRAMSTAGEIVPROC)(GLuint program, GLenum shadertype, - GLenum pname, GLint *values); -typedef void(GLAD_API_PTR *PFNGLGETPROGRAMSTRINGARBPROC)(GLenum target, GLenum pname, void *string); -typedef void(GLAD_API_PTR *PFNGLGETPROGRAMSTRINGNVPROC)(GLuint id, GLenum pname, GLubyte *program); -typedef void(GLAD_API_PTR *PFNGLGETPROGRAMSUBROUTINEPARAMETERUIVNVPROC)(GLenum target, GLuint index, - GLuint *param); -typedef void(GLAD_API_PTR *PFNGLGETPROGRAMIVPROC)(GLuint program, GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETPROGRAMIVARBPROC)(GLenum target, GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETPROGRAMIVNVPROC)(GLuint id, GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETQUERYBUFFEROBJECTI64VPROC)(GLuint id, GLuint buffer, - GLenum pname, GLintptr offset); -typedef void(GLAD_API_PTR *PFNGLGETQUERYBUFFEROBJECTIVPROC)(GLuint id, GLuint buffer, GLenum pname, - GLintptr offset); -typedef void(GLAD_API_PTR *PFNGLGETQUERYBUFFEROBJECTUI64VPROC)(GLuint id, GLuint buffer, - GLenum pname, GLintptr offset); -typedef void(GLAD_API_PTR *PFNGLGETQUERYBUFFEROBJECTUIVPROC)(GLuint id, GLuint buffer, GLenum pname, - GLintptr offset); -typedef void(GLAD_API_PTR *PFNGLGETQUERYINDEXEDIVPROC)(GLenum target, GLuint index, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETQUERYOBJECTI64VPROC)(GLuint id, GLenum pname, GLint64 *params); -typedef void(GLAD_API_PTR *PFNGLGETQUERYOBJECTI64VEXTPROC)(GLuint id, GLenum pname, - GLint64 *params); -typedef void(GLAD_API_PTR *PFNGLGETQUERYOBJECTIVPROC)(GLuint id, GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETQUERYOBJECTIVARBPROC)(GLuint id, GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETQUERYOBJECTUI64VPROC)(GLuint id, GLenum pname, GLuint64 *params); -typedef void(GLAD_API_PTR *PFNGLGETQUERYOBJECTUI64VEXTPROC)(GLuint id, GLenum pname, - GLuint64 *params); -typedef void(GLAD_API_PTR *PFNGLGETQUERYOBJECTUIVPROC)(GLuint id, GLenum pname, GLuint *params); -typedef void(GLAD_API_PTR *PFNGLGETQUERYOBJECTUIVARBPROC)(GLuint id, GLenum pname, GLuint *params); -typedef void(GLAD_API_PTR *PFNGLGETQUERYIVPROC)(GLenum target, GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETQUERYIVARBPROC)(GLenum target, GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETRENDERBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC)(GLenum target, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERIIVPROC)(GLuint sampler, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERIUIVPROC)(GLuint sampler, GLenum pname, - GLuint *params); -typedef void(GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERFVPROC)(GLuint sampler, GLenum pname, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERIVPROC)(GLuint sampler, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETSEMAPHOREPARAMETERIVNVPROC)(GLuint semaphore, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETSEMAPHOREPARAMETERUI64VEXTPROC)(GLuint semaphore, GLenum pname, - GLuint64 *params); -typedef void(GLAD_API_PTR *PFNGLGETSEPARABLEFILTEREXTPROC)(GLenum target, GLenum format, - GLenum type, void *row, void *column, - void *span); -typedef void(GLAD_API_PTR *PFNGLGETSHADERINFOLOGPROC)(GLuint shader, GLsizei bufSize, - GLsizei *length, GLchar *infoLog); -typedef void(GLAD_API_PTR *PFNGLGETSHADERPRECISIONFORMATPROC)(GLenum shadertype, - GLenum precisiontype, GLint *range, - GLint *precision); -typedef void(GLAD_API_PTR *PFNGLGETSHADERSOURCEPROC)(GLuint shader, GLsizei bufSize, - GLsizei *length, GLchar *source); -typedef void(GLAD_API_PTR *PFNGLGETSHADERSOURCEARBPROC)(GLhandleARB obj, GLsizei maxLength, - GLsizei *length, GLcharARB *source); -typedef void(GLAD_API_PTR *PFNGLGETSHADERIVPROC)(GLuint shader, GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETSHADINGRATEIMAGEPALETTENVPROC)(GLuint viewport, GLuint entry, - GLenum *rate); -typedef void(GLAD_API_PTR *PFNGLGETSHADINGRATESAMPLELOCATIONIVNVPROC)(GLenum rate, GLuint samples, - GLuint index, - GLint *location); -typedef void(GLAD_API_PTR *PFNGLGETSHARPENTEXFUNCSGISPROC)(GLenum target, GLfloat *points); -typedef GLushort(GLAD_API_PTR *PFNGLGETSTAGEINDEXNVPROC)(GLenum shadertype); -typedef const GLubyte *(GLAD_API_PTR *PFNGLGETSTRINGPROC)(GLenum name); -typedef const GLubyte *(GLAD_API_PTR *PFNGLGETSTRINGIPROC)(GLenum name, GLuint index); -typedef GLuint(GLAD_API_PTR *PFNGLGETSUBROUTINEINDEXPROC)(GLuint program, GLenum shadertype, - const GLchar *name); -typedef GLint(GLAD_API_PTR *PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC)(GLuint program, - GLenum shadertype, - const GLchar *name); -typedef void(GLAD_API_PTR *PFNGLGETSYNCIVPROC)(GLsync sync, GLenum pname, GLsizei count, - GLsizei *length, GLint *values); -typedef void(GLAD_API_PTR *PFNGLGETTEXBUMPPARAMETERFVATIPROC)(GLenum pname, GLfloat *param); -typedef void(GLAD_API_PTR *PFNGLGETTEXBUMPPARAMETERIVATIPROC)(GLenum pname, GLint *param); -typedef void(GLAD_API_PTR *PFNGLGETTEXENVXVOESPROC)(GLenum target, GLenum pname, GLfixed *params); -typedef void(GLAD_API_PTR *PFNGLGETTEXFILTERFUNCSGISPROC)(GLenum target, GLenum filter, - GLfloat *weights); -typedef void(GLAD_API_PTR *PFNGLGETTEXGENXVOESPROC)(GLenum coord, GLenum pname, GLfixed *params); -typedef void(GLAD_API_PTR *PFNGLGETTEXIMAGEPROC)(GLenum target, GLint level, GLenum format, - GLenum type, void *pixels); -typedef void(GLAD_API_PTR *PFNGLGETTEXLEVELPARAMETERFVPROC)(GLenum target, GLint level, - GLenum pname, GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETTEXLEVELPARAMETERIVPROC)(GLenum target, GLint level, - GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETTEXLEVELPARAMETERXVOESPROC)(GLenum target, GLint level, - GLenum pname, GLfixed *params); -typedef void(GLAD_API_PTR *PFNGLGETTEXPARAMETERIIVPROC)(GLenum target, GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETTEXPARAMETERIIVEXTPROC)(GLenum target, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETTEXPARAMETERIUIVPROC)(GLenum target, GLenum pname, - GLuint *params); -typedef void(GLAD_API_PTR *PFNGLGETTEXPARAMETERIUIVEXTPROC)(GLenum target, GLenum pname, - GLuint *params); -typedef void(GLAD_API_PTR *PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC)(GLenum target, GLenum pname, - void **params); -typedef void(GLAD_API_PTR *PFNGLGETTEXPARAMETERFVPROC)(GLenum target, GLenum pname, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETTEXPARAMETERIVPROC)(GLenum target, GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETTEXPARAMETERXVOESPROC)(GLenum target, GLenum pname, - GLfixed *params); -typedef GLuint64(GLAD_API_PTR *PFNGLGETTEXTUREHANDLEARBPROC)(GLuint texture); -typedef GLuint64(GLAD_API_PTR *PFNGLGETTEXTUREHANDLENVPROC)(GLuint texture); -typedef void(GLAD_API_PTR *PFNGLGETTEXTUREIMAGEPROC)(GLuint texture, GLint level, GLenum format, - GLenum type, GLsizei bufSize, void *pixels); -typedef void(GLAD_API_PTR *PFNGLGETTEXTUREIMAGEEXTPROC)(GLuint texture, GLenum target, GLint level, - GLenum format, GLenum type, void *pixels); -typedef void(GLAD_API_PTR *PFNGLGETTEXTURELEVELPARAMETERFVPROC)(GLuint texture, GLint level, - GLenum pname, GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC)(GLuint texture, GLenum target, - GLint level, GLenum pname, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETTEXTURELEVELPARAMETERIVPROC)(GLuint texture, GLint level, - GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC)(GLuint texture, GLenum target, - GLint level, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETTEXTUREPARAMETERIIVPROC)(GLuint texture, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETTEXTUREPARAMETERIIVEXTPROC)(GLuint texture, GLenum target, - GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETTEXTUREPARAMETERIUIVPROC)(GLuint texture, GLenum pname, - GLuint *params); -typedef void(GLAD_API_PTR *PFNGLGETTEXTUREPARAMETERIUIVEXTPROC)(GLuint texture, GLenum target, - GLenum pname, GLuint *params); -typedef void(GLAD_API_PTR *PFNGLGETTEXTUREPARAMETERFVPROC)(GLuint texture, GLenum pname, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETTEXTUREPARAMETERFVEXTPROC)(GLuint texture, GLenum target, - GLenum pname, GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETTEXTUREPARAMETERIVPROC)(GLuint texture, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETTEXTUREPARAMETERIVEXTPROC)(GLuint texture, GLenum target, - GLenum pname, GLint *params); -typedef GLuint64(GLAD_API_PTR *PFNGLGETTEXTURESAMPLERHANDLEARBPROC)(GLuint texture, GLuint sampler); -typedef GLuint64(GLAD_API_PTR *PFNGLGETTEXTURESAMPLERHANDLENVPROC)(GLuint texture, GLuint sampler); -typedef void(GLAD_API_PTR *PFNGLGETTEXTURESUBIMAGEPROC)(GLuint texture, GLint level, GLint xoffset, - GLint yoffset, GLint zoffset, GLsizei width, - GLsizei height, GLsizei depth, - GLenum format, GLenum type, GLsizei bufSize, - void *pixels); -typedef void(GLAD_API_PTR *PFNGLGETTRACKMATRIXIVNVPROC)(GLenum target, GLuint address, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETTRANSFORMFEEDBACKVARYINGPROC)(GLuint program, GLuint index, - GLsizei bufSize, GLsizei *length, - GLsizei *size, GLenum *type, - GLchar *name); -typedef void(GLAD_API_PTR *PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC)(GLuint program, GLuint index, - GLsizei bufSize, - GLsizei *length, GLsizei *size, - GLenum *type, GLchar *name); -typedef void(GLAD_API_PTR *PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC)(GLuint program, GLuint index, - GLint *location); -typedef void(GLAD_API_PTR *PFNGLGETTRANSFORMFEEDBACKI64_VPROC)(GLuint xfb, GLenum pname, - GLuint index, GLint64 *param); -typedef void(GLAD_API_PTR *PFNGLGETTRANSFORMFEEDBACKI_VPROC)(GLuint xfb, GLenum pname, GLuint index, - GLint *param); -typedef void(GLAD_API_PTR *PFNGLGETTRANSFORMFEEDBACKIVPROC)(GLuint xfb, GLenum pname, GLint *param); -typedef GLuint(GLAD_API_PTR *PFNGLGETUNIFORMBLOCKINDEXPROC)(GLuint program, - const GLchar *uniformBlockName); -typedef GLint(GLAD_API_PTR *PFNGLGETUNIFORMBUFFERSIZEEXTPROC)(GLuint program, GLint location); -typedef void(GLAD_API_PTR *PFNGLGETUNIFORMINDICESPROC)(GLuint program, GLsizei uniformCount, - const GLchar *const *uniformNames, - GLuint *uniformIndices); -typedef GLint(GLAD_API_PTR *PFNGLGETUNIFORMLOCATIONPROC)(GLuint program, const GLchar *name); -typedef GLint(GLAD_API_PTR *PFNGLGETUNIFORMLOCATIONARBPROC)(GLhandleARB programObj, - const GLcharARB *name); -typedef GLintptr(GLAD_API_PTR *PFNGLGETUNIFORMOFFSETEXTPROC)(GLuint program, GLint location); -typedef void(GLAD_API_PTR *PFNGLGETUNIFORMSUBROUTINEUIVPROC)(GLenum shadertype, GLint location, - GLuint *params); -typedef void(GLAD_API_PTR *PFNGLGETUNIFORMDVPROC)(GLuint program, GLint location, GLdouble *params); -typedef void(GLAD_API_PTR *PFNGLGETUNIFORMFVPROC)(GLuint program, GLint location, GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETUNIFORMFVARBPROC)(GLhandleARB programObj, GLint location, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETUNIFORMI64VARBPROC)(GLuint program, GLint location, - GLint64 *params); -typedef void(GLAD_API_PTR *PFNGLGETUNIFORMI64VNVPROC)(GLuint program, GLint location, - GLint64EXT *params); -typedef void(GLAD_API_PTR *PFNGLGETUNIFORMIVPROC)(GLuint program, GLint location, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETUNIFORMIVARBPROC)(GLhandleARB programObj, GLint location, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETUNIFORMUI64VARBPROC)(GLuint program, GLint location, - GLuint64 *params); -typedef void(GLAD_API_PTR *PFNGLGETUNIFORMUI64VNVPROC)(GLuint program, GLint location, - GLuint64EXT *params); -typedef void(GLAD_API_PTR *PFNGLGETUNIFORMUIVPROC)(GLuint program, GLint location, GLuint *params); -typedef void(GLAD_API_PTR *PFNGLGETUNIFORMUIVEXTPROC)(GLuint program, GLint location, - GLuint *params); -typedef void(GLAD_API_PTR *PFNGLGETUNSIGNEDBYTEI_VEXTPROC)(GLenum target, GLuint index, - GLubyte *data); -typedef void(GLAD_API_PTR *PFNGLGETUNSIGNEDBYTEVEXTPROC)(GLenum pname, GLubyte *data); -typedef void(GLAD_API_PTR *PFNGLGETVARIANTARRAYOBJECTFVATIPROC)(GLuint id, GLenum pname, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETVARIANTARRAYOBJECTIVATIPROC)(GLuint id, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETVARIANTBOOLEANVEXTPROC)(GLuint id, GLenum value, - GLboolean *data); -typedef void(GLAD_API_PTR *PFNGLGETVARIANTFLOATVEXTPROC)(GLuint id, GLenum value, GLfloat *data); -typedef void(GLAD_API_PTR *PFNGLGETVARIANTINTEGERVEXTPROC)(GLuint id, GLenum value, GLint *data); -typedef void(GLAD_API_PTR *PFNGLGETVARIANTPOINTERVEXTPROC)(GLuint id, GLenum value, void **data); -typedef GLint(GLAD_API_PTR *PFNGLGETVARYINGLOCATIONNVPROC)(GLuint program, const GLchar *name); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXARRAYINDEXED64IVPROC)(GLuint vaobj, GLuint index, - GLenum pname, GLint64 *param); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXARRAYINDEXEDIVPROC)(GLuint vaobj, GLuint index, - GLenum pname, GLint *param); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXARRAYINTEGERI_VEXTPROC)(GLuint vaobj, GLuint index, - GLenum pname, GLint *param); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXARRAYINTEGERVEXTPROC)(GLuint vaobj, GLenum pname, - GLint *param); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXARRAYPOINTERI_VEXTPROC)(GLuint vaobj, GLuint index, - GLenum pname, void **param); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXARRAYPOINTERVEXTPROC)(GLuint vaobj, GLenum pname, - void **param); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXARRAYIVPROC)(GLuint vaobj, GLenum pname, GLint *param); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC)(GLuint index, GLenum pname, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC)(GLuint index, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBIIVPROC)(GLuint index, GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBIIVEXTPROC)(GLuint index, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBIUIVPROC)(GLuint index, GLenum pname, - GLuint *params); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBIUIVEXTPROC)(GLuint index, GLenum pname, - GLuint *params); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBLDVPROC)(GLuint index, GLenum pname, - GLdouble *params); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBLDVEXTPROC)(GLuint index, GLenum pname, - GLdouble *params); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBLI64VNVPROC)(GLuint index, GLenum pname, - GLint64EXT *params); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBLUI64VARBPROC)(GLuint index, GLenum pname, - GLuint64EXT *params); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBLUI64VNVPROC)(GLuint index, GLenum pname, - GLuint64EXT *params); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBPOINTERVPROC)(GLuint index, GLenum pname, - void **pointer); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBPOINTERVARBPROC)(GLuint index, GLenum pname, - void **pointer); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBPOINTERVNVPROC)(GLuint index, GLenum pname, - void **pointer); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBDVPROC)(GLuint index, GLenum pname, - GLdouble *params); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBDVARBPROC)(GLuint index, GLenum pname, - GLdouble *params); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBDVNVPROC)(GLuint index, GLenum pname, - GLdouble *params); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBFVPROC)(GLuint index, GLenum pname, GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBFVARBPROC)(GLuint index, GLenum pname, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBFVNVPROC)(GLuint index, GLenum pname, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBIVPROC)(GLuint index, GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBIVARBPROC)(GLuint index, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBIVNVPROC)(GLuint index, GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETVIDEOCAPTURESTREAMDVNVPROC)(GLuint video_capture_slot, - GLuint stream, GLenum pname, - GLdouble *params); -typedef void(GLAD_API_PTR *PFNGLGETVIDEOCAPTURESTREAMFVNVPROC)(GLuint video_capture_slot, - GLuint stream, GLenum pname, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETVIDEOCAPTURESTREAMIVNVPROC)(GLuint video_capture_slot, - GLuint stream, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETVIDEOCAPTUREIVNVPROC)(GLuint video_capture_slot, GLenum pname, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETVIDEOI64VNVPROC)(GLuint video_slot, GLenum pname, - GLint64EXT *params); -typedef void(GLAD_API_PTR *PFNGLGETVIDEOIVNVPROC)(GLuint video_slot, GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETVIDEOUI64VNVPROC)(GLuint video_slot, GLenum pname, - GLuint64EXT *params); -typedef void(GLAD_API_PTR *PFNGLGETVIDEOUIVNVPROC)(GLuint video_slot, GLenum pname, GLuint *params); -typedef GLVULKANPROCNV(GLAD_API_PTR *PFNGLGETVKPROCADDRNVPROC)(const GLchar *name); -typedef void(GLAD_API_PTR *PFNGLGETNCOMPRESSEDTEXIMAGEPROC)(GLenum target, GLint lod, - GLsizei bufSize, void *pixels); -typedef void(GLAD_API_PTR *PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC)(GLenum target, GLint lod, - GLsizei bufSize, void *img); -typedef void(GLAD_API_PTR *PFNGLGETNTEXIMAGEPROC)(GLenum target, GLint level, GLenum format, - GLenum type, GLsizei bufSize, void *pixels); -typedef void(GLAD_API_PTR *PFNGLGETNTEXIMAGEARBPROC)(GLenum target, GLint level, GLenum format, - GLenum type, GLsizei bufSize, void *img); -typedef void(GLAD_API_PTR *PFNGLGETNUNIFORMDVPROC)(GLuint program, GLint location, GLsizei bufSize, - GLdouble *params); -typedef void(GLAD_API_PTR *PFNGLGETNUNIFORMDVARBPROC)(GLuint program, GLint location, - GLsizei bufSize, GLdouble *params); -typedef void(GLAD_API_PTR *PFNGLGETNUNIFORMFVPROC)(GLuint program, GLint location, GLsizei bufSize, - GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETNUNIFORMFVARBPROC)(GLuint program, GLint location, - GLsizei bufSize, GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLGETNUNIFORMI64VARBPROC)(GLuint program, GLint location, - GLsizei bufSize, GLint64 *params); -typedef void(GLAD_API_PTR *PFNGLGETNUNIFORMIVPROC)(GLuint program, GLint location, GLsizei bufSize, - GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETNUNIFORMIVARBPROC)(GLuint program, GLint location, - GLsizei bufSize, GLint *params); -typedef void(GLAD_API_PTR *PFNGLGETNUNIFORMUI64VARBPROC)(GLuint program, GLint location, - GLsizei bufSize, GLuint64 *params); -typedef void(GLAD_API_PTR *PFNGLGETNUNIFORMUIVPROC)(GLuint program, GLint location, GLsizei bufSize, - GLuint *params); -typedef void(GLAD_API_PTR *PFNGLGETNUNIFORMUIVARBPROC)(GLuint program, GLint location, - GLsizei bufSize, GLuint *params); -typedef void(GLAD_API_PTR *PFNGLGLOBALALPHAFACTORBSUNPROC)(GLbyte factor); -typedef void(GLAD_API_PTR *PFNGLGLOBALALPHAFACTORDSUNPROC)(GLdouble factor); -typedef void(GLAD_API_PTR *PFNGLGLOBALALPHAFACTORFSUNPROC)(GLfloat factor); -typedef void(GLAD_API_PTR *PFNGLGLOBALALPHAFACTORISUNPROC)(GLint factor); -typedef void(GLAD_API_PTR *PFNGLGLOBALALPHAFACTORSSUNPROC)(GLshort factor); -typedef void(GLAD_API_PTR *PFNGLGLOBALALPHAFACTORUBSUNPROC)(GLubyte factor); -typedef void(GLAD_API_PTR *PFNGLGLOBALALPHAFACTORUISUNPROC)(GLuint factor); -typedef void(GLAD_API_PTR *PFNGLGLOBALALPHAFACTORUSSUNPROC)(GLushort factor); -typedef void(GLAD_API_PTR *PFNGLHINTPROC)(GLenum target, GLenum mode); -typedef void(GLAD_API_PTR *PFNGLHINTPGIPROC)(GLenum target, GLint mode); -typedef void(GLAD_API_PTR *PFNGLHISTOGRAMEXTPROC)(GLenum target, GLsizei width, - GLenum internalformat, GLboolean sink); -typedef void(GLAD_API_PTR *PFNGLIGLOOINTERFACESGIXPROC)(GLenum pname, const void *params); -typedef void(GLAD_API_PTR *PFNGLIMAGETRANSFORMPARAMETERFHPPROC)(GLenum target, GLenum pname, - GLfloat param); -typedef void(GLAD_API_PTR *PFNGLIMAGETRANSFORMPARAMETERFVHPPROC)(GLenum target, GLenum pname, - const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLIMAGETRANSFORMPARAMETERIHPPROC)(GLenum target, GLenum pname, - GLint param); -typedef void(GLAD_API_PTR *PFNGLIMAGETRANSFORMPARAMETERIVHPPROC)(GLenum target, GLenum pname, - const GLint *params); -typedef void(GLAD_API_PTR *PFNGLIMPORTMEMORYFDEXTPROC)(GLuint memory, GLuint64 size, - GLenum handleType, GLint fd); -typedef void(GLAD_API_PTR *PFNGLIMPORTMEMORYWIN32HANDLEEXTPROC)(GLuint memory, GLuint64 size, - GLenum handleType, void *handle); -typedef void(GLAD_API_PTR *PFNGLIMPORTMEMORYWIN32NAMEEXTPROC)(GLuint memory, GLuint64 size, - GLenum handleType, const void *name); -typedef void(GLAD_API_PTR *PFNGLIMPORTSEMAPHOREFDEXTPROC)(GLuint semaphore, GLenum handleType, - GLint fd); -typedef void(GLAD_API_PTR *PFNGLIMPORTSEMAPHOREWIN32HANDLEEXTPROC)(GLuint semaphore, - GLenum handleType, void *handle); -typedef void(GLAD_API_PTR *PFNGLIMPORTSEMAPHOREWIN32NAMEEXTPROC)(GLuint semaphore, - GLenum handleType, - const void *name); -typedef GLsync(GLAD_API_PTR *PFNGLIMPORTSYNCEXTPROC)(GLenum external_sync_type, - GLintptr external_sync, GLbitfield flags); -typedef void(GLAD_API_PTR *PFNGLINDEXFORMATNVPROC)(GLenum type, GLsizei stride); -typedef void(GLAD_API_PTR *PFNGLINDEXFUNCEXTPROC)(GLenum func, GLclampf ref); -typedef void(GLAD_API_PTR *PFNGLINDEXMATERIALEXTPROC)(GLenum face, GLenum mode); -typedef void(GLAD_API_PTR *PFNGLINDEXPOINTEREXTPROC)(GLenum type, GLsizei stride, GLsizei count, - const void *pointer); -typedef void(GLAD_API_PTR *PFNGLINDEXPOINTERLISTIBMPROC)(GLenum type, GLint stride, - const void **pointer, GLint ptrstride); -typedef void(GLAD_API_PTR *PFNGLINDEXXOESPROC)(GLfixed component); -typedef void(GLAD_API_PTR *PFNGLINDEXXVOESPROC)(const GLfixed *component); -typedef void(GLAD_API_PTR *PFNGLINSERTCOMPONENTEXTPROC)(GLuint res, GLuint src, GLuint num); -typedef void(GLAD_API_PTR *PFNGLINSERTEVENTMARKEREXTPROC)(GLsizei length, const GLchar *marker); -typedef void(GLAD_API_PTR *PFNGLINSTRUMENTSBUFFERSGIXPROC)(GLsizei size, GLint *buffer); -typedef void(GLAD_API_PTR *PFNGLINTERPOLATEPATHSNVPROC)(GLuint resultPath, GLuint pathA, - GLuint pathB, GLfloat weight); -typedef void(GLAD_API_PTR *PFNGLINVALIDATEBUFFERDATAPROC)(GLuint buffer); -typedef void(GLAD_API_PTR *PFNGLINVALIDATEBUFFERSUBDATAPROC)(GLuint buffer, GLintptr offset, - GLsizeiptr length); -typedef void(GLAD_API_PTR *PFNGLINVALIDATEFRAMEBUFFERPROC)(GLenum target, GLsizei numAttachments, - const GLenum *attachments); -typedef void(GLAD_API_PTR *PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC)(GLuint framebuffer, - GLsizei numAttachments, - const GLenum *attachments); -typedef void(GLAD_API_PTR *PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC)( - GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, - GLsizei width, GLsizei height); -typedef void(GLAD_API_PTR *PFNGLINVALIDATESUBFRAMEBUFFERPROC)(GLenum target, GLsizei numAttachments, - const GLenum *attachments, GLint x, - GLint y, GLsizei width, - GLsizei height); -typedef void(GLAD_API_PTR *PFNGLINVALIDATETEXIMAGEPROC)(GLuint texture, GLint level); -typedef void(GLAD_API_PTR *PFNGLINVALIDATETEXSUBIMAGEPROC)(GLuint texture, GLint level, - GLint xoffset, GLint yoffset, - GLint zoffset, GLsizei width, - GLsizei height, GLsizei depth); -typedef GLboolean(GLAD_API_PTR *PFNGLISASYNCMARKERSGIXPROC)(GLuint marker); -typedef GLboolean(GLAD_API_PTR *PFNGLISBUFFERPROC)(GLuint buffer); -typedef GLboolean(GLAD_API_PTR *PFNGLISBUFFERARBPROC)(GLuint buffer); -typedef GLboolean(GLAD_API_PTR *PFNGLISBUFFERRESIDENTNVPROC)(GLenum target); -typedef GLboolean(GLAD_API_PTR *PFNGLISCOMMANDLISTNVPROC)(GLuint list); -typedef GLboolean(GLAD_API_PTR *PFNGLISENABLEDPROC)(GLenum cap); -typedef GLboolean(GLAD_API_PTR *PFNGLISENABLEDINDEXEDEXTPROC)(GLenum target, GLuint index); -typedef GLboolean(GLAD_API_PTR *PFNGLISENABLEDIPROC)(GLenum target, GLuint index); -typedef GLboolean(GLAD_API_PTR *PFNGLISFENCEAPPLEPROC)(GLuint fence); -typedef GLboolean(GLAD_API_PTR *PFNGLISFENCENVPROC)(GLuint fence); -typedef GLboolean(GLAD_API_PTR *PFNGLISFRAMEBUFFERPROC)(GLuint framebuffer); -typedef GLboolean(GLAD_API_PTR *PFNGLISFRAMEBUFFEREXTPROC)(GLuint framebuffer); -typedef GLboolean(GLAD_API_PTR *PFNGLISIMAGEHANDLERESIDENTARBPROC)(GLuint64 handle); -typedef GLboolean(GLAD_API_PTR *PFNGLISIMAGEHANDLERESIDENTNVPROC)(GLuint64 handle); -typedef GLboolean(GLAD_API_PTR *PFNGLISMEMORYOBJECTEXTPROC)(GLuint memoryObject); -typedef GLboolean(GLAD_API_PTR *PFNGLISNAMEAMDPROC)(GLenum identifier, GLuint name); -typedef GLboolean(GLAD_API_PTR *PFNGLISNAMEDBUFFERRESIDENTNVPROC)(GLuint buffer); -typedef GLboolean(GLAD_API_PTR *PFNGLISNAMEDSTRINGARBPROC)(GLint namelen, const GLchar *name); -typedef GLboolean(GLAD_API_PTR *PFNGLISOBJECTBUFFERATIPROC)(GLuint buffer); -typedef GLboolean(GLAD_API_PTR *PFNGLISOCCLUSIONQUERYNVPROC)(GLuint id); -typedef GLboolean(GLAD_API_PTR *PFNGLISPATHNVPROC)(GLuint path); -typedef GLboolean(GLAD_API_PTR *PFNGLISPOINTINFILLPATHNVPROC)(GLuint path, GLuint mask, GLfloat x, - GLfloat y); -typedef GLboolean(GLAD_API_PTR *PFNGLISPOINTINSTROKEPATHNVPROC)(GLuint path, GLfloat x, GLfloat y); -typedef GLboolean(GLAD_API_PTR *PFNGLISPROGRAMPROC)(GLuint program); -typedef GLboolean(GLAD_API_PTR *PFNGLISPROGRAMARBPROC)(GLuint program); -typedef GLboolean(GLAD_API_PTR *PFNGLISPROGRAMNVPROC)(GLuint id); -typedef GLboolean(GLAD_API_PTR *PFNGLISPROGRAMPIPELINEPROC)(GLuint pipeline); -typedef GLboolean(GLAD_API_PTR *PFNGLISQUERYPROC)(GLuint id); -typedef GLboolean(GLAD_API_PTR *PFNGLISQUERYARBPROC)(GLuint id); -typedef GLboolean(GLAD_API_PTR *PFNGLISRENDERBUFFERPROC)(GLuint renderbuffer); -typedef GLboolean(GLAD_API_PTR *PFNGLISRENDERBUFFEREXTPROC)(GLuint renderbuffer); -typedef GLboolean(GLAD_API_PTR *PFNGLISSAMPLERPROC)(GLuint sampler); -typedef GLboolean(GLAD_API_PTR *PFNGLISSEMAPHOREEXTPROC)(GLuint semaphore); -typedef GLboolean(GLAD_API_PTR *PFNGLISSHADERPROC)(GLuint shader); -typedef GLboolean(GLAD_API_PTR *PFNGLISSTATENVPROC)(GLuint state); -typedef GLboolean(GLAD_API_PTR *PFNGLISSYNCPROC)(GLsync sync); -typedef GLboolean(GLAD_API_PTR *PFNGLISTEXTUREPROC)(GLuint texture); -typedef GLboolean(GLAD_API_PTR *PFNGLISTEXTUREEXTPROC)(GLuint texture); -typedef GLboolean(GLAD_API_PTR *PFNGLISTEXTUREHANDLERESIDENTARBPROC)(GLuint64 handle); -typedef GLboolean(GLAD_API_PTR *PFNGLISTEXTUREHANDLERESIDENTNVPROC)(GLuint64 handle); -typedef GLboolean(GLAD_API_PTR *PFNGLISTRANSFORMFEEDBACKPROC)(GLuint id); -typedef GLboolean(GLAD_API_PTR *PFNGLISTRANSFORMFEEDBACKNVPROC)(GLuint id); -typedef GLboolean(GLAD_API_PTR *PFNGLISVARIANTENABLEDEXTPROC)(GLuint id, GLenum cap); -typedef GLboolean(GLAD_API_PTR *PFNGLISVERTEXARRAYPROC)(GLuint array); -typedef GLboolean(GLAD_API_PTR *PFNGLISVERTEXARRAYAPPLEPROC)(GLuint array); -typedef GLboolean(GLAD_API_PTR *PFNGLISVERTEXATTRIBENABLEDAPPLEPROC)(GLuint index, GLenum pname); -typedef void(GLAD_API_PTR *PFNGLLGPUCOPYIMAGESUBDATANVXPROC)( - GLuint sourceGpu, GLbitfield destinationGpuMask, GLuint srcName, GLenum srcTarget, - GLint srcLevel, GLint srcX, GLint srxY, GLint srcZ, GLuint dstName, GLenum dstTarget, - GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, - GLsizei depth); -typedef void(GLAD_API_PTR *PFNGLLGPUINTERLOCKNVXPROC)(void); -typedef void(GLAD_API_PTR *PFNGLLGPUNAMEDBUFFERSUBDATANVXPROC)(GLbitfield gpuMask, GLuint buffer, - GLintptr offset, GLsizeiptr size, - const void *data); -typedef void(GLAD_API_PTR *PFNGLLABELOBJECTEXTPROC)(GLenum type, GLuint object, GLsizei length, - const GLchar *label); -typedef void(GLAD_API_PTR *PFNGLLIGHTENVISGIXPROC)(GLenum pname, GLint param); -typedef void(GLAD_API_PTR *PFNGLLIGHTMODELXOESPROC)(GLenum pname, GLfixed param); -typedef void(GLAD_API_PTR *PFNGLLIGHTMODELXVOESPROC)(GLenum pname, const GLfixed *param); -typedef void(GLAD_API_PTR *PFNGLLIGHTXOESPROC)(GLenum light, GLenum pname, GLfixed param); -typedef void(GLAD_API_PTR *PFNGLLIGHTXVOESPROC)(GLenum light, GLenum pname, const GLfixed *params); -typedef void(GLAD_API_PTR *PFNGLLINEWIDTHPROC)(GLfloat width); -typedef void(GLAD_API_PTR *PFNGLLINEWIDTHXOESPROC)(GLfixed width); -typedef void(GLAD_API_PTR *PFNGLLINKPROGRAMPROC)(GLuint program); -typedef void(GLAD_API_PTR *PFNGLLINKPROGRAMARBPROC)(GLhandleARB programObj); -typedef void(GLAD_API_PTR *PFNGLLISTDRAWCOMMANDSSTATESCLIENTNVPROC)( - GLuint list, GLuint segment, const void **indirects, const GLsizei *sizes, - const GLuint *states, const GLuint *fbos, GLuint count); -typedef void(GLAD_API_PTR *PFNGLLISTPARAMETERFSGIXPROC)(GLuint list, GLenum pname, GLfloat param); -typedef void(GLAD_API_PTR *PFNGLLISTPARAMETERFVSGIXPROC)(GLuint list, GLenum pname, - const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLLISTPARAMETERISGIXPROC)(GLuint list, GLenum pname, GLint param); -typedef void(GLAD_API_PTR *PFNGLLISTPARAMETERIVSGIXPROC)(GLuint list, GLenum pname, - const GLint *params); -typedef void(GLAD_API_PTR *PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC)(GLbitfield mask); -typedef void(GLAD_API_PTR *PFNGLLOADMATRIXXOESPROC)(const GLfixed *m); -typedef void(GLAD_API_PTR *PFNGLLOADPROGRAMNVPROC)(GLenum target, GLuint id, GLsizei len, - const GLubyte *program); -typedef void(GLAD_API_PTR *PFNGLLOADTRANSPOSEMATRIXDARBPROC)(const GLdouble *m); -typedef void(GLAD_API_PTR *PFNGLLOADTRANSPOSEMATRIXFARBPROC)(const GLfloat *m); -typedef void(GLAD_API_PTR *PFNGLLOADTRANSPOSEMATRIXXOESPROC)(const GLfixed *m); -typedef void(GLAD_API_PTR *PFNGLLOCKARRAYSEXTPROC)(GLint first, GLsizei count); -typedef void(GLAD_API_PTR *PFNGLLOGICOPPROC)(GLenum opcode); -typedef void(GLAD_API_PTR *PFNGLMAKEBUFFERNONRESIDENTNVPROC)(GLenum target); -typedef void(GLAD_API_PTR *PFNGLMAKEBUFFERRESIDENTNVPROC)(GLenum target, GLenum access); -typedef void(GLAD_API_PTR *PFNGLMAKEIMAGEHANDLENONRESIDENTARBPROC)(GLuint64 handle); -typedef void(GLAD_API_PTR *PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC)(GLuint64 handle); -typedef void(GLAD_API_PTR *PFNGLMAKEIMAGEHANDLERESIDENTARBPROC)(GLuint64 handle, GLenum access); -typedef void(GLAD_API_PTR *PFNGLMAKEIMAGEHANDLERESIDENTNVPROC)(GLuint64 handle, GLenum access); -typedef void(GLAD_API_PTR *PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC)(GLuint buffer); -typedef void(GLAD_API_PTR *PFNGLMAKENAMEDBUFFERRESIDENTNVPROC)(GLuint buffer, GLenum access); -typedef void(GLAD_API_PTR *PFNGLMAKETEXTUREHANDLENONRESIDENTARBPROC)(GLuint64 handle); -typedef void(GLAD_API_PTR *PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC)(GLuint64 handle); -typedef void(GLAD_API_PTR *PFNGLMAKETEXTUREHANDLERESIDENTARBPROC)(GLuint64 handle); -typedef void(GLAD_API_PTR *PFNGLMAKETEXTUREHANDLERESIDENTNVPROC)(GLuint64 handle); -typedef void(GLAD_API_PTR *PFNGLMAP1XOESPROC)(GLenum target, GLfixed u1, GLfixed u2, GLint stride, - GLint order, GLfixed points); -typedef void(GLAD_API_PTR *PFNGLMAP2XOESPROC)(GLenum target, GLfixed u1, GLfixed u2, GLint ustride, - GLint uorder, GLfixed v1, GLfixed v2, GLint vstride, - GLint vorder, GLfixed points); -typedef void *(GLAD_API_PTR *PFNGLMAPBUFFERPROC)(GLenum target, GLenum access); -typedef void *(GLAD_API_PTR *PFNGLMAPBUFFERARBPROC)(GLenum target, GLenum access); -typedef void *(GLAD_API_PTR *PFNGLMAPBUFFERRANGEPROC)(GLenum target, GLintptr offset, - GLsizeiptr length, GLbitfield access); -typedef void(GLAD_API_PTR *PFNGLMAPCONTROLPOINTSNVPROC)(GLenum target, GLuint index, GLenum type, - GLsizei ustride, GLsizei vstride, - GLint uorder, GLint vorder, - GLboolean packed, const void *points); -typedef void(GLAD_API_PTR *PFNGLMAPGRID1XOESPROC)(GLint n, GLfixed u1, GLfixed u2); -typedef void(GLAD_API_PTR *PFNGLMAPGRID2XOESPROC)(GLint n, GLfixed u1, GLfixed u2, GLfixed v1, - GLfixed v2); -typedef void *(GLAD_API_PTR *PFNGLMAPNAMEDBUFFERPROC)(GLuint buffer, GLenum access); -typedef void *(GLAD_API_PTR *PFNGLMAPNAMEDBUFFEREXTPROC)(GLuint buffer, GLenum access); -typedef void *(GLAD_API_PTR *PFNGLMAPNAMEDBUFFERRANGEPROC)(GLuint buffer, GLintptr offset, - GLsizeiptr length, GLbitfield access); -typedef void *(GLAD_API_PTR *PFNGLMAPNAMEDBUFFERRANGEEXTPROC)(GLuint buffer, GLintptr offset, - GLsizeiptr length, GLbitfield access); -typedef void *(GLAD_API_PTR *PFNGLMAPOBJECTBUFFERATIPROC)(GLuint buffer); -typedef void(GLAD_API_PTR *PFNGLMAPPARAMETERFVNVPROC)(GLenum target, GLenum pname, - const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLMAPPARAMETERIVNVPROC)(GLenum target, GLenum pname, - const GLint *params); -typedef void *(GLAD_API_PTR *PFNGLMAPTEXTURE2DINTELPROC)(GLuint texture, GLint level, - GLbitfield access, GLint *stride, - GLenum *layout); -typedef void(GLAD_API_PTR *PFNGLMAPVERTEXATTRIB1DAPPLEPROC)(GLuint index, GLuint size, GLdouble u1, - GLdouble u2, GLint stride, GLint order, - const GLdouble *points); -typedef void(GLAD_API_PTR *PFNGLMAPVERTEXATTRIB1FAPPLEPROC)(GLuint index, GLuint size, GLfloat u1, - GLfloat u2, GLint stride, GLint order, - const GLfloat *points); -typedef void(GLAD_API_PTR *PFNGLMAPVERTEXATTRIB2DAPPLEPROC)(GLuint index, GLuint size, GLdouble u1, - GLdouble u2, GLint ustride, - GLint uorder, GLdouble v1, GLdouble v2, - GLint vstride, GLint vorder, - const GLdouble *points); -typedef void(GLAD_API_PTR *PFNGLMAPVERTEXATTRIB2FAPPLEPROC)(GLuint index, GLuint size, GLfloat u1, - GLfloat u2, GLint ustride, GLint uorder, - GLfloat v1, GLfloat v2, GLint vstride, - GLint vorder, const GLfloat *points); -typedef void(GLAD_API_PTR *PFNGLMATERIALXOESPROC)(GLenum face, GLenum pname, GLfixed param); -typedef void(GLAD_API_PTR *PFNGLMATERIALXVOESPROC)(GLenum face, GLenum pname, const GLfixed *param); -typedef void(GLAD_API_PTR *PFNGLMATRIXFRUSTUMEXTPROC)(GLenum mode, GLdouble left, GLdouble right, - GLdouble bottom, GLdouble top, GLdouble zNear, - GLdouble zFar); -typedef void(GLAD_API_PTR *PFNGLMATRIXINDEXPOINTERARBPROC)(GLint size, GLenum type, GLsizei stride, - const void *pointer); -typedef void(GLAD_API_PTR *PFNGLMATRIXINDEXUBVARBPROC)(GLint size, const GLubyte *indices); -typedef void(GLAD_API_PTR *PFNGLMATRIXINDEXUIVARBPROC)(GLint size, const GLuint *indices); -typedef void(GLAD_API_PTR *PFNGLMATRIXINDEXUSVARBPROC)(GLint size, const GLushort *indices); -typedef void(GLAD_API_PTR *PFNGLMATRIXLOAD3X2FNVPROC)(GLenum matrixMode, const GLfloat *m); -typedef void(GLAD_API_PTR *PFNGLMATRIXLOAD3X3FNVPROC)(GLenum matrixMode, const GLfloat *m); -typedef void(GLAD_API_PTR *PFNGLMATRIXLOADIDENTITYEXTPROC)(GLenum mode); -typedef void(GLAD_API_PTR *PFNGLMATRIXLOADTRANSPOSE3X3FNVPROC)(GLenum matrixMode, const GLfloat *m); -typedef void(GLAD_API_PTR *PFNGLMATRIXLOADTRANSPOSEDEXTPROC)(GLenum mode, const GLdouble *m); -typedef void(GLAD_API_PTR *PFNGLMATRIXLOADTRANSPOSEFEXTPROC)(GLenum mode, const GLfloat *m); -typedef void(GLAD_API_PTR *PFNGLMATRIXLOADDEXTPROC)(GLenum mode, const GLdouble *m); -typedef void(GLAD_API_PTR *PFNGLMATRIXLOADFEXTPROC)(GLenum mode, const GLfloat *m); -typedef void(GLAD_API_PTR *PFNGLMATRIXMULT3X2FNVPROC)(GLenum matrixMode, const GLfloat *m); -typedef void(GLAD_API_PTR *PFNGLMATRIXMULT3X3FNVPROC)(GLenum matrixMode, const GLfloat *m); -typedef void(GLAD_API_PTR *PFNGLMATRIXMULTTRANSPOSE3X3FNVPROC)(GLenum matrixMode, const GLfloat *m); -typedef void(GLAD_API_PTR *PFNGLMATRIXMULTTRANSPOSEDEXTPROC)(GLenum mode, const GLdouble *m); -typedef void(GLAD_API_PTR *PFNGLMATRIXMULTTRANSPOSEFEXTPROC)(GLenum mode, const GLfloat *m); -typedef void(GLAD_API_PTR *PFNGLMATRIXMULTDEXTPROC)(GLenum mode, const GLdouble *m); -typedef void(GLAD_API_PTR *PFNGLMATRIXMULTFEXTPROC)(GLenum mode, const GLfloat *m); -typedef void(GLAD_API_PTR *PFNGLMATRIXORTHOEXTPROC)(GLenum mode, GLdouble left, GLdouble right, - GLdouble bottom, GLdouble top, GLdouble zNear, - GLdouble zFar); -typedef void(GLAD_API_PTR *PFNGLMATRIXPOPEXTPROC)(GLenum mode); -typedef void(GLAD_API_PTR *PFNGLMATRIXPUSHEXTPROC)(GLenum mode); -typedef void(GLAD_API_PTR *PFNGLMATRIXROTATEDEXTPROC)(GLenum mode, GLdouble angle, GLdouble x, - GLdouble y, GLdouble z); -typedef void(GLAD_API_PTR *PFNGLMATRIXROTATEFEXTPROC)(GLenum mode, GLfloat angle, GLfloat x, - GLfloat y, GLfloat z); -typedef void(GLAD_API_PTR *PFNGLMATRIXSCALEDEXTPROC)(GLenum mode, GLdouble x, GLdouble y, - GLdouble z); -typedef void(GLAD_API_PTR *PFNGLMATRIXSCALEFEXTPROC)(GLenum mode, GLfloat x, GLfloat y, GLfloat z); -typedef void(GLAD_API_PTR *PFNGLMATRIXTRANSLATEDEXTPROC)(GLenum mode, GLdouble x, GLdouble y, - GLdouble z); -typedef void(GLAD_API_PTR *PFNGLMATRIXTRANSLATEFEXTPROC)(GLenum mode, GLfloat x, GLfloat y, - GLfloat z); -typedef void(GLAD_API_PTR *PFNGLMAXSHADERCOMPILERTHREADSARBPROC)(GLuint count); -typedef void(GLAD_API_PTR *PFNGLMAXSHADERCOMPILERTHREADSKHRPROC)(GLuint count); -typedef void(GLAD_API_PTR *PFNGLMEMORYBARRIERPROC)(GLbitfield barriers); -typedef void(GLAD_API_PTR *PFNGLMEMORYBARRIERBYREGIONPROC)(GLbitfield barriers); -typedef void(GLAD_API_PTR *PFNGLMEMORYBARRIEREXTPROC)(GLbitfield barriers); -typedef void(GLAD_API_PTR *PFNGLMEMORYOBJECTPARAMETERIVEXTPROC)(GLuint memoryObject, GLenum pname, - const GLint *params); -typedef void(GLAD_API_PTR *PFNGLMINSAMPLESHADINGPROC)(GLfloat value); -typedef void(GLAD_API_PTR *PFNGLMINSAMPLESHADINGARBPROC)(GLfloat value); -typedef void(GLAD_API_PTR *PFNGLMINMAXEXTPROC)(GLenum target, GLenum internalformat, - GLboolean sink); -typedef void(GLAD_API_PTR *PFNGLMULTMATRIXXOESPROC)(const GLfixed *m); -typedef void(GLAD_API_PTR *PFNGLMULTTRANSPOSEMATRIXDARBPROC)(const GLdouble *m); -typedef void(GLAD_API_PTR *PFNGLMULTTRANSPOSEMATRIXFARBPROC)(const GLfloat *m); -typedef void(GLAD_API_PTR *PFNGLMULTTRANSPOSEMATRIXXOESPROC)(const GLfixed *m); -typedef void(GLAD_API_PTR *PFNGLMULTIDRAWARRAYSPROC)(GLenum mode, const GLint *first, - const GLsizei *count, GLsizei drawcount); -typedef void(GLAD_API_PTR *PFNGLMULTIDRAWARRAYSEXTPROC)(GLenum mode, const GLint *first, - const GLsizei *count, GLsizei primcount); -typedef void(GLAD_API_PTR *PFNGLMULTIDRAWARRAYSINDIRECTPROC)(GLenum mode, const void *indirect, - GLsizei drawcount, GLsizei stride); -typedef void(GLAD_API_PTR *PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC)(GLenum mode, const void *indirect, - GLsizei primcount, GLsizei stride); -typedef void(GLAD_API_PTR *PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSCOUNTNVPROC)( - GLenum mode, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, - GLint vertexBufferCount); -typedef void(GLAD_API_PTR *PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSNVPROC)(GLenum mode, - const void *indirect, - GLsizei drawCount, - GLsizei stride, - GLint vertexBufferCount); -typedef void(GLAD_API_PTR *PFNGLMULTIDRAWARRAYSINDIRECTCOUNTPROC)(GLenum mode, const void *indirect, - GLintptr drawcount, - GLsizei maxdrawcount, - GLsizei stride); -typedef void(GLAD_API_PTR *PFNGLMULTIDRAWARRAYSINDIRECTCOUNTARBPROC)(GLenum mode, - const void *indirect, - GLintptr drawcount, - GLsizei maxdrawcount, - GLsizei stride); -typedef void(GLAD_API_PTR *PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC)(GLenum mode, const GLint *first, - const GLsizei *count, - GLsizei primcount); -typedef void(GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSPROC)(GLenum mode, const GLsizei *count, - GLenum type, const void *const *indices, - GLsizei drawcount); -typedef void(GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC)(GLenum mode, const GLsizei *count, - GLenum type, - const void *const *indices, - GLsizei drawcount, - const GLint *basevertex); -typedef void(GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSEXTPROC)(GLenum mode, const GLsizei *count, - GLenum type, const void *const *indices, - GLsizei primcount); -typedef void(GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSINDIRECTPROC)(GLenum mode, GLenum type, - const void *indirect, - GLsizei drawcount, GLsizei stride); -typedef void(GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC)(GLenum mode, GLenum type, - const void *indirect, - GLsizei primcount, - GLsizei stride); -typedef void(GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSCOUNTNVPROC)( - GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, - GLsizei stride, GLint vertexBufferCount); -typedef void(GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSNVPROC)(GLenum mode, GLenum type, - const void *indirect, - GLsizei drawCount, - GLsizei stride, - GLint vertexBufferCount); -typedef void(GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTPROC)(GLenum mode, GLenum type, - const void *indirect, - GLintptr drawcount, - GLsizei maxdrawcount, - GLsizei stride); -typedef void(GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTARBPROC)(GLenum mode, GLenum type, - const void *indirect, - GLintptr drawcount, - GLsizei maxdrawcount, - GLsizei stride); -typedef void(GLAD_API_PTR *PFNGLMULTIDRAWMESHTASKSINDIRECTCOUNTNVPROC)(GLintptr indirect, - GLintptr drawcount, - GLsizei maxdrawcount, - GLsizei stride); -typedef void(GLAD_API_PTR *PFNGLMULTIDRAWMESHTASKSINDIRECTNVPROC)(GLintptr indirect, - GLsizei drawcount, - GLsizei stride); -typedef void(GLAD_API_PTR *PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC)(GLenum mode, GLuint start, - GLuint end, const GLint *first, - const GLsizei *count, - GLsizei primcount); -typedef void(GLAD_API_PTR *PFNGLMULTIMODEDRAWARRAYSIBMPROC)(const GLenum *mode, const GLint *first, - const GLsizei *count, GLsizei primcount, - GLint modestride); -typedef void(GLAD_API_PTR *PFNGLMULTIMODEDRAWELEMENTSIBMPROC)(const GLenum *mode, - const GLsizei *count, GLenum type, - const void *const *indices, - GLsizei primcount, GLint modestride); -typedef void(GLAD_API_PTR *PFNGLMULTITEXBUFFEREXTPROC)(GLenum texunit, GLenum target, - GLenum internalformat, GLuint buffer); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1BOESPROC)(GLenum texture, GLbyte s); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1BVOESPROC)(GLenum texture, const GLbyte *coords); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1DARBPROC)(GLenum target, GLdouble s); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1DVARBPROC)(GLenum target, const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1FARBPROC)(GLenum target, GLfloat s); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1FVARBPROC)(GLenum target, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1HNVPROC)(GLenum target, GLhalfNV s); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1HVNVPROC)(GLenum target, const GLhalfNV *v); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1IARBPROC)(GLenum target, GLint s); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1IVARBPROC)(GLenum target, const GLint *v); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1SARBPROC)(GLenum target, GLshort s); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1SVARBPROC)(GLenum target, const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1XOESPROC)(GLenum texture, GLfixed s); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1XVOESPROC)(GLenum texture, const GLfixed *coords); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2BOESPROC)(GLenum texture, GLbyte s, GLbyte t); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2BVOESPROC)(GLenum texture, const GLbyte *coords); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2DARBPROC)(GLenum target, GLdouble s, GLdouble t); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2DVARBPROC)(GLenum target, const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2FARBPROC)(GLenum target, GLfloat s, GLfloat t); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2FVARBPROC)(GLenum target, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2HNVPROC)(GLenum target, GLhalfNV s, GLhalfNV t); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2HVNVPROC)(GLenum target, const GLhalfNV *v); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2IARBPROC)(GLenum target, GLint s, GLint t); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2IVARBPROC)(GLenum target, const GLint *v); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2SARBPROC)(GLenum target, GLshort s, GLshort t); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2SVARBPROC)(GLenum target, const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2XOESPROC)(GLenum texture, GLfixed s, GLfixed t); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2XVOESPROC)(GLenum texture, const GLfixed *coords); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3BOESPROC)(GLenum texture, GLbyte s, GLbyte t, - GLbyte r); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3BVOESPROC)(GLenum texture, const GLbyte *coords); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3DARBPROC)(GLenum target, GLdouble s, GLdouble t, - GLdouble r); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3DVARBPROC)(GLenum target, const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3FARBPROC)(GLenum target, GLfloat s, GLfloat t, - GLfloat r); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3FVARBPROC)(GLenum target, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3HNVPROC)(GLenum target, GLhalfNV s, GLhalfNV t, - GLhalfNV r); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3HVNVPROC)(GLenum target, const GLhalfNV *v); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3IARBPROC)(GLenum target, GLint s, GLint t, GLint r); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3IVARBPROC)(GLenum target, const GLint *v); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3SARBPROC)(GLenum target, GLshort s, GLshort t, - GLshort r); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3SVARBPROC)(GLenum target, const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3XOESPROC)(GLenum texture, GLfixed s, GLfixed t, - GLfixed r); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3XVOESPROC)(GLenum texture, const GLfixed *coords); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4BOESPROC)(GLenum texture, GLbyte s, GLbyte t, - GLbyte r, GLbyte q); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4BVOESPROC)(GLenum texture, const GLbyte *coords); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4DARBPROC)(GLenum target, GLdouble s, GLdouble t, - GLdouble r, GLdouble q); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4DVARBPROC)(GLenum target, const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4FARBPROC)(GLenum target, GLfloat s, GLfloat t, - GLfloat r, GLfloat q); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4FVARBPROC)(GLenum target, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4HNVPROC)(GLenum target, GLhalfNV s, GLhalfNV t, - GLhalfNV r, GLhalfNV q); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4HVNVPROC)(GLenum target, const GLhalfNV *v); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4IARBPROC)(GLenum target, GLint s, GLint t, GLint r, - GLint q); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4IVARBPROC)(GLenum target, const GLint *v); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4SARBPROC)(GLenum target, GLshort s, GLshort t, - GLshort r, GLshort q); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4SVARBPROC)(GLenum target, const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4XOESPROC)(GLenum texture, GLfixed s, GLfixed t, - GLfixed r, GLfixed q); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4XVOESPROC)(GLenum texture, const GLfixed *coords); -typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORDPOINTEREXTPROC)(GLenum texunit, GLint size, - GLenum type, GLsizei stride, - const void *pointer); -typedef void(GLAD_API_PTR *PFNGLMULTITEXENVFEXTPROC)(GLenum texunit, GLenum target, GLenum pname, - GLfloat param); -typedef void(GLAD_API_PTR *PFNGLMULTITEXENVFVEXTPROC)(GLenum texunit, GLenum target, GLenum pname, - const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLMULTITEXENVIEXTPROC)(GLenum texunit, GLenum target, GLenum pname, - GLint param); -typedef void(GLAD_API_PTR *PFNGLMULTITEXENVIVEXTPROC)(GLenum texunit, GLenum target, GLenum pname, - const GLint *params); -typedef void(GLAD_API_PTR *PFNGLMULTITEXGENDEXTPROC)(GLenum texunit, GLenum coord, GLenum pname, - GLdouble param); -typedef void(GLAD_API_PTR *PFNGLMULTITEXGENDVEXTPROC)(GLenum texunit, GLenum coord, GLenum pname, - const GLdouble *params); -typedef void(GLAD_API_PTR *PFNGLMULTITEXGENFEXTPROC)(GLenum texunit, GLenum coord, GLenum pname, - GLfloat param); -typedef void(GLAD_API_PTR *PFNGLMULTITEXGENFVEXTPROC)(GLenum texunit, GLenum coord, GLenum pname, - const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLMULTITEXGENIEXTPROC)(GLenum texunit, GLenum coord, GLenum pname, - GLint param); -typedef void(GLAD_API_PTR *PFNGLMULTITEXGENIVEXTPROC)(GLenum texunit, GLenum coord, GLenum pname, - const GLint *params); -typedef void(GLAD_API_PTR *PFNGLMULTITEXIMAGE1DEXTPROC)(GLenum texunit, GLenum target, GLint level, - GLint internalformat, GLsizei width, - GLint border, GLenum format, GLenum type, - const void *pixels); -typedef void(GLAD_API_PTR *PFNGLMULTITEXIMAGE2DEXTPROC)(GLenum texunit, GLenum target, GLint level, - GLint internalformat, GLsizei width, - GLsizei height, GLint border, GLenum format, - GLenum type, const void *pixels); -typedef void(GLAD_API_PTR *PFNGLMULTITEXIMAGE3DEXTPROC)(GLenum texunit, GLenum target, GLint level, - GLint internalformat, GLsizei width, - GLsizei height, GLsizei depth, GLint border, - GLenum format, GLenum type, - const void *pixels); -typedef void(GLAD_API_PTR *PFNGLMULTITEXPARAMETERIIVEXTPROC)(GLenum texunit, GLenum target, - GLenum pname, const GLint *params); -typedef void(GLAD_API_PTR *PFNGLMULTITEXPARAMETERIUIVEXTPROC)(GLenum texunit, GLenum target, - GLenum pname, const GLuint *params); -typedef void(GLAD_API_PTR *PFNGLMULTITEXPARAMETERFEXTPROC)(GLenum texunit, GLenum target, - GLenum pname, GLfloat param); -typedef void(GLAD_API_PTR *PFNGLMULTITEXPARAMETERFVEXTPROC)(GLenum texunit, GLenum target, - GLenum pname, const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLMULTITEXPARAMETERIEXTPROC)(GLenum texunit, GLenum target, - GLenum pname, GLint param); -typedef void(GLAD_API_PTR *PFNGLMULTITEXPARAMETERIVEXTPROC)(GLenum texunit, GLenum target, - GLenum pname, const GLint *params); -typedef void(GLAD_API_PTR *PFNGLMULTITEXRENDERBUFFEREXTPROC)(GLenum texunit, GLenum target, - GLuint renderbuffer); -typedef void(GLAD_API_PTR *PFNGLMULTITEXSUBIMAGE1DEXTPROC)(GLenum texunit, GLenum target, - GLint level, GLint xoffset, - GLsizei width, GLenum format, - GLenum type, const void *pixels); -typedef void(GLAD_API_PTR *PFNGLMULTITEXSUBIMAGE2DEXTPROC)(GLenum texunit, GLenum target, - GLint level, GLint xoffset, - GLint yoffset, GLsizei width, - GLsizei height, GLenum format, - GLenum type, const void *pixels); -typedef void(GLAD_API_PTR *PFNGLMULTITEXSUBIMAGE3DEXTPROC)(GLenum texunit, GLenum target, - GLint level, GLint xoffset, - GLint yoffset, GLint zoffset, - GLsizei width, GLsizei height, - GLsizei depth, GLenum format, - GLenum type, const void *pixels); -typedef void(GLAD_API_PTR *PFNGLMULTICASTBARRIERNVPROC)(void); -typedef void(GLAD_API_PTR *PFNGLMULTICASTBLITFRAMEBUFFERNVPROC)( - GLuint srcGpu, GLuint dstGpu, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, - GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -typedef void(GLAD_API_PTR *PFNGLMULTICASTBUFFERSUBDATANVPROC)(GLbitfield gpuMask, GLuint buffer, - GLintptr offset, GLsizeiptr size, - const void *data); -typedef void(GLAD_API_PTR *PFNGLMULTICASTCOPYBUFFERSUBDATANVPROC)( - GLuint readGpu, GLbitfield writeGpuMask, GLuint readBuffer, GLuint writeBuffer, - GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -typedef void(GLAD_API_PTR *PFNGLMULTICASTCOPYIMAGESUBDATANVPROC)( - GLuint srcGpu, GLbitfield dstGpuMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, - GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, - GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); -typedef void(GLAD_API_PTR *PFNGLMULTICASTFRAMEBUFFERSAMPLELOCATIONSFVNVPROC)( - GLuint gpu, GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLMULTICASTGETQUERYOBJECTI64VNVPROC)(GLuint gpu, GLuint id, - GLenum pname, GLint64 *params); -typedef void(GLAD_API_PTR *PFNGLMULTICASTGETQUERYOBJECTIVNVPROC)(GLuint gpu, GLuint id, - GLenum pname, GLint *params); -typedef void(GLAD_API_PTR *PFNGLMULTICASTGETQUERYOBJECTUI64VNVPROC)(GLuint gpu, GLuint id, - GLenum pname, GLuint64 *params); -typedef void(GLAD_API_PTR *PFNGLMULTICASTGETQUERYOBJECTUIVNVPROC)(GLuint gpu, GLuint id, - GLenum pname, GLuint *params); -typedef void(GLAD_API_PTR *PFNGLMULTICASTSCISSORARRAYVNVXPROC)(GLuint gpu, GLuint first, - GLsizei count, const GLint *v); -typedef void(GLAD_API_PTR *PFNGLMULTICASTVIEWPORTARRAYVNVXPROC)(GLuint gpu, GLuint first, - GLsizei count, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLMULTICASTVIEWPORTPOSITIONWSCALENVXPROC)(GLuint gpu, GLuint index, - GLfloat xcoeff, - GLfloat ycoeff); -typedef void(GLAD_API_PTR *PFNGLMULTICASTWAITSYNCNVPROC)(GLuint signalGpu, GLbitfield waitGpuMask); -typedef void(GLAD_API_PTR *PFNGLNAMEDBUFFERATTACHMEMORYNVPROC)(GLuint buffer, GLuint memory, - GLuint64 offset); -typedef void(GLAD_API_PTR *PFNGLNAMEDBUFFERDATAPROC)(GLuint buffer, GLsizeiptr size, - const void *data, GLenum usage); -typedef void(GLAD_API_PTR *PFNGLNAMEDBUFFERDATAEXTPROC)(GLuint buffer, GLsizeiptr size, - const void *data, GLenum usage); -typedef void(GLAD_API_PTR *PFNGLNAMEDBUFFERPAGECOMMITMENTARBPROC)(GLuint buffer, GLintptr offset, - GLsizeiptr size, - GLboolean commit); -typedef void(GLAD_API_PTR *PFNGLNAMEDBUFFERPAGECOMMITMENTEXTPROC)(GLuint buffer, GLintptr offset, - GLsizeiptr size, - GLboolean commit); -typedef void(GLAD_API_PTR *PFNGLNAMEDBUFFERPAGECOMMITMENTMEMNVPROC)(GLuint buffer, GLintptr offset, - GLsizeiptr size, GLuint memory, - GLuint64 memOffset, - GLboolean commit); -typedef void(GLAD_API_PTR *PFNGLNAMEDBUFFERSTORAGEPROC)(GLuint buffer, GLsizeiptr size, - const void *data, GLbitfield flags); -typedef void(GLAD_API_PTR *PFNGLNAMEDBUFFERSTORAGEEXTPROC)(GLuint buffer, GLsizeiptr size, - const void *data, GLbitfield flags); -typedef void(GLAD_API_PTR *PFNGLNAMEDBUFFERSTORAGEEXTERNALEXTPROC)( - GLuint buffer, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, - GLbitfield flags); -typedef void(GLAD_API_PTR *PFNGLNAMEDBUFFERSTORAGEMEMEXTPROC)(GLuint buffer, GLsizeiptr size, - GLuint memory, GLuint64 offset); -typedef void(GLAD_API_PTR *PFNGLNAMEDBUFFERSUBDATAPROC)(GLuint buffer, GLintptr offset, - GLsizeiptr size, const void *data); -typedef void(GLAD_API_PTR *PFNGLNAMEDBUFFERSUBDATAEXTPROC)(GLuint buffer, GLintptr offset, - GLsizeiptr size, const void *data); -typedef void(GLAD_API_PTR *PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC)(GLuint readBuffer, - GLuint writeBuffer, - GLintptr readOffset, - GLintptr writeOffset, - GLsizeiptr size); -typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC)(GLuint framebuffer, GLenum buf); -typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC)(GLuint framebuffer, GLsizei n, - const GLenum *bufs); -typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC)(GLuint framebuffer, GLenum pname, - GLint param); -typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC)(GLuint framebuffer, GLenum pname, - GLint param); -typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC)(GLuint framebuffer, GLenum src); -typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC)(GLuint framebuffer, - GLenum attachment, - GLenum renderbuffertarget, - GLuint renderbuffer); -typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC)(GLuint framebuffer, - GLenum attachment, - GLenum renderbuffertarget, - GLuint renderbuffer); -typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVARBPROC)(GLuint framebuffer, - GLuint start, - GLsizei count, - const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVNVPROC)(GLuint framebuffer, - GLuint start, - GLsizei count, - const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERSAMPLEPOSITIONSFVAMDPROC)(GLuint framebuffer, - GLuint numsamples, - GLuint pixelindex, - const GLfloat *values); -typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERTEXTUREPROC)(GLuint framebuffer, GLenum attachment, - GLuint texture, GLint level); -typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC)(GLuint framebuffer, - GLenum attachment, - GLenum textarget, GLuint texture, - GLint level); -typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC)(GLuint framebuffer, - GLenum attachment, - GLenum textarget, GLuint texture, - GLint level); -typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC)(GLuint framebuffer, - GLenum attachment, - GLenum textarget, GLuint texture, - GLint level, GLint zoffset); -typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC)(GLuint framebuffer, - GLenum attachment, GLuint texture, - GLint level); -typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC)(GLuint framebuffer, - GLenum attachment, - GLuint texture, GLint level, - GLenum face); -typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC)(GLuint framebuffer, - GLenum attachment, GLuint texture, - GLint level, GLint layer); -typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC)(GLuint framebuffer, - GLenum attachment, - GLuint texture, GLint level, - GLint layer); -typedef void(GLAD_API_PTR *PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC)(GLuint program, GLenum target, - GLuint index, GLdouble x, - GLdouble y, GLdouble z, - GLdouble w); -typedef void(GLAD_API_PTR *PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC)(GLuint program, GLenum target, - GLuint index, - const GLdouble *params); -typedef void(GLAD_API_PTR *PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC)(GLuint program, GLenum target, - GLuint index, GLfloat x, - GLfloat y, GLfloat z, - GLfloat w); -typedef void(GLAD_API_PTR *PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC)(GLuint program, GLenum target, - GLuint index, - const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC)(GLuint program, GLenum target, - GLuint index, GLint x, - GLint y, GLint z, GLint w); -typedef void(GLAD_API_PTR *PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC)(GLuint program, - GLenum target, GLuint index, - const GLint *params); -typedef void(GLAD_API_PTR *PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC)(GLuint program, - GLenum target, GLuint index, - GLuint x, GLuint y, GLuint z, - GLuint w); -typedef void(GLAD_API_PTR *PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC)(GLuint program, - GLenum target, GLuint index, - const GLuint *params); -typedef void(GLAD_API_PTR *PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC)(GLuint program, - GLenum target, GLuint index, - GLsizei count, - const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC)(GLuint program, - GLenum target, GLuint index, - GLsizei count, - const GLint *params); -typedef void(GLAD_API_PTR *PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC)( - GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); -typedef void(GLAD_API_PTR *PFNGLNAMEDPROGRAMSTRINGEXTPROC)(GLuint program, GLenum target, - GLenum format, GLsizei len, - const void *string); -typedef void(GLAD_API_PTR *PFNGLNAMEDRENDERBUFFERSTORAGEPROC)(GLuint renderbuffer, - GLenum internalformat, GLsizei width, - GLsizei height); -typedef void(GLAD_API_PTR *PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC)(GLuint renderbuffer, - GLenum internalformat, - GLsizei width, GLsizei height); -typedef void(GLAD_API_PTR *PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC)( - GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void(GLAD_API_PTR *PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEADVANCEDAMDPROC)( - GLuint renderbuffer, GLsizei samples, GLsizei storageSamples, GLenum internalformat, - GLsizei width, GLsizei height); -typedef void(GLAD_API_PTR *PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC)( - GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, - GLsizei width, GLsizei height); -typedef void(GLAD_API_PTR *PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC)( - GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void(GLAD_API_PTR *PFNGLNAMEDSTRINGARBPROC)(GLenum type, GLint namelen, const GLchar *name, - GLint stringlen, const GLchar *string); -typedef GLuint(GLAD_API_PTR *PFNGLNEWOBJECTBUFFERATIPROC)(GLsizei size, const void *pointer, - GLenum usage); -typedef void(GLAD_API_PTR *PFNGLNORMAL3FVERTEX3FSUNPROC)(GLfloat nx, GLfloat ny, GLfloat nz, - GLfloat x, GLfloat y, GLfloat z); -typedef void(GLAD_API_PTR *PFNGLNORMAL3FVERTEX3FVSUNPROC)(const GLfloat *n, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLNORMAL3HNVPROC)(GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); -typedef void(GLAD_API_PTR *PFNGLNORMAL3HVNVPROC)(const GLhalfNV *v); -typedef void(GLAD_API_PTR *PFNGLNORMAL3XOESPROC)(GLfixed nx, GLfixed ny, GLfixed nz); -typedef void(GLAD_API_PTR *PFNGLNORMAL3XVOESPROC)(const GLfixed *coords); -typedef void(GLAD_API_PTR *PFNGLNORMALFORMATNVPROC)(GLenum type, GLsizei stride); -typedef void(GLAD_API_PTR *PFNGLNORMALPOINTEREXTPROC)(GLenum type, GLsizei stride, GLsizei count, - const void *pointer); -typedef void(GLAD_API_PTR *PFNGLNORMALPOINTERLISTIBMPROC)(GLenum type, GLint stride, - const void **pointer, GLint ptrstride); -typedef void(GLAD_API_PTR *PFNGLNORMALPOINTERVINTELPROC)(GLenum type, const void **pointer); -typedef void(GLAD_API_PTR *PFNGLNORMALSTREAM3BATIPROC)(GLenum stream, GLbyte nx, GLbyte ny, - GLbyte nz); -typedef void(GLAD_API_PTR *PFNGLNORMALSTREAM3BVATIPROC)(GLenum stream, const GLbyte *coords); -typedef void(GLAD_API_PTR *PFNGLNORMALSTREAM3DATIPROC)(GLenum stream, GLdouble nx, GLdouble ny, - GLdouble nz); -typedef void(GLAD_API_PTR *PFNGLNORMALSTREAM3DVATIPROC)(GLenum stream, const GLdouble *coords); -typedef void(GLAD_API_PTR *PFNGLNORMALSTREAM3FATIPROC)(GLenum stream, GLfloat nx, GLfloat ny, - GLfloat nz); -typedef void(GLAD_API_PTR *PFNGLNORMALSTREAM3FVATIPROC)(GLenum stream, const GLfloat *coords); -typedef void(GLAD_API_PTR *PFNGLNORMALSTREAM3IATIPROC)(GLenum stream, GLint nx, GLint ny, GLint nz); -typedef void(GLAD_API_PTR *PFNGLNORMALSTREAM3IVATIPROC)(GLenum stream, const GLint *coords); -typedef void(GLAD_API_PTR *PFNGLNORMALSTREAM3SATIPROC)(GLenum stream, GLshort nx, GLshort ny, - GLshort nz); -typedef void(GLAD_API_PTR *PFNGLNORMALSTREAM3SVATIPROC)(GLenum stream, const GLshort *coords); -typedef void(GLAD_API_PTR *PFNGLOBJECTLABELPROC)(GLenum identifier, GLuint name, GLsizei length, - const GLchar *label); -typedef void(GLAD_API_PTR *PFNGLOBJECTPTRLABELPROC)(const void *ptr, GLsizei length, - const GLchar *label); -typedef GLenum(GLAD_API_PTR *PFNGLOBJECTPURGEABLEAPPLEPROC)(GLenum objectType, GLuint name, - GLenum option); -typedef GLenum(GLAD_API_PTR *PFNGLOBJECTUNPURGEABLEAPPLEPROC)(GLenum objectType, GLuint name, - GLenum option); -typedef void(GLAD_API_PTR *PFNGLORTHOFOESPROC)(GLfloat l, GLfloat r, GLfloat b, GLfloat t, - GLfloat n, GLfloat f); -typedef void(GLAD_API_PTR *PFNGLORTHOXOESPROC)(GLfixed l, GLfixed r, GLfixed b, GLfixed t, - GLfixed n, GLfixed f); -typedef void(GLAD_API_PTR *PFNGLPNTRIANGLESFATIPROC)(GLenum pname, GLfloat param); -typedef void(GLAD_API_PTR *PFNGLPNTRIANGLESIATIPROC)(GLenum pname, GLint param); -typedef void(GLAD_API_PTR *PFNGLPASSTEXCOORDATIPROC)(GLuint dst, GLuint coord, GLenum swizzle); -typedef void(GLAD_API_PTR *PFNGLPASSTHROUGHXOESPROC)(GLfixed token); -typedef void(GLAD_API_PTR *PFNGLPATCHPARAMETERFVPROC)(GLenum pname, const GLfloat *values); -typedef void(GLAD_API_PTR *PFNGLPATCHPARAMETERIPROC)(GLenum pname, GLint value); -typedef void(GLAD_API_PTR *PFNGLPATHCOMMANDSNVPROC)(GLuint path, GLsizei numCommands, - const GLubyte *commands, GLsizei numCoords, - GLenum coordType, const void *coords); -typedef void(GLAD_API_PTR *PFNGLPATHCOORDSNVPROC)(GLuint path, GLsizei numCoords, GLenum coordType, - const void *coords); -typedef void(GLAD_API_PTR *PFNGLPATHCOVERDEPTHFUNCNVPROC)(GLenum func); -typedef void(GLAD_API_PTR *PFNGLPATHDASHARRAYNVPROC)(GLuint path, GLsizei dashCount, - const GLfloat *dashArray); -typedef GLenum(GLAD_API_PTR *PFNGLPATHGLYPHINDEXARRAYNVPROC)( - GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, - GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -typedef GLenum(GLAD_API_PTR *PFNGLPATHGLYPHINDEXRANGENVPROC)(GLenum fontTarget, - const void *fontName, - GLbitfield fontStyle, - GLuint pathParameterTemplate, - GLfloat emScale, GLuint *baseAndCount); -typedef void(GLAD_API_PTR *PFNGLPATHGLYPHRANGENVPROC)(GLuint firstPathName, GLenum fontTarget, - const void *fontName, GLbitfield fontStyle, - GLuint firstGlyph, GLsizei numGlyphs, - GLenum handleMissingGlyphs, - GLuint pathParameterTemplate, - GLfloat emScale); -typedef void(GLAD_API_PTR *PFNGLPATHGLYPHSNVPROC)(GLuint firstPathName, GLenum fontTarget, - const void *fontName, GLbitfield fontStyle, - GLsizei numGlyphs, GLenum type, - const void *charcodes, GLenum handleMissingGlyphs, - GLuint pathParameterTemplate, GLfloat emScale); -typedef GLenum(GLAD_API_PTR *PFNGLPATHMEMORYGLYPHINDEXARRAYNVPROC)( - GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, - GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, - GLfloat emScale); -typedef void(GLAD_API_PTR *PFNGLPATHPARAMETERFNVPROC)(GLuint path, GLenum pname, GLfloat value); -typedef void(GLAD_API_PTR *PFNGLPATHPARAMETERFVNVPROC)(GLuint path, GLenum pname, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLPATHPARAMETERINVPROC)(GLuint path, GLenum pname, GLint value); -typedef void(GLAD_API_PTR *PFNGLPATHPARAMETERIVNVPROC)(GLuint path, GLenum pname, - const GLint *value); -typedef void(GLAD_API_PTR *PFNGLPATHSTENCILDEPTHOFFSETNVPROC)(GLfloat factor, GLfloat units); -typedef void(GLAD_API_PTR *PFNGLPATHSTENCILFUNCNVPROC)(GLenum func, GLint ref, GLuint mask); -typedef void(GLAD_API_PTR *PFNGLPATHSTRINGNVPROC)(GLuint path, GLenum format, GLsizei length, - const void *pathString); -typedef void(GLAD_API_PTR *PFNGLPATHSUBCOMMANDSNVPROC)(GLuint path, GLsizei commandStart, - GLsizei commandsToDelete, - GLsizei numCommands, const GLubyte *commands, - GLsizei numCoords, GLenum coordType, - const void *coords); -typedef void(GLAD_API_PTR *PFNGLPATHSUBCOORDSNVPROC)(GLuint path, GLsizei coordStart, - GLsizei numCoords, GLenum coordType, - const void *coords); -typedef void(GLAD_API_PTR *PFNGLPAUSETRANSFORMFEEDBACKPROC)(void); -typedef void(GLAD_API_PTR *PFNGLPAUSETRANSFORMFEEDBACKNVPROC)(void); -typedef void(GLAD_API_PTR *PFNGLPIXELDATARANGENVPROC)(GLenum target, GLsizei length, - const void *pointer); -typedef void(GLAD_API_PTR *PFNGLPIXELMAPXPROC)(GLenum map, GLint size, const GLfixed *values); -typedef void(GLAD_API_PTR *PFNGLPIXELSTOREFPROC)(GLenum pname, GLfloat param); -typedef void(GLAD_API_PTR *PFNGLPIXELSTOREIPROC)(GLenum pname, GLint param); -typedef void(GLAD_API_PTR *PFNGLPIXELSTOREXPROC)(GLenum pname, GLfixed param); -typedef void(GLAD_API_PTR *PFNGLPIXELTEXGENPARAMETERFSGISPROC)(GLenum pname, GLfloat param); -typedef void(GLAD_API_PTR *PFNGLPIXELTEXGENPARAMETERFVSGISPROC)(GLenum pname, - const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLPIXELTEXGENPARAMETERISGISPROC)(GLenum pname, GLint param); -typedef void(GLAD_API_PTR *PFNGLPIXELTEXGENPARAMETERIVSGISPROC)(GLenum pname, const GLint *params); -typedef void(GLAD_API_PTR *PFNGLPIXELTEXGENSGIXPROC)(GLenum mode); -typedef void(GLAD_API_PTR *PFNGLPIXELTRANSFERXOESPROC)(GLenum pname, GLfixed param); -typedef void(GLAD_API_PTR *PFNGLPIXELTRANSFORMPARAMETERFEXTPROC)(GLenum target, GLenum pname, - GLfloat param); -typedef void(GLAD_API_PTR *PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC)(GLenum target, GLenum pname, - const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLPIXELTRANSFORMPARAMETERIEXTPROC)(GLenum target, GLenum pname, - GLint param); -typedef void(GLAD_API_PTR *PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC)(GLenum target, GLenum pname, - const GLint *params); -typedef void(GLAD_API_PTR *PFNGLPIXELZOOMXOESPROC)(GLfixed xfactor, GLfixed yfactor); -typedef GLboolean(GLAD_API_PTR *PFNGLPOINTALONGPATHNVPROC)(GLuint path, GLsizei startSegment, - GLsizei numSegments, GLfloat distance, - GLfloat *x, GLfloat *y, - GLfloat *tangentX, GLfloat *tangentY); -typedef void(GLAD_API_PTR *PFNGLPOINTPARAMETERFPROC)(GLenum pname, GLfloat param); -typedef void(GLAD_API_PTR *PFNGLPOINTPARAMETERFARBPROC)(GLenum pname, GLfloat param); -typedef void(GLAD_API_PTR *PFNGLPOINTPARAMETERFEXTPROC)(GLenum pname, GLfloat param); -typedef void(GLAD_API_PTR *PFNGLPOINTPARAMETERFSGISPROC)(GLenum pname, GLfloat param); -typedef void(GLAD_API_PTR *PFNGLPOINTPARAMETERFVPROC)(GLenum pname, const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLPOINTPARAMETERFVARBPROC)(GLenum pname, const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLPOINTPARAMETERFVEXTPROC)(GLenum pname, const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLPOINTPARAMETERFVSGISPROC)(GLenum pname, const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLPOINTPARAMETERIPROC)(GLenum pname, GLint param); -typedef void(GLAD_API_PTR *PFNGLPOINTPARAMETERINVPROC)(GLenum pname, GLint param); -typedef void(GLAD_API_PTR *PFNGLPOINTPARAMETERIVPROC)(GLenum pname, const GLint *params); -typedef void(GLAD_API_PTR *PFNGLPOINTPARAMETERIVNVPROC)(GLenum pname, const GLint *params); -typedef void(GLAD_API_PTR *PFNGLPOINTPARAMETERXVOESPROC)(GLenum pname, const GLfixed *params); -typedef void(GLAD_API_PTR *PFNGLPOINTSIZEPROC)(GLfloat size); -typedef void(GLAD_API_PTR *PFNGLPOINTSIZEXOESPROC)(GLfixed size); -typedef GLint(GLAD_API_PTR *PFNGLPOLLASYNCSGIXPROC)(GLuint *markerp); -typedef GLint(GLAD_API_PTR *PFNGLPOLLINSTRUMENTSSGIXPROC)(GLint *marker_p); -typedef void(GLAD_API_PTR *PFNGLPOLYGONMODEPROC)(GLenum face, GLenum mode); -typedef void(GLAD_API_PTR *PFNGLPOLYGONOFFSETPROC)(GLfloat factor, GLfloat units); -typedef void(GLAD_API_PTR *PFNGLPOLYGONOFFSETCLAMPPROC)(GLfloat factor, GLfloat units, - GLfloat clamp); -typedef void(GLAD_API_PTR *PFNGLPOLYGONOFFSETCLAMPEXTPROC)(GLfloat factor, GLfloat units, - GLfloat clamp); -typedef void(GLAD_API_PTR *PFNGLPOLYGONOFFSETEXTPROC)(GLfloat factor, GLfloat bias); -typedef void(GLAD_API_PTR *PFNGLPOLYGONOFFSETXOESPROC)(GLfixed factor, GLfixed units); -typedef void(GLAD_API_PTR *PFNGLPOPDEBUGGROUPPROC)(void); -typedef void(GLAD_API_PTR *PFNGLPOPGROUPMARKEREXTPROC)(void); -typedef void(GLAD_API_PTR *PFNGLPRESENTFRAMEDUALFILLNVPROC)( - GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, - GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, - GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3); -typedef void(GLAD_API_PTR *PFNGLPRESENTFRAMEKEYEDNVPROC)(GLuint video_slot, - GLuint64EXT minPresentTime, - GLuint beginPresentTimeId, - GLuint presentDurationId, GLenum type, - GLenum target0, GLuint fill0, GLuint key0, - GLenum target1, GLuint fill1, GLuint key1); -typedef void(GLAD_API_PTR *PFNGLPRIMITIVEBOUNDINGBOXARBPROC)(GLfloat minX, GLfloat minY, - GLfloat minZ, GLfloat minW, - GLfloat maxX, GLfloat maxY, - GLfloat maxZ, GLfloat maxW); -typedef void(GLAD_API_PTR *PFNGLPRIMITIVERESTARTINDEXPROC)(GLuint index); -typedef void(GLAD_API_PTR *PFNGLPRIMITIVERESTARTINDEXNVPROC)(GLuint index); -typedef void(GLAD_API_PTR *PFNGLPRIMITIVERESTARTNVPROC)(void); -typedef void(GLAD_API_PTR *PFNGLPRIORITIZETEXTURESEXTPROC)(GLsizei n, const GLuint *textures, - const GLclampf *priorities); -typedef void(GLAD_API_PTR *PFNGLPRIORITIZETEXTURESXOESPROC)(GLsizei n, const GLuint *textures, - const GLfixed *priorities); -typedef void(GLAD_API_PTR *PFNGLPROGRAMBINARYPROC)(GLuint program, GLenum binaryFormat, - const void *binary, GLsizei length); -typedef void(GLAD_API_PTR *PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC)(GLenum target, - GLuint bindingIndex, - GLuint wordIndex, GLsizei count, - const GLint *params); -typedef void(GLAD_API_PTR *PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC)(GLenum target, - GLuint bindingIndex, - GLuint wordIndex, GLsizei count, - const GLuint *params); -typedef void(GLAD_API_PTR *PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC)(GLenum target, GLuint bindingIndex, - GLuint wordIndex, GLsizei count, - const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLPROGRAMENVPARAMETER4DARBPROC)(GLenum target, GLuint index, - GLdouble x, GLdouble y, GLdouble z, - GLdouble w); -typedef void(GLAD_API_PTR *PFNGLPROGRAMENVPARAMETER4DVARBPROC)(GLenum target, GLuint index, - const GLdouble *params); -typedef void(GLAD_API_PTR *PFNGLPROGRAMENVPARAMETER4FARBPROC)(GLenum target, GLuint index, - GLfloat x, GLfloat y, GLfloat z, - GLfloat w); -typedef void(GLAD_API_PTR *PFNGLPROGRAMENVPARAMETER4FVARBPROC)(GLenum target, GLuint index, - const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLPROGRAMENVPARAMETERI4INVPROC)(GLenum target, GLuint index, GLint x, - GLint y, GLint z, GLint w); -typedef void(GLAD_API_PTR *PFNGLPROGRAMENVPARAMETERI4IVNVPROC)(GLenum target, GLuint index, - const GLint *params); -typedef void(GLAD_API_PTR *PFNGLPROGRAMENVPARAMETERI4UINVPROC)(GLenum target, GLuint index, - GLuint x, GLuint y, GLuint z, - GLuint w); -typedef void(GLAD_API_PTR *PFNGLPROGRAMENVPARAMETERI4UIVNVPROC)(GLenum target, GLuint index, - const GLuint *params); -typedef void(GLAD_API_PTR *PFNGLPROGRAMENVPARAMETERS4FVEXTPROC)(GLenum target, GLuint index, - GLsizei count, - const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLPROGRAMENVPARAMETERSI4IVNVPROC)(GLenum target, GLuint index, - GLsizei count, const GLint *params); -typedef void(GLAD_API_PTR *PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC)(GLenum target, GLuint index, - GLsizei count, - const GLuint *params); -typedef void(GLAD_API_PTR *PFNGLPROGRAMLOCALPARAMETER4DARBPROC)(GLenum target, GLuint index, - GLdouble x, GLdouble y, GLdouble z, - GLdouble w); -typedef void(GLAD_API_PTR *PFNGLPROGRAMLOCALPARAMETER4DVARBPROC)(GLenum target, GLuint index, - const GLdouble *params); -typedef void(GLAD_API_PTR *PFNGLPROGRAMLOCALPARAMETER4FARBPROC)(GLenum target, GLuint index, - GLfloat x, GLfloat y, GLfloat z, - GLfloat w); -typedef void(GLAD_API_PTR *PFNGLPROGRAMLOCALPARAMETER4FVARBPROC)(GLenum target, GLuint index, - const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLPROGRAMLOCALPARAMETERI4INVPROC)(GLenum target, GLuint index, - GLint x, GLint y, GLint z, GLint w); -typedef void(GLAD_API_PTR *PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC)(GLenum target, GLuint index, - const GLint *params); -typedef void(GLAD_API_PTR *PFNGLPROGRAMLOCALPARAMETERI4UINVPROC)(GLenum target, GLuint index, - GLuint x, GLuint y, GLuint z, - GLuint w); -typedef void(GLAD_API_PTR *PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC)(GLenum target, GLuint index, - const GLuint *params); -typedef void(GLAD_API_PTR *PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC)(GLenum target, GLuint index, - GLsizei count, - const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC)(GLenum target, GLuint index, - GLsizei count, - const GLint *params); -typedef void(GLAD_API_PTR *PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC)(GLenum target, GLuint index, - GLsizei count, - const GLuint *params); -typedef void(GLAD_API_PTR *PFNGLPROGRAMNAMEDPARAMETER4DNVPROC)(GLuint id, GLsizei len, - const GLubyte *name, GLdouble x, - GLdouble y, GLdouble z, GLdouble w); -typedef void(GLAD_API_PTR *PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC)(GLuint id, GLsizei len, - const GLubyte *name, - const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLPROGRAMNAMEDPARAMETER4FNVPROC)(GLuint id, GLsizei len, - const GLubyte *name, GLfloat x, - GLfloat y, GLfloat z, GLfloat w); -typedef void(GLAD_API_PTR *PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC)(GLuint id, GLsizei len, - const GLubyte *name, - const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLPROGRAMPARAMETER4DNVPROC)(GLenum target, GLuint index, GLdouble x, - GLdouble y, GLdouble z, GLdouble w); -typedef void(GLAD_API_PTR *PFNGLPROGRAMPARAMETER4DVNVPROC)(GLenum target, GLuint index, - const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLPROGRAMPARAMETER4FNVPROC)(GLenum target, GLuint index, GLfloat x, - GLfloat y, GLfloat z, GLfloat w); -typedef void(GLAD_API_PTR *PFNGLPROGRAMPARAMETER4FVNVPROC)(GLenum target, GLuint index, - const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLPROGRAMPARAMETERIPROC)(GLuint program, GLenum pname, GLint value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMPARAMETERIARBPROC)(GLuint program, GLenum pname, - GLint value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMPARAMETERIEXTPROC)(GLuint program, GLenum pname, - GLint value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMPARAMETERS4DVNVPROC)(GLenum target, GLuint index, - GLsizei count, const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLPROGRAMPARAMETERS4FVNVPROC)(GLenum target, GLuint index, - GLsizei count, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLPROGRAMPATHFRAGMENTINPUTGENNVPROC)(GLuint program, GLint location, - GLenum genMode, GLint components, - const GLfloat *coeffs); -typedef void(GLAD_API_PTR *PFNGLPROGRAMSTRINGARBPROC)(GLenum target, GLenum format, GLsizei len, - const void *string); -typedef void(GLAD_API_PTR *PFNGLPROGRAMSUBROUTINEPARAMETERSUIVNVPROC)(GLenum target, GLsizei count, - const GLuint *params); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1DPROC)(GLuint program, GLint location, GLdouble v0); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1DEXTPROC)(GLuint program, GLint location, - GLdouble x); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1DVPROC)(GLuint program, GLint location, - GLsizei count, const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1DVEXTPROC)(GLuint program, GLint location, - GLsizei count, const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1FPROC)(GLuint program, GLint location, GLfloat v0); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1FEXTPROC)(GLuint program, GLint location, - GLfloat v0); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1FVPROC)(GLuint program, GLint location, - GLsizei count, const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1FVEXTPROC)(GLuint program, GLint location, - GLsizei count, const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1IPROC)(GLuint program, GLint location, GLint v0); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1I64ARBPROC)(GLuint program, GLint location, - GLint64 x); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1I64NVPROC)(GLuint program, GLint location, - GLint64EXT x); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1I64VARBPROC)(GLuint program, GLint location, - GLsizei count, const GLint64 *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1I64VNVPROC)(GLuint program, GLint location, - GLsizei count, const GLint64EXT *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1IEXTPROC)(GLuint program, GLint location, GLint v0); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1IVPROC)(GLuint program, GLint location, - GLsizei count, const GLint *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1IVEXTPROC)(GLuint program, GLint location, - GLsizei count, const GLint *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1UIPROC)(GLuint program, GLint location, GLuint v0); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1UI64ARBPROC)(GLuint program, GLint location, - GLuint64 x); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1UI64NVPROC)(GLuint program, GLint location, - GLuint64EXT x); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1UI64VARBPROC)(GLuint program, GLint location, - GLsizei count, const GLuint64 *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1UI64VNVPROC)(GLuint program, GLint location, - GLsizei count, - const GLuint64EXT *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1UIEXTPROC)(GLuint program, GLint location, - GLuint v0); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1UIVPROC)(GLuint program, GLint location, - GLsizei count, const GLuint *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1UIVEXTPROC)(GLuint program, GLint location, - GLsizei count, const GLuint *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2DPROC)(GLuint program, GLint location, GLdouble v0, - GLdouble v1); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2DEXTPROC)(GLuint program, GLint location, GLdouble x, - GLdouble y); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2DVPROC)(GLuint program, GLint location, - GLsizei count, const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2DVEXTPROC)(GLuint program, GLint location, - GLsizei count, const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2FPROC)(GLuint program, GLint location, GLfloat v0, - GLfloat v1); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2FEXTPROC)(GLuint program, GLint location, GLfloat v0, - GLfloat v1); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2FVPROC)(GLuint program, GLint location, - GLsizei count, const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2FVEXTPROC)(GLuint program, GLint location, - GLsizei count, const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2IPROC)(GLuint program, GLint location, GLint v0, - GLint v1); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2I64ARBPROC)(GLuint program, GLint location, - GLint64 x, GLint64 y); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2I64NVPROC)(GLuint program, GLint location, - GLint64EXT x, GLint64EXT y); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2I64VARBPROC)(GLuint program, GLint location, - GLsizei count, const GLint64 *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2I64VNVPROC)(GLuint program, GLint location, - GLsizei count, const GLint64EXT *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2IEXTPROC)(GLuint program, GLint location, GLint v0, - GLint v1); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2IVPROC)(GLuint program, GLint location, - GLsizei count, const GLint *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2IVEXTPROC)(GLuint program, GLint location, - GLsizei count, const GLint *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2UIPROC)(GLuint program, GLint location, GLuint v0, - GLuint v1); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2UI64ARBPROC)(GLuint program, GLint location, - GLuint64 x, GLuint64 y); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2UI64NVPROC)(GLuint program, GLint location, - GLuint64EXT x, GLuint64EXT y); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2UI64VARBPROC)(GLuint program, GLint location, - GLsizei count, const GLuint64 *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2UI64VNVPROC)(GLuint program, GLint location, - GLsizei count, - const GLuint64EXT *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2UIEXTPROC)(GLuint program, GLint location, GLuint v0, - GLuint v1); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2UIVPROC)(GLuint program, GLint location, - GLsizei count, const GLuint *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2UIVEXTPROC)(GLuint program, GLint location, - GLsizei count, const GLuint *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3DPROC)(GLuint program, GLint location, GLdouble v0, - GLdouble v1, GLdouble v2); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3DEXTPROC)(GLuint program, GLint location, GLdouble x, - GLdouble y, GLdouble z); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3DVPROC)(GLuint program, GLint location, - GLsizei count, const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3DVEXTPROC)(GLuint program, GLint location, - GLsizei count, const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3FPROC)(GLuint program, GLint location, GLfloat v0, - GLfloat v1, GLfloat v2); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3FEXTPROC)(GLuint program, GLint location, GLfloat v0, - GLfloat v1, GLfloat v2); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3FVPROC)(GLuint program, GLint location, - GLsizei count, const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3FVEXTPROC)(GLuint program, GLint location, - GLsizei count, const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3IPROC)(GLuint program, GLint location, GLint v0, - GLint v1, GLint v2); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3I64ARBPROC)(GLuint program, GLint location, - GLint64 x, GLint64 y, GLint64 z); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3I64NVPROC)(GLuint program, GLint location, - GLint64EXT x, GLint64EXT y, GLint64EXT z); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3I64VARBPROC)(GLuint program, GLint location, - GLsizei count, const GLint64 *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3I64VNVPROC)(GLuint program, GLint location, - GLsizei count, const GLint64EXT *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3IEXTPROC)(GLuint program, GLint location, GLint v0, - GLint v1, GLint v2); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3IVPROC)(GLuint program, GLint location, - GLsizei count, const GLint *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3IVEXTPROC)(GLuint program, GLint location, - GLsizei count, const GLint *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3UIPROC)(GLuint program, GLint location, GLuint v0, - GLuint v1, GLuint v2); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3UI64ARBPROC)(GLuint program, GLint location, - GLuint64 x, GLuint64 y, GLuint64 z); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3UI64NVPROC)(GLuint program, GLint location, - GLuint64EXT x, GLuint64EXT y, - GLuint64EXT z); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3UI64VARBPROC)(GLuint program, GLint location, - GLsizei count, const GLuint64 *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3UI64VNVPROC)(GLuint program, GLint location, - GLsizei count, - const GLuint64EXT *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3UIEXTPROC)(GLuint program, GLint location, GLuint v0, - GLuint v1, GLuint v2); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3UIVPROC)(GLuint program, GLint location, - GLsizei count, const GLuint *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3UIVEXTPROC)(GLuint program, GLint location, - GLsizei count, const GLuint *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4DPROC)(GLuint program, GLint location, GLdouble v0, - GLdouble v1, GLdouble v2, GLdouble v3); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4DEXTPROC)(GLuint program, GLint location, GLdouble x, - GLdouble y, GLdouble z, GLdouble w); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4DVPROC)(GLuint program, GLint location, - GLsizei count, const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4DVEXTPROC)(GLuint program, GLint location, - GLsizei count, const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4FPROC)(GLuint program, GLint location, GLfloat v0, - GLfloat v1, GLfloat v2, GLfloat v3); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4FEXTPROC)(GLuint program, GLint location, GLfloat v0, - GLfloat v1, GLfloat v2, GLfloat v3); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4FVPROC)(GLuint program, GLint location, - GLsizei count, const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4FVEXTPROC)(GLuint program, GLint location, - GLsizei count, const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4IPROC)(GLuint program, GLint location, GLint v0, - GLint v1, GLint v2, GLint v3); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4I64ARBPROC)(GLuint program, GLint location, - GLint64 x, GLint64 y, GLint64 z, - GLint64 w); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4I64NVPROC)(GLuint program, GLint location, - GLint64EXT x, GLint64EXT y, GLint64EXT z, - GLint64EXT w); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4I64VARBPROC)(GLuint program, GLint location, - GLsizei count, const GLint64 *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4I64VNVPROC)(GLuint program, GLint location, - GLsizei count, const GLint64EXT *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4IEXTPROC)(GLuint program, GLint location, GLint v0, - GLint v1, GLint v2, GLint v3); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4IVPROC)(GLuint program, GLint location, - GLsizei count, const GLint *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4IVEXTPROC)(GLuint program, GLint location, - GLsizei count, const GLint *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4UIPROC)(GLuint program, GLint location, GLuint v0, - GLuint v1, GLuint v2, GLuint v3); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4UI64ARBPROC)(GLuint program, GLint location, - GLuint64 x, GLuint64 y, GLuint64 z, - GLuint64 w); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4UI64NVPROC)(GLuint program, GLint location, - GLuint64EXT x, GLuint64EXT y, - GLuint64EXT z, GLuint64EXT w); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4UI64VARBPROC)(GLuint program, GLint location, - GLsizei count, const GLuint64 *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4UI64VNVPROC)(GLuint program, GLint location, - GLsizei count, - const GLuint64EXT *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4UIEXTPROC)(GLuint program, GLint location, GLuint v0, - GLuint v1, GLuint v2, GLuint v3); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4UIVPROC)(GLuint program, GLint location, - GLsizei count, const GLuint *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4UIVEXTPROC)(GLuint program, GLint location, - GLsizei count, const GLuint *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMHANDLEUI64ARBPROC)(GLuint program, GLint location, - GLuint64 value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC)(GLuint program, GLint location, - GLuint64 value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMHANDLEUI64VARBPROC)(GLuint program, GLint location, - GLsizei count, - const GLuint64 *values); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC)(GLuint program, GLint location, - GLsizei count, - const GLuint64 *values); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2DVPROC)(GLuint program, GLint location, - GLsizei count, GLboolean transpose, - const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC)(GLuint program, GLint location, - GLsizei count, GLboolean transpose, - const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2FVPROC)(GLuint program, GLint location, - GLsizei count, GLboolean transpose, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC)(GLuint program, GLint location, - GLsizei count, GLboolean transpose, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC)(GLuint program, GLint location, - GLsizei count, GLboolean transpose, - const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC)(GLuint program, GLint location, - GLsizei count, - GLboolean transpose, - const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC)(GLuint program, GLint location, - GLsizei count, GLboolean transpose, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC)(GLuint program, GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC)(GLuint program, GLint location, - GLsizei count, GLboolean transpose, - const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC)(GLuint program, GLint location, - GLsizei count, - GLboolean transpose, - const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC)(GLuint program, GLint location, - GLsizei count, GLboolean transpose, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC)(GLuint program, GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3DVPROC)(GLuint program, GLint location, - GLsizei count, GLboolean transpose, - const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC)(GLuint program, GLint location, - GLsizei count, GLboolean transpose, - const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3FVPROC)(GLuint program, GLint location, - GLsizei count, GLboolean transpose, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC)(GLuint program, GLint location, - GLsizei count, GLboolean transpose, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC)(GLuint program, GLint location, - GLsizei count, GLboolean transpose, - const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC)(GLuint program, GLint location, - GLsizei count, - GLboolean transpose, - const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC)(GLuint program, GLint location, - GLsizei count, GLboolean transpose, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC)(GLuint program, GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC)(GLuint program, GLint location, - GLsizei count, GLboolean transpose, - const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC)(GLuint program, GLint location, - GLsizei count, - GLboolean transpose, - const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC)(GLuint program, GLint location, - GLsizei count, GLboolean transpose, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC)(GLuint program, GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4DVPROC)(GLuint program, GLint location, - GLsizei count, GLboolean transpose, - const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC)(GLuint program, GLint location, - GLsizei count, GLboolean transpose, - const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4FVPROC)(GLuint program, GLint location, - GLsizei count, GLboolean transpose, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC)(GLuint program, GLint location, - GLsizei count, GLboolean transpose, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC)(GLuint program, GLint location, - GLsizei count, GLboolean transpose, - const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC)(GLuint program, GLint location, - GLsizei count, - GLboolean transpose, - const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC)(GLuint program, GLint location, - GLsizei count, GLboolean transpose, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC)(GLuint program, GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC)(GLuint program, GLint location, - GLsizei count, GLboolean transpose, - const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC)(GLuint program, GLint location, - GLsizei count, - GLboolean transpose, - const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC)(GLuint program, GLint location, - GLsizei count, GLboolean transpose, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC)(GLuint program, GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMUI64NVPROC)(GLuint program, GLint location, - GLuint64EXT value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMUI64VNVPROC)(GLuint program, GLint location, - GLsizei count, const GLuint64EXT *value); -typedef void(GLAD_API_PTR *PFNGLPROGRAMVERTEXLIMITNVPROC)(GLenum target, GLint limit); -typedef void(GLAD_API_PTR *PFNGLPROVOKINGVERTEXPROC)(GLenum mode); -typedef void(GLAD_API_PTR *PFNGLPROVOKINGVERTEXEXTPROC)(GLenum mode); -typedef void(GLAD_API_PTR *PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC)(GLbitfield mask); -typedef void(GLAD_API_PTR *PFNGLPUSHDEBUGGROUPPROC)(GLenum source, GLuint id, GLsizei length, - const GLchar *message); -typedef void(GLAD_API_PTR *PFNGLPUSHGROUPMARKEREXTPROC)(GLsizei length, const GLchar *marker); -typedef void(GLAD_API_PTR *PFNGLQUERYCOUNTERPROC)(GLuint id, GLenum target); -typedef GLbitfield(GLAD_API_PTR *PFNGLQUERYMATRIXXOESPROC)(GLfixed *mantissa, GLint *exponent); -typedef void(GLAD_API_PTR *PFNGLQUERYOBJECTPARAMETERUIAMDPROC)(GLenum target, GLuint id, - GLenum pname, GLuint param); -typedef GLint(GLAD_API_PTR *PFNGLQUERYRESOURCENVPROC)(GLenum queryType, GLint tagId, GLuint count, - GLint *buffer); -typedef void(GLAD_API_PTR *PFNGLQUERYRESOURCETAGNVPROC)(GLint tagId, const GLchar *tagString); -typedef void(GLAD_API_PTR *PFNGLRASTERPOS2XOESPROC)(GLfixed x, GLfixed y); -typedef void(GLAD_API_PTR *PFNGLRASTERPOS2XVOESPROC)(const GLfixed *coords); -typedef void(GLAD_API_PTR *PFNGLRASTERPOS3XOESPROC)(GLfixed x, GLfixed y, GLfixed z); -typedef void(GLAD_API_PTR *PFNGLRASTERPOS3XVOESPROC)(const GLfixed *coords); -typedef void(GLAD_API_PTR *PFNGLRASTERPOS4XOESPROC)(GLfixed x, GLfixed y, GLfixed z, GLfixed w); -typedef void(GLAD_API_PTR *PFNGLRASTERPOS4XVOESPROC)(const GLfixed *coords); -typedef void(GLAD_API_PTR *PFNGLRASTERSAMPLESEXTPROC)(GLuint samples, - GLboolean fixedsamplelocations); -typedef void(GLAD_API_PTR *PFNGLREADBUFFERPROC)(GLenum src); -typedef void(GLAD_API_PTR *PFNGLREADINSTRUMENTSSGIXPROC)(GLint marker); -typedef void(GLAD_API_PTR *PFNGLREADPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height, - GLenum format, GLenum type, void *pixels); -typedef void(GLAD_API_PTR *PFNGLREADNPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height, - GLenum format, GLenum type, GLsizei bufSize, - void *data); -typedef void(GLAD_API_PTR *PFNGLREADNPIXELSARBPROC)(GLint x, GLint y, GLsizei width, GLsizei height, - GLenum format, GLenum type, GLsizei bufSize, - void *data); -typedef void(GLAD_API_PTR *PFNGLRECTXOESPROC)(GLfixed x1, GLfixed y1, GLfixed x2, GLfixed y2); -typedef void(GLAD_API_PTR *PFNGLRECTXVOESPROC)(const GLfixed *v1, const GLfixed *v2); -typedef void(GLAD_API_PTR *PFNGLREFERENCEPLANESGIXPROC)(const GLdouble *equation); -typedef GLboolean(GLAD_API_PTR *PFNGLRELEASEKEYEDMUTEXWIN32EXTPROC)(GLuint memory, GLuint64 key); -typedef void(GLAD_API_PTR *PFNGLRELEASESHADERCOMPILERPROC)(void); -typedef void(GLAD_API_PTR *PFNGLRENDERGPUMASKNVPROC)(GLbitfield mask); -typedef void(GLAD_API_PTR *PFNGLRENDERBUFFERSTORAGEPROC)(GLenum target, GLenum internalformat, - GLsizei width, GLsizei height); -typedef void(GLAD_API_PTR *PFNGLRENDERBUFFERSTORAGEEXTPROC)(GLenum target, GLenum internalformat, - GLsizei width, GLsizei height); -typedef void(GLAD_API_PTR *PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC)(GLenum target, GLsizei samples, - GLenum internalformat, - GLsizei width, GLsizei height); -typedef void(GLAD_API_PTR *PFNGLRENDERBUFFERSTORAGEMULTISAMPLEADVANCEDAMDPROC)( - GLenum target, GLsizei samples, GLsizei storageSamples, GLenum internalformat, - GLsizei width, GLsizei height); -typedef void(GLAD_API_PTR *PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC)( - GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, - GLsizei width, GLsizei height); -typedef void(GLAD_API_PTR *PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC)( - GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEPOINTERSUNPROC)(GLenum type, GLsizei stride, - const void **pointer); -typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUBSUNPROC)(GLubyte code); -typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUBVSUNPROC)(const GLubyte *code); -typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC)(GLuint rc, GLfloat r, - GLfloat g, GLfloat b, - GLfloat x, GLfloat y, - GLfloat z); -typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC)(const GLuint *rc, - const GLfloat *c, - const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC)( - GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, - GLfloat x, GLfloat y, GLfloat z); -typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC)(const GLuint *rc, - const GLfloat *c, - const GLfloat *n, - const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC)(GLuint rc, GLubyte r, - GLubyte g, GLubyte b, - GLubyte a, GLfloat x, - GLfloat y, GLfloat z); -typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC)(const GLuint *rc, - const GLubyte *c, - const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC)(GLuint rc, GLfloat nx, - GLfloat ny, GLfloat nz, - GLfloat x, GLfloat y, - GLfloat z); -typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC)(const GLuint *rc, - const GLfloat *n, - const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUISUNPROC)(GLuint code); -typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC)( - GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, - GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC)( - const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC)( - GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, - GLfloat z); -typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC)( - const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC)(GLuint rc, GLfloat s, - GLfloat t, GLfloat x, - GLfloat y, GLfloat z); -typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC)(const GLuint *rc, - const GLfloat *tc, - const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC)(GLuint rc, GLfloat x, GLfloat y, - GLfloat z); -typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC)(const GLuint *rc, - const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUIVSUNPROC)(const GLuint *code); -typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUSSUNPROC)(GLushort code); -typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUSVSUNPROC)(const GLushort *code); -typedef void(GLAD_API_PTR *PFNGLREQUESTRESIDENTPROGRAMSNVPROC)(GLsizei n, const GLuint *programs); -typedef void(GLAD_API_PTR *PFNGLRESETHISTOGRAMEXTPROC)(GLenum target); -typedef void(GLAD_API_PTR *PFNGLRESETMEMORYOBJECTPARAMETERNVPROC)(GLuint memory, GLenum pname); -typedef void(GLAD_API_PTR *PFNGLRESETMINMAXEXTPROC)(GLenum target); -typedef void(GLAD_API_PTR *PFNGLRESIZEBUFFERSMESAPROC)(void); -typedef void(GLAD_API_PTR *PFNGLRESOLVEDEPTHVALUESNVPROC)(void); -typedef void(GLAD_API_PTR *PFNGLRESUMETRANSFORMFEEDBACKPROC)(void); -typedef void(GLAD_API_PTR *PFNGLRESUMETRANSFORMFEEDBACKNVPROC)(void); -typedef void(GLAD_API_PTR *PFNGLROTATEXOESPROC)(GLfixed angle, GLfixed x, GLfixed y, GLfixed z); -typedef void(GLAD_API_PTR *PFNGLSAMPLECOVERAGEPROC)(GLfloat value, GLboolean invert); -typedef void(GLAD_API_PTR *PFNGLSAMPLECOVERAGEARBPROC)(GLfloat value, GLboolean invert); -typedef void(GLAD_API_PTR *PFNGLSAMPLEMAPATIPROC)(GLuint dst, GLuint interp, GLenum swizzle); -typedef void(GLAD_API_PTR *PFNGLSAMPLEMASKEXTPROC)(GLclampf value, GLboolean invert); -typedef void(GLAD_API_PTR *PFNGLSAMPLEMASKINDEXEDNVPROC)(GLuint index, GLbitfield mask); -typedef void(GLAD_API_PTR *PFNGLSAMPLEMASKSGISPROC)(GLclampf value, GLboolean invert); -typedef void(GLAD_API_PTR *PFNGLSAMPLEMASKIPROC)(GLuint maskNumber, GLbitfield mask); -typedef void(GLAD_API_PTR *PFNGLSAMPLEPATTERNEXTPROC)(GLenum pattern); -typedef void(GLAD_API_PTR *PFNGLSAMPLEPATTERNSGISPROC)(GLenum pattern); -typedef void(GLAD_API_PTR *PFNGLSAMPLERPARAMETERIIVPROC)(GLuint sampler, GLenum pname, - const GLint *param); -typedef void(GLAD_API_PTR *PFNGLSAMPLERPARAMETERIUIVPROC)(GLuint sampler, GLenum pname, - const GLuint *param); -typedef void(GLAD_API_PTR *PFNGLSAMPLERPARAMETERFPROC)(GLuint sampler, GLenum pname, GLfloat param); -typedef void(GLAD_API_PTR *PFNGLSAMPLERPARAMETERFVPROC)(GLuint sampler, GLenum pname, - const GLfloat *param); -typedef void(GLAD_API_PTR *PFNGLSAMPLERPARAMETERIPROC)(GLuint sampler, GLenum pname, GLint param); -typedef void(GLAD_API_PTR *PFNGLSAMPLERPARAMETERIVPROC)(GLuint sampler, GLenum pname, - const GLint *param); -typedef void(GLAD_API_PTR *PFNGLSCALEXOESPROC)(GLfixed x, GLfixed y, GLfixed z); -typedef void(GLAD_API_PTR *PFNGLSCISSORPROC)(GLint x, GLint y, GLsizei width, GLsizei height); -typedef void(GLAD_API_PTR *PFNGLSCISSORARRAYVPROC)(GLuint first, GLsizei count, const GLint *v); -typedef void(GLAD_API_PTR *PFNGLSCISSOREXCLUSIVEARRAYVNVPROC)(GLuint first, GLsizei count, - const GLint *v); -typedef void(GLAD_API_PTR *PFNGLSCISSOREXCLUSIVENVPROC)(GLint x, GLint y, GLsizei width, - GLsizei height); -typedef void(GLAD_API_PTR *PFNGLSCISSORINDEXEDPROC)(GLuint index, GLint left, GLint bottom, - GLsizei width, GLsizei height); -typedef void(GLAD_API_PTR *PFNGLSCISSORINDEXEDVPROC)(GLuint index, const GLint *v); -typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3BEXTPROC)(GLbyte red, GLbyte green, GLbyte blue); -typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3BVEXTPROC)(const GLbyte *v); -typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3DEXTPROC)(GLdouble red, GLdouble green, - GLdouble blue); -typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3DVEXTPROC)(const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3FEXTPROC)(GLfloat red, GLfloat green, GLfloat blue); -typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3FVEXTPROC)(const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3HNVPROC)(GLhalfNV red, GLhalfNV green, - GLhalfNV blue); -typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3HVNVPROC)(const GLhalfNV *v); -typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3IEXTPROC)(GLint red, GLint green, GLint blue); -typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3IVEXTPROC)(const GLint *v); -typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3SEXTPROC)(GLshort red, GLshort green, GLshort blue); -typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3SVEXTPROC)(const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3UBEXTPROC)(GLubyte red, GLubyte green, GLubyte blue); -typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3UBVEXTPROC)(const GLubyte *v); -typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3UIEXTPROC)(GLuint red, GLuint green, GLuint blue); -typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3UIVEXTPROC)(const GLuint *v); -typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3USEXTPROC)(GLushort red, GLushort green, - GLushort blue); -typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3USVEXTPROC)(const GLushort *v); -typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLORFORMATNVPROC)(GLint size, GLenum type, - GLsizei stride); -typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLORPOINTEREXTPROC)(GLint size, GLenum type, - GLsizei stride, const void *pointer); -typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLORPOINTERLISTIBMPROC)(GLint size, GLenum type, - GLint stride, - const void **pointer, - GLint ptrstride); -typedef void(GLAD_API_PTR *PFNGLSELECTPERFMONITORCOUNTERSAMDPROC)(GLuint monitor, GLboolean enable, - GLuint group, GLint numCounters, - GLuint *counterList); -typedef void(GLAD_API_PTR *PFNGLSEMAPHOREPARAMETERIVNVPROC)(GLuint semaphore, GLenum pname, - const GLint *params); -typedef void(GLAD_API_PTR *PFNGLSEMAPHOREPARAMETERUI64VEXTPROC)(GLuint semaphore, GLenum pname, - const GLuint64 *params); -typedef void(GLAD_API_PTR *PFNGLSEPARABLEFILTER2DEXTPROC)(GLenum target, GLenum internalformat, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - const void *row, const void *column); -typedef void(GLAD_API_PTR *PFNGLSETFENCEAPPLEPROC)(GLuint fence); -typedef void(GLAD_API_PTR *PFNGLSETFENCENVPROC)(GLuint fence, GLenum condition); -typedef void(GLAD_API_PTR *PFNGLSETFRAGMENTSHADERCONSTANTATIPROC)(GLuint dst, const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLSETINVARIANTEXTPROC)(GLuint id, GLenum type, const void *addr); -typedef void(GLAD_API_PTR *PFNGLSETLOCALCONSTANTEXTPROC)(GLuint id, GLenum type, const void *addr); -typedef void(GLAD_API_PTR *PFNGLSETMULTISAMPLEFVAMDPROC)(GLenum pname, GLuint index, - const GLfloat *val); -typedef void(GLAD_API_PTR *PFNGLSHADERBINARYPROC)(GLsizei count, const GLuint *shaders, - GLenum binaryFormat, const void *binary, - GLsizei length); -typedef void(GLAD_API_PTR *PFNGLSHADEROP1EXTPROC)(GLenum op, GLuint res, GLuint arg1); -typedef void(GLAD_API_PTR *PFNGLSHADEROP2EXTPROC)(GLenum op, GLuint res, GLuint arg1, GLuint arg2); -typedef void(GLAD_API_PTR *PFNGLSHADEROP3EXTPROC)(GLenum op, GLuint res, GLuint arg1, GLuint arg2, - GLuint arg3); -typedef void(GLAD_API_PTR *PFNGLSHADERSOURCEPROC)(GLuint shader, GLsizei count, - const GLchar *const *string, const GLint *length); -typedef void(GLAD_API_PTR *PFNGLSHADERSOURCEARBPROC)(GLhandleARB shaderObj, GLsizei count, - const GLcharARB **string, const GLint *length); -typedef void(GLAD_API_PTR *PFNGLSHADERSTORAGEBLOCKBINDINGPROC)(GLuint program, - GLuint storageBlockIndex, - GLuint storageBlockBinding); -typedef void(GLAD_API_PTR *PFNGLSHADINGRATEIMAGEBARRIERNVPROC)(GLboolean synchronize); -typedef void(GLAD_API_PTR *PFNGLSHADINGRATEIMAGEPALETTENVPROC)(GLuint viewport, GLuint first, - GLsizei count, const GLenum *rates); -typedef void(GLAD_API_PTR *PFNGLSHADINGRATESAMPLEORDERCUSTOMNVPROC)(GLenum rate, GLuint samples, - const GLint *locations); -typedef void(GLAD_API_PTR *PFNGLSHADINGRATESAMPLEORDERNVPROC)(GLenum order); -typedef void(GLAD_API_PTR *PFNGLSHARPENTEXFUNCSGISPROC)(GLenum target, GLsizei n, - const GLfloat *points); -typedef void(GLAD_API_PTR *PFNGLSIGNALSEMAPHOREEXTPROC)(GLuint semaphore, GLuint numBufferBarriers, - const GLuint *buffers, - GLuint numTextureBarriers, - const GLuint *textures, - const GLenum *dstLayouts); -typedef void(GLAD_API_PTR *PFNGLSIGNALSEMAPHOREUI64NVXPROC)(GLuint signalGpu, - GLsizei fenceObjectCount, - const GLuint *semaphoreArray, - const GLuint64 *fenceValueArray); -typedef void(GLAD_API_PTR *PFNGLSIGNALVKFENCENVPROC)(GLuint64 vkFence); -typedef void(GLAD_API_PTR *PFNGLSIGNALVKSEMAPHORENVPROC)(GLuint64 vkSemaphore); -typedef void(GLAD_API_PTR *PFNGLSPECIALIZESHADERPROC)(GLuint shader, const GLchar *pEntryPoint, - GLuint numSpecializationConstants, - const GLuint *pConstantIndex, - const GLuint *pConstantValue); -typedef void(GLAD_API_PTR *PFNGLSPECIALIZESHADERARBPROC)(GLuint shader, const GLchar *pEntryPoint, - GLuint numSpecializationConstants, - const GLuint *pConstantIndex, - const GLuint *pConstantValue); -typedef void(GLAD_API_PTR *PFNGLSPRITEPARAMETERFSGIXPROC)(GLenum pname, GLfloat param); -typedef void(GLAD_API_PTR *PFNGLSPRITEPARAMETERFVSGIXPROC)(GLenum pname, const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLSPRITEPARAMETERISGIXPROC)(GLenum pname, GLint param); -typedef void(GLAD_API_PTR *PFNGLSPRITEPARAMETERIVSGIXPROC)(GLenum pname, const GLint *params); -typedef void(GLAD_API_PTR *PFNGLSTARTINSTRUMENTSSGIXPROC)(void); -typedef void(GLAD_API_PTR *PFNGLSTATECAPTURENVPROC)(GLuint state, GLenum mode); -typedef void(GLAD_API_PTR *PFNGLSTENCILCLEARTAGEXTPROC)(GLsizei stencilTagBits, - GLuint stencilClearTag); -typedef void(GLAD_API_PTR *PFNGLSTENCILFILLPATHINSTANCEDNVPROC)( - GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, - GLuint mask, GLenum transformType, const GLfloat *transformValues); -typedef void(GLAD_API_PTR *PFNGLSTENCILFILLPATHNVPROC)(GLuint path, GLenum fillMode, GLuint mask); -typedef void(GLAD_API_PTR *PFNGLSTENCILFUNCPROC)(GLenum func, GLint ref, GLuint mask); -typedef void(GLAD_API_PTR *PFNGLSTENCILFUNCSEPARATEPROC)(GLenum face, GLenum func, GLint ref, - GLuint mask); -typedef void(GLAD_API_PTR *PFNGLSTENCILFUNCSEPARATEATIPROC)(GLenum frontfunc, GLenum backfunc, - GLint ref, GLuint mask); -typedef void(GLAD_API_PTR *PFNGLSTENCILMASKPROC)(GLuint mask); -typedef void(GLAD_API_PTR *PFNGLSTENCILMASKSEPARATEPROC)(GLenum face, GLuint mask); -typedef void(GLAD_API_PTR *PFNGLSTENCILOPPROC)(GLenum fail, GLenum zfail, GLenum zpass); -typedef void(GLAD_API_PTR *PFNGLSTENCILOPSEPARATEPROC)(GLenum face, GLenum sfail, GLenum dpfail, - GLenum dppass); -typedef void(GLAD_API_PTR *PFNGLSTENCILOPSEPARATEATIPROC)(GLenum face, GLenum sfail, GLenum dpfail, - GLenum dppass); -typedef void(GLAD_API_PTR *PFNGLSTENCILOPVALUEAMDPROC)(GLenum face, GLuint value); -typedef void(GLAD_API_PTR *PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC)( - GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, - GLuint mask, GLenum transformType, const GLfloat *transformValues); -typedef void(GLAD_API_PTR *PFNGLSTENCILSTROKEPATHNVPROC)(GLuint path, GLint reference, GLuint mask); -typedef void(GLAD_API_PTR *PFNGLSTENCILTHENCOVERFILLPATHINSTANCEDNVPROC)( - GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, - GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -typedef void(GLAD_API_PTR *PFNGLSTENCILTHENCOVERFILLPATHNVPROC)(GLuint path, GLenum fillMode, - GLuint mask, GLenum coverMode); -typedef void(GLAD_API_PTR *PFNGLSTENCILTHENCOVERSTROKEPATHINSTANCEDNVPROC)( - GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, - GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -typedef void(GLAD_API_PTR *PFNGLSTENCILTHENCOVERSTROKEPATHNVPROC)(GLuint path, GLint reference, - GLuint mask, GLenum coverMode); -typedef void(GLAD_API_PTR *PFNGLSTOPINSTRUMENTSSGIXPROC)(GLint marker); -typedef void(GLAD_API_PTR *PFNGLSTRINGMARKERGREMEDYPROC)(GLsizei len, const void *string); -typedef void(GLAD_API_PTR *PFNGLSUBPIXELPRECISIONBIASNVPROC)(GLuint xbits, GLuint ybits); -typedef void(GLAD_API_PTR *PFNGLSWIZZLEEXTPROC)(GLuint res, GLuint in, GLenum outX, GLenum outY, - GLenum outZ, GLenum outW); -typedef void(GLAD_API_PTR *PFNGLSYNCTEXTUREINTELPROC)(GLuint texture); -typedef void(GLAD_API_PTR *PFNGLTAGSAMPLEBUFFERSGIXPROC)(void); -typedef void(GLAD_API_PTR *PFNGLTANGENT3BEXTPROC)(GLbyte tx, GLbyte ty, GLbyte tz); -typedef void(GLAD_API_PTR *PFNGLTANGENT3BVEXTPROC)(const GLbyte *v); -typedef void(GLAD_API_PTR *PFNGLTANGENT3DEXTPROC)(GLdouble tx, GLdouble ty, GLdouble tz); -typedef void(GLAD_API_PTR *PFNGLTANGENT3DVEXTPROC)(const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLTANGENT3FEXTPROC)(GLfloat tx, GLfloat ty, GLfloat tz); -typedef void(GLAD_API_PTR *PFNGLTANGENT3FVEXTPROC)(const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLTANGENT3IEXTPROC)(GLint tx, GLint ty, GLint tz); -typedef void(GLAD_API_PTR *PFNGLTANGENT3IVEXTPROC)(const GLint *v); -typedef void(GLAD_API_PTR *PFNGLTANGENT3SEXTPROC)(GLshort tx, GLshort ty, GLshort tz); -typedef void(GLAD_API_PTR *PFNGLTANGENT3SVEXTPROC)(const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLTANGENTPOINTEREXTPROC)(GLenum type, GLsizei stride, - const void *pointer); -typedef void(GLAD_API_PTR *PFNGLTBUFFERMASK3DFXPROC)(GLuint mask); -typedef void(GLAD_API_PTR *PFNGLTESSELLATIONFACTORAMDPROC)(GLfloat factor); -typedef void(GLAD_API_PTR *PFNGLTESSELLATIONMODEAMDPROC)(GLenum mode); -typedef GLboolean(GLAD_API_PTR *PFNGLTESTFENCEAPPLEPROC)(GLuint fence); -typedef GLboolean(GLAD_API_PTR *PFNGLTESTFENCENVPROC)(GLuint fence); -typedef GLboolean(GLAD_API_PTR *PFNGLTESTOBJECTAPPLEPROC)(GLenum object, GLuint name); -typedef void(GLAD_API_PTR *PFNGLTEXATTACHMEMORYNVPROC)(GLenum target, GLuint memory, - GLuint64 offset); -typedef void(GLAD_API_PTR *PFNGLTEXBUFFERPROC)(GLenum target, GLenum internalformat, GLuint buffer); -typedef void(GLAD_API_PTR *PFNGLTEXBUFFERARBPROC)(GLenum target, GLenum internalformat, - GLuint buffer); -typedef void(GLAD_API_PTR *PFNGLTEXBUFFEREXTPROC)(GLenum target, GLenum internalformat, - GLuint buffer); -typedef void(GLAD_API_PTR *PFNGLTEXBUFFERRANGEPROC)(GLenum target, GLenum internalformat, - GLuint buffer, GLintptr offset, - GLsizeiptr size); -typedef void(GLAD_API_PTR *PFNGLTEXBUMPPARAMETERFVATIPROC)(GLenum pname, const GLfloat *param); -typedef void(GLAD_API_PTR *PFNGLTEXBUMPPARAMETERIVATIPROC)(GLenum pname, const GLint *param); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD1BOESPROC)(GLbyte s); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD1BVOESPROC)(const GLbyte *coords); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD1HNVPROC)(GLhalfNV s); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD1HVNVPROC)(const GLhalfNV *v); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD1XOESPROC)(GLfixed s); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD1XVOESPROC)(const GLfixed *coords); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD2BOESPROC)(GLbyte s, GLbyte t); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD2BVOESPROC)(const GLbyte *coords); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC)(GLfloat s, GLfloat t, GLfloat r, - GLfloat g, GLfloat b, GLfloat x, - GLfloat y, GLfloat z); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC)(const GLfloat *tc, - const GLfloat *c, - const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC)( - GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, - GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC)(const GLfloat *tc, - const GLfloat *c, - const GLfloat *n, - const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC)(GLfloat s, GLfloat t, GLubyte r, - GLubyte g, GLubyte b, GLubyte a, - GLfloat x, GLfloat y, GLfloat z); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC)(const GLfloat *tc, - const GLubyte *c, - const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC)(GLfloat s, GLfloat t, GLfloat nx, - GLfloat ny, GLfloat nz, - GLfloat x, GLfloat y, GLfloat z); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC)(const GLfloat *tc, - const GLfloat *n, - const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD2FVERTEX3FSUNPROC)(GLfloat s, GLfloat t, GLfloat x, - GLfloat y, GLfloat z); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD2FVERTEX3FVSUNPROC)(const GLfloat *tc, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD2HNVPROC)(GLhalfNV s, GLhalfNV t); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD2HVNVPROC)(const GLhalfNV *v); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD2XOESPROC)(GLfixed s, GLfixed t); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD2XVOESPROC)(const GLfixed *coords); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD3BOESPROC)(GLbyte s, GLbyte t, GLbyte r); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD3BVOESPROC)(const GLbyte *coords); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD3HNVPROC)(GLhalfNV s, GLhalfNV t, GLhalfNV r); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD3HVNVPROC)(const GLhalfNV *v); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD3XOESPROC)(GLfixed s, GLfixed t, GLfixed r); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD3XVOESPROC)(const GLfixed *coords); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD4BOESPROC)(GLbyte s, GLbyte t, GLbyte r, GLbyte q); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD4BVOESPROC)(const GLbyte *coords); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC)( - GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, - GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC)(const GLfloat *tc, - const GLfloat *c, - const GLfloat *n, - const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD4FVERTEX4FSUNPROC)(GLfloat s, GLfloat t, GLfloat p, - GLfloat q, GLfloat x, GLfloat y, - GLfloat z, GLfloat w); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD4FVERTEX4FVSUNPROC)(const GLfloat *tc, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD4HNVPROC)(GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD4HVNVPROC)(const GLhalfNV *v); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD4XOESPROC)(GLfixed s, GLfixed t, GLfixed r, GLfixed q); -typedef void(GLAD_API_PTR *PFNGLTEXCOORD4XVOESPROC)(const GLfixed *coords); -typedef void(GLAD_API_PTR *PFNGLTEXCOORDFORMATNVPROC)(GLint size, GLenum type, GLsizei stride); -typedef void(GLAD_API_PTR *PFNGLTEXCOORDPOINTEREXTPROC)(GLint size, GLenum type, GLsizei stride, - GLsizei count, const void *pointer); -typedef void(GLAD_API_PTR *PFNGLTEXCOORDPOINTERLISTIBMPROC)(GLint size, GLenum type, GLint stride, - const void **pointer, GLint ptrstride); -typedef void(GLAD_API_PTR *PFNGLTEXCOORDPOINTERVINTELPROC)(GLint size, GLenum type, - const void **pointer); -typedef void(GLAD_API_PTR *PFNGLTEXENVXOESPROC)(GLenum target, GLenum pname, GLfixed param); -typedef void(GLAD_API_PTR *PFNGLTEXENVXVOESPROC)(GLenum target, GLenum pname, - const GLfixed *params); -typedef void(GLAD_API_PTR *PFNGLTEXFILTERFUNCSGISPROC)(GLenum target, GLenum filter, GLsizei n, - const GLfloat *weights); -typedef void(GLAD_API_PTR *PFNGLTEXGENXOESPROC)(GLenum coord, GLenum pname, GLfixed param); -typedef void(GLAD_API_PTR *PFNGLTEXGENXVOESPROC)(GLenum coord, GLenum pname, const GLfixed *params); -typedef void(GLAD_API_PTR *PFNGLTEXIMAGE1DPROC)(GLenum target, GLint level, GLint internalformat, - GLsizei width, GLint border, GLenum format, - GLenum type, const void *pixels); -typedef void(GLAD_API_PTR *PFNGLTEXIMAGE2DPROC)(GLenum target, GLint level, GLint internalformat, - GLsizei width, GLsizei height, GLint border, - GLenum format, GLenum type, const void *pixels); -typedef void(GLAD_API_PTR *PFNGLTEXIMAGE2DMULTISAMPLEPROC)(GLenum target, GLsizei samples, - GLenum internalformat, GLsizei width, - GLsizei height, - GLboolean fixedsamplelocations); -typedef void(GLAD_API_PTR *PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC)( - GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, - GLsizei width, GLsizei height, GLboolean fixedSampleLocations); -typedef void(GLAD_API_PTR *PFNGLTEXIMAGE3DPROC)(GLenum target, GLint level, GLint internalformat, - GLsizei width, GLsizei height, GLsizei depth, - GLint border, GLenum format, GLenum type, - const void *pixels); -typedef void(GLAD_API_PTR *PFNGLTEXIMAGE3DEXTPROC)(GLenum target, GLint level, - GLenum internalformat, GLsizei width, - GLsizei height, GLsizei depth, GLint border, - GLenum format, GLenum type, const void *pixels); -typedef void(GLAD_API_PTR *PFNGLTEXIMAGE3DMULTISAMPLEPROC)(GLenum target, GLsizei samples, - GLenum internalformat, GLsizei width, - GLsizei height, GLsizei depth, - GLboolean fixedsamplelocations); -typedef void(GLAD_API_PTR *PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC)( - GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, - GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); -typedef void(GLAD_API_PTR *PFNGLTEXIMAGE4DSGISPROC)(GLenum target, GLint level, - GLenum internalformat, GLsizei width, - GLsizei height, GLsizei depth, GLsizei size4d, - GLint border, GLenum format, GLenum type, - const void *pixels); -typedef void(GLAD_API_PTR *PFNGLTEXPAGECOMMITMENTARBPROC)(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLint zoffset, - GLsizei width, GLsizei height, - GLsizei depth, GLboolean commit); -typedef void(GLAD_API_PTR *PFNGLTEXPAGECOMMITMENTMEMNVPROC)(GLenum target, GLint layer, GLint level, - GLint xoffset, GLint yoffset, - GLint zoffset, GLsizei width, - GLsizei height, GLsizei depth, - GLuint memory, GLuint64 offset, - GLboolean commit); -typedef void(GLAD_API_PTR *PFNGLTEXPARAMETERIIVPROC)(GLenum target, GLenum pname, - const GLint *params); -typedef void(GLAD_API_PTR *PFNGLTEXPARAMETERIIVEXTPROC)(GLenum target, GLenum pname, - const GLint *params); -typedef void(GLAD_API_PTR *PFNGLTEXPARAMETERIUIVPROC)(GLenum target, GLenum pname, - const GLuint *params); -typedef void(GLAD_API_PTR *PFNGLTEXPARAMETERIUIVEXTPROC)(GLenum target, GLenum pname, - const GLuint *params); -typedef void(GLAD_API_PTR *PFNGLTEXPARAMETERFPROC)(GLenum target, GLenum pname, GLfloat param); -typedef void(GLAD_API_PTR *PFNGLTEXPARAMETERFVPROC)(GLenum target, GLenum pname, - const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLTEXPARAMETERIPROC)(GLenum target, GLenum pname, GLint param); -typedef void(GLAD_API_PTR *PFNGLTEXPARAMETERIVPROC)(GLenum target, GLenum pname, - const GLint *params); -typedef void(GLAD_API_PTR *PFNGLTEXPARAMETERXOESPROC)(GLenum target, GLenum pname, GLfixed param); -typedef void(GLAD_API_PTR *PFNGLTEXPARAMETERXVOESPROC)(GLenum target, GLenum pname, - const GLfixed *params); -typedef void(GLAD_API_PTR *PFNGLTEXRENDERBUFFERNVPROC)(GLenum target, GLuint renderbuffer); -typedef void(GLAD_API_PTR *PFNGLTEXSTORAGE1DPROC)(GLenum target, GLsizei levels, - GLenum internalformat, GLsizei width); -typedef void(GLAD_API_PTR *PFNGLTEXSTORAGE1DEXTPROC)(GLenum target, GLsizei levels, - GLenum internalformat, GLsizei width); -typedef void(GLAD_API_PTR *PFNGLTEXSTORAGE2DPROC)(GLenum target, GLsizei levels, - GLenum internalformat, GLsizei width, - GLsizei height); -typedef void(GLAD_API_PTR *PFNGLTEXSTORAGE2DEXTPROC)(GLenum target, GLsizei levels, - GLenum internalformat, GLsizei width, - GLsizei height); -typedef void(GLAD_API_PTR *PFNGLTEXSTORAGE2DMULTISAMPLEPROC)(GLenum target, GLsizei samples, - GLenum internalformat, GLsizei width, - GLsizei height, - GLboolean fixedsamplelocations); -typedef void(GLAD_API_PTR *PFNGLTEXSTORAGE3DPROC)(GLenum target, GLsizei levels, - GLenum internalformat, GLsizei width, - GLsizei height, GLsizei depth); -typedef void(GLAD_API_PTR *PFNGLTEXSTORAGE3DEXTPROC)(GLenum target, GLsizei levels, - GLenum internalformat, GLsizei width, - GLsizei height, GLsizei depth); -typedef void(GLAD_API_PTR *PFNGLTEXSTORAGE3DMULTISAMPLEPROC)(GLenum target, GLsizei samples, - GLenum internalformat, GLsizei width, - GLsizei height, GLsizei depth, - GLboolean fixedsamplelocations); -typedef void(GLAD_API_PTR *PFNGLTEXSTORAGEMEM1DEXTPROC)(GLenum target, GLsizei levels, - GLenum internalFormat, GLsizei width, - GLuint memory, GLuint64 offset); -typedef void(GLAD_API_PTR *PFNGLTEXSTORAGEMEM2DEXTPROC)(GLenum target, GLsizei levels, - GLenum internalFormat, GLsizei width, - GLsizei height, GLuint memory, - GLuint64 offset); -typedef void(GLAD_API_PTR *PFNGLTEXSTORAGEMEM2DMULTISAMPLEEXTPROC)(GLenum target, GLsizei samples, - GLenum internalFormat, - GLsizei width, GLsizei height, - GLboolean fixedSampleLocations, - GLuint memory, GLuint64 offset); -typedef void(GLAD_API_PTR *PFNGLTEXSTORAGEMEM3DEXTPROC)(GLenum target, GLsizei levels, - GLenum internalFormat, GLsizei width, - GLsizei height, GLsizei depth, - GLuint memory, GLuint64 offset); -typedef void(GLAD_API_PTR *PFNGLTEXSTORAGEMEM3DMULTISAMPLEEXTPROC)( - GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, - GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); -typedef void(GLAD_API_PTR *PFNGLTEXSTORAGESPARSEAMDPROC)(GLenum target, GLenum internalFormat, - GLsizei width, GLsizei height, - GLsizei depth, GLsizei layers, - GLbitfield flags); -typedef void(GLAD_API_PTR *PFNGLTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, - GLsizei width, GLenum format, GLenum type, - const void *pixels); -typedef void(GLAD_API_PTR *PFNGLTEXSUBIMAGE1DEXTPROC)(GLenum target, GLint level, GLint xoffset, - GLsizei width, GLenum format, GLenum type, - const void *pixels); -typedef void(GLAD_API_PTR *PFNGLTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLsizei width, GLsizei height, - GLenum format, GLenum type, const void *pixels); -typedef void(GLAD_API_PTR *PFNGLTEXSUBIMAGE2DEXTPROC)(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLsizei width, GLsizei height, - GLenum format, GLenum type, - const void *pixels); -typedef void(GLAD_API_PTR *PFNGLTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLint zoffset, GLsizei width, - GLsizei height, GLsizei depth, GLenum format, - GLenum type, const void *pixels); -typedef void(GLAD_API_PTR *PFNGLTEXSUBIMAGE3DEXTPROC)(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLint zoffset, GLsizei width, - GLsizei height, GLsizei depth, GLenum format, - GLenum type, const void *pixels); -typedef void(GLAD_API_PTR *PFNGLTEXSUBIMAGE4DSGISPROC)(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLint zoffset, GLint woffset, - GLsizei width, GLsizei height, GLsizei depth, - GLsizei size4d, GLenum format, GLenum type, - const void *pixels); -typedef void(GLAD_API_PTR *PFNGLTEXTUREATTACHMEMORYNVPROC)(GLuint texture, GLuint memory, - GLuint64 offset); -typedef void(GLAD_API_PTR *PFNGLTEXTUREBARRIERPROC)(void); -typedef void(GLAD_API_PTR *PFNGLTEXTUREBARRIERNVPROC)(void); -typedef void(GLAD_API_PTR *PFNGLTEXTUREBUFFERPROC)(GLuint texture, GLenum internalformat, - GLuint buffer); -typedef void(GLAD_API_PTR *PFNGLTEXTUREBUFFEREXTPROC)(GLuint texture, GLenum target, - GLenum internalformat, GLuint buffer); -typedef void(GLAD_API_PTR *PFNGLTEXTUREBUFFERRANGEPROC)(GLuint texture, GLenum internalformat, - GLuint buffer, GLintptr offset, - GLsizeiptr size); -typedef void(GLAD_API_PTR *PFNGLTEXTUREBUFFERRANGEEXTPROC)(GLuint texture, GLenum target, - GLenum internalformat, GLuint buffer, - GLintptr offset, GLsizeiptr size); -typedef void(GLAD_API_PTR *PFNGLTEXTURECOLORMASKSGISPROC)(GLboolean red, GLboolean green, - GLboolean blue, GLboolean alpha); -typedef void(GLAD_API_PTR *PFNGLTEXTUREIMAGE1DEXTPROC)(GLuint texture, GLenum target, GLint level, - GLint internalformat, GLsizei width, - GLint border, GLenum format, GLenum type, - const void *pixels); -typedef void(GLAD_API_PTR *PFNGLTEXTUREIMAGE2DEXTPROC)(GLuint texture, GLenum target, GLint level, - GLint internalformat, GLsizei width, - GLsizei height, GLint border, GLenum format, - GLenum type, const void *pixels); -typedef void(GLAD_API_PTR *PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC)( - GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, - GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); -typedef void(GLAD_API_PTR *PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC)(GLuint texture, GLenum target, - GLsizei samples, - GLint internalFormat, - GLsizei width, GLsizei height, - GLboolean fixedSampleLocations); -typedef void(GLAD_API_PTR *PFNGLTEXTUREIMAGE3DEXTPROC)(GLuint texture, GLenum target, GLint level, - GLint internalformat, GLsizei width, - GLsizei height, GLsizei depth, GLint border, - GLenum format, GLenum type, - const void *pixels); -typedef void(GLAD_API_PTR *PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC)( - GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, - GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, - GLboolean fixedSampleLocations); -typedef void(GLAD_API_PTR *PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC)( - GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, - GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); -typedef void(GLAD_API_PTR *PFNGLTEXTURELIGHTEXTPROC)(GLenum pname); -typedef void(GLAD_API_PTR *PFNGLTEXTUREMATERIALEXTPROC)(GLenum face, GLenum mode); -typedef void(GLAD_API_PTR *PFNGLTEXTURENORMALEXTPROC)(GLenum mode); -typedef void(GLAD_API_PTR *PFNGLTEXTUREPAGECOMMITMENTEXTPROC)(GLuint texture, GLint level, - GLint xoffset, GLint yoffset, - GLint zoffset, GLsizei width, - GLsizei height, GLsizei depth, - GLboolean commit); -typedef void(GLAD_API_PTR *PFNGLTEXTUREPAGECOMMITMENTMEMNVPROC)(GLuint texture, GLint layer, - GLint level, GLint xoffset, - GLint yoffset, GLint zoffset, - GLsizei width, GLsizei height, - GLsizei depth, GLuint memory, - GLuint64 offset, GLboolean commit); -typedef void(GLAD_API_PTR *PFNGLTEXTUREPARAMETERIIVPROC)(GLuint texture, GLenum pname, - const GLint *params); -typedef void(GLAD_API_PTR *PFNGLTEXTUREPARAMETERIIVEXTPROC)(GLuint texture, GLenum target, - GLenum pname, const GLint *params); -typedef void(GLAD_API_PTR *PFNGLTEXTUREPARAMETERIUIVPROC)(GLuint texture, GLenum pname, - const GLuint *params); -typedef void(GLAD_API_PTR *PFNGLTEXTUREPARAMETERIUIVEXTPROC)(GLuint texture, GLenum target, - GLenum pname, const GLuint *params); -typedef void(GLAD_API_PTR *PFNGLTEXTUREPARAMETERFPROC)(GLuint texture, GLenum pname, GLfloat param); -typedef void(GLAD_API_PTR *PFNGLTEXTUREPARAMETERFEXTPROC)(GLuint texture, GLenum target, - GLenum pname, GLfloat param); -typedef void(GLAD_API_PTR *PFNGLTEXTUREPARAMETERFVPROC)(GLuint texture, GLenum pname, - const GLfloat *param); -typedef void(GLAD_API_PTR *PFNGLTEXTUREPARAMETERFVEXTPROC)(GLuint texture, GLenum target, - GLenum pname, const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLTEXTUREPARAMETERIPROC)(GLuint texture, GLenum pname, GLint param); -typedef void(GLAD_API_PTR *PFNGLTEXTUREPARAMETERIEXTPROC)(GLuint texture, GLenum target, - GLenum pname, GLint param); -typedef void(GLAD_API_PTR *PFNGLTEXTUREPARAMETERIVPROC)(GLuint texture, GLenum pname, - const GLint *param); -typedef void(GLAD_API_PTR *PFNGLTEXTUREPARAMETERIVEXTPROC)(GLuint texture, GLenum target, - GLenum pname, const GLint *params); -typedef void(GLAD_API_PTR *PFNGLTEXTURERANGEAPPLEPROC)(GLenum target, GLsizei length, - const void *pointer); -typedef void(GLAD_API_PTR *PFNGLTEXTURERENDERBUFFEREXTPROC)(GLuint texture, GLenum target, - GLuint renderbuffer); -typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGE1DPROC)(GLuint texture, GLsizei levels, - GLenum internalformat, GLsizei width); -typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGE1DEXTPROC)(GLuint texture, GLenum target, - GLsizei levels, GLenum internalformat, - GLsizei width); -typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGE2DPROC)(GLuint texture, GLsizei levels, - GLenum internalformat, GLsizei width, - GLsizei height); -typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGE2DEXTPROC)(GLuint texture, GLenum target, - GLsizei levels, GLenum internalformat, - GLsizei width, GLsizei height); -typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC)(GLuint texture, GLsizei samples, - GLenum internalformat, - GLsizei width, GLsizei height, - GLboolean fixedsamplelocations); -typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC)(GLuint texture, GLenum target, - GLsizei samples, - GLenum internalformat, - GLsizei width, GLsizei height, - GLboolean fixedsamplelocations); -typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGE3DPROC)(GLuint texture, GLsizei levels, - GLenum internalformat, GLsizei width, - GLsizei height, GLsizei depth); -typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGE3DEXTPROC)(GLuint texture, GLenum target, - GLsizei levels, GLenum internalformat, - GLsizei width, GLsizei height, - GLsizei depth); -typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC)(GLuint texture, GLsizei samples, - GLenum internalformat, - GLsizei width, GLsizei height, - GLsizei depth, - GLboolean fixedsamplelocations); -typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC)( - GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, - GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGEMEM1DEXTPROC)(GLuint texture, GLsizei levels, - GLenum internalFormat, GLsizei width, - GLuint memory, GLuint64 offset); -typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGEMEM2DEXTPROC)(GLuint texture, GLsizei levels, - GLenum internalFormat, GLsizei width, - GLsizei height, GLuint memory, - GLuint64 offset); -typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGEMEM2DMULTISAMPLEEXTPROC)( - GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, - GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); -typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGEMEM3DEXTPROC)(GLuint texture, GLsizei levels, - GLenum internalFormat, GLsizei width, - GLsizei height, GLsizei depth, - GLuint memory, GLuint64 offset); -typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGEMEM3DMULTISAMPLEEXTPROC)( - GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, - GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); -typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGESPARSEAMDPROC)(GLuint texture, GLenum target, - GLenum internalFormat, GLsizei width, - GLsizei height, GLsizei depth, - GLsizei layers, GLbitfield flags); -typedef void(GLAD_API_PTR *PFNGLTEXTURESUBIMAGE1DPROC)(GLuint texture, GLint level, GLint xoffset, - GLsizei width, GLenum format, GLenum type, - const void *pixels); -typedef void(GLAD_API_PTR *PFNGLTEXTURESUBIMAGE1DEXTPROC)(GLuint texture, GLenum target, - GLint level, GLint xoffset, GLsizei width, - GLenum format, GLenum type, - const void *pixels); -typedef void(GLAD_API_PTR *PFNGLTEXTURESUBIMAGE2DPROC)(GLuint texture, GLint level, GLint xoffset, - GLint yoffset, GLsizei width, GLsizei height, - GLenum format, GLenum type, - const void *pixels); -typedef void(GLAD_API_PTR *PFNGLTEXTURESUBIMAGE2DEXTPROC)(GLuint texture, GLenum target, - GLint level, GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - const void *pixels); -typedef void(GLAD_API_PTR *PFNGLTEXTURESUBIMAGE3DPROC)(GLuint texture, GLint level, GLint xoffset, - GLint yoffset, GLint zoffset, GLsizei width, - GLsizei height, GLsizei depth, GLenum format, - GLenum type, const void *pixels); -typedef void(GLAD_API_PTR *PFNGLTEXTURESUBIMAGE3DEXTPROC)(GLuint texture, GLenum target, - GLint level, GLint xoffset, GLint yoffset, - GLint zoffset, GLsizei width, - GLsizei height, GLsizei depth, - GLenum format, GLenum type, - const void *pixels); -typedef void(GLAD_API_PTR *PFNGLTEXTUREVIEWPROC)(GLuint texture, GLenum target, GLuint origtexture, - GLenum internalformat, GLuint minlevel, - GLuint numlevels, GLuint minlayer, - GLuint numlayers); -typedef void(GLAD_API_PTR *PFNGLTRACKMATRIXNVPROC)(GLenum target, GLuint address, GLenum matrix, - GLenum transform); -typedef void(GLAD_API_PTR *PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC)(GLsizei count, const GLint *attribs, - GLenum bufferMode); -typedef void(GLAD_API_PTR *PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC)(GLuint xfb, GLuint index, - GLuint buffer); -typedef void(GLAD_API_PTR *PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC)(GLuint xfb, GLuint index, - GLuint buffer, GLintptr offset, - GLsizeiptr size); -typedef void(GLAD_API_PTR *PFNGLTRANSFORMFEEDBACKSTREAMATTRIBSNVPROC)(GLsizei count, - const GLint *attribs, - GLsizei nbuffers, - const GLint *bufstreams, - GLenum bufferMode); -typedef void(GLAD_API_PTR *PFNGLTRANSFORMFEEDBACKVARYINGSPROC)(GLuint program, GLsizei count, - const GLchar *const *varyings, - GLenum bufferMode); -typedef void(GLAD_API_PTR *PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC)(GLuint program, GLsizei count, - const GLchar *const *varyings, - GLenum bufferMode); -typedef void(GLAD_API_PTR *PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC)(GLuint program, GLsizei count, - const GLint *locations, - GLenum bufferMode); -typedef void(GLAD_API_PTR *PFNGLTRANSFORMPATHNVPROC)(GLuint resultPath, GLuint srcPath, - GLenum transformType, - const GLfloat *transformValues); -typedef void(GLAD_API_PTR *PFNGLTRANSLATEXOESPROC)(GLfixed x, GLfixed y, GLfixed z); -typedef void(GLAD_API_PTR *PFNGLUNIFORM1DPROC)(GLint location, GLdouble x); -typedef void(GLAD_API_PTR *PFNGLUNIFORM1DVPROC)(GLint location, GLsizei count, - const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM1FPROC)(GLint location, GLfloat v0); -typedef void(GLAD_API_PTR *PFNGLUNIFORM1FARBPROC)(GLint location, GLfloat v0); -typedef void(GLAD_API_PTR *PFNGLUNIFORM1FVPROC)(GLint location, GLsizei count, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM1FVARBPROC)(GLint location, GLsizei count, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM1IPROC)(GLint location, GLint v0); -typedef void(GLAD_API_PTR *PFNGLUNIFORM1I64ARBPROC)(GLint location, GLint64 x); -typedef void(GLAD_API_PTR *PFNGLUNIFORM1I64NVPROC)(GLint location, GLint64EXT x); -typedef void(GLAD_API_PTR *PFNGLUNIFORM1I64VARBPROC)(GLint location, GLsizei count, - const GLint64 *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM1I64VNVPROC)(GLint location, GLsizei count, - const GLint64EXT *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM1IARBPROC)(GLint location, GLint v0); -typedef void(GLAD_API_PTR *PFNGLUNIFORM1IVPROC)(GLint location, GLsizei count, const GLint *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM1IVARBPROC)(GLint location, GLsizei count, - const GLint *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM1UIPROC)(GLint location, GLuint v0); -typedef void(GLAD_API_PTR *PFNGLUNIFORM1UI64ARBPROC)(GLint location, GLuint64 x); -typedef void(GLAD_API_PTR *PFNGLUNIFORM1UI64NVPROC)(GLint location, GLuint64EXT x); -typedef void(GLAD_API_PTR *PFNGLUNIFORM1UI64VARBPROC)(GLint location, GLsizei count, - const GLuint64 *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM1UI64VNVPROC)(GLint location, GLsizei count, - const GLuint64EXT *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM1UIEXTPROC)(GLint location, GLuint v0); -typedef void(GLAD_API_PTR *PFNGLUNIFORM1UIVPROC)(GLint location, GLsizei count, - const GLuint *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM1UIVEXTPROC)(GLint location, GLsizei count, - const GLuint *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM2DPROC)(GLint location, GLdouble x, GLdouble y); -typedef void(GLAD_API_PTR *PFNGLUNIFORM2DVPROC)(GLint location, GLsizei count, - const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM2FPROC)(GLint location, GLfloat v0, GLfloat v1); -typedef void(GLAD_API_PTR *PFNGLUNIFORM2FARBPROC)(GLint location, GLfloat v0, GLfloat v1); -typedef void(GLAD_API_PTR *PFNGLUNIFORM2FVPROC)(GLint location, GLsizei count, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM2FVARBPROC)(GLint location, GLsizei count, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM2IPROC)(GLint location, GLint v0, GLint v1); -typedef void(GLAD_API_PTR *PFNGLUNIFORM2I64ARBPROC)(GLint location, GLint64 x, GLint64 y); -typedef void(GLAD_API_PTR *PFNGLUNIFORM2I64NVPROC)(GLint location, GLint64EXT x, GLint64EXT y); -typedef void(GLAD_API_PTR *PFNGLUNIFORM2I64VARBPROC)(GLint location, GLsizei count, - const GLint64 *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM2I64VNVPROC)(GLint location, GLsizei count, - const GLint64EXT *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM2IARBPROC)(GLint location, GLint v0, GLint v1); -typedef void(GLAD_API_PTR *PFNGLUNIFORM2IVPROC)(GLint location, GLsizei count, const GLint *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM2IVARBPROC)(GLint location, GLsizei count, - const GLint *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM2UIPROC)(GLint location, GLuint v0, GLuint v1); -typedef void(GLAD_API_PTR *PFNGLUNIFORM2UI64ARBPROC)(GLint location, GLuint64 x, GLuint64 y); -typedef void(GLAD_API_PTR *PFNGLUNIFORM2UI64NVPROC)(GLint location, GLuint64EXT x, GLuint64EXT y); -typedef void(GLAD_API_PTR *PFNGLUNIFORM2UI64VARBPROC)(GLint location, GLsizei count, - const GLuint64 *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM2UI64VNVPROC)(GLint location, GLsizei count, - const GLuint64EXT *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM2UIEXTPROC)(GLint location, GLuint v0, GLuint v1); -typedef void(GLAD_API_PTR *PFNGLUNIFORM2UIVPROC)(GLint location, GLsizei count, - const GLuint *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM2UIVEXTPROC)(GLint location, GLsizei count, - const GLuint *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM3DPROC)(GLint location, GLdouble x, GLdouble y, GLdouble z); -typedef void(GLAD_API_PTR *PFNGLUNIFORM3DVPROC)(GLint location, GLsizei count, - const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM3FPROC)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void(GLAD_API_PTR *PFNGLUNIFORM3FARBPROC)(GLint location, GLfloat v0, GLfloat v1, - GLfloat v2); -typedef void(GLAD_API_PTR *PFNGLUNIFORM3FVPROC)(GLint location, GLsizei count, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM3FVARBPROC)(GLint location, GLsizei count, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM3IPROC)(GLint location, GLint v0, GLint v1, GLint v2); -typedef void(GLAD_API_PTR *PFNGLUNIFORM3I64ARBPROC)(GLint location, GLint64 x, GLint64 y, - GLint64 z); -typedef void(GLAD_API_PTR *PFNGLUNIFORM3I64NVPROC)(GLint location, GLint64EXT x, GLint64EXT y, - GLint64EXT z); -typedef void(GLAD_API_PTR *PFNGLUNIFORM3I64VARBPROC)(GLint location, GLsizei count, - const GLint64 *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM3I64VNVPROC)(GLint location, GLsizei count, - const GLint64EXT *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM3IARBPROC)(GLint location, GLint v0, GLint v1, GLint v2); -typedef void(GLAD_API_PTR *PFNGLUNIFORM3IVPROC)(GLint location, GLsizei count, const GLint *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM3IVARBPROC)(GLint location, GLsizei count, - const GLint *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM3UIPROC)(GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void(GLAD_API_PTR *PFNGLUNIFORM3UI64ARBPROC)(GLint location, GLuint64 x, GLuint64 y, - GLuint64 z); -typedef void(GLAD_API_PTR *PFNGLUNIFORM3UI64NVPROC)(GLint location, GLuint64EXT x, GLuint64EXT y, - GLuint64EXT z); -typedef void(GLAD_API_PTR *PFNGLUNIFORM3UI64VARBPROC)(GLint location, GLsizei count, - const GLuint64 *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM3UI64VNVPROC)(GLint location, GLsizei count, - const GLuint64EXT *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM3UIEXTPROC)(GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void(GLAD_API_PTR *PFNGLUNIFORM3UIVPROC)(GLint location, GLsizei count, - const GLuint *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM3UIVEXTPROC)(GLint location, GLsizei count, - const GLuint *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM4DPROC)(GLint location, GLdouble x, GLdouble y, GLdouble z, - GLdouble w); -typedef void(GLAD_API_PTR *PFNGLUNIFORM4DVPROC)(GLint location, GLsizei count, - const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM4FPROC)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, - GLfloat v3); -typedef void(GLAD_API_PTR *PFNGLUNIFORM4FARBPROC)(GLint location, GLfloat v0, GLfloat v1, - GLfloat v2, GLfloat v3); -typedef void(GLAD_API_PTR *PFNGLUNIFORM4FVPROC)(GLint location, GLsizei count, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM4FVARBPROC)(GLint location, GLsizei count, - const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM4IPROC)(GLint location, GLint v0, GLint v1, GLint v2, - GLint v3); -typedef void(GLAD_API_PTR *PFNGLUNIFORM4I64ARBPROC)(GLint location, GLint64 x, GLint64 y, GLint64 z, - GLint64 w); -typedef void(GLAD_API_PTR *PFNGLUNIFORM4I64NVPROC)(GLint location, GLint64EXT x, GLint64EXT y, - GLint64EXT z, GLint64EXT w); -typedef void(GLAD_API_PTR *PFNGLUNIFORM4I64VARBPROC)(GLint location, GLsizei count, - const GLint64 *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM4I64VNVPROC)(GLint location, GLsizei count, - const GLint64EXT *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM4IARBPROC)(GLint location, GLint v0, GLint v1, GLint v2, - GLint v3); -typedef void(GLAD_API_PTR *PFNGLUNIFORM4IVPROC)(GLint location, GLsizei count, const GLint *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM4IVARBPROC)(GLint location, GLsizei count, - const GLint *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM4UIPROC)(GLint location, GLuint v0, GLuint v1, GLuint v2, - GLuint v3); -typedef void(GLAD_API_PTR *PFNGLUNIFORM4UI64ARBPROC)(GLint location, GLuint64 x, GLuint64 y, - GLuint64 z, GLuint64 w); -typedef void(GLAD_API_PTR *PFNGLUNIFORM4UI64NVPROC)(GLint location, GLuint64EXT x, GLuint64EXT y, - GLuint64EXT z, GLuint64EXT w); -typedef void(GLAD_API_PTR *PFNGLUNIFORM4UI64VARBPROC)(GLint location, GLsizei count, - const GLuint64 *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM4UI64VNVPROC)(GLint location, GLsizei count, - const GLuint64EXT *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM4UIEXTPROC)(GLint location, GLuint v0, GLuint v1, GLuint v2, - GLuint v3); -typedef void(GLAD_API_PTR *PFNGLUNIFORM4UIVPROC)(GLint location, GLsizei count, - const GLuint *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORM4UIVEXTPROC)(GLint location, GLsizei count, - const GLuint *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORMBLOCKBINDINGPROC)(GLuint program, GLuint uniformBlockIndex, - GLuint uniformBlockBinding); -typedef void(GLAD_API_PTR *PFNGLUNIFORMBUFFEREXTPROC)(GLuint program, GLint location, - GLuint buffer); -typedef void(GLAD_API_PTR *PFNGLUNIFORMHANDLEUI64ARBPROC)(GLint location, GLuint64 value); -typedef void(GLAD_API_PTR *PFNGLUNIFORMHANDLEUI64NVPROC)(GLint location, GLuint64 value); -typedef void(GLAD_API_PTR *PFNGLUNIFORMHANDLEUI64VARBPROC)(GLint location, GLsizei count, - const GLuint64 *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORMHANDLEUI64VNVPROC)(GLint location, GLsizei count, - const GLuint64 *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX2DVPROC)(GLint location, GLsizei count, - GLboolean transpose, const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX2FVPROC)(GLint location, GLsizei count, - GLboolean transpose, const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX2FVARBPROC)(GLint location, GLsizei count, - GLboolean transpose, const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX2X3DVPROC)(GLint location, GLsizei count, - GLboolean transpose, const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX2X3FVPROC)(GLint location, GLsizei count, - GLboolean transpose, const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX2X4DVPROC)(GLint location, GLsizei count, - GLboolean transpose, const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX2X4FVPROC)(GLint location, GLsizei count, - GLboolean transpose, const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX3DVPROC)(GLint location, GLsizei count, - GLboolean transpose, const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX3FVPROC)(GLint location, GLsizei count, - GLboolean transpose, const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX3FVARBPROC)(GLint location, GLsizei count, - GLboolean transpose, const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX3X2DVPROC)(GLint location, GLsizei count, - GLboolean transpose, const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX3X2FVPROC)(GLint location, GLsizei count, - GLboolean transpose, const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX3X4DVPROC)(GLint location, GLsizei count, - GLboolean transpose, const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX3X4FVPROC)(GLint location, GLsizei count, - GLboolean transpose, const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX4DVPROC)(GLint location, GLsizei count, - GLboolean transpose, const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX4FVPROC)(GLint location, GLsizei count, - GLboolean transpose, const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX4FVARBPROC)(GLint location, GLsizei count, - GLboolean transpose, const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX4X2DVPROC)(GLint location, GLsizei count, - GLboolean transpose, const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX4X2FVPROC)(GLint location, GLsizei count, - GLboolean transpose, const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX4X3DVPROC)(GLint location, GLsizei count, - GLboolean transpose, const GLdouble *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX4X3FVPROC)(GLint location, GLsizei count, - GLboolean transpose, const GLfloat *value); -typedef void(GLAD_API_PTR *PFNGLUNIFORMSUBROUTINESUIVPROC)(GLenum shadertype, GLsizei count, - const GLuint *indices); -typedef void(GLAD_API_PTR *PFNGLUNIFORMUI64NVPROC)(GLint location, GLuint64EXT value); -typedef void(GLAD_API_PTR *PFNGLUNIFORMUI64VNVPROC)(GLint location, GLsizei count, - const GLuint64EXT *value); -typedef void(GLAD_API_PTR *PFNGLUNLOCKARRAYSEXTPROC)(void); -typedef GLboolean(GLAD_API_PTR *PFNGLUNMAPBUFFERPROC)(GLenum target); -typedef GLboolean(GLAD_API_PTR *PFNGLUNMAPBUFFERARBPROC)(GLenum target); -typedef GLboolean(GLAD_API_PTR *PFNGLUNMAPNAMEDBUFFERPROC)(GLuint buffer); -typedef GLboolean(GLAD_API_PTR *PFNGLUNMAPNAMEDBUFFEREXTPROC)(GLuint buffer); -typedef void(GLAD_API_PTR *PFNGLUNMAPOBJECTBUFFERATIPROC)(GLuint buffer); -typedef void(GLAD_API_PTR *PFNGLUNMAPTEXTURE2DINTELPROC)(GLuint texture, GLint level); -typedef void(GLAD_API_PTR *PFNGLUPDATEOBJECTBUFFERATIPROC)(GLuint buffer, GLuint offset, - GLsizei size, const void *pointer, - GLenum preserve); -typedef void(GLAD_API_PTR *PFNGLUPLOADGPUMASKNVXPROC)(GLbitfield mask); -typedef void(GLAD_API_PTR *PFNGLUSEPROGRAMPROC)(GLuint program); -typedef void(GLAD_API_PTR *PFNGLUSEPROGRAMOBJECTARBPROC)(GLhandleARB programObj); -typedef void(GLAD_API_PTR *PFNGLUSEPROGRAMSTAGESPROC)(GLuint pipeline, GLbitfield stages, - GLuint program); -typedef void(GLAD_API_PTR *PFNGLUSESHADERPROGRAMEXTPROC)(GLenum type, GLuint program); -typedef void(GLAD_API_PTR *PFNGLVDPAUFININVPROC)(void); -typedef void(GLAD_API_PTR *PFNGLVDPAUGETSURFACEIVNVPROC)(GLvdpauSurfaceNV surface, GLenum pname, - GLsizei count, GLsizei *length, - GLint *values); -typedef void(GLAD_API_PTR *PFNGLVDPAUINITNVPROC)(const void *vdpDevice, const void *getProcAddress); -typedef GLboolean(GLAD_API_PTR *PFNGLVDPAUISSURFACENVPROC)(GLvdpauSurfaceNV surface); -typedef void(GLAD_API_PTR *PFNGLVDPAUMAPSURFACESNVPROC)(GLsizei numSurfaces, - const GLvdpauSurfaceNV *surfaces); -typedef GLvdpauSurfaceNV(GLAD_API_PTR *PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC)( - const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); -typedef GLvdpauSurfaceNV(GLAD_API_PTR *PFNGLVDPAUREGISTERVIDEOSURFACENVPROC)( - const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); -typedef GLvdpauSurfaceNV(GLAD_API_PTR *PFNGLVDPAUREGISTERVIDEOSURFACEWITHPICTURESTRUCTURENVPROC)( - const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames, - GLboolean isFrameStructure); -typedef void(GLAD_API_PTR *PFNGLVDPAUSURFACEACCESSNVPROC)(GLvdpauSurfaceNV surface, GLenum access); -typedef void(GLAD_API_PTR *PFNGLVDPAUUNMAPSURFACESNVPROC)(GLsizei numSurface, - const GLvdpauSurfaceNV *surfaces); -typedef void(GLAD_API_PTR *PFNGLVDPAUUNREGISTERSURFACENVPROC)(GLvdpauSurfaceNV surface); -typedef void(GLAD_API_PTR *PFNGLVALIDATEPROGRAMPROC)(GLuint program); -typedef void(GLAD_API_PTR *PFNGLVALIDATEPROGRAMARBPROC)(GLhandleARB programObj); -typedef void(GLAD_API_PTR *PFNGLVALIDATEPROGRAMPIPELINEPROC)(GLuint pipeline); -typedef void(GLAD_API_PTR *PFNGLVARIANTARRAYOBJECTATIPROC)(GLuint id, GLenum type, GLsizei stride, - GLuint buffer, GLuint offset); -typedef void(GLAD_API_PTR *PFNGLVARIANTPOINTEREXTPROC)(GLuint id, GLenum type, GLuint stride, - const void *addr); -typedef void(GLAD_API_PTR *PFNGLVARIANTBVEXTPROC)(GLuint id, const GLbyte *addr); -typedef void(GLAD_API_PTR *PFNGLVARIANTDVEXTPROC)(GLuint id, const GLdouble *addr); -typedef void(GLAD_API_PTR *PFNGLVARIANTFVEXTPROC)(GLuint id, const GLfloat *addr); -typedef void(GLAD_API_PTR *PFNGLVARIANTIVEXTPROC)(GLuint id, const GLint *addr); -typedef void(GLAD_API_PTR *PFNGLVARIANTSVEXTPROC)(GLuint id, const GLshort *addr); -typedef void(GLAD_API_PTR *PFNGLVARIANTUBVEXTPROC)(GLuint id, const GLubyte *addr); -typedef void(GLAD_API_PTR *PFNGLVARIANTUIVEXTPROC)(GLuint id, const GLuint *addr); -typedef void(GLAD_API_PTR *PFNGLVARIANTUSVEXTPROC)(GLuint id, const GLushort *addr); -typedef void(GLAD_API_PTR *PFNGLVERTEX2BOESPROC)(GLbyte x, GLbyte y); -typedef void(GLAD_API_PTR *PFNGLVERTEX2BVOESPROC)(const GLbyte *coords); -typedef void(GLAD_API_PTR *PFNGLVERTEX2HNVPROC)(GLhalfNV x, GLhalfNV y); -typedef void(GLAD_API_PTR *PFNGLVERTEX2HVNVPROC)(const GLhalfNV *v); -typedef void(GLAD_API_PTR *PFNGLVERTEX2XOESPROC)(GLfixed x); -typedef void(GLAD_API_PTR *PFNGLVERTEX2XVOESPROC)(const GLfixed *coords); -typedef void(GLAD_API_PTR *PFNGLVERTEX3BOESPROC)(GLbyte x, GLbyte y, GLbyte z); -typedef void(GLAD_API_PTR *PFNGLVERTEX3BVOESPROC)(const GLbyte *coords); -typedef void(GLAD_API_PTR *PFNGLVERTEX3HNVPROC)(GLhalfNV x, GLhalfNV y, GLhalfNV z); -typedef void(GLAD_API_PTR *PFNGLVERTEX3HVNVPROC)(const GLhalfNV *v); -typedef void(GLAD_API_PTR *PFNGLVERTEX3XOESPROC)(GLfixed x, GLfixed y); -typedef void(GLAD_API_PTR *PFNGLVERTEX3XVOESPROC)(const GLfixed *coords); -typedef void(GLAD_API_PTR *PFNGLVERTEX4BOESPROC)(GLbyte x, GLbyte y, GLbyte z, GLbyte w); -typedef void(GLAD_API_PTR *PFNGLVERTEX4BVOESPROC)(const GLbyte *coords); -typedef void(GLAD_API_PTR *PFNGLVERTEX4HNVPROC)(GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); -typedef void(GLAD_API_PTR *PFNGLVERTEX4HVNVPROC)(const GLhalfNV *v); -typedef void(GLAD_API_PTR *PFNGLVERTEX4XOESPROC)(GLfixed x, GLfixed y, GLfixed z); -typedef void(GLAD_API_PTR *PFNGLVERTEX4XVOESPROC)(const GLfixed *coords); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYATTRIBBINDINGPROC)(GLuint vaobj, GLuint attribindex, - GLuint bindingindex); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYATTRIBFORMATPROC)(GLuint vaobj, GLuint attribindex, - GLint size, GLenum type, - GLboolean normalized, - GLuint relativeoffset); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYATTRIBIFORMATPROC)(GLuint vaobj, GLuint attribindex, - GLint size, GLenum type, - GLuint relativeoffset); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYATTRIBLFORMATPROC)(GLuint vaobj, GLuint attribindex, - GLint size, GLenum type, - GLuint relativeoffset); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC)(GLuint vaobj, - GLuint bindingindex, - GLuint buffer, GLintptr offset, - GLsizei stride); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYBINDINGDIVISORPROC)(GLuint vaobj, GLuint bindingindex, - GLuint divisor); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYCOLOROFFSETEXTPROC)(GLuint vaobj, GLuint buffer, - GLint size, GLenum type, - GLsizei stride, GLintptr offset); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYEDGEFLAGOFFSETEXTPROC)(GLuint vaobj, GLuint buffer, - GLsizei stride, GLintptr offset); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYELEMENTBUFFERPROC)(GLuint vaobj, GLuint buffer); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYFOGCOORDOFFSETEXTPROC)(GLuint vaobj, GLuint buffer, - GLenum type, GLsizei stride, - GLintptr offset); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYINDEXOFFSETEXTPROC)(GLuint vaobj, GLuint buffer, - GLenum type, GLsizei stride, - GLintptr offset); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYMULTITEXCOORDOFFSETEXTPROC)(GLuint vaobj, GLuint buffer, - GLenum texunit, GLint size, - GLenum type, GLsizei stride, - GLintptr offset); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYNORMALOFFSETEXTPROC)(GLuint vaobj, GLuint buffer, - GLenum type, GLsizei stride, - GLintptr offset); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYPARAMETERIAPPLEPROC)(GLenum pname, GLint param); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYRANGEAPPLEPROC)(GLsizei length, void *pointer); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYRANGENVPROC)(GLsizei length, const void *pointer); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYSECONDARYCOLOROFFSETEXTPROC)(GLuint vaobj, GLuint buffer, - GLint size, GLenum type, - GLsizei stride, - GLintptr offset); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYTEXCOORDOFFSETEXTPROC)(GLuint vaobj, GLuint buffer, - GLint size, GLenum type, - GLsizei stride, GLintptr offset); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC)(GLuint vaobj, - GLuint attribindex, - GLuint bindingindex); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXATTRIBDIVISOREXTPROC)(GLuint vaobj, GLuint index, - GLuint divisor); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC)(GLuint vaobj, - GLuint attribindex, - GLint size, GLenum type, - GLboolean normalized, - GLuint relativeoffset); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC)(GLuint vaobj, - GLuint attribindex, - GLint size, GLenum type, - GLuint relativeoffset); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXATTRIBIOFFSETEXTPROC)(GLuint vaobj, GLuint buffer, - GLuint index, GLint size, - GLenum type, GLsizei stride, - GLintptr offset); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC)(GLuint vaobj, - GLuint attribindex, - GLint size, GLenum type, - GLuint relativeoffset); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC)(GLuint vaobj, GLuint buffer, - GLuint index, GLint size, - GLenum type, GLsizei stride, - GLintptr offset); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXATTRIBOFFSETEXTPROC)( - GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, - GLsizei stride, GLintptr offset); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC)(GLuint vaobj, - GLuint bindingindex, - GLuint divisor); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXBUFFERPROC)(GLuint vaobj, GLuint bindingindex, - GLuint buffer, GLintptr offset, - GLsizei stride); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXBUFFERSPROC)(GLuint vaobj, GLuint first, - GLsizei count, const GLuint *buffers, - const GLintptr *offsets, - const GLsizei *strides); -typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXOFFSETEXTPROC)(GLuint vaobj, GLuint buffer, - GLint size, GLenum type, - GLsizei stride, GLintptr offset); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1DPROC)(GLuint index, GLdouble x); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1DARBPROC)(GLuint index, GLdouble x); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1DNVPROC)(GLuint index, GLdouble x); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1DVPROC)(GLuint index, const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1DVARBPROC)(GLuint index, const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1DVNVPROC)(GLuint index, const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1FPROC)(GLuint index, GLfloat x); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1FARBPROC)(GLuint index, GLfloat x); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1FNVPROC)(GLuint index, GLfloat x); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1FVPROC)(GLuint index, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1FVARBPROC)(GLuint index, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1FVNVPROC)(GLuint index, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1HNVPROC)(GLuint index, GLhalfNV x); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1HVNVPROC)(GLuint index, const GLhalfNV *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1SPROC)(GLuint index, GLshort x); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1SARBPROC)(GLuint index, GLshort x); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1SNVPROC)(GLuint index, GLshort x); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1SVPROC)(GLuint index, const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1SVARBPROC)(GLuint index, const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1SVNVPROC)(GLuint index, const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2DPROC)(GLuint index, GLdouble x, GLdouble y); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2DARBPROC)(GLuint index, GLdouble x, GLdouble y); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2DNVPROC)(GLuint index, GLdouble x, GLdouble y); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2DVPROC)(GLuint index, const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2DVARBPROC)(GLuint index, const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2DVNVPROC)(GLuint index, const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2FPROC)(GLuint index, GLfloat x, GLfloat y); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2FARBPROC)(GLuint index, GLfloat x, GLfloat y); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2FNVPROC)(GLuint index, GLfloat x, GLfloat y); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2FVPROC)(GLuint index, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2FVARBPROC)(GLuint index, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2FVNVPROC)(GLuint index, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2HNVPROC)(GLuint index, GLhalfNV x, GLhalfNV y); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2HVNVPROC)(GLuint index, const GLhalfNV *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2SPROC)(GLuint index, GLshort x, GLshort y); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2SARBPROC)(GLuint index, GLshort x, GLshort y); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2SNVPROC)(GLuint index, GLshort x, GLshort y); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2SVPROC)(GLuint index, const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2SVARBPROC)(GLuint index, const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2SVNVPROC)(GLuint index, const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3DPROC)(GLuint index, GLdouble x, GLdouble y, - GLdouble z); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3DARBPROC)(GLuint index, GLdouble x, GLdouble y, - GLdouble z); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3DNVPROC)(GLuint index, GLdouble x, GLdouble y, - GLdouble z); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3DVPROC)(GLuint index, const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3DVARBPROC)(GLuint index, const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3DVNVPROC)(GLuint index, const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3FPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3FARBPROC)(GLuint index, GLfloat x, GLfloat y, - GLfloat z); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3FNVPROC)(GLuint index, GLfloat x, GLfloat y, - GLfloat z); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3FVPROC)(GLuint index, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3FVARBPROC)(GLuint index, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3FVNVPROC)(GLuint index, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3HNVPROC)(GLuint index, GLhalfNV x, GLhalfNV y, - GLhalfNV z); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3HVNVPROC)(GLuint index, const GLhalfNV *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3SPROC)(GLuint index, GLshort x, GLshort y, GLshort z); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3SARBPROC)(GLuint index, GLshort x, GLshort y, - GLshort z); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3SNVPROC)(GLuint index, GLshort x, GLshort y, - GLshort z); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3SVPROC)(GLuint index, const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3SVARBPROC)(GLuint index, const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3SVNVPROC)(GLuint index, const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NBVPROC)(GLuint index, const GLbyte *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NBVARBPROC)(GLuint index, const GLbyte *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NIVPROC)(GLuint index, const GLint *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NIVARBPROC)(GLuint index, const GLint *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NSVPROC)(GLuint index, const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NSVARBPROC)(GLuint index, const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NUBPROC)(GLuint index, GLubyte x, GLubyte y, GLubyte z, - GLubyte w); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NUBARBPROC)(GLuint index, GLubyte x, GLubyte y, - GLubyte z, GLubyte w); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NUBVPROC)(GLuint index, const GLubyte *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NUBVARBPROC)(GLuint index, const GLubyte *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NUIVPROC)(GLuint index, const GLuint *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NUIVARBPROC)(GLuint index, const GLuint *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NUSVPROC)(GLuint index, const GLushort *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NUSVARBPROC)(GLuint index, const GLushort *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4BVPROC)(GLuint index, const GLbyte *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4BVARBPROC)(GLuint index, const GLbyte *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4DPROC)(GLuint index, GLdouble x, GLdouble y, - GLdouble z, GLdouble w); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4DARBPROC)(GLuint index, GLdouble x, GLdouble y, - GLdouble z, GLdouble w); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4DNVPROC)(GLuint index, GLdouble x, GLdouble y, - GLdouble z, GLdouble w); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4DVPROC)(GLuint index, const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4DVARBPROC)(GLuint index, const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4DVNVPROC)(GLuint index, const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4FPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat z, - GLfloat w); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4FARBPROC)(GLuint index, GLfloat x, GLfloat y, - GLfloat z, GLfloat w); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4FNVPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat z, - GLfloat w); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4FVPROC)(GLuint index, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4FVARBPROC)(GLuint index, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4FVNVPROC)(GLuint index, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4HNVPROC)(GLuint index, GLhalfNV x, GLhalfNV y, - GLhalfNV z, GLhalfNV w); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4HVNVPROC)(GLuint index, const GLhalfNV *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4IVPROC)(GLuint index, const GLint *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4IVARBPROC)(GLuint index, const GLint *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4SPROC)(GLuint index, GLshort x, GLshort y, GLshort z, - GLshort w); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4SARBPROC)(GLuint index, GLshort x, GLshort y, - GLshort z, GLshort w); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4SNVPROC)(GLuint index, GLshort x, GLshort y, GLshort z, - GLshort w); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4SVPROC)(GLuint index, const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4SVARBPROC)(GLuint index, const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4SVNVPROC)(GLuint index, const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4UBNVPROC)(GLuint index, GLubyte x, GLubyte y, - GLubyte z, GLubyte w); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4UBVPROC)(GLuint index, const GLubyte *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4UBVARBPROC)(GLuint index, const GLubyte *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4UBVNVPROC)(GLuint index, const GLubyte *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4UIVPROC)(GLuint index, const GLuint *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4UIVARBPROC)(GLuint index, const GLuint *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4USVPROC)(GLuint index, const GLushort *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4USVARBPROC)(GLuint index, const GLushort *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBARRAYOBJECTATIPROC)(GLuint index, GLint size, - GLenum type, GLboolean normalized, - GLsizei stride, GLuint buffer, - GLuint offset); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBBINDINGPROC)(GLuint attribindex, GLuint bindingindex); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBDIVISORPROC)(GLuint index, GLuint divisor); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBDIVISORARBPROC)(GLuint index, GLuint divisor); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBFORMATPROC)(GLuint attribindex, GLint size, GLenum type, - GLboolean normalized, - GLuint relativeoffset); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBFORMATNVPROC)(GLuint index, GLint size, GLenum type, - GLboolean normalized, GLsizei stride); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI1IPROC)(GLuint index, GLint x); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI1IEXTPROC)(GLuint index, GLint x); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI1IVPROC)(GLuint index, const GLint *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI1IVEXTPROC)(GLuint index, const GLint *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI1UIPROC)(GLuint index, GLuint x); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI1UIEXTPROC)(GLuint index, GLuint x); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI1UIVPROC)(GLuint index, const GLuint *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI1UIVEXTPROC)(GLuint index, const GLuint *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI2IPROC)(GLuint index, GLint x, GLint y); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI2IEXTPROC)(GLuint index, GLint x, GLint y); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI2IVPROC)(GLuint index, const GLint *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI2IVEXTPROC)(GLuint index, const GLint *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI2UIPROC)(GLuint index, GLuint x, GLuint y); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI2UIEXTPROC)(GLuint index, GLuint x, GLuint y); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI2UIVPROC)(GLuint index, const GLuint *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI2UIVEXTPROC)(GLuint index, const GLuint *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI3IPROC)(GLuint index, GLint x, GLint y, GLint z); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI3IEXTPROC)(GLuint index, GLint x, GLint y, GLint z); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI3IVPROC)(GLuint index, const GLint *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI3IVEXTPROC)(GLuint index, const GLint *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI3UIPROC)(GLuint index, GLuint x, GLuint y, GLuint z); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI3UIEXTPROC)(GLuint index, GLuint x, GLuint y, - GLuint z); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI3UIVPROC)(GLuint index, const GLuint *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI3UIVEXTPROC)(GLuint index, const GLuint *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4BVPROC)(GLuint index, const GLbyte *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4BVEXTPROC)(GLuint index, const GLbyte *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4IPROC)(GLuint index, GLint x, GLint y, GLint z, - GLint w); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4IEXTPROC)(GLuint index, GLint x, GLint y, GLint z, - GLint w); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4IVPROC)(GLuint index, const GLint *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4IVEXTPROC)(GLuint index, const GLint *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4SVPROC)(GLuint index, const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4SVEXTPROC)(GLuint index, const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4UBVPROC)(GLuint index, const GLubyte *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4UBVEXTPROC)(GLuint index, const GLubyte *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4UIPROC)(GLuint index, GLuint x, GLuint y, GLuint z, - GLuint w); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4UIEXTPROC)(GLuint index, GLuint x, GLuint y, GLuint z, - GLuint w); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4UIVPROC)(GLuint index, const GLuint *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4UIVEXTPROC)(GLuint index, const GLuint *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4USVPROC)(GLuint index, const GLushort *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4USVEXTPROC)(GLuint index, const GLushort *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBIFORMATPROC)(GLuint attribindex, GLint size, - GLenum type, GLuint relativeoffset); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBIFORMATNVPROC)(GLuint index, GLint size, GLenum type, - GLsizei stride); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBIPOINTERPROC)(GLuint index, GLint size, GLenum type, - GLsizei stride, const void *pointer); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBIPOINTEREXTPROC)(GLuint index, GLint size, GLenum type, - GLsizei stride, const void *pointer); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL1DPROC)(GLuint index, GLdouble x); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL1DEXTPROC)(GLuint index, GLdouble x); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL1DVPROC)(GLuint index, const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL1DVEXTPROC)(GLuint index, const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL1I64NVPROC)(GLuint index, GLint64EXT x); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL1I64VNVPROC)(GLuint index, const GLint64EXT *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL1UI64ARBPROC)(GLuint index, GLuint64EXT x); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL1UI64NVPROC)(GLuint index, GLuint64EXT x); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL1UI64VARBPROC)(GLuint index, const GLuint64EXT *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL1UI64VNVPROC)(GLuint index, const GLuint64EXT *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL2DPROC)(GLuint index, GLdouble x, GLdouble y); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL2DEXTPROC)(GLuint index, GLdouble x, GLdouble y); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL2DVPROC)(GLuint index, const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL2DVEXTPROC)(GLuint index, const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL2I64NVPROC)(GLuint index, GLint64EXT x, GLint64EXT y); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL2I64VNVPROC)(GLuint index, const GLint64EXT *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL2UI64NVPROC)(GLuint index, GLuint64EXT x, - GLuint64EXT y); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL2UI64VNVPROC)(GLuint index, const GLuint64EXT *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL3DPROC)(GLuint index, GLdouble x, GLdouble y, - GLdouble z); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL3DEXTPROC)(GLuint index, GLdouble x, GLdouble y, - GLdouble z); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL3DVPROC)(GLuint index, const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL3DVEXTPROC)(GLuint index, const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL3I64NVPROC)(GLuint index, GLint64EXT x, GLint64EXT y, - GLint64EXT z); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL3I64VNVPROC)(GLuint index, const GLint64EXT *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL3UI64NVPROC)(GLuint index, GLuint64EXT x, - GLuint64EXT y, GLuint64EXT z); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL3UI64VNVPROC)(GLuint index, const GLuint64EXT *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL4DPROC)(GLuint index, GLdouble x, GLdouble y, - GLdouble z, GLdouble w); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL4DEXTPROC)(GLuint index, GLdouble x, GLdouble y, - GLdouble z, GLdouble w); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL4DVPROC)(GLuint index, const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL4DVEXTPROC)(GLuint index, const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL4I64NVPROC)(GLuint index, GLint64EXT x, GLint64EXT y, - GLint64EXT z, GLint64EXT w); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL4I64VNVPROC)(GLuint index, const GLint64EXT *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL4UI64NVPROC)(GLuint index, GLuint64EXT x, - GLuint64EXT y, GLuint64EXT z, - GLuint64EXT w); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL4UI64VNVPROC)(GLuint index, const GLuint64EXT *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBLFORMATPROC)(GLuint attribindex, GLint size, - GLenum type, GLuint relativeoffset); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBLFORMATNVPROC)(GLuint index, GLint size, GLenum type, - GLsizei stride); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBLPOINTERPROC)(GLuint index, GLint size, GLenum type, - GLsizei stride, const void *pointer); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBLPOINTEREXTPROC)(GLuint index, GLint size, GLenum type, - GLsizei stride, const void *pointer); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBP1UIPROC)(GLuint index, GLenum type, - GLboolean normalized, GLuint value); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBP1UIVPROC)(GLuint index, GLenum type, - GLboolean normalized, const GLuint *value); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBP2UIPROC)(GLuint index, GLenum type, - GLboolean normalized, GLuint value); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBP2UIVPROC)(GLuint index, GLenum type, - GLboolean normalized, const GLuint *value); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBP3UIPROC)(GLuint index, GLenum type, - GLboolean normalized, GLuint value); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBP3UIVPROC)(GLuint index, GLenum type, - GLboolean normalized, const GLuint *value); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBP4UIPROC)(GLuint index, GLenum type, - GLboolean normalized, GLuint value); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBP4UIVPROC)(GLuint index, GLenum type, - GLboolean normalized, const GLuint *value); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBPARAMETERIAMDPROC)(GLuint index, GLenum pname, - GLint param); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBPOINTERPROC)(GLuint index, GLint size, GLenum type, - GLboolean normalized, GLsizei stride, - const void *pointer); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBPOINTERARBPROC)(GLuint index, GLint size, GLenum type, - GLboolean normalized, GLsizei stride, - const void *pointer); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBPOINTERNVPROC)(GLuint index, GLint fsize, GLenum type, - GLsizei stride, const void *pointer); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS1DVNVPROC)(GLuint index, GLsizei count, - const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS1FVNVPROC)(GLuint index, GLsizei count, - const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS1HVNVPROC)(GLuint index, GLsizei n, const GLhalfNV *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS1SVNVPROC)(GLuint index, GLsizei count, - const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS2DVNVPROC)(GLuint index, GLsizei count, - const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS2FVNVPROC)(GLuint index, GLsizei count, - const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS2HVNVPROC)(GLuint index, GLsizei n, const GLhalfNV *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS2SVNVPROC)(GLuint index, GLsizei count, - const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS3DVNVPROC)(GLuint index, GLsizei count, - const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS3FVNVPROC)(GLuint index, GLsizei count, - const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS3HVNVPROC)(GLuint index, GLsizei n, const GLhalfNV *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS3SVNVPROC)(GLuint index, GLsizei count, - const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS4DVNVPROC)(GLuint index, GLsizei count, - const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS4FVNVPROC)(GLuint index, GLsizei count, - const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS4HVNVPROC)(GLuint index, GLsizei n, const GLhalfNV *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS4SVNVPROC)(GLuint index, GLsizei count, - const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS4UBVNVPROC)(GLuint index, GLsizei count, - const GLubyte *v); -typedef void(GLAD_API_PTR *PFNGLVERTEXBINDINGDIVISORPROC)(GLuint bindingindex, GLuint divisor); -typedef void(GLAD_API_PTR *PFNGLVERTEXBLENDARBPROC)(GLint count); -typedef void(GLAD_API_PTR *PFNGLVERTEXBLENDENVFATIPROC)(GLenum pname, GLfloat param); -typedef void(GLAD_API_PTR *PFNGLVERTEXBLENDENVIATIPROC)(GLenum pname, GLint param); -typedef void(GLAD_API_PTR *PFNGLVERTEXFORMATNVPROC)(GLint size, GLenum type, GLsizei stride); -typedef void(GLAD_API_PTR *PFNGLVERTEXPOINTEREXTPROC)(GLint size, GLenum type, GLsizei stride, - GLsizei count, const void *pointer); -typedef void(GLAD_API_PTR *PFNGLVERTEXPOINTERLISTIBMPROC)(GLint size, GLenum type, GLint stride, - const void **pointer, GLint ptrstride); -typedef void(GLAD_API_PTR *PFNGLVERTEXPOINTERVINTELPROC)(GLint size, GLenum type, - const void **pointer); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM1DATIPROC)(GLenum stream, GLdouble x); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM1DVATIPROC)(GLenum stream, const GLdouble *coords); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM1FATIPROC)(GLenum stream, GLfloat x); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM1FVATIPROC)(GLenum stream, const GLfloat *coords); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM1IATIPROC)(GLenum stream, GLint x); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM1IVATIPROC)(GLenum stream, const GLint *coords); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM1SATIPROC)(GLenum stream, GLshort x); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM1SVATIPROC)(GLenum stream, const GLshort *coords); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM2DATIPROC)(GLenum stream, GLdouble x, GLdouble y); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM2DVATIPROC)(GLenum stream, const GLdouble *coords); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM2FATIPROC)(GLenum stream, GLfloat x, GLfloat y); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM2FVATIPROC)(GLenum stream, const GLfloat *coords); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM2IATIPROC)(GLenum stream, GLint x, GLint y); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM2IVATIPROC)(GLenum stream, const GLint *coords); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM2SATIPROC)(GLenum stream, GLshort x, GLshort y); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM2SVATIPROC)(GLenum stream, const GLshort *coords); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM3DATIPROC)(GLenum stream, GLdouble x, GLdouble y, - GLdouble z); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM3DVATIPROC)(GLenum stream, const GLdouble *coords); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM3FATIPROC)(GLenum stream, GLfloat x, GLfloat y, - GLfloat z); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM3FVATIPROC)(GLenum stream, const GLfloat *coords); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM3IATIPROC)(GLenum stream, GLint x, GLint y, GLint z); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM3IVATIPROC)(GLenum stream, const GLint *coords); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM3SATIPROC)(GLenum stream, GLshort x, GLshort y, - GLshort z); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM3SVATIPROC)(GLenum stream, const GLshort *coords); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM4DATIPROC)(GLenum stream, GLdouble x, GLdouble y, - GLdouble z, GLdouble w); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM4DVATIPROC)(GLenum stream, const GLdouble *coords); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM4FATIPROC)(GLenum stream, GLfloat x, GLfloat y, - GLfloat z, GLfloat w); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM4FVATIPROC)(GLenum stream, const GLfloat *coords); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM4IATIPROC)(GLenum stream, GLint x, GLint y, GLint z, - GLint w); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM4IVATIPROC)(GLenum stream, const GLint *coords); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM4SATIPROC)(GLenum stream, GLshort x, GLshort y, - GLshort z, GLshort w); -typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM4SVATIPROC)(GLenum stream, const GLshort *coords); -typedef void(GLAD_API_PTR *PFNGLVERTEXWEIGHTPOINTEREXTPROC)(GLint size, GLenum type, GLsizei stride, - const void *pointer); -typedef void(GLAD_API_PTR *PFNGLVERTEXWEIGHTFEXTPROC)(GLfloat weight); -typedef void(GLAD_API_PTR *PFNGLVERTEXWEIGHTFVEXTPROC)(const GLfloat *weight); -typedef void(GLAD_API_PTR *PFNGLVERTEXWEIGHTHNVPROC)(GLhalfNV weight); -typedef void(GLAD_API_PTR *PFNGLVERTEXWEIGHTHVNVPROC)(const GLhalfNV *weight); -typedef GLenum(GLAD_API_PTR *PFNGLVIDEOCAPTURENVPROC)(GLuint video_capture_slot, - GLuint *sequence_num, - GLuint64EXT *capture_time); -typedef void(GLAD_API_PTR *PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC)(GLuint video_capture_slot, - GLuint stream, GLenum pname, - const GLdouble *params); -typedef void(GLAD_API_PTR *PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC)(GLuint video_capture_slot, - GLuint stream, GLenum pname, - const GLfloat *params); -typedef void(GLAD_API_PTR *PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC)(GLuint video_capture_slot, - GLuint stream, GLenum pname, - const GLint *params); -typedef void(GLAD_API_PTR *PFNGLVIEWPORTPROC)(GLint x, GLint y, GLsizei width, GLsizei height); -typedef void(GLAD_API_PTR *PFNGLVIEWPORTARRAYVPROC)(GLuint first, GLsizei count, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLVIEWPORTINDEXEDFPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat w, - GLfloat h); -typedef void(GLAD_API_PTR *PFNGLVIEWPORTINDEXEDFVPROC)(GLuint index, const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLVIEWPORTPOSITIONWSCALENVPROC)(GLuint index, GLfloat xcoeff, - GLfloat ycoeff); -typedef void(GLAD_API_PTR *PFNGLVIEWPORTSWIZZLENVPROC)(GLuint index, GLenum swizzlex, - GLenum swizzley, GLenum swizzlez, - GLenum swizzlew); -typedef void(GLAD_API_PTR *PFNGLWAITSEMAPHOREEXTPROC)(GLuint semaphore, GLuint numBufferBarriers, - const GLuint *buffers, - GLuint numTextureBarriers, - const GLuint *textures, - const GLenum *srcLayouts); -typedef void(GLAD_API_PTR *PFNGLWAITSEMAPHOREUI64NVXPROC)(GLuint waitGpu, GLsizei fenceObjectCount, - const GLuint *semaphoreArray, - const GLuint64 *fenceValueArray); -typedef void(GLAD_API_PTR *PFNGLWAITSYNCPROC)(GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void(GLAD_API_PTR *PFNGLWAITVKSEMAPHORENVPROC)(GLuint64 vkSemaphore); -typedef void(GLAD_API_PTR *PFNGLWEIGHTPATHSNVPROC)(GLuint resultPath, GLsizei numPaths, - const GLuint *paths, const GLfloat *weights); -typedef void(GLAD_API_PTR *PFNGLWEIGHTPOINTERARBPROC)(GLint size, GLenum type, GLsizei stride, - const void *pointer); -typedef void(GLAD_API_PTR *PFNGLWEIGHTBVARBPROC)(GLint size, const GLbyte *weights); -typedef void(GLAD_API_PTR *PFNGLWEIGHTDVARBPROC)(GLint size, const GLdouble *weights); -typedef void(GLAD_API_PTR *PFNGLWEIGHTFVARBPROC)(GLint size, const GLfloat *weights); -typedef void(GLAD_API_PTR *PFNGLWEIGHTIVARBPROC)(GLint size, const GLint *weights); -typedef void(GLAD_API_PTR *PFNGLWEIGHTSVARBPROC)(GLint size, const GLshort *weights); -typedef void(GLAD_API_PTR *PFNGLWEIGHTUBVARBPROC)(GLint size, const GLubyte *weights); -typedef void(GLAD_API_PTR *PFNGLWEIGHTUIVARBPROC)(GLint size, const GLuint *weights); -typedef void(GLAD_API_PTR *PFNGLWEIGHTUSVARBPROC)(GLint size, const GLushort *weights); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2DARBPROC)(GLdouble x, GLdouble y); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2DMESAPROC)(GLdouble x, GLdouble y); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2DVARBPROC)(const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2DVMESAPROC)(const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2FARBPROC)(GLfloat x, GLfloat y); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2FMESAPROC)(GLfloat x, GLfloat y); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2FVARBPROC)(const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2FVMESAPROC)(const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2IARBPROC)(GLint x, GLint y); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2IMESAPROC)(GLint x, GLint y); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2IVARBPROC)(const GLint *v); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2IVMESAPROC)(const GLint *v); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2SARBPROC)(GLshort x, GLshort y); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2SMESAPROC)(GLshort x, GLshort y); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2SVARBPROC)(const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2SVMESAPROC)(const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3DARBPROC)(GLdouble x, GLdouble y, GLdouble z); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3DMESAPROC)(GLdouble x, GLdouble y, GLdouble z); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3DVARBPROC)(const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3DVMESAPROC)(const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3FARBPROC)(GLfloat x, GLfloat y, GLfloat z); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3FMESAPROC)(GLfloat x, GLfloat y, GLfloat z); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3FVARBPROC)(const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3FVMESAPROC)(const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3IARBPROC)(GLint x, GLint y, GLint z); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3IMESAPROC)(GLint x, GLint y, GLint z); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3IVARBPROC)(const GLint *v); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3IVMESAPROC)(const GLint *v); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3SARBPROC)(GLshort x, GLshort y, GLshort z); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3SMESAPROC)(GLshort x, GLshort y, GLshort z); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3SVARBPROC)(const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3SVMESAPROC)(const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS4DMESAPROC)(GLdouble x, GLdouble y, GLdouble z, - GLdouble w); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS4DVMESAPROC)(const GLdouble *v); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS4FMESAPROC)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS4FVMESAPROC)(const GLfloat *v); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS4IMESAPROC)(GLint x, GLint y, GLint z, GLint w); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS4IVMESAPROC)(const GLint *v); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS4SMESAPROC)(GLshort x, GLshort y, GLshort z, GLshort w); -typedef void(GLAD_API_PTR *PFNGLWINDOWPOS4SVMESAPROC)(const GLshort *v); -typedef void(GLAD_API_PTR *PFNGLWINDOWRECTANGLESEXTPROC)(GLenum mode, GLsizei count, - const GLint *box); -typedef void(GLAD_API_PTR *PFNGLWRITEMASKEXTPROC)(GLuint res, GLuint in, GLenum outX, GLenum outY, - GLenum outZ, GLenum outW); - -typedef struct GladGLContext { - PFNGLACTIVESHADERPROGRAMPROC ActiveShaderProgram; - PFNGLACTIVETEXTUREPROC ActiveTexture; - PFNGLATTACHSHADERPROC AttachShader; - PFNGLBEGINCONDITIONALRENDERPROC BeginConditionalRender; - PFNGLBEGINQUERYPROC BeginQuery; - PFNGLBEGINQUERYINDEXEDPROC BeginQueryIndexed; - PFNGLBEGINTRANSFORMFEEDBACKPROC BeginTransformFeedback; - PFNGLBINDATTRIBLOCATIONPROC BindAttribLocation; - PFNGLBINDBUFFERPROC BindBuffer; - PFNGLBINDBUFFERBASEPROC BindBufferBase; - PFNGLBINDBUFFERRANGEPROC BindBufferRange; - PFNGLBINDBUFFERSBASEPROC BindBuffersBase; - PFNGLBINDBUFFERSRANGEPROC BindBuffersRange; - PFNGLBINDFRAGDATALOCATIONPROC BindFragDataLocation; - PFNGLBINDFRAGDATALOCATIONINDEXEDPROC BindFragDataLocationIndexed; - PFNGLBINDFRAMEBUFFERPROC BindFramebuffer; - PFNGLBINDIMAGETEXTUREPROC BindImageTexture; - PFNGLBINDIMAGETEXTURESPROC BindImageTextures; - PFNGLBINDPROGRAMPIPELINEPROC BindProgramPipeline; - PFNGLBINDRENDERBUFFERPROC BindRenderbuffer; - PFNGLBINDSAMPLERPROC BindSampler; - PFNGLBINDSAMPLERSPROC BindSamplers; - PFNGLBINDTEXTUREPROC BindTexture; - PFNGLBINDTEXTUREUNITPROC BindTextureUnit; - PFNGLBINDTEXTURESPROC BindTextures; - PFNGLBINDTRANSFORMFEEDBACKPROC BindTransformFeedback; - PFNGLBINDVERTEXARRAYPROC BindVertexArray; - PFNGLBINDVERTEXBUFFERPROC BindVertexBuffer; - PFNGLBINDVERTEXBUFFERSPROC BindVertexBuffers; - PFNGLBLENDCOLORPROC BlendColor; - PFNGLBLENDEQUATIONPROC BlendEquation; - PFNGLBLENDEQUATIONSEPARATEPROC BlendEquationSeparate; - PFNGLBLENDEQUATIONSEPARATEIPROC BlendEquationSeparatei; - PFNGLBLENDEQUATIONIPROC BlendEquationi; - PFNGLBLENDFUNCPROC BlendFunc; - PFNGLBLENDFUNCSEPARATEPROC BlendFuncSeparate; - PFNGLBLENDFUNCSEPARATEIPROC BlendFuncSeparatei; - PFNGLBLENDFUNCIPROC BlendFunci; - PFNGLBLITFRAMEBUFFERPROC BlitFramebuffer; - PFNGLBLITNAMEDFRAMEBUFFERPROC BlitNamedFramebuffer; - PFNGLBUFFERDATAPROC BufferData; - PFNGLBUFFERSTORAGEPROC BufferStorage; - PFNGLBUFFERSUBDATAPROC BufferSubData; - PFNGLCHECKFRAMEBUFFERSTATUSPROC CheckFramebufferStatus; - PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC CheckNamedFramebufferStatus; - PFNGLCLAMPCOLORPROC ClampColor; - PFNGLCLEARPROC Clear; - PFNGLCLEARBUFFERDATAPROC ClearBufferData; - PFNGLCLEARBUFFERSUBDATAPROC ClearBufferSubData; - PFNGLCLEARBUFFERFIPROC ClearBufferfi; - PFNGLCLEARBUFFERFVPROC ClearBufferfv; - PFNGLCLEARBUFFERIVPROC ClearBufferiv; - PFNGLCLEARBUFFERUIVPROC ClearBufferuiv; - PFNGLCLEARCOLORPROC ClearColor; - PFNGLCLEARDEPTHPROC ClearDepth; - PFNGLCLEARDEPTHFPROC ClearDepthf; - PFNGLCLEARNAMEDBUFFERDATAPROC ClearNamedBufferData; - PFNGLCLEARNAMEDBUFFERSUBDATAPROC ClearNamedBufferSubData; - PFNGLCLEARNAMEDFRAMEBUFFERFIPROC ClearNamedFramebufferfi; - PFNGLCLEARNAMEDFRAMEBUFFERFVPROC ClearNamedFramebufferfv; - PFNGLCLEARNAMEDFRAMEBUFFERIVPROC ClearNamedFramebufferiv; - PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC ClearNamedFramebufferuiv; - PFNGLCLEARSTENCILPROC ClearStencil; - PFNGLCLEARTEXIMAGEPROC ClearTexImage; - PFNGLCLEARTEXSUBIMAGEPROC ClearTexSubImage; - PFNGLCLIENTWAITSYNCPROC ClientWaitSync; - PFNGLCLIPCONTROLPROC ClipControl; - PFNGLCOLORMASKPROC ColorMask; - PFNGLCOLORMASKIPROC ColorMaski; - PFNGLCOMPILESHADERPROC CompileShader; - PFNGLCOMPRESSEDTEXIMAGE1DPROC CompressedTexImage1D; - PFNGLCOMPRESSEDTEXIMAGE2DPROC CompressedTexImage2D; - PFNGLCOMPRESSEDTEXIMAGE3DPROC CompressedTexImage3D; - PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC CompressedTexSubImage1D; - PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC CompressedTexSubImage2D; - PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC CompressedTexSubImage3D; - PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC CompressedTextureSubImage1D; - PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC CompressedTextureSubImage2D; - PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC CompressedTextureSubImage3D; - PFNGLCOPYBUFFERSUBDATAPROC CopyBufferSubData; - PFNGLCOPYIMAGESUBDATAPROC CopyImageSubData; - PFNGLCOPYNAMEDBUFFERSUBDATAPROC CopyNamedBufferSubData; - PFNGLCOPYTEXIMAGE1DPROC CopyTexImage1D; - PFNGLCOPYTEXIMAGE2DPROC CopyTexImage2D; - PFNGLCOPYTEXSUBIMAGE1DPROC CopyTexSubImage1D; - PFNGLCOPYTEXSUBIMAGE2DPROC CopyTexSubImage2D; - PFNGLCOPYTEXSUBIMAGE3DPROC CopyTexSubImage3D; - PFNGLCOPYTEXTURESUBIMAGE1DPROC CopyTextureSubImage1D; - PFNGLCOPYTEXTURESUBIMAGE2DPROC CopyTextureSubImage2D; - PFNGLCOPYTEXTURESUBIMAGE3DPROC CopyTextureSubImage3D; - PFNGLCREATEBUFFERSPROC CreateBuffers; - PFNGLCREATEFRAMEBUFFERSPROC CreateFramebuffers; - PFNGLCREATEPROGRAMPROC CreateProgram; - PFNGLCREATEPROGRAMPIPELINESPROC CreateProgramPipelines; - PFNGLCREATEQUERIESPROC CreateQueries; - PFNGLCREATERENDERBUFFERSPROC CreateRenderbuffers; - PFNGLCREATESAMPLERSPROC CreateSamplers; - PFNGLCREATESHADERPROC CreateShader; - PFNGLCREATESHADERPROGRAMVPROC CreateShaderProgramv; - PFNGLCREATETEXTURESPROC CreateTextures; - PFNGLCREATETRANSFORMFEEDBACKSPROC CreateTransformFeedbacks; - PFNGLCREATEVERTEXARRAYSPROC CreateVertexArrays; - PFNGLCULLFACEPROC CullFace; - PFNGLDEBUGMESSAGECALLBACKPROC DebugMessageCallback; - PFNGLDEBUGMESSAGECONTROLPROC DebugMessageControl; - PFNGLDEBUGMESSAGEINSERTPROC DebugMessageInsert; - PFNGLDELETEBUFFERSPROC DeleteBuffers; - PFNGLDELETEFRAMEBUFFERSPROC DeleteFramebuffers; - PFNGLDELETEPROGRAMPROC DeleteProgram; - PFNGLDELETEPROGRAMPIPELINESPROC DeleteProgramPipelines; - PFNGLDELETEQUERIESPROC DeleteQueries; - PFNGLDELETERENDERBUFFERSPROC DeleteRenderbuffers; - PFNGLDELETESAMPLERSPROC DeleteSamplers; - PFNGLDELETESHADERPROC DeleteShader; - PFNGLDELETESYNCPROC DeleteSync; - PFNGLDELETETEXTURESPROC DeleteTextures; - PFNGLDELETETRANSFORMFEEDBACKSPROC DeleteTransformFeedbacks; - PFNGLDELETEVERTEXARRAYSPROC DeleteVertexArrays; - PFNGLDEPTHFUNCPROC DepthFunc; - PFNGLDEPTHMASKPROC DepthMask; - PFNGLDEPTHRANGEPROC DepthRange; - PFNGLDEPTHRANGEARRAYVPROC DepthRangeArrayv; - PFNGLDEPTHRANGEINDEXEDPROC DepthRangeIndexed; - PFNGLDEPTHRANGEFPROC DepthRangef; - PFNGLDETACHSHADERPROC DetachShader; - PFNGLDISABLEPROC Disable; - PFNGLDISABLEVERTEXARRAYATTRIBPROC DisableVertexArrayAttrib; - PFNGLDISABLEVERTEXATTRIBARRAYPROC DisableVertexAttribArray; - PFNGLDISABLEIPROC Disablei; - PFNGLDISPATCHCOMPUTEPROC DispatchCompute; - PFNGLDISPATCHCOMPUTEINDIRECTPROC DispatchComputeIndirect; - PFNGLDRAWARRAYSPROC DrawArrays; - PFNGLDRAWARRAYSINDIRECTPROC DrawArraysIndirect; - PFNGLDRAWARRAYSINSTANCEDPROC DrawArraysInstanced; - PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC DrawArraysInstancedBaseInstance; - PFNGLDRAWBUFFERPROC DrawBuffer; - PFNGLDRAWBUFFERSPROC DrawBuffers; - PFNGLDRAWELEMENTSPROC DrawElements; - PFNGLDRAWELEMENTSBASEVERTEXPROC DrawElementsBaseVertex; - PFNGLDRAWELEMENTSINDIRECTPROC DrawElementsIndirect; - PFNGLDRAWELEMENTSINSTANCEDPROC DrawElementsInstanced; - PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC DrawElementsInstancedBaseInstance; - PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC DrawElementsInstancedBaseVertex; - PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC - DrawElementsInstancedBaseVertexBaseInstance; - PFNGLDRAWRANGEELEMENTSPROC DrawRangeElements; - PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC DrawRangeElementsBaseVertex; - PFNGLDRAWTRANSFORMFEEDBACKPROC DrawTransformFeedback; - PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC DrawTransformFeedbackInstanced; - PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC DrawTransformFeedbackStream; - PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC DrawTransformFeedbackStreamInstanced; - PFNGLENABLEPROC Enable; - PFNGLENABLEVERTEXARRAYATTRIBPROC EnableVertexArrayAttrib; - PFNGLENABLEVERTEXATTRIBARRAYPROC EnableVertexAttribArray; - PFNGLENABLEIPROC Enablei; - PFNGLENDCONDITIONALRENDERPROC EndConditionalRender; - PFNGLENDQUERYPROC EndQuery; - PFNGLENDQUERYINDEXEDPROC EndQueryIndexed; - PFNGLENDTRANSFORMFEEDBACKPROC EndTransformFeedback; - PFNGLFENCESYNCPROC FenceSync; - PFNGLFINISHPROC Finish; - PFNGLFLUSHPROC Flush; - PFNGLFLUSHMAPPEDBUFFERRANGEPROC FlushMappedBufferRange; - PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC FlushMappedNamedBufferRange; - PFNGLFRAMEBUFFERPARAMETERIPROC FramebufferParameteri; - PFNGLFRAMEBUFFERRENDERBUFFERPROC FramebufferRenderbuffer; - PFNGLFRAMEBUFFERTEXTUREPROC FramebufferTexture; - PFNGLFRAMEBUFFERTEXTURE1DPROC FramebufferTexture1D; - PFNGLFRAMEBUFFERTEXTURE2DPROC FramebufferTexture2D; - PFNGLFRAMEBUFFERTEXTURE3DPROC FramebufferTexture3D; - PFNGLFRAMEBUFFERTEXTURELAYERPROC FramebufferTextureLayer; - PFNGLFRONTFACEPROC FrontFace; - PFNGLGENBUFFERSPROC GenBuffers; - PFNGLGENFRAMEBUFFERSPROC GenFramebuffers; - PFNGLGENPROGRAMPIPELINESPROC GenProgramPipelines; - PFNGLGENQUERIESPROC GenQueries; - PFNGLGENRENDERBUFFERSPROC GenRenderbuffers; - PFNGLGENSAMPLERSPROC GenSamplers; - PFNGLGENTEXTURESPROC GenTextures; - PFNGLGENTRANSFORMFEEDBACKSPROC GenTransformFeedbacks; - PFNGLGENVERTEXARRAYSPROC GenVertexArrays; - PFNGLGENERATEMIPMAPPROC GenerateMipmap; - PFNGLGENERATETEXTUREMIPMAPPROC GenerateTextureMipmap; - PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC GetActiveAtomicCounterBufferiv; - PFNGLGETACTIVEATTRIBPROC GetActiveAttrib; - PFNGLGETACTIVESUBROUTINENAMEPROC GetActiveSubroutineName; - PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC GetActiveSubroutineUniformName; - PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC GetActiveSubroutineUniformiv; - PFNGLGETACTIVEUNIFORMPROC GetActiveUniform; - PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC GetActiveUniformBlockName; - PFNGLGETACTIVEUNIFORMBLOCKIVPROC GetActiveUniformBlockiv; - PFNGLGETACTIVEUNIFORMNAMEPROC GetActiveUniformName; - PFNGLGETACTIVEUNIFORMSIVPROC GetActiveUniformsiv; - PFNGLGETATTACHEDSHADERSPROC GetAttachedShaders; - PFNGLGETATTRIBLOCATIONPROC GetAttribLocation; - PFNGLGETBOOLEANI_VPROC GetBooleani_v; - PFNGLGETBOOLEANVPROC GetBooleanv; - PFNGLGETBUFFERPARAMETERI64VPROC GetBufferParameteri64v; - PFNGLGETBUFFERPARAMETERIVPROC GetBufferParameteriv; - PFNGLGETBUFFERPOINTERVPROC GetBufferPointerv; - PFNGLGETBUFFERSUBDATAPROC GetBufferSubData; - PFNGLGETCOMPRESSEDTEXIMAGEPROC GetCompressedTexImage; - PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC GetCompressedTextureImage; - PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC GetCompressedTextureSubImage; - PFNGLGETDEBUGMESSAGELOGPROC GetDebugMessageLog; - PFNGLGETDOUBLEI_VPROC GetDoublei_v; - PFNGLGETDOUBLEVPROC GetDoublev; - PFNGLGETERRORPROC GetError; - PFNGLGETFLOATI_VPROC GetFloati_v; - PFNGLGETFLOATVPROC GetFloatv; - PFNGLGETFRAGDATAINDEXPROC GetFragDataIndex; - PFNGLGETFRAGDATALOCATIONPROC GetFragDataLocation; - PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC GetFramebufferAttachmentParameteriv; - PFNGLGETFRAMEBUFFERPARAMETERIVPROC GetFramebufferParameteriv; - PFNGLGETGRAPHICSRESETSTATUSPROC GetGraphicsResetStatus; - PFNGLGETINTEGER64I_VPROC GetInteger64i_v; - PFNGLGETINTEGER64VPROC GetInteger64v; - PFNGLGETINTEGERI_VPROC GetIntegeri_v; - PFNGLGETINTEGERVPROC GetIntegerv; - PFNGLGETINTERNALFORMATI64VPROC GetInternalformati64v; - PFNGLGETINTERNALFORMATIVPROC GetInternalformativ; - PFNGLGETMULTISAMPLEFVPROC GetMultisamplefv; - PFNGLGETNAMEDBUFFERPARAMETERI64VPROC GetNamedBufferParameteri64v; - PFNGLGETNAMEDBUFFERPARAMETERIVPROC GetNamedBufferParameteriv; - PFNGLGETNAMEDBUFFERPOINTERVPROC GetNamedBufferPointerv; - PFNGLGETNAMEDBUFFERSUBDATAPROC GetNamedBufferSubData; - PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC GetNamedFramebufferAttachmentParameteriv; - PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC GetNamedFramebufferParameteriv; - PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC GetNamedRenderbufferParameteriv; - PFNGLGETOBJECTLABELPROC GetObjectLabel; - PFNGLGETOBJECTPTRLABELPROC GetObjectPtrLabel; - PFNGLGETPOINTERVPROC GetPointerv; - PFNGLGETPROGRAMBINARYPROC GetProgramBinary; - PFNGLGETPROGRAMINFOLOGPROC GetProgramInfoLog; - PFNGLGETPROGRAMINTERFACEIVPROC GetProgramInterfaceiv; - PFNGLGETPROGRAMPIPELINEINFOLOGPROC GetProgramPipelineInfoLog; - PFNGLGETPROGRAMPIPELINEIVPROC GetProgramPipelineiv; - PFNGLGETPROGRAMRESOURCEINDEXPROC GetProgramResourceIndex; - PFNGLGETPROGRAMRESOURCELOCATIONPROC GetProgramResourceLocation; - PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC GetProgramResourceLocationIndex; - PFNGLGETPROGRAMRESOURCENAMEPROC GetProgramResourceName; - PFNGLGETPROGRAMRESOURCEIVPROC GetProgramResourceiv; - PFNGLGETPROGRAMSTAGEIVPROC GetProgramStageiv; - PFNGLGETPROGRAMIVPROC GetProgramiv; - PFNGLGETQUERYBUFFEROBJECTI64VPROC GetQueryBufferObjecti64v; - PFNGLGETQUERYBUFFEROBJECTIVPROC GetQueryBufferObjectiv; - PFNGLGETQUERYBUFFEROBJECTUI64VPROC GetQueryBufferObjectui64v; - PFNGLGETQUERYBUFFEROBJECTUIVPROC GetQueryBufferObjectuiv; - PFNGLGETQUERYINDEXEDIVPROC GetQueryIndexediv; - PFNGLGETQUERYOBJECTI64VPROC GetQueryObjecti64v; - PFNGLGETQUERYOBJECTIVPROC GetQueryObjectiv; - PFNGLGETQUERYOBJECTUI64VPROC GetQueryObjectui64v; - PFNGLGETQUERYOBJECTUIVPROC GetQueryObjectuiv; - PFNGLGETQUERYIVPROC GetQueryiv; - PFNGLGETRENDERBUFFERPARAMETERIVPROC GetRenderbufferParameteriv; - PFNGLGETSAMPLERPARAMETERIIVPROC GetSamplerParameterIiv; - PFNGLGETSAMPLERPARAMETERIUIVPROC GetSamplerParameterIuiv; - PFNGLGETSAMPLERPARAMETERFVPROC GetSamplerParameterfv; - PFNGLGETSAMPLERPARAMETERIVPROC GetSamplerParameteriv; - PFNGLGETSHADERINFOLOGPROC GetShaderInfoLog; - PFNGLGETSHADERPRECISIONFORMATPROC GetShaderPrecisionFormat; - PFNGLGETSHADERSOURCEPROC GetShaderSource; - PFNGLGETSHADERIVPROC GetShaderiv; - PFNGLGETSTRINGPROC GetString; - PFNGLGETSTRINGIPROC GetStringi; - PFNGLGETSUBROUTINEINDEXPROC GetSubroutineIndex; - PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC GetSubroutineUniformLocation; - PFNGLGETSYNCIVPROC GetSynciv; - PFNGLGETTEXIMAGEPROC GetTexImage; - PFNGLGETTEXLEVELPARAMETERFVPROC GetTexLevelParameterfv; - PFNGLGETTEXLEVELPARAMETERIVPROC GetTexLevelParameteriv; - PFNGLGETTEXPARAMETERIIVPROC GetTexParameterIiv; - PFNGLGETTEXPARAMETERIUIVPROC GetTexParameterIuiv; - PFNGLGETTEXPARAMETERFVPROC GetTexParameterfv; - PFNGLGETTEXPARAMETERIVPROC GetTexParameteriv; - PFNGLGETTEXTUREIMAGEPROC GetTextureImage; - PFNGLGETTEXTURELEVELPARAMETERFVPROC GetTextureLevelParameterfv; - PFNGLGETTEXTURELEVELPARAMETERIVPROC GetTextureLevelParameteriv; - PFNGLGETTEXTUREPARAMETERIIVPROC GetTextureParameterIiv; - PFNGLGETTEXTUREPARAMETERIUIVPROC GetTextureParameterIuiv; - PFNGLGETTEXTUREPARAMETERFVPROC GetTextureParameterfv; - PFNGLGETTEXTUREPARAMETERIVPROC GetTextureParameteriv; - PFNGLGETTEXTURESUBIMAGEPROC GetTextureSubImage; - PFNGLGETTRANSFORMFEEDBACKVARYINGPROC GetTransformFeedbackVarying; - PFNGLGETTRANSFORMFEEDBACKI64_VPROC GetTransformFeedbacki64_v; - PFNGLGETTRANSFORMFEEDBACKI_VPROC GetTransformFeedbacki_v; - PFNGLGETTRANSFORMFEEDBACKIVPROC GetTransformFeedbackiv; - PFNGLGETUNIFORMBLOCKINDEXPROC GetUniformBlockIndex; - PFNGLGETUNIFORMINDICESPROC GetUniformIndices; - PFNGLGETUNIFORMLOCATIONPROC GetUniformLocation; - PFNGLGETUNIFORMSUBROUTINEUIVPROC GetUniformSubroutineuiv; - PFNGLGETUNIFORMDVPROC GetUniformdv; - PFNGLGETUNIFORMFVPROC GetUniformfv; - PFNGLGETUNIFORMIVPROC GetUniformiv; - PFNGLGETUNIFORMUIVPROC GetUniformuiv; - PFNGLGETVERTEXARRAYINDEXED64IVPROC GetVertexArrayIndexed64iv; - PFNGLGETVERTEXARRAYINDEXEDIVPROC GetVertexArrayIndexediv; - PFNGLGETVERTEXARRAYIVPROC GetVertexArrayiv; - PFNGLGETVERTEXATTRIBIIVPROC GetVertexAttribIiv; - PFNGLGETVERTEXATTRIBIUIVPROC GetVertexAttribIuiv; - PFNGLGETVERTEXATTRIBLDVPROC GetVertexAttribLdv; - PFNGLGETVERTEXATTRIBPOINTERVPROC GetVertexAttribPointerv; - PFNGLGETVERTEXATTRIBDVPROC GetVertexAttribdv; - PFNGLGETVERTEXATTRIBFVPROC GetVertexAttribfv; - PFNGLGETVERTEXATTRIBIVPROC GetVertexAttribiv; - PFNGLGETNCOMPRESSEDTEXIMAGEPROC GetnCompressedTexImage; - PFNGLGETNTEXIMAGEPROC GetnTexImage; - PFNGLGETNUNIFORMDVPROC GetnUniformdv; - PFNGLGETNUNIFORMFVPROC GetnUniformfv; - PFNGLGETNUNIFORMIVPROC GetnUniformiv; - PFNGLGETNUNIFORMUIVPROC GetnUniformuiv; - PFNGLHINTPROC Hint; - PFNGLINVALIDATEBUFFERDATAPROC InvalidateBufferData; - PFNGLINVALIDATEBUFFERSUBDATAPROC InvalidateBufferSubData; - PFNGLINVALIDATEFRAMEBUFFERPROC InvalidateFramebuffer; - PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC InvalidateNamedFramebufferData; - PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC InvalidateNamedFramebufferSubData; - PFNGLINVALIDATESUBFRAMEBUFFERPROC InvalidateSubFramebuffer; - PFNGLINVALIDATETEXIMAGEPROC InvalidateTexImage; - PFNGLINVALIDATETEXSUBIMAGEPROC InvalidateTexSubImage; - PFNGLISBUFFERPROC IsBuffer; - PFNGLISENABLEDPROC IsEnabled; - PFNGLISENABLEDIPROC IsEnabledi; - PFNGLISFRAMEBUFFERPROC IsFramebuffer; - PFNGLISPROGRAMPROC IsProgram; - PFNGLISPROGRAMPIPELINEPROC IsProgramPipeline; - PFNGLISQUERYPROC IsQuery; - PFNGLISRENDERBUFFERPROC IsRenderbuffer; - PFNGLISSAMPLERPROC IsSampler; - PFNGLISSHADERPROC IsShader; - PFNGLISSYNCPROC IsSync; - PFNGLISTEXTUREPROC IsTexture; - PFNGLISTRANSFORMFEEDBACKPROC IsTransformFeedback; - PFNGLISVERTEXARRAYPROC IsVertexArray; - PFNGLLINEWIDTHPROC LineWidth; - PFNGLLINKPROGRAMPROC LinkProgram; - PFNGLLOGICOPPROC LogicOp; - PFNGLMAPBUFFERPROC MapBuffer; - PFNGLMAPBUFFERRANGEPROC MapBufferRange; - PFNGLMAPNAMEDBUFFERPROC MapNamedBuffer; - PFNGLMAPNAMEDBUFFERRANGEPROC MapNamedBufferRange; - PFNGLMEMORYBARRIERPROC MemoryBarrier; - PFNGLMEMORYBARRIERBYREGIONPROC MemoryBarrierByRegion; - PFNGLMINSAMPLESHADINGPROC MinSampleShading; - PFNGLMULTIDRAWARRAYSPROC MultiDrawArrays; - PFNGLMULTIDRAWARRAYSINDIRECTPROC MultiDrawArraysIndirect; - PFNGLMULTIDRAWARRAYSINDIRECTCOUNTPROC MultiDrawArraysIndirectCount; - PFNGLMULTIDRAWELEMENTSPROC MultiDrawElements; - PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC MultiDrawElementsBaseVertex; - PFNGLMULTIDRAWELEMENTSINDIRECTPROC MultiDrawElementsIndirect; - PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTPROC MultiDrawElementsIndirectCount; - PFNGLNAMEDBUFFERDATAPROC NamedBufferData; - PFNGLNAMEDBUFFERSTORAGEPROC NamedBufferStorage; - PFNGLNAMEDBUFFERSUBDATAPROC NamedBufferSubData; - PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC NamedFramebufferDrawBuffer; - PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC NamedFramebufferDrawBuffers; - PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC NamedFramebufferParameteri; - PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC NamedFramebufferReadBuffer; - PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC NamedFramebufferRenderbuffer; - PFNGLNAMEDFRAMEBUFFERTEXTUREPROC NamedFramebufferTexture; - PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC NamedFramebufferTextureLayer; - PFNGLNAMEDRENDERBUFFERSTORAGEPROC NamedRenderbufferStorage; - PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC NamedRenderbufferStorageMultisample; - PFNGLOBJECTLABELPROC ObjectLabel; - PFNGLOBJECTPTRLABELPROC ObjectPtrLabel; - PFNGLPATCHPARAMETERFVPROC PatchParameterfv; - PFNGLPATCHPARAMETERIPROC PatchParameteri; - PFNGLPAUSETRANSFORMFEEDBACKPROC PauseTransformFeedback; - PFNGLPIXELSTOREFPROC PixelStoref; - PFNGLPIXELSTOREIPROC PixelStorei; - PFNGLPOINTPARAMETERFPROC PointParameterf; - PFNGLPOINTPARAMETERFVPROC PointParameterfv; - PFNGLPOINTPARAMETERIPROC PointParameteri; - PFNGLPOINTPARAMETERIVPROC PointParameteriv; - PFNGLPOINTSIZEPROC PointSize; - PFNGLPOLYGONMODEPROC PolygonMode; - PFNGLPOLYGONOFFSETPROC PolygonOffset; - PFNGLPOLYGONOFFSETCLAMPPROC PolygonOffsetClamp; - PFNGLPOPDEBUGGROUPPROC PopDebugGroup; - PFNGLPRIMITIVERESTARTINDEXPROC PrimitiveRestartIndex; - PFNGLPROGRAMBINARYPROC ProgramBinary; - PFNGLPROGRAMPARAMETERIPROC ProgramParameteri; - PFNGLPROGRAMUNIFORM1DPROC ProgramUniform1d; - PFNGLPROGRAMUNIFORM1DVPROC ProgramUniform1dv; - PFNGLPROGRAMUNIFORM1FPROC ProgramUniform1f; - PFNGLPROGRAMUNIFORM1FVPROC ProgramUniform1fv; - PFNGLPROGRAMUNIFORM1IPROC ProgramUniform1i; - PFNGLPROGRAMUNIFORM1IVPROC ProgramUniform1iv; - PFNGLPROGRAMUNIFORM1UIPROC ProgramUniform1ui; - PFNGLPROGRAMUNIFORM1UIVPROC ProgramUniform1uiv; - PFNGLPROGRAMUNIFORM2DPROC ProgramUniform2d; - PFNGLPROGRAMUNIFORM2DVPROC ProgramUniform2dv; - PFNGLPROGRAMUNIFORM2FPROC ProgramUniform2f; - PFNGLPROGRAMUNIFORM2FVPROC ProgramUniform2fv; - PFNGLPROGRAMUNIFORM2IPROC ProgramUniform2i; - PFNGLPROGRAMUNIFORM2IVPROC ProgramUniform2iv; - PFNGLPROGRAMUNIFORM2UIPROC ProgramUniform2ui; - PFNGLPROGRAMUNIFORM2UIVPROC ProgramUniform2uiv; - PFNGLPROGRAMUNIFORM3DPROC ProgramUniform3d; - PFNGLPROGRAMUNIFORM3DVPROC ProgramUniform3dv; - PFNGLPROGRAMUNIFORM3FPROC ProgramUniform3f; - PFNGLPROGRAMUNIFORM3FVPROC ProgramUniform3fv; - PFNGLPROGRAMUNIFORM3IPROC ProgramUniform3i; - PFNGLPROGRAMUNIFORM3IVPROC ProgramUniform3iv; - PFNGLPROGRAMUNIFORM3UIPROC ProgramUniform3ui; - PFNGLPROGRAMUNIFORM3UIVPROC ProgramUniform3uiv; - PFNGLPROGRAMUNIFORM4DPROC ProgramUniform4d; - PFNGLPROGRAMUNIFORM4DVPROC ProgramUniform4dv; - PFNGLPROGRAMUNIFORM4FPROC ProgramUniform4f; - PFNGLPROGRAMUNIFORM4FVPROC ProgramUniform4fv; - PFNGLPROGRAMUNIFORM4IPROC ProgramUniform4i; - PFNGLPROGRAMUNIFORM4IVPROC ProgramUniform4iv; - PFNGLPROGRAMUNIFORM4UIPROC ProgramUniform4ui; - PFNGLPROGRAMUNIFORM4UIVPROC ProgramUniform4uiv; - PFNGLPROGRAMUNIFORMMATRIX2DVPROC ProgramUniformMatrix2dv; - PFNGLPROGRAMUNIFORMMATRIX2FVPROC ProgramUniformMatrix2fv; - PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC ProgramUniformMatrix2x3dv; - PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC ProgramUniformMatrix2x3fv; - PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC ProgramUniformMatrix2x4dv; - PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC ProgramUniformMatrix2x4fv; - PFNGLPROGRAMUNIFORMMATRIX3DVPROC ProgramUniformMatrix3dv; - PFNGLPROGRAMUNIFORMMATRIX3FVPROC ProgramUniformMatrix3fv; - PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC ProgramUniformMatrix3x2dv; - PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC ProgramUniformMatrix3x2fv; - PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC ProgramUniformMatrix3x4dv; - PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC ProgramUniformMatrix3x4fv; - PFNGLPROGRAMUNIFORMMATRIX4DVPROC ProgramUniformMatrix4dv; - PFNGLPROGRAMUNIFORMMATRIX4FVPROC ProgramUniformMatrix4fv; - PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC ProgramUniformMatrix4x2dv; - PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC ProgramUniformMatrix4x2fv; - PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC ProgramUniformMatrix4x3dv; - PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC ProgramUniformMatrix4x3fv; - PFNGLPROVOKINGVERTEXPROC ProvokingVertex; - PFNGLPUSHDEBUGGROUPPROC PushDebugGroup; - PFNGLQUERYCOUNTERPROC QueryCounter; - PFNGLREADBUFFERPROC ReadBuffer; - PFNGLREADPIXELSPROC ReadPixels; - PFNGLREADNPIXELSPROC ReadnPixels; - PFNGLRELEASESHADERCOMPILERPROC ReleaseShaderCompiler; - PFNGLRENDERBUFFERSTORAGEPROC RenderbufferStorage; - PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC RenderbufferStorageMultisample; - PFNGLRESUMETRANSFORMFEEDBACKPROC ResumeTransformFeedback; - PFNGLSAMPLECOVERAGEPROC SampleCoverage; - PFNGLSAMPLEMASKIPROC SampleMaski; - PFNGLSAMPLERPARAMETERIIVPROC SamplerParameterIiv; - PFNGLSAMPLERPARAMETERIUIVPROC SamplerParameterIuiv; - PFNGLSAMPLERPARAMETERFPROC SamplerParameterf; - PFNGLSAMPLERPARAMETERFVPROC SamplerParameterfv; - PFNGLSAMPLERPARAMETERIPROC SamplerParameteri; - PFNGLSAMPLERPARAMETERIVPROC SamplerParameteriv; - PFNGLSCISSORPROC Scissor; - PFNGLSCISSORARRAYVPROC ScissorArrayv; - PFNGLSCISSORINDEXEDPROC ScissorIndexed; - PFNGLSCISSORINDEXEDVPROC ScissorIndexedv; - PFNGLSHADERBINARYPROC ShaderBinary; - PFNGLSHADERSOURCEPROC ShaderSource; - PFNGLSHADERSTORAGEBLOCKBINDINGPROC ShaderStorageBlockBinding; - PFNGLSPECIALIZESHADERPROC SpecializeShader; - PFNGLSTENCILFUNCPROC StencilFunc; - PFNGLSTENCILFUNCSEPARATEPROC StencilFuncSeparate; - PFNGLSTENCILMASKPROC StencilMask; - PFNGLSTENCILMASKSEPARATEPROC StencilMaskSeparate; - PFNGLSTENCILOPPROC StencilOp; - PFNGLSTENCILOPSEPARATEPROC StencilOpSeparate; - PFNGLTEXBUFFERPROC TexBuffer; - PFNGLTEXBUFFERRANGEPROC TexBufferRange; - PFNGLTEXIMAGE1DPROC TexImage1D; - PFNGLTEXIMAGE2DPROC TexImage2D; - PFNGLTEXIMAGE2DMULTISAMPLEPROC TexImage2DMultisample; - PFNGLTEXIMAGE3DPROC TexImage3D; - PFNGLTEXIMAGE3DMULTISAMPLEPROC TexImage3DMultisample; - PFNGLTEXPARAMETERIIVPROC TexParameterIiv; - PFNGLTEXPARAMETERIUIVPROC TexParameterIuiv; - PFNGLTEXPARAMETERFPROC TexParameterf; - PFNGLTEXPARAMETERFVPROC TexParameterfv; - PFNGLTEXPARAMETERIPROC TexParameteri; - PFNGLTEXPARAMETERIVPROC TexParameteriv; - PFNGLTEXSTORAGE1DPROC TexStorage1D; - PFNGLTEXSTORAGE2DPROC TexStorage2D; - PFNGLTEXSTORAGE2DMULTISAMPLEPROC TexStorage2DMultisample; - PFNGLTEXSTORAGE3DPROC TexStorage3D; - PFNGLTEXSTORAGE3DMULTISAMPLEPROC TexStorage3DMultisample; - PFNGLTEXSUBIMAGE1DPROC TexSubImage1D; - PFNGLTEXSUBIMAGE2DPROC TexSubImage2D; - PFNGLTEXSUBIMAGE3DPROC TexSubImage3D; - PFNGLTEXTUREBARRIERPROC TextureBarrier; - PFNGLTEXTUREBUFFERPROC TextureBuffer; - PFNGLTEXTUREBUFFERRANGEPROC TextureBufferRange; - PFNGLTEXTUREPARAMETERIIVPROC TextureParameterIiv; - PFNGLTEXTUREPARAMETERIUIVPROC TextureParameterIuiv; - PFNGLTEXTUREPARAMETERFPROC TextureParameterf; - PFNGLTEXTUREPARAMETERFVPROC TextureParameterfv; - PFNGLTEXTUREPARAMETERIPROC TextureParameteri; - PFNGLTEXTUREPARAMETERIVPROC TextureParameteriv; - PFNGLTEXTURESTORAGE1DPROC TextureStorage1D; - PFNGLTEXTURESTORAGE2DPROC TextureStorage2D; - PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC TextureStorage2DMultisample; - PFNGLTEXTURESTORAGE3DPROC TextureStorage3D; - PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC TextureStorage3DMultisample; - PFNGLTEXTURESUBIMAGE1DPROC TextureSubImage1D; - PFNGLTEXTURESUBIMAGE2DPROC TextureSubImage2D; - PFNGLTEXTURESUBIMAGE3DPROC TextureSubImage3D; - PFNGLTEXTUREVIEWPROC TextureView; - PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC TransformFeedbackBufferBase; - PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC TransformFeedbackBufferRange; - PFNGLTRANSFORMFEEDBACKVARYINGSPROC TransformFeedbackVaryings; - PFNGLUNIFORM1DPROC Uniform1d; - PFNGLUNIFORM1DVPROC Uniform1dv; - PFNGLUNIFORM1FPROC Uniform1f; - PFNGLUNIFORM1FVPROC Uniform1fv; - PFNGLUNIFORM1IPROC Uniform1i; - PFNGLUNIFORM1IVPROC Uniform1iv; - PFNGLUNIFORM1UIPROC Uniform1ui; - PFNGLUNIFORM1UIVPROC Uniform1uiv; - PFNGLUNIFORM2DPROC Uniform2d; - PFNGLUNIFORM2DVPROC Uniform2dv; - PFNGLUNIFORM2FPROC Uniform2f; - PFNGLUNIFORM2FVPROC Uniform2fv; - PFNGLUNIFORM2IPROC Uniform2i; - PFNGLUNIFORM2IVPROC Uniform2iv; - PFNGLUNIFORM2UIPROC Uniform2ui; - PFNGLUNIFORM2UIVPROC Uniform2uiv; - PFNGLUNIFORM3DPROC Uniform3d; - PFNGLUNIFORM3DVPROC Uniform3dv; - PFNGLUNIFORM3FPROC Uniform3f; - PFNGLUNIFORM3FVPROC Uniform3fv; - PFNGLUNIFORM3IPROC Uniform3i; - PFNGLUNIFORM3IVPROC Uniform3iv; - PFNGLUNIFORM3UIPROC Uniform3ui; - PFNGLUNIFORM3UIVPROC Uniform3uiv; - PFNGLUNIFORM4DPROC Uniform4d; - PFNGLUNIFORM4DVPROC Uniform4dv; - PFNGLUNIFORM4FPROC Uniform4f; - PFNGLUNIFORM4FVPROC Uniform4fv; - PFNGLUNIFORM4IPROC Uniform4i; - PFNGLUNIFORM4IVPROC Uniform4iv; - PFNGLUNIFORM4UIPROC Uniform4ui; - PFNGLUNIFORM4UIVPROC Uniform4uiv; - PFNGLUNIFORMBLOCKBINDINGPROC UniformBlockBinding; - PFNGLUNIFORMMATRIX2DVPROC UniformMatrix2dv; - PFNGLUNIFORMMATRIX2FVPROC UniformMatrix2fv; - PFNGLUNIFORMMATRIX2X3DVPROC UniformMatrix2x3dv; - PFNGLUNIFORMMATRIX2X3FVPROC UniformMatrix2x3fv; - PFNGLUNIFORMMATRIX2X4DVPROC UniformMatrix2x4dv; - PFNGLUNIFORMMATRIX2X4FVPROC UniformMatrix2x4fv; - PFNGLUNIFORMMATRIX3DVPROC UniformMatrix3dv; - PFNGLUNIFORMMATRIX3FVPROC UniformMatrix3fv; - PFNGLUNIFORMMATRIX3X2DVPROC UniformMatrix3x2dv; - PFNGLUNIFORMMATRIX3X2FVPROC UniformMatrix3x2fv; - PFNGLUNIFORMMATRIX3X4DVPROC UniformMatrix3x4dv; - PFNGLUNIFORMMATRIX3X4FVPROC UniformMatrix3x4fv; - PFNGLUNIFORMMATRIX4DVPROC UniformMatrix4dv; - PFNGLUNIFORMMATRIX4FVPROC UniformMatrix4fv; - PFNGLUNIFORMMATRIX4X2DVPROC UniformMatrix4x2dv; - PFNGLUNIFORMMATRIX4X2FVPROC UniformMatrix4x2fv; - PFNGLUNIFORMMATRIX4X3DVPROC UniformMatrix4x3dv; - PFNGLUNIFORMMATRIX4X3FVPROC UniformMatrix4x3fv; - PFNGLUNIFORMSUBROUTINESUIVPROC UniformSubroutinesuiv; - PFNGLUNMAPBUFFERPROC UnmapBuffer; - PFNGLUNMAPNAMEDBUFFERPROC UnmapNamedBuffer; - PFNGLUSEPROGRAMPROC UseProgram; - PFNGLUSEPROGRAMSTAGESPROC UseProgramStages; - PFNGLVALIDATEPROGRAMPROC ValidateProgram; - PFNGLVALIDATEPROGRAMPIPELINEPROC ValidateProgramPipeline; - PFNGLVERTEXARRAYATTRIBBINDINGPROC VertexArrayAttribBinding; - PFNGLVERTEXARRAYATTRIBFORMATPROC VertexArrayAttribFormat; - PFNGLVERTEXARRAYATTRIBIFORMATPROC VertexArrayAttribIFormat; - PFNGLVERTEXARRAYATTRIBLFORMATPROC VertexArrayAttribLFormat; - PFNGLVERTEXARRAYBINDINGDIVISORPROC VertexArrayBindingDivisor; - PFNGLVERTEXARRAYELEMENTBUFFERPROC VertexArrayElementBuffer; - PFNGLVERTEXARRAYVERTEXBUFFERPROC VertexArrayVertexBuffer; - PFNGLVERTEXARRAYVERTEXBUFFERSPROC VertexArrayVertexBuffers; - PFNGLVERTEXATTRIB1DPROC VertexAttrib1d; - PFNGLVERTEXATTRIB1DVPROC VertexAttrib1dv; - PFNGLVERTEXATTRIB1FPROC VertexAttrib1f; - PFNGLVERTEXATTRIB1FVPROC VertexAttrib1fv; - PFNGLVERTEXATTRIB1SPROC VertexAttrib1s; - PFNGLVERTEXATTRIB1SVPROC VertexAttrib1sv; - PFNGLVERTEXATTRIB2DPROC VertexAttrib2d; - PFNGLVERTEXATTRIB2DVPROC VertexAttrib2dv; - PFNGLVERTEXATTRIB2FPROC VertexAttrib2f; - PFNGLVERTEXATTRIB2FVPROC VertexAttrib2fv; - PFNGLVERTEXATTRIB2SPROC VertexAttrib2s; - PFNGLVERTEXATTRIB2SVPROC VertexAttrib2sv; - PFNGLVERTEXATTRIB3DPROC VertexAttrib3d; - PFNGLVERTEXATTRIB3DVPROC VertexAttrib3dv; - PFNGLVERTEXATTRIB3FPROC VertexAttrib3f; - PFNGLVERTEXATTRIB3FVPROC VertexAttrib3fv; - PFNGLVERTEXATTRIB3SPROC VertexAttrib3s; - PFNGLVERTEXATTRIB3SVPROC VertexAttrib3sv; - PFNGLVERTEXATTRIB4NBVPROC VertexAttrib4Nbv; - PFNGLVERTEXATTRIB4NIVPROC VertexAttrib4Niv; - PFNGLVERTEXATTRIB4NSVPROC VertexAttrib4Nsv; - PFNGLVERTEXATTRIB4NUBPROC VertexAttrib4Nub; - PFNGLVERTEXATTRIB4NUBVPROC VertexAttrib4Nubv; - PFNGLVERTEXATTRIB4NUIVPROC VertexAttrib4Nuiv; - PFNGLVERTEXATTRIB4NUSVPROC VertexAttrib4Nusv; - PFNGLVERTEXATTRIB4BVPROC VertexAttrib4bv; - PFNGLVERTEXATTRIB4DPROC VertexAttrib4d; - PFNGLVERTEXATTRIB4DVPROC VertexAttrib4dv; - PFNGLVERTEXATTRIB4FPROC VertexAttrib4f; - PFNGLVERTEXATTRIB4FVPROC VertexAttrib4fv; - PFNGLVERTEXATTRIB4IVPROC VertexAttrib4iv; - PFNGLVERTEXATTRIB4SPROC VertexAttrib4s; - PFNGLVERTEXATTRIB4SVPROC VertexAttrib4sv; - PFNGLVERTEXATTRIB4UBVPROC VertexAttrib4ubv; - PFNGLVERTEXATTRIB4UIVPROC VertexAttrib4uiv; - PFNGLVERTEXATTRIB4USVPROC VertexAttrib4usv; - PFNGLVERTEXATTRIBBINDINGPROC VertexAttribBinding; - PFNGLVERTEXATTRIBDIVISORPROC VertexAttribDivisor; - PFNGLVERTEXATTRIBFORMATPROC VertexAttribFormat; - PFNGLVERTEXATTRIBI1IPROC VertexAttribI1i; - PFNGLVERTEXATTRIBI1IVPROC VertexAttribI1iv; - PFNGLVERTEXATTRIBI1UIPROC VertexAttribI1ui; - PFNGLVERTEXATTRIBI1UIVPROC VertexAttribI1uiv; - PFNGLVERTEXATTRIBI2IPROC VertexAttribI2i; - PFNGLVERTEXATTRIBI2IVPROC VertexAttribI2iv; - PFNGLVERTEXATTRIBI2UIPROC VertexAttribI2ui; - PFNGLVERTEXATTRIBI2UIVPROC VertexAttribI2uiv; - PFNGLVERTEXATTRIBI3IPROC VertexAttribI3i; - PFNGLVERTEXATTRIBI3IVPROC VertexAttribI3iv; - PFNGLVERTEXATTRIBI3UIPROC VertexAttribI3ui; - PFNGLVERTEXATTRIBI3UIVPROC VertexAttribI3uiv; - PFNGLVERTEXATTRIBI4BVPROC VertexAttribI4bv; - PFNGLVERTEXATTRIBI4IPROC VertexAttribI4i; - PFNGLVERTEXATTRIBI4IVPROC VertexAttribI4iv; - PFNGLVERTEXATTRIBI4SVPROC VertexAttribI4sv; - PFNGLVERTEXATTRIBI4UBVPROC VertexAttribI4ubv; - PFNGLVERTEXATTRIBI4UIPROC VertexAttribI4ui; - PFNGLVERTEXATTRIBI4UIVPROC VertexAttribI4uiv; - PFNGLVERTEXATTRIBI4USVPROC VertexAttribI4usv; - PFNGLVERTEXATTRIBIFORMATPROC VertexAttribIFormat; - PFNGLVERTEXATTRIBIPOINTERPROC VertexAttribIPointer; - PFNGLVERTEXATTRIBL1DPROC VertexAttribL1d; - PFNGLVERTEXATTRIBL1DVPROC VertexAttribL1dv; - PFNGLVERTEXATTRIBL2DPROC VertexAttribL2d; - PFNGLVERTEXATTRIBL2DVPROC VertexAttribL2dv; - PFNGLVERTEXATTRIBL3DPROC VertexAttribL3d; - PFNGLVERTEXATTRIBL3DVPROC VertexAttribL3dv; - PFNGLVERTEXATTRIBL4DPROC VertexAttribL4d; - PFNGLVERTEXATTRIBL4DVPROC VertexAttribL4dv; - PFNGLVERTEXATTRIBLFORMATPROC VertexAttribLFormat; - PFNGLVERTEXATTRIBLPOINTERPROC VertexAttribLPointer; - PFNGLVERTEXATTRIBP1UIPROC VertexAttribP1ui; - PFNGLVERTEXATTRIBP1UIVPROC VertexAttribP1uiv; - PFNGLVERTEXATTRIBP2UIPROC VertexAttribP2ui; - PFNGLVERTEXATTRIBP2UIVPROC VertexAttribP2uiv; - PFNGLVERTEXATTRIBP3UIPROC VertexAttribP3ui; - PFNGLVERTEXATTRIBP3UIVPROC VertexAttribP3uiv; - PFNGLVERTEXATTRIBP4UIPROC VertexAttribP4ui; - PFNGLVERTEXATTRIBP4UIVPROC VertexAttribP4uiv; - PFNGLVERTEXATTRIBPOINTERPROC VertexAttribPointer; - PFNGLVERTEXBINDINGDIVISORPROC VertexBindingDivisor; - PFNGLVIEWPORTPROC Viewport; - PFNGLVIEWPORTARRAYVPROC ViewportArrayv; - PFNGLVIEWPORTINDEXEDFPROC ViewportIndexedf; - PFNGLVIEWPORTINDEXEDFVPROC ViewportIndexedfv; - PFNGLWAITSYNCPROC WaitSync; - -} GladGLContext; - -#ifdef __cplusplus -} -#endif -#endif +/* clang-format off */ + + +/** + * Loader generated by glad 2.0.5 on Fri Feb 16 00:51:02 2024 + * + * SPDX-License-Identifier: (WTFPL OR CC0-1.0) AND Apache-2.0 + * + * Generator: C/C++ + * Specification: gl + * Extensions: 619 + * + * APIs: + * - gl:core=4.6 + * + * Options: + * - ALIAS = False + * - DEBUG = False + * - HEADER_ONLY = False + * - LOADER = False + * - MX = True + * - ON_DEMAND = False + * + * Commandline: + * --api='gl:core=4.6' --extensions='GL_3DFX_multisample,GL_3DFX_tbuffer,GL_3DFX_texture_compression_FXT1,GL_AMD_blend_minmax_factor,GL_AMD_conservative_depth,GL_AMD_debug_output,GL_AMD_depth_clamp_separate,GL_AMD_draw_buffers_blend,GL_AMD_framebuffer_multisample_advanced,GL_AMD_framebuffer_sample_positions,GL_AMD_gcn_shader,GL_AMD_gpu_shader_half_float,GL_AMD_gpu_shader_int16,GL_AMD_gpu_shader_int64,GL_AMD_interleaved_elements,GL_AMD_multi_draw_indirect,GL_AMD_name_gen_delete,GL_AMD_occlusion_query_event,GL_AMD_performance_monitor,GL_AMD_pinned_memory,GL_AMD_query_buffer_object,GL_AMD_sample_positions,GL_AMD_seamless_cubemap_per_texture,GL_AMD_shader_atomic_counter_ops,GL_AMD_shader_ballot,GL_AMD_shader_explicit_vertex_parameter,GL_AMD_shader_gpu_shader_half_float_fetch,GL_AMD_shader_image_load_store_lod,GL_AMD_shader_stencil_export,GL_AMD_shader_trinary_minmax,GL_AMD_sparse_texture,GL_AMD_stencil_operation_extended,GL_AMD_texture_gather_bias_lod,GL_AMD_texture_texture4,GL_AMD_transform_feedback3_lines_triangles,GL_AMD_transform_feedback4,GL_AMD_vertex_shader_layer,GL_AMD_vertex_shader_tessellator,GL_AMD_vertex_shader_viewport_index,GL_APPLE_aux_depth_stencil,GL_APPLE_client_storage,GL_APPLE_element_array,GL_APPLE_fence,GL_APPLE_float_pixels,GL_APPLE_flush_buffer_range,GL_APPLE_object_purgeable,GL_APPLE_rgb_422,GL_APPLE_row_bytes,GL_APPLE_specular_vector,GL_APPLE_texture_range,GL_APPLE_transform_hint,GL_APPLE_vertex_array_object,GL_APPLE_vertex_array_range,GL_APPLE_vertex_program_evaluators,GL_APPLE_ycbcr_422,GL_ARB_ES2_compatibility,GL_ARB_ES3_1_compatibility,GL_ARB_ES3_2_compatibility,GL_ARB_ES3_compatibility,GL_ARB_arrays_of_arrays,GL_ARB_base_instance,GL_ARB_bindless_texture,GL_ARB_blend_func_extended,GL_ARB_buffer_storage,GL_ARB_cl_event,GL_ARB_clear_buffer_object,GL_ARB_clear_texture,GL_ARB_clip_control,GL_ARB_color_buffer_float,GL_ARB_compatibility,GL_ARB_compressed_texture_pixel_storage,GL_ARB_compute_shader,GL_ARB_compute_variable_group_size,GL_ARB_conditional_render_inverted,GL_ARB_conservative_depth,GL_ARB_copy_buffer,GL_ARB_copy_image,GL_ARB_cull_distance,GL_ARB_debug_output,GL_ARB_depth_buffer_float,GL_ARB_depth_clamp,GL_ARB_depth_texture,GL_ARB_derivative_control,GL_ARB_direct_state_access,GL_ARB_draw_buffers,GL_ARB_draw_buffers_blend,GL_ARB_draw_elements_base_vertex,GL_ARB_draw_indirect,GL_ARB_draw_instanced,GL_ARB_enhanced_layouts,GL_ARB_explicit_attrib_location,GL_ARB_explicit_uniform_location,GL_ARB_fragment_coord_conventions,GL_ARB_fragment_layer_viewport,GL_ARB_fragment_program,GL_ARB_fragment_program_shadow,GL_ARB_fragment_shader,GL_ARB_fragment_shader_interlock,GL_ARB_framebuffer_no_attachments,GL_ARB_framebuffer_object,GL_ARB_framebuffer_sRGB,GL_ARB_geometry_shader4,GL_ARB_get_program_binary,GL_ARB_get_texture_sub_image,GL_ARB_gl_spirv,GL_ARB_gpu_shader5,GL_ARB_gpu_shader_fp64,GL_ARB_gpu_shader_int64,GL_ARB_half_float_pixel,GL_ARB_half_float_vertex,GL_ARB_imaging,GL_ARB_indirect_parameters,GL_ARB_instanced_arrays,GL_ARB_internalformat_query,GL_ARB_internalformat_query2,GL_ARB_invalidate_subdata,GL_ARB_map_buffer_alignment,GL_ARB_map_buffer_range,GL_ARB_matrix_palette,GL_ARB_multi_bind,GL_ARB_multi_draw_indirect,GL_ARB_multisample,GL_ARB_multitexture,GL_ARB_occlusion_query,GL_ARB_occlusion_query2,GL_ARB_parallel_shader_compile,GL_ARB_pipeline_statistics_query,GL_ARB_pixel_buffer_object,GL_ARB_point_parameters,GL_ARB_point_sprite,GL_ARB_polygon_offset_clamp,GL_ARB_post_depth_coverage,GL_ARB_program_interface_query,GL_ARB_provoking_vertex,GL_ARB_query_buffer_object,GL_ARB_robust_buffer_access_behavior,GL_ARB_robustness,GL_ARB_robustness_isolation,GL_ARB_sample_locations,GL_ARB_sample_shading,GL_ARB_sampler_objects,GL_ARB_seamless_cube_map,GL_ARB_seamless_cubemap_per_texture,GL_ARB_separate_shader_objects,GL_ARB_shader_atomic_counter_ops,GL_ARB_shader_atomic_counters,GL_ARB_shader_ballot,GL_ARB_shader_bit_encoding,GL_ARB_shader_clock,GL_ARB_shader_draw_parameters,GL_ARB_shader_group_vote,GL_ARB_shader_image_load_store,GL_ARB_shader_image_size,GL_ARB_shader_objects,GL_ARB_shader_precision,GL_ARB_shader_stencil_export,GL_ARB_shader_storage_buffer_object,GL_ARB_shader_subroutine,GL_ARB_shader_texture_image_samples,GL_ARB_shader_texture_lod,GL_ARB_shader_viewport_layer_array,GL_ARB_shading_language_100,GL_ARB_shading_language_420pack,GL_ARB_shading_language_include,GL_ARB_shading_language_packing,GL_ARB_shadow,GL_ARB_shadow_ambient,GL_ARB_sparse_buffer,GL_ARB_sparse_texture,GL_ARB_sparse_texture2,GL_ARB_sparse_texture_clamp,GL_ARB_spirv_extensions,GL_ARB_stencil_texturing,GL_ARB_sync,GL_ARB_tessellation_shader,GL_ARB_texture_barrier,GL_ARB_texture_border_clamp,GL_ARB_texture_buffer_object,GL_ARB_texture_buffer_object_rgb32,GL_ARB_texture_buffer_range,GL_ARB_texture_compression,GL_ARB_texture_compression_bptc,GL_ARB_texture_compression_rgtc,GL_ARB_texture_cube_map,GL_ARB_texture_cube_map_array,GL_ARB_texture_env_add,GL_ARB_texture_env_combine,GL_ARB_texture_env_crossbar,GL_ARB_texture_env_dot3,GL_ARB_texture_filter_anisotropic,GL_ARB_texture_filter_minmax,GL_ARB_texture_float,GL_ARB_texture_gather,GL_ARB_texture_mirror_clamp_to_edge,GL_ARB_texture_mirrored_repeat,GL_ARB_texture_multisample,GL_ARB_texture_non_power_of_two,GL_ARB_texture_query_levels,GL_ARB_texture_query_lod,GL_ARB_texture_rectangle,GL_ARB_texture_rg,GL_ARB_texture_rgb10_a2ui,GL_ARB_texture_stencil8,GL_ARB_texture_storage,GL_ARB_texture_storage_multisample,GL_ARB_texture_swizzle,GL_ARB_texture_view,GL_ARB_timer_query,GL_ARB_transform_feedback2,GL_ARB_transform_feedback3,GL_ARB_transform_feedback_instanced,GL_ARB_transform_feedback_overflow_query,GL_ARB_transpose_matrix,GL_ARB_uniform_buffer_object,GL_ARB_vertex_array_bgra,GL_ARB_vertex_array_object,GL_ARB_vertex_attrib_64bit,GL_ARB_vertex_attrib_binding,GL_ARB_vertex_blend,GL_ARB_vertex_buffer_object,GL_ARB_vertex_program,GL_ARB_vertex_shader,GL_ARB_vertex_type_10f_11f_11f_rev,GL_ARB_vertex_type_2_10_10_10_rev,GL_ARB_viewport_array,GL_ARB_window_pos,GL_ATI_draw_buffers,GL_ATI_element_array,GL_ATI_envmap_bumpmap,GL_ATI_fragment_shader,GL_ATI_map_object_buffer,GL_ATI_meminfo,GL_ATI_pixel_format_float,GL_ATI_pn_triangles,GL_ATI_separate_stencil,GL_ATI_text_fragment_shader,GL_ATI_texture_env_combine3,GL_ATI_texture_float,GL_ATI_texture_mirror_once,GL_ATI_vertex_array_object,GL_ATI_vertex_attrib_array_object,GL_ATI_vertex_streams,GL_EXT_422_pixels,GL_EXT_EGL_image_storage,GL_EXT_EGL_sync,GL_EXT_abgr,GL_EXT_bgra,GL_EXT_bindable_uniform,GL_EXT_blend_color,GL_EXT_blend_equation_separate,GL_EXT_blend_func_separate,GL_EXT_blend_logic_op,GL_EXT_blend_minmax,GL_EXT_blend_subtract,GL_EXT_clip_volume_hint,GL_EXT_cmyka,GL_EXT_color_subtable,GL_EXT_compiled_vertex_array,GL_EXT_convolution,GL_EXT_coordinate_frame,GL_EXT_copy_texture,GL_EXT_cull_vertex,GL_EXT_debug_label,GL_EXT_debug_marker,GL_EXT_depth_bounds_test,GL_EXT_direct_state_access,GL_EXT_draw_buffers2,GL_EXT_draw_instanced,GL_EXT_draw_range_elements,GL_EXT_external_buffer,GL_EXT_fog_coord,GL_EXT_framebuffer_blit,GL_EXT_framebuffer_blit_layers,GL_EXT_framebuffer_multisample,GL_EXT_framebuffer_multisample_blit_scaled,GL_EXT_framebuffer_object,GL_EXT_framebuffer_sRGB,GL_EXT_geometry_shader4,GL_EXT_gpu_program_parameters,GL_EXT_gpu_shader4,GL_EXT_histogram,GL_EXT_index_array_formats,GL_EXT_index_func,GL_EXT_index_material,GL_EXT_index_texture,GL_EXT_light_texture,GL_EXT_memory_object,GL_EXT_memory_object_fd,GL_EXT_memory_object_win32,GL_EXT_misc_attribute,GL_EXT_multi_draw_arrays,GL_EXT_multisample,GL_EXT_multiview_tessellation_geometry_shader,GL_EXT_multiview_texture_multisample,GL_EXT_multiview_timer_query,GL_EXT_packed_depth_stencil,GL_EXT_packed_float,GL_EXT_packed_pixels,GL_EXT_paletted_texture,GL_EXT_pixel_buffer_object,GL_EXT_pixel_transform,GL_EXT_pixel_transform_color_table,GL_EXT_point_parameters,GL_EXT_polygon_offset,GL_EXT_polygon_offset_clamp,GL_EXT_post_depth_coverage,GL_EXT_provoking_vertex,GL_EXT_raster_multisample,GL_EXT_rescale_normal,GL_EXT_secondary_color,GL_EXT_semaphore,GL_EXT_semaphore_fd,GL_EXT_semaphore_win32,GL_EXT_separate_shader_objects,GL_EXT_separate_specular_color,GL_EXT_shader_framebuffer_fetch,GL_EXT_shader_framebuffer_fetch_non_coherent,GL_EXT_shader_image_load_formatted,GL_EXT_shader_image_load_store,GL_EXT_shader_integer_mix,GL_EXT_shader_samples_identical,GL_EXT_shadow_funcs,GL_EXT_shared_texture_palette,GL_EXT_sparse_texture2,GL_EXT_stencil_clear_tag,GL_EXT_stencil_two_side,GL_EXT_stencil_wrap,GL_EXT_subtexture,GL_EXT_texture,GL_EXT_texture3D,GL_EXT_texture_array,GL_EXT_texture_buffer_object,GL_EXT_texture_compression_latc,GL_EXT_texture_compression_rgtc,GL_EXT_texture_compression_s3tc,GL_EXT_texture_cube_map,GL_EXT_texture_env_add,GL_EXT_texture_env_combine,GL_EXT_texture_env_dot3,GL_EXT_texture_filter_anisotropic,GL_EXT_texture_filter_minmax,GL_EXT_texture_integer,GL_EXT_texture_lod_bias,GL_EXT_texture_mirror_clamp,GL_EXT_texture_object,GL_EXT_texture_perturb_normal,GL_EXT_texture_sRGB,GL_EXT_texture_sRGB_R8,GL_EXT_texture_sRGB_RG8,GL_EXT_texture_sRGB_decode,GL_EXT_texture_shadow_lod,GL_EXT_texture_shared_exponent,GL_EXT_texture_snorm,GL_EXT_texture_storage,GL_EXT_texture_swizzle,GL_EXT_timer_query,GL_EXT_transform_feedback,GL_EXT_vertex_array,GL_EXT_vertex_array_bgra,GL_EXT_vertex_attrib_64bit,GL_EXT_vertex_shader,GL_EXT_vertex_weighting,GL_EXT_win32_keyed_mutex,GL_EXT_window_rectangles,GL_EXT_x11_sync_object,GL_GREMEDY_frame_terminator,GL_GREMEDY_string_marker,GL_HP_convolution_border_modes,GL_HP_image_transform,GL_HP_occlusion_test,GL_HP_texture_lighting,GL_IBM_cull_vertex,GL_IBM_multimode_draw_arrays,GL_IBM_rasterpos_clip,GL_IBM_static_data,GL_IBM_texture_mirrored_repeat,GL_IBM_vertex_array_lists,GL_INGR_blend_func_separate,GL_INGR_color_clamp,GL_INGR_interlace_read,GL_INTEL_blackhole_render,GL_INTEL_conservative_rasterization,GL_INTEL_fragment_shader_ordering,GL_INTEL_framebuffer_CMAA,GL_INTEL_map_texture,GL_INTEL_parallel_arrays,GL_INTEL_performance_query,GL_KHR_blend_equation_advanced,GL_KHR_blend_equation_advanced_coherent,GL_KHR_context_flush_control,GL_KHR_debug,GL_KHR_no_error,GL_KHR_parallel_shader_compile,GL_KHR_robust_buffer_access_behavior,GL_KHR_robustness,GL_KHR_shader_subgroup,GL_KHR_texture_compression_astc_hdr,GL_KHR_texture_compression_astc_ldr,GL_KHR_texture_compression_astc_sliced_3d,GL_MESAX_texture_stack,GL_MESA_framebuffer_flip_x,GL_MESA_framebuffer_flip_y,GL_MESA_framebuffer_swap_xy,GL_MESA_pack_invert,GL_MESA_program_binary_formats,GL_MESA_resize_buffers,GL_MESA_shader_integer_functions,GL_MESA_tile_raster_order,GL_MESA_window_pos,GL_MESA_ycbcr_texture,GL_NVX_blend_equation_advanced_multi_draw_buffers,GL_NVX_conditional_render,GL_NVX_gpu_memory_info,GL_NVX_gpu_multicast2,GL_NVX_linked_gpu_multicast,GL_NVX_progress_fence,GL_NV_alpha_to_coverage_dither_control,GL_NV_bindless_multi_draw_indirect,GL_NV_bindless_multi_draw_indirect_count,GL_NV_bindless_texture,GL_NV_blend_equation_advanced,GL_NV_blend_equation_advanced_coherent,GL_NV_blend_minmax_factor,GL_NV_blend_square,GL_NV_clip_space_w_scaling,GL_NV_command_list,GL_NV_compute_program5,GL_NV_compute_shader_derivatives,GL_NV_conditional_render,GL_NV_conservative_raster,GL_NV_conservative_raster_dilate,GL_NV_conservative_raster_pre_snap,GL_NV_conservative_raster_pre_snap_triangles,GL_NV_conservative_raster_underestimation,GL_NV_copy_depth_to_color,GL_NV_copy_image,GL_NV_deep_texture3D,GL_NV_depth_buffer_float,GL_NV_depth_clamp,GL_NV_draw_texture,GL_NV_draw_vulkan_image,GL_NV_evaluators,GL_NV_explicit_multisample,GL_NV_fence,GL_NV_fill_rectangle,GL_NV_float_buffer,GL_NV_fog_distance,GL_NV_fragment_coverage_to_color,GL_NV_fragment_program,GL_NV_fragment_program2,GL_NV_fragment_program4,GL_NV_fragment_program_option,GL_NV_fragment_shader_barycentric,GL_NV_fragment_shader_interlock,GL_NV_framebuffer_mixed_samples,GL_NV_framebuffer_multisample_coverage,GL_NV_geometry_program4,GL_NV_geometry_shader4,GL_NV_geometry_shader_passthrough,GL_NV_gpu_multicast,GL_NV_gpu_program4,GL_NV_gpu_program5,GL_NV_gpu_program5_mem_extended,GL_NV_gpu_shader5,GL_NV_half_float,GL_NV_internalformat_sample_query,GL_NV_light_max_exponent,GL_NV_memory_attachment,GL_NV_memory_object_sparse,GL_NV_mesh_shader,GL_NV_multisample_coverage,GL_NV_multisample_filter_hint,GL_NV_occlusion_query,GL_NV_packed_depth_stencil,GL_NV_parameter_buffer_object,GL_NV_parameter_buffer_object2,GL_NV_path_rendering,GL_NV_path_rendering_shared_edge,GL_NV_pixel_data_range,GL_NV_point_sprite,GL_NV_present_video,GL_NV_primitive_restart,GL_NV_primitive_shading_rate,GL_NV_query_resource,GL_NV_query_resource_tag,GL_NV_register_combiners,GL_NV_register_combiners2,GL_NV_representative_fragment_test,GL_NV_robustness_video_memory_purge,GL_NV_sample_locations,GL_NV_sample_mask_override_coverage,GL_NV_scissor_exclusive,GL_NV_shader_atomic_counters,GL_NV_shader_atomic_float,GL_NV_shader_atomic_float64,GL_NV_shader_atomic_fp16_vector,GL_NV_shader_atomic_int64,GL_NV_shader_buffer_load,GL_NV_shader_buffer_store,GL_NV_shader_storage_buffer_object,GL_NV_shader_subgroup_partitioned,GL_NV_shader_texture_footprint,GL_NV_shader_thread_group,GL_NV_shader_thread_shuffle,GL_NV_shading_rate_image,GL_NV_stereo_view_rendering,GL_NV_tessellation_program5,GL_NV_texgen_emboss,GL_NV_texgen_reflection,GL_NV_texture_barrier,GL_NV_texture_compression_vtc,GL_NV_texture_env_combine4,GL_NV_texture_expand_normal,GL_NV_texture_multisample,GL_NV_texture_rectangle,GL_NV_texture_rectangle_compressed,GL_NV_texture_shader,GL_NV_texture_shader2,GL_NV_texture_shader3,GL_NV_timeline_semaphore,GL_NV_transform_feedback,GL_NV_transform_feedback2,GL_NV_uniform_buffer_std430_layout,GL_NV_uniform_buffer_unified_memory,GL_NV_vdpau_interop,GL_NV_vdpau_interop2,GL_NV_vertex_array_range,GL_NV_vertex_array_range2,GL_NV_vertex_attrib_integer_64bit,GL_NV_vertex_buffer_unified_memory,GL_NV_vertex_program,GL_NV_vertex_program1_1,GL_NV_vertex_program2,GL_NV_vertex_program2_option,GL_NV_vertex_program3,GL_NV_vertex_program4,GL_NV_video_capture,GL_NV_viewport_array2,GL_NV_viewport_swizzle,GL_OES_byte_coordinates,GL_OES_compressed_paletted_texture,GL_OES_fixed_point,GL_OES_query_matrix,GL_OES_read_format,GL_OES_single_precision,GL_OML_interlace,GL_OML_resample,GL_OML_subsample,GL_OVR_multiview,GL_OVR_multiview2,GL_PGI_misc_hints,GL_PGI_vertex_hints,GL_REND_screen_coordinates,GL_S3_s3tc,GL_SGIS_detail_texture,GL_SGIS_fog_function,GL_SGIS_generate_mipmap,GL_SGIS_multisample,GL_SGIS_pixel_texture,GL_SGIS_point_line_texgen,GL_SGIS_point_parameters,GL_SGIS_sharpen_texture,GL_SGIS_texture4D,GL_SGIS_texture_border_clamp,GL_SGIS_texture_color_mask,GL_SGIS_texture_edge_clamp,GL_SGIS_texture_filter4,GL_SGIS_texture_lod,GL_SGIS_texture_select,GL_SGIX_async,GL_SGIX_async_histogram,GL_SGIX_async_pixel,GL_SGIX_blend_alpha_minmax,GL_SGIX_calligraphic_fragment,GL_SGIX_clipmap,GL_SGIX_convolution_accuracy,GL_SGIX_depth_pass_instrument,GL_SGIX_depth_texture,GL_SGIX_flush_raster,GL_SGIX_fog_offset,GL_SGIX_fragment_lighting,GL_SGIX_framezoom,GL_SGIX_igloo_interface,GL_SGIX_instruments,GL_SGIX_interlace,GL_SGIX_ir_instrument1,GL_SGIX_list_priority,GL_SGIX_pixel_texture,GL_SGIX_pixel_tiles,GL_SGIX_polynomial_ffd,GL_SGIX_reference_plane,GL_SGIX_resample,GL_SGIX_scalebias_hint,GL_SGIX_shadow,GL_SGIX_shadow_ambient,GL_SGIX_sprite,GL_SGIX_subsample,GL_SGIX_tag_sample_buffer,GL_SGIX_texture_add_env,GL_SGIX_texture_coordinate_clamp,GL_SGIX_texture_lod_bias,GL_SGIX_texture_multi_buffer,GL_SGIX_texture_scale_bias,GL_SGIX_vertex_preclip,GL_SGIX_ycrcb,GL_SGIX_ycrcb_subsample,GL_SGIX_ycrcba,GL_SGI_color_matrix,GL_SGI_color_table,GL_SGI_texture_color_table,GL_SUNX_constant_data,GL_SUN_convolution_border_modes,GL_SUN_global_alpha,GL_SUN_mesh_array,GL_SUN_slice_accum,GL_SUN_triangle_list,GL_SUN_vertex,GL_WIN_phong_shading,GL_WIN_specular_fog' c --mx + * + * Online: + * http://glad.sh/#api=gl%3Acore%3D4.6&generator=c&options=MX + * + */ + +#ifndef GLAD_GL_H_ +#define GLAD_GL_H_ + +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreserved-id-macro" +#endif +#ifdef __gl_h_ +#error OpenGL (gl.h) header already included (API: gl), remove previous include! +#endif +#define __gl_h_ 1 +#ifdef __gl3_h_ +#error OpenGL (gl3.h) header already included (API: gl), remove previous include! +#endif +#define __gl3_h_ 1 +#ifdef __glext_h_ +#error OpenGL (glext.h) header already included (API: gl), remove previous include! +#endif +#define __glext_h_ 1 +#ifdef __gl3ext_h_ +#error OpenGL (gl3ext.h) header already included (API: gl), remove previous include! +#endif +#define __gl3ext_h_ 1 +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + +#define GLAD_GL +#define GLAD_OPTION_GL_MX + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef GLAD_PLATFORM_H_ +#define GLAD_PLATFORM_H_ + +#ifndef GLAD_PLATFORM_WIN32 +#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__) +#define GLAD_PLATFORM_WIN32 1 +#else +#define GLAD_PLATFORM_WIN32 0 +#endif +#endif + +#ifndef GLAD_PLATFORM_APPLE +#ifdef __APPLE__ +#define GLAD_PLATFORM_APPLE 1 +#else +#define GLAD_PLATFORM_APPLE 0 +#endif +#endif + +#ifndef GLAD_PLATFORM_EMSCRIPTEN +#ifdef __EMSCRIPTEN__ +#define GLAD_PLATFORM_EMSCRIPTEN 1 +#else +#define GLAD_PLATFORM_EMSCRIPTEN 0 +#endif +#endif + +#ifndef GLAD_PLATFORM_UWP +#if defined(_MSC_VER) && !defined(GLAD_INTERNAL_HAVE_WINAPIFAMILY) +#ifdef __has_include +#if __has_include() +#define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1 +#endif +#elif _MSC_VER >= 1700 && !_USING_V110_SDK71_ +#define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1 +#endif +#endif + +#ifdef GLAD_INTERNAL_HAVE_WINAPIFAMILY +#include +#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && \ + WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) +#define GLAD_PLATFORM_UWP 1 +#endif +#endif + +#ifndef GLAD_PLATFORM_UWP +#define GLAD_PLATFORM_UWP 0 +#endif +#endif + +#ifdef __GNUC__ +#define GLAD_GNUC_EXTENSION __extension__ +#else +#define GLAD_GNUC_EXTENSION +#endif + +#define GLAD_UNUSED(x) (void)(x) + +#ifndef GLAD_API_CALL +#if defined(GLAD_API_CALL_EXPORT) +#if GLAD_PLATFORM_WIN32 || defined(__CYGWIN__) +#if defined(GLAD_API_CALL_EXPORT_BUILD) +#if defined(__GNUC__) +#define GLAD_API_CALL __attribute__((dllexport)) extern +#else +#define GLAD_API_CALL __declspec(dllexport) extern +#endif +#else +#if defined(__GNUC__) +#define GLAD_API_CALL __attribute__((dllimport)) extern +#else +#define GLAD_API_CALL __declspec(dllimport) extern +#endif +#endif +#elif defined(__GNUC__) && defined(GLAD_API_CALL_EXPORT_BUILD) +#define GLAD_API_CALL __attribute__((visibility("default"))) extern +#else +#define GLAD_API_CALL extern +#endif +#else +#define GLAD_API_CALL extern +#endif +#endif + +#ifdef APIENTRY +#define GLAD_API_PTR APIENTRY +#elif GLAD_PLATFORM_WIN32 +#define GLAD_API_PTR __stdcall +#else +#define GLAD_API_PTR +#endif + +#ifndef GLAPI +#define GLAPI GLAD_API_CALL +#endif + +#ifndef GLAPIENTRY +#define GLAPIENTRY GLAD_API_PTR +#endif + +#define GLAD_MAKE_VERSION(major, minor) (major * 10000 + minor) +#define GLAD_VERSION_MAJOR(version) (version / 10000) +#define GLAD_VERSION_MINOR(version) (version % 10000) + +#define GLAD_GENERATOR_VERSION "2.0.5" + +typedef void (*GLADapiproc)(void); + +typedef GLADapiproc (*GLADloadfunc)(const char *name); +typedef GLADapiproc (*GLADuserptrloadfunc)(void *userptr, const char *name); + +typedef void (*GLADprecallback)(const char *name, GLADapiproc apiproc, int len_args, ...); +typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apiproc, int len_args, + ...); + +#endif /* GLAD_PLATFORM_H_ */ + +#define GL_1PASS_EXT 0x80A1 +#define GL_1PASS_SGIS 0x80A1 +#define GL_2PASS_0_EXT 0x80A2 +#define GL_2PASS_0_SGIS 0x80A2 +#define GL_2PASS_1_EXT 0x80A3 +#define GL_2PASS_1_SGIS 0x80A3 +#define GL_2X_BIT_ATI 0x00000001 +#define GL_422_AVERAGE_EXT 0x80CE +#define GL_422_EXT 0x80CC +#define GL_422_REV_AVERAGE_EXT 0x80CF +#define GL_422_REV_EXT 0x80CD +#define GL_4PASS_0_EXT 0x80A4 +#define GL_4PASS_0_SGIS 0x80A4 +#define GL_4PASS_1_EXT 0x80A5 +#define GL_4PASS_1_SGIS 0x80A5 +#define GL_4PASS_2_EXT 0x80A6 +#define GL_4PASS_2_SGIS 0x80A6 +#define GL_4PASS_3_EXT 0x80A7 +#define GL_4PASS_3_SGIS 0x80A7 +#define GL_4X_BIT_ATI 0x00000002 +#define GL_8X_BIT_ATI 0x00000004 +#define GL_ABGR_EXT 0x8000 +#define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD +#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9 +#define GL_ACTIVE_ATTRIBUTES 0x8B89 +#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A +#define GL_ACTIVE_PROGRAM 0x8259 +#define GL_ACTIVE_PROGRAM_EXT 0x8B8D +#define GL_ACTIVE_RESOURCES 0x92F5 +#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911 +#define GL_ACTIVE_SUBROUTINES 0x8DE5 +#define GL_ACTIVE_SUBROUTINE_MAX_LENGTH 0x8E48 +#define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6 +#define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47 +#define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49 +#define GL_ACTIVE_TEXTURE 0x84E0 +#define GL_ACTIVE_TEXTURE_ARB 0x84E0 +#define GL_ACTIVE_UNIFORMS 0x8B86 +#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 +#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 +#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 +#define GL_ACTIVE_VARIABLES 0x9305 +#define GL_ACTIVE_VARYINGS_NV 0x8C81 +#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82 +#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5 +#define GL_ADD_ATI 0x8963 +#define GL_ADD_SIGNED_ARB 0x8574 +#define GL_ADD_SIGNED_EXT 0x8574 +#define GL_ADJACENT_PAIRS_NV 0x90AE +#define GL_AFFINE_2D_NV 0x9092 +#define GL_AFFINE_3D_NV 0x9094 +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210 +#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211 +#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E +#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F +#define GL_ALL_BARRIER_BITS 0xFFFFFFFF +#define GL_ALL_BARRIER_BITS_EXT 0xFFFFFFFF +#define GL_ALL_COMPLETED_NV 0x84F2 +#define GL_ALL_PIXELS_AMD 0xFFFFFFFF +#define GL_ALL_SHADER_BITS 0xFFFFFFFF +#define GL_ALL_STATIC_DATA_IBM 103060 +#define GL_ALPHA 0x1906 +#define GL_ALPHA12_EXT 0x803D +#define GL_ALPHA16F_ARB 0x881C +#define GL_ALPHA16F_EXT 0x881C +#define GL_ALPHA16I_EXT 0x8D8A +#define GL_ALPHA16UI_EXT 0x8D78 +#define GL_ALPHA16_EXT 0x803E +#define GL_ALPHA16_SNORM 0x9018 +#define GL_ALPHA32F_ARB 0x8816 +#define GL_ALPHA32F_EXT 0x8816 +#define GL_ALPHA32I_EXT 0x8D84 +#define GL_ALPHA32UI_EXT 0x8D72 +#define GL_ALPHA4_EXT 0x803B +#define GL_ALPHA8I_EXT 0x8D90 +#define GL_ALPHA8UI_EXT 0x8D7E +#define GL_ALPHA8_EXT 0x803C +#define GL_ALPHA8_SNORM 0x9014 +#define GL_ALPHA_FLOAT16_APPLE 0x881C +#define GL_ALPHA_FLOAT16_ATI 0x881C +#define GL_ALPHA_FLOAT32_APPLE 0x8816 +#define GL_ALPHA_FLOAT32_ATI 0x8816 +#define GL_ALPHA_INTEGER_EXT 0x8D97 +#define GL_ALPHA_MAX_CLAMP_INGR 0x8567 +#define GL_ALPHA_MAX_SGIX 0x8321 +#define GL_ALPHA_MIN_CLAMP_INGR 0x8563 +#define GL_ALPHA_MIN_SGIX 0x8320 +#define GL_ALPHA_REF_COMMAND_NV 0x000F +#define GL_ALPHA_SNORM 0x9010 +#define GL_ALPHA_TO_COVERAGE_DITHER_DEFAULT_NV 0x934D +#define GL_ALPHA_TO_COVERAGE_DITHER_DISABLE_NV 0x934F +#define GL_ALPHA_TO_COVERAGE_DITHER_ENABLE_NV 0x934E +#define GL_ALPHA_TO_COVERAGE_DITHER_MODE_NV 0x92BF +#define GL_ALREADY_SIGNALED 0x911A +#define GL_ALWAYS 0x0207 +#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C +#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D +#define GL_AND 0x1501 +#define GL_AND_INVERTED 0x1504 +#define GL_AND_REVERSE 0x1502 +#define GL_ANY_SAMPLES_PASSED 0x8C2F +#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A +#define GL_ARC_TO_NV 0xFE +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ARRAY_BUFFER_ARB 0x8892 +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894 +#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9 +#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8 +#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766 +#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767 +#define GL_ARRAY_SIZE 0x92FB +#define GL_ARRAY_STRIDE 0x92FE +#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D +#define GL_ASYNC_HISTOGRAM_SGIX 0x832C +#define GL_ASYNC_MARKER_SGIX 0x8329 +#define GL_ASYNC_READ_PIXELS_SGIX 0x835E +#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C +#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000 +#define GL_ATOMIC_COUNTER_BARRIER_BIT_EXT 0x00001000 +#define GL_ATOMIC_COUNTER_BUFFER 0x92C0 +#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5 +#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6 +#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1 +#define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4 +#define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301 +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_MESH_SHADER_NV 0x959E +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TASK_SHADER_NV 0x959F +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8 +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9 +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7 +#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3 +#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2 +#define GL_ATTACHED_MEMORY_OBJECT_NV 0x95A4 +#define GL_ATTACHED_MEMORY_OFFSET_NV 0x95A5 +#define GL_ATTACHED_SHADERS 0x8B85 +#define GL_ATTENUATION_EXT 0x834D +#define GL_ATTRIBUTE_ADDRESS_COMMAND_NV 0x0009 +#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645 +#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623 +#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624 +#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625 +#define GL_AUTO_GENERATE_MIPMAP 0x8295 +#define GL_AUX_DEPTH_STENCIL_APPLE 0x8A14 +#define GL_AVERAGE_EXT 0x8335 +#define GL_AVERAGE_HP 0x8160 +#define GL_BACK 0x0405 +#define GL_BACK_LEFT 0x0402 +#define GL_BACK_NORMALS_HINT_PGI 0x1A223 +#define GL_BACK_PRIMARY_COLOR_NV 0x8C77 +#define GL_BACK_RIGHT 0x0403 +#define GL_BACK_SECONDARY_COLOR_NV 0x8C78 +#define GL_BEVEL_NV 0x90A6 +#define GL_BGR 0x80E0 +#define GL_BGRA 0x80E1 +#define GL_BGRA8_EXT 0x93A1 +#define GL_BGRA_EXT 0x80E1 +#define GL_BGRA_INTEGER 0x8D9B +#define GL_BGRA_INTEGER_EXT 0x8D9B +#define GL_BGR_EXT 0x80E0 +#define GL_BGR_INTEGER 0x8D9A +#define GL_BGR_INTEGER_EXT 0x8D9A +#define GL_BIAS_BIT_ATI 0x00000008 +#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541 +#define GL_BINORMAL_ARRAY_EXT 0x843A +#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443 +#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441 +#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440 +#define GL_BLACKHOLE_RENDER_INTEL 0x83FC +#define GL_BLEND 0x0BE2 +#define GL_BLEND_ADVANCED_COHERENT_KHR 0x9285 +#define GL_BLEND_ADVANCED_COHERENT_NV 0x9285 +#define GL_BLEND_COLOR 0x8005 +#define GL_BLEND_COLOR_COMMAND_NV 0x000B +#define GL_BLEND_COLOR_EXT 0x8005 +#define GL_BLEND_DST 0x0BE0 +#define GL_BLEND_DST_ALPHA 0x80CA +#define GL_BLEND_DST_ALPHA_EXT 0x80CA +#define GL_BLEND_DST_RGB 0x80C8 +#define GL_BLEND_DST_RGB_EXT 0x80C8 +#define GL_BLEND_EQUATION 0x8009 +#define GL_BLEND_EQUATION_ALPHA 0x883D +#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D +#define GL_BLEND_EQUATION_EXT 0x8009 +#define GL_BLEND_EQUATION_RGB 0x8009 +#define GL_BLEND_EQUATION_RGB_EXT 0x8009 +#define GL_BLEND_OVERLAP_NV 0x9281 +#define GL_BLEND_PREMULTIPLIED_SRC_NV 0x9280 +#define GL_BLEND_SRC 0x0BE1 +#define GL_BLEND_SRC_ALPHA 0x80CB +#define GL_BLEND_SRC_ALPHA_EXT 0x80CB +#define GL_BLEND_SRC_RGB 0x80C9 +#define GL_BLEND_SRC_RGB_EXT 0x80C9 +#define GL_BLOCK_INDEX 0x92FD +#define GL_BLUE 0x1905 +#define GL_BLUE_BIT_ATI 0x00000004 +#define GL_BLUE_INTEGER 0x8D96 +#define GL_BLUE_INTEGER_EXT 0x8D96 +#define GL_BLUE_MAX_CLAMP_INGR 0x8566 +#define GL_BLUE_MIN_CLAMP_INGR 0x8562 +#define GL_BLUE_NV 0x1905 +#define GL_BOLD_BIT_NV 0x01 +#define GL_BOOL 0x8B56 +#define GL_BOOL_ARB 0x8B56 +#define GL_BOOL_VEC2 0x8B57 +#define GL_BOOL_VEC2_ARB 0x8B57 +#define GL_BOOL_VEC3 0x8B58 +#define GL_BOOL_VEC3_ARB 0x8B58 +#define GL_BOOL_VEC4 0x8B59 +#define GL_BOOL_VEC4_ARB 0x8B59 +#define GL_BOUNDING_BOX_NV 0x908D +#define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C +#define GL_BUFFER 0x82E0 +#define GL_BUFFER_ACCESS 0x88BB +#define GL_BUFFER_ACCESS_ARB 0x88BB +#define GL_BUFFER_ACCESS_FLAGS 0x911F +#define GL_BUFFER_BINDING 0x9302 +#define GL_BUFFER_DATA_SIZE 0x9303 +#define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13 +#define GL_BUFFER_GPU_ADDRESS_NV 0x8F1D +#define GL_BUFFER_IMMUTABLE_STORAGE 0x821F +#define GL_BUFFER_MAPPED 0x88BC +#define GL_BUFFER_MAPPED_ARB 0x88BC +#define GL_BUFFER_MAP_LENGTH 0x9120 +#define GL_BUFFER_MAP_OFFSET 0x9121 +#define GL_BUFFER_MAP_POINTER 0x88BD +#define GL_BUFFER_MAP_POINTER_ARB 0x88BD +#define GL_BUFFER_OBJECT_APPLE 0x85B3 +#define GL_BUFFER_OBJECT_EXT 0x9151 +#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12 +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_SIZE_ARB 0x8764 +#define GL_BUFFER_STORAGE_FLAGS 0x8220 +#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200 +#define GL_BUFFER_UPDATE_BARRIER_BIT_EXT 0x00000200 +#define GL_BUFFER_USAGE 0x8765 +#define GL_BUFFER_USAGE_ARB 0x8765 +#define GL_BUFFER_VARIABLE 0x92E5 +#define GL_BUMP_ENVMAP_ATI 0x877B +#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777 +#define GL_BUMP_ROT_MATRIX_ATI 0x8775 +#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776 +#define GL_BUMP_TARGET_ATI 0x877C +#define GL_BUMP_TEX_UNITS_ATI 0x8778 +#define GL_BYTE 0x1400 +#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183 +#define GL_CAVEAT_SUPPORT 0x82B8 +#define GL_CCW 0x0901 +#define GL_CIRCULAR_CCW_ARC_TO_NV 0xF8 +#define GL_CIRCULAR_CW_ARC_TO_NV 0xFA +#define GL_CIRCULAR_TANGENT_ARC_TO_NV 0xFC +#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B +#define GL_CLAMP_READ_COLOR 0x891C +#define GL_CLAMP_READ_COLOR_ARB 0x891C +#define GL_CLAMP_TO_BORDER 0x812D +#define GL_CLAMP_TO_BORDER_ARB 0x812D +#define GL_CLAMP_TO_BORDER_SGIS 0x812D +#define GL_CLAMP_TO_EDGE 0x812F +#define GL_CLAMP_TO_EDGE_SGIS 0x812F +#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A +#define GL_CLEAR 0x1500 +#define GL_CLEAR_BUFFER 0x82B4 +#define GL_CLEAR_TEXTURE 0x9365 +#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 +#define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT 0x00004000 +#define GL_CLIENT_STORAGE_BIT 0x0200 +#define GL_CLIPPING_INPUT_PRIMITIVES 0x82F6 +#define GL_CLIPPING_INPUT_PRIMITIVES_ARB 0x82F6 +#define GL_CLIPPING_OUTPUT_PRIMITIVES 0x82F7 +#define GL_CLIPPING_OUTPUT_PRIMITIVES_ARB 0x82F7 +#define GL_CLIP_DEPTH_MODE 0x935D +#define GL_CLIP_DISTANCE0 0x3000 +#define GL_CLIP_DISTANCE1 0x3001 +#define GL_CLIP_DISTANCE2 0x3002 +#define GL_CLIP_DISTANCE3 0x3003 +#define GL_CLIP_DISTANCE4 0x3004 +#define GL_CLIP_DISTANCE5 0x3005 +#define GL_CLIP_DISTANCE6 0x3006 +#define GL_CLIP_DISTANCE7 0x3007 +#define GL_CLIP_DISTANCE_NV 0x8C7A +#define GL_CLIP_FAR_HINT_PGI 0x1A221 +#define GL_CLIP_NEAR_HINT_PGI 0x1A220 +#define GL_CLIP_ORIGIN 0x935C +#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0 +#define GL_CLOSE_PATH_NV 0x00 +#define GL_CMYKA_EXT 0x800D +#define GL_CMYK_EXT 0x800C +#define GL_CND0_ATI 0x896B +#define GL_CND_ATI 0x896A +#define GL_COLOR 0x1800 +#define GL_COLOR3_BIT_PGI 0x00010000 +#define GL_COLOR4_BIT_PGI 0x00020000 +#define GL_COLORBURN_KHR 0x929A +#define GL_COLORBURN_NV 0x929A +#define GL_COLORDODGE_KHR 0x9299 +#define GL_COLORDODGE_NV 0x9299 +#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975 +#define GL_COLOR_ARRAY_ADDRESS_NV 0x8F23 +#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898 +#define GL_COLOR_ARRAY_COUNT_EXT 0x8084 +#define GL_COLOR_ARRAY_EXT 0x8076 +#define GL_COLOR_ARRAY_LENGTH_NV 0x8F2D +#define GL_COLOR_ARRAY_LIST_IBM 103072 +#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082 +#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7 +#define GL_COLOR_ARRAY_POINTER_EXT 0x8090 +#define GL_COLOR_ARRAY_SIZE_EXT 0x8081 +#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083 +#define GL_COLOR_ARRAY_TYPE_EXT 0x8082 +#define GL_COLOR_ATTACHMENT0 0x8CE0 +#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 +#define GL_COLOR_ATTACHMENT1 0x8CE1 +#define GL_COLOR_ATTACHMENT10 0x8CEA +#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA +#define GL_COLOR_ATTACHMENT11 0x8CEB +#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB +#define GL_COLOR_ATTACHMENT12 0x8CEC +#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC +#define GL_COLOR_ATTACHMENT13 0x8CED +#define GL_COLOR_ATTACHMENT13_EXT 0x8CED +#define GL_COLOR_ATTACHMENT14 0x8CEE +#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE +#define GL_COLOR_ATTACHMENT15 0x8CEF +#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF +#define GL_COLOR_ATTACHMENT16 0x8CF0 +#define GL_COLOR_ATTACHMENT17 0x8CF1 +#define GL_COLOR_ATTACHMENT18 0x8CF2 +#define GL_COLOR_ATTACHMENT19 0x8CF3 +#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1 +#define GL_COLOR_ATTACHMENT2 0x8CE2 +#define GL_COLOR_ATTACHMENT20 0x8CF4 +#define GL_COLOR_ATTACHMENT21 0x8CF5 +#define GL_COLOR_ATTACHMENT22 0x8CF6 +#define GL_COLOR_ATTACHMENT23 0x8CF7 +#define GL_COLOR_ATTACHMENT24 0x8CF8 +#define GL_COLOR_ATTACHMENT25 0x8CF9 +#define GL_COLOR_ATTACHMENT26 0x8CFA +#define GL_COLOR_ATTACHMENT27 0x8CFB +#define GL_COLOR_ATTACHMENT28 0x8CFC +#define GL_COLOR_ATTACHMENT29 0x8CFD +#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2 +#define GL_COLOR_ATTACHMENT3 0x8CE3 +#define GL_COLOR_ATTACHMENT30 0x8CFE +#define GL_COLOR_ATTACHMENT31 0x8CFF +#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3 +#define GL_COLOR_ATTACHMENT4 0x8CE4 +#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4 +#define GL_COLOR_ATTACHMENT5 0x8CE5 +#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5 +#define GL_COLOR_ATTACHMENT6 0x8CE6 +#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6 +#define GL_COLOR_ATTACHMENT7 0x8CE7 +#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7 +#define GL_COLOR_ATTACHMENT8 0x8CE8 +#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8 +#define GL_COLOR_ATTACHMENT9 0x8CE9 +#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9 +#define GL_COLOR_BUFFER_BIT 0x00004000 +#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835 +#define GL_COLOR_CLEAR_VALUE 0x0C22 +#define GL_COLOR_COMPONENTS 0x8283 +#define GL_COLOR_ENCODING 0x8296 +#define GL_COLOR_FLOAT_APPLE 0x8A0F +#define GL_COLOR_INDEX12_EXT 0x80E6 +#define GL_COLOR_INDEX16_EXT 0x80E7 +#define GL_COLOR_INDEX1_EXT 0x80E2 +#define GL_COLOR_INDEX2_EXT 0x80E3 +#define GL_COLOR_INDEX4_EXT 0x80E4 +#define GL_COLOR_INDEX8_EXT 0x80E5 +#define GL_COLOR_LOGIC_OP 0x0BF2 +#define GL_COLOR_MATRIX_SGI 0x80B1 +#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2 +#define GL_COLOR_RENDERABLE 0x8286 +#define GL_COLOR_SAMPLES_NV 0x8E20 +#define GL_COLOR_SUM_ARB 0x8458 +#define GL_COLOR_SUM_CLAMP_NV 0x854F +#define GL_COLOR_SUM_EXT 0x8458 +#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD +#define GL_COLOR_TABLE_BIAS_SGI 0x80D7 +#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC +#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8 +#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB +#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF +#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE +#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA +#define GL_COLOR_TABLE_SCALE_SGI 0x80D6 +#define GL_COLOR_TABLE_SGI 0x80D0 +#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9 +#define GL_COLOR_WRITEMASK 0x0C23 +#define GL_COMBINE4_NV 0x8503 +#define GL_COMBINER0_NV 0x8550 +#define GL_COMBINER1_NV 0x8551 +#define GL_COMBINER2_NV 0x8552 +#define GL_COMBINER3_NV 0x8553 +#define GL_COMBINER4_NV 0x8554 +#define GL_COMBINER5_NV 0x8555 +#define GL_COMBINER6_NV 0x8556 +#define GL_COMBINER7_NV 0x8557 +#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545 +#define GL_COMBINER_AB_OUTPUT_NV 0x854A +#define GL_COMBINER_BIAS_NV 0x8549 +#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546 +#define GL_COMBINER_CD_OUTPUT_NV 0x854B +#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544 +#define GL_COMBINER_INPUT_NV 0x8542 +#define GL_COMBINER_MAPPING_NV 0x8543 +#define GL_COMBINER_MUX_SUM_NV 0x8547 +#define GL_COMBINER_SCALE_NV 0x8548 +#define GL_COMBINER_SUM_OUTPUT_NV 0x854C +#define GL_COMBINE_ALPHA_ARB 0x8572 +#define GL_COMBINE_ALPHA_EXT 0x8572 +#define GL_COMBINE_ARB 0x8570 +#define GL_COMBINE_EXT 0x8570 +#define GL_COMBINE_RGB_ARB 0x8571 +#define GL_COMBINE_RGB_EXT 0x8571 +#define GL_COMMAND_BARRIER_BIT 0x00000040 +#define GL_COMMAND_BARRIER_BIT_EXT 0x00000040 +#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E +#define GL_COMPARE_REF_TO_TEXTURE 0x884E +#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E +#define GL_COMPATIBLE_SUBROUTINES 0x8E4B +#define GL_COMPILE_STATUS 0x8B81 +#define GL_COMPLETION_STATUS_ARB 0x91B1 +#define GL_COMPLETION_STATUS_KHR 0x91B1 +#define GL_COMPRESSED_ALPHA_ARB 0x84E9 +#define GL_COMPRESSED_INTENSITY_ARB 0x84EC +#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB +#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72 +#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA +#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70 +#define GL_COMPRESSED_R11_EAC 0x9270 +#define GL_COMPRESSED_RED 0x8225 +#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD +#define GL_COMPRESSED_RED_RGTC1 0x8DBB +#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB +#define GL_COMPRESSED_RG 0x8226 +#define GL_COMPRESSED_RG11_EAC 0x9272 +#define GL_COMPRESSED_RGB 0x84ED +#define GL_COMPRESSED_RGB8_ETC2 0x9274 +#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 +#define GL_COMPRESSED_RGBA 0x84EE +#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 +#define GL_COMPRESSED_RGBA_ARB 0x84EE +#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB +#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8 +#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9 +#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA +#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC +#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD +#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0 +#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1 +#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2 +#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3 +#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4 +#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5 +#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6 +#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7 +#define GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C +#define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C +#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1 +#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 +#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 +#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 +#define GL_COMPRESSED_RGB_ARB 0x84ED +#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E +#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E +#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F +#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F +#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0 +#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 +#define GL_COMPRESSED_RG_RGTC2 0x8DBD +#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73 +#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71 +#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 +#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE +#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC +#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC +#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 +#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE +#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B +#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A +#define GL_COMPRESSED_SRGB 0x8C48 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7 +#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 +#define GL_COMPRESSED_SRGB8_ETC2 0x9275 +#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 +#define GL_COMPRESSED_SRGB_ALPHA 0x8C49 +#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D +#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D +#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49 +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F +#define GL_COMPRESSED_SRGB_EXT 0x8C48 +#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 +#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3 +#define GL_COMPUTE_PROGRAM_NV 0x90FB +#define GL_COMPUTE_PROGRAM_PARAMETER_BUFFER_NV 0x90FC +#define GL_COMPUTE_SHADER 0x91B9 +#define GL_COMPUTE_SHADER_BIT 0x00000020 +#define GL_COMPUTE_SHADER_INVOCATIONS 0x82F5 +#define GL_COMPUTE_SHADER_INVOCATIONS_ARB 0x82F5 +#define GL_COMPUTE_SUBROUTINE 0x92ED +#define GL_COMPUTE_SUBROUTINE_UNIFORM 0x92F3 +#define GL_COMPUTE_TEXTURE 0x82A0 +#define GL_COMPUTE_WORK_GROUP_SIZE 0x8267 +#define GL_COMP_BIT_ATI 0x00000002 +#define GL_CONDITION_SATISFIED 0x911C +#define GL_CONFORMANT_NV 0x9374 +#define GL_CONIC_CURVE_TO_NV 0x1A +#define GL_CONJOINT_NV 0x9284 +#define GL_CONSERVATIVE_RASTERIZATION_INTEL 0x83FE +#define GL_CONSERVATIVE_RASTERIZATION_NV 0x9346 +#define GL_CONSERVATIVE_RASTER_DILATE_GRANULARITY_NV 0x937B +#define GL_CONSERVATIVE_RASTER_DILATE_NV 0x9379 +#define GL_CONSERVATIVE_RASTER_DILATE_RANGE_NV 0x937A +#define GL_CONSERVATIVE_RASTER_MODE_NV 0x954D +#define GL_CONSERVATIVE_RASTER_MODE_POST_SNAP_NV 0x954E +#define GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_NV 0x9550 +#define GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV 0x954F +#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_CONSTANT_ALPHA_EXT 0x8003 +#define GL_CONSTANT_ARB 0x8576 +#define GL_CONSTANT_BORDER_HP 0x8151 +#define GL_CONSTANT_COLOR 0x8001 +#define GL_CONSTANT_COLOR0_NV 0x852A +#define GL_CONSTANT_COLOR1_NV 0x852B +#define GL_CONSTANT_COLOR_EXT 0x8001 +#define GL_CONSTANT_EXT 0x8576 +#define GL_CONST_EYE_NV 0x86E5 +#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002 +#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001 +#define GL_CONTEXT_FLAGS 0x821E +#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002 +#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001 +#define GL_CONTEXT_FLAG_NO_ERROR_BIT 0x00000008 +#define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008 +#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT 0x00000004 +#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004 +#define GL_CONTEXT_LOST 0x0507 +#define GL_CONTEXT_PROFILE_MASK 0x9126 +#define GL_CONTEXT_RELEASE_BEHAVIOR 0x82FB +#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82FC +#define GL_CONTEXT_ROBUST_ACCESS 0x90F3 +#define GL_CONTINUOUS_AMD 0x9007 +#define GL_CONTRAST_NV 0x92A1 +#define GL_CONVEX_HULL_NV 0x908B +#define GL_CONVOLUTION_1D_EXT 0x8010 +#define GL_CONVOLUTION_2D_EXT 0x8011 +#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154 +#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013 +#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015 +#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014 +#define GL_CONVOLUTION_FORMAT_EXT 0x8017 +#define GL_CONVOLUTION_HEIGHT_EXT 0x8019 +#define GL_CONVOLUTION_HINT_SGIX 0x8316 +#define GL_CONVOLUTION_WIDTH_EXT 0x8018 +#define GL_CON_0_ATI 0x8941 +#define GL_CON_10_ATI 0x894B +#define GL_CON_11_ATI 0x894C +#define GL_CON_12_ATI 0x894D +#define GL_CON_13_ATI 0x894E +#define GL_CON_14_ATI 0x894F +#define GL_CON_15_ATI 0x8950 +#define GL_CON_16_ATI 0x8951 +#define GL_CON_17_ATI 0x8952 +#define GL_CON_18_ATI 0x8953 +#define GL_CON_19_ATI 0x8954 +#define GL_CON_1_ATI 0x8942 +#define GL_CON_20_ATI 0x8955 +#define GL_CON_21_ATI 0x8956 +#define GL_CON_22_ATI 0x8957 +#define GL_CON_23_ATI 0x8958 +#define GL_CON_24_ATI 0x8959 +#define GL_CON_25_ATI 0x895A +#define GL_CON_26_ATI 0x895B +#define GL_CON_27_ATI 0x895C +#define GL_CON_28_ATI 0x895D +#define GL_CON_29_ATI 0x895E +#define GL_CON_2_ATI 0x8943 +#define GL_CON_30_ATI 0x895F +#define GL_CON_31_ATI 0x8960 +#define GL_CON_3_ATI 0x8944 +#define GL_CON_4_ATI 0x8945 +#define GL_CON_5_ATI 0x8946 +#define GL_CON_6_ATI 0x8947 +#define GL_CON_7_ATI 0x8948 +#define GL_CON_8_ATI 0x8949 +#define GL_CON_9_ATI 0x894A +#define GL_COORD_REPLACE_ARB 0x8862 +#define GL_COORD_REPLACE_NV 0x8862 +#define GL_COPY 0x1503 +#define GL_COPY_INVERTED 0x150C +#define GL_COPY_READ_BUFFER 0x8F36 +#define GL_COPY_READ_BUFFER_BINDING 0x8F36 +#define GL_COPY_WRITE_BUFFER 0x8F37 +#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 +#define GL_COUNTER_RANGE_AMD 0x8BC1 +#define GL_COUNTER_TYPE_AMD 0x8BC0 +#define GL_COUNT_DOWN_NV 0x9089 +#define GL_COUNT_UP_NV 0x9088 +#define GL_COVERAGE_MODULATION_NV 0x9332 +#define GL_COVERAGE_MODULATION_TABLE_NV 0x9331 +#define GL_COVERAGE_MODULATION_TABLE_SIZE_NV 0x9333 +#define GL_CUBIC_CURVE_TO_NV 0x0C +#define GL_CUBIC_EXT 0x8334 +#define GL_CUBIC_HP 0x815F +#define GL_CULL_FACE 0x0B44 +#define GL_CULL_FACE_MODE 0x0B45 +#define GL_CULL_FRAGMENT_NV 0x86E7 +#define GL_CULL_MODES_NV 0x86E0 +#define GL_CULL_VERTEX_EXT 0x81AA +#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB +#define GL_CULL_VERTEX_IBM 103050 +#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC +#define GL_CURRENT_ATTRIB_NV 0x8626 +#define GL_CURRENT_BINORMAL_EXT 0x843C +#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453 +#define GL_CURRENT_MATRIX_ARB 0x8641 +#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845 +#define GL_CURRENT_MATRIX_NV 0x8641 +#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640 +#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640 +#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865 +#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843 +#define GL_CURRENT_PROGRAM 0x8B8D +#define GL_CURRENT_QUERY 0x8865 +#define GL_CURRENT_QUERY_ARB 0x8865 +#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406 +#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459 +#define GL_CURRENT_TANGENT_EXT 0x843B +#define GL_CURRENT_TIME_NV 0x8E28 +#define GL_CURRENT_VERTEX_ATTRIB 0x8626 +#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626 +#define GL_CURRENT_VERTEX_EXT 0x87E2 +#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B +#define GL_CURRENT_WEIGHT_ARB 0x86A8 +#define GL_CW 0x0900 +#define GL_D3D12_FENCE_VALUE_EXT 0x9595 +#define GL_DARKEN_KHR 0x9297 +#define GL_DARKEN_NV 0x9297 +#define GL_DATA_BUFFER_AMD 0x9151 +#define GL_DEBUG_CALLBACK_FUNCTION 0x8244 +#define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244 +#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245 +#define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245 +#define GL_DEBUG_CATEGORY_API_ERROR_AMD 0x9149 +#define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F +#define GL_DEBUG_CATEGORY_DEPRECATION_AMD 0x914B +#define GL_DEBUG_CATEGORY_OTHER_AMD 0x9150 +#define GL_DEBUG_CATEGORY_PERFORMANCE_AMD 0x914D +#define GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD 0x914E +#define GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD 0x914C +#define GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD 0x914A +#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D +#define GL_DEBUG_LOGGED_MESSAGES 0x9145 +#define GL_DEBUG_LOGGED_MESSAGES_AMD 0x9145 +#define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145 +#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243 +#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243 +#define GL_DEBUG_OUTPUT 0x92E0 +#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242 +#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242 +#define GL_DEBUG_SEVERITY_HIGH 0x9146 +#define GL_DEBUG_SEVERITY_HIGH_AMD 0x9146 +#define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146 +#define GL_DEBUG_SEVERITY_LOW 0x9148 +#define GL_DEBUG_SEVERITY_LOW_AMD 0x9148 +#define GL_DEBUG_SEVERITY_LOW_ARB 0x9148 +#define GL_DEBUG_SEVERITY_MEDIUM 0x9147 +#define GL_DEBUG_SEVERITY_MEDIUM_AMD 0x9147 +#define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147 +#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B +#define GL_DEBUG_SOURCE_API 0x8246 +#define GL_DEBUG_SOURCE_API_ARB 0x8246 +#define GL_DEBUG_SOURCE_APPLICATION 0x824A +#define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A +#define GL_DEBUG_SOURCE_OTHER 0x824B +#define GL_DEBUG_SOURCE_OTHER_ARB 0x824B +#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248 +#define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248 +#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249 +#define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249 +#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247 +#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247 +#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D +#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D +#define GL_DEBUG_TYPE_ERROR 0x824C +#define GL_DEBUG_TYPE_ERROR_ARB 0x824C +#define GL_DEBUG_TYPE_MARKER 0x8268 +#define GL_DEBUG_TYPE_OTHER 0x8251 +#define GL_DEBUG_TYPE_OTHER_ARB 0x8251 +#define GL_DEBUG_TYPE_PERFORMANCE 0x8250 +#define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250 +#define GL_DEBUG_TYPE_POP_GROUP 0x826A +#define GL_DEBUG_TYPE_PORTABILITY 0x824F +#define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F +#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269 +#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E +#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E +#define GL_DECODE_EXT 0x8A49 +#define GL_DECR 0x1E03 +#define GL_DECR_WRAP 0x8508 +#define GL_DECR_WRAP_EXT 0x8508 +#define GL_DEDICATED_MEMORY_OBJECT_EXT 0x9581 +#define GL_DEFORMATIONS_MASK_SGIX 0x8196 +#define GL_DELETE_STATUS 0x8B80 +#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9 +#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA +#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858 +#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859 +#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A +#define GL_DEPTH 0x1801 +#define GL_DEPTH24_STENCIL8 0x88F0 +#define GL_DEPTH24_STENCIL8_EXT 0x88F0 +#define GL_DEPTH32F_STENCIL8 0x8CAD +#define GL_DEPTH32F_STENCIL8_NV 0x8DAC +#define GL_DEPTH_ATTACHMENT 0x8D00 +#define GL_DEPTH_ATTACHMENT_EXT 0x8D00 +#define GL_DEPTH_BOUNDS_EXT 0x8891 +#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890 +#define GL_DEPTH_BUFFER_BIT 0x00000100 +#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF +#define GL_DEPTH_CLAMP 0x864F +#define GL_DEPTH_CLAMP_FAR_AMD 0x901F +#define GL_DEPTH_CLAMP_NEAR_AMD 0x901E +#define GL_DEPTH_CLAMP_NV 0x864F +#define GL_DEPTH_CLEAR_VALUE 0x0B73 +#define GL_DEPTH_COMPONENT 0x1902 +#define GL_DEPTH_COMPONENT16 0x81A5 +#define GL_DEPTH_COMPONENT16_ARB 0x81A5 +#define GL_DEPTH_COMPONENT16_SGIX 0x81A5 +#define GL_DEPTH_COMPONENT24 0x81A6 +#define GL_DEPTH_COMPONENT24_ARB 0x81A6 +#define GL_DEPTH_COMPONENT24_SGIX 0x81A6 +#define GL_DEPTH_COMPONENT32 0x81A7 +#define GL_DEPTH_COMPONENT32F 0x8CAC +#define GL_DEPTH_COMPONENT32F_NV 0x8DAB +#define GL_DEPTH_COMPONENT32_ARB 0x81A7 +#define GL_DEPTH_COMPONENT32_SGIX 0x81A7 +#define GL_DEPTH_COMPONENTS 0x8284 +#define GL_DEPTH_FUNC 0x0B74 +#define GL_DEPTH_RANGE 0x0B70 +#define GL_DEPTH_RENDERABLE 0x8287 +#define GL_DEPTH_SAMPLES_NV 0x932D +#define GL_DEPTH_STENCIL 0x84F9 +#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A +#define GL_DEPTH_STENCIL_EXT 0x84F9 +#define GL_DEPTH_STENCIL_NV 0x84F9 +#define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA +#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F +#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E +#define GL_DEPTH_TEST 0x0B71 +#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B +#define GL_DEPTH_WRITEMASK 0x0B72 +#define GL_DETACHED_BUFFERS_NV 0x95AB +#define GL_DETACHED_MEMORY_INCARNATION_NV 0x95A9 +#define GL_DETACHED_TEXTURES_NV 0x95AA +#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096 +#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095 +#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C +#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A +#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B +#define GL_DEVICE_LUID_EXT 0x9599 +#define GL_DEVICE_NODE_MASK_EXT 0x959A +#define GL_DEVICE_UUID_EXT 0x9597 +#define GL_DIFFERENCE_KHR 0x929E +#define GL_DIFFERENCE_NV 0x929E +#define GL_DISCARD_ATI 0x8763 +#define GL_DISCARD_NV 0x8530 +#define GL_DISCRETE_AMD 0x9006 +#define GL_DISJOINT_NV 0x9283 +#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE +#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF +#define GL_DISTANCE_ATTENUATION_EXT 0x8129 +#define GL_DISTANCE_ATTENUATION_SGIS 0x8129 +#define GL_DITHER 0x0BD0 +#define GL_DONT_CARE 0x1100 +#define GL_DOT2_ADD_ATI 0x896C +#define GL_DOT3_ATI 0x8966 +#define GL_DOT3_RGBA_ARB 0x86AF +#define GL_DOT3_RGBA_EXT 0x8741 +#define GL_DOT3_RGB_ARB 0x86AE +#define GL_DOT3_RGB_EXT 0x8740 +#define GL_DOT4_ATI 0x8967 +#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D +#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3 +#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED +#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1 +#define GL_DOT_PRODUCT_NV 0x86EC +#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B +#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2 +#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C +#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE +#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF +#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0 +#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E +#define GL_DOUBLE 0x140A +#define GL_DOUBLEBUFFER 0x0C32 +#define GL_DOUBLE_MAT2 0x8F46 +#define GL_DOUBLE_MAT2_EXT 0x8F46 +#define GL_DOUBLE_MAT2x3 0x8F49 +#define GL_DOUBLE_MAT2x3_EXT 0x8F49 +#define GL_DOUBLE_MAT2x4 0x8F4A +#define GL_DOUBLE_MAT2x4_EXT 0x8F4A +#define GL_DOUBLE_MAT3 0x8F47 +#define GL_DOUBLE_MAT3_EXT 0x8F47 +#define GL_DOUBLE_MAT3x2 0x8F4B +#define GL_DOUBLE_MAT3x2_EXT 0x8F4B +#define GL_DOUBLE_MAT3x4 0x8F4C +#define GL_DOUBLE_MAT3x4_EXT 0x8F4C +#define GL_DOUBLE_MAT4 0x8F48 +#define GL_DOUBLE_MAT4_EXT 0x8F48 +#define GL_DOUBLE_MAT4x2 0x8F4D +#define GL_DOUBLE_MAT4x2_EXT 0x8F4D +#define GL_DOUBLE_MAT4x3 0x8F4E +#define GL_DOUBLE_MAT4x3_EXT 0x8F4E +#define GL_DOUBLE_VEC2 0x8FFC +#define GL_DOUBLE_VEC2_EXT 0x8FFC +#define GL_DOUBLE_VEC3 0x8FFD +#define GL_DOUBLE_VEC3_EXT 0x8FFD +#define GL_DOUBLE_VEC4 0x8FFE +#define GL_DOUBLE_VEC4_EXT 0x8FFE +#define GL_DRAW_ARRAYS_COMMAND_NV 0x0003 +#define GL_DRAW_ARRAYS_INSTANCED_COMMAND_NV 0x0007 +#define GL_DRAW_ARRAYS_STRIP_COMMAND_NV 0x0005 +#define GL_DRAW_BUFFER 0x0C01 +#define GL_DRAW_BUFFER0 0x8825 +#define GL_DRAW_BUFFER0_ARB 0x8825 +#define GL_DRAW_BUFFER0_ATI 0x8825 +#define GL_DRAW_BUFFER1 0x8826 +#define GL_DRAW_BUFFER10 0x882F +#define GL_DRAW_BUFFER10_ARB 0x882F +#define GL_DRAW_BUFFER10_ATI 0x882F +#define GL_DRAW_BUFFER11 0x8830 +#define GL_DRAW_BUFFER11_ARB 0x8830 +#define GL_DRAW_BUFFER11_ATI 0x8830 +#define GL_DRAW_BUFFER12 0x8831 +#define GL_DRAW_BUFFER12_ARB 0x8831 +#define GL_DRAW_BUFFER12_ATI 0x8831 +#define GL_DRAW_BUFFER13 0x8832 +#define GL_DRAW_BUFFER13_ARB 0x8832 +#define GL_DRAW_BUFFER13_ATI 0x8832 +#define GL_DRAW_BUFFER14 0x8833 +#define GL_DRAW_BUFFER14_ARB 0x8833 +#define GL_DRAW_BUFFER14_ATI 0x8833 +#define GL_DRAW_BUFFER15 0x8834 +#define GL_DRAW_BUFFER15_ARB 0x8834 +#define GL_DRAW_BUFFER15_ATI 0x8834 +#define GL_DRAW_BUFFER1_ARB 0x8826 +#define GL_DRAW_BUFFER1_ATI 0x8826 +#define GL_DRAW_BUFFER2 0x8827 +#define GL_DRAW_BUFFER2_ARB 0x8827 +#define GL_DRAW_BUFFER2_ATI 0x8827 +#define GL_DRAW_BUFFER3 0x8828 +#define GL_DRAW_BUFFER3_ARB 0x8828 +#define GL_DRAW_BUFFER3_ATI 0x8828 +#define GL_DRAW_BUFFER4 0x8829 +#define GL_DRAW_BUFFER4_ARB 0x8829 +#define GL_DRAW_BUFFER4_ATI 0x8829 +#define GL_DRAW_BUFFER5 0x882A +#define GL_DRAW_BUFFER5_ARB 0x882A +#define GL_DRAW_BUFFER5_ATI 0x882A +#define GL_DRAW_BUFFER6 0x882B +#define GL_DRAW_BUFFER6_ARB 0x882B +#define GL_DRAW_BUFFER6_ATI 0x882B +#define GL_DRAW_BUFFER7 0x882C +#define GL_DRAW_BUFFER7_ARB 0x882C +#define GL_DRAW_BUFFER7_ATI 0x882C +#define GL_DRAW_BUFFER8 0x882D +#define GL_DRAW_BUFFER8_ARB 0x882D +#define GL_DRAW_BUFFER8_ATI 0x882D +#define GL_DRAW_BUFFER9 0x882E +#define GL_DRAW_BUFFER9_ARB 0x882E +#define GL_DRAW_BUFFER9_ATI 0x882E +#define GL_DRAW_ELEMENTS_COMMAND_NV 0x0002 +#define GL_DRAW_ELEMENTS_INSTANCED_COMMAND_NV 0x0006 +#define GL_DRAW_ELEMENTS_STRIP_COMMAND_NV 0x0004 +#define GL_DRAW_FRAMEBUFFER 0x8CA9 +#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6 +#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CA6 +#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9 +#define GL_DRAW_INDIRECT_ADDRESS_NV 0x8F41 +#define GL_DRAW_INDIRECT_BUFFER 0x8F3F +#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43 +#define GL_DRAW_INDIRECT_LENGTH_NV 0x8F42 +#define GL_DRAW_INDIRECT_UNIFIED_NV 0x8F40 +#define GL_DRAW_PIXELS_APPLE 0x8A0A +#define GL_DRIVER_UUID_EXT 0x9598 +#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B +#define GL_DSDT8_MAG8_NV 0x870A +#define GL_DSDT8_NV 0x8709 +#define GL_DSDT_MAG_INTENSITY_NV 0x86DC +#define GL_DSDT_MAG_NV 0x86F6 +#define GL_DSDT_MAG_VIB_NV 0x86F7 +#define GL_DSDT_NV 0x86F5 +#define GL_DST_ALPHA 0x0304 +#define GL_DST_ATOP_NV 0x928F +#define GL_DST_COLOR 0x0306 +#define GL_DST_IN_NV 0x928B +#define GL_DST_NV 0x9287 +#define GL_DST_OUT_NV 0x928D +#define GL_DST_OVER_NV 0x9289 +#define GL_DS_BIAS_NV 0x8716 +#define GL_DS_SCALE_NV 0x8710 +#define GL_DT_BIAS_NV 0x8717 +#define GL_DT_SCALE_NV 0x8711 +#define GL_DU8DV8_ATI 0x877A +#define GL_DUAL_ALPHA12_SGIS 0x8112 +#define GL_DUAL_ALPHA16_SGIS 0x8113 +#define GL_DUAL_ALPHA4_SGIS 0x8110 +#define GL_DUAL_ALPHA8_SGIS 0x8111 +#define GL_DUAL_INTENSITY12_SGIS 0x811A +#define GL_DUAL_INTENSITY16_SGIS 0x811B +#define GL_DUAL_INTENSITY4_SGIS 0x8118 +#define GL_DUAL_INTENSITY8_SGIS 0x8119 +#define GL_DUAL_LUMINANCE12_SGIS 0x8116 +#define GL_DUAL_LUMINANCE16_SGIS 0x8117 +#define GL_DUAL_LUMINANCE4_SGIS 0x8114 +#define GL_DUAL_LUMINANCE8_SGIS 0x8115 +#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C +#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D +#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124 +#define GL_DUDV_ATI 0x8779 +#define GL_DUP_FIRST_CUBIC_CURVE_TO_NV 0xF2 +#define GL_DUP_LAST_CUBIC_CURVE_TO_NV 0xF4 +#define GL_DYNAMIC_ATI 0x8761 +#define GL_DYNAMIC_COPY 0x88EA +#define GL_DYNAMIC_COPY_ARB 0x88EA +#define GL_DYNAMIC_DRAW 0x88E8 +#define GL_DYNAMIC_DRAW_ARB 0x88E8 +#define GL_DYNAMIC_READ 0x88E9 +#define GL_DYNAMIC_READ_ARB 0x88E9 +#define GL_DYNAMIC_STORAGE_BIT 0x0100 +#define GL_EDGEFLAG_BIT_PGI 0x00040000 +#define GL_EDGE_FLAG_ARRAY_ADDRESS_NV 0x8F26 +#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B +#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D +#define GL_EDGE_FLAG_ARRAY_EXT 0x8079 +#define GL_EDGE_FLAG_ARRAY_LENGTH_NV 0x8F30 +#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075 +#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085 +#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093 +#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C +#define GL_EFFECTIVE_RASTER_SAMPLES_EXT 0x932C +#define GL_EIGHTH_BIT_ATI 0x00000020 +#define GL_ELEMENT_ADDRESS_COMMAND_NV 0x0008 +#define GL_ELEMENT_ARRAY_ADDRESS_NV 0x8F29 +#define GL_ELEMENT_ARRAY_APPLE 0x8A0C +#define GL_ELEMENT_ARRAY_ATI 0x8768 +#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002 +#define GL_ELEMENT_ARRAY_BARRIER_BIT_EXT 0x00000002 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 +#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895 +#define GL_ELEMENT_ARRAY_LENGTH_NV 0x8F33 +#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x8A0E +#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A +#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8A0D +#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769 +#define GL_ELEMENT_ARRAY_UNIFIED_NV 0x8F1F +#define GL_EMBOSS_CONSTANT_NV 0x855E +#define GL_EMBOSS_LIGHT_NV 0x855D +#define GL_EMBOSS_MAP_NV 0x855F +#define GL_EQUAL 0x0202 +#define GL_EQUIV 0x1509 +#define GL_EVAL_2D_NV 0x86C0 +#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5 +#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1 +#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6 +#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0 +#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1 +#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2 +#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3 +#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4 +#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5 +#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7 +#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8 +#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9 +#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA +#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB +#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC +#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD +#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE +#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF +#define GL_EXCLUSION_KHR 0x92A0 +#define GL_EXCLUSION_NV 0x92A0 +#define GL_EXCLUSIVE_EXT 0x8F11 +#define GL_EXPAND_NEGATE_NV 0x8539 +#define GL_EXPAND_NORMAL_NV 0x8538 +#define GL_EXTENSIONS 0x1F03 +#define GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD 0x9160 +#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2 +#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0 +#define GL_EYE_LINE_SGIS 0x81F6 +#define GL_EYE_PLANE 0x2502 +#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C +#define GL_EYE_POINT_SGIS 0x81F4 +#define GL_EYE_RADIAL_NV 0x855B +#define GL_E_TIMES_F_NV 0x8531 +#define GL_FACTOR_MAX_AMD 0x901D +#define GL_FACTOR_MIN_AMD 0x901C +#define GL_FAILURE_NV 0x9030 +#define GL_FALSE 0 +#define GL_FASTEST 0x1101 +#define GL_FENCE_APPLE 0x8A0B +#define GL_FENCE_CONDITION_NV 0x84F4 +#define GL_FENCE_STATUS_NV 0x84F3 +#define GL_FIELDS_NV 0x8E27 +#define GL_FIELD_LOWER_NV 0x9023 +#define GL_FIELD_UPPER_NV 0x9022 +#define GL_FILE_NAME_NV 0x9074 +#define GL_FILL 0x1B02 +#define GL_FILL_RECTANGLE_NV 0x933C +#define GL_FILTER 0x829A +#define GL_FILTER4_SGIS 0x8146 +#define GL_FIRST_TO_REST_NV 0x90AF +#define GL_FIRST_VERTEX_CONVENTION 0x8E4D +#define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D +#define GL_FIXED 0x140C +#define GL_FIXED_OES 0x140C +#define GL_FIXED_ONLY 0x891D +#define GL_FIXED_ONLY_ARB 0x891D +#define GL_FLOAT 0x1406 +#define GL_FLOAT16_MAT2_AMD 0x91C5 +#define GL_FLOAT16_MAT2x3_AMD 0x91C8 +#define GL_FLOAT16_MAT2x4_AMD 0x91C9 +#define GL_FLOAT16_MAT3_AMD 0x91C6 +#define GL_FLOAT16_MAT3x2_AMD 0x91CA +#define GL_FLOAT16_MAT3x4_AMD 0x91CB +#define GL_FLOAT16_MAT4_AMD 0x91C7 +#define GL_FLOAT16_MAT4x2_AMD 0x91CC +#define GL_FLOAT16_MAT4x3_AMD 0x91CD +#define GL_FLOAT16_NV 0x8FF8 +#define GL_FLOAT16_VEC2_NV 0x8FF9 +#define GL_FLOAT16_VEC3_NV 0x8FFA +#define GL_FLOAT16_VEC4_NV 0x8FFB +#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD +#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD +#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D +#define GL_FLOAT_MAT2 0x8B5A +#define GL_FLOAT_MAT2_ARB 0x8B5A +#define GL_FLOAT_MAT2x3 0x8B65 +#define GL_FLOAT_MAT2x4 0x8B66 +#define GL_FLOAT_MAT3 0x8B5B +#define GL_FLOAT_MAT3_ARB 0x8B5B +#define GL_FLOAT_MAT3x2 0x8B67 +#define GL_FLOAT_MAT3x4 0x8B68 +#define GL_FLOAT_MAT4 0x8B5C +#define GL_FLOAT_MAT4_ARB 0x8B5C +#define GL_FLOAT_MAT4x2 0x8B69 +#define GL_FLOAT_MAT4x3 0x8B6A +#define GL_FLOAT_R16_NV 0x8884 +#define GL_FLOAT_R32_NV 0x8885 +#define GL_FLOAT_RG16_NV 0x8886 +#define GL_FLOAT_RG32_NV 0x8887 +#define GL_FLOAT_RGB16_NV 0x8888 +#define GL_FLOAT_RGB32_NV 0x8889 +#define GL_FLOAT_RGBA16_NV 0x888A +#define GL_FLOAT_RGBA32_NV 0x888B +#define GL_FLOAT_RGBA_MODE_NV 0x888E +#define GL_FLOAT_RGBA_NV 0x8883 +#define GL_FLOAT_RGB_NV 0x8882 +#define GL_FLOAT_RG_NV 0x8881 +#define GL_FLOAT_R_NV 0x8880 +#define GL_FLOAT_VEC2 0x8B50 +#define GL_FLOAT_VEC2_ARB 0x8B50 +#define GL_FLOAT_VEC3 0x8B51 +#define GL_FLOAT_VEC3_ARB 0x8B51 +#define GL_FLOAT_VEC4 0x8B52 +#define GL_FLOAT_VEC4_ARB 0x8B52 +#define GL_FOG 0x0B60 +#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D +#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457 +#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076 +#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086 +#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456 +#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455 +#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454 +#define GL_FOG_COORDINATE_EXT 0x8451 +#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450 +#define GL_FOG_COORD_ARRAY_ADDRESS_NV 0x8F28 +#define GL_FOG_COORD_ARRAY_LENGTH_NV 0x8F32 +#define GL_FOG_DISTANCE_MODE_NV 0x855A +#define GL_FOG_FUNC_POINTS_SGIS 0x812B +#define GL_FOG_FUNC_SGIS 0x812A +#define GL_FOG_OFFSET_SGIX 0x8198 +#define GL_FOG_OFFSET_VALUE_SGIX 0x8199 +#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC +#define GL_FONT_ASCENDER_BIT_NV 0x00200000 +#define GL_FONT_DESCENDER_BIT_NV 0x00400000 +#define GL_FONT_GLYPHS_AVAILABLE_NV 0x9368 +#define GL_FONT_HAS_KERNING_BIT_NV 0x10000000 +#define GL_FONT_HEIGHT_BIT_NV 0x00800000 +#define GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV 0x02000000 +#define GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV 0x01000000 +#define GL_FONT_NUM_GLYPH_INDICES_BIT_NV 0x20000000 +#define GL_FONT_TARGET_UNAVAILABLE_NV 0x9369 +#define GL_FONT_UNAVAILABLE_NV 0x936A +#define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000 +#define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000 +#define GL_FONT_UNINTELLIGIBLE_NV 0x936B +#define GL_FONT_UNITS_PER_EM_BIT_NV 0x00100000 +#define GL_FONT_X_MAX_BOUNDS_BIT_NV 0x00040000 +#define GL_FONT_X_MIN_BOUNDS_BIT_NV 0x00010000 +#define GL_FONT_Y_MAX_BOUNDS_BIT_NV 0x00080000 +#define GL_FONT_Y_MIN_BOUNDS_BIT_NV 0x00020000 +#define GL_FORCE_BLUE_TO_ONE_NV 0x8860 +#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983 +#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982 +#define GL_FRACTIONAL_EVEN 0x8E7C +#define GL_FRACTIONAL_ODD 0x8E7B +#define GL_FRAGMENT_COLOR_EXT 0x834C +#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402 +#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403 +#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401 +#define GL_FRAGMENT_COVERAGE_COLOR_NV 0x92DE +#define GL_FRAGMENT_COVERAGE_TO_COLOR_NV 0x92DD +#define GL_FRAGMENT_DEPTH_EXT 0x8452 +#define GL_FRAGMENT_INPUT_NV 0x936D +#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D +#define GL_FRAGMENT_LIGHT0_SGIX 0x840C +#define GL_FRAGMENT_LIGHT1_SGIX 0x840D +#define GL_FRAGMENT_LIGHT2_SGIX 0x840E +#define GL_FRAGMENT_LIGHT3_SGIX 0x840F +#define GL_FRAGMENT_LIGHT4_SGIX 0x8410 +#define GL_FRAGMENT_LIGHT5_SGIX 0x8411 +#define GL_FRAGMENT_LIGHT6_SGIX 0x8412 +#define GL_FRAGMENT_LIGHT7_SGIX 0x8413 +#define GL_FRAGMENT_LIGHTING_SGIX 0x8400 +#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A +#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408 +#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B +#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409 +#define GL_FRAGMENT_MATERIAL_EXT 0x8349 +#define GL_FRAGMENT_NORMAL_EXT 0x834A +#define GL_FRAGMENT_PROGRAM_ARB 0x8804 +#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873 +#define GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV 0x8E5D +#define GL_FRAGMENT_PROGRAM_NV 0x8870 +#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4 +#define GL_FRAGMENT_SHADER 0x8B30 +#define GL_FRAGMENT_SHADER_ARB 0x8B30 +#define GL_FRAGMENT_SHADER_ATI 0x8920 +#define GL_FRAGMENT_SHADER_BIT 0x00000002 +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B +#define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT 0x8A52 +#define GL_FRAGMENT_SHADER_INVOCATIONS 0x82F4 +#define GL_FRAGMENT_SHADER_INVOCATIONS_ARB 0x82F4 +#define GL_FRAGMENT_SUBROUTINE 0x92EC +#define GL_FRAGMENT_SUBROUTINE_UNIFORM 0x92F2 +#define GL_FRAGMENT_TEXTURE 0x829F +#define GL_FRAMEBUFFER 0x8D40 +#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 +#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 +#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 +#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 +#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 +#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 +#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR 0x9632 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR 0x9630 +#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400 +#define GL_FRAMEBUFFER_BARRIER_BIT_EXT 0x00000400 +#define GL_FRAMEBUFFER_BINDING 0x8CA6 +#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6 +#define GL_FRAMEBUFFER_BLEND 0x828B +#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 +#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5 +#define GL_FRAMEBUFFER_DEFAULT 0x8218 +#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314 +#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311 +#define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312 +#define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313 +#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310 +#define GL_FRAMEBUFFER_EXT 0x8D40 +#define GL_FRAMEBUFFER_FLIP_X_MESA 0x8BBC +#define GL_FRAMEBUFFER_FLIP_Y_MESA 0x8BBB +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9 +#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB +#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB +#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56 +#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC +#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC +#define GL_FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR 0x9633 +#define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_ARB 0x9342 +#define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV 0x9342 +#define GL_FRAMEBUFFER_RENDERABLE 0x8289 +#define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A +#define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_ARB 0x9343 +#define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV 0x9343 +#define GL_FRAMEBUFFER_SRGB 0x8DB9 +#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA +#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9 +#define GL_FRAMEBUFFER_SWAP_XY_MESA 0x8BBD +#define GL_FRAMEBUFFER_UNDEFINED 0x8219 +#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD +#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD +#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C +#define GL_FRAMEZOOM_SGIX 0x818B +#define GL_FRAME_NV 0x8E26 +#define GL_FRONT 0x0404 +#define GL_FRONT_AND_BACK 0x0408 +#define GL_FRONT_FACE 0x0B46 +#define GL_FRONT_FACE_COMMAND_NV 0x0012 +#define GL_FRONT_LEFT 0x0400 +#define GL_FRONT_RIGHT 0x0401 +#define GL_FULL_RANGE_EXT 0x87E1 +#define GL_FULL_STIPPLE_HINT_PGI 0x1A219 +#define GL_FULL_SUPPORT 0x82B7 +#define GL_FUNC_ADD 0x8006 +#define GL_FUNC_ADD_EXT 0x8006 +#define GL_FUNC_REVERSE_SUBTRACT 0x800B +#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B +#define GL_FUNC_SUBTRACT 0x800A +#define GL_FUNC_SUBTRACT_EXT 0x800A +#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192 +#define GL_GENERATE_MIPMAP_SGIS 0x8191 +#define GL_GENERIC_ATTRIB_NV 0x8C7D +#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002 +#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194 +#define GL_GEOMETRY_INPUT_TYPE 0x8917 +#define GL_GEOMETRY_INPUT_TYPE_ARB 0x8DDB +#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB +#define GL_GEOMETRY_OUTPUT_TYPE 0x8918 +#define GL_GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC +#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC +#define GL_GEOMETRY_PROGRAM_NV 0x8C26 +#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3 +#define GL_GEOMETRY_SHADER 0x8DD9 +#define GL_GEOMETRY_SHADER_ARB 0x8DD9 +#define GL_GEOMETRY_SHADER_BIT 0x00000004 +#define GL_GEOMETRY_SHADER_EXT 0x8DD9 +#define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F +#define GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED 0x82F3 +#define GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB 0x82F3 +#define GL_GEOMETRY_SUBROUTINE 0x92EB +#define GL_GEOMETRY_SUBROUTINE_UNIFORM 0x92F1 +#define GL_GEOMETRY_TEXTURE 0x829E +#define GL_GEOMETRY_VERTICES_OUT 0x8916 +#define GL_GEOMETRY_VERTICES_OUT_ARB 0x8DDA +#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA +#define GL_GEQUAL 0x0206 +#define GL_GET_TEXTURE_IMAGE_FORMAT 0x8291 +#define GL_GET_TEXTURE_IMAGE_TYPE 0x8292 +#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA +#define GL_GLOBAL_ALPHA_SUN 0x81D9 +#define GL_GLYPH_HAS_KERNING_BIT_NV 0x100 +#define GL_GLYPH_HEIGHT_BIT_NV 0x02 +#define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10 +#define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04 +#define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08 +#define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80 +#define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20 +#define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40 +#define GL_GLYPH_WIDTH_BIT_NV 0x01 +#define GL_GPU_ADDRESS_NV 0x8F34 +#define GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX 0x9049 +#define GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX 0x9047 +#define GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B +#define GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX 0x904A +#define GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX 0x9048 +#define GL_GREATER 0x0204 +#define GL_GREEN 0x1904 +#define GL_GREEN_BIT_ATI 0x00000002 +#define GL_GREEN_INTEGER 0x8D95 +#define GL_GREEN_INTEGER_EXT 0x8D95 +#define GL_GREEN_MAX_CLAMP_INGR 0x8565 +#define GL_GREEN_MIN_CLAMP_INGR 0x8561 +#define GL_GREEN_NV 0x1904 +#define GL_GUILTY_CONTEXT_RESET 0x8253 +#define GL_GUILTY_CONTEXT_RESET_ARB 0x8253 +#define GL_HALF_APPLE 0x140B +#define GL_HALF_BIAS_NEGATE_NV 0x853B +#define GL_HALF_BIAS_NORMAL_NV 0x853A +#define GL_HALF_BIT_ATI 0x00000008 +#define GL_HALF_FLOAT 0x140B +#define GL_HALF_FLOAT_ARB 0x140B +#define GL_HALF_FLOAT_NV 0x140B +#define GL_HANDLE_TYPE_D3D11_IMAGE_EXT 0x958B +#define GL_HANDLE_TYPE_D3D11_IMAGE_KMT_EXT 0x958C +#define GL_HANDLE_TYPE_D3D12_FENCE_EXT 0x9594 +#define GL_HANDLE_TYPE_D3D12_RESOURCE_EXT 0x958A +#define GL_HANDLE_TYPE_D3D12_TILEPOOL_EXT 0x9589 +#define GL_HANDLE_TYPE_OPAQUE_FD_EXT 0x9586 +#define GL_HANDLE_TYPE_OPAQUE_WIN32_EXT 0x9587 +#define GL_HANDLE_TYPE_OPAQUE_WIN32_KMT_EXT 0x9588 +#define GL_HARDLIGHT_KHR 0x929B +#define GL_HARDLIGHT_NV 0x929B +#define GL_HARDMIX_NV 0x92A9 +#define GL_HIGH_FLOAT 0x8DF2 +#define GL_HIGH_INT 0x8DF5 +#define GL_HILO16_NV 0x86F8 +#define GL_HILO8_NV 0x885E +#define GL_HILO_NV 0x86F4 +#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B +#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A +#define GL_HISTOGRAM_EXT 0x8024 +#define GL_HISTOGRAM_FORMAT_EXT 0x8027 +#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029 +#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C +#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028 +#define GL_HISTOGRAM_SINK_EXT 0x802D +#define GL_HISTOGRAM_WIDTH_EXT 0x8026 +#define GL_HI_BIAS_NV 0x8714 +#define GL_HI_SCALE_NV 0x870E +#define GL_HORIZONTAL_LINE_TO_NV 0x06 +#define GL_HSL_COLOR_KHR 0x92AF +#define GL_HSL_COLOR_NV 0x92AF +#define GL_HSL_HUE_KHR 0x92AD +#define GL_HSL_HUE_NV 0x92AD +#define GL_HSL_LUMINOSITY_KHR 0x92B0 +#define GL_HSL_LUMINOSITY_NV 0x92B0 +#define GL_HSL_SATURATION_KHR 0x92AE +#define GL_HSL_SATURATION_NV 0x92AE +#define GL_IDENTITY_NV 0x862A +#define GL_IGNORE_BORDER_HP 0x8150 +#define GL_IMAGE_1D 0x904C +#define GL_IMAGE_1D_ARRAY 0x9052 +#define GL_IMAGE_1D_ARRAY_EXT 0x9052 +#define GL_IMAGE_1D_EXT 0x904C +#define GL_IMAGE_2D 0x904D +#define GL_IMAGE_2D_ARRAY 0x9053 +#define GL_IMAGE_2D_ARRAY_EXT 0x9053 +#define GL_IMAGE_2D_EXT 0x904D +#define GL_IMAGE_2D_MULTISAMPLE 0x9055 +#define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056 +#define GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9056 +#define GL_IMAGE_2D_MULTISAMPLE_EXT 0x9055 +#define GL_IMAGE_2D_RECT 0x904F +#define GL_IMAGE_2D_RECT_EXT 0x904F +#define GL_IMAGE_3D 0x904E +#define GL_IMAGE_3D_EXT 0x904E +#define GL_IMAGE_BINDING_ACCESS 0x8F3E +#define GL_IMAGE_BINDING_ACCESS_EXT 0x8F3E +#define GL_IMAGE_BINDING_FORMAT 0x906E +#define GL_IMAGE_BINDING_FORMAT_EXT 0x906E +#define GL_IMAGE_BINDING_LAYER 0x8F3D +#define GL_IMAGE_BINDING_LAYERED 0x8F3C +#define GL_IMAGE_BINDING_LAYERED_EXT 0x8F3C +#define GL_IMAGE_BINDING_LAYER_EXT 0x8F3D +#define GL_IMAGE_BINDING_LEVEL 0x8F3B +#define GL_IMAGE_BINDING_LEVEL_EXT 0x8F3B +#define GL_IMAGE_BINDING_NAME 0x8F3A +#define GL_IMAGE_BINDING_NAME_EXT 0x8F3A +#define GL_IMAGE_BUFFER 0x9051 +#define GL_IMAGE_BUFFER_EXT 0x9051 +#define GL_IMAGE_CLASS_10_10_10_2 0x82C3 +#define GL_IMAGE_CLASS_11_11_10 0x82C2 +#define GL_IMAGE_CLASS_1_X_16 0x82BE +#define GL_IMAGE_CLASS_1_X_32 0x82BB +#define GL_IMAGE_CLASS_1_X_8 0x82C1 +#define GL_IMAGE_CLASS_2_X_16 0x82BD +#define GL_IMAGE_CLASS_2_X_32 0x82BA +#define GL_IMAGE_CLASS_2_X_8 0x82C0 +#define GL_IMAGE_CLASS_4_X_16 0x82BC +#define GL_IMAGE_CLASS_4_X_32 0x82B9 +#define GL_IMAGE_CLASS_4_X_8 0x82BF +#define GL_IMAGE_COMPATIBILITY_CLASS 0x82A8 +#define GL_IMAGE_CUBE 0x9050 +#define GL_IMAGE_CUBE_EXT 0x9050 +#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054 +#define GL_IMAGE_CUBE_MAP_ARRAY_EXT 0x9054 +#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E +#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9 +#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8 +#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7 +#define GL_IMAGE_MAG_FILTER_HP 0x815C +#define GL_IMAGE_MIN_FILTER_HP 0x815D +#define GL_IMAGE_PIXEL_FORMAT 0x82A9 +#define GL_IMAGE_PIXEL_TYPE 0x82AA +#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159 +#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A +#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B +#define GL_IMAGE_SCALE_X_HP 0x8155 +#define GL_IMAGE_SCALE_Y_HP 0x8156 +#define GL_IMAGE_TEXEL_SIZE 0x82A7 +#define GL_IMAGE_TRANSFORM_2D_HP 0x8161 +#define GL_IMAGE_TRANSLATE_X_HP 0x8157 +#define GL_IMAGE_TRANSLATE_Y_HP 0x8158 +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B +#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A +#define GL_INCLUSIVE_EXT 0x8F10 +#define GL_INCR 0x1E02 +#define GL_INCR_WRAP 0x8507 +#define GL_INCR_WRAP_EXT 0x8507 +#define GL_INDEX_ARRAY_ADDRESS_NV 0x8F24 +#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899 +#define GL_INDEX_ARRAY_COUNT_EXT 0x8087 +#define GL_INDEX_ARRAY_EXT 0x8077 +#define GL_INDEX_ARRAY_LENGTH_NV 0x8F2E +#define GL_INDEX_ARRAY_LIST_IBM 103073 +#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083 +#define GL_INDEX_ARRAY_POINTER_EXT 0x8091 +#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086 +#define GL_INDEX_ARRAY_TYPE_EXT 0x8085 +#define GL_INDEX_BIT_PGI 0x00080000 +#define GL_INDEX_MATERIAL_EXT 0x81B8 +#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA +#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9 +#define GL_INDEX_TEST_EXT 0x81B5 +#define GL_INDEX_TEST_FUNC_EXT 0x81B6 +#define GL_INDEX_TEST_REF_EXT 0x81B7 +#define GL_INFO_LOG_LENGTH 0x8B84 +#define GL_INNOCENT_CONTEXT_RESET 0x8254 +#define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254 +#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180 +#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181 +#define GL_INT 0x1404 +#define GL_INT16_NV 0x8FE4 +#define GL_INT16_VEC2_NV 0x8FE5 +#define GL_INT16_VEC3_NV 0x8FE6 +#define GL_INT16_VEC4_NV 0x8FE7 +#define GL_INT64_ARB 0x140E +#define GL_INT64_NV 0x140E +#define GL_INT64_VEC2_ARB 0x8FE9 +#define GL_INT64_VEC2_NV 0x8FE9 +#define GL_INT64_VEC3_ARB 0x8FEA +#define GL_INT64_VEC3_NV 0x8FEA +#define GL_INT64_VEC4_ARB 0x8FEB +#define GL_INT64_VEC4_NV 0x8FEB +#define GL_INT8_NV 0x8FE0 +#define GL_INT8_VEC2_NV 0x8FE1 +#define GL_INT8_VEC3_NV 0x8FE2 +#define GL_INT8_VEC4_NV 0x8FE3 +#define GL_INTENSITY12_EXT 0x804C +#define GL_INTENSITY16F_ARB 0x881D +#define GL_INTENSITY16I_EXT 0x8D8B +#define GL_INTENSITY16UI_EXT 0x8D79 +#define GL_INTENSITY16_EXT 0x804D +#define GL_INTENSITY16_SNORM 0x901B +#define GL_INTENSITY32F_ARB 0x8817 +#define GL_INTENSITY32I_EXT 0x8D85 +#define GL_INTENSITY32UI_EXT 0x8D73 +#define GL_INTENSITY4_EXT 0x804A +#define GL_INTENSITY8I_EXT 0x8D91 +#define GL_INTENSITY8UI_EXT 0x8D7F +#define GL_INTENSITY8_EXT 0x804B +#define GL_INTENSITY8_SNORM 0x9017 +#define GL_INTENSITY_EXT 0x8049 +#define GL_INTENSITY_FLOAT16_APPLE 0x881D +#define GL_INTENSITY_FLOAT16_ATI 0x881D +#define GL_INTENSITY_FLOAT32_APPLE 0x8817 +#define GL_INTENSITY_FLOAT32_ATI 0x8817 +#define GL_INTENSITY_SNORM 0x9013 +#define GL_INTERLACE_OML 0x8980 +#define GL_INTERLACE_READ_INGR 0x8568 +#define GL_INTERLACE_READ_OML 0x8981 +#define GL_INTERLACE_SGIX 0x8094 +#define GL_INTERLEAVED_ATTRIBS 0x8C8C +#define GL_INTERLEAVED_ATTRIBS_EXT 0x8C8C +#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C +#define GL_INTERNALFORMAT_ALPHA_SIZE 0x8274 +#define GL_INTERNALFORMAT_ALPHA_TYPE 0x827B +#define GL_INTERNALFORMAT_BLUE_SIZE 0x8273 +#define GL_INTERNALFORMAT_BLUE_TYPE 0x827A +#define GL_INTERNALFORMAT_DEPTH_SIZE 0x8275 +#define GL_INTERNALFORMAT_DEPTH_TYPE 0x827C +#define GL_INTERNALFORMAT_GREEN_SIZE 0x8272 +#define GL_INTERNALFORMAT_GREEN_TYPE 0x8279 +#define GL_INTERNALFORMAT_PREFERRED 0x8270 +#define GL_INTERNALFORMAT_RED_SIZE 0x8271 +#define GL_INTERNALFORMAT_RED_TYPE 0x8278 +#define GL_INTERNALFORMAT_SHARED_SIZE 0x8277 +#define GL_INTERNALFORMAT_STENCIL_SIZE 0x8276 +#define GL_INTERNALFORMAT_STENCIL_TYPE 0x827D +#define GL_INTERNALFORMAT_SUPPORTED 0x826F +#define GL_INTERPOLATE_ARB 0x8575 +#define GL_INTERPOLATE_EXT 0x8575 +#define GL_INT_2_10_10_10_REV 0x8D9F +#define GL_INT_IMAGE_1D 0x9057 +#define GL_INT_IMAGE_1D_ARRAY 0x905D +#define GL_INT_IMAGE_1D_ARRAY_EXT 0x905D +#define GL_INT_IMAGE_1D_EXT 0x9057 +#define GL_INT_IMAGE_2D 0x9058 +#define GL_INT_IMAGE_2D_ARRAY 0x905E +#define GL_INT_IMAGE_2D_ARRAY_EXT 0x905E +#define GL_INT_IMAGE_2D_EXT 0x9058 +#define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060 +#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061 +#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9061 +#define GL_INT_IMAGE_2D_MULTISAMPLE_EXT 0x9060 +#define GL_INT_IMAGE_2D_RECT 0x905A +#define GL_INT_IMAGE_2D_RECT_EXT 0x905A +#define GL_INT_IMAGE_3D 0x9059 +#define GL_INT_IMAGE_3D_EXT 0x9059 +#define GL_INT_IMAGE_BUFFER 0x905C +#define GL_INT_IMAGE_BUFFER_EXT 0x905C +#define GL_INT_IMAGE_CUBE 0x905B +#define GL_INT_IMAGE_CUBE_EXT 0x905B +#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F +#define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x905F +#define GL_INT_SAMPLER_1D 0x8DC9 +#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE +#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE +#define GL_INT_SAMPLER_1D_EXT 0x8DC9 +#define GL_INT_SAMPLER_2D 0x8DCA +#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF +#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF +#define GL_INT_SAMPLER_2D_EXT 0x8DCA +#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109 +#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C +#define GL_INT_SAMPLER_2D_RECT 0x8DCD +#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD +#define GL_INT_SAMPLER_3D 0x8DCB +#define GL_INT_SAMPLER_3D_EXT 0x8DCB +#define GL_INT_SAMPLER_BUFFER 0x8DD0 +#define GL_INT_SAMPLER_BUFFER_AMD 0x9002 +#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0 +#define GL_INT_SAMPLER_CUBE 0x8DCC +#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC +#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E +#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E +#define GL_INT_SAMPLER_RENDERBUFFER_NV 0x8E57 +#define GL_INT_VEC2 0x8B53 +#define GL_INT_VEC2_ARB 0x8B53 +#define GL_INT_VEC3 0x8B54 +#define GL_INT_VEC3_ARB 0x8B54 +#define GL_INT_VEC4 0x8B55 +#define GL_INT_VEC4_ARB 0x8B55 +#define GL_INVALID_ENUM 0x0500 +#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 +#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506 +#define GL_INVALID_INDEX 0xFFFFFFFF +#define GL_INVALID_OPERATION 0x0502 +#define GL_INVALID_VALUE 0x0501 +#define GL_INVARIANT_DATATYPE_EXT 0x87EB +#define GL_INVARIANT_EXT 0x87C2 +#define GL_INVARIANT_VALUE_EXT 0x87EA +#define GL_INVERSE_NV 0x862B +#define GL_INVERSE_TRANSPOSE_NV 0x862D +#define GL_INVERT 0x150A +#define GL_INVERTED_SCREEN_W_REND 0x8491 +#define GL_INVERT_OVG_NV 0x92B4 +#define GL_INVERT_RGB_NV 0x92A3 +#define GL_IR_INSTRUMENT1_SGIX 0x817F +#define GL_ISOLINES 0x8E7A +#define GL_IS_PER_PATCH 0x92E7 +#define GL_IS_ROW_MAJOR 0x9300 +#define GL_ITALIC_BIT_NV 0x02 +#define GL_IUI_N3F_V2F_EXT 0x81AF +#define GL_IUI_N3F_V3F_EXT 0x81B0 +#define GL_IUI_V2F_EXT 0x81AD +#define GL_IUI_V3F_EXT 0x81AE +#define GL_KEEP 0x1E00 +#define GL_LARGE_CCW_ARC_TO_NV 0x16 +#define GL_LARGE_CW_ARC_TO_NV 0x18 +#define GL_LAST_VERTEX_CONVENTION 0x8E4E +#define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E +#define GL_LAST_VIDEO_CAPTURE_STATUS_NV 0x9027 +#define GL_LAYER_NV 0x8DAA +#define GL_LAYER_PROVOKING_VERTEX 0x825E +#define GL_LAYOUT_COLOR_ATTACHMENT_EXT 0x958E +#define GL_LAYOUT_DEFAULT_INTEL 0 +#define GL_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_EXT 0x9531 +#define GL_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_EXT 0x9530 +#define GL_LAYOUT_DEPTH_STENCIL_ATTACHMENT_EXT 0x958F +#define GL_LAYOUT_DEPTH_STENCIL_READ_ONLY_EXT 0x9590 +#define GL_LAYOUT_GENERAL_EXT 0x958D +#define GL_LAYOUT_LINEAR_CPU_CACHED_INTEL 2 +#define GL_LAYOUT_LINEAR_INTEL 1 +#define GL_LAYOUT_SHADER_READ_ONLY_EXT 0x9591 +#define GL_LAYOUT_TRANSFER_DST_EXT 0x9593 +#define GL_LAYOUT_TRANSFER_SRC_EXT 0x9592 +#define GL_LEFT 0x0406 +#define GL_LEQUAL 0x0203 +#define GL_LERP_ATI 0x8969 +#define GL_LESS 0x0201 +#define GL_LGPU_SEPARATE_STORAGE_BIT_NVX 0x0800 +#define GL_LIGHTEN_KHR 0x9298 +#define GL_LIGHTEN_NV 0x9298 +#define GL_LIGHT_ENV_MODE_SGIX 0x8407 +#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8 +#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0 +#define GL_LINE 0x1B01 +#define GL_LINEAR 0x2601 +#define GL_LINEARBURN_NV 0x92A5 +#define GL_LINEARDODGE_NV 0x92A4 +#define GL_LINEARLIGHT_NV 0x92A7 +#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170 +#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F +#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098 +#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099 +#define GL_LINEAR_DETAIL_SGIS 0x8097 +#define GL_LINEAR_MIPMAP_LINEAR 0x2703 +#define GL_LINEAR_MIPMAP_NEAREST 0x2701 +#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE +#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF +#define GL_LINEAR_SHARPEN_SGIS 0x80AD +#define GL_LINEAR_TILING_EXT 0x9585 +#define GL_LINES 0x0001 +#define GL_LINES_ADJACENCY 0x000A +#define GL_LINES_ADJACENCY_ARB 0x000A +#define GL_LINES_ADJACENCY_EXT 0x000A +#define GL_LINE_LOOP 0x0002 +#define GL_LINE_SMOOTH 0x0B20 +#define GL_LINE_SMOOTH_HINT 0x0C52 +#define GL_LINE_STRIP 0x0003 +#define GL_LINE_STRIP_ADJACENCY 0x000B +#define GL_LINE_STRIP_ADJACENCY_ARB 0x000B +#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B +#define GL_LINE_TO_NV 0x04 +#define GL_LINE_WIDTH 0x0B21 +#define GL_LINE_WIDTH_COMMAND_NV 0x000D +#define GL_LINE_WIDTH_GRANULARITY 0x0B23 +#define GL_LINE_WIDTH_RANGE 0x0B22 +#define GL_LINK_STATUS 0x8B82 +#define GL_LIST_PRIORITY_SGIX 0x8182 +#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED +#define GL_LOCAL_CONSTANT_EXT 0x87C3 +#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC +#define GL_LOCAL_EXT 0x87C4 +#define GL_LOCATION 0x930E +#define GL_LOCATION_COMPONENT 0x934A +#define GL_LOCATION_INDEX 0x930F +#define GL_LOGIC_OP_MODE 0x0BF0 +#define GL_LOSE_CONTEXT_ON_RESET 0x8252 +#define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 +#define GL_LOWER_LEFT 0x8CA1 +#define GL_LOW_FLOAT 0x8DF0 +#define GL_LOW_INT 0x8DF3 +#define GL_LO_BIAS_NV 0x8715 +#define GL_LO_SCALE_NV 0x870F +#define GL_LUID_SIZE_EXT 8 +#define GL_LUMINANCE12_ALPHA12_EXT 0x8047 +#define GL_LUMINANCE12_ALPHA4_EXT 0x8046 +#define GL_LUMINANCE12_EXT 0x8041 +#define GL_LUMINANCE16F_ARB 0x881E +#define GL_LUMINANCE16F_EXT 0x881E +#define GL_LUMINANCE16I_EXT 0x8D8C +#define GL_LUMINANCE16UI_EXT 0x8D7A +#define GL_LUMINANCE16_ALPHA16_EXT 0x8048 +#define GL_LUMINANCE16_ALPHA16_SNORM 0x901A +#define GL_LUMINANCE16_EXT 0x8042 +#define GL_LUMINANCE16_SNORM 0x9019 +#define GL_LUMINANCE32F_ARB 0x8818 +#define GL_LUMINANCE32F_EXT 0x8818 +#define GL_LUMINANCE32I_EXT 0x8D86 +#define GL_LUMINANCE32UI_EXT 0x8D74 +#define GL_LUMINANCE4_ALPHA4_EXT 0x8043 +#define GL_LUMINANCE4_EXT 0x803F +#define GL_LUMINANCE6_ALPHA2_EXT 0x8044 +#define GL_LUMINANCE8I_EXT 0x8D92 +#define GL_LUMINANCE8UI_EXT 0x8D80 +#define GL_LUMINANCE8_ALPHA8_EXT 0x8045 +#define GL_LUMINANCE8_ALPHA8_SNORM 0x9016 +#define GL_LUMINANCE8_EXT 0x8040 +#define GL_LUMINANCE8_SNORM 0x9015 +#define GL_LUMINANCE_ALPHA16F_ARB 0x881F +#define GL_LUMINANCE_ALPHA16F_EXT 0x881F +#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D +#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B +#define GL_LUMINANCE_ALPHA32F_ARB 0x8819 +#define GL_LUMINANCE_ALPHA32F_EXT 0x8819 +#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87 +#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75 +#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93 +#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81 +#define GL_LUMINANCE_ALPHA_FLOAT16_APPLE 0x881F +#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F +#define GL_LUMINANCE_ALPHA_FLOAT32_APPLE 0x8819 +#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819 +#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D +#define GL_LUMINANCE_ALPHA_SNORM 0x9012 +#define GL_LUMINANCE_FLOAT16_APPLE 0x881E +#define GL_LUMINANCE_FLOAT16_ATI 0x881E +#define GL_LUMINANCE_FLOAT32_APPLE 0x8818 +#define GL_LUMINANCE_FLOAT32_ATI 0x8818 +#define GL_LUMINANCE_INTEGER_EXT 0x8D9C +#define GL_LUMINANCE_SNORM 0x9011 +#define GL_MAD_ATI 0x8968 +#define GL_MAGNITUDE_BIAS_NV 0x8718 +#define GL_MAGNITUDE_SCALE_NV 0x8712 +#define GL_MAJOR_VERSION 0x821B +#define GL_MANUAL_GENERATE_MIPMAP 0x8294 +#define GL_MAP1_BINORMAL_EXT 0x8446 +#define GL_MAP1_TANGENT_EXT 0x8444 +#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660 +#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A +#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B +#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C +#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D +#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E +#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F +#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661 +#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662 +#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663 +#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664 +#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665 +#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666 +#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667 +#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668 +#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669 +#define GL_MAP2_BINORMAL_EXT 0x8447 +#define GL_MAP2_TANGENT_EXT 0x8445 +#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670 +#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A +#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B +#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C +#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D +#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E +#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F +#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671 +#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672 +#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673 +#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674 +#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675 +#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676 +#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677 +#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678 +#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679 +#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3 +#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4 +#define GL_MAP_COHERENT_BIT 0x0080 +#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 +#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 +#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 +#define GL_MAP_PERSISTENT_BIT 0x0040 +#define GL_MAP_READ_BIT 0x0001 +#define GL_MAP_TESSELLATION_NV 0x86C2 +#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 +#define GL_MAP_WRITE_BIT 0x0002 +#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C +#define GL_MATRIX0_ARB 0x88C0 +#define GL_MATRIX0_NV 0x8630 +#define GL_MATRIX10_ARB 0x88CA +#define GL_MATRIX11_ARB 0x88CB +#define GL_MATRIX12_ARB 0x88CC +#define GL_MATRIX13_ARB 0x88CD +#define GL_MATRIX14_ARB 0x88CE +#define GL_MATRIX15_ARB 0x88CF +#define GL_MATRIX16_ARB 0x88D0 +#define GL_MATRIX17_ARB 0x88D1 +#define GL_MATRIX18_ARB 0x88D2 +#define GL_MATRIX19_ARB 0x88D3 +#define GL_MATRIX1_ARB 0x88C1 +#define GL_MATRIX1_NV 0x8631 +#define GL_MATRIX20_ARB 0x88D4 +#define GL_MATRIX21_ARB 0x88D5 +#define GL_MATRIX22_ARB 0x88D6 +#define GL_MATRIX23_ARB 0x88D7 +#define GL_MATRIX24_ARB 0x88D8 +#define GL_MATRIX25_ARB 0x88D9 +#define GL_MATRIX26_ARB 0x88DA +#define GL_MATRIX27_ARB 0x88DB +#define GL_MATRIX28_ARB 0x88DC +#define GL_MATRIX29_ARB 0x88DD +#define GL_MATRIX2_ARB 0x88C2 +#define GL_MATRIX2_NV 0x8632 +#define GL_MATRIX30_ARB 0x88DE +#define GL_MATRIX31_ARB 0x88DF +#define GL_MATRIX3_ARB 0x88C3 +#define GL_MATRIX3_NV 0x8633 +#define GL_MATRIX4_ARB 0x88C4 +#define GL_MATRIX4_NV 0x8634 +#define GL_MATRIX5_ARB 0x88C5 +#define GL_MATRIX5_NV 0x8635 +#define GL_MATRIX6_ARB 0x88C6 +#define GL_MATRIX6_NV 0x8636 +#define GL_MATRIX7_ARB 0x88C7 +#define GL_MATRIX7_NV 0x8637 +#define GL_MATRIX8_ARB 0x88C8 +#define GL_MATRIX9_ARB 0x88C9 +#define GL_MATRIX_EXT 0x87C0 +#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844 +#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849 +#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846 +#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848 +#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847 +#define GL_MATRIX_PALETTE_ARB 0x8840 +#define GL_MATRIX_STRIDE 0x92FF +#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000 +#define GL_MAT_AMBIENT_BIT_PGI 0x00100000 +#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000 +#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000 +#define GL_MAT_EMISSION_BIT_PGI 0x00800000 +#define GL_MAT_SHININESS_BIT_PGI 0x02000000 +#define GL_MAT_SPECULAR_BIT_PGI 0x04000000 +#define GL_MAX 0x8008 +#define GL_MAX_3D_TEXTURE_SIZE 0x8073 +#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073 +#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138 +#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405 +#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF +#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF +#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360 +#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D +#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361 +#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F +#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC +#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8 +#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED +#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177 +#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178 +#define GL_MAX_CLIP_DISTANCES 0x0D32 +#define GL_MAX_COARSE_FRAGMENT_SAMPLES_NV 0x955F +#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF +#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF +#define GL_MAX_COLOR_FRAMEBUFFER_SAMPLES_AMD 0x91B3 +#define GL_MAX_COLOR_FRAMEBUFFER_STORAGE_SAMPLES_AMD 0x91B4 +#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3 +#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E +#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7 +#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1 +#define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES 0x82FA +#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266 +#define GL_MAX_COMBINED_DIMENSIONS 0x8282 +#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 +#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32 +#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF +#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39 +#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT 0x8F39 +#define GL_MAX_COMBINED_MESH_UNIFORM_COMPONENTS_NV 0x8E67 +#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39 +#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC +#define GL_MAX_COMBINED_TASK_UNIFORM_COMPONENTS_NV 0x8E6F +#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E +#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D +#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E +#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 +#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265 +#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264 +#define GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB 0x90EB +#define GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB 0x91BF +#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD +#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB +#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262 +#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC +#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB +#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263 +#define GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB 0x9344 +#define GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB 0x9345 +#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE +#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB +#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF +#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B +#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C +#define GL_MAX_CULL_DISTANCES 0x82F9 +#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C +#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144 +#define GL_MAX_DEBUG_LOGGED_MESSAGES_AMD 0x9144 +#define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144 +#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143 +#define GL_MAX_DEBUG_MESSAGE_LENGTH_AMD 0x9143 +#define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143 +#define GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV 0x90D1 +#define GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV 0x90D0 +#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197 +#define GL_MAX_DEPTH 0x8280 +#define GL_MAX_DEPTH_STENCIL_FRAMEBUFFER_SAMPLES_AMD 0x91B5 +#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F +#define GL_MAX_DETACHED_BUFFERS_NV 0x95AD +#define GL_MAX_DETACHED_TEXTURES_NV 0x95AC +#define GL_MAX_DRAW_BUFFERS 0x8824 +#define GL_MAX_DRAW_BUFFERS_ARB 0x8824 +#define GL_MAX_DRAW_BUFFERS_ATI 0x8824 +#define GL_MAX_DRAW_MESH_TASKS_COUNT_NV 0x953D +#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC +#define GL_MAX_ELEMENTS_INDICES 0x80E9 +#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9 +#define GL_MAX_ELEMENTS_VERTICES 0x80E8 +#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8 +#define GL_MAX_ELEMENT_INDEX 0x8D6B +#define GL_MAX_EXT 0x8008 +#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C +#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6 +#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0 +#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3 +#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE +#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 +#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C +#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5C +#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404 +#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868 +#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA +#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49 +#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD +#define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316 +#define GL_MAX_FRAMEBUFFER_LAYERS 0x9317 +#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318 +#define GL_MAX_FRAMEBUFFER_WIDTH 0x9315 +#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D +#define GL_MAX_GENERAL_COMBINERS_NV 0x854D +#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5 +#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF +#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4 +#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD +#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123 +#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124 +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0 +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0 +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0 +#define GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV 0x8E5A +#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A +#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7 +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29 +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29 +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1 +#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF +#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD +#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD +#define GL_MAX_HEIGHT 0x827F +#define GL_MAX_IMAGE_SAMPLES 0x906D +#define GL_MAX_IMAGE_SAMPLES_EXT 0x906D +#define GL_MAX_IMAGE_UNITS 0x8F38 +#define GL_MAX_IMAGE_UNITS_EXT 0x8F38 +#define GL_MAX_INTEGER_SAMPLES 0x9110 +#define GL_MAX_LABEL_LENGTH 0x82E8 +#define GL_MAX_LAYERS 0x8281 +#define GL_MAX_LGPU_GPUS_NVX 0x92BA +#define GL_MAX_MAP_TESSELLATION_NV 0x86D6 +#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841 +#define GL_MAX_MESH_ATOMIC_COUNTERS_NV 0x8E65 +#define GL_MAX_MESH_ATOMIC_COUNTER_BUFFERS_NV 0x8E64 +#define GL_MAX_MESH_IMAGE_UNIFORMS_NV 0x8E62 +#define GL_MAX_MESH_OUTPUT_PRIMITIVES_NV 0x9539 +#define GL_MAX_MESH_OUTPUT_VERTICES_NV 0x9538 +#define GL_MAX_MESH_SHADER_STORAGE_BLOCKS_NV 0x8E66 +#define GL_MAX_MESH_TEXTURE_IMAGE_UNITS_NV 0x8E61 +#define GL_MAX_MESH_TOTAL_MEMORY_SIZE_NV 0x9536 +#define GL_MAX_MESH_UNIFORM_BLOCKS_NV 0x8E60 +#define GL_MAX_MESH_UNIFORM_COMPONENTS_NV 0x8E63 +#define GL_MAX_MESH_VIEWS_NV 0x9557 +#define GL_MAX_MESH_WORK_GROUP_INVOCATIONS_NV 0x95A2 +#define GL_MAX_MESH_WORK_GROUP_SIZE_NV 0x953B +#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11 +#define GL_MAX_NAME_LENGTH 0x92F6 +#define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7 +#define GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8 +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB +#define GL_MAX_PALETTE_MATRICES_ARB 0x8842 +#define GL_MAX_PATCH_VERTICES 0x8E7D +#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337 +#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1 +#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1 +#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B +#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD +#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908 +#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5 +#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5 +#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4 +#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5 +#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6 +#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6 +#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1 +#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4 +#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8 +#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7 +#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F +#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E +#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3 +#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E +#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF +#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3 +#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB +#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7 +#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810 +#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F +#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27 +#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9 +#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0 +#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1 +#define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV 0x86D8 +#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909 +#define GL_MAX_PROGRAM_SUBROUTINE_NUM_NV 0x8F45 +#define GL_MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV 0x8F44 +#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5 +#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 +#define GL_MAX_PROGRAM_TEXEL_OFFSET_EXT 0x8905 +#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905 +#define GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB 0x8F9F +#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F +#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F +#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5F +#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D +#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C +#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28 +#define GL_MAX_RASTER_SAMPLES_EXT 0x9329 +#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8 +#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 +#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8 +#define GL_MAX_SAMPLES 0x8D57 +#define GL_MAX_SAMPLES_EXT 0x8D57 +#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59 +#define GL_MAX_SAMPLE_MASK_WORDS_NV 0x8E59 +#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 +#define GL_MAX_SHADER_BUFFER_ADDRESS_NV 0x8F35 +#define GL_MAX_SHADER_COMPILER_THREADS_ARB 0x91B0 +#define GL_MAX_SHADER_COMPILER_THREADS_KHR 0x91B0 +#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE +#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD +#define GL_MAX_SHININESS_NV 0x8504 +#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD 0x9199 +#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB 0x9199 +#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS 0x919A +#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB 0x919A +#define GL_MAX_SPARSE_TEXTURE_SIZE_AMD 0x9198 +#define GL_MAX_SPARSE_TEXTURE_SIZE_ARB 0x9198 +#define GL_MAX_SPOT_EXPONENT_NV 0x8505 +#define GL_MAX_SUBPIXEL_PRECISION_BIAS_BITS_NV 0x9349 +#define GL_MAX_SUBROUTINES 0x8DE7 +#define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8 +#define GL_MAX_TASK_ATOMIC_COUNTERS_NV 0x8E6D +#define GL_MAX_TASK_ATOMIC_COUNTER_BUFFERS_NV 0x8E6C +#define GL_MAX_TASK_IMAGE_UNIFORMS_NV 0x8E6A +#define GL_MAX_TASK_OUTPUT_COUNT_NV 0x953A +#define GL_MAX_TASK_SHADER_STORAGE_BLOCKS_NV 0x8E6E +#define GL_MAX_TASK_TEXTURE_IMAGE_UNITS_NV 0x8E69 +#define GL_MAX_TASK_TOTAL_MEMORY_SIZE_NV 0x9537 +#define GL_MAX_TASK_UNIFORM_BLOCKS_NV 0x8E68 +#define GL_MAX_TASK_UNIFORM_COMPONENTS_NV 0x8E6B +#define GL_MAX_TASK_WORK_GROUP_INVOCATIONS_NV 0x95A3 +#define GL_MAX_TASK_WORK_GROUP_SIZE_NV 0x953C +#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3 +#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD +#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB +#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C +#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83 +#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8 +#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81 +#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85 +#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89 +#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F +#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4 +#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE +#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC +#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D +#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86 +#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9 +#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82 +#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A +#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80 +#define GL_MAX_TESS_GEN_LEVEL 0x8E7E +#define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84 +#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B +#define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B +#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B +#define GL_MAX_TEXTURE_COORDS_ARB 0x8871 +#define GL_MAX_TEXTURE_COORDS_NV 0x8871 +#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 +#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872 +#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872 +#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD +#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD +#define GL_MAX_TEXTURE_MAX_ANISOTROPY 0x84FF +#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF +#define GL_MAX_TEXTURE_SIZE 0x0D33 +#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 +#define GL_MAX_TIMELINE_SEMAPHORE_VALUE_DIFFERENCE_NV 0x95B6 +#define GL_MAX_TRACK_MATRICES_NV 0x862F +#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E +#define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70 +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80 +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80 +#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 +#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F +#define GL_MAX_UNIFORM_LOCATIONS 0x826E +#define GL_MAX_VARYING_COMPONENTS 0x8B4B +#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B +#define GL_MAX_VARYING_FLOATS 0x8B4B +#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B +#define GL_MAX_VARYING_VECTORS 0x8DFC +#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520 +#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2 +#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC +#define GL_MAX_VERTEX_ATTRIBS 0x8869 +#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869 +#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA +#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9 +#define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5 +#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2 +#define GL_MAX_VERTEX_HINT_PGI 0x1A22D +#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA +#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 +#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5 +#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7 +#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9 +#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8 +#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6 +#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6 +#define GL_MAX_VERTEX_STREAMS 0x8E71 +#define GL_MAX_VERTEX_STREAMS_ATI 0x876B +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C +#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A +#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB +#define GL_MAX_VERTEX_UNITS_ARB 0x86A4 +#define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE +#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE +#define GL_MAX_VIEWPORTS 0x825B +#define GL_MAX_VIEWPORT_DIMS 0x0D3A +#define GL_MAX_VIEWS_OVR 0x9631 +#define GL_MAX_WIDTH 0x827E +#define GL_MAX_WINDOW_RECTANGLES_EXT 0x8F14 +#define GL_MEDIUM_FLOAT 0x8DF1 +#define GL_MEDIUM_INT 0x8DF4 +#define GL_MEMORY_ATTACHABLE_ALIGNMENT_NV 0x95A6 +#define GL_MEMORY_ATTACHABLE_NV 0x95A8 +#define GL_MEMORY_ATTACHABLE_SIZE_NV 0x95A7 +#define GL_MESH_OUTPUT_PER_PRIMITIVE_GRANULARITY_NV 0x9543 +#define GL_MESH_OUTPUT_PER_VERTEX_GRANULARITY_NV 0x92DF +#define GL_MESH_OUTPUT_TYPE_NV 0x957B +#define GL_MESH_PRIMITIVES_OUT_NV 0x957A +#define GL_MESH_SHADER_BIT_NV 0x00000040 +#define GL_MESH_SHADER_NV 0x9559 +#define GL_MESH_SUBROUTINE_NV 0x957C +#define GL_MESH_SUBROUTINE_UNIFORM_NV 0x957E +#define GL_MESH_VERTICES_OUT_NV 0x9579 +#define GL_MESH_WORK_GROUP_SIZE_NV 0x953E +#define GL_MIN 0x8007 +#define GL_MINMAX_EXT 0x802E +#define GL_MINMAX_FORMAT_EXT 0x802F +#define GL_MINMAX_SINK_EXT 0x8030 +#define GL_MINOR_VERSION 0x821C +#define GL_MINUS_CLAMPED_NV 0x92B3 +#define GL_MINUS_NV 0x929F +#define GL_MIN_EXT 0x8007 +#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B +#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5B +#define GL_MIN_LOD_WARNING_AMD 0x919C +#define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC +#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 +#define GL_MIN_PROGRAM_TEXEL_OFFSET_EXT 0x8904 +#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904 +#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E +#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E +#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5E +#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37 +#define GL_MIN_SAMPLE_SHADING_VALUE_ARB 0x8C37 +#define GL_MIN_SPARSE_LEVEL_AMD 0x919B +#define GL_MIPMAP 0x8293 +#define GL_MIRRORED_REPEAT 0x8370 +#define GL_MIRRORED_REPEAT_ARB 0x8370 +#define GL_MIRRORED_REPEAT_IBM 0x8370 +#define GL_MIRROR_CLAMP_ATI 0x8742 +#define GL_MIRROR_CLAMP_EXT 0x8742 +#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912 +#define GL_MIRROR_CLAMP_TO_EDGE 0x8743 +#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743 +#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743 +#define GL_MITER_REVERT_NV 0x90A7 +#define GL_MITER_TRUNCATE_NV 0x90A8 +#define GL_MIXED_DEPTH_SAMPLES_SUPPORTED_NV 0x932F +#define GL_MIXED_STENCIL_SAMPLES_SUPPORTED_NV 0x9330 +#define GL_MODELVIEW0_ARB 0x1700 +#define GL_MODELVIEW0_EXT 0x1700 +#define GL_MODELVIEW0_MATRIX_EXT 0x0BA6 +#define GL_MODELVIEW0_STACK_DEPTH_EXT 0x0BA3 +#define GL_MODELVIEW10_ARB 0x872A +#define GL_MODELVIEW11_ARB 0x872B +#define GL_MODELVIEW12_ARB 0x872C +#define GL_MODELVIEW13_ARB 0x872D +#define GL_MODELVIEW14_ARB 0x872E +#define GL_MODELVIEW15_ARB 0x872F +#define GL_MODELVIEW16_ARB 0x8730 +#define GL_MODELVIEW17_ARB 0x8731 +#define GL_MODELVIEW18_ARB 0x8732 +#define GL_MODELVIEW19_ARB 0x8733 +#define GL_MODELVIEW1_ARB 0x850A +#define GL_MODELVIEW1_EXT 0x850A +#define GL_MODELVIEW1_MATRIX_EXT 0x8506 +#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502 +#define GL_MODELVIEW20_ARB 0x8734 +#define GL_MODELVIEW21_ARB 0x8735 +#define GL_MODELVIEW22_ARB 0x8736 +#define GL_MODELVIEW23_ARB 0x8737 +#define GL_MODELVIEW24_ARB 0x8738 +#define GL_MODELVIEW25_ARB 0x8739 +#define GL_MODELVIEW26_ARB 0x873A +#define GL_MODELVIEW27_ARB 0x873B +#define GL_MODELVIEW28_ARB 0x873C +#define GL_MODELVIEW29_ARB 0x873D +#define GL_MODELVIEW2_ARB 0x8722 +#define GL_MODELVIEW30_ARB 0x873E +#define GL_MODELVIEW31_ARB 0x873F +#define GL_MODELVIEW3_ARB 0x8723 +#define GL_MODELVIEW4_ARB 0x8724 +#define GL_MODELVIEW5_ARB 0x8725 +#define GL_MODELVIEW6_ARB 0x8726 +#define GL_MODELVIEW7_ARB 0x8727 +#define GL_MODELVIEW8_ARB 0x8728 +#define GL_MODELVIEW9_ARB 0x8729 +#define GL_MODELVIEW_PROJECTION_NV 0x8629 +#define GL_MODULATE_ADD_ATI 0x8744 +#define GL_MODULATE_SIGNED_ADD_ATI 0x8745 +#define GL_MODULATE_SUBTRACT_ATI 0x8746 +#define GL_MOVE_TO_CONTINUES_NV 0x90B6 +#define GL_MOVE_TO_NV 0x02 +#define GL_MOVE_TO_RESETS_NV 0x90B5 +#define GL_MOV_ATI 0x8961 +#define GL_MULTICAST_GPUS_NV 0x92BA +#define GL_MULTICAST_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9549 +#define GL_MULTIPLY_KHR 0x9294 +#define GL_MULTIPLY_NV 0x9294 +#define GL_MULTISAMPLE 0x809D +#define GL_MULTISAMPLES_NV 0x9371 +#define GL_MULTISAMPLE_3DFX 0x86B2 +#define GL_MULTISAMPLE_ARB 0x809D +#define GL_MULTISAMPLE_BIT_3DFX 0x20000000 +#define GL_MULTISAMPLE_BIT_ARB 0x20000000 +#define GL_MULTISAMPLE_BIT_EXT 0x20000000 +#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12 +#define GL_MULTISAMPLE_EXT 0x809D +#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534 +#define GL_MULTISAMPLE_LINE_WIDTH_GRANULARITY_ARB 0x9382 +#define GL_MULTISAMPLE_LINE_WIDTH_RANGE_ARB 0x9381 +#define GL_MULTISAMPLE_RASTERIZATION_ALLOWED_EXT 0x932B +#define GL_MULTISAMPLE_SGIS 0x809D +#define GL_MUL_ATI 0x8964 +#define GL_MVP_MATRIX_EXT 0x87E3 +#define GL_NAMED_STRING_LENGTH_ARB 0x8DE9 +#define GL_NAMED_STRING_TYPE_ARB 0x8DEA +#define GL_NAME_LENGTH 0x92F9 +#define GL_NAND 0x150E +#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203 +#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204 +#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202 +#define GL_NEAREST 0x2600 +#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E +#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D +#define GL_NEAREST_MIPMAP_LINEAR 0x2702 +#define GL_NEAREST_MIPMAP_NEAREST 0x2700 +#define GL_NEGATE_BIT_ATI 0x00000004 +#define GL_NEGATIVE_ONE_EXT 0x87DF +#define GL_NEGATIVE_ONE_TO_ONE 0x935E +#define GL_NEGATIVE_W_EXT 0x87DC +#define GL_NEGATIVE_X_EXT 0x87D9 +#define GL_NEGATIVE_Y_EXT 0x87DA +#define GL_NEGATIVE_Z_EXT 0x87DB +#define GL_NEVER 0x0200 +#define GL_NEXT_BUFFER_NV -2 +#define GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV 0x9025 +#define GL_NICEST 0x1102 +#define GL_NONE 0 +#define GL_NOOP 0x1505 +#define GL_NOP_COMMAND_NV 0x0001 +#define GL_NOR 0x1508 +#define GL_NORMALIZED_RANGE_EXT 0x87E0 +#define GL_NORMAL_ARRAY_ADDRESS_NV 0x8F22 +#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897 +#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080 +#define GL_NORMAL_ARRAY_EXT 0x8075 +#define GL_NORMAL_ARRAY_LENGTH_NV 0x8F2C +#define GL_NORMAL_ARRAY_LIST_IBM 103071 +#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081 +#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6 +#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F +#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F +#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E +#define GL_NORMAL_BIT_PGI 0x08000000 +#define GL_NORMAL_MAP_ARB 0x8511 +#define GL_NORMAL_MAP_EXT 0x8511 +#define GL_NORMAL_MAP_NV 0x8511 +#define GL_NOTEQUAL 0x0205 +#define GL_NO_ERROR 0 +#define GL_NO_RESET_NOTIFICATION 0x8261 +#define GL_NO_RESET_NOTIFICATION_ARB 0x8261 +#define GL_NUM_ACTIVE_VARIABLES 0x9304 +#define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2 +#define GL_NUM_DEVICE_UUIDS_EXT 0x9596 +#define GL_NUM_EXTENSIONS 0x821D +#define GL_NUM_FILL_STREAMS_NV 0x8E29 +#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F +#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E +#define GL_NUM_GENERAL_COMBINERS_NV 0x854E +#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973 +#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971 +#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972 +#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974 +#define GL_NUM_PASSES_ATI 0x8970 +#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE +#define GL_NUM_SAMPLE_COUNTS 0x9380 +#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 +#define GL_NUM_SHADING_LANGUAGE_VERSIONS 0x82E9 +#define GL_NUM_SPARSE_LEVELS_ARB 0x91AA +#define GL_NUM_SPIR_V_EXTENSIONS 0x9554 +#define GL_NUM_SUPPORTED_MULTISAMPLE_MODES_AMD 0x91B6 +#define GL_NUM_TILING_TYPES_EXT 0x9582 +#define GL_NUM_VIDEO_CAPTURE_STREAMS_NV 0x9024 +#define GL_NUM_VIRTUAL_PAGE_SIZES_ARB 0x91A8 +#define GL_NUM_WINDOW_RECTANGLES_EXT 0x8F15 +#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89 +#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A +#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86 +#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87 +#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85 +#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764 +#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765 +#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81 +#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80 +#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3 +#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1 +#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84 +#define GL_OBJECT_LINE_SGIS 0x81F7 +#define GL_OBJECT_LINK_STATUS_ARB 0x8B82 +#define GL_OBJECT_POINT_SGIS 0x81F5 +#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88 +#define GL_OBJECT_SUBTYPE_ARB 0x8B4F +#define GL_OBJECT_TYPE 0x9112 +#define GL_OBJECT_TYPE_ARB 0x8B4E +#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83 +#define GL_OCCLUSION_QUERY_EVENT_MASK_AMD 0x874F +#define GL_OCCLUSION_TEST_HP 0x8165 +#define GL_OCCLUSION_TEST_RESULT_HP 0x8166 +#define GL_OFFSET 0x92FC +#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856 +#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857 +#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854 +#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855 +#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850 +#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851 +#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852 +#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853 +#define GL_OFFSET_TEXTURE_2D_BIAS_NV 0x86E3 +#define GL_OFFSET_TEXTURE_2D_MATRIX_NV 0x86E1 +#define GL_OFFSET_TEXTURE_2D_NV 0x86E8 +#define GL_OFFSET_TEXTURE_2D_SCALE_NV 0x86E2 +#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3 +#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1 +#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C +#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D +#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2 +#define GL_ONE 1 +#define GL_ONE_EXT 0x87DE +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002 +#define GL_ONE_MINUS_DST_ALPHA 0x0305 +#define GL_ONE_MINUS_DST_COLOR 0x0307 +#define GL_ONE_MINUS_SRC1_ALPHA 0x88FB +#define GL_ONE_MINUS_SRC1_COLOR 0x88FA +#define GL_ONE_MINUS_SRC_ALPHA 0x0303 +#define GL_ONE_MINUS_SRC_COLOR 0x0301 +#define GL_OPERAND0_ALPHA_ARB 0x8598 +#define GL_OPERAND0_ALPHA_EXT 0x8598 +#define GL_OPERAND0_RGB_ARB 0x8590 +#define GL_OPERAND0_RGB_EXT 0x8590 +#define GL_OPERAND1_ALPHA_ARB 0x8599 +#define GL_OPERAND1_ALPHA_EXT 0x8599 +#define GL_OPERAND1_RGB_ARB 0x8591 +#define GL_OPERAND1_RGB_EXT 0x8591 +#define GL_OPERAND2_ALPHA_ARB 0x859A +#define GL_OPERAND2_ALPHA_EXT 0x859A +#define GL_OPERAND2_RGB_ARB 0x8592 +#define GL_OPERAND2_RGB_EXT 0x8592 +#define GL_OPERAND3_ALPHA_NV 0x859B +#define GL_OPERAND3_RGB_NV 0x8593 +#define GL_OPTIMAL_TILING_EXT 0x9584 +#define GL_OP_ADD_EXT 0x8787 +#define GL_OP_CLAMP_EXT 0x878E +#define GL_OP_CROSS_PRODUCT_EXT 0x8797 +#define GL_OP_DOT3_EXT 0x8784 +#define GL_OP_DOT4_EXT 0x8785 +#define GL_OP_EXP_BASE_2_EXT 0x8791 +#define GL_OP_FLOOR_EXT 0x878F +#define GL_OP_FRAC_EXT 0x8789 +#define GL_OP_INDEX_EXT 0x8782 +#define GL_OP_LOG_BASE_2_EXT 0x8792 +#define GL_OP_MADD_EXT 0x8788 +#define GL_OP_MAX_EXT 0x878A +#define GL_OP_MIN_EXT 0x878B +#define GL_OP_MOV_EXT 0x8799 +#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798 +#define GL_OP_MUL_EXT 0x8786 +#define GL_OP_NEGATE_EXT 0x8783 +#define GL_OP_POWER_EXT 0x8793 +#define GL_OP_RECIP_EXT 0x8794 +#define GL_OP_RECIP_SQRT_EXT 0x8795 +#define GL_OP_ROUND_EXT 0x8790 +#define GL_OP_SET_GE_EXT 0x878C +#define GL_OP_SET_LT_EXT 0x878D +#define GL_OP_SUB_EXT 0x8796 +#define GL_OR 0x1507 +#define GL_OR_INVERTED 0x150D +#define GL_OR_REVERSE 0x150B +#define GL_OUTPUT_COLOR0_EXT 0x879B +#define GL_OUTPUT_COLOR1_EXT 0x879C +#define GL_OUTPUT_FOG_EXT 0x87BD +#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D +#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7 +#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8 +#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9 +#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA +#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB +#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC +#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD +#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE +#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF +#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0 +#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E +#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1 +#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2 +#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3 +#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4 +#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5 +#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6 +#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7 +#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8 +#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9 +#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA +#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F +#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB +#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC +#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0 +#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1 +#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2 +#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3 +#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4 +#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5 +#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6 +#define GL_OUTPUT_VERTEX_EXT 0x879A +#define GL_OUT_OF_MEMORY 0x0505 +#define GL_OVERLAY_KHR 0x9296 +#define GL_OVERLAY_NV 0x9296 +#define GL_PACK_ALIGNMENT 0x0D05 +#define GL_PACK_CMYK_HINT_EXT 0x800E +#define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D +#define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C +#define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E +#define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B +#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131 +#define GL_PACK_IMAGE_HEIGHT 0x806C +#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C +#define GL_PACK_INVERT_MESA 0x8758 +#define GL_PACK_LSB_FIRST 0x0D01 +#define GL_PACK_RESAMPLE_OML 0x8984 +#define GL_PACK_RESAMPLE_SGIX 0x842E +#define GL_PACK_ROW_BYTES_APPLE 0x8A15 +#define GL_PACK_ROW_LENGTH 0x0D02 +#define GL_PACK_SKIP_IMAGES 0x806B +#define GL_PACK_SKIP_IMAGES_EXT 0x806B +#define GL_PACK_SKIP_PIXELS 0x0D04 +#define GL_PACK_SKIP_ROWS 0x0D03 +#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130 +#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0 +#define GL_PACK_SWAP_BYTES 0x0D00 +#define GL_PALETTE4_R5_G6_B5_OES 0x8B92 +#define GL_PALETTE4_RGB5_A1_OES 0x8B94 +#define GL_PALETTE4_RGB8_OES 0x8B90 +#define GL_PALETTE4_RGBA4_OES 0x8B93 +#define GL_PALETTE4_RGBA8_OES 0x8B91 +#define GL_PALETTE8_R5_G6_B5_OES 0x8B97 +#define GL_PALETTE8_RGB5_A1_OES 0x8B99 +#define GL_PALETTE8_RGB8_OES 0x8B95 +#define GL_PALETTE8_RGBA4_OES 0x8B98 +#define GL_PALETTE8_RGBA8_OES 0x8B96 +#define GL_PARALLEL_ARRAYS_INTEL 0x83F4 +#define GL_PARAMETER_BUFFER 0x80EE +#define GL_PARAMETER_BUFFER_ARB 0x80EE +#define GL_PARAMETER_BUFFER_BINDING 0x80EF +#define GL_PARAMETER_BUFFER_BINDING_ARB 0x80EF +#define GL_PARTIAL_SUCCESS_NV 0x902E +#define GL_PASS_THROUGH_NV 0x86E6 +#define GL_PATCHES 0x000E +#define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73 +#define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74 +#define GL_PATCH_VERTICES 0x8E72 +#define GL_PATH_CLIENT_LENGTH_NV 0x907F +#define GL_PATH_COMMAND_COUNT_NV 0x909D +#define GL_PATH_COMPUTED_LENGTH_NV 0x90A0 +#define GL_PATH_COORD_COUNT_NV 0x909E +#define GL_PATH_COVER_DEPTH_FUNC_NV 0x90BF +#define GL_PATH_DASH_ARRAY_COUNT_NV 0x909F +#define GL_PATH_DASH_CAPS_NV 0x907B +#define GL_PATH_DASH_OFFSET_NV 0x907E +#define GL_PATH_DASH_OFFSET_RESET_NV 0x90B4 +#define GL_PATH_END_CAPS_NV 0x9076 +#define GL_PATH_ERROR_POSITION_NV 0x90AB +#define GL_PATH_FILL_BOUNDING_BOX_NV 0x90A1 +#define GL_PATH_FILL_COVER_MODE_NV 0x9082 +#define GL_PATH_FILL_MASK_NV 0x9081 +#define GL_PATH_FILL_MODE_NV 0x9080 +#define GL_PATH_FORMAT_PS_NV 0x9071 +#define GL_PATH_FORMAT_SVG_NV 0x9070 +#define GL_PATH_GEN_COEFF_NV 0x90B1 +#define GL_PATH_GEN_COMPONENTS_NV 0x90B3 +#define GL_PATH_GEN_MODE_NV 0x90B0 +#define GL_PATH_INITIAL_DASH_CAP_NV 0x907C +#define GL_PATH_INITIAL_END_CAP_NV 0x9077 +#define GL_PATH_JOIN_STYLE_NV 0x9079 +#define GL_PATH_MAX_MODELVIEW_STACK_DEPTH_NV 0x0D36 +#define GL_PATH_MAX_PROJECTION_STACK_DEPTH_NV 0x0D38 +#define GL_PATH_MITER_LIMIT_NV 0x907A +#define GL_PATH_MODELVIEW_MATRIX_NV 0x0BA6 +#define GL_PATH_MODELVIEW_NV 0x1700 +#define GL_PATH_MODELVIEW_STACK_DEPTH_NV 0x0BA3 +#define GL_PATH_OBJECT_BOUNDING_BOX_NV 0x908A +#define GL_PATH_PROJECTION_MATRIX_NV 0x0BA7 +#define GL_PATH_PROJECTION_NV 0x1701 +#define GL_PATH_PROJECTION_STACK_DEPTH_NV 0x0BA4 +#define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD +#define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE +#define GL_PATH_STENCIL_FUNC_NV 0x90B7 +#define GL_PATH_STENCIL_REF_NV 0x90B8 +#define GL_PATH_STENCIL_VALUE_MASK_NV 0x90B9 +#define GL_PATH_STROKE_BOUNDING_BOX_NV 0x90A2 +#define GL_PATH_STROKE_COVER_MODE_NV 0x9083 +#define GL_PATH_STROKE_MASK_NV 0x9084 +#define GL_PATH_STROKE_WIDTH_NV 0x9075 +#define GL_PATH_TERMINAL_DASH_CAP_NV 0x907D +#define GL_PATH_TERMINAL_END_CAP_NV 0x9078 +#define GL_PATH_TRANSPOSE_MODELVIEW_MATRIX_NV 0x84E3 +#define GL_PATH_TRANSPOSE_PROJECTION_MATRIX_NV 0x84E4 +#define GL_PERCENTAGE_AMD 0x8BC3 +#define GL_PERFMON_RESULT_AMD 0x8BC6 +#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 +#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 +#define GL_PERFORMANCE_MONITOR_AMD 0x9152 +#define GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL 0x94FC +#define GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL 0x94FB +#define GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL 0x94FA +#define GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL 0x94F8 +#define GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL 0x94F9 +#define GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL 0x94FF +#define GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL 0x94F1 +#define GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL 0x94F2 +#define GL_PERFQUERY_COUNTER_EVENT_INTEL 0x94F0 +#define GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL 0x94FE +#define GL_PERFQUERY_COUNTER_RAW_INTEL 0x94F4 +#define GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL 0x94F3 +#define GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL 0x94F5 +#define GL_PERFQUERY_DONOT_FLUSH_INTEL 0x83F9 +#define GL_PERFQUERY_FLUSH_INTEL 0x83FA +#define GL_PERFQUERY_GLOBAL_CONTEXT_INTEL 0x00000001 +#define GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL 0x9500 +#define GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL 0x94FD +#define GL_PERFQUERY_SINGLE_CONTEXT_INTEL 0x00000000 +#define GL_PERFQUERY_WAIT_INTEL 0x83FB +#define GL_PERTURB_EXT 0x85AE +#define GL_PER_GPU_STORAGE_BIT_NV 0x0800 +#define GL_PER_GPU_STORAGE_NV 0x9548 +#define GL_PER_STAGE_CONSTANTS_NV 0x8535 +#define GL_PHONG_HINT_WIN 0x80EB +#define GL_PHONG_WIN 0x80EA +#define GL_PINLIGHT_NV 0x92A8 +#define GL_PIXELS_PER_SAMPLE_PATTERN_X_AMD 0x91AE +#define GL_PIXELS_PER_SAMPLE_PATTERN_Y_AMD 0x91AF +#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080 +#define GL_PIXEL_BUFFER_BARRIER_BIT_EXT 0x00000080 +#define GL_PIXEL_COUNTER_BITS_NV 0x8864 +#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867 +#define GL_PIXEL_COUNT_NV 0x8866 +#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333 +#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355 +#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354 +#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356 +#define GL_PIXEL_MAG_FILTER_EXT 0x8331 +#define GL_PIXEL_MIN_FILTER_EXT 0x8332 +#define GL_PIXEL_PACK_BUFFER 0x88EB +#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB +#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED +#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED +#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED +#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB +#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3 +#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4 +#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2 +#define GL_PIXEL_TEXTURE_SGIS 0x8353 +#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B +#define GL_PIXEL_TEX_GEN_SGIX 0x8139 +#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E +#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F +#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145 +#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144 +#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143 +#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142 +#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141 +#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140 +#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330 +#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338 +#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336 +#define GL_PIXEL_UNPACK_BUFFER 0x88EC +#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC +#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF +#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF +#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF +#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC +#define GL_PLUS_CLAMPED_ALPHA_NV 0x92B2 +#define GL_PLUS_CLAMPED_NV 0x92B1 +#define GL_PLUS_DARKER_NV 0x9292 +#define GL_PLUS_NV 0x9291 +#define GL_PN_TRIANGLES_ATI 0x87F0 +#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3 +#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7 +#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8 +#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2 +#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6 +#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5 +#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4 +#define GL_POINT 0x1B00 +#define GL_POINTS 0x0000 +#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129 +#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 +#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128 +#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128 +#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128 +#define GL_POINT_SIZE 0x0B11 +#define GL_POINT_SIZE_GRANULARITY 0x0B13 +#define GL_POINT_SIZE_MAX_ARB 0x8127 +#define GL_POINT_SIZE_MAX_EXT 0x8127 +#define GL_POINT_SIZE_MAX_SGIS 0x8127 +#define GL_POINT_SIZE_MIN_ARB 0x8126 +#define GL_POINT_SIZE_MIN_EXT 0x8126 +#define GL_POINT_SIZE_MIN_SGIS 0x8126 +#define GL_POINT_SIZE_RANGE 0x0B12 +#define GL_POINT_SPRITE_ARB 0x8861 +#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 +#define GL_POINT_SPRITE_NV 0x8861 +#define GL_POINT_SPRITE_R_MODE_NV 0x8863 +#define GL_POLYGON_MODE 0x0B40 +#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039 +#define GL_POLYGON_OFFSET_CLAMP 0x8E1B +#define GL_POLYGON_OFFSET_CLAMP_EXT 0x8E1B +#define GL_POLYGON_OFFSET_COMMAND_NV 0x000E +#define GL_POLYGON_OFFSET_EXT 0x8037 +#define GL_POLYGON_OFFSET_FACTOR 0x8038 +#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038 +#define GL_POLYGON_OFFSET_FILL 0x8037 +#define GL_POLYGON_OFFSET_LINE 0x2A02 +#define GL_POLYGON_OFFSET_POINT 0x2A01 +#define GL_POLYGON_OFFSET_UNITS 0x2A00 +#define GL_POLYGON_SMOOTH 0x0B41 +#define GL_POLYGON_SMOOTH_HINT 0x0C53 +#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB +#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7 +#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA +#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6 +#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2 +#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9 +#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5 +#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8 +#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4 +#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023 +#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F +#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022 +#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E +#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1 +#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021 +#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D +#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020 +#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C +#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162 +#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B +#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179 +#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C +#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A +#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8 +#define GL_PRESENT_DURATION_NV 0x8E2B +#define GL_PRESENT_TIME_NV 0x8E2A +#define GL_PRESERVE_ATI 0x8762 +#define GL_PREVIOUS_ARB 0x8578 +#define GL_PREVIOUS_EXT 0x8578 +#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4 +#define GL_PRIMARY_COLOR_ARB 0x8577 +#define GL_PRIMARY_COLOR_EXT 0x8577 +#define GL_PRIMARY_COLOR_NV 0x852C +#define GL_PRIMITIVES_GENERATED 0x8C87 +#define GL_PRIMITIVES_GENERATED_EXT 0x8C87 +#define GL_PRIMITIVES_GENERATED_NV 0x8C87 +#define GL_PRIMITIVES_SUBMITTED 0x82EF +#define GL_PRIMITIVES_SUBMITTED_ARB 0x82EF +#define GL_PRIMITIVE_BOUNDING_BOX_ARB 0x92BE +#define GL_PRIMITIVE_ID_NV 0x8C7C +#define GL_PRIMITIVE_RESTART 0x8F9D +#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 +#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221 +#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E +#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559 +#define GL_PRIMITIVE_RESTART_NV 0x8558 +#define GL_PROGRAM 0x82E2 +#define GL_PROGRAMMABLE_SAMPLE_LOCATION_ARB 0x9341 +#define GL_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9341 +#define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_ARB 0x9340 +#define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV 0x9340 +#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0 +#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805 +#define GL_PROGRAM_ATTRIBS_ARB 0x88AC +#define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906 +#define GL_PROGRAM_BINARY_FORMATS 0x87FF +#define GL_PROGRAM_BINARY_FORMAT_MESA 0x875F +#define GL_PROGRAM_BINARY_LENGTH 0x8741 +#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 +#define GL_PROGRAM_BINDING_ARB 0x8677 +#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B +#define GL_PROGRAM_ERROR_POSITION_NV 0x864B +#define GL_PROGRAM_ERROR_STRING_ARB 0x8874 +#define GL_PROGRAM_ERROR_STRING_NV 0x8874 +#define GL_PROGRAM_FORMAT_ARB 0x8876 +#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875 +#define GL_PROGRAM_INPUT 0x92E3 +#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0 +#define GL_PROGRAM_LENGTH_ARB 0x8627 +#define GL_PROGRAM_LENGTH_NV 0x8627 +#define GL_PROGRAM_MATRIX_EXT 0x8E2D +#define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F +#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2 +#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808 +#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE +#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2 +#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA +#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6 +#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A +#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809 +#define GL_PROGRAM_OBJECT_ARB 0x8B40 +#define GL_PROGRAM_OBJECT_EXT 0x8B40 +#define GL_PROGRAM_OUTPUT 0x92E4 +#define GL_PROGRAM_PARAMETERS_ARB 0x88A8 +#define GL_PROGRAM_PARAMETER_NV 0x8644 +#define GL_PROGRAM_PIPELINE 0x82E4 +#define GL_PROGRAM_PIPELINE_BINDING 0x825A +#define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F +#define GL_PROGRAM_POINT_SIZE 0x8642 +#define GL_PROGRAM_POINT_SIZE_ARB 0x8642 +#define GL_PROGRAM_POINT_SIZE_EXT 0x8642 +#define GL_PROGRAM_RESIDENT_NV 0x8647 +#define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907 +#define GL_PROGRAM_SEPARABLE 0x8258 +#define GL_PROGRAM_STRING_ARB 0x8628 +#define GL_PROGRAM_STRING_NV 0x8628 +#define GL_PROGRAM_TARGET_NV 0x8646 +#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4 +#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807 +#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806 +#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6 +#define GL_PROTECTED_MEMORY_OBJECT_EXT 0x959B +#define GL_PROVOKING_VERTEX 0x8E4F +#define GL_PROVOKING_VERTEX_EXT 0x8E4F +#define GL_PROXY_COLOR_TABLE_SGI 0x80D3 +#define GL_PROXY_HISTOGRAM_EXT 0x8025 +#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5 +#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4 +#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163 +#define GL_PROXY_TEXTURE_1D 0x8063 +#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19 +#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19 +#define GL_PROXY_TEXTURE_1D_EXT 0x8063 +#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B +#define GL_PROXY_TEXTURE_2D 0x8064 +#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B +#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B +#define GL_PROXY_TEXTURE_2D_EXT 0x8064 +#define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101 +#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103 +#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C +#define GL_PROXY_TEXTURE_3D 0x8070 +#define GL_PROXY_TEXTURE_3D_EXT 0x8070 +#define GL_PROXY_TEXTURE_4D_SGIS 0x8135 +#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD +#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B +#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B +#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B +#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B +#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B +#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7 +#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7 +#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7 +#define GL_PURGEABLE_APPLE 0x8A1D +#define GL_PURGED_CONTEXT_RESET_NV 0x92BB +#define GL_QUADRATIC_CURVE_TO_NV 0x0A +#define GL_QUADS 0x0007 +#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C +#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C +#define GL_QUAD_ALPHA4_SGIS 0x811E +#define GL_QUAD_ALPHA8_SGIS 0x811F +#define GL_QUAD_INTENSITY4_SGIS 0x8122 +#define GL_QUAD_INTENSITY8_SGIS 0x8123 +#define GL_QUAD_LUMINANCE4_SGIS 0x8120 +#define GL_QUAD_LUMINANCE8_SGIS 0x8121 +#define GL_QUAD_MESH_SUN 0x8614 +#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125 +#define GL_QUARTER_BIT_ATI 0x00000010 +#define GL_QUERY 0x82E3 +#define GL_QUERY_ALL_EVENT_BITS_AMD 0xFFFFFFFF +#define GL_QUERY_BUFFER 0x9192 +#define GL_QUERY_BUFFER_AMD 0x9192 +#define GL_QUERY_BUFFER_BARRIER_BIT 0x00008000 +#define GL_QUERY_BUFFER_BINDING 0x9193 +#define GL_QUERY_BUFFER_BINDING_AMD 0x9193 +#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16 +#define GL_QUERY_BY_REGION_NO_WAIT_INVERTED 0x8E1A +#define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16 +#define GL_QUERY_BY_REGION_WAIT 0x8E15 +#define GL_QUERY_BY_REGION_WAIT_INVERTED 0x8E19 +#define GL_QUERY_BY_REGION_WAIT_NV 0x8E15 +#define GL_QUERY_COUNTER_BITS 0x8864 +#define GL_QUERY_COUNTER_BITS_ARB 0x8864 +#define GL_QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD 0x00000008 +#define GL_QUERY_DEPTH_FAIL_EVENT_BIT_AMD 0x00000002 +#define GL_QUERY_DEPTH_PASS_EVENT_BIT_AMD 0x00000001 +#define GL_QUERY_NO_WAIT 0x8E14 +#define GL_QUERY_NO_WAIT_INVERTED 0x8E18 +#define GL_QUERY_NO_WAIT_NV 0x8E14 +#define GL_QUERY_OBJECT_AMD 0x9153 +#define GL_QUERY_OBJECT_EXT 0x9153 +#define GL_QUERY_RESOURCE_BUFFEROBJECT_NV 0x9547 +#define GL_QUERY_RESOURCE_MEMTYPE_VIDMEM_NV 0x9542 +#define GL_QUERY_RESOURCE_RENDERBUFFER_NV 0x9546 +#define GL_QUERY_RESOURCE_SYS_RESERVED_NV 0x9544 +#define GL_QUERY_RESOURCE_TEXTURE_NV 0x9545 +#define GL_QUERY_RESOURCE_TYPE_VIDMEM_ALLOC_NV 0x9540 +#define GL_QUERY_RESULT 0x8866 +#define GL_QUERY_RESULT_ARB 0x8866 +#define GL_QUERY_RESULT_AVAILABLE 0x8867 +#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867 +#define GL_QUERY_RESULT_NO_WAIT 0x9194 +#define GL_QUERY_RESULT_NO_WAIT_AMD 0x9194 +#define GL_QUERY_STENCIL_FAIL_EVENT_BIT_AMD 0x00000004 +#define GL_QUERY_TARGET 0x82EA +#define GL_QUERY_WAIT 0x8E13 +#define GL_QUERY_WAIT_INVERTED 0x8E17 +#define GL_QUERY_WAIT_NV 0x8E13 +#define GL_R11F_G11F_B10F 0x8C3A +#define GL_R11F_G11F_B10F_EXT 0x8C3A +#define GL_R16 0x822A +#define GL_R16F 0x822D +#define GL_R16F_EXT 0x822D +#define GL_R16I 0x8233 +#define GL_R16UI 0x8234 +#define GL_R16_SNORM 0x8F98 +#define GL_R1UI_C3F_V3F_SUN 0x85C6 +#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8 +#define GL_R1UI_C4UB_V3F_SUN 0x85C5 +#define GL_R1UI_N3F_V3F_SUN 0x85C7 +#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB +#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA +#define GL_R1UI_T2F_V3F_SUN 0x85C9 +#define GL_R1UI_V3F_SUN 0x85C4 +#define GL_R32F 0x822E +#define GL_R32F_EXT 0x822E +#define GL_R32I 0x8235 +#define GL_R32UI 0x8236 +#define GL_R3_G3_B2 0x2A10 +#define GL_R8 0x8229 +#define GL_R8I 0x8231 +#define GL_R8UI 0x8232 +#define GL_R8_EXT 0x8229 +#define GL_R8_SNORM 0x8F94 +#define GL_RASTERIZER_DISCARD 0x8C89 +#define GL_RASTERIZER_DISCARD_EXT 0x8C89 +#define GL_RASTERIZER_DISCARD_NV 0x8C89 +#define GL_RASTER_FIXED_SAMPLE_LOCATIONS_EXT 0x932A +#define GL_RASTER_MULTISAMPLE_EXT 0x9327 +#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262 +#define GL_RASTER_SAMPLES_EXT 0x9328 +#define GL_READ_BUFFER 0x0C02 +#define GL_READ_FRAMEBUFFER 0x8CA8 +#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA +#define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA +#define GL_READ_FRAMEBUFFER_EXT 0x8CA8 +#define GL_READ_ONLY 0x88B8 +#define GL_READ_ONLY_ARB 0x88B8 +#define GL_READ_PIXELS 0x828C +#define GL_READ_PIXELS_FORMAT 0x828D +#define GL_READ_PIXELS_TYPE 0x828E +#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B +#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879 +#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D +#define GL_READ_WRITE 0x88BA +#define GL_READ_WRITE_ARB 0x88BA +#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE +#define GL_RECT_NV 0xF6 +#define GL_RED 0x1903 +#define GL_REDUCE_EXT 0x8016 +#define GL_RED_BIT_ATI 0x00000001 +#define GL_RED_INTEGER 0x8D94 +#define GL_RED_INTEGER_EXT 0x8D94 +#define GL_RED_MAX_CLAMP_INGR 0x8564 +#define GL_RED_MIN_CLAMP_INGR 0x8560 +#define GL_RED_NV 0x1903 +#define GL_RED_SNORM 0x8F90 +#define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B +#define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A +#define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309 +#define GL_REFERENCED_BY_MESH_SHADER_NV 0x95A0 +#define GL_REFERENCED_BY_TASK_SHADER_NV 0x95A1 +#define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307 +#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308 +#define GL_REFERENCED_BY_VERTEX_SHADER 0x9306 +#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E +#define GL_REFERENCE_PLANE_SGIX 0x817D +#define GL_REFLECTION_MAP_ARB 0x8512 +#define GL_REFLECTION_MAP_EXT 0x8512 +#define GL_REFLECTION_MAP_NV 0x8512 +#define GL_REGISTER_COMBINERS_NV 0x8522 +#define GL_REG_0_ATI 0x8921 +#define GL_REG_10_ATI 0x892B +#define GL_REG_11_ATI 0x892C +#define GL_REG_12_ATI 0x892D +#define GL_REG_13_ATI 0x892E +#define GL_REG_14_ATI 0x892F +#define GL_REG_15_ATI 0x8930 +#define GL_REG_16_ATI 0x8931 +#define GL_REG_17_ATI 0x8932 +#define GL_REG_18_ATI 0x8933 +#define GL_REG_19_ATI 0x8934 +#define GL_REG_1_ATI 0x8922 +#define GL_REG_20_ATI 0x8935 +#define GL_REG_21_ATI 0x8936 +#define GL_REG_22_ATI 0x8937 +#define GL_REG_23_ATI 0x8938 +#define GL_REG_24_ATI 0x8939 +#define GL_REG_25_ATI 0x893A +#define GL_REG_26_ATI 0x893B +#define GL_REG_27_ATI 0x893C +#define GL_REG_28_ATI 0x893D +#define GL_REG_29_ATI 0x893E +#define GL_REG_2_ATI 0x8923 +#define GL_REG_30_ATI 0x893F +#define GL_REG_31_ATI 0x8940 +#define GL_REG_3_ATI 0x8924 +#define GL_REG_4_ATI 0x8925 +#define GL_REG_5_ATI 0x8926 +#define GL_REG_6_ATI 0x8927 +#define GL_REG_7_ATI 0x8928 +#define GL_REG_8_ATI 0x8929 +#define GL_REG_9_ATI 0x892A +#define GL_RELATIVE_ARC_TO_NV 0xFF +#define GL_RELATIVE_CONIC_CURVE_TO_NV 0x1B +#define GL_RELATIVE_CUBIC_CURVE_TO_NV 0x0D +#define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07 +#define GL_RELATIVE_LARGE_CCW_ARC_TO_NV 0x17 +#define GL_RELATIVE_LARGE_CW_ARC_TO_NV 0x19 +#define GL_RELATIVE_LINE_TO_NV 0x05 +#define GL_RELATIVE_MOVE_TO_NV 0x03 +#define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B +#define GL_RELATIVE_RECT_NV 0xF7 +#define GL_RELATIVE_ROUNDED_RECT2_NV 0xEB +#define GL_RELATIVE_ROUNDED_RECT4_NV 0xED +#define GL_RELATIVE_ROUNDED_RECT8_NV 0xEF +#define GL_RELATIVE_ROUNDED_RECT_NV 0xE9 +#define GL_RELATIVE_SMALL_CCW_ARC_TO_NV 0x13 +#define GL_RELATIVE_SMALL_CW_ARC_TO_NV 0x15 +#define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11 +#define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F +#define GL_RELATIVE_VERTICAL_LINE_TO_NV 0x09 +#define GL_RELEASED_APPLE 0x8A19 +#define GL_RENDERBUFFER 0x8D41 +#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 +#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53 +#define GL_RENDERBUFFER_BINDING 0x8CA7 +#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7 +#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 +#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52 +#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10 +#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB +#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 +#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54 +#define GL_RENDERBUFFER_EXT 0x8D41 +#define GL_RENDERBUFFER_FREE_MEMORY_ATI 0x87FD +#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 +#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51 +#define GL_RENDERBUFFER_HEIGHT 0x8D43 +#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 +#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44 +#define GL_RENDERBUFFER_RED_SIZE 0x8D50 +#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50 +#define GL_RENDERBUFFER_SAMPLES 0x8CAB +#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB +#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 +#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55 +#define GL_RENDERBUFFER_STORAGE_SAMPLES_AMD 0x91B2 +#define GL_RENDERBUFFER_WIDTH 0x8D42 +#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42 +#define GL_RENDERER 0x1F01 +#define GL_RENDER_GPU_MASK_NV 0x9558 +#define GL_REPEAT 0x2901 +#define GL_REPLACE 0x1E01 +#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3 +#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2 +#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0 +#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1 +#define GL_REPLACEMENT_CODE_SUN 0x81D8 +#define GL_REPLACE_EXT 0x8062 +#define GL_REPLACE_MIDDLE_SUN 0x0002 +#define GL_REPLACE_OLDEST_SUN 0x0003 +#define GL_REPLACE_VALUE_AMD 0x874B +#define GL_REPLICATE_BORDER_HP 0x8153 +#define GL_REPRESENTATIVE_FRAGMENT_TEST_NV 0x937F +#define GL_RESAMPLE_AVERAGE_OML 0x8988 +#define GL_RESAMPLE_DECIMATE_OML 0x8989 +#define GL_RESAMPLE_DECIMATE_SGIX 0x8430 +#define GL_RESAMPLE_REPLICATE_OML 0x8986 +#define GL_RESAMPLE_REPLICATE_SGIX 0x8433 +#define GL_RESAMPLE_ZERO_FILL_OML 0x8987 +#define GL_RESAMPLE_ZERO_FILL_SGIX 0x8434 +#define GL_RESCALE_NORMAL_EXT 0x803A +#define GL_RESET_NOTIFICATION_STRATEGY 0x8256 +#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 +#define GL_RESTART_PATH_NV 0xF0 +#define GL_RESTART_SUN 0x0001 +#define GL_RETAINED_APPLE 0x8A1B +#define GL_RG 0x8227 +#define GL_RG16 0x822C +#define GL_RG16F 0x822F +#define GL_RG16F_EXT 0x822F +#define GL_RG16I 0x8239 +#define GL_RG16UI 0x823A +#define GL_RG16_SNORM 0x8F99 +#define GL_RG32F 0x8230 +#define GL_RG32F_EXT 0x8230 +#define GL_RG32I 0x823B +#define GL_RG32UI 0x823C +#define GL_RG8 0x822B +#define GL_RG8I 0x8237 +#define GL_RG8UI 0x8238 +#define GL_RG8_EXT 0x822B +#define GL_RG8_SNORM 0x8F95 +#define GL_RGB 0x1907 +#define GL_RGB10 0x8052 +#define GL_RGB10_A2 0x8059 +#define GL_RGB10_A2UI 0x906F +#define GL_RGB10_A2_EXT 0x8059 +#define GL_RGB10_EXT 0x8052 +#define GL_RGB12 0x8053 +#define GL_RGB12_EXT 0x8053 +#define GL_RGB16 0x8054 +#define GL_RGB16F 0x881B +#define GL_RGB16F_ARB 0x881B +#define GL_RGB16F_EXT 0x881B +#define GL_RGB16I 0x8D89 +#define GL_RGB16I_EXT 0x8D89 +#define GL_RGB16UI 0x8D77 +#define GL_RGB16UI_EXT 0x8D77 +#define GL_RGB16_EXT 0x8054 +#define GL_RGB16_SNORM 0x8F9A +#define GL_RGB2_EXT 0x804E +#define GL_RGB32F 0x8815 +#define GL_RGB32F_ARB 0x8815 +#define GL_RGB32F_EXT 0x8815 +#define GL_RGB32I 0x8D83 +#define GL_RGB32I_EXT 0x8D83 +#define GL_RGB32UI 0x8D71 +#define GL_RGB32UI_EXT 0x8D71 +#define GL_RGB4 0x804F +#define GL_RGB4_EXT 0x804F +#define GL_RGB4_S3TC 0x83A1 +#define GL_RGB5 0x8050 +#define GL_RGB565 0x8D62 +#define GL_RGB5_A1 0x8057 +#define GL_RGB5_A1_EXT 0x8057 +#define GL_RGB5_EXT 0x8050 +#define GL_RGB8 0x8051 +#define GL_RGB8I 0x8D8F +#define GL_RGB8I_EXT 0x8D8F +#define GL_RGB8UI 0x8D7D +#define GL_RGB8UI_EXT 0x8D7D +#define GL_RGB8_EXT 0x8051 +#define GL_RGB8_SNORM 0x8F96 +#define GL_RGB9_E5 0x8C3D +#define GL_RGB9_E5_EXT 0x8C3D +#define GL_RGBA 0x1908 +#define GL_RGBA12 0x805A +#define GL_RGBA12_EXT 0x805A +#define GL_RGBA16 0x805B +#define GL_RGBA16F 0x881A +#define GL_RGBA16F_ARB 0x881A +#define GL_RGBA16F_EXT 0x881A +#define GL_RGBA16I 0x8D88 +#define GL_RGBA16I_EXT 0x8D88 +#define GL_RGBA16UI 0x8D76 +#define GL_RGBA16UI_EXT 0x8D76 +#define GL_RGBA16_EXT 0x805B +#define GL_RGBA16_SNORM 0x8F9B +#define GL_RGBA2 0x8055 +#define GL_RGBA2_EXT 0x8055 +#define GL_RGBA32F 0x8814 +#define GL_RGBA32F_ARB 0x8814 +#define GL_RGBA32F_EXT 0x8814 +#define GL_RGBA32I 0x8D82 +#define GL_RGBA32I_EXT 0x8D82 +#define GL_RGBA32UI 0x8D70 +#define GL_RGBA32UI_EXT 0x8D70 +#define GL_RGBA4 0x8056 +#define GL_RGBA4_DXT5_S3TC 0x83A5 +#define GL_RGBA4_EXT 0x8056 +#define GL_RGBA4_S3TC 0x83A3 +#define GL_RGBA8 0x8058 +#define GL_RGBA8I 0x8D8E +#define GL_RGBA8I_EXT 0x8D8E +#define GL_RGBA8UI 0x8D7C +#define GL_RGBA8UI_EXT 0x8D7C +#define GL_RGBA8_EXT 0x8058 +#define GL_RGBA8_SNORM 0x8F97 +#define GL_RGBA_DXT5_S3TC 0x83A4 +#define GL_RGBA_FLOAT16_APPLE 0x881A +#define GL_RGBA_FLOAT16_ATI 0x881A +#define GL_RGBA_FLOAT32_APPLE 0x8814 +#define GL_RGBA_FLOAT32_ATI 0x8814 +#define GL_RGBA_FLOAT_MODE_ARB 0x8820 +#define GL_RGBA_FLOAT_MODE_ATI 0x8820 +#define GL_RGBA_INTEGER 0x8D99 +#define GL_RGBA_INTEGER_EXT 0x8D99 +#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E +#define GL_RGBA_S3TC 0x83A2 +#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C +#define GL_RGBA_SNORM 0x8F93 +#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9 +#define GL_RGB_422_APPLE 0x8A1F +#define GL_RGB_FLOAT16_APPLE 0x881B +#define GL_RGB_FLOAT16_ATI 0x881B +#define GL_RGB_FLOAT32_APPLE 0x8815 +#define GL_RGB_FLOAT32_ATI 0x8815 +#define GL_RGB_INTEGER 0x8D98 +#define GL_RGB_INTEGER_EXT 0x8D98 +#define GL_RGB_RAW_422_APPLE 0x8A51 +#define GL_RGB_S3TC 0x83A0 +#define GL_RGB_SCALE_ARB 0x8573 +#define GL_RGB_SCALE_EXT 0x8573 +#define GL_RGB_SNORM 0x8F92 +#define GL_RG_INTEGER 0x8228 +#define GL_RG_SNORM 0x8F91 +#define GL_RIGHT 0x0407 +#define GL_ROUNDED_RECT2_NV 0xEA +#define GL_ROUNDED_RECT4_NV 0xEC +#define GL_ROUNDED_RECT8_NV 0xEE +#define GL_ROUNDED_RECT_NV 0xE8 +#define GL_ROUND_NV 0x90A4 +#define GL_SAMPLER 0x82E6 +#define GL_SAMPLER_1D 0x8B5D +#define GL_SAMPLER_1D_ARB 0x8B5D +#define GL_SAMPLER_1D_ARRAY 0x8DC0 +#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0 +#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3 +#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3 +#define GL_SAMPLER_1D_SHADOW 0x8B61 +#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61 +#define GL_SAMPLER_2D 0x8B5E +#define GL_SAMPLER_2D_ARB 0x8B5E +#define GL_SAMPLER_2D_ARRAY 0x8DC1 +#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1 +#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 +#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4 +#define GL_SAMPLER_2D_MULTISAMPLE 0x9108 +#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B +#define GL_SAMPLER_2D_RECT 0x8B63 +#define GL_SAMPLER_2D_RECT_ARB 0x8B63 +#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64 +#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64 +#define GL_SAMPLER_2D_SHADOW 0x8B62 +#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62 +#define GL_SAMPLER_3D 0x8B5F +#define GL_SAMPLER_3D_ARB 0x8B5F +#define GL_SAMPLER_BINDING 0x8919 +#define GL_SAMPLER_BUFFER 0x8DC2 +#define GL_SAMPLER_BUFFER_AMD 0x9001 +#define GL_SAMPLER_BUFFER_EXT 0x8DC2 +#define GL_SAMPLER_CUBE 0x8B60 +#define GL_SAMPLER_CUBE_ARB 0x8B60 +#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C +#define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C +#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D +#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D +#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 +#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5 +#define GL_SAMPLER_OBJECT_AMD 0x9155 +#define GL_SAMPLER_RENDERBUFFER_NV 0x8E56 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLES_3DFX 0x86B4 +#define GL_SAMPLES_ARB 0x80A9 +#define GL_SAMPLES_EXT 0x80A9 +#define GL_SAMPLES_PASSED 0x8914 +#define GL_SAMPLES_PASSED_ARB 0x8914 +#define GL_SAMPLES_SGIS 0x80A9 +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E +#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E +#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE 0x809F +#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F +#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F +#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLE_BUFFERS_3DFX 0x86B3 +#define GL_SAMPLE_BUFFERS_ARB 0x80A8 +#define GL_SAMPLE_BUFFERS_EXT 0x80A8 +#define GL_SAMPLE_BUFFERS_SGIS 0x80A8 +#define GL_SAMPLE_COVERAGE 0x80A0 +#define GL_SAMPLE_COVERAGE_ARB 0x80A0 +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB +#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA +#define GL_SAMPLE_LOCATION_ARB 0x8E50 +#define GL_SAMPLE_LOCATION_NV 0x8E50 +#define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_ARB 0x933F +#define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV 0x933F +#define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_ARB 0x933E +#define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV 0x933E +#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_ARB 0x933D +#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV 0x933D +#define GL_SAMPLE_MASK 0x8E51 +#define GL_SAMPLE_MASK_EXT 0x80A0 +#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB +#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB +#define GL_SAMPLE_MASK_NV 0x8E51 +#define GL_SAMPLE_MASK_SGIS 0x80A0 +#define GL_SAMPLE_MASK_VALUE 0x8E52 +#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA +#define GL_SAMPLE_MASK_VALUE_NV 0x8E52 +#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA +#define GL_SAMPLE_PATTERN_EXT 0x80AC +#define GL_SAMPLE_PATTERN_SGIS 0x80AC +#define GL_SAMPLE_POSITION 0x8E50 +#define GL_SAMPLE_POSITION_NV 0x8E50 +#define GL_SAMPLE_SHADING 0x8C36 +#define GL_SAMPLE_SHADING_ARB 0x8C36 +#define GL_SATURATE_BIT_ATI 0x00000040 +#define GL_SCALAR_EXT 0x87BE +#define GL_SCALEBIAS_HINT_SGIX 0x8322 +#define GL_SCALED_RESOLVE_FASTEST_EXT 0x90BA +#define GL_SCALED_RESOLVE_NICEST_EXT 0x90BB +#define GL_SCALE_BY_FOUR_NV 0x853F +#define GL_SCALE_BY_ONE_HALF_NV 0x8540 +#define GL_SCALE_BY_TWO_NV 0x853E +#define GL_SCISSOR_BOX 0x0C10 +#define GL_SCISSOR_BOX_EXCLUSIVE_NV 0x9556 +#define GL_SCISSOR_COMMAND_NV 0x0011 +#define GL_SCISSOR_TEST 0x0C11 +#define GL_SCISSOR_TEST_EXCLUSIVE_NV 0x9555 +#define GL_SCREEN_COORDINATES_REND 0x8490 +#define GL_SCREEN_KHR 0x9295 +#define GL_SCREEN_NV 0x9295 +#define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27 +#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C +#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E +#define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31 +#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077 +#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087 +#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D +#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A +#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C +#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B +#define GL_SECONDARY_COLOR_NV 0x852D +#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D +#define GL_SEMAPHORE_TYPE_BINARY_NV 0x95B4 +#define GL_SEMAPHORE_TYPE_NV 0x95B3 +#define GL_SEMAPHORE_TYPE_TIMELINE_NV 0x95B5 +#define GL_SEPARABLE_2D_EXT 0x8012 +#define GL_SEPARATE_ATTRIBS 0x8C8D +#define GL_SEPARATE_ATTRIBS_EXT 0x8C8D +#define GL_SEPARATE_ATTRIBS_NV 0x8C8D +#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA +#define GL_SET 0x150F +#define GL_SET_AMD 0x874A +#define GL_SHADER 0x82E1 +#define GL_SHADER_BINARY_FORMATS 0x8DF8 +#define GL_SHADER_BINARY_FORMAT_SPIR_V 0x9551 +#define GL_SHADER_BINARY_FORMAT_SPIR_V_ARB 0x9551 +#define GL_SHADER_COMPILER 0x8DFA +#define GL_SHADER_CONSISTENT_NV 0x86DD +#define GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV 0x00000010 +#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020 +#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT 0x00000020 +#define GL_SHADER_IMAGE_ATOMIC 0x82A6 +#define GL_SHADER_IMAGE_LOAD 0x82A4 +#define GL_SHADER_IMAGE_STORE 0x82A5 +#define GL_SHADER_INCLUDE_ARB 0x8DAE +#define GL_SHADER_OBJECT_ARB 0x8B48 +#define GL_SHADER_OBJECT_EXT 0x8B48 +#define GL_SHADER_OPERATION_NV 0x86DF +#define GL_SHADER_SOURCE_LENGTH 0x8B88 +#define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000 +#define GL_SHADER_STORAGE_BLOCK 0x92E6 +#define GL_SHADER_STORAGE_BUFFER 0x90D2 +#define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3 +#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF +#define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5 +#define GL_SHADER_STORAGE_BUFFER_START 0x90D4 +#define GL_SHADER_TYPE 0x8B4F +#define GL_SHADING_LANGUAGE_VERSION 0x8B8C +#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C +#define GL_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV 0x956F +#define GL_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV 0x9566 +#define GL_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV 0x9567 +#define GL_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV 0x9568 +#define GL_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV 0x9569 +#define GL_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV 0x956A +#define GL_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV 0x956B +#define GL_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV 0x9565 +#define GL_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV 0x956C +#define GL_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV 0x956D +#define GL_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV 0x956E +#define GL_SHADING_RATE_IMAGE_BINDING_NV 0x955B +#define GL_SHADING_RATE_IMAGE_NV 0x9563 +#define GL_SHADING_RATE_IMAGE_PALETTE_COUNT_NV 0x95B2 +#define GL_SHADING_RATE_IMAGE_PALETTE_SIZE_NV 0x955E +#define GL_SHADING_RATE_IMAGE_PER_PRIMITIVE_NV 0x95B1 +#define GL_SHADING_RATE_IMAGE_TEXEL_HEIGHT_NV 0x955D +#define GL_SHADING_RATE_IMAGE_TEXEL_WIDTH_NV 0x955C +#define GL_SHADING_RATE_NO_INVOCATIONS_NV 0x9564 +#define GL_SHADING_RATE_SAMPLE_ORDER_DEFAULT_NV 0x95AE +#define GL_SHADING_RATE_SAMPLE_ORDER_PIXEL_MAJOR_NV 0x95AF +#define GL_SHADING_RATE_SAMPLE_ORDER_SAMPLE_MAJOR_NV 0x95B0 +#define GL_SHADOW_AMBIENT_SGIX 0x80BF +#define GL_SHADOW_ATTENUATION_EXT 0x834E +#define GL_SHARED_EDGE_NV 0xC0 +#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB +#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0 +#define GL_SHORT 0x1402 +#define GL_SIGNALED 0x9119 +#define GL_SIGNED_ALPHA8_NV 0x8706 +#define GL_SIGNED_ALPHA_NV 0x8705 +#define GL_SIGNED_HILO16_NV 0x86FA +#define GL_SIGNED_HILO8_NV 0x885F +#define GL_SIGNED_HILO_NV 0x86F9 +#define GL_SIGNED_IDENTITY_NV 0x853C +#define GL_SIGNED_INTENSITY8_NV 0x8708 +#define GL_SIGNED_INTENSITY_NV 0x8707 +#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704 +#define GL_SIGNED_LUMINANCE8_NV 0x8702 +#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703 +#define GL_SIGNED_LUMINANCE_NV 0x8701 +#define GL_SIGNED_NEGATE_NV 0x853D +#define GL_SIGNED_NORMALIZED 0x8F9C +#define GL_SIGNED_RGB8_NV 0x86FF +#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D +#define GL_SIGNED_RGBA8_NV 0x86FC +#define GL_SIGNED_RGBA_NV 0x86FB +#define GL_SIGNED_RGB_NV 0x86FE +#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C +#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC +#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE +#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD +#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF +#define GL_SINGLE_COLOR_EXT 0x81F9 +#define GL_SKIP_COMPONENTS1_NV -6 +#define GL_SKIP_COMPONENTS2_NV -5 +#define GL_SKIP_COMPONENTS3_NV -4 +#define GL_SKIP_COMPONENTS4_NV -3 +#define GL_SKIP_DECODE_EXT 0x8A4A +#define GL_SKIP_MISSING_GLYPH_NV 0x90A9 +#define GL_SLICE_ACCUM_SUN 0x85CC +#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45 +#define GL_SLUMINANCE8_EXT 0x8C47 +#define GL_SLUMINANCE_ALPHA_EXT 0x8C44 +#define GL_SLUMINANCE_EXT 0x8C46 +#define GL_SMALL_CCW_ARC_TO_NV 0x12 +#define GL_SMALL_CW_ARC_TO_NV 0x14 +#define GL_SMOOTH_CUBIC_CURVE_TO_NV 0x10 +#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 +#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 +#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 +#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 +#define GL_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0E +#define GL_SM_COUNT_NV 0x933B +#define GL_SOFTLIGHT_KHR 0x929C +#define GL_SOFTLIGHT_NV 0x929C +#define GL_SOURCE0_ALPHA_ARB 0x8588 +#define GL_SOURCE0_ALPHA_EXT 0x8588 +#define GL_SOURCE0_RGB_ARB 0x8580 +#define GL_SOURCE0_RGB_EXT 0x8580 +#define GL_SOURCE1_ALPHA 0x8589 +#define GL_SOURCE1_ALPHA_ARB 0x8589 +#define GL_SOURCE1_ALPHA_EXT 0x8589 +#define GL_SOURCE1_RGB_ARB 0x8581 +#define GL_SOURCE1_RGB_EXT 0x8581 +#define GL_SOURCE2_ALPHA_ARB 0x858A +#define GL_SOURCE2_ALPHA_EXT 0x858A +#define GL_SOURCE2_RGB_ARB 0x8582 +#define GL_SOURCE2_RGB_EXT 0x8582 +#define GL_SOURCE3_ALPHA_NV 0x858B +#define GL_SOURCE3_RGB_NV 0x8583 +#define GL_SPARE0_NV 0x852E +#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532 +#define GL_SPARE1_NV 0x852F +#define GL_SPARSE_BUFFER_PAGE_SIZE_ARB 0x82F8 +#define GL_SPARSE_STORAGE_BIT_ARB 0x0400 +#define GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB 0x91A9 +#define GL_SPIR_V_BINARY 0x9552 +#define GL_SPIR_V_BINARY_ARB 0x9552 +#define GL_SPIR_V_EXTENSIONS 0x9553 +#define GL_SPRITE_AXIAL_SGIX 0x814C +#define GL_SPRITE_AXIS_SGIX 0x814A +#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E +#define GL_SPRITE_MODE_SGIX 0x8149 +#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D +#define GL_SPRITE_SGIX 0x8148 +#define GL_SPRITE_TRANSLATION_SGIX 0x814B +#define GL_SQUARE_NV 0x90A3 +#define GL_SR8_EXT 0x8FBD +#define GL_SRC1_ALPHA 0x8589 +#define GL_SRC1_COLOR 0x88F9 +#define GL_SRC_ALPHA 0x0302 +#define GL_SRC_ALPHA_SATURATE 0x0308 +#define GL_SRC_ATOP_NV 0x928E +#define GL_SRC_COLOR 0x0300 +#define GL_SRC_IN_NV 0x928A +#define GL_SRC_NV 0x9286 +#define GL_SRC_OUT_NV 0x928C +#define GL_SRC_OVER_NV 0x9288 +#define GL_SRG8_EXT 0x8FBE +#define GL_SRGB 0x8C40 +#define GL_SRGB8 0x8C41 +#define GL_SRGB8_ALPHA8 0x8C43 +#define GL_SRGB8_ALPHA8_EXT 0x8C43 +#define GL_SRGB8_EXT 0x8C41 +#define GL_SRGB_ALPHA 0x8C42 +#define GL_SRGB_ALPHA_EXT 0x8C42 +#define GL_SRGB_DECODE_ARB 0x8299 +#define GL_SRGB_EXT 0x8C40 +#define GL_SRGB_READ 0x8297 +#define GL_SRGB_WRITE 0x8298 +#define GL_STACK_OVERFLOW 0x0503 +#define GL_STACK_UNDERFLOW 0x0504 +#define GL_STANDARD_FONT_FORMAT_NV 0x936C +#define GL_STANDARD_FONT_NAME_NV 0x9072 +#define GL_STATIC_ATI 0x8760 +#define GL_STATIC_COPY 0x88E6 +#define GL_STATIC_COPY_ARB 0x88E6 +#define GL_STATIC_DRAW 0x88E4 +#define GL_STATIC_DRAW_ARB 0x88E4 +#define GL_STATIC_READ 0x88E5 +#define GL_STATIC_READ_ARB 0x88E5 +#define GL_STATIC_VERTEX_ARRAY_IBM 103061 +#define GL_STENCIL 0x1802 +#define GL_STENCIL_ATTACHMENT 0x8D20 +#define GL_STENCIL_ATTACHMENT_EXT 0x8D20 +#define GL_STENCIL_BACK_FAIL 0x8801 +#define GL_STENCIL_BACK_FAIL_ATI 0x8801 +#define GL_STENCIL_BACK_FUNC 0x8800 +#define GL_STENCIL_BACK_FUNC_ATI 0x8800 +#define GL_STENCIL_BACK_OP_VALUE_AMD 0x874D +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803 +#define GL_STENCIL_BACK_REF 0x8CA3 +#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 +#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 +#define GL_STENCIL_BUFFER_BIT 0x00000400 +#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3 +#define GL_STENCIL_CLEAR_VALUE 0x0B91 +#define GL_STENCIL_COMPONENTS 0x8285 +#define GL_STENCIL_FAIL 0x0B94 +#define GL_STENCIL_FUNC 0x0B92 +#define GL_STENCIL_INDEX 0x1901 +#define GL_STENCIL_INDEX1 0x8D46 +#define GL_STENCIL_INDEX16 0x8D49 +#define GL_STENCIL_INDEX16_EXT 0x8D49 +#define GL_STENCIL_INDEX1_EXT 0x8D46 +#define GL_STENCIL_INDEX4 0x8D47 +#define GL_STENCIL_INDEX4_EXT 0x8D47 +#define GL_STENCIL_INDEX8 0x8D48 +#define GL_STENCIL_INDEX8_EXT 0x8D48 +#define GL_STENCIL_OP_VALUE_AMD 0x874C +#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 +#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 +#define GL_STENCIL_REF 0x0B97 +#define GL_STENCIL_REF_COMMAND_NV 0x000C +#define GL_STENCIL_RENDERABLE 0x8288 +#define GL_STENCIL_SAMPLES_NV 0x932E +#define GL_STENCIL_TAG_BITS_EXT 0x88F2 +#define GL_STENCIL_TEST 0x0B90 +#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910 +#define GL_STENCIL_VALUE_MASK 0x0B93 +#define GL_STENCIL_WRITEMASK 0x0B98 +#define GL_STEREO 0x0C33 +#define GL_STORAGE_CACHED_APPLE 0x85BE +#define GL_STORAGE_CLIENT_APPLE 0x85B4 +#define GL_STORAGE_PRIVATE_APPLE 0x85BD +#define GL_STORAGE_SHARED_APPLE 0x85BF +#define GL_STREAM_COPY 0x88E2 +#define GL_STREAM_COPY_ARB 0x88E2 +#define GL_STREAM_DRAW 0x88E0 +#define GL_STREAM_DRAW_ARB 0x88E0 +#define GL_STREAM_RASTERIZATION_AMD 0x91A0 +#define GL_STREAM_READ 0x88E1 +#define GL_STREAM_READ_ARB 0x88E1 +#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216 +#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217 +#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218 +#define GL_SUBGROUP_FEATURE_ARITHMETIC_BIT_KHR 0x00000004 +#define GL_SUBGROUP_FEATURE_BALLOT_BIT_KHR 0x00000008 +#define GL_SUBGROUP_FEATURE_BASIC_BIT_KHR 0x00000001 +#define GL_SUBGROUP_FEATURE_CLUSTERED_BIT_KHR 0x00000040 +#define GL_SUBGROUP_FEATURE_PARTITIONED_BIT_NV 0x00000100 +#define GL_SUBGROUP_FEATURE_QUAD_BIT_KHR 0x00000080 +#define GL_SUBGROUP_FEATURE_SHUFFLE_BIT_KHR 0x00000010 +#define GL_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT_KHR 0x00000020 +#define GL_SUBGROUP_FEATURE_VOTE_BIT_KHR 0x00000002 +#define GL_SUBGROUP_QUAD_ALL_STAGES_KHR 0x9535 +#define GL_SUBGROUP_SIZE_KHR 0x9532 +#define GL_SUBGROUP_SUPPORTED_FEATURES_KHR 0x9534 +#define GL_SUBGROUP_SUPPORTED_STAGES_KHR 0x9533 +#define GL_SUBPIXEL_BITS 0x0D50 +#define GL_SUBPIXEL_PRECISION_BIAS_X_BITS_NV 0x9347 +#define GL_SUBPIXEL_PRECISION_BIAS_Y_BITS_NV 0x9348 +#define GL_SUBSAMPLE_DISTANCE_AMD 0x883F +#define GL_SUBTRACT_ARB 0x84E7 +#define GL_SUB_ATI 0x8965 +#define GL_SUCCESS_NV 0x902F +#define GL_SUPERSAMPLE_SCALE_X_NV 0x9372 +#define GL_SUPERSAMPLE_SCALE_Y_NV 0x9373 +#define GL_SUPPORTED_MULTISAMPLE_MODES_AMD 0x91B7 +#define GL_SURFACE_MAPPED_NV 0x8700 +#define GL_SURFACE_REGISTERED_NV 0x86FD +#define GL_SURFACE_STATE_NV 0x86EB +#define GL_SWIZZLE_STQ_ATI 0x8977 +#define GL_SWIZZLE_STQ_DQ_ATI 0x8979 +#define GL_SWIZZLE_STRQ_ATI 0x897A +#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B +#define GL_SWIZZLE_STR_ATI 0x8976 +#define GL_SWIZZLE_STR_DR_ATI 0x8978 +#define GL_SYNC_CL_EVENT_ARB 0x8240 +#define GL_SYNC_CL_EVENT_COMPLETE_ARB 0x8241 +#define GL_SYNC_CONDITION 0x9113 +#define GL_SYNC_FENCE 0x9116 +#define GL_SYNC_FLAGS 0x9115 +#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 +#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 +#define GL_SYNC_STATUS 0x9114 +#define GL_SYNC_X11_FENCE_EXT 0x90E1 +#define GL_SYSTEM_FONT_NAME_NV 0x9073 +#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3 +#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4 +#define GL_T2F_IUI_V2F_EXT 0x81B1 +#define GL_T2F_IUI_V3F_EXT 0x81B2 +#define GL_TABLE_TOO_LARGE_EXT 0x8031 +#define GL_TANGENT_ARRAY_EXT 0x8439 +#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442 +#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F +#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E +#define GL_TASK_SHADER_BIT_NV 0x00000080 +#define GL_TASK_SHADER_NV 0x955A +#define GL_TASK_SUBROUTINE_NV 0x957D +#define GL_TASK_SUBROUTINE_UNIFORM_NV 0x957F +#define GL_TASK_WORK_GROUP_SIZE_NV 0x953F +#define GL_TERMINATE_SEQUENCE_COMMAND_NV 0x0000 +#define GL_TESSELLATION_FACTOR_AMD 0x9005 +#define GL_TESSELLATION_MODE_AMD 0x9004 +#define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75 +#define GL_TESS_CONTROL_PROGRAM_NV 0x891E +#define GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV 0x8C74 +#define GL_TESS_CONTROL_SHADER 0x8E88 +#define GL_TESS_CONTROL_SHADER_BIT 0x00000008 +#define GL_TESS_CONTROL_SHADER_PATCHES 0x82F1 +#define GL_TESS_CONTROL_SHADER_PATCHES_ARB 0x82F1 +#define GL_TESS_CONTROL_SUBROUTINE 0x92E9 +#define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF +#define GL_TESS_CONTROL_TEXTURE 0x829C +#define GL_TESS_EVALUATION_PROGRAM_NV 0x891F +#define GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV 0x8C75 +#define GL_TESS_EVALUATION_SHADER 0x8E87 +#define GL_TESS_EVALUATION_SHADER_BIT 0x00000010 +#define GL_TESS_EVALUATION_SHADER_INVOCATIONS 0x82F2 +#define GL_TESS_EVALUATION_SHADER_INVOCATIONS_ARB 0x82F2 +#define GL_TESS_EVALUATION_SUBROUTINE 0x92EA +#define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0 +#define GL_TESS_EVALUATION_TEXTURE 0x829D +#define GL_TESS_GEN_MODE 0x8E76 +#define GL_TESS_GEN_POINT_MODE 0x8E79 +#define GL_TESS_GEN_SPACING 0x8E77 +#define GL_TESS_GEN_VERTEX_ORDER 0x8E78 +#define GL_TEXCOORD1_BIT_PGI 0x10000000 +#define GL_TEXCOORD2_BIT_PGI 0x20000000 +#define GL_TEXCOORD3_BIT_PGI 0x40000000 +#define GL_TEXCOORD4_BIT_PGI 0x80000000 +#define GL_TEXTURE 0x1702 +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE0_ARB 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE10_ARB 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE11_ARB 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE12_ARB 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE13_ARB 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE14_ARB 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE15_ARB 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE16_ARB 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE17_ARB 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE18_ARB 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE19_ARB 0x84D3 +#define GL_TEXTURE1_ARB 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE20_ARB 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE21_ARB 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE22_ARB 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE23_ARB 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE24_ARB 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE25_ARB 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE26_ARB 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE27_ARB 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE28_ARB 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE29_ARB 0x84DD +#define GL_TEXTURE2_ARB 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE30_ARB 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_TEXTURE31_ARB 0x84DF +#define GL_TEXTURE3_ARB 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE4_ARB 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE5_ARB 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE6_ARB 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE7_ARB 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE8_ARB 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE9_ARB 0x84C9 +#define GL_TEXTURE_1D 0x0DE0 +#define GL_TEXTURE_1D_ARRAY 0x8C18 +#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18 +#define GL_TEXTURE_1D_BINDING_EXT 0x8068 +#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D +#define GL_TEXTURE_1D_STACK_MESAX 0x8759 +#define GL_TEXTURE_2D 0x0DE1 +#define GL_TEXTURE_2D_ARRAY 0x8C1A +#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A +#define GL_TEXTURE_2D_BINDING_EXT 0x8069 +#define GL_TEXTURE_2D_MULTISAMPLE 0x9100 +#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102 +#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E +#define GL_TEXTURE_2D_STACK_MESAX 0x875A +#define GL_TEXTURE_3D 0x806F +#define GL_TEXTURE_3D_BINDING_EXT 0x806A +#define GL_TEXTURE_3D_EXT 0x806F +#define GL_TEXTURE_4DSIZE_SGIS 0x8136 +#define GL_TEXTURE_4D_BINDING_SGIS 0x814F +#define GL_TEXTURE_4D_SGIS 0x8134 +#define GL_TEXTURE_ALPHA_SIZE 0x805F +#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F +#define GL_TEXTURE_ALPHA_TYPE 0x8C13 +#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13 +#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F +#define GL_TEXTURE_BASE_LEVEL 0x813C +#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C +#define GL_TEXTURE_BINDING_1D 0x8068 +#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C +#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C +#define GL_TEXTURE_BINDING_2D 0x8069 +#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D +#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D +#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104 +#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105 +#define GL_TEXTURE_BINDING_3D 0x806A +#define GL_TEXTURE_BINDING_BUFFER 0x8C2C +#define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C +#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C +#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A +#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A +#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514 +#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6 +#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6 +#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6 +#define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53 +#define GL_TEXTURE_BLUE_SIZE 0x805E +#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E +#define GL_TEXTURE_BLUE_TYPE 0x8C12 +#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12 +#define GL_TEXTURE_BORDER_COLOR 0x1004 +#define GL_TEXTURE_BORDER_VALUES_NV 0x871A +#define GL_TEXTURE_BUFFER 0x8C2A +#define GL_TEXTURE_BUFFER_ARB 0x8C2A +#define GL_TEXTURE_BUFFER_BINDING 0x8C2A +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D +#define GL_TEXTURE_BUFFER_EXT 0x8C2A +#define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E +#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E +#define GL_TEXTURE_BUFFER_OFFSET 0x919D +#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F +#define GL_TEXTURE_BUFFER_SIZE 0x919E +#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171 +#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176 +#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172 +#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175 +#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173 +#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174 +#define GL_TEXTURE_COLOR_SAMPLES_NV 0x9046 +#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC +#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF +#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF +#define GL_TEXTURE_COMPARE_FUNC 0x884D +#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D +#define GL_TEXTURE_COMPARE_MODE 0x884C +#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C +#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B +#define GL_TEXTURE_COMPARE_SGIX 0x819A +#define GL_TEXTURE_COMPRESSED 0x86A1 +#define GL_TEXTURE_COMPRESSED_ARB 0x86A1 +#define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2 +#define GL_TEXTURE_COMPRESSED_BLOCK_SIZE 0x82B3 +#define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1 +#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 +#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0 +#define GL_TEXTURE_COMPRESSION_HINT 0x84EF +#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF +#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6 +#define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25 +#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A +#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B +#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078 +#define GL_TEXTURE_COORD_ARRAY_LENGTH_NV 0x8F2F +#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074 +#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084 +#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8 +#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092 +#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088 +#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A +#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089 +#define GL_TEXTURE_COORD_NV 0x8C79 +#define GL_TEXTURE_COVERAGE_SAMPLES_NV 0x9045 +#define GL_TEXTURE_CUBE_MAP 0x8513 +#define GL_TEXTURE_CUBE_MAP_ARB 0x8513 +#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009 +#define GL_TEXTURE_CUBE_MAP_ARRAY_ARB 0x9009 +#define GL_TEXTURE_CUBE_MAP_EXT 0x8513 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519 +#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F +#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001 +#define GL_TEXTURE_DEFORMATION_SGIX 0x8195 +#define GL_TEXTURE_DEPTH 0x8071 +#define GL_TEXTURE_DEPTH_EXT 0x8071 +#define GL_TEXTURE_DEPTH_SIZE 0x884A +#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A +#define GL_TEXTURE_DEPTH_TYPE 0x8C16 +#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16 +#define GL_TEXTURE_DS_SIZE_NV 0x871D +#define GL_TEXTURE_DT_SIZE_NV 0x871E +#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE +#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008 +#define GL_TEXTURE_FETCH_BARRIER_BIT_EXT 0x00000008 +#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147 +#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500 +#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107 +#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C +#define GL_TEXTURE_FREE_MEMORY_ATI 0x87FC +#define GL_TEXTURE_GATHER 0x82A2 +#define GL_TEXTURE_GATHER_SHADOW 0x82A3 +#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D +#define GL_TEXTURE_GREEN_SIZE 0x805D +#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D +#define GL_TEXTURE_GREEN_TYPE 0x8C11 +#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11 +#define GL_TEXTURE_HEIGHT 0x1001 +#define GL_TEXTURE_HI_SIZE_NV 0x871B +#define GL_TEXTURE_IMAGE_FORMAT 0x828F +#define GL_TEXTURE_IMAGE_TYPE 0x8290 +#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F +#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F +#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF +#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED +#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061 +#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15 +#define GL_TEXTURE_INTERNAL_FORMAT 0x1003 +#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C +#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167 +#define GL_TEXTURE_LIGHT_EXT 0x8350 +#define GL_TEXTURE_LOD_BIAS 0x8501 +#define GL_TEXTURE_LOD_BIAS_EXT 0x8501 +#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190 +#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E +#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F +#define GL_TEXTURE_LO_SIZE_NV 0x871C +#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060 +#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14 +#define GL_TEXTURE_MAG_FILTER 0x2800 +#define GL_TEXTURE_MAG_SIZE_NV 0x871F +#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351 +#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352 +#define GL_TEXTURE_MAX_ANISOTROPY 0x84FE +#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE +#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B +#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369 +#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A +#define GL_TEXTURE_MAX_LEVEL 0x813D +#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D +#define GL_TEXTURE_MAX_LOD 0x813B +#define GL_TEXTURE_MAX_LOD_SGIS 0x813B +#define GL_TEXTURE_MEMORY_LAYOUT_INTEL 0x83FF +#define GL_TEXTURE_MIN_FILTER 0x2801 +#define GL_TEXTURE_MIN_LOD 0x813A +#define GL_TEXTURE_MIN_LOD_SGIS 0x813A +#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E +#define GL_TEXTURE_NORMAL_EXT 0x85AF +#define GL_TEXTURE_POST_SPECULAR_HP 0x8168 +#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169 +#define GL_TEXTURE_PRIORITY_EXT 0x8066 +#define GL_TEXTURE_RANGE_LENGTH_APPLE 0x85B7 +#define GL_TEXTURE_RANGE_POINTER_APPLE 0x85B8 +#define GL_TEXTURE_RECTANGLE 0x84F5 +#define GL_TEXTURE_RECTANGLE_ARB 0x84F5 +#define GL_TEXTURE_RECTANGLE_NV 0x84F5 +#define GL_TEXTURE_REDUCTION_MODE_ARB 0x9366 +#define GL_TEXTURE_REDUCTION_MODE_EXT 0x9366 +#define GL_TEXTURE_RED_SIZE 0x805C +#define GL_TEXTURE_RED_SIZE_EXT 0x805C +#define GL_TEXTURE_RED_TYPE 0x8C10 +#define GL_TEXTURE_RED_TYPE_ARB 0x8C10 +#define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54 +#define GL_TEXTURE_RENDERBUFFER_NV 0x8E55 +#define GL_TEXTURE_RESIDENT_EXT 0x8067 +#define GL_TEXTURE_SAMPLES 0x9106 +#define GL_TEXTURE_SHADER_NV 0x86DE +#define GL_TEXTURE_SHADOW 0x82A1 +#define GL_TEXTURE_SHARED_SIZE 0x8C3F +#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F +#define GL_TEXTURE_SPARSE_ARB 0x91A6 +#define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48 +#define GL_TEXTURE_STENCIL_SIZE 0x88F1 +#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1 +#define GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC +#define GL_TEXTURE_STORAGE_SPARSE_BIT_AMD 0x00000001 +#define GL_TEXTURE_SWIZZLE_A 0x8E45 +#define GL_TEXTURE_SWIZZLE_A_EXT 0x8E45 +#define GL_TEXTURE_SWIZZLE_B 0x8E44 +#define GL_TEXTURE_SWIZZLE_B_EXT 0x8E44 +#define GL_TEXTURE_SWIZZLE_G 0x8E43 +#define GL_TEXTURE_SWIZZLE_G_EXT 0x8E43 +#define GL_TEXTURE_SWIZZLE_R 0x8E42 +#define GL_TEXTURE_SWIZZLE_RGBA 0x8E46 +#define GL_TEXTURE_SWIZZLE_RGBA_EXT 0x8E46 +#define GL_TEXTURE_SWIZZLE_R_EXT 0x8E42 +#define GL_TEXTURE_TARGET 0x1006 +#define GL_TEXTURE_TILING_EXT 0x9580 +#define GL_TEXTURE_TOO_LARGE_EXT 0x8065 +#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F +#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100 +#define GL_TEXTURE_UPDATE_BARRIER_BIT_EXT 0x00000100 +#define GL_TEXTURE_VIEW 0x82B5 +#define GL_TEXTURE_VIEW_MIN_LAYER 0x82DD +#define GL_TEXTURE_VIEW_MIN_LEVEL 0x82DB +#define GL_TEXTURE_VIEW_NUM_LAYERS 0x82DE +#define GL_TEXTURE_VIEW_NUM_LEVELS 0x82DC +#define GL_TEXTURE_WIDTH 0x1000 +#define GL_TEXTURE_WRAP_Q_SGIS 0x8137 +#define GL_TEXTURE_WRAP_R 0x8072 +#define GL_TEXTURE_WRAP_R_EXT 0x8072 +#define GL_TEXTURE_WRAP_S 0x2802 +#define GL_TEXTURE_WRAP_T 0x2803 +#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200 +#define GL_TILE_RASTER_ORDER_FIXED_MESA 0x8BB8 +#define GL_TILE_RASTER_ORDER_INCREASING_X_MESA 0x8BB9 +#define GL_TILE_RASTER_ORDER_INCREASING_Y_MESA 0x8BBA +#define GL_TILING_TYPES_EXT 0x9583 +#define GL_TIMELINE_SEMAPHORE_VALUE_NV 0x9595 +#define GL_TIMEOUT_EXPIRED 0x911B +#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFF +#define GL_TIMESTAMP 0x8E28 +#define GL_TIME_ELAPSED 0x88BF +#define GL_TIME_ELAPSED_EXT 0x88BF +#define GL_TOP_LEVEL_ARRAY_SIZE 0x930C +#define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D +#define GL_TRACK_MATRIX_NV 0x8648 +#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649 +#define GL_TRANSFORM_FEEDBACK 0x8E22 +#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 +#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E +#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800 +#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT 0x00000800 +#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 +#define GL_TRANSFORM_FEEDBACK_BINDING_NV 0x8E25 +#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24 +#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24 +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F +#define GL_TRANSFORM_FEEDBACK_BUFFER_EXT 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_INDEX 0x934B +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F +#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23 +#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85 +#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE 0x934C +#define GL_TRANSFORM_FEEDBACK_NV 0x8E22 +#define GL_TRANSFORM_FEEDBACK_OVERFLOW 0x82EC +#define GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB 0x82EC +#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88 +#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86 +#define GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW 0x82ED +#define GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB 0x82ED +#define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4 +#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 +#define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83 +#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83 +#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 +#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76 +#define GL_TRANSFORM_HINT_APPLE 0x85B1 +#define GL_TRANSLATE_2D_NV 0x9090 +#define GL_TRANSLATE_3D_NV 0x9091 +#define GL_TRANSLATE_X_NV 0x908E +#define GL_TRANSLATE_Y_NV 0x908F +#define GL_TRANSPOSE_AFFINE_2D_NV 0x9096 +#define GL_TRANSPOSE_AFFINE_3D_NV 0x9098 +#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6 +#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7 +#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3 +#define GL_TRANSPOSE_NV 0x862C +#define GL_TRANSPOSE_PROGRAM_MATRIX_EXT 0x8E2E +#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4 +#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5 +#define GL_TRIANGLES 0x0004 +#define GL_TRIANGLES_ADJACENCY 0x000C +#define GL_TRIANGLES_ADJACENCY_ARB 0x000C +#define GL_TRIANGLES_ADJACENCY_EXT 0x000C +#define GL_TRIANGLE_FAN 0x0006 +#define GL_TRIANGLE_LIST_SUN 0x81D7 +#define GL_TRIANGLE_MESH_SUN 0x8615 +#define GL_TRIANGLE_STRIP 0x0005 +#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D +#define GL_TRIANGLE_STRIP_ADJACENCY_ARB 0x000D +#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D +#define GL_TRIANGULAR_NV 0x90A5 +#define GL_TRUE 1 +#define GL_TYPE 0x92FA +#define GL_UNCORRELATED_NV 0x9282 +#define GL_UNDEFINED_APPLE 0x8A1C +#define GL_UNDEFINED_VERTEX 0x8260 +#define GL_UNIFORM 0x92E1 +#define GL_UNIFORM_ADDRESS_COMMAND_NV 0x000A +#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C +#define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA +#define GL_UNIFORM_BARRIER_BIT 0x00000004 +#define GL_UNIFORM_BARRIER_BIT_EXT 0x00000004 +#define GL_UNIFORM_BLOCK 0x92E2 +#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 +#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 +#define GL_UNIFORM_BLOCK_BINDING 0x8A3F +#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 +#define GL_UNIFORM_BLOCK_INDEX 0x8A3A +#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC +#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_MESH_SHADER_NV 0x959C +#define GL_UNIFORM_BLOCK_REFERENCED_BY_TASK_SHADER_NV 0x959D +#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 +#define GL_UNIFORM_BUFFER 0x8A11 +#define GL_UNIFORM_BUFFER_ADDRESS_NV 0x936F +#define GL_UNIFORM_BUFFER_BINDING 0x8A28 +#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF +#define GL_UNIFORM_BUFFER_EXT 0x8DEE +#define GL_UNIFORM_BUFFER_LENGTH_NV 0x9370 +#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 +#define GL_UNIFORM_BUFFER_SIZE 0x8A2A +#define GL_UNIFORM_BUFFER_START 0x8A29 +#define GL_UNIFORM_BUFFER_UNIFIED_NV 0x936E +#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E +#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D +#define GL_UNIFORM_NAME_LENGTH 0x8A39 +#define GL_UNIFORM_OFFSET 0x8A3B +#define GL_UNIFORM_SIZE 0x8A38 +#define GL_UNIFORM_TYPE 0x8A37 +#define GL_UNKNOWN_CONTEXT_RESET 0x8255 +#define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255 +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2 +#define GL_UNPACK_CMYK_HINT_EXT 0x800F +#define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129 +#define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128 +#define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A +#define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127 +#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5 +#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133 +#define GL_UNPACK_IMAGE_HEIGHT 0x806E +#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E +#define GL_UNPACK_LSB_FIRST 0x0CF1 +#define GL_UNPACK_RESAMPLE_OML 0x8985 +#define GL_UNPACK_RESAMPLE_SGIX 0x842F +#define GL_UNPACK_ROW_BYTES_APPLE 0x8A16 +#define GL_UNPACK_ROW_LENGTH 0x0CF2 +#define GL_UNPACK_SKIP_IMAGES 0x806D +#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D +#define GL_UNPACK_SKIP_PIXELS 0x0CF4 +#define GL_UNPACK_SKIP_ROWS 0x0CF3 +#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132 +#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1 +#define GL_UNPACK_SWAP_BYTES 0x0CF0 +#define GL_UNSIGNALED 0x9118 +#define GL_UNSIGNED_BYTE 0x1401 +#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 +#define GL_UNSIGNED_BYTE_3_3_2 0x8032 +#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032 +#define GL_UNSIGNED_IDENTITY_NV 0x8536 +#define GL_UNSIGNED_INT 0x1405 +#define GL_UNSIGNED_INT16_NV 0x8FF0 +#define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1 +#define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2 +#define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3 +#define GL_UNSIGNED_INT64_AMD 0x8BC2 +#define GL_UNSIGNED_INT64_ARB 0x140F +#define GL_UNSIGNED_INT64_NV 0x140F +#define GL_UNSIGNED_INT64_VEC2_ARB 0x8FF5 +#define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5 +#define GL_UNSIGNED_INT64_VEC3_ARB 0x8FF6 +#define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6 +#define GL_UNSIGNED_INT64_VEC4_ARB 0x8FF7 +#define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7 +#define GL_UNSIGNED_INT8_NV 0x8FEC +#define GL_UNSIGNED_INT8_VEC2_NV 0x8FED +#define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE +#define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF +#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B +#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B +#define GL_UNSIGNED_INT_10_10_10_2 0x8036 +#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036 +#define GL_UNSIGNED_INT_24_8 0x84FA +#define GL_UNSIGNED_INT_24_8_EXT 0x84FA +#define GL_UNSIGNED_INT_24_8_NV 0x84FA +#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 +#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E +#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E +#define GL_UNSIGNED_INT_8_8_8_8 0x8035 +#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035 +#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 +#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB +#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB +#define GL_UNSIGNED_INT_IMAGE_1D 0x9062 +#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068 +#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT 0x9068 +#define GL_UNSIGNED_INT_IMAGE_1D_EXT 0x9062 +#define GL_UNSIGNED_INT_IMAGE_2D 0x9063 +#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069 +#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT 0x9069 +#define GL_UNSIGNED_INT_IMAGE_2D_EXT 0x9063 +#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B +#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C +#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x906C +#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT 0x906B +#define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065 +#define GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT 0x9065 +#define GL_UNSIGNED_INT_IMAGE_3D 0x9064 +#define GL_UNSIGNED_INT_IMAGE_3D_EXT 0x9064 +#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067 +#define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT 0x9067 +#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066 +#define GL_UNSIGNED_INT_IMAGE_CUBE_EXT 0x9066 +#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A +#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A +#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA +#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1 +#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6 +#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6 +#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1 +#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 +#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 +#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7 +#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2 +#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A +#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D +#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5 +#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5 +#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 +#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3 +#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8 +#define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003 +#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8 +#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 +#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4 +#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F +#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F +#define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58 +#define GL_UNSIGNED_INT_VEC2 0x8DC6 +#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6 +#define GL_UNSIGNED_INT_VEC3 0x8DC7 +#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7 +#define GL_UNSIGNED_INT_VEC4 0x8DC8 +#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8 +#define GL_UNSIGNED_INVERT_NV 0x8537 +#define GL_UNSIGNED_NORMALIZED 0x8C17 +#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17 +#define GL_UNSIGNED_SHORT 0x1403 +#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 +#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 +#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA +#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA +#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB +#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB +#define GL_UPLOAD_GPU_MASK_NVX 0x954A +#define GL_UPPER_LEFT 0x8CA2 +#define GL_USE_MISSING_GLYPH_NV 0x90AA +#define GL_UTF16_NV 0x909B +#define GL_UTF8_NV 0x909A +#define GL_UUID_SIZE_EXT 16 +#define GL_VALIDATE_STATUS 0x8B83 +#define GL_VARIABLE_A_NV 0x8523 +#define GL_VARIABLE_B_NV 0x8524 +#define GL_VARIABLE_C_NV 0x8525 +#define GL_VARIABLE_D_NV 0x8526 +#define GL_VARIABLE_E_NV 0x8527 +#define GL_VARIABLE_F_NV 0x8528 +#define GL_VARIABLE_G_NV 0x8529 +#define GL_VARIANT_ARRAY_EXT 0x87E8 +#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9 +#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6 +#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7 +#define GL_VARIANT_DATATYPE_EXT 0x87E5 +#define GL_VARIANT_EXT 0x87C1 +#define GL_VARIANT_VALUE_EXT 0x87E4 +#define GL_VBO_FREE_MEMORY_ATI 0x87FB +#define GL_VECTOR_EXT 0x87BF +#define GL_VENDOR 0x1F00 +#define GL_VERSION 0x1F02 +#define GL_VERTEX23_BIT_PGI 0x00000004 +#define GL_VERTEX4_BIT_PGI 0x00000008 +#define GL_VERTEX_ARRAY 0x8074 +#define GL_VERTEX_ARRAY_ADDRESS_NV 0x8F21 +#define GL_VERTEX_ARRAY_BINDING 0x85B5 +#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5 +#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896 +#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D +#define GL_VERTEX_ARRAY_EXT 0x8074 +#define GL_VERTEX_ARRAY_LENGTH_NV 0x8F2B +#define GL_VERTEX_ARRAY_LIST_IBM 103070 +#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080 +#define GL_VERTEX_ARRAY_OBJECT_AMD 0x9154 +#define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154 +#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5 +#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E +#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D +#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E +#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E +#define GL_VERTEX_ARRAY_RANGE_NV 0x851D +#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521 +#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521 +#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F +#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533 +#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A +#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F +#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C +#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B +#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650 +#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A +#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B +#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C +#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D +#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E +#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F +#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651 +#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652 +#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653 +#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654 +#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655 +#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656 +#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657 +#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658 +#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659 +#define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20 +#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001 +#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT 0x00000001 +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F +#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE +#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT 0x88FD +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD +#define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV 0x8F2A +#define GL_VERTEX_ATTRIB_ARRAY_LONG 0x874E +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A +#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 +#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625 +#define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E +#define GL_VERTEX_ATTRIB_BINDING 0x82D4 +#define GL_VERTEX_ATTRIB_MAP1_APPLE 0x8A00 +#define GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE 0x8A03 +#define GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE 0x8A05 +#define GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE 0x8A04 +#define GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE 0x8A02 +#define GL_VERTEX_ATTRIB_MAP2_APPLE 0x8A01 +#define GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE 0x8A07 +#define GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE 0x8A09 +#define GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE 0x8A08 +#define GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE 0x8A06 +#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5 +#define GL_VERTEX_BINDING_BUFFER 0x8F4F +#define GL_VERTEX_BINDING_DIVISOR 0x82D6 +#define GL_VERTEX_BINDING_OFFSET 0x82D7 +#define GL_VERTEX_BINDING_STRIDE 0x82D8 +#define GL_VERTEX_BLEND_ARB 0x86A7 +#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B +#define GL_VERTEX_DATA_HINT_PGI 0x1A22A +#define GL_VERTEX_ELEMENT_SWIZZLE_AMD 0x91A4 +#define GL_VERTEX_ID_NV 0x8C7B +#define GL_VERTEX_ID_SWIZZLE_AMD 0x91A5 +#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF +#define GL_VERTEX_PRECLIP_SGIX 0x83EE +#define GL_VERTEX_PROGRAM_ARB 0x8620 +#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A +#define GL_VERTEX_PROGRAM_NV 0x8620 +#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2 +#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 +#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642 +#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643 +#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643 +#define GL_VERTEX_SHADER 0x8B31 +#define GL_VERTEX_SHADER_ARB 0x8B31 +#define GL_VERTEX_SHADER_BINDING_EXT 0x8781 +#define GL_VERTEX_SHADER_BIT 0x00000001 +#define GL_VERTEX_SHADER_EXT 0x8780 +#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF +#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1 +#define GL_VERTEX_SHADER_INVOCATIONS 0x82F0 +#define GL_VERTEX_SHADER_INVOCATIONS_ARB 0x82F0 +#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3 +#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2 +#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4 +#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0 +#define GL_VERTEX_SOURCE_ATI 0x8774 +#define GL_VERTEX_STATE_PROGRAM_NV 0x8621 +#define GL_VERTEX_STREAM0_ATI 0x876C +#define GL_VERTEX_STREAM1_ATI 0x876D +#define GL_VERTEX_STREAM2_ATI 0x876E +#define GL_VERTEX_STREAM3_ATI 0x876F +#define GL_VERTEX_STREAM4_ATI 0x8770 +#define GL_VERTEX_STREAM5_ATI 0x8771 +#define GL_VERTEX_STREAM6_ATI 0x8772 +#define GL_VERTEX_STREAM7_ATI 0x8773 +#define GL_VERTEX_SUBROUTINE 0x92E8 +#define GL_VERTEX_SUBROUTINE_UNIFORM 0x92EE +#define GL_VERTEX_TEXTURE 0x829B +#define GL_VERTEX_WEIGHTING_EXT 0x8509 +#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C +#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510 +#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D +#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F +#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E +#define GL_VERTICAL_LINE_TO_NV 0x08 +#define GL_VERTICES_SUBMITTED 0x82EE +#define GL_VERTICES_SUBMITTED_ARB 0x82EE +#define GL_VIBRANCE_BIAS_NV 0x8719 +#define GL_VIBRANCE_SCALE_NV 0x8713 +#define GL_VIDEO_BUFFER_BINDING_NV 0x9021 +#define GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV 0x902D +#define GL_VIDEO_BUFFER_NV 0x9020 +#define GL_VIDEO_BUFFER_PITCH_NV 0x9028 +#define GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV 0x903B +#define GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV 0x903A +#define GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV 0x9039 +#define GL_VIDEO_CAPTURE_FRAME_WIDTH_NV 0x9038 +#define GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV 0x903C +#define GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV 0x9026 +#define GL_VIDEO_COLOR_CONVERSION_MATRIX_NV 0x9029 +#define GL_VIDEO_COLOR_CONVERSION_MAX_NV 0x902A +#define GL_VIDEO_COLOR_CONVERSION_MIN_NV 0x902B +#define GL_VIDEO_COLOR_CONVERSION_OFFSET_NV 0x902C +#define GL_VIEWPORT 0x0BA2 +#define GL_VIEWPORT_BOUNDS_RANGE 0x825D +#define GL_VIEWPORT_COMMAND_NV 0x0010 +#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F +#define GL_VIEWPORT_POSITION_W_SCALE_NV 0x937C +#define GL_VIEWPORT_POSITION_W_SCALE_X_COEFF_NV 0x937D +#define GL_VIEWPORT_POSITION_W_SCALE_Y_COEFF_NV 0x937E +#define GL_VIEWPORT_SUBPIXEL_BITS 0x825C +#define GL_VIEWPORT_SWIZZLE_NEGATIVE_W_NV 0x9357 +#define GL_VIEWPORT_SWIZZLE_NEGATIVE_X_NV 0x9351 +#define GL_VIEWPORT_SWIZZLE_NEGATIVE_Y_NV 0x9353 +#define GL_VIEWPORT_SWIZZLE_NEGATIVE_Z_NV 0x9355 +#define GL_VIEWPORT_SWIZZLE_POSITIVE_W_NV 0x9356 +#define GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV 0x9350 +#define GL_VIEWPORT_SWIZZLE_POSITIVE_Y_NV 0x9352 +#define GL_VIEWPORT_SWIZZLE_POSITIVE_Z_NV 0x9354 +#define GL_VIEWPORT_SWIZZLE_W_NV 0x935B +#define GL_VIEWPORT_SWIZZLE_X_NV 0x9358 +#define GL_VIEWPORT_SWIZZLE_Y_NV 0x9359 +#define GL_VIEWPORT_SWIZZLE_Z_NV 0x935A +#define GL_VIEW_CLASS_128_BITS 0x82C4 +#define GL_VIEW_CLASS_16_BITS 0x82CA +#define GL_VIEW_CLASS_24_BITS 0x82C9 +#define GL_VIEW_CLASS_32_BITS 0x82C8 +#define GL_VIEW_CLASS_48_BITS 0x82C7 +#define GL_VIEW_CLASS_64_BITS 0x82C6 +#define GL_VIEW_CLASS_8_BITS 0x82CB +#define GL_VIEW_CLASS_96_BITS 0x82C5 +#define GL_VIEW_CLASS_ASTC_10x10_RGBA 0x9393 +#define GL_VIEW_CLASS_ASTC_10x5_RGBA 0x9390 +#define GL_VIEW_CLASS_ASTC_10x6_RGBA 0x9391 +#define GL_VIEW_CLASS_ASTC_10x8_RGBA 0x9392 +#define GL_VIEW_CLASS_ASTC_12x10_RGBA 0x9394 +#define GL_VIEW_CLASS_ASTC_12x12_RGBA 0x9395 +#define GL_VIEW_CLASS_ASTC_4x4_RGBA 0x9388 +#define GL_VIEW_CLASS_ASTC_5x4_RGBA 0x9389 +#define GL_VIEW_CLASS_ASTC_5x5_RGBA 0x938A +#define GL_VIEW_CLASS_ASTC_6x5_RGBA 0x938B +#define GL_VIEW_CLASS_ASTC_6x6_RGBA 0x938C +#define GL_VIEW_CLASS_ASTC_8x5_RGBA 0x938D +#define GL_VIEW_CLASS_ASTC_8x6_RGBA 0x938E +#define GL_VIEW_CLASS_ASTC_8x8_RGBA 0x938F +#define GL_VIEW_CLASS_BPTC_FLOAT 0x82D3 +#define GL_VIEW_CLASS_BPTC_UNORM 0x82D2 +#define GL_VIEW_CLASS_EAC_R11 0x9383 +#define GL_VIEW_CLASS_EAC_RG11 0x9384 +#define GL_VIEW_CLASS_ETC2_EAC_RGBA 0x9387 +#define GL_VIEW_CLASS_ETC2_RGB 0x9385 +#define GL_VIEW_CLASS_ETC2_RGBA 0x9386 +#define GL_VIEW_CLASS_RGTC1_RED 0x82D0 +#define GL_VIEW_CLASS_RGTC2_RG 0x82D1 +#define GL_VIEW_CLASS_S3TC_DXT1_RGB 0x82CC +#define GL_VIEW_CLASS_S3TC_DXT1_RGBA 0x82CD +#define GL_VIEW_CLASS_S3TC_DXT3_RGBA 0x82CE +#define GL_VIEW_CLASS_S3TC_DXT5_RGBA 0x82CF +#define GL_VIEW_COMPATIBILITY_CLASS 0x82B6 +#define GL_VIRTUAL_PAGE_SIZE_INDEX_ARB 0x91A7 +#define GL_VIRTUAL_PAGE_SIZE_X_AMD 0x9195 +#define GL_VIRTUAL_PAGE_SIZE_X_ARB 0x9195 +#define GL_VIRTUAL_PAGE_SIZE_Y_AMD 0x9196 +#define GL_VIRTUAL_PAGE_SIZE_Y_ARB 0x9196 +#define GL_VIRTUAL_PAGE_SIZE_Z_AMD 0x9197 +#define GL_VIRTUAL_PAGE_SIZE_Z_ARB 0x9197 +#define GL_VIVIDLIGHT_NV 0x92A6 +#define GL_VOLATILE_APPLE 0x8A1A +#define GL_WAIT_FAILED 0x911D +#define GL_WARPS_PER_SM_NV 0x933A +#define GL_WARP_SIZE_NV 0x9339 +#define GL_WEIGHTED_AVERAGE_ARB 0x9367 +#define GL_WEIGHTED_AVERAGE_EXT 0x9367 +#define GL_WEIGHT_ARRAY_ARB 0x86AD +#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E +#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC +#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB +#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA +#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9 +#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6 +#define GL_WIDE_LINE_HINT_PGI 0x1A222 +#define GL_WINDOW_RECTANGLE_EXT 0x8F12 +#define GL_WINDOW_RECTANGLE_MODE_EXT 0x8F13 +#define GL_WRAP_BORDER_SUN 0x81D4 +#define GL_WRITE_DISCARD_NV 0x88BE +#define GL_WRITE_ONLY 0x88B9 +#define GL_WRITE_ONLY_ARB 0x88B9 +#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A +#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878 +#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C +#define GL_W_EXT 0x87D8 +#define GL_XOR 0x1506 +#define GL_XOR_NV 0x1506 +#define GL_X_EXT 0x87D5 +#define GL_YCBAYCR8A_4224_NV 0x9032 +#define GL_YCBCR_422_APPLE 0x85B9 +#define GL_YCBCR_MESA 0x8757 +#define GL_YCBYCR8_422_NV 0x9031 +#define GL_YCRCBA_SGIX 0x8319 +#define GL_YCRCB_422_SGIX 0x81BB +#define GL_YCRCB_444_SGIX 0x81BC +#define GL_YCRCB_SGIX 0x8318 +#define GL_Y_EXT 0x87D6 +#define GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV 0x9036 +#define GL_Z4Y12Z4CB12Z4CR12_444_NV 0x9037 +#define GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV 0x9035 +#define GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV 0x9034 +#define GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV 0x9033 +#define GL_ZERO 0 +#define GL_ZERO_EXT 0x87DD +#define GL_ZERO_TO_ONE 0x935F +#define GL_Z_EXT 0x87D7 + +#include "khrplatform.h" +typedef unsigned int GLenum; +typedef unsigned char GLboolean; +typedef unsigned int GLbitfield; +typedef void GLvoid; +typedef khronos_int8_t GLbyte; +typedef khronos_uint8_t GLubyte; +typedef khronos_int16_t GLshort; +typedef khronos_uint16_t GLushort; +typedef int GLint; +typedef unsigned int GLuint; +typedef khronos_int32_t GLclampx; +typedef int GLsizei; +typedef khronos_float_t GLfloat; +typedef khronos_float_t GLclampf; +typedef double GLdouble; +typedef double GLclampd; +typedef void *GLeglClientBufferEXT; +typedef void *GLeglImageOES; +typedef char GLchar; +typedef char GLcharARB; +#ifdef __APPLE__ +typedef void *GLhandleARB; +#else +typedef unsigned int GLhandleARB; +#endif +typedef khronos_uint16_t GLhalf; +typedef khronos_uint16_t GLhalfARB; +typedef khronos_int32_t GLfixed; +#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \ + (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060) +typedef khronos_intptr_t GLintptr; +#else +typedef khronos_intptr_t GLintptr; +#endif +#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \ + (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060) +typedef khronos_intptr_t GLintptrARB; +#else +typedef khronos_intptr_t GLintptrARB; +#endif +#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \ + (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060) +typedef khronos_ssize_t GLsizeiptr; +#else +typedef khronos_ssize_t GLsizeiptr; +#endif +#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \ + (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060) +typedef khronos_ssize_t GLsizeiptrARB; +#else +typedef khronos_ssize_t GLsizeiptrARB; +#endif +typedef khronos_int64_t GLint64; +typedef khronos_int64_t GLint64EXT; +typedef khronos_uint64_t GLuint64; +typedef khronos_uint64_t GLuint64EXT; +typedef struct __GLsync *GLsync; +struct _cl_context; +struct _cl_event; +typedef void(GLAD_API_PTR *GLDEBUGPROC)(GLenum source, GLenum type, GLuint id, GLenum severity, + GLsizei length, const GLchar *message, + const void *userParam); +typedef void(GLAD_API_PTR *GLDEBUGPROCARB)(GLenum source, GLenum type, GLuint id, GLenum severity, + GLsizei length, const GLchar *message, + const void *userParam); +typedef void(GLAD_API_PTR *GLDEBUGPROCKHR)(GLenum source, GLenum type, GLuint id, GLenum severity, + GLsizei length, const GLchar *message, + const void *userParam); +typedef void(GLAD_API_PTR *GLDEBUGPROCAMD)(GLuint id, GLenum category, GLenum severity, + GLsizei length, const GLchar *message, void *userParam); +typedef unsigned short GLhalfNV; +typedef GLintptr GLvdpauSurfaceNV; +typedef void(GLAD_API_PTR *GLVULKANPROCNV)(void); + +#define GL_VERSION_1_0 1 +#define GL_VERSION_1_1 1 +#define GL_VERSION_1_2 1 +#define GL_VERSION_1_3 1 +#define GL_VERSION_1_4 1 +#define GL_VERSION_1_5 1 +#define GL_VERSION_2_0 1 +#define GL_VERSION_2_1 1 +#define GL_VERSION_3_0 1 +#define GL_VERSION_3_1 1 +#define GL_VERSION_3_2 1 +#define GL_VERSION_3_3 1 +#define GL_VERSION_4_0 1 +#define GL_VERSION_4_1 1 +#define GL_VERSION_4_2 1 +#define GL_VERSION_4_3 1 +#define GL_VERSION_4_4 1 +#define GL_VERSION_4_5 1 +#define GL_VERSION_4_6 1 +#define GL_3DFX_multisample 1 +#define GL_3DFX_tbuffer 1 +#define GL_3DFX_texture_compression_FXT1 1 +#define GL_AMD_blend_minmax_factor 1 +#define GL_AMD_conservative_depth 1 +#define GL_AMD_debug_output 1 +#define GL_AMD_depth_clamp_separate 1 +#define GL_AMD_draw_buffers_blend 1 +#define GL_AMD_framebuffer_multisample_advanced 1 +#define GL_AMD_framebuffer_sample_positions 1 +#define GL_AMD_gcn_shader 1 +#define GL_AMD_gpu_shader_half_float 1 +#define GL_AMD_gpu_shader_int16 1 +#define GL_AMD_gpu_shader_int64 1 +#define GL_AMD_interleaved_elements 1 +#define GL_AMD_multi_draw_indirect 1 +#define GL_AMD_name_gen_delete 1 +#define GL_AMD_occlusion_query_event 1 +#define GL_AMD_performance_monitor 1 +#define GL_AMD_pinned_memory 1 +#define GL_AMD_query_buffer_object 1 +#define GL_AMD_sample_positions 1 +#define GL_AMD_seamless_cubemap_per_texture 1 +#define GL_AMD_shader_atomic_counter_ops 1 +#define GL_AMD_shader_ballot 1 +#define GL_AMD_shader_explicit_vertex_parameter 1 +#define GL_AMD_shader_gpu_shader_half_float_fetch 1 +#define GL_AMD_shader_image_load_store_lod 1 +#define GL_AMD_shader_stencil_export 1 +#define GL_AMD_shader_trinary_minmax 1 +#define GL_AMD_sparse_texture 1 +#define GL_AMD_stencil_operation_extended 1 +#define GL_AMD_texture_gather_bias_lod 1 +#define GL_AMD_texture_texture4 1 +#define GL_AMD_transform_feedback3_lines_triangles 1 +#define GL_AMD_transform_feedback4 1 +#define GL_AMD_vertex_shader_layer 1 +#define GL_AMD_vertex_shader_tessellator 1 +#define GL_AMD_vertex_shader_viewport_index 1 +#define GL_APPLE_aux_depth_stencil 1 +#define GL_APPLE_client_storage 1 +#define GL_APPLE_element_array 1 +#define GL_APPLE_fence 1 +#define GL_APPLE_float_pixels 1 +#define GL_APPLE_flush_buffer_range 1 +#define GL_APPLE_object_purgeable 1 +#define GL_APPLE_rgb_422 1 +#define GL_APPLE_row_bytes 1 +#define GL_APPLE_specular_vector 1 +#define GL_APPLE_texture_range 1 +#define GL_APPLE_transform_hint 1 +#define GL_APPLE_vertex_array_object 1 +#define GL_APPLE_vertex_array_range 1 +#define GL_APPLE_vertex_program_evaluators 1 +#define GL_APPLE_ycbcr_422 1 +#define GL_ARB_ES2_compatibility 1 +#define GL_ARB_ES3_1_compatibility 1 +#define GL_ARB_ES3_2_compatibility 1 +#define GL_ARB_ES3_compatibility 1 +#define GL_ARB_arrays_of_arrays 1 +#define GL_ARB_base_instance 1 +#define GL_ARB_bindless_texture 1 +#define GL_ARB_blend_func_extended 1 +#define GL_ARB_buffer_storage 1 +#define GL_ARB_cl_event 1 +#define GL_ARB_clear_buffer_object 1 +#define GL_ARB_clear_texture 1 +#define GL_ARB_clip_control 1 +#define GL_ARB_color_buffer_float 1 +#define GL_ARB_compatibility 1 +#define GL_ARB_compressed_texture_pixel_storage 1 +#define GL_ARB_compute_shader 1 +#define GL_ARB_compute_variable_group_size 1 +#define GL_ARB_conditional_render_inverted 1 +#define GL_ARB_conservative_depth 1 +#define GL_ARB_copy_buffer 1 +#define GL_ARB_copy_image 1 +#define GL_ARB_cull_distance 1 +#define GL_ARB_debug_output 1 +#define GL_ARB_depth_buffer_float 1 +#define GL_ARB_depth_clamp 1 +#define GL_ARB_depth_texture 1 +#define GL_ARB_derivative_control 1 +#define GL_ARB_direct_state_access 1 +#define GL_ARB_draw_buffers 1 +#define GL_ARB_draw_buffers_blend 1 +#define GL_ARB_draw_elements_base_vertex 1 +#define GL_ARB_draw_indirect 1 +#define GL_ARB_draw_instanced 1 +#define GL_ARB_enhanced_layouts 1 +#define GL_ARB_explicit_attrib_location 1 +#define GL_ARB_explicit_uniform_location 1 +#define GL_ARB_fragment_coord_conventions 1 +#define GL_ARB_fragment_layer_viewport 1 +#define GL_ARB_fragment_program 1 +#define GL_ARB_fragment_program_shadow 1 +#define GL_ARB_fragment_shader 1 +#define GL_ARB_fragment_shader_interlock 1 +#define GL_ARB_framebuffer_no_attachments 1 +#define GL_ARB_framebuffer_object 1 +#define GL_ARB_framebuffer_sRGB 1 +#define GL_ARB_geometry_shader4 1 +#define GL_ARB_get_program_binary 1 +#define GL_ARB_get_texture_sub_image 1 +#define GL_ARB_gl_spirv 1 +#define GL_ARB_gpu_shader5 1 +#define GL_ARB_gpu_shader_fp64 1 +#define GL_ARB_gpu_shader_int64 1 +#define GL_ARB_half_float_pixel 1 +#define GL_ARB_half_float_vertex 1 +#define GL_ARB_imaging 1 +#define GL_ARB_indirect_parameters 1 +#define GL_ARB_instanced_arrays 1 +#define GL_ARB_internalformat_query 1 +#define GL_ARB_internalformat_query2 1 +#define GL_ARB_invalidate_subdata 1 +#define GL_ARB_map_buffer_alignment 1 +#define GL_ARB_map_buffer_range 1 +#define GL_ARB_matrix_palette 1 +#define GL_ARB_multi_bind 1 +#define GL_ARB_multi_draw_indirect 1 +#define GL_ARB_multisample 1 +#define GL_ARB_multitexture 1 +#define GL_ARB_occlusion_query 1 +#define GL_ARB_occlusion_query2 1 +#define GL_ARB_parallel_shader_compile 1 +#define GL_ARB_pipeline_statistics_query 1 +#define GL_ARB_pixel_buffer_object 1 +#define GL_ARB_point_parameters 1 +#define GL_ARB_point_sprite 1 +#define GL_ARB_polygon_offset_clamp 1 +#define GL_ARB_post_depth_coverage 1 +#define GL_ARB_program_interface_query 1 +#define GL_ARB_provoking_vertex 1 +#define GL_ARB_query_buffer_object 1 +#define GL_ARB_robust_buffer_access_behavior 1 +#define GL_ARB_robustness 1 +#define GL_ARB_robustness_isolation 1 +#define GL_ARB_sample_locations 1 +#define GL_ARB_sample_shading 1 +#define GL_ARB_sampler_objects 1 +#define GL_ARB_seamless_cube_map 1 +#define GL_ARB_seamless_cubemap_per_texture 1 +#define GL_ARB_separate_shader_objects 1 +#define GL_ARB_shader_atomic_counter_ops 1 +#define GL_ARB_shader_atomic_counters 1 +#define GL_ARB_shader_ballot 1 +#define GL_ARB_shader_bit_encoding 1 +#define GL_ARB_shader_clock 1 +#define GL_ARB_shader_draw_parameters 1 +#define GL_ARB_shader_group_vote 1 +#define GL_ARB_shader_image_load_store 1 +#define GL_ARB_shader_image_size 1 +#define GL_ARB_shader_objects 1 +#define GL_ARB_shader_precision 1 +#define GL_ARB_shader_stencil_export 1 +#define GL_ARB_shader_storage_buffer_object 1 +#define GL_ARB_shader_subroutine 1 +#define GL_ARB_shader_texture_image_samples 1 +#define GL_ARB_shader_texture_lod 1 +#define GL_ARB_shader_viewport_layer_array 1 +#define GL_ARB_shading_language_100 1 +#define GL_ARB_shading_language_420pack 1 +#define GL_ARB_shading_language_include 1 +#define GL_ARB_shading_language_packing 1 +#define GL_ARB_shadow 1 +#define GL_ARB_shadow_ambient 1 +#define GL_ARB_sparse_buffer 1 +#define GL_ARB_sparse_texture 1 +#define GL_ARB_sparse_texture2 1 +#define GL_ARB_sparse_texture_clamp 1 +#define GL_ARB_spirv_extensions 1 +#define GL_ARB_stencil_texturing 1 +#define GL_ARB_sync 1 +#define GL_ARB_tessellation_shader 1 +#define GL_ARB_texture_barrier 1 +#define GL_ARB_texture_border_clamp 1 +#define GL_ARB_texture_buffer_object 1 +#define GL_ARB_texture_buffer_object_rgb32 1 +#define GL_ARB_texture_buffer_range 1 +#define GL_ARB_texture_compression 1 +#define GL_ARB_texture_compression_bptc 1 +#define GL_ARB_texture_compression_rgtc 1 +#define GL_ARB_texture_cube_map 1 +#define GL_ARB_texture_cube_map_array 1 +#define GL_ARB_texture_env_add 1 +#define GL_ARB_texture_env_combine 1 +#define GL_ARB_texture_env_crossbar 1 +#define GL_ARB_texture_env_dot3 1 +#define GL_ARB_texture_filter_anisotropic 1 +#define GL_ARB_texture_filter_minmax 1 +#define GL_ARB_texture_float 1 +#define GL_ARB_texture_gather 1 +#define GL_ARB_texture_mirror_clamp_to_edge 1 +#define GL_ARB_texture_mirrored_repeat 1 +#define GL_ARB_texture_multisample 1 +#define GL_ARB_texture_non_power_of_two 1 +#define GL_ARB_texture_query_levels 1 +#define GL_ARB_texture_query_lod 1 +#define GL_ARB_texture_rectangle 1 +#define GL_ARB_texture_rg 1 +#define GL_ARB_texture_rgb10_a2ui 1 +#define GL_ARB_texture_stencil8 1 +#define GL_ARB_texture_storage 1 +#define GL_ARB_texture_storage_multisample 1 +#define GL_ARB_texture_swizzle 1 +#define GL_ARB_texture_view 1 +#define GL_ARB_timer_query 1 +#define GL_ARB_transform_feedback2 1 +#define GL_ARB_transform_feedback3 1 +#define GL_ARB_transform_feedback_instanced 1 +#define GL_ARB_transform_feedback_overflow_query 1 +#define GL_ARB_transpose_matrix 1 +#define GL_ARB_uniform_buffer_object 1 +#define GL_ARB_vertex_array_bgra 1 +#define GL_ARB_vertex_array_object 1 +#define GL_ARB_vertex_attrib_64bit 1 +#define GL_ARB_vertex_attrib_binding 1 +#define GL_ARB_vertex_blend 1 +#define GL_ARB_vertex_buffer_object 1 +#define GL_ARB_vertex_program 1 +#define GL_ARB_vertex_shader 1 +#define GL_ARB_vertex_type_10f_11f_11f_rev 1 +#define GL_ARB_vertex_type_2_10_10_10_rev 1 +#define GL_ARB_viewport_array 1 +#define GL_ARB_window_pos 1 +#define GL_ATI_draw_buffers 1 +#define GL_ATI_element_array 1 +#define GL_ATI_envmap_bumpmap 1 +#define GL_ATI_fragment_shader 1 +#define GL_ATI_map_object_buffer 1 +#define GL_ATI_meminfo 1 +#define GL_ATI_pixel_format_float 1 +#define GL_ATI_pn_triangles 1 +#define GL_ATI_separate_stencil 1 +#define GL_ATI_text_fragment_shader 1 +#define GL_ATI_texture_env_combine3 1 +#define GL_ATI_texture_float 1 +#define GL_ATI_texture_mirror_once 1 +#define GL_ATI_vertex_array_object 1 +#define GL_ATI_vertex_attrib_array_object 1 +#define GL_ATI_vertex_streams 1 +#define GL_EXT_422_pixels 1 +#define GL_EXT_EGL_image_storage 1 +#define GL_EXT_EGL_sync 1 +#define GL_EXT_abgr 1 +#define GL_EXT_bgra 1 +#define GL_EXT_bindable_uniform 1 +#define GL_EXT_blend_color 1 +#define GL_EXT_blend_equation_separate 1 +#define GL_EXT_blend_func_separate 1 +#define GL_EXT_blend_logic_op 1 +#define GL_EXT_blend_minmax 1 +#define GL_EXT_blend_subtract 1 +#define GL_EXT_clip_volume_hint 1 +#define GL_EXT_cmyka 1 +#define GL_EXT_color_subtable 1 +#define GL_EXT_compiled_vertex_array 1 +#define GL_EXT_convolution 1 +#define GL_EXT_coordinate_frame 1 +#define GL_EXT_copy_texture 1 +#define GL_EXT_cull_vertex 1 +#define GL_EXT_debug_label 1 +#define GL_EXT_debug_marker 1 +#define GL_EXT_depth_bounds_test 1 +#define GL_EXT_direct_state_access 1 +#define GL_EXT_draw_buffers2 1 +#define GL_EXT_draw_instanced 1 +#define GL_EXT_draw_range_elements 1 +#define GL_EXT_external_buffer 1 +#define GL_EXT_fog_coord 1 +#define GL_EXT_framebuffer_blit 1 +#define GL_EXT_framebuffer_blit_layers 1 +#define GL_EXT_framebuffer_multisample 1 +#define GL_EXT_framebuffer_multisample_blit_scaled 1 +#define GL_EXT_framebuffer_object 1 +#define GL_EXT_framebuffer_sRGB 1 +#define GL_EXT_geometry_shader4 1 +#define GL_EXT_gpu_program_parameters 1 +#define GL_EXT_gpu_shader4 1 +#define GL_EXT_histogram 1 +#define GL_EXT_index_array_formats 1 +#define GL_EXT_index_func 1 +#define GL_EXT_index_material 1 +#define GL_EXT_index_texture 1 +#define GL_EXT_light_texture 1 +#define GL_EXT_memory_object 1 +#define GL_EXT_memory_object_fd 1 +#define GL_EXT_memory_object_win32 1 +#define GL_EXT_misc_attribute 1 +#define GL_EXT_multi_draw_arrays 1 +#define GL_EXT_multisample 1 +#define GL_EXT_multiview_tessellation_geometry_shader 1 +#define GL_EXT_multiview_texture_multisample 1 +#define GL_EXT_multiview_timer_query 1 +#define GL_EXT_packed_depth_stencil 1 +#define GL_EXT_packed_float 1 +#define GL_EXT_packed_pixels 1 +#define GL_EXT_paletted_texture 1 +#define GL_EXT_pixel_buffer_object 1 +#define GL_EXT_pixel_transform 1 +#define GL_EXT_pixel_transform_color_table 1 +#define GL_EXT_point_parameters 1 +#define GL_EXT_polygon_offset 1 +#define GL_EXT_polygon_offset_clamp 1 +#define GL_EXT_post_depth_coverage 1 +#define GL_EXT_provoking_vertex 1 +#define GL_EXT_raster_multisample 1 +#define GL_EXT_rescale_normal 1 +#define GL_EXT_secondary_color 1 +#define GL_EXT_semaphore 1 +#define GL_EXT_semaphore_fd 1 +#define GL_EXT_semaphore_win32 1 +#define GL_EXT_separate_shader_objects 1 +#define GL_EXT_separate_specular_color 1 +#define GL_EXT_shader_framebuffer_fetch 1 +#define GL_EXT_shader_framebuffer_fetch_non_coherent 1 +#define GL_EXT_shader_image_load_formatted 1 +#define GL_EXT_shader_image_load_store 1 +#define GL_EXT_shader_integer_mix 1 +#define GL_EXT_shader_samples_identical 1 +#define GL_EXT_shadow_funcs 1 +#define GL_EXT_shared_texture_palette 1 +#define GL_EXT_sparse_texture2 1 +#define GL_EXT_stencil_clear_tag 1 +#define GL_EXT_stencil_two_side 1 +#define GL_EXT_stencil_wrap 1 +#define GL_EXT_subtexture 1 +#define GL_EXT_texture 1 +#define GL_EXT_texture3D 1 +#define GL_EXT_texture_array 1 +#define GL_EXT_texture_buffer_object 1 +#define GL_EXT_texture_compression_latc 1 +#define GL_EXT_texture_compression_rgtc 1 +#define GL_EXT_texture_compression_s3tc 1 +#define GL_EXT_texture_cube_map 1 +#define GL_EXT_texture_env_add 1 +#define GL_EXT_texture_env_combine 1 +#define GL_EXT_texture_env_dot3 1 +#define GL_EXT_texture_filter_anisotropic 1 +#define GL_EXT_texture_filter_minmax 1 +#define GL_EXT_texture_integer 1 +#define GL_EXT_texture_lod_bias 1 +#define GL_EXT_texture_mirror_clamp 1 +#define GL_EXT_texture_object 1 +#define GL_EXT_texture_perturb_normal 1 +#define GL_EXT_texture_sRGB 1 +#define GL_EXT_texture_sRGB_R8 1 +#define GL_EXT_texture_sRGB_RG8 1 +#define GL_EXT_texture_sRGB_decode 1 +#define GL_EXT_texture_shadow_lod 1 +#define GL_EXT_texture_shared_exponent 1 +#define GL_EXT_texture_snorm 1 +#define GL_EXT_texture_storage 1 +#define GL_EXT_texture_swizzle 1 +#define GL_EXT_timer_query 1 +#define GL_EXT_transform_feedback 1 +#define GL_EXT_vertex_array 1 +#define GL_EXT_vertex_array_bgra 1 +#define GL_EXT_vertex_attrib_64bit 1 +#define GL_EXT_vertex_shader 1 +#define GL_EXT_vertex_weighting 1 +#define GL_EXT_win32_keyed_mutex 1 +#define GL_EXT_window_rectangles 1 +#define GL_EXT_x11_sync_object 1 +#define GL_GREMEDY_frame_terminator 1 +#define GL_GREMEDY_string_marker 1 +#define GL_HP_convolution_border_modes 1 +#define GL_HP_image_transform 1 +#define GL_HP_occlusion_test 1 +#define GL_HP_texture_lighting 1 +#define GL_IBM_cull_vertex 1 +#define GL_IBM_multimode_draw_arrays 1 +#define GL_IBM_rasterpos_clip 1 +#define GL_IBM_static_data 1 +#define GL_IBM_texture_mirrored_repeat 1 +#define GL_IBM_vertex_array_lists 1 +#define GL_INGR_blend_func_separate 1 +#define GL_INGR_color_clamp 1 +#define GL_INGR_interlace_read 1 +#define GL_INTEL_blackhole_render 1 +#define GL_INTEL_conservative_rasterization 1 +#define GL_INTEL_fragment_shader_ordering 1 +#define GL_INTEL_framebuffer_CMAA 1 +#define GL_INTEL_map_texture 1 +#define GL_INTEL_parallel_arrays 1 +#define GL_INTEL_performance_query 1 +#define GL_KHR_blend_equation_advanced 1 +#define GL_KHR_blend_equation_advanced_coherent 1 +#define GL_KHR_context_flush_control 1 +#define GL_KHR_debug 1 +#define GL_KHR_no_error 1 +#define GL_KHR_parallel_shader_compile 1 +#define GL_KHR_robust_buffer_access_behavior 1 +#define GL_KHR_robustness 1 +#define GL_KHR_shader_subgroup 1 +#define GL_KHR_texture_compression_astc_hdr 1 +#define GL_KHR_texture_compression_astc_ldr 1 +#define GL_KHR_texture_compression_astc_sliced_3d 1 +#define GL_MESAX_texture_stack 1 +#define GL_MESA_framebuffer_flip_x 1 +#define GL_MESA_framebuffer_flip_y 1 +#define GL_MESA_framebuffer_swap_xy 1 +#define GL_MESA_pack_invert 1 +#define GL_MESA_program_binary_formats 1 +#define GL_MESA_resize_buffers 1 +#define GL_MESA_shader_integer_functions 1 +#define GL_MESA_tile_raster_order 1 +#define GL_MESA_window_pos 1 +#define GL_MESA_ycbcr_texture 1 +#define GL_NVX_blend_equation_advanced_multi_draw_buffers 1 +#define GL_NVX_conditional_render 1 +#define GL_NVX_gpu_memory_info 1 +#define GL_NVX_gpu_multicast2 1 +#define GL_NVX_linked_gpu_multicast 1 +#define GL_NVX_progress_fence 1 +#define GL_NV_alpha_to_coverage_dither_control 1 +#define GL_NV_bindless_multi_draw_indirect 1 +#define GL_NV_bindless_multi_draw_indirect_count 1 +#define GL_NV_bindless_texture 1 +#define GL_NV_blend_equation_advanced 1 +#define GL_NV_blend_equation_advanced_coherent 1 +#define GL_NV_blend_minmax_factor 1 +#define GL_NV_blend_square 1 +#define GL_NV_clip_space_w_scaling 1 +#define GL_NV_command_list 1 +#define GL_NV_compute_program5 1 +#define GL_NV_compute_shader_derivatives 1 +#define GL_NV_conditional_render 1 +#define GL_NV_conservative_raster 1 +#define GL_NV_conservative_raster_dilate 1 +#define GL_NV_conservative_raster_pre_snap 1 +#define GL_NV_conservative_raster_pre_snap_triangles 1 +#define GL_NV_conservative_raster_underestimation 1 +#define GL_NV_copy_depth_to_color 1 +#define GL_NV_copy_image 1 +#define GL_NV_deep_texture3D 1 +#define GL_NV_depth_buffer_float 1 +#define GL_NV_depth_clamp 1 +#define GL_NV_draw_texture 1 +#define GL_NV_draw_vulkan_image 1 +#define GL_NV_evaluators 1 +#define GL_NV_explicit_multisample 1 +#define GL_NV_fence 1 +#define GL_NV_fill_rectangle 1 +#define GL_NV_float_buffer 1 +#define GL_NV_fog_distance 1 +#define GL_NV_fragment_coverage_to_color 1 +#define GL_NV_fragment_program 1 +#define GL_NV_fragment_program2 1 +#define GL_NV_fragment_program4 1 +#define GL_NV_fragment_program_option 1 +#define GL_NV_fragment_shader_barycentric 1 +#define GL_NV_fragment_shader_interlock 1 +#define GL_NV_framebuffer_mixed_samples 1 +#define GL_NV_framebuffer_multisample_coverage 1 +#define GL_NV_geometry_program4 1 +#define GL_NV_geometry_shader4 1 +#define GL_NV_geometry_shader_passthrough 1 +#define GL_NV_gpu_multicast 1 +#define GL_NV_gpu_program4 1 +#define GL_NV_gpu_program5 1 +#define GL_NV_gpu_program5_mem_extended 1 +#define GL_NV_gpu_shader5 1 +#define GL_NV_half_float 1 +#define GL_NV_internalformat_sample_query 1 +#define GL_NV_light_max_exponent 1 +#define GL_NV_memory_attachment 1 +#define GL_NV_memory_object_sparse 1 +#define GL_NV_mesh_shader 1 +#define GL_NV_multisample_coverage 1 +#define GL_NV_multisample_filter_hint 1 +#define GL_NV_occlusion_query 1 +#define GL_NV_packed_depth_stencil 1 +#define GL_NV_parameter_buffer_object 1 +#define GL_NV_parameter_buffer_object2 1 +#define GL_NV_path_rendering 1 +#define GL_NV_path_rendering_shared_edge 1 +#define GL_NV_pixel_data_range 1 +#define GL_NV_point_sprite 1 +#define GL_NV_present_video 1 +#define GL_NV_primitive_restart 1 +#define GL_NV_primitive_shading_rate 1 +#define GL_NV_query_resource 1 +#define GL_NV_query_resource_tag 1 +#define GL_NV_register_combiners 1 +#define GL_NV_register_combiners2 1 +#define GL_NV_representative_fragment_test 1 +#define GL_NV_robustness_video_memory_purge 1 +#define GL_NV_sample_locations 1 +#define GL_NV_sample_mask_override_coverage 1 +#define GL_NV_scissor_exclusive 1 +#define GL_NV_shader_atomic_counters 1 +#define GL_NV_shader_atomic_float 1 +#define GL_NV_shader_atomic_float64 1 +#define GL_NV_shader_atomic_fp16_vector 1 +#define GL_NV_shader_atomic_int64 1 +#define GL_NV_shader_buffer_load 1 +#define GL_NV_shader_buffer_store 1 +#define GL_NV_shader_storage_buffer_object 1 +#define GL_NV_shader_subgroup_partitioned 1 +#define GL_NV_shader_texture_footprint 1 +#define GL_NV_shader_thread_group 1 +#define GL_NV_shader_thread_shuffle 1 +#define GL_NV_shading_rate_image 1 +#define GL_NV_stereo_view_rendering 1 +#define GL_NV_tessellation_program5 1 +#define GL_NV_texgen_emboss 1 +#define GL_NV_texgen_reflection 1 +#define GL_NV_texture_barrier 1 +#define GL_NV_texture_compression_vtc 1 +#define GL_NV_texture_env_combine4 1 +#define GL_NV_texture_expand_normal 1 +#define GL_NV_texture_multisample 1 +#define GL_NV_texture_rectangle 1 +#define GL_NV_texture_rectangle_compressed 1 +#define GL_NV_texture_shader 1 +#define GL_NV_texture_shader2 1 +#define GL_NV_texture_shader3 1 +#define GL_NV_timeline_semaphore 1 +#define GL_NV_transform_feedback 1 +#define GL_NV_transform_feedback2 1 +#define GL_NV_uniform_buffer_std430_layout 1 +#define GL_NV_uniform_buffer_unified_memory 1 +#define GL_NV_vdpau_interop 1 +#define GL_NV_vdpau_interop2 1 +#define GL_NV_vertex_array_range 1 +#define GL_NV_vertex_array_range2 1 +#define GL_NV_vertex_attrib_integer_64bit 1 +#define GL_NV_vertex_buffer_unified_memory 1 +#define GL_NV_vertex_program 1 +#define GL_NV_vertex_program1_1 1 +#define GL_NV_vertex_program2 1 +#define GL_NV_vertex_program2_option 1 +#define GL_NV_vertex_program3 1 +#define GL_NV_vertex_program4 1 +#define GL_NV_video_capture 1 +#define GL_NV_viewport_array2 1 +#define GL_NV_viewport_swizzle 1 +#define GL_OES_byte_coordinates 1 +#define GL_OES_compressed_paletted_texture 1 +#define GL_OES_fixed_point 1 +#define GL_OES_query_matrix 1 +#define GL_OES_read_format 1 +#define GL_OES_single_precision 1 +#define GL_OML_interlace 1 +#define GL_OML_resample 1 +#define GL_OML_subsample 1 +#define GL_OVR_multiview 1 +#define GL_OVR_multiview2 1 +#define GL_PGI_misc_hints 1 +#define GL_PGI_vertex_hints 1 +#define GL_REND_screen_coordinates 1 +#define GL_S3_s3tc 1 +#define GL_SGIS_detail_texture 1 +#define GL_SGIS_fog_function 1 +#define GL_SGIS_generate_mipmap 1 +#define GL_SGIS_multisample 1 +#define GL_SGIS_pixel_texture 1 +#define GL_SGIS_point_line_texgen 1 +#define GL_SGIS_point_parameters 1 +#define GL_SGIS_sharpen_texture 1 +#define GL_SGIS_texture4D 1 +#define GL_SGIS_texture_border_clamp 1 +#define GL_SGIS_texture_color_mask 1 +#define GL_SGIS_texture_edge_clamp 1 +#define GL_SGIS_texture_filter4 1 +#define GL_SGIS_texture_lod 1 +#define GL_SGIS_texture_select 1 +#define GL_SGIX_async 1 +#define GL_SGIX_async_histogram 1 +#define GL_SGIX_async_pixel 1 +#define GL_SGIX_blend_alpha_minmax 1 +#define GL_SGIX_calligraphic_fragment 1 +#define GL_SGIX_clipmap 1 +#define GL_SGIX_convolution_accuracy 1 +#define GL_SGIX_depth_pass_instrument 1 +#define GL_SGIX_depth_texture 1 +#define GL_SGIX_flush_raster 1 +#define GL_SGIX_fog_offset 1 +#define GL_SGIX_fragment_lighting 1 +#define GL_SGIX_framezoom 1 +#define GL_SGIX_igloo_interface 1 +#define GL_SGIX_instruments 1 +#define GL_SGIX_interlace 1 +#define GL_SGIX_ir_instrument1 1 +#define GL_SGIX_list_priority 1 +#define GL_SGIX_pixel_texture 1 +#define GL_SGIX_pixel_tiles 1 +#define GL_SGIX_polynomial_ffd 1 +#define GL_SGIX_reference_plane 1 +#define GL_SGIX_resample 1 +#define GL_SGIX_scalebias_hint 1 +#define GL_SGIX_shadow 1 +#define GL_SGIX_shadow_ambient 1 +#define GL_SGIX_sprite 1 +#define GL_SGIX_subsample 1 +#define GL_SGIX_tag_sample_buffer 1 +#define GL_SGIX_texture_add_env 1 +#define GL_SGIX_texture_coordinate_clamp 1 +#define GL_SGIX_texture_lod_bias 1 +#define GL_SGIX_texture_multi_buffer 1 +#define GL_SGIX_texture_scale_bias 1 +#define GL_SGIX_vertex_preclip 1 +#define GL_SGIX_ycrcb 1 +#define GL_SGIX_ycrcb_subsample 1 +#define GL_SGIX_ycrcba 1 +#define GL_SGI_color_matrix 1 +#define GL_SGI_color_table 1 +#define GL_SGI_texture_color_table 1 +#define GL_SUNX_constant_data 1 +#define GL_SUN_convolution_border_modes 1 +#define GL_SUN_global_alpha 1 +#define GL_SUN_mesh_array 1 +#define GL_SUN_slice_accum 1 +#define GL_SUN_triangle_list 1 +#define GL_SUN_vertex 1 +#define GL_WIN_phong_shading 1 +#define GL_WIN_specular_fog 1 + +typedef void(GLAD_API_PTR *PFNGLACCUMXOESPROC)(GLenum op, GLfixed value); +typedef GLboolean(GLAD_API_PTR *PFNGLACQUIREKEYEDMUTEXWIN32EXTPROC)(GLuint memory, GLuint64 key, + GLuint timeout); +typedef void(GLAD_API_PTR *PFNGLACTIVEPROGRAMEXTPROC)(GLuint program); +typedef void(GLAD_API_PTR *PFNGLACTIVESHADERPROGRAMPROC)(GLuint pipeline, GLuint program); +typedef void(GLAD_API_PTR *PFNGLACTIVESTENCILFACEEXTPROC)(GLenum face); +typedef void(GLAD_API_PTR *PFNGLACTIVETEXTUREPROC)(GLenum texture); +typedef void(GLAD_API_PTR *PFNGLACTIVETEXTUREARBPROC)(GLenum texture); +typedef void(GLAD_API_PTR *PFNGLACTIVEVARYINGNVPROC)(GLuint program, const GLchar *name); +typedef void(GLAD_API_PTR *PFNGLALPHAFRAGMENTOP1ATIPROC)(GLenum op, GLuint dst, GLuint dstMod, + GLuint arg1, GLuint arg1Rep, + GLuint arg1Mod); +typedef void(GLAD_API_PTR *PFNGLALPHAFRAGMENTOP2ATIPROC)(GLenum op, GLuint dst, GLuint dstMod, + GLuint arg1, GLuint arg1Rep, + GLuint arg1Mod, GLuint arg2, + GLuint arg2Rep, GLuint arg2Mod); +typedef void(GLAD_API_PTR *PFNGLALPHAFRAGMENTOP3ATIPROC)( + GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, + GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +typedef void(GLAD_API_PTR *PFNGLALPHAFUNCXOESPROC)(GLenum func, GLfixed ref); +typedef void(GLAD_API_PTR *PFNGLALPHATOCOVERAGEDITHERCONTROLNVPROC)(GLenum mode); +typedef void(GLAD_API_PTR *PFNGLAPPLYFRAMEBUFFERATTACHMENTCMAAINTELPROC)(void); +typedef void(GLAD_API_PTR *PFNGLAPPLYTEXTUREEXTPROC)(GLenum mode); +typedef GLboolean(GLAD_API_PTR *PFNGLAREPROGRAMSRESIDENTNVPROC)(GLsizei n, const GLuint *programs, + GLboolean *residences); +typedef GLboolean(GLAD_API_PTR *PFNGLARETEXTURESRESIDENTEXTPROC)(GLsizei n, const GLuint *textures, + GLboolean *residences); +typedef void(GLAD_API_PTR *PFNGLARRAYELEMENTEXTPROC)(GLint i); +typedef void(GLAD_API_PTR *PFNGLARRAYOBJECTATIPROC)(GLenum array, GLint size, GLenum type, + GLsizei stride, GLuint buffer, GLuint offset); +typedef GLuint(GLAD_API_PTR *PFNGLASYNCCOPYBUFFERSUBDATANVXPROC)( + GLsizei waitSemaphoreCount, const GLuint *waitSemaphoreArray, + const GLuint64 *fenceValueArray, GLuint readGpu, GLbitfield writeGpuMask, GLuint readBuffer, + GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size, + GLsizei signalSemaphoreCount, const GLuint *signalSemaphoreArray, + const GLuint64 *signalValueArray); +typedef GLuint(GLAD_API_PTR *PFNGLASYNCCOPYIMAGESUBDATANVXPROC)( + GLsizei waitSemaphoreCount, const GLuint *waitSemaphoreArray, + const GLuint64 *waitValueArray, GLuint srcGpu, GLbitfield dstGpuMask, GLuint srcName, + GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, + GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, + GLsizei srcHeight, GLsizei srcDepth, GLsizei signalSemaphoreCount, + const GLuint *signalSemaphoreArray, const GLuint64 *signalValueArray); +typedef void(GLAD_API_PTR *PFNGLASYNCMARKERSGIXPROC)(GLuint marker); +typedef void(GLAD_API_PTR *PFNGLATTACHOBJECTARBPROC)(GLhandleARB containerObj, GLhandleARB obj); +typedef void(GLAD_API_PTR *PFNGLATTACHSHADERPROC)(GLuint program, GLuint shader); +typedef void(GLAD_API_PTR *PFNGLBEGINCONDITIONALRENDERPROC)(GLuint id, GLenum mode); +typedef void(GLAD_API_PTR *PFNGLBEGINCONDITIONALRENDERNVPROC)(GLuint id, GLenum mode); +typedef void(GLAD_API_PTR *PFNGLBEGINCONDITIONALRENDERNVXPROC)(GLuint id); +typedef void(GLAD_API_PTR *PFNGLBEGINFRAGMENTSHADERATIPROC)(void); +typedef void(GLAD_API_PTR *PFNGLBEGINOCCLUSIONQUERYNVPROC)(GLuint id); +typedef void(GLAD_API_PTR *PFNGLBEGINPERFMONITORAMDPROC)(GLuint monitor); +typedef void(GLAD_API_PTR *PFNGLBEGINPERFQUERYINTELPROC)(GLuint queryHandle); +typedef void(GLAD_API_PTR *PFNGLBEGINQUERYPROC)(GLenum target, GLuint id); +typedef void(GLAD_API_PTR *PFNGLBEGINQUERYARBPROC)(GLenum target, GLuint id); +typedef void(GLAD_API_PTR *PFNGLBEGINQUERYINDEXEDPROC)(GLenum target, GLuint index, GLuint id); +typedef void(GLAD_API_PTR *PFNGLBEGINTRANSFORMFEEDBACKPROC)(GLenum primitiveMode); +typedef void(GLAD_API_PTR *PFNGLBEGINTRANSFORMFEEDBACKEXTPROC)(GLenum primitiveMode); +typedef void(GLAD_API_PTR *PFNGLBEGINTRANSFORMFEEDBACKNVPROC)(GLenum primitiveMode); +typedef void(GLAD_API_PTR *PFNGLBEGINVERTEXSHADEREXTPROC)(void); +typedef void(GLAD_API_PTR *PFNGLBEGINVIDEOCAPTURENVPROC)(GLuint video_capture_slot); +typedef void(GLAD_API_PTR *PFNGLBINDATTRIBLOCATIONPROC)(GLuint program, GLuint index, + const GLchar *name); +typedef void(GLAD_API_PTR *PFNGLBINDATTRIBLOCATIONARBPROC)(GLhandleARB programObj, GLuint index, + const GLcharARB *name); +typedef void(GLAD_API_PTR *PFNGLBINDBUFFERPROC)(GLenum target, GLuint buffer); +typedef void(GLAD_API_PTR *PFNGLBINDBUFFERARBPROC)(GLenum target, GLuint buffer); +typedef void(GLAD_API_PTR *PFNGLBINDBUFFERBASEPROC)(GLenum target, GLuint index, GLuint buffer); +typedef void(GLAD_API_PTR *PFNGLBINDBUFFERBASEEXTPROC)(GLenum target, GLuint index, GLuint buffer); +typedef void(GLAD_API_PTR *PFNGLBINDBUFFERBASENVPROC)(GLenum target, GLuint index, GLuint buffer); +typedef void(GLAD_API_PTR *PFNGLBINDBUFFEROFFSETEXTPROC)(GLenum target, GLuint index, GLuint buffer, + GLintptr offset); +typedef void(GLAD_API_PTR *PFNGLBINDBUFFEROFFSETNVPROC)(GLenum target, GLuint index, GLuint buffer, + GLintptr offset); +typedef void(GLAD_API_PTR *PFNGLBINDBUFFERRANGEPROC)(GLenum target, GLuint index, GLuint buffer, + GLintptr offset, GLsizeiptr size); +typedef void(GLAD_API_PTR *PFNGLBINDBUFFERRANGEEXTPROC)(GLenum target, GLuint index, GLuint buffer, + GLintptr offset, GLsizeiptr size); +typedef void(GLAD_API_PTR *PFNGLBINDBUFFERRANGENVPROC)(GLenum target, GLuint index, GLuint buffer, + GLintptr offset, GLsizeiptr size); +typedef void(GLAD_API_PTR *PFNGLBINDBUFFERSBASEPROC)(GLenum target, GLuint first, GLsizei count, + const GLuint *buffers); +typedef void(GLAD_API_PTR *PFNGLBINDBUFFERSRANGEPROC)(GLenum target, GLuint first, GLsizei count, + const GLuint *buffers, + const GLintptr *offsets, + const GLsizeiptr *sizes); +typedef void(GLAD_API_PTR *PFNGLBINDFRAGDATALOCATIONPROC)(GLuint program, GLuint color, + const GLchar *name); +typedef void(GLAD_API_PTR *PFNGLBINDFRAGDATALOCATIONEXTPROC)(GLuint program, GLuint color, + const GLchar *name); +typedef void(GLAD_API_PTR *PFNGLBINDFRAGDATALOCATIONINDEXEDPROC)(GLuint program, GLuint colorNumber, + GLuint index, const GLchar *name); +typedef void(GLAD_API_PTR *PFNGLBINDFRAGMENTSHADERATIPROC)(GLuint id); +typedef void(GLAD_API_PTR *PFNGLBINDFRAMEBUFFERPROC)(GLenum target, GLuint framebuffer); +typedef void(GLAD_API_PTR *PFNGLBINDFRAMEBUFFEREXTPROC)(GLenum target, GLuint framebuffer); +typedef void(GLAD_API_PTR *PFNGLBINDIMAGETEXTUREPROC)(GLuint unit, GLuint texture, GLint level, + GLboolean layered, GLint layer, GLenum access, + GLenum format); +typedef void(GLAD_API_PTR *PFNGLBINDIMAGETEXTUREEXTPROC)(GLuint index, GLuint texture, GLint level, + GLboolean layered, GLint layer, + GLenum access, GLint format); +typedef void(GLAD_API_PTR *PFNGLBINDIMAGETEXTURESPROC)(GLuint first, GLsizei count, + const GLuint *textures); +typedef GLuint(GLAD_API_PTR *PFNGLBINDLIGHTPARAMETEREXTPROC)(GLenum light, GLenum value); +typedef GLuint(GLAD_API_PTR *PFNGLBINDMATERIALPARAMETEREXTPROC)(GLenum face, GLenum value); +typedef void(GLAD_API_PTR *PFNGLBINDMULTITEXTUREEXTPROC)(GLenum texunit, GLenum target, + GLuint texture); +typedef GLuint(GLAD_API_PTR *PFNGLBINDPARAMETEREXTPROC)(GLenum value); +typedef void(GLAD_API_PTR *PFNGLBINDPROGRAMARBPROC)(GLenum target, GLuint program); +typedef void(GLAD_API_PTR *PFNGLBINDPROGRAMNVPROC)(GLenum target, GLuint id); +typedef void(GLAD_API_PTR *PFNGLBINDPROGRAMPIPELINEPROC)(GLuint pipeline); +typedef void(GLAD_API_PTR *PFNGLBINDRENDERBUFFERPROC)(GLenum target, GLuint renderbuffer); +typedef void(GLAD_API_PTR *PFNGLBINDRENDERBUFFEREXTPROC)(GLenum target, GLuint renderbuffer); +typedef void(GLAD_API_PTR *PFNGLBINDSAMPLERPROC)(GLuint unit, GLuint sampler); +typedef void(GLAD_API_PTR *PFNGLBINDSAMPLERSPROC)(GLuint first, GLsizei count, + const GLuint *samplers); +typedef void(GLAD_API_PTR *PFNGLBINDSHADINGRATEIMAGENVPROC)(GLuint texture); +typedef GLuint(GLAD_API_PTR *PFNGLBINDTEXGENPARAMETEREXTPROC)(GLenum unit, GLenum coord, + GLenum value); +typedef void(GLAD_API_PTR *PFNGLBINDTEXTUREPROC)(GLenum target, GLuint texture); +typedef void(GLAD_API_PTR *PFNGLBINDTEXTUREEXTPROC)(GLenum target, GLuint texture); +typedef void(GLAD_API_PTR *PFNGLBINDTEXTUREUNITPROC)(GLuint unit, GLuint texture); +typedef GLuint(GLAD_API_PTR *PFNGLBINDTEXTUREUNITPARAMETEREXTPROC)(GLenum unit, GLenum value); +typedef void(GLAD_API_PTR *PFNGLBINDTEXTURESPROC)(GLuint first, GLsizei count, + const GLuint *textures); +typedef void(GLAD_API_PTR *PFNGLBINDTRANSFORMFEEDBACKPROC)(GLenum target, GLuint id); +typedef void(GLAD_API_PTR *PFNGLBINDTRANSFORMFEEDBACKNVPROC)(GLenum target, GLuint id); +typedef void(GLAD_API_PTR *PFNGLBINDVERTEXARRAYPROC)(GLuint array); +typedef void(GLAD_API_PTR *PFNGLBINDVERTEXARRAYAPPLEPROC)(GLuint array); +typedef void(GLAD_API_PTR *PFNGLBINDVERTEXBUFFERPROC)(GLuint bindingindex, GLuint buffer, + GLintptr offset, GLsizei stride); +typedef void(GLAD_API_PTR *PFNGLBINDVERTEXBUFFERSPROC)(GLuint first, GLsizei count, + const GLuint *buffers, + const GLintptr *offsets, + const GLsizei *strides); +typedef void(GLAD_API_PTR *PFNGLBINDVERTEXSHADEREXTPROC)(GLuint id); +typedef void(GLAD_API_PTR *PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC)(GLuint video_capture_slot, + GLuint stream, + GLenum frame_region, + GLintptrARB offset); +typedef void(GLAD_API_PTR *PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC)(GLuint video_capture_slot, + GLuint stream, + GLenum frame_region, + GLenum target, GLuint texture); +typedef void(GLAD_API_PTR *PFNGLBINORMAL3BEXTPROC)(GLbyte bx, GLbyte by, GLbyte bz); +typedef void(GLAD_API_PTR *PFNGLBINORMAL3BVEXTPROC)(const GLbyte *v); +typedef void(GLAD_API_PTR *PFNGLBINORMAL3DEXTPROC)(GLdouble bx, GLdouble by, GLdouble bz); +typedef void(GLAD_API_PTR *PFNGLBINORMAL3DVEXTPROC)(const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLBINORMAL3FEXTPROC)(GLfloat bx, GLfloat by, GLfloat bz); +typedef void(GLAD_API_PTR *PFNGLBINORMAL3FVEXTPROC)(const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLBINORMAL3IEXTPROC)(GLint bx, GLint by, GLint bz); +typedef void(GLAD_API_PTR *PFNGLBINORMAL3IVEXTPROC)(const GLint *v); +typedef void(GLAD_API_PTR *PFNGLBINORMAL3SEXTPROC)(GLshort bx, GLshort by, GLshort bz); +typedef void(GLAD_API_PTR *PFNGLBINORMAL3SVEXTPROC)(const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLBINORMALPOINTEREXTPROC)(GLenum type, GLsizei stride, + const void *pointer); +typedef void(GLAD_API_PTR *PFNGLBITMAPXOESPROC)(GLsizei width, GLsizei height, GLfixed xorig, + GLfixed yorig, GLfixed xmove, GLfixed ymove, + const GLubyte *bitmap); +typedef void(GLAD_API_PTR *PFNGLBLENDBARRIERKHRPROC)(void); +typedef void(GLAD_API_PTR *PFNGLBLENDBARRIERNVPROC)(void); +typedef void(GLAD_API_PTR *PFNGLBLENDCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, + GLfloat alpha); +typedef void(GLAD_API_PTR *PFNGLBLENDCOLOREXTPROC)(GLfloat red, GLfloat green, GLfloat blue, + GLfloat alpha); +typedef void(GLAD_API_PTR *PFNGLBLENDCOLORXOESPROC)(GLfixed red, GLfixed green, GLfixed blue, + GLfixed alpha); +typedef void(GLAD_API_PTR *PFNGLBLENDEQUATIONPROC)(GLenum mode); +typedef void(GLAD_API_PTR *PFNGLBLENDEQUATIONEXTPROC)(GLenum mode); +typedef void(GLAD_API_PTR *PFNGLBLENDEQUATIONINDEXEDAMDPROC)(GLuint buf, GLenum mode); +typedef void(GLAD_API_PTR *PFNGLBLENDEQUATIONSEPARATEPROC)(GLenum modeRGB, GLenum modeAlpha); +typedef void(GLAD_API_PTR *PFNGLBLENDEQUATIONSEPARATEEXTPROC)(GLenum modeRGB, GLenum modeAlpha); +typedef void(GLAD_API_PTR *PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC)(GLuint buf, GLenum modeRGB, + GLenum modeAlpha); +typedef void(GLAD_API_PTR *PFNGLBLENDEQUATIONSEPARATEIPROC)(GLuint buf, GLenum modeRGB, + GLenum modeAlpha); +typedef void(GLAD_API_PTR *PFNGLBLENDEQUATIONSEPARATEIARBPROC)(GLuint buf, GLenum modeRGB, + GLenum modeAlpha); +typedef void(GLAD_API_PTR *PFNGLBLENDEQUATIONIPROC)(GLuint buf, GLenum mode); +typedef void(GLAD_API_PTR *PFNGLBLENDEQUATIONIARBPROC)(GLuint buf, GLenum mode); +typedef void(GLAD_API_PTR *PFNGLBLENDFUNCPROC)(GLenum sfactor, GLenum dfactor); +typedef void(GLAD_API_PTR *PFNGLBLENDFUNCINDEXEDAMDPROC)(GLuint buf, GLenum src, GLenum dst); +typedef void(GLAD_API_PTR *PFNGLBLENDFUNCSEPARATEPROC)(GLenum sfactorRGB, GLenum dfactorRGB, + GLenum sfactorAlpha, GLenum dfactorAlpha); +typedef void(GLAD_API_PTR *PFNGLBLENDFUNCSEPARATEEXTPROC)(GLenum sfactorRGB, GLenum dfactorRGB, + GLenum sfactorAlpha, GLenum dfactorAlpha); +typedef void(GLAD_API_PTR *PFNGLBLENDFUNCSEPARATEINGRPROC)(GLenum sfactorRGB, GLenum dfactorRGB, + GLenum sfactorAlpha, + GLenum dfactorAlpha); +typedef void(GLAD_API_PTR *PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC)(GLuint buf, GLenum srcRGB, + GLenum dstRGB, GLenum srcAlpha, + GLenum dstAlpha); +typedef void(GLAD_API_PTR *PFNGLBLENDFUNCSEPARATEIPROC)(GLuint buf, GLenum srcRGB, GLenum dstRGB, + GLenum srcAlpha, GLenum dstAlpha); +typedef void(GLAD_API_PTR *PFNGLBLENDFUNCSEPARATEIARBPROC)(GLuint buf, GLenum srcRGB, GLenum dstRGB, + GLenum srcAlpha, GLenum dstAlpha); +typedef void(GLAD_API_PTR *PFNGLBLENDFUNCIPROC)(GLuint buf, GLenum src, GLenum dst); +typedef void(GLAD_API_PTR *PFNGLBLENDFUNCIARBPROC)(GLuint buf, GLenum src, GLenum dst); +typedef void(GLAD_API_PTR *PFNGLBLENDPARAMETERINVPROC)(GLenum pname, GLint value); +typedef void(GLAD_API_PTR *PFNGLBLITFRAMEBUFFERPROC)(GLint srcX0, GLint srcY0, GLint srcX1, + GLint srcY1, GLint dstX0, GLint dstY0, + GLint dstX1, GLint dstY1, GLbitfield mask, + GLenum filter); +typedef void(GLAD_API_PTR *PFNGLBLITFRAMEBUFFEREXTPROC)(GLint srcX0, GLint srcY0, GLint srcX1, + GLint srcY1, GLint dstX0, GLint dstY0, + GLint dstX1, GLint dstY1, GLbitfield mask, + GLenum filter); +typedef void(GLAD_API_PTR *PFNGLBLITFRAMEBUFFERLAYEREXTPROC)(GLint srcX0, GLint srcY0, GLint srcX1, + GLint srcY1, GLint srcLayer, + GLint dstX0, GLint dstY0, GLint dstX1, + GLint dstY1, GLint dstLayer, + GLbitfield mask, GLenum filter); +typedef void(GLAD_API_PTR *PFNGLBLITFRAMEBUFFERLAYERSEXTPROC)(GLint srcX0, GLint srcY0, GLint srcX1, + GLint srcY1, GLint dstX0, GLint dstY0, + GLint dstX1, GLint dstY1, + GLbitfield mask, GLenum filter); +typedef void(GLAD_API_PTR *PFNGLBLITNAMEDFRAMEBUFFERPROC)(GLuint readFramebuffer, + GLuint drawFramebuffer, GLint srcX0, + GLint srcY0, GLint srcX1, GLint srcY1, + GLint dstX0, GLint dstY0, GLint dstX1, + GLint dstY1, GLbitfield mask, + GLenum filter); +typedef void(GLAD_API_PTR *PFNGLBUFFERADDRESSRANGENVPROC)(GLenum pname, GLuint index, + GLuint64EXT address, GLsizeiptr length); +typedef void(GLAD_API_PTR *PFNGLBUFFERATTACHMEMORYNVPROC)(GLenum target, GLuint memory, + GLuint64 offset); +typedef void(GLAD_API_PTR *PFNGLBUFFERDATAPROC)(GLenum target, GLsizeiptr size, const void *data, + GLenum usage); +typedef void(GLAD_API_PTR *PFNGLBUFFERDATAARBPROC)(GLenum target, GLsizeiptrARB size, + const void *data, GLenum usage); +typedef void(GLAD_API_PTR *PFNGLBUFFERPAGECOMMITMENTARBPROC)(GLenum target, GLintptr offset, + GLsizeiptr size, GLboolean commit); +typedef void(GLAD_API_PTR *PFNGLBUFFERPAGECOMMITMENTMEMNVPROC)(GLenum target, GLintptr offset, + GLsizeiptr size, GLuint memory, + GLuint64 memOffset, + GLboolean commit); +typedef void(GLAD_API_PTR *PFNGLBUFFERPARAMETERIAPPLEPROC)(GLenum target, GLenum pname, + GLint param); +typedef void(GLAD_API_PTR *PFNGLBUFFERSTORAGEPROC)(GLenum target, GLsizeiptr size, const void *data, + GLbitfield flags); +typedef void(GLAD_API_PTR *PFNGLBUFFERSTORAGEEXTERNALEXTPROC)(GLenum target, GLintptr offset, + GLsizeiptr size, + GLeglClientBufferEXT clientBuffer, + GLbitfield flags); +typedef void(GLAD_API_PTR *PFNGLBUFFERSTORAGEMEMEXTPROC)(GLenum target, GLsizeiptr size, + GLuint memory, GLuint64 offset); +typedef void(GLAD_API_PTR *PFNGLBUFFERSUBDATAPROC)(GLenum target, GLintptr offset, GLsizeiptr size, + const void *data); +typedef void(GLAD_API_PTR *PFNGLBUFFERSUBDATAARBPROC)(GLenum target, GLintptrARB offset, + GLsizeiptrARB size, const void *data); +typedef void(GLAD_API_PTR *PFNGLCALLCOMMANDLISTNVPROC)(GLuint list); +typedef GLenum(GLAD_API_PTR *PFNGLCHECKFRAMEBUFFERSTATUSPROC)(GLenum target); +typedef GLenum(GLAD_API_PTR *PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC)(GLenum target); +typedef GLenum(GLAD_API_PTR *PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC)(GLuint framebuffer, + GLenum target); +typedef GLenum(GLAD_API_PTR *PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC)(GLuint framebuffer, + GLenum target); +typedef void(GLAD_API_PTR *PFNGLCLAMPCOLORPROC)(GLenum target, GLenum clamp); +typedef void(GLAD_API_PTR *PFNGLCLAMPCOLORARBPROC)(GLenum target, GLenum clamp); +typedef void(GLAD_API_PTR *PFNGLCLEARPROC)(GLbitfield mask); +typedef void(GLAD_API_PTR *PFNGLCLEARACCUMXOESPROC)(GLfixed red, GLfixed green, GLfixed blue, + GLfixed alpha); +typedef void(GLAD_API_PTR *PFNGLCLEARBUFFERDATAPROC)(GLenum target, GLenum internalformat, + GLenum format, GLenum type, const void *data); +typedef void(GLAD_API_PTR *PFNGLCLEARBUFFERSUBDATAPROC)(GLenum target, GLenum internalformat, + GLintptr offset, GLsizeiptr size, + GLenum format, GLenum type, + const void *data); +typedef void(GLAD_API_PTR *PFNGLCLEARBUFFERFIPROC)(GLenum buffer, GLint drawbuffer, GLfloat depth, + GLint stencil); +typedef void(GLAD_API_PTR *PFNGLCLEARBUFFERFVPROC)(GLenum buffer, GLint drawbuffer, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLCLEARBUFFERIVPROC)(GLenum buffer, GLint drawbuffer, + const GLint *value); +typedef void(GLAD_API_PTR *PFNGLCLEARBUFFERUIVPROC)(GLenum buffer, GLint drawbuffer, + const GLuint *value); +typedef void(GLAD_API_PTR *PFNGLCLEARCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, + GLfloat alpha); +typedef void(GLAD_API_PTR *PFNGLCLEARCOLORIIEXTPROC)(GLint red, GLint green, GLint blue, + GLint alpha); +typedef void(GLAD_API_PTR *PFNGLCLEARCOLORIUIEXTPROC)(GLuint red, GLuint green, GLuint blue, + GLuint alpha); +typedef void(GLAD_API_PTR *PFNGLCLEARCOLORXOESPROC)(GLfixed red, GLfixed green, GLfixed blue, + GLfixed alpha); +typedef void(GLAD_API_PTR *PFNGLCLEARDEPTHPROC)(GLdouble depth); +typedef void(GLAD_API_PTR *PFNGLCLEARDEPTHDNVPROC)(GLdouble depth); +typedef void(GLAD_API_PTR *PFNGLCLEARDEPTHFPROC)(GLfloat d); +typedef void(GLAD_API_PTR *PFNGLCLEARDEPTHFOESPROC)(GLclampf depth); +typedef void(GLAD_API_PTR *PFNGLCLEARDEPTHXOESPROC)(GLfixed depth); +typedef void(GLAD_API_PTR *PFNGLCLEARNAMEDBUFFERDATAPROC)(GLuint buffer, GLenum internalformat, + GLenum format, GLenum type, + const void *data); +typedef void(GLAD_API_PTR *PFNGLCLEARNAMEDBUFFERDATAEXTPROC)(GLuint buffer, GLenum internalformat, + GLenum format, GLenum type, + const void *data); +typedef void(GLAD_API_PTR *PFNGLCLEARNAMEDBUFFERSUBDATAPROC)(GLuint buffer, GLenum internalformat, + GLintptr offset, GLsizeiptr size, + GLenum format, GLenum type, + const void *data); +typedef void(GLAD_API_PTR *PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC)(GLuint buffer, + GLenum internalformat, + GLsizeiptr offset, GLsizeiptr size, + GLenum format, GLenum type, + const void *data); +typedef void(GLAD_API_PTR *PFNGLCLEARNAMEDFRAMEBUFFERFIPROC)(GLuint framebuffer, GLenum buffer, + GLint drawbuffer, GLfloat depth, + GLint stencil); +typedef void(GLAD_API_PTR *PFNGLCLEARNAMEDFRAMEBUFFERFVPROC)(GLuint framebuffer, GLenum buffer, + GLint drawbuffer, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLCLEARNAMEDFRAMEBUFFERIVPROC)(GLuint framebuffer, GLenum buffer, + GLint drawbuffer, const GLint *value); +typedef void(GLAD_API_PTR *PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC)(GLuint framebuffer, GLenum buffer, + GLint drawbuffer, + const GLuint *value); +typedef void(GLAD_API_PTR *PFNGLCLEARSTENCILPROC)(GLint s); +typedef void(GLAD_API_PTR *PFNGLCLEARTEXIMAGEPROC)(GLuint texture, GLint level, GLenum format, + GLenum type, const void *data); +typedef void(GLAD_API_PTR *PFNGLCLEARTEXSUBIMAGEPROC)(GLuint texture, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLenum format, + GLenum type, const void *data); +typedef void(GLAD_API_PTR *PFNGLCLIENTACTIVETEXTUREARBPROC)(GLenum texture); +typedef void(GLAD_API_PTR *PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC)(GLenum stream); +typedef void(GLAD_API_PTR *PFNGLCLIENTATTRIBDEFAULTEXTPROC)(GLbitfield mask); +typedef void(GLAD_API_PTR *PFNGLCLIENTWAITSEMAPHOREUI64NVXPROC)(GLsizei fenceObjectCount, + const GLuint *semaphoreArray, + const GLuint64 *fenceValueArray); +typedef GLenum(GLAD_API_PTR *PFNGLCLIENTWAITSYNCPROC)(GLsync sync, GLbitfield flags, + GLuint64 timeout); +typedef void(GLAD_API_PTR *PFNGLCLIPCONTROLPROC)(GLenum origin, GLenum depth); +typedef void(GLAD_API_PTR *PFNGLCLIPPLANEFOESPROC)(GLenum plane, const GLfloat *equation); +typedef void(GLAD_API_PTR *PFNGLCLIPPLANEXOESPROC)(GLenum plane, const GLfixed *equation); +typedef void(GLAD_API_PTR *PFNGLCOLOR3FVERTEX3FSUNPROC)(GLfloat r, GLfloat g, GLfloat b, GLfloat x, + GLfloat y, GLfloat z); +typedef void(GLAD_API_PTR *PFNGLCOLOR3FVERTEX3FVSUNPROC)(const GLfloat *c, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLCOLOR3HNVPROC)(GLhalfNV red, GLhalfNV green, GLhalfNV blue); +typedef void(GLAD_API_PTR *PFNGLCOLOR3HVNVPROC)(const GLhalfNV *v); +typedef void(GLAD_API_PTR *PFNGLCOLOR3XOESPROC)(GLfixed red, GLfixed green, GLfixed blue); +typedef void(GLAD_API_PTR *PFNGLCOLOR3XVOESPROC)(const GLfixed *components); +typedef void(GLAD_API_PTR *PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC)(GLfloat r, GLfloat g, GLfloat b, + GLfloat a, GLfloat nx, GLfloat ny, + GLfloat nz, GLfloat x, GLfloat y, + GLfloat z); +typedef void(GLAD_API_PTR *PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC)(const GLfloat *c, const GLfloat *n, + const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLCOLOR4HNVPROC)(GLhalfNV red, GLhalfNV green, GLhalfNV blue, + GLhalfNV alpha); +typedef void(GLAD_API_PTR *PFNGLCOLOR4HVNVPROC)(const GLhalfNV *v); +typedef void(GLAD_API_PTR *PFNGLCOLOR4UBVERTEX2FSUNPROC)(GLubyte r, GLubyte g, GLubyte b, GLubyte a, + GLfloat x, GLfloat y); +typedef void(GLAD_API_PTR *PFNGLCOLOR4UBVERTEX2FVSUNPROC)(const GLubyte *c, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLCOLOR4UBVERTEX3FSUNPROC)(GLubyte r, GLubyte g, GLubyte b, GLubyte a, + GLfloat x, GLfloat y, GLfloat z); +typedef void(GLAD_API_PTR *PFNGLCOLOR4UBVERTEX3FVSUNPROC)(const GLubyte *c, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLCOLOR4XOESPROC)(GLfixed red, GLfixed green, GLfixed blue, + GLfixed alpha); +typedef void(GLAD_API_PTR *PFNGLCOLOR4XVOESPROC)(const GLfixed *components); +typedef void(GLAD_API_PTR *PFNGLCOLORFORMATNVPROC)(GLint size, GLenum type, GLsizei stride); +typedef void(GLAD_API_PTR *PFNGLCOLORFRAGMENTOP1ATIPROC)(GLenum op, GLuint dst, GLuint dstMask, + GLuint dstMod, GLuint arg1, GLuint arg1Rep, + GLuint arg1Mod); +typedef void(GLAD_API_PTR *PFNGLCOLORFRAGMENTOP2ATIPROC)(GLenum op, GLuint dst, GLuint dstMask, + GLuint dstMod, GLuint arg1, GLuint arg1Rep, + GLuint arg1Mod, GLuint arg2, + GLuint arg2Rep, GLuint arg2Mod); +typedef void(GLAD_API_PTR *PFNGLCOLORFRAGMENTOP3ATIPROC)(GLenum op, GLuint dst, GLuint dstMask, + GLuint dstMod, GLuint arg1, GLuint arg1Rep, + GLuint arg1Mod, GLuint arg2, + GLuint arg2Rep, GLuint arg2Mod, + GLuint arg3, GLuint arg3Rep, + GLuint arg3Mod); +typedef void(GLAD_API_PTR *PFNGLCOLORMASKPROC)(GLboolean red, GLboolean green, GLboolean blue, + GLboolean alpha); +typedef void(GLAD_API_PTR *PFNGLCOLORMASKINDEXEDEXTPROC)(GLuint index, GLboolean r, GLboolean g, + GLboolean b, GLboolean a); +typedef void(GLAD_API_PTR *PFNGLCOLORMASKIPROC)(GLuint index, GLboolean r, GLboolean g, GLboolean b, + GLboolean a); +typedef void(GLAD_API_PTR *PFNGLCOLORPOINTEREXTPROC)(GLint size, GLenum type, GLsizei stride, + GLsizei count, const void *pointer); +typedef void(GLAD_API_PTR *PFNGLCOLORPOINTERLISTIBMPROC)(GLint size, GLenum type, GLint stride, + const void **pointer, GLint ptrstride); +typedef void(GLAD_API_PTR *PFNGLCOLORPOINTERVINTELPROC)(GLint size, GLenum type, + const void **pointer); +typedef void(GLAD_API_PTR *PFNGLCOLORSUBTABLEEXTPROC)(GLenum target, GLsizei start, GLsizei count, + GLenum format, GLenum type, const void *data); +typedef void(GLAD_API_PTR *PFNGLCOLORTABLEEXTPROC)(GLenum target, GLenum internalFormat, + GLsizei width, GLenum format, GLenum type, + const void *table); +typedef void(GLAD_API_PTR *PFNGLCOLORTABLEPARAMETERFVSGIPROC)(GLenum target, GLenum pname, + const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLCOLORTABLEPARAMETERIVSGIPROC)(GLenum target, GLenum pname, + const GLint *params); +typedef void(GLAD_API_PTR *PFNGLCOLORTABLESGIPROC)(GLenum target, GLenum internalformat, + GLsizei width, GLenum format, GLenum type, + const void *table); +typedef void(GLAD_API_PTR *PFNGLCOMBINERINPUTNVPROC)(GLenum stage, GLenum portion, GLenum variable, + GLenum input, GLenum mapping, + GLenum componentUsage); +typedef void(GLAD_API_PTR *PFNGLCOMBINEROUTPUTNVPROC)(GLenum stage, GLenum portion, GLenum abOutput, + GLenum cdOutput, GLenum sumOutput, + GLenum scale, GLenum bias, + GLboolean abDotProduct, + GLboolean cdDotProduct, GLboolean muxSum); +typedef void(GLAD_API_PTR *PFNGLCOMBINERPARAMETERFNVPROC)(GLenum pname, GLfloat param); +typedef void(GLAD_API_PTR *PFNGLCOMBINERPARAMETERFVNVPROC)(GLenum pname, const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLCOMBINERPARAMETERINVPROC)(GLenum pname, GLint param); +typedef void(GLAD_API_PTR *PFNGLCOMBINERPARAMETERIVNVPROC)(GLenum pname, const GLint *params); +typedef void(GLAD_API_PTR *PFNGLCOMBINERSTAGEPARAMETERFVNVPROC)(GLenum stage, GLenum pname, + const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLCOMMANDLISTSEGMENTSNVPROC)(GLuint list, GLuint segments); +typedef void(GLAD_API_PTR *PFNGLCOMPILECOMMANDLISTNVPROC)(GLuint list); +typedef void(GLAD_API_PTR *PFNGLCOMPILESHADERPROC)(GLuint shader); +typedef void(GLAD_API_PTR *PFNGLCOMPILESHADERARBPROC)(GLhandleARB shaderObj); +typedef void(GLAD_API_PTR *PFNGLCOMPILESHADERINCLUDEARBPROC)(GLuint shader, GLsizei count, + const GLchar *const *path, + const GLint *length); +typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC)( + GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, + GLint border, GLsizei imageSize, const void *bits); +typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC)( + GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, + GLsizei height, GLint border, GLsizei imageSize, const void *bits); +typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC)( + GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits); +typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC)(GLenum texunit, GLenum target, + GLint level, GLint xoffset, + GLsizei width, GLenum format, + GLsizei imageSize, + const void *bits); +typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC)( + GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, + GLsizei height, GLenum format, GLsizei imageSize, const void *bits); +typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC)( + GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, + const void *bits); +typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXIMAGE1DPROC)(GLenum target, GLint level, + GLenum internalformat, GLsizei width, + GLint border, GLsizei imageSize, + const void *data); +typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXIMAGE1DARBPROC)(GLenum target, GLint level, + GLenum internalformat, GLsizei width, + GLint border, GLsizei imageSize, + const void *data); +typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXIMAGE2DPROC)(GLenum target, GLint level, + GLenum internalformat, GLsizei width, + GLsizei height, GLint border, + GLsizei imageSize, const void *data); +typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXIMAGE2DARBPROC)(GLenum target, GLint level, + GLenum internalformat, GLsizei width, + GLsizei height, GLint border, + GLsizei imageSize, const void *data); +typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXIMAGE3DPROC)(GLenum target, GLint level, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, + GLint border, GLsizei imageSize, + const void *data); +typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXIMAGE3DARBPROC)(GLenum target, GLint level, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, + GLint border, GLsizei imageSize, + const void *data); +typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC)(GLenum target, GLint level, + GLint xoffset, GLsizei width, + GLenum format, GLsizei imageSize, + const void *data); +typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC)(GLenum target, GLint level, + GLint xoffset, GLsizei width, + GLenum format, GLsizei imageSize, + const void *data); +typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)(GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, + GLenum format, GLsizei imageSize, + const void *data); +typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC)(GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, + GLenum format, GLsizei imageSize, + const void *data); +typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC)( + GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); +typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC)( + GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); +typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC)(GLuint texture, GLenum target, + GLint level, GLenum internalformat, + GLsizei width, GLint border, + GLsizei imageSize, + const void *bits); +typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC)(GLuint texture, GLenum target, + GLint level, GLenum internalformat, + GLsizei width, GLsizei height, + GLint border, GLsizei imageSize, + const void *bits); +typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC)( + GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits); +typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC)(GLuint texture, GLint level, + GLint xoffset, GLsizei width, + GLenum format, GLsizei imageSize, + const void *data); +typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC)(GLuint texture, GLenum target, + GLint level, GLint xoffset, + GLsizei width, GLenum format, + GLsizei imageSize, + const void *bits); +typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC)(GLuint texture, GLint level, + GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, + GLenum format, GLsizei imageSize, + const void *data); +typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC)( + GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, + GLsizei height, GLenum format, GLsizei imageSize, const void *bits); +typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC)( + GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); +typedef void(GLAD_API_PTR *PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC)( + GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, + const void *bits); +typedef void(GLAD_API_PTR *PFNGLCONSERVATIVERASTERPARAMETERFNVPROC)(GLenum pname, GLfloat value); +typedef void(GLAD_API_PTR *PFNGLCONSERVATIVERASTERPARAMETERINVPROC)(GLenum pname, GLint param); +typedef void(GLAD_API_PTR *PFNGLCONVOLUTIONFILTER1DEXTPROC)(GLenum target, GLenum internalformat, + GLsizei width, GLenum format, + GLenum type, const void *image); +typedef void(GLAD_API_PTR *PFNGLCONVOLUTIONFILTER2DEXTPROC)(GLenum target, GLenum internalformat, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + const void *image); +typedef void(GLAD_API_PTR *PFNGLCONVOLUTIONPARAMETERFEXTPROC)(GLenum target, GLenum pname, + GLfloat params); +typedef void(GLAD_API_PTR *PFNGLCONVOLUTIONPARAMETERFVEXTPROC)(GLenum target, GLenum pname, + const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLCONVOLUTIONPARAMETERIEXTPROC)(GLenum target, GLenum pname, + GLint params); +typedef void(GLAD_API_PTR *PFNGLCONVOLUTIONPARAMETERIVEXTPROC)(GLenum target, GLenum pname, + const GLint *params); +typedef void(GLAD_API_PTR *PFNGLCONVOLUTIONPARAMETERXOESPROC)(GLenum target, GLenum pname, + GLfixed param); +typedef void(GLAD_API_PTR *PFNGLCONVOLUTIONPARAMETERXVOESPROC)(GLenum target, GLenum pname, + const GLfixed *params); +typedef void(GLAD_API_PTR *PFNGLCOPYBUFFERSUBDATAPROC)(GLenum readTarget, GLenum writeTarget, + GLintptr readOffset, GLintptr writeOffset, + GLsizeiptr size); +typedef void(GLAD_API_PTR *PFNGLCOPYCOLORSUBTABLEEXTPROC)(GLenum target, GLsizei start, GLint x, + GLint y, GLsizei width); +typedef void(GLAD_API_PTR *PFNGLCOPYCOLORTABLESGIPROC)(GLenum target, GLenum internalformat, + GLint x, GLint y, GLsizei width); +typedef void(GLAD_API_PTR *PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC)(GLenum target, + GLenum internalformat, GLint x, + GLint y, GLsizei width); +typedef void(GLAD_API_PTR *PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC)(GLenum target, + GLenum internalformat, GLint x, + GLint y, GLsizei width, + GLsizei height); +typedef void(GLAD_API_PTR *PFNGLCOPYIMAGESUBDATAPROC)(GLuint srcName, GLenum srcTarget, + GLint srcLevel, GLint srcX, GLint srcY, + GLint srcZ, GLuint dstName, GLenum dstTarget, + GLint dstLevel, GLint dstX, GLint dstY, + GLint dstZ, GLsizei srcWidth, + GLsizei srcHeight, GLsizei srcDepth); +typedef void(GLAD_API_PTR *PFNGLCOPYIMAGESUBDATANVPROC)( + GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, + GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, + GLsizei width, GLsizei height, GLsizei depth); +typedef void(GLAD_API_PTR *PFNGLCOPYMULTITEXIMAGE1DEXTPROC)(GLenum texunit, GLenum target, + GLint level, GLenum internalformat, + GLint x, GLint y, GLsizei width, + GLint border); +typedef void(GLAD_API_PTR *PFNGLCOPYMULTITEXIMAGE2DEXTPROC)(GLenum texunit, GLenum target, + GLint level, GLenum internalformat, + GLint x, GLint y, GLsizei width, + GLsizei height, GLint border); +typedef void(GLAD_API_PTR *PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC)(GLenum texunit, GLenum target, + GLint level, GLint xoffset, GLint x, + GLint y, GLsizei width); +typedef void(GLAD_API_PTR *PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC)(GLenum texunit, GLenum target, + GLint level, GLint xoffset, + GLint yoffset, GLint x, GLint y, + GLsizei width, GLsizei height); +typedef void(GLAD_API_PTR *PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC)(GLenum texunit, GLenum target, + GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, + GLint x, GLint y, GLsizei width, + GLsizei height); +typedef void(GLAD_API_PTR *PFNGLCOPYNAMEDBUFFERSUBDATAPROC)(GLuint readBuffer, GLuint writeBuffer, + GLintptr readOffset, + GLintptr writeOffset, GLsizeiptr size); +typedef void(GLAD_API_PTR *PFNGLCOPYPATHNVPROC)(GLuint resultPath, GLuint srcPath); +typedef void(GLAD_API_PTR *PFNGLCOPYTEXIMAGE1DPROC)(GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, + GLsizei width, GLint border); +typedef void(GLAD_API_PTR *PFNGLCOPYTEXIMAGE1DEXTPROC)(GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, + GLsizei width, GLint border); +typedef void(GLAD_API_PTR *PFNGLCOPYTEXIMAGE2DPROC)(GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, + GLsizei width, GLsizei height, GLint border); +typedef void(GLAD_API_PTR *PFNGLCOPYTEXIMAGE2DEXTPROC)(GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, + GLsizei width, GLsizei height, GLint border); +typedef void(GLAD_API_PTR *PFNGLCOPYTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, + GLint x, GLint y, GLsizei width); +typedef void(GLAD_API_PTR *PFNGLCOPYTEXSUBIMAGE1DEXTPROC)(GLenum target, GLint level, GLint xoffset, + GLint x, GLint y, GLsizei width); +typedef void(GLAD_API_PTR *PFNGLCOPYTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint x, GLint y, + GLsizei width, GLsizei height); +typedef void(GLAD_API_PTR *PFNGLCOPYTEXSUBIMAGE2DEXTPROC)(GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint x, GLint y, + GLsizei width, GLsizei height); +typedef void(GLAD_API_PTR *PFNGLCOPYTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLint x, + GLint y, GLsizei width, GLsizei height); +typedef void(GLAD_API_PTR *PFNGLCOPYTEXSUBIMAGE3DEXTPROC)(GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLint x, + GLint y, GLsizei width, GLsizei height); +typedef void(GLAD_API_PTR *PFNGLCOPYTEXTUREIMAGE1DEXTPROC)(GLuint texture, GLenum target, + GLint level, GLenum internalformat, + GLint x, GLint y, GLsizei width, + GLint border); +typedef void(GLAD_API_PTR *PFNGLCOPYTEXTUREIMAGE2DEXTPROC)(GLuint texture, GLenum target, + GLint level, GLenum internalformat, + GLint x, GLint y, GLsizei width, + GLsizei height, GLint border); +typedef void(GLAD_API_PTR *PFNGLCOPYTEXTURESUBIMAGE1DPROC)(GLuint texture, GLint level, + GLint xoffset, GLint x, GLint y, + GLsizei width); +typedef void(GLAD_API_PTR *PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC)(GLuint texture, GLenum target, + GLint level, GLint xoffset, GLint x, + GLint y, GLsizei width); +typedef void(GLAD_API_PTR *PFNGLCOPYTEXTURESUBIMAGE2DPROC)(GLuint texture, GLint level, + GLint xoffset, GLint yoffset, GLint x, + GLint y, GLsizei width, GLsizei height); +typedef void(GLAD_API_PTR *PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC)(GLuint texture, GLenum target, + GLint level, GLint xoffset, + GLint yoffset, GLint x, GLint y, + GLsizei width, GLsizei height); +typedef void(GLAD_API_PTR *PFNGLCOPYTEXTURESUBIMAGE3DPROC)(GLuint texture, GLint level, + GLint xoffset, GLint yoffset, + GLint zoffset, GLint x, GLint y, + GLsizei width, GLsizei height); +typedef void(GLAD_API_PTR *PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC)(GLuint texture, GLenum target, + GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLint x, + GLint y, GLsizei width, + GLsizei height); +typedef void(GLAD_API_PTR *PFNGLCOVERFILLPATHINSTANCEDNVPROC)(GLsizei numPaths, GLenum pathNameType, + const void *paths, GLuint pathBase, + GLenum coverMode, + GLenum transformType, + const GLfloat *transformValues); +typedef void(GLAD_API_PTR *PFNGLCOVERFILLPATHNVPROC)(GLuint path, GLenum coverMode); +typedef void(GLAD_API_PTR *PFNGLCOVERSTROKEPATHINSTANCEDNVPROC)( + GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, + GLenum transformType, const GLfloat *transformValues); +typedef void(GLAD_API_PTR *PFNGLCOVERSTROKEPATHNVPROC)(GLuint path, GLenum coverMode); +typedef void(GLAD_API_PTR *PFNGLCOVERAGEMODULATIONNVPROC)(GLenum components); +typedef void(GLAD_API_PTR *PFNGLCOVERAGEMODULATIONTABLENVPROC)(GLsizei n, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLCREATEBUFFERSPROC)(GLsizei n, GLuint *buffers); +typedef void(GLAD_API_PTR *PFNGLCREATECOMMANDLISTSNVPROC)(GLsizei n, GLuint *lists); +typedef void(GLAD_API_PTR *PFNGLCREATEFRAMEBUFFERSPROC)(GLsizei n, GLuint *framebuffers); +typedef void(GLAD_API_PTR *PFNGLCREATEMEMORYOBJECTSEXTPROC)(GLsizei n, GLuint *memoryObjects); +typedef void(GLAD_API_PTR *PFNGLCREATEPERFQUERYINTELPROC)(GLuint queryId, GLuint *queryHandle); +typedef GLuint(GLAD_API_PTR *PFNGLCREATEPROGRAMPROC)(void); +typedef GLhandleARB(GLAD_API_PTR *PFNGLCREATEPROGRAMOBJECTARBPROC)(void); +typedef void(GLAD_API_PTR *PFNGLCREATEPROGRAMPIPELINESPROC)(GLsizei n, GLuint *pipelines); +typedef GLuint(GLAD_API_PTR *PFNGLCREATEPROGRESSFENCENVXPROC)(void); +typedef void(GLAD_API_PTR *PFNGLCREATEQUERIESPROC)(GLenum target, GLsizei n, GLuint *ids); +typedef void(GLAD_API_PTR *PFNGLCREATERENDERBUFFERSPROC)(GLsizei n, GLuint *renderbuffers); +typedef void(GLAD_API_PTR *PFNGLCREATESAMPLERSPROC)(GLsizei n, GLuint *samplers); +typedef void(GLAD_API_PTR *PFNGLCREATESEMAPHORESNVPROC)(GLsizei n, GLuint *semaphores); +typedef GLuint(GLAD_API_PTR *PFNGLCREATESHADERPROC)(GLenum type); +typedef GLhandleARB(GLAD_API_PTR *PFNGLCREATESHADEROBJECTARBPROC)(GLenum shaderType); +typedef GLuint(GLAD_API_PTR *PFNGLCREATESHADERPROGRAMEXTPROC)(GLenum type, const GLchar *string); +typedef GLuint(GLAD_API_PTR *PFNGLCREATESHADERPROGRAMVPROC)(GLenum type, GLsizei count, + const GLchar *const *strings); +typedef void(GLAD_API_PTR *PFNGLCREATESTATESNVPROC)(GLsizei n, GLuint *states); +typedef GLsync(GLAD_API_PTR *PFNGLCREATESYNCFROMCLEVENTARBPROC)(struct _cl_context *context, + struct _cl_event *event, + GLbitfield flags); +typedef void(GLAD_API_PTR *PFNGLCREATETEXTURESPROC)(GLenum target, GLsizei n, GLuint *textures); +typedef void(GLAD_API_PTR *PFNGLCREATETRANSFORMFEEDBACKSPROC)(GLsizei n, GLuint *ids); +typedef void(GLAD_API_PTR *PFNGLCREATEVERTEXARRAYSPROC)(GLsizei n, GLuint *arrays); +typedef void(GLAD_API_PTR *PFNGLCULLFACEPROC)(GLenum mode); +typedef void(GLAD_API_PTR *PFNGLCULLPARAMETERDVEXTPROC)(GLenum pname, GLdouble *params); +typedef void(GLAD_API_PTR *PFNGLCULLPARAMETERFVEXTPROC)(GLenum pname, GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLCURRENTPALETTEMATRIXARBPROC)(GLint index); +typedef void(GLAD_API_PTR *PFNGLDEBUGMESSAGECALLBACKPROC)(GLDEBUGPROC callback, + const void *userParam); +typedef void(GLAD_API_PTR *PFNGLDEBUGMESSAGECALLBACKAMDPROC)(GLDEBUGPROCAMD callback, + void *userParam); +typedef void(GLAD_API_PTR *PFNGLDEBUGMESSAGECALLBACKARBPROC)(GLDEBUGPROCARB callback, + const void *userParam); +typedef void(GLAD_API_PTR *PFNGLDEBUGMESSAGECONTROLPROC)(GLenum source, GLenum type, + GLenum severity, GLsizei count, + const GLuint *ids, GLboolean enabled); +typedef void(GLAD_API_PTR *PFNGLDEBUGMESSAGECONTROLARBPROC)(GLenum source, GLenum type, + GLenum severity, GLsizei count, + const GLuint *ids, GLboolean enabled); +typedef void(GLAD_API_PTR *PFNGLDEBUGMESSAGEENABLEAMDPROC)(GLenum category, GLenum severity, + GLsizei count, const GLuint *ids, + GLboolean enabled); +typedef void(GLAD_API_PTR *PFNGLDEBUGMESSAGEINSERTPROC)(GLenum source, GLenum type, GLuint id, + GLenum severity, GLsizei length, + const GLchar *buf); +typedef void(GLAD_API_PTR *PFNGLDEBUGMESSAGEINSERTAMDPROC)(GLenum category, GLenum severity, + GLuint id, GLsizei length, + const GLchar *buf); +typedef void(GLAD_API_PTR *PFNGLDEBUGMESSAGEINSERTARBPROC)(GLenum source, GLenum type, GLuint id, + GLenum severity, GLsizei length, + const GLchar *buf); +typedef void(GLAD_API_PTR *PFNGLDEFORMSGIXPROC)(GLbitfield mask); +typedef void(GLAD_API_PTR *PFNGLDEFORMATIONMAP3DSGIXPROC)(GLenum target, GLdouble u1, GLdouble u2, + GLint ustride, GLint uorder, GLdouble v1, + GLdouble v2, GLint vstride, GLint vorder, + GLdouble w1, GLdouble w2, GLint wstride, + GLint worder, const GLdouble *points); +typedef void(GLAD_API_PTR *PFNGLDEFORMATIONMAP3FSGIXPROC)(GLenum target, GLfloat u1, GLfloat u2, + GLint ustride, GLint uorder, GLfloat v1, + GLfloat v2, GLint vstride, GLint vorder, + GLfloat w1, GLfloat w2, GLint wstride, + GLint worder, const GLfloat *points); +typedef void(GLAD_API_PTR *PFNGLDELETEASYNCMARKERSSGIXPROC)(GLuint marker, GLsizei range); +typedef void(GLAD_API_PTR *PFNGLDELETEBUFFERSPROC)(GLsizei n, const GLuint *buffers); +typedef void(GLAD_API_PTR *PFNGLDELETEBUFFERSARBPROC)(GLsizei n, const GLuint *buffers); +typedef void(GLAD_API_PTR *PFNGLDELETECOMMANDLISTSNVPROC)(GLsizei n, const GLuint *lists); +typedef void(GLAD_API_PTR *PFNGLDELETEFENCESAPPLEPROC)(GLsizei n, const GLuint *fences); +typedef void(GLAD_API_PTR *PFNGLDELETEFENCESNVPROC)(GLsizei n, const GLuint *fences); +typedef void(GLAD_API_PTR *PFNGLDELETEFRAGMENTSHADERATIPROC)(GLuint id); +typedef void(GLAD_API_PTR *PFNGLDELETEFRAMEBUFFERSPROC)(GLsizei n, const GLuint *framebuffers); +typedef void(GLAD_API_PTR *PFNGLDELETEFRAMEBUFFERSEXTPROC)(GLsizei n, const GLuint *framebuffers); +typedef void(GLAD_API_PTR *PFNGLDELETEMEMORYOBJECTSEXTPROC)(GLsizei n, const GLuint *memoryObjects); +typedef void(GLAD_API_PTR *PFNGLDELETENAMEDSTRINGARBPROC)(GLint namelen, const GLchar *name); +typedef void(GLAD_API_PTR *PFNGLDELETENAMESAMDPROC)(GLenum identifier, GLuint num, + const GLuint *names); +typedef void(GLAD_API_PTR *PFNGLDELETEOBJECTARBPROC)(GLhandleARB obj); +typedef void(GLAD_API_PTR *PFNGLDELETEOCCLUSIONQUERIESNVPROC)(GLsizei n, const GLuint *ids); +typedef void(GLAD_API_PTR *PFNGLDELETEPATHSNVPROC)(GLuint path, GLsizei range); +typedef void(GLAD_API_PTR *PFNGLDELETEPERFMONITORSAMDPROC)(GLsizei n, GLuint *monitors); +typedef void(GLAD_API_PTR *PFNGLDELETEPERFQUERYINTELPROC)(GLuint queryHandle); +typedef void(GLAD_API_PTR *PFNGLDELETEPROGRAMPROC)(GLuint program); +typedef void(GLAD_API_PTR *PFNGLDELETEPROGRAMPIPELINESPROC)(GLsizei n, const GLuint *pipelines); +typedef void(GLAD_API_PTR *PFNGLDELETEPROGRAMSARBPROC)(GLsizei n, const GLuint *programs); +typedef void(GLAD_API_PTR *PFNGLDELETEPROGRAMSNVPROC)(GLsizei n, const GLuint *programs); +typedef void(GLAD_API_PTR *PFNGLDELETEQUERIESPROC)(GLsizei n, const GLuint *ids); +typedef void(GLAD_API_PTR *PFNGLDELETEQUERIESARBPROC)(GLsizei n, const GLuint *ids); +typedef void(GLAD_API_PTR *PFNGLDELETEQUERYRESOURCETAGNVPROC)(GLsizei n, const GLint *tagIds); +typedef void(GLAD_API_PTR *PFNGLDELETERENDERBUFFERSPROC)(GLsizei n, const GLuint *renderbuffers); +typedef void(GLAD_API_PTR *PFNGLDELETERENDERBUFFERSEXTPROC)(GLsizei n, const GLuint *renderbuffers); +typedef void(GLAD_API_PTR *PFNGLDELETESAMPLERSPROC)(GLsizei count, const GLuint *samplers); +typedef void(GLAD_API_PTR *PFNGLDELETESEMAPHORESEXTPROC)(GLsizei n, const GLuint *semaphores); +typedef void(GLAD_API_PTR *PFNGLDELETESHADERPROC)(GLuint shader); +typedef void(GLAD_API_PTR *PFNGLDELETESTATESNVPROC)(GLsizei n, const GLuint *states); +typedef void(GLAD_API_PTR *PFNGLDELETESYNCPROC)(GLsync sync); +typedef void(GLAD_API_PTR *PFNGLDELETETEXTURESPROC)(GLsizei n, const GLuint *textures); +typedef void(GLAD_API_PTR *PFNGLDELETETEXTURESEXTPROC)(GLsizei n, const GLuint *textures); +typedef void(GLAD_API_PTR *PFNGLDELETETRANSFORMFEEDBACKSPROC)(GLsizei n, const GLuint *ids); +typedef void(GLAD_API_PTR *PFNGLDELETETRANSFORMFEEDBACKSNVPROC)(GLsizei n, const GLuint *ids); +typedef void(GLAD_API_PTR *PFNGLDELETEVERTEXARRAYSPROC)(GLsizei n, const GLuint *arrays); +typedef void(GLAD_API_PTR *PFNGLDELETEVERTEXARRAYSAPPLEPROC)(GLsizei n, const GLuint *arrays); +typedef void(GLAD_API_PTR *PFNGLDELETEVERTEXSHADEREXTPROC)(GLuint id); +typedef void(GLAD_API_PTR *PFNGLDEPTHBOUNDSEXTPROC)(GLclampd zmin, GLclampd zmax); +typedef void(GLAD_API_PTR *PFNGLDEPTHBOUNDSDNVPROC)(GLdouble zmin, GLdouble zmax); +typedef void(GLAD_API_PTR *PFNGLDEPTHFUNCPROC)(GLenum func); +typedef void(GLAD_API_PTR *PFNGLDEPTHMASKPROC)(GLboolean flag); +typedef void(GLAD_API_PTR *PFNGLDEPTHRANGEPROC)(GLdouble n, GLdouble f); +typedef void(GLAD_API_PTR *PFNGLDEPTHRANGEARRAYDVNVPROC)(GLuint first, GLsizei count, + const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLDEPTHRANGEARRAYVPROC)(GLuint first, GLsizei count, + const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLDEPTHRANGEINDEXEDPROC)(GLuint index, GLdouble n, GLdouble f); +typedef void(GLAD_API_PTR *PFNGLDEPTHRANGEINDEXEDDNVPROC)(GLuint index, GLdouble n, GLdouble f); +typedef void(GLAD_API_PTR *PFNGLDEPTHRANGEDNVPROC)(GLdouble zNear, GLdouble zFar); +typedef void(GLAD_API_PTR *PFNGLDEPTHRANGEFPROC)(GLfloat n, GLfloat f); +typedef void(GLAD_API_PTR *PFNGLDEPTHRANGEFOESPROC)(GLclampf n, GLclampf f); +typedef void(GLAD_API_PTR *PFNGLDEPTHRANGEXOESPROC)(GLfixed n, GLfixed f); +typedef void(GLAD_API_PTR *PFNGLDETACHOBJECTARBPROC)(GLhandleARB containerObj, + GLhandleARB attachedObj); +typedef void(GLAD_API_PTR *PFNGLDETACHSHADERPROC)(GLuint program, GLuint shader); +typedef void(GLAD_API_PTR *PFNGLDETAILTEXFUNCSGISPROC)(GLenum target, GLsizei n, + const GLfloat *points); +typedef void(GLAD_API_PTR *PFNGLDISABLEPROC)(GLenum cap); +typedef void(GLAD_API_PTR *PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC)(GLenum array, GLuint index); +typedef void(GLAD_API_PTR *PFNGLDISABLECLIENTSTATEIEXTPROC)(GLenum array, GLuint index); +typedef void(GLAD_API_PTR *PFNGLDISABLEINDEXEDEXTPROC)(GLenum target, GLuint index); +typedef void(GLAD_API_PTR *PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC)(GLuint id); +typedef void(GLAD_API_PTR *PFNGLDISABLEVERTEXARRAYATTRIBPROC)(GLuint vaobj, GLuint index); +typedef void(GLAD_API_PTR *PFNGLDISABLEVERTEXARRAYATTRIBEXTPROC)(GLuint vaobj, GLuint index); +typedef void(GLAD_API_PTR *PFNGLDISABLEVERTEXARRAYEXTPROC)(GLuint vaobj, GLenum array); +typedef void(GLAD_API_PTR *PFNGLDISABLEVERTEXATTRIBAPPLEPROC)(GLuint index, GLenum pname); +typedef void(GLAD_API_PTR *PFNGLDISABLEVERTEXATTRIBARRAYPROC)(GLuint index); +typedef void(GLAD_API_PTR *PFNGLDISABLEVERTEXATTRIBARRAYARBPROC)(GLuint index); +typedef void(GLAD_API_PTR *PFNGLDISABLEIPROC)(GLenum target, GLuint index); +typedef void(GLAD_API_PTR *PFNGLDISPATCHCOMPUTEPROC)(GLuint num_groups_x, GLuint num_groups_y, + GLuint num_groups_z); +typedef void(GLAD_API_PTR *PFNGLDISPATCHCOMPUTEGROUPSIZEARBPROC)( + GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, + GLuint group_size_y, GLuint group_size_z); +typedef void(GLAD_API_PTR *PFNGLDISPATCHCOMPUTEINDIRECTPROC)(GLintptr indirect); +typedef void(GLAD_API_PTR *PFNGLDRAWARRAYSPROC)(GLenum mode, GLint first, GLsizei count); +typedef void(GLAD_API_PTR *PFNGLDRAWARRAYSEXTPROC)(GLenum mode, GLint first, GLsizei count); +typedef void(GLAD_API_PTR *PFNGLDRAWARRAYSINDIRECTPROC)(GLenum mode, const void *indirect); +typedef void(GLAD_API_PTR *PFNGLDRAWARRAYSINSTANCEDPROC)(GLenum mode, GLint first, GLsizei count, + GLsizei instancecount); +typedef void(GLAD_API_PTR *PFNGLDRAWARRAYSINSTANCEDARBPROC)(GLenum mode, GLint first, GLsizei count, + GLsizei primcount); +typedef void(GLAD_API_PTR *PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC)(GLenum mode, GLint first, + GLsizei count, + GLsizei instancecount, + GLuint baseinstance); +typedef void(GLAD_API_PTR *PFNGLDRAWARRAYSINSTANCEDEXTPROC)(GLenum mode, GLint start, GLsizei count, + GLsizei primcount); +typedef void(GLAD_API_PTR *PFNGLDRAWBUFFERPROC)(GLenum buf); +typedef void(GLAD_API_PTR *PFNGLDRAWBUFFERSPROC)(GLsizei n, const GLenum *bufs); +typedef void(GLAD_API_PTR *PFNGLDRAWBUFFERSARBPROC)(GLsizei n, const GLenum *bufs); +typedef void(GLAD_API_PTR *PFNGLDRAWBUFFERSATIPROC)(GLsizei n, const GLenum *bufs); +typedef void(GLAD_API_PTR *PFNGLDRAWCOMMANDSADDRESSNVPROC)(GLenum primitiveMode, + const GLuint64 *indirects, + const GLsizei *sizes, GLuint count); +typedef void(GLAD_API_PTR *PFNGLDRAWCOMMANDSNVPROC)(GLenum primitiveMode, GLuint buffer, + const GLintptr *indirects, const GLsizei *sizes, + GLuint count); +typedef void(GLAD_API_PTR *PFNGLDRAWCOMMANDSSTATESADDRESSNVPROC)(const GLuint64 *indirects, + const GLsizei *sizes, + const GLuint *states, + const GLuint *fbos, GLuint count); +typedef void(GLAD_API_PTR *PFNGLDRAWCOMMANDSSTATESNVPROC)(GLuint buffer, const GLintptr *indirects, + const GLsizei *sizes, + const GLuint *states, const GLuint *fbos, + GLuint count); +typedef void(GLAD_API_PTR *PFNGLDRAWELEMENTARRAYAPPLEPROC)(GLenum mode, GLint first, GLsizei count); +typedef void(GLAD_API_PTR *PFNGLDRAWELEMENTARRAYATIPROC)(GLenum mode, GLsizei count); +typedef void(GLAD_API_PTR *PFNGLDRAWELEMENTSPROC)(GLenum mode, GLsizei count, GLenum type, + const void *indices); +typedef void(GLAD_API_PTR *PFNGLDRAWELEMENTSBASEVERTEXPROC)(GLenum mode, GLsizei count, GLenum type, + const void *indices, GLint basevertex); +typedef void(GLAD_API_PTR *PFNGLDRAWELEMENTSINDIRECTPROC)(GLenum mode, GLenum type, + const void *indirect); +typedef void(GLAD_API_PTR *PFNGLDRAWELEMENTSINSTANCEDPROC)(GLenum mode, GLsizei count, GLenum type, + const void *indices, + GLsizei instancecount); +typedef void(GLAD_API_PTR *PFNGLDRAWELEMENTSINSTANCEDARBPROC)(GLenum mode, GLsizei count, + GLenum type, const void *indices, + GLsizei primcount); +typedef void(GLAD_API_PTR *PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC)(GLenum mode, GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLuint baseinstance); +typedef void(GLAD_API_PTR *PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC)(GLenum mode, GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLint basevertex); +typedef void(GLAD_API_PTR *PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC)( + GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, + GLint basevertex, GLuint baseinstance); +typedef void(GLAD_API_PTR *PFNGLDRAWELEMENTSINSTANCEDEXTPROC)(GLenum mode, GLsizei count, + GLenum type, const void *indices, + GLsizei primcount); +typedef void(GLAD_API_PTR *PFNGLDRAWMESHARRAYSSUNPROC)(GLenum mode, GLint first, GLsizei count, + GLsizei width); +typedef void(GLAD_API_PTR *PFNGLDRAWMESHTASKSINDIRECTNVPROC)(GLintptr indirect); +typedef void(GLAD_API_PTR *PFNGLDRAWMESHTASKSNVPROC)(GLuint first, GLuint count); +typedef void(GLAD_API_PTR *PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC)(GLenum mode, GLuint start, + GLuint end, GLint first, + GLsizei count); +typedef void(GLAD_API_PTR *PFNGLDRAWRANGEELEMENTARRAYATIPROC)(GLenum mode, GLuint start, GLuint end, + GLsizei count); +typedef void(GLAD_API_PTR *PFNGLDRAWRANGEELEMENTSPROC)(GLenum mode, GLuint start, GLuint end, + GLsizei count, GLenum type, + const void *indices); +typedef void(GLAD_API_PTR *PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC)(GLenum mode, GLuint start, + GLuint end, GLsizei count, + GLenum type, const void *indices, + GLint basevertex); +typedef void(GLAD_API_PTR *PFNGLDRAWRANGEELEMENTSEXTPROC)(GLenum mode, GLuint start, GLuint end, + GLsizei count, GLenum type, + const void *indices); +typedef void(GLAD_API_PTR *PFNGLDRAWTEXTURENVPROC)(GLuint texture, GLuint sampler, GLfloat x0, + GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, + GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1); +typedef void(GLAD_API_PTR *PFNGLDRAWTRANSFORMFEEDBACKPROC)(GLenum mode, GLuint id); +typedef void(GLAD_API_PTR *PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC)(GLenum mode, GLuint id, + GLsizei instancecount); +typedef void(GLAD_API_PTR *PFNGLDRAWTRANSFORMFEEDBACKNVPROC)(GLenum mode, GLuint id); +typedef void(GLAD_API_PTR *PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC)(GLenum mode, GLuint id, + GLuint stream); +typedef void(GLAD_API_PTR *PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC)(GLenum mode, GLuint id, + GLuint stream, + GLsizei instancecount); +typedef void(GLAD_API_PTR *PFNGLDRAWVKIMAGENVPROC)(GLuint64 vkImage, GLuint sampler, GLfloat x0, + GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, + GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1); +typedef void(GLAD_API_PTR *PFNGLEGLIMAGETARGETTEXSTORAGEEXTPROC)(GLenum target, GLeglImageOES image, + const GLint *attrib_list); +typedef void(GLAD_API_PTR *PFNGLEGLIMAGETARGETTEXTURESTORAGEEXTPROC)(GLuint texture, + GLeglImageOES image, + const GLint *attrib_list); +typedef void(GLAD_API_PTR *PFNGLEDGEFLAGFORMATNVPROC)(GLsizei stride); +typedef void(GLAD_API_PTR *PFNGLEDGEFLAGPOINTEREXTPROC)(GLsizei stride, GLsizei count, + const GLboolean *pointer); +typedef void(GLAD_API_PTR *PFNGLEDGEFLAGPOINTERLISTIBMPROC)(GLint stride, const GLboolean **pointer, + GLint ptrstride); +typedef void(GLAD_API_PTR *PFNGLELEMENTPOINTERAPPLEPROC)(GLenum type, const void *pointer); +typedef void(GLAD_API_PTR *PFNGLELEMENTPOINTERATIPROC)(GLenum type, const void *pointer); +typedef void(GLAD_API_PTR *PFNGLENABLEPROC)(GLenum cap); +typedef void(GLAD_API_PTR *PFNGLENABLECLIENTSTATEINDEXEDEXTPROC)(GLenum array, GLuint index); +typedef void(GLAD_API_PTR *PFNGLENABLECLIENTSTATEIEXTPROC)(GLenum array, GLuint index); +typedef void(GLAD_API_PTR *PFNGLENABLEINDEXEDEXTPROC)(GLenum target, GLuint index); +typedef void(GLAD_API_PTR *PFNGLENABLEVARIANTCLIENTSTATEEXTPROC)(GLuint id); +typedef void(GLAD_API_PTR *PFNGLENABLEVERTEXARRAYATTRIBPROC)(GLuint vaobj, GLuint index); +typedef void(GLAD_API_PTR *PFNGLENABLEVERTEXARRAYATTRIBEXTPROC)(GLuint vaobj, GLuint index); +typedef void(GLAD_API_PTR *PFNGLENABLEVERTEXARRAYEXTPROC)(GLuint vaobj, GLenum array); +typedef void(GLAD_API_PTR *PFNGLENABLEVERTEXATTRIBAPPLEPROC)(GLuint index, GLenum pname); +typedef void(GLAD_API_PTR *PFNGLENABLEVERTEXATTRIBARRAYPROC)(GLuint index); +typedef void(GLAD_API_PTR *PFNGLENABLEVERTEXATTRIBARRAYARBPROC)(GLuint index); +typedef void(GLAD_API_PTR *PFNGLENABLEIPROC)(GLenum target, GLuint index); +typedef void(GLAD_API_PTR *PFNGLENDCONDITIONALRENDERPROC)(void); +typedef void(GLAD_API_PTR *PFNGLENDCONDITIONALRENDERNVPROC)(void); +typedef void(GLAD_API_PTR *PFNGLENDCONDITIONALRENDERNVXPROC)(void); +typedef void(GLAD_API_PTR *PFNGLENDFRAGMENTSHADERATIPROC)(void); +typedef void(GLAD_API_PTR *PFNGLENDOCCLUSIONQUERYNVPROC)(void); +typedef void(GLAD_API_PTR *PFNGLENDPERFMONITORAMDPROC)(GLuint monitor); +typedef void(GLAD_API_PTR *PFNGLENDPERFQUERYINTELPROC)(GLuint queryHandle); +typedef void(GLAD_API_PTR *PFNGLENDQUERYPROC)(GLenum target); +typedef void(GLAD_API_PTR *PFNGLENDQUERYARBPROC)(GLenum target); +typedef void(GLAD_API_PTR *PFNGLENDQUERYINDEXEDPROC)(GLenum target, GLuint index); +typedef void(GLAD_API_PTR *PFNGLENDTRANSFORMFEEDBACKPROC)(void); +typedef void(GLAD_API_PTR *PFNGLENDTRANSFORMFEEDBACKEXTPROC)(void); +typedef void(GLAD_API_PTR *PFNGLENDTRANSFORMFEEDBACKNVPROC)(void); +typedef void(GLAD_API_PTR *PFNGLENDVERTEXSHADEREXTPROC)(void); +typedef void(GLAD_API_PTR *PFNGLENDVIDEOCAPTURENVPROC)(GLuint video_capture_slot); +typedef void(GLAD_API_PTR *PFNGLEVALCOORD1XOESPROC)(GLfixed u); +typedef void(GLAD_API_PTR *PFNGLEVALCOORD1XVOESPROC)(const GLfixed *coords); +typedef void(GLAD_API_PTR *PFNGLEVALCOORD2XOESPROC)(GLfixed u, GLfixed v); +typedef void(GLAD_API_PTR *PFNGLEVALCOORD2XVOESPROC)(const GLfixed *coords); +typedef void(GLAD_API_PTR *PFNGLEVALMAPSNVPROC)(GLenum target, GLenum mode); +typedef void(GLAD_API_PTR *PFNGLEVALUATEDEPTHVALUESARBPROC)(void); +typedef void(GLAD_API_PTR *PFNGLEXECUTEPROGRAMNVPROC)(GLenum target, GLuint id, + const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLEXTRACTCOMPONENTEXTPROC)(GLuint res, GLuint src, GLuint num); +typedef void(GLAD_API_PTR *PFNGLFEEDBACKBUFFERXOESPROC)(GLsizei n, GLenum type, + const GLfixed *buffer); +typedef GLsync(GLAD_API_PTR *PFNGLFENCESYNCPROC)(GLenum condition, GLbitfield flags); +typedef void(GLAD_API_PTR *PFNGLFINALCOMBINERINPUTNVPROC)(GLenum variable, GLenum input, + GLenum mapping, GLenum componentUsage); +typedef void(GLAD_API_PTR *PFNGLFINISHPROC)(void); +typedef GLint(GLAD_API_PTR *PFNGLFINISHASYNCSGIXPROC)(GLuint *markerp); +typedef void(GLAD_API_PTR *PFNGLFINISHFENCEAPPLEPROC)(GLuint fence); +typedef void(GLAD_API_PTR *PFNGLFINISHFENCENVPROC)(GLuint fence); +typedef void(GLAD_API_PTR *PFNGLFINISHOBJECTAPPLEPROC)(GLenum object, GLint name); +typedef void(GLAD_API_PTR *PFNGLFINISHTEXTURESUNXPROC)(void); +typedef void(GLAD_API_PTR *PFNGLFLUSHPROC)(void); +typedef void(GLAD_API_PTR *PFNGLFLUSHMAPPEDBUFFERRANGEPROC)(GLenum target, GLintptr offset, + GLsizeiptr length); +typedef void(GLAD_API_PTR *PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC)(GLenum target, GLintptr offset, + GLsizeiptr size); +typedef void(GLAD_API_PTR *PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC)(GLuint buffer, GLintptr offset, + GLsizeiptr length); +typedef void(GLAD_API_PTR *PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC)(GLuint buffer, GLintptr offset, + GLsizeiptr length); +typedef void(GLAD_API_PTR *PFNGLFLUSHPIXELDATARANGENVPROC)(GLenum target); +typedef void(GLAD_API_PTR *PFNGLFLUSHRASTERSGIXPROC)(void); +typedef void(GLAD_API_PTR *PFNGLFLUSHSTATICDATAIBMPROC)(GLenum target); +typedef void(GLAD_API_PTR *PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC)(GLsizei length, void *pointer); +typedef void(GLAD_API_PTR *PFNGLFLUSHVERTEXARRAYRANGENVPROC)(void); +typedef void(GLAD_API_PTR *PFNGLFOGCOORDFORMATNVPROC)(GLenum type, GLsizei stride); +typedef void(GLAD_API_PTR *PFNGLFOGCOORDPOINTEREXTPROC)(GLenum type, GLsizei stride, + const void *pointer); +typedef void(GLAD_API_PTR *PFNGLFOGCOORDPOINTERLISTIBMPROC)(GLenum type, GLint stride, + const void **pointer, GLint ptrstride); +typedef void(GLAD_API_PTR *PFNGLFOGCOORDDEXTPROC)(GLdouble coord); +typedef void(GLAD_API_PTR *PFNGLFOGCOORDDVEXTPROC)(const GLdouble *coord); +typedef void(GLAD_API_PTR *PFNGLFOGCOORDFEXTPROC)(GLfloat coord); +typedef void(GLAD_API_PTR *PFNGLFOGCOORDFVEXTPROC)(const GLfloat *coord); +typedef void(GLAD_API_PTR *PFNGLFOGCOORDHNVPROC)(GLhalfNV fog); +typedef void(GLAD_API_PTR *PFNGLFOGCOORDHVNVPROC)(const GLhalfNV *fog); +typedef void(GLAD_API_PTR *PFNGLFOGFUNCSGISPROC)(GLsizei n, const GLfloat *points); +typedef void(GLAD_API_PTR *PFNGLFOGXOESPROC)(GLenum pname, GLfixed param); +typedef void(GLAD_API_PTR *PFNGLFOGXVOESPROC)(GLenum pname, const GLfixed *param); +typedef void(GLAD_API_PTR *PFNGLFRAGMENTCOLORMATERIALSGIXPROC)(GLenum face, GLenum mode); +typedef void(GLAD_API_PTR *PFNGLFRAGMENTCOVERAGECOLORNVPROC)(GLuint color); +typedef void(GLAD_API_PTR *PFNGLFRAGMENTLIGHTMODELFSGIXPROC)(GLenum pname, GLfloat param); +typedef void(GLAD_API_PTR *PFNGLFRAGMENTLIGHTMODELFVSGIXPROC)(GLenum pname, const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLFRAGMENTLIGHTMODELISGIXPROC)(GLenum pname, GLint param); +typedef void(GLAD_API_PTR *PFNGLFRAGMENTLIGHTMODELIVSGIXPROC)(GLenum pname, const GLint *params); +typedef void(GLAD_API_PTR *PFNGLFRAGMENTLIGHTFSGIXPROC)(GLenum light, GLenum pname, GLfloat param); +typedef void(GLAD_API_PTR *PFNGLFRAGMENTLIGHTFVSGIXPROC)(GLenum light, GLenum pname, + const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLFRAGMENTLIGHTISGIXPROC)(GLenum light, GLenum pname, GLint param); +typedef void(GLAD_API_PTR *PFNGLFRAGMENTLIGHTIVSGIXPROC)(GLenum light, GLenum pname, + const GLint *params); +typedef void(GLAD_API_PTR *PFNGLFRAGMENTMATERIALFSGIXPROC)(GLenum face, GLenum pname, + GLfloat param); +typedef void(GLAD_API_PTR *PFNGLFRAGMENTMATERIALFVSGIXPROC)(GLenum face, GLenum pname, + const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLFRAGMENTMATERIALISGIXPROC)(GLenum face, GLenum pname, GLint param); +typedef void(GLAD_API_PTR *PFNGLFRAGMENTMATERIALIVSGIXPROC)(GLenum face, GLenum pname, + const GLint *params); +typedef void(GLAD_API_PTR *PFNGLFRAMETERMINATORGREMEDYPROC)(void); +typedef void(GLAD_API_PTR *PFNGLFRAMEZOOMSGIXPROC)(GLint factor); +typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC)(GLuint framebuffer, GLenum mode); +typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC)(GLuint framebuffer, GLsizei n, + const GLenum *bufs); +typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERFETCHBARRIEREXTPROC)(void); +typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERPARAMETERIPROC)(GLenum target, GLenum pname, + GLint param); +typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERPARAMETERIMESAPROC)(GLenum target, GLenum pname, + GLint param); +typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERREADBUFFEREXTPROC)(GLuint framebuffer, GLenum mode); +typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERRENDERBUFFERPROC)(GLenum target, GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer); +typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC)(GLenum target, GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer); +typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERSAMPLELOCATIONSFVARBPROC)(GLenum target, GLuint start, + GLsizei count, + const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERSAMPLELOCATIONSFVNVPROC)(GLenum target, GLuint start, + GLsizei count, + const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERSAMPLEPOSITIONSFVAMDPROC)(GLenum target, + GLuint numsamples, + GLuint pixelindex, + const GLfloat *values); +typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTUREPROC)(GLenum target, GLenum attachment, + GLuint texture, GLint level); +typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURE1DPROC)(GLenum target, GLenum attachment, + GLenum textarget, GLuint texture, + GLint level); +typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURE1DEXTPROC)(GLenum target, GLenum attachment, + GLenum textarget, GLuint texture, + GLint level); +typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURE2DPROC)(GLenum target, GLenum attachment, + GLenum textarget, GLuint texture, + GLint level); +typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURE2DEXTPROC)(GLenum target, GLenum attachment, + GLenum textarget, GLuint texture, + GLint level); +typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURE3DPROC)(GLenum target, GLenum attachment, + GLenum textarget, GLuint texture, + GLint level, GLint zoffset); +typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURE3DEXTPROC)(GLenum target, GLenum attachment, + GLenum textarget, GLuint texture, + GLint level, GLint zoffset); +typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTUREARBPROC)(GLenum target, GLenum attachment, + GLuint texture, GLint level); +typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTUREEXTPROC)(GLenum target, GLenum attachment, + GLuint texture, GLint level); +typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTUREFACEARBPROC)(GLenum target, GLenum attachment, + GLuint texture, GLint level, + GLenum face); +typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC)(GLenum target, GLenum attachment, + GLuint texture, GLint level, + GLenum face); +typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURELAYERPROC)(GLenum target, GLenum attachment, + GLuint texture, GLint level, + GLint layer); +typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURELAYERARBPROC)(GLenum target, GLenum attachment, + GLuint texture, GLint level, + GLint layer); +typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC)(GLenum target, GLenum attachment, + GLuint texture, GLint level, + GLint layer); +typedef void(GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC)(GLenum target, + GLenum attachment, + GLuint texture, GLint level, + GLint baseViewIndex, + GLsizei numViews); +typedef void(GLAD_API_PTR *PFNGLFREEOBJECTBUFFERATIPROC)(GLuint buffer); +typedef void(GLAD_API_PTR *PFNGLFRONTFACEPROC)(GLenum mode); +typedef void(GLAD_API_PTR *PFNGLFRUSTUMFOESPROC)(GLfloat l, GLfloat r, GLfloat b, GLfloat t, + GLfloat n, GLfloat f); +typedef void(GLAD_API_PTR *PFNGLFRUSTUMXOESPROC)(GLfixed l, GLfixed r, GLfixed b, GLfixed t, + GLfixed n, GLfixed f); +typedef GLuint(GLAD_API_PTR *PFNGLGENASYNCMARKERSSGIXPROC)(GLsizei range); +typedef void(GLAD_API_PTR *PFNGLGENBUFFERSPROC)(GLsizei n, GLuint *buffers); +typedef void(GLAD_API_PTR *PFNGLGENBUFFERSARBPROC)(GLsizei n, GLuint *buffers); +typedef void(GLAD_API_PTR *PFNGLGENFENCESAPPLEPROC)(GLsizei n, GLuint *fences); +typedef void(GLAD_API_PTR *PFNGLGENFENCESNVPROC)(GLsizei n, GLuint *fences); +typedef GLuint(GLAD_API_PTR *PFNGLGENFRAGMENTSHADERSATIPROC)(GLuint range); +typedef void(GLAD_API_PTR *PFNGLGENFRAMEBUFFERSPROC)(GLsizei n, GLuint *framebuffers); +typedef void(GLAD_API_PTR *PFNGLGENFRAMEBUFFERSEXTPROC)(GLsizei n, GLuint *framebuffers); +typedef void(GLAD_API_PTR *PFNGLGENNAMESAMDPROC)(GLenum identifier, GLuint num, GLuint *names); +typedef void(GLAD_API_PTR *PFNGLGENOCCLUSIONQUERIESNVPROC)(GLsizei n, GLuint *ids); +typedef GLuint(GLAD_API_PTR *PFNGLGENPATHSNVPROC)(GLsizei range); +typedef void(GLAD_API_PTR *PFNGLGENPERFMONITORSAMDPROC)(GLsizei n, GLuint *monitors); +typedef void(GLAD_API_PTR *PFNGLGENPROGRAMPIPELINESPROC)(GLsizei n, GLuint *pipelines); +typedef void(GLAD_API_PTR *PFNGLGENPROGRAMSARBPROC)(GLsizei n, GLuint *programs); +typedef void(GLAD_API_PTR *PFNGLGENPROGRAMSNVPROC)(GLsizei n, GLuint *programs); +typedef void(GLAD_API_PTR *PFNGLGENQUERIESPROC)(GLsizei n, GLuint *ids); +typedef void(GLAD_API_PTR *PFNGLGENQUERIESARBPROC)(GLsizei n, GLuint *ids); +typedef void(GLAD_API_PTR *PFNGLGENQUERYRESOURCETAGNVPROC)(GLsizei n, GLint *tagIds); +typedef void(GLAD_API_PTR *PFNGLGENRENDERBUFFERSPROC)(GLsizei n, GLuint *renderbuffers); +typedef void(GLAD_API_PTR *PFNGLGENRENDERBUFFERSEXTPROC)(GLsizei n, GLuint *renderbuffers); +typedef void(GLAD_API_PTR *PFNGLGENSAMPLERSPROC)(GLsizei count, GLuint *samplers); +typedef void(GLAD_API_PTR *PFNGLGENSEMAPHORESEXTPROC)(GLsizei n, GLuint *semaphores); +typedef GLuint(GLAD_API_PTR *PFNGLGENSYMBOLSEXTPROC)(GLenum datatype, GLenum storagetype, + GLenum range, GLuint components); +typedef void(GLAD_API_PTR *PFNGLGENTEXTURESPROC)(GLsizei n, GLuint *textures); +typedef void(GLAD_API_PTR *PFNGLGENTEXTURESEXTPROC)(GLsizei n, GLuint *textures); +typedef void(GLAD_API_PTR *PFNGLGENTRANSFORMFEEDBACKSPROC)(GLsizei n, GLuint *ids); +typedef void(GLAD_API_PTR *PFNGLGENTRANSFORMFEEDBACKSNVPROC)(GLsizei n, GLuint *ids); +typedef void(GLAD_API_PTR *PFNGLGENVERTEXARRAYSPROC)(GLsizei n, GLuint *arrays); +typedef void(GLAD_API_PTR *PFNGLGENVERTEXARRAYSAPPLEPROC)(GLsizei n, GLuint *arrays); +typedef GLuint(GLAD_API_PTR *PFNGLGENVERTEXSHADERSEXTPROC)(GLuint range); +typedef void(GLAD_API_PTR *PFNGLGENERATEMIPMAPPROC)(GLenum target); +typedef void(GLAD_API_PTR *PFNGLGENERATEMIPMAPEXTPROC)(GLenum target); +typedef void(GLAD_API_PTR *PFNGLGENERATEMULTITEXMIPMAPEXTPROC)(GLenum texunit, GLenum target); +typedef void(GLAD_API_PTR *PFNGLGENERATETEXTUREMIPMAPPROC)(GLuint texture); +typedef void(GLAD_API_PTR *PFNGLGENERATETEXTUREMIPMAPEXTPROC)(GLuint texture, GLenum target); +typedef void(GLAD_API_PTR *PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC)(GLuint program, + GLuint bufferIndex, + GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETACTIVEATTRIBPROC)(GLuint program, GLuint index, GLsizei bufSize, + GLsizei *length, GLint *size, GLenum *type, + GLchar *name); +typedef void(GLAD_API_PTR *PFNGLGETACTIVEATTRIBARBPROC)(GLhandleARB programObj, GLuint index, + GLsizei maxLength, GLsizei *length, + GLint *size, GLenum *type, GLcharARB *name); +typedef void(GLAD_API_PTR *PFNGLGETACTIVESUBROUTINENAMEPROC)(GLuint program, GLenum shadertype, + GLuint index, GLsizei bufSize, + GLsizei *length, GLchar *name); +typedef void(GLAD_API_PTR *PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC)(GLuint program, + GLenum shadertype, GLuint index, + GLsizei bufSize, + GLsizei *length, GLchar *name); +typedef void(GLAD_API_PTR *PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC)(GLuint program, GLenum shadertype, + GLuint index, GLenum pname, + GLint *values); +typedef void(GLAD_API_PTR *PFNGLGETACTIVEUNIFORMPROC)(GLuint program, GLuint index, GLsizei bufSize, + GLsizei *length, GLint *size, GLenum *type, + GLchar *name); +typedef void(GLAD_API_PTR *PFNGLGETACTIVEUNIFORMARBPROC)(GLhandleARB programObj, GLuint index, + GLsizei maxLength, GLsizei *length, + GLint *size, GLenum *type, + GLcharARB *name); +typedef void(GLAD_API_PTR *PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC)(GLuint program, + GLuint uniformBlockIndex, + GLsizei bufSize, GLsizei *length, + GLchar *uniformBlockName); +typedef void(GLAD_API_PTR *PFNGLGETACTIVEUNIFORMBLOCKIVPROC)(GLuint program, + GLuint uniformBlockIndex, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETACTIVEUNIFORMNAMEPROC)(GLuint program, GLuint uniformIndex, + GLsizei bufSize, GLsizei *length, + GLchar *uniformName); +typedef void(GLAD_API_PTR *PFNGLGETACTIVEUNIFORMSIVPROC)(GLuint program, GLsizei uniformCount, + const GLuint *uniformIndices, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETACTIVEVARYINGNVPROC)(GLuint program, GLuint index, + GLsizei bufSize, GLsizei *length, + GLsizei *size, GLenum *type, GLchar *name); +typedef void(GLAD_API_PTR *PFNGLGETARRAYOBJECTFVATIPROC)(GLenum array, GLenum pname, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETARRAYOBJECTIVATIPROC)(GLenum array, GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETATTACHEDOBJECTSARBPROC)(GLhandleARB containerObj, + GLsizei maxCount, GLsizei *count, + GLhandleARB *obj); +typedef void(GLAD_API_PTR *PFNGLGETATTACHEDSHADERSPROC)(GLuint program, GLsizei maxCount, + GLsizei *count, GLuint *shaders); +typedef GLint(GLAD_API_PTR *PFNGLGETATTRIBLOCATIONPROC)(GLuint program, const GLchar *name); +typedef GLint(GLAD_API_PTR *PFNGLGETATTRIBLOCATIONARBPROC)(GLhandleARB programObj, + const GLcharARB *name); +typedef void(GLAD_API_PTR *PFNGLGETBOOLEANINDEXEDVEXTPROC)(GLenum target, GLuint index, + GLboolean *data); +typedef void(GLAD_API_PTR *PFNGLGETBOOLEANI_VPROC)(GLenum target, GLuint index, GLboolean *data); +typedef void(GLAD_API_PTR *PFNGLGETBOOLEANVPROC)(GLenum pname, GLboolean *data); +typedef void(GLAD_API_PTR *PFNGLGETBUFFERPARAMETERI64VPROC)(GLenum target, GLenum pname, + GLint64 *params); +typedef void(GLAD_API_PTR *PFNGLGETBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETBUFFERPARAMETERIVARBPROC)(GLenum target, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETBUFFERPARAMETERUI64VNVPROC)(GLenum target, GLenum pname, + GLuint64EXT *params); +typedef void(GLAD_API_PTR *PFNGLGETBUFFERPOINTERVPROC)(GLenum target, GLenum pname, void **params); +typedef void(GLAD_API_PTR *PFNGLGETBUFFERPOINTERVARBPROC)(GLenum target, GLenum pname, + void **params); +typedef void(GLAD_API_PTR *PFNGLGETBUFFERSUBDATAPROC)(GLenum target, GLintptr offset, + GLsizeiptr size, void *data); +typedef void(GLAD_API_PTR *PFNGLGETBUFFERSUBDATAARBPROC)(GLenum target, GLintptrARB offset, + GLsizeiptrARB size, void *data); +typedef void(GLAD_API_PTR *PFNGLGETCLIPPLANEFOESPROC)(GLenum plane, GLfloat *equation); +typedef void(GLAD_API_PTR *PFNGLGETCLIPPLANEXOESPROC)(GLenum plane, GLfixed *equation); +typedef void(GLAD_API_PTR *PFNGLGETCOLORTABLEEXTPROC)(GLenum target, GLenum format, GLenum type, + void *data); +typedef void(GLAD_API_PTR *PFNGLGETCOLORTABLEPARAMETERFVEXTPROC)(GLenum target, GLenum pname, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETCOLORTABLEPARAMETERFVSGIPROC)(GLenum target, GLenum pname, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETCOLORTABLEPARAMETERIVEXTPROC)(GLenum target, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETCOLORTABLEPARAMETERIVSGIPROC)(GLenum target, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETCOLORTABLESGIPROC)(GLenum target, GLenum format, GLenum type, + void *table); +typedef void(GLAD_API_PTR *PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC)(GLenum stage, GLenum portion, + GLenum variable, GLenum pname, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC)(GLenum stage, GLenum portion, + GLenum variable, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC)(GLenum stage, GLenum portion, + GLenum pname, GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC)(GLenum stage, GLenum portion, + GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC)(GLenum stage, GLenum pname, + GLfloat *params); +typedef GLuint(GLAD_API_PTR *PFNGLGETCOMMANDHEADERNVPROC)(GLenum tokenID, GLuint size); +typedef void(GLAD_API_PTR *PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC)(GLenum texunit, GLenum target, + GLint lod, void *img); +typedef void(GLAD_API_PTR *PFNGLGETCOMPRESSEDTEXIMAGEPROC)(GLenum target, GLint level, void *img); +typedef void(GLAD_API_PTR *PFNGLGETCOMPRESSEDTEXIMAGEARBPROC)(GLenum target, GLint level, + void *img); +typedef void(GLAD_API_PTR *PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC)(GLuint texture, GLint level, + GLsizei bufSize, void *pixels); +typedef void(GLAD_API_PTR *PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC)(GLuint texture, GLenum target, + GLint lod, void *img); +typedef void(GLAD_API_PTR *PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC)(GLuint texture, GLint level, + GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, + GLsizei bufSize, void *pixels); +typedef void(GLAD_API_PTR *PFNGLGETCONVOLUTIONFILTEREXTPROC)(GLenum target, GLenum format, + GLenum type, void *image); +typedef void(GLAD_API_PTR *PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC)(GLenum target, GLenum pname, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC)(GLenum target, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETCONVOLUTIONPARAMETERXVOESPROC)(GLenum target, GLenum pname, + GLfixed *params); +typedef void(GLAD_API_PTR *PFNGLGETCOVERAGEMODULATIONTABLENVPROC)(GLsizei bufSize, GLfloat *v); +typedef GLuint(GLAD_API_PTR *PFNGLGETDEBUGMESSAGELOGPROC)(GLuint count, GLsizei bufSize, + GLenum *sources, GLenum *types, + GLuint *ids, GLenum *severities, + GLsizei *lengths, GLchar *messageLog); +typedef GLuint(GLAD_API_PTR *PFNGLGETDEBUGMESSAGELOGAMDPROC)(GLuint count, GLsizei bufSize, + GLenum *categories, GLenum *severities, + GLuint *ids, GLsizei *lengths, + GLchar *message); +typedef GLuint(GLAD_API_PTR *PFNGLGETDEBUGMESSAGELOGARBPROC)(GLuint count, GLsizei bufSize, + GLenum *sources, GLenum *types, + GLuint *ids, GLenum *severities, + GLsizei *lengths, GLchar *messageLog); +typedef void(GLAD_API_PTR *PFNGLGETDETAILTEXFUNCSGISPROC)(GLenum target, GLfloat *points); +typedef void(GLAD_API_PTR *PFNGLGETDOUBLEINDEXEDVEXTPROC)(GLenum target, GLuint index, + GLdouble *data); +typedef void(GLAD_API_PTR *PFNGLGETDOUBLEI_VPROC)(GLenum target, GLuint index, GLdouble *data); +typedef void(GLAD_API_PTR *PFNGLGETDOUBLEI_VEXTPROC)(GLenum pname, GLuint index, GLdouble *params); +typedef void(GLAD_API_PTR *PFNGLGETDOUBLEVPROC)(GLenum pname, GLdouble *data); +typedef GLenum(GLAD_API_PTR *PFNGLGETERRORPROC)(void); +typedef void(GLAD_API_PTR *PFNGLGETFENCEIVNVPROC)(GLuint fence, GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC)(GLenum variable, + GLenum pname, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC)(GLenum variable, + GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETFIRSTPERFQUERYIDINTELPROC)(GLuint *queryId); +typedef void(GLAD_API_PTR *PFNGLGETFIXEDVOESPROC)(GLenum pname, GLfixed *params); +typedef void(GLAD_API_PTR *PFNGLGETFLOATINDEXEDVEXTPROC)(GLenum target, GLuint index, + GLfloat *data); +typedef void(GLAD_API_PTR *PFNGLGETFLOATI_VPROC)(GLenum target, GLuint index, GLfloat *data); +typedef void(GLAD_API_PTR *PFNGLGETFLOATI_VEXTPROC)(GLenum pname, GLuint index, GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETFLOATVPROC)(GLenum pname, GLfloat *data); +typedef void(GLAD_API_PTR *PFNGLGETFOGFUNCSGISPROC)(GLfloat *points); +typedef GLint(GLAD_API_PTR *PFNGLGETFRAGDATAINDEXPROC)(GLuint program, const GLchar *name); +typedef GLint(GLAD_API_PTR *PFNGLGETFRAGDATALOCATIONPROC)(GLuint program, const GLchar *name); +typedef GLint(GLAD_API_PTR *PFNGLGETFRAGDATALOCATIONEXTPROC)(GLuint program, const GLchar *name); +typedef void(GLAD_API_PTR *PFNGLGETFRAGMENTLIGHTFVSGIXPROC)(GLenum light, GLenum pname, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETFRAGMENTLIGHTIVSGIXPROC)(GLenum light, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETFRAGMENTMATERIALFVSGIXPROC)(GLenum face, GLenum pname, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETFRAGMENTMATERIALIVSGIXPROC)(GLenum face, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)(GLenum target, + GLenum attachment, + GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC)(GLenum target, + GLenum attachment, + GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETFRAMEBUFFERPARAMETERFVAMDPROC)(GLenum target, GLenum pname, + GLuint numsamples, + GLuint pixelindex, GLsizei size, + GLfloat *values); +typedef void(GLAD_API_PTR *PFNGLGETFRAMEBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC)(GLuint framebuffer, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETFRAMEBUFFERPARAMETERIVMESAPROC)(GLenum target, GLenum pname, + GLint *params); +typedef GLenum(GLAD_API_PTR *PFNGLGETGRAPHICSRESETSTATUSPROC)(void); +typedef GLenum(GLAD_API_PTR *PFNGLGETGRAPHICSRESETSTATUSARBPROC)(void); +typedef GLhandleARB(GLAD_API_PTR *PFNGLGETHANDLEARBPROC)(GLenum pname); +typedef void(GLAD_API_PTR *PFNGLGETHISTOGRAMEXTPROC)(GLenum target, GLboolean reset, GLenum format, + GLenum type, void *values); +typedef void(GLAD_API_PTR *PFNGLGETHISTOGRAMPARAMETERFVEXTPROC)(GLenum target, GLenum pname, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETHISTOGRAMPARAMETERIVEXTPROC)(GLenum target, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETHISTOGRAMPARAMETERXVOESPROC)(GLenum target, GLenum pname, + GLfixed *params); +typedef GLuint64(GLAD_API_PTR *PFNGLGETIMAGEHANDLEARBPROC)(GLuint texture, GLint level, + GLboolean layered, GLint layer, + GLenum format); +typedef GLuint64(GLAD_API_PTR *PFNGLGETIMAGEHANDLENVPROC)(GLuint texture, GLint level, + GLboolean layered, GLint layer, + GLenum format); +typedef void(GLAD_API_PTR *PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC)(GLenum target, GLenum pname, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC)(GLenum target, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETINFOLOGARBPROC)(GLhandleARB obj, GLsizei maxLength, + GLsizei *length, GLcharARB *infoLog); +typedef GLint(GLAD_API_PTR *PFNGLGETINSTRUMENTSSGIXPROC)(void); +typedef void(GLAD_API_PTR *PFNGLGETINTEGER64I_VPROC)(GLenum target, GLuint index, GLint64 *data); +typedef void(GLAD_API_PTR *PFNGLGETINTEGER64VPROC)(GLenum pname, GLint64 *data); +typedef void(GLAD_API_PTR *PFNGLGETINTEGERINDEXEDVEXTPROC)(GLenum target, GLuint index, + GLint *data); +typedef void(GLAD_API_PTR *PFNGLGETINTEGERI_VPROC)(GLenum target, GLuint index, GLint *data); +typedef void(GLAD_API_PTR *PFNGLGETINTEGERUI64I_VNVPROC)(GLenum value, GLuint index, + GLuint64EXT *result); +typedef void(GLAD_API_PTR *PFNGLGETINTEGERUI64VNVPROC)(GLenum value, GLuint64EXT *result); +typedef void(GLAD_API_PTR *PFNGLGETINTEGERVPROC)(GLenum pname, GLint *data); +typedef void(GLAD_API_PTR *PFNGLGETINTERNALFORMATSAMPLEIVNVPROC)(GLenum target, + GLenum internalformat, + GLsizei samples, GLenum pname, + GLsizei count, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETINTERNALFORMATI64VPROC)(GLenum target, GLenum internalformat, + GLenum pname, GLsizei count, + GLint64 *params); +typedef void(GLAD_API_PTR *PFNGLGETINTERNALFORMATIVPROC)(GLenum target, GLenum internalformat, + GLenum pname, GLsizei count, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETINVARIANTBOOLEANVEXTPROC)(GLuint id, GLenum value, + GLboolean *data); +typedef void(GLAD_API_PTR *PFNGLGETINVARIANTFLOATVEXTPROC)(GLuint id, GLenum value, GLfloat *data); +typedef void(GLAD_API_PTR *PFNGLGETINVARIANTINTEGERVEXTPROC)(GLuint id, GLenum value, GLint *data); +typedef void(GLAD_API_PTR *PFNGLGETLIGHTXOESPROC)(GLenum light, GLenum pname, GLfixed *params); +typedef void(GLAD_API_PTR *PFNGLGETLISTPARAMETERFVSGIXPROC)(GLuint list, GLenum pname, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETLISTPARAMETERIVSGIXPROC)(GLuint list, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC)(GLuint id, GLenum value, + GLboolean *data); +typedef void(GLAD_API_PTR *PFNGLGETLOCALCONSTANTFLOATVEXTPROC)(GLuint id, GLenum value, + GLfloat *data); +typedef void(GLAD_API_PTR *PFNGLGETLOCALCONSTANTINTEGERVEXTPROC)(GLuint id, GLenum value, + GLint *data); +typedef void(GLAD_API_PTR *PFNGLGETMAPATTRIBPARAMETERFVNVPROC)(GLenum target, GLuint index, + GLenum pname, GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETMAPATTRIBPARAMETERIVNVPROC)(GLenum target, GLuint index, + GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETMAPCONTROLPOINTSNVPROC)(GLenum target, GLuint index, GLenum type, + GLsizei ustride, GLsizei vstride, + GLboolean packed, void *points); +typedef void(GLAD_API_PTR *PFNGLGETMAPPARAMETERFVNVPROC)(GLenum target, GLenum pname, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETMAPPARAMETERIVNVPROC)(GLenum target, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETMAPXVOESPROC)(GLenum target, GLenum query, GLfixed *v); +typedef void(GLAD_API_PTR *PFNGLGETMATERIALXOESPROC)(GLenum face, GLenum pname, GLfixed param); +typedef void(GLAD_API_PTR *PFNGLGETMEMORYOBJECTDETACHEDRESOURCESUIVNVPROC)( + GLuint memory, GLenum pname, GLint first, GLsizei count, GLuint *params); +typedef void(GLAD_API_PTR *PFNGLGETMEMORYOBJECTPARAMETERIVEXTPROC)(GLuint memoryObject, + GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETMINMAXEXTPROC)(GLenum target, GLboolean reset, GLenum format, + GLenum type, void *values); +typedef void(GLAD_API_PTR *PFNGLGETMINMAXPARAMETERFVEXTPROC)(GLenum target, GLenum pname, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETMINMAXPARAMETERIVEXTPROC)(GLenum target, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETMULTITEXENVFVEXTPROC)(GLenum texunit, GLenum target, + GLenum pname, GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETMULTITEXENVIVEXTPROC)(GLenum texunit, GLenum target, + GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETMULTITEXGENDVEXTPROC)(GLenum texunit, GLenum coord, GLenum pname, + GLdouble *params); +typedef void(GLAD_API_PTR *PFNGLGETMULTITEXGENFVEXTPROC)(GLenum texunit, GLenum coord, GLenum pname, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETMULTITEXGENIVEXTPROC)(GLenum texunit, GLenum coord, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETMULTITEXIMAGEEXTPROC)(GLenum texunit, GLenum target, GLint level, + GLenum format, GLenum type, void *pixels); +typedef void(GLAD_API_PTR *PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC)(GLenum texunit, GLenum target, + GLint level, GLenum pname, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC)(GLenum texunit, GLenum target, + GLint level, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETMULTITEXPARAMETERIIVEXTPROC)(GLenum texunit, GLenum target, + GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETMULTITEXPARAMETERIUIVEXTPROC)(GLenum texunit, GLenum target, + GLenum pname, GLuint *params); +typedef void(GLAD_API_PTR *PFNGLGETMULTITEXPARAMETERFVEXTPROC)(GLenum texunit, GLenum target, + GLenum pname, GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETMULTITEXPARAMETERIVEXTPROC)(GLenum texunit, GLenum target, + GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETMULTISAMPLEFVPROC)(GLenum pname, GLuint index, GLfloat *val); +typedef void(GLAD_API_PTR *PFNGLGETMULTISAMPLEFVNVPROC)(GLenum pname, GLuint index, GLfloat *val); +typedef void(GLAD_API_PTR *PFNGLGETNAMEDBUFFERPARAMETERI64VPROC)(GLuint buffer, GLenum pname, + GLint64 *params); +typedef void(GLAD_API_PTR *PFNGLGETNAMEDBUFFERPARAMETERIVPROC)(GLuint buffer, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC)(GLuint buffer, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC)(GLuint buffer, GLenum pname, + GLuint64EXT *params); +typedef void(GLAD_API_PTR *PFNGLGETNAMEDBUFFERPOINTERVPROC)(GLuint buffer, GLenum pname, + void **params); +typedef void(GLAD_API_PTR *PFNGLGETNAMEDBUFFERPOINTERVEXTPROC)(GLuint buffer, GLenum pname, + void **params); +typedef void(GLAD_API_PTR *PFNGLGETNAMEDBUFFERSUBDATAPROC)(GLuint buffer, GLintptr offset, + GLsizeiptr size, void *data); +typedef void(GLAD_API_PTR *PFNGLGETNAMEDBUFFERSUBDATAEXTPROC)(GLuint buffer, GLintptr offset, + GLsizeiptr size, void *data); +typedef void(GLAD_API_PTR *PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC)(GLuint framebuffer, + GLenum attachment, + GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC)(GLuint framebuffer, + GLenum attachment, + GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETNAMEDFRAMEBUFFERPARAMETERFVAMDPROC)( + GLuint framebuffer, GLenum pname, GLuint numsamples, GLuint pixelindex, GLsizei size, + GLfloat *values); +typedef void(GLAD_API_PTR *PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC)(GLuint framebuffer, + GLenum pname, GLint *param); +typedef void(GLAD_API_PTR *PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC)(GLuint framebuffer, + GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC)(GLuint program, + GLenum target, + GLuint index, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC)(GLuint program, + GLenum target, + GLuint index, + GLuint *params); +typedef void(GLAD_API_PTR *PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC)(GLuint program, + GLenum target, GLuint index, + GLdouble *params); +typedef void(GLAD_API_PTR *PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC)(GLuint program, + GLenum target, GLuint index, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETNAMEDPROGRAMSTRINGEXTPROC)(GLuint program, GLenum target, + GLenum pname, void *string); +typedef void(GLAD_API_PTR *PFNGLGETNAMEDPROGRAMIVEXTPROC)(GLuint program, GLenum target, + GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC)(GLuint renderbuffer, + GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC)(GLuint renderbuffer, + GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETNAMEDSTRINGARBPROC)(GLint namelen, const GLchar *name, + GLsizei bufSize, GLint *stringlen, + GLchar *string); +typedef void(GLAD_API_PTR *PFNGLGETNAMEDSTRINGIVARBPROC)(GLint namelen, const GLchar *name, + GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETNEXTPERFQUERYIDINTELPROC)(GLuint queryId, GLuint *nextQueryId); +typedef void(GLAD_API_PTR *PFNGLGETOBJECTBUFFERFVATIPROC)(GLuint buffer, GLenum pname, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETOBJECTBUFFERIVATIPROC)(GLuint buffer, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETOBJECTLABELPROC)(GLenum identifier, GLuint name, GLsizei bufSize, + GLsizei *length, GLchar *label); +typedef void(GLAD_API_PTR *PFNGLGETOBJECTLABELEXTPROC)(GLenum type, GLuint object, GLsizei bufSize, + GLsizei *length, GLchar *label); +typedef void(GLAD_API_PTR *PFNGLGETOBJECTPARAMETERFVARBPROC)(GLhandleARB obj, GLenum pname, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETOBJECTPARAMETERIVAPPLEPROC)(GLenum objectType, GLuint name, + GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETOBJECTPARAMETERIVARBPROC)(GLhandleARB obj, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETOBJECTPTRLABELPROC)(const void *ptr, GLsizei bufSize, + GLsizei *length, GLchar *label); +typedef void(GLAD_API_PTR *PFNGLGETOCCLUSIONQUERYIVNVPROC)(GLuint id, GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETOCCLUSIONQUERYUIVNVPROC)(GLuint id, GLenum pname, + GLuint *params); +typedef void(GLAD_API_PTR *PFNGLGETPATHCOMMANDSNVPROC)(GLuint path, GLubyte *commands); +typedef void(GLAD_API_PTR *PFNGLGETPATHCOORDSNVPROC)(GLuint path, GLfloat *coords); +typedef void(GLAD_API_PTR *PFNGLGETPATHDASHARRAYNVPROC)(GLuint path, GLfloat *dashArray); +typedef GLfloat(GLAD_API_PTR *PFNGLGETPATHLENGTHNVPROC)(GLuint path, GLsizei startSegment, + GLsizei numSegments); +typedef void(GLAD_API_PTR *PFNGLGETPATHMETRICRANGENVPROC)(GLbitfield metricQueryMask, + GLuint firstPathName, GLsizei numPaths, + GLsizei stride, GLfloat *metrics); +typedef void(GLAD_API_PTR *PFNGLGETPATHMETRICSNVPROC)(GLbitfield metricQueryMask, GLsizei numPaths, + GLenum pathNameType, const void *paths, + GLuint pathBase, GLsizei stride, + GLfloat *metrics); +typedef void(GLAD_API_PTR *PFNGLGETPATHPARAMETERFVNVPROC)(GLuint path, GLenum pname, + GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLGETPATHPARAMETERIVNVPROC)(GLuint path, GLenum pname, GLint *value); +typedef void(GLAD_API_PTR *PFNGLGETPATHSPACINGNVPROC)(GLenum pathListMode, GLsizei numPaths, + GLenum pathNameType, const void *paths, + GLuint pathBase, GLfloat advanceScale, + GLfloat kerningScale, GLenum transformType, + GLfloat *returnedSpacing); +typedef void(GLAD_API_PTR *PFNGLGETPERFCOUNTERINFOINTELPROC)( + GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, + GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, + GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, + GLuint64 *rawCounterMaxValue); +typedef void(GLAD_API_PTR *PFNGLGETPERFMONITORCOUNTERDATAAMDPROC)(GLuint monitor, GLenum pname, + GLsizei dataSize, GLuint *data, + GLint *bytesWritten); +typedef void(GLAD_API_PTR *PFNGLGETPERFMONITORCOUNTERINFOAMDPROC)(GLuint group, GLuint counter, + GLenum pname, void *data); +typedef void(GLAD_API_PTR *PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC)(GLuint group, GLuint counter, + GLsizei bufSize, + GLsizei *length, + GLchar *counterString); +typedef void(GLAD_API_PTR *PFNGLGETPERFMONITORCOUNTERSAMDPROC)(GLuint group, GLint *numCounters, + GLint *maxActiveCounters, + GLsizei counterSize, + GLuint *counters); +typedef void(GLAD_API_PTR *PFNGLGETPERFMONITORGROUPSTRINGAMDPROC)(GLuint group, GLsizei bufSize, + GLsizei *length, + GLchar *groupString); +typedef void(GLAD_API_PTR *PFNGLGETPERFMONITORGROUPSAMDPROC)(GLint *numGroups, GLsizei groupsSize, + GLuint *groups); +typedef void(GLAD_API_PTR *PFNGLGETPERFQUERYDATAINTELPROC)(GLuint queryHandle, GLuint flags, + GLsizei dataSize, void *data, + GLuint *bytesWritten); +typedef void(GLAD_API_PTR *PFNGLGETPERFQUERYIDBYNAMEINTELPROC)(GLchar *queryName, GLuint *queryId); +typedef void(GLAD_API_PTR *PFNGLGETPERFQUERYINFOINTELPROC)(GLuint queryId, GLuint queryNameLength, + GLchar *queryName, GLuint *dataSize, + GLuint *noCounters, GLuint *noInstances, + GLuint *capsMask); +typedef void(GLAD_API_PTR *PFNGLGETPIXELMAPXVPROC)(GLenum map, GLint size, GLfixed *values); +typedef void(GLAD_API_PTR *PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC)(GLenum pname, GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC)(GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC)(GLenum target, GLenum pname, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC)(GLenum target, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETPOINTERINDEXEDVEXTPROC)(GLenum target, GLuint index, + void **data); +typedef void(GLAD_API_PTR *PFNGLGETPOINTERI_VEXTPROC)(GLenum pname, GLuint index, void **params); +typedef void(GLAD_API_PTR *PFNGLGETPOINTERVPROC)(GLenum pname, void **params); +typedef void(GLAD_API_PTR *PFNGLGETPOINTERVEXTPROC)(GLenum pname, void **params); +typedef void(GLAD_API_PTR *PFNGLGETPROGRAMBINARYPROC)(GLuint program, GLsizei bufSize, + GLsizei *length, GLenum *binaryFormat, + void *binary); +typedef void(GLAD_API_PTR *PFNGLGETPROGRAMENVPARAMETERIIVNVPROC)(GLenum target, GLuint index, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC)(GLenum target, GLuint index, + GLuint *params); +typedef void(GLAD_API_PTR *PFNGLGETPROGRAMENVPARAMETERDVARBPROC)(GLenum target, GLuint index, + GLdouble *params); +typedef void(GLAD_API_PTR *PFNGLGETPROGRAMENVPARAMETERFVARBPROC)(GLenum target, GLuint index, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETPROGRAMINFOLOGPROC)(GLuint program, GLsizei bufSize, + GLsizei *length, GLchar *infoLog); +typedef void(GLAD_API_PTR *PFNGLGETPROGRAMINTERFACEIVPROC)(GLuint program, GLenum programInterface, + GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC)(GLenum target, GLuint index, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC)(GLenum target, GLuint index, + GLuint *params); +typedef void(GLAD_API_PTR *PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC)(GLenum target, GLuint index, + GLdouble *params); +typedef void(GLAD_API_PTR *PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC)(GLenum target, GLuint index, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC)(GLuint id, GLsizei len, + const GLubyte *name, + GLdouble *params); +typedef void(GLAD_API_PTR *PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC)(GLuint id, GLsizei len, + const GLubyte *name, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETPROGRAMPARAMETERDVNVPROC)(GLenum target, GLuint index, + GLenum pname, GLdouble *params); +typedef void(GLAD_API_PTR *PFNGLGETPROGRAMPARAMETERFVNVPROC)(GLenum target, GLuint index, + GLenum pname, GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETPROGRAMPIPELINEINFOLOGPROC)(GLuint pipeline, GLsizei bufSize, + GLsizei *length, GLchar *infoLog); +typedef void(GLAD_API_PTR *PFNGLGETPROGRAMPIPELINEIVPROC)(GLuint pipeline, GLenum pname, + GLint *params); +typedef GLuint(GLAD_API_PTR *PFNGLGETPROGRAMRESOURCEINDEXPROC)(GLuint program, + GLenum programInterface, + const GLchar *name); +typedef GLint(GLAD_API_PTR *PFNGLGETPROGRAMRESOURCELOCATIONPROC)(GLuint program, + GLenum programInterface, + const GLchar *name); +typedef GLint(GLAD_API_PTR *PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC)(GLuint program, + GLenum programInterface, + const GLchar *name); +typedef void(GLAD_API_PTR *PFNGLGETPROGRAMRESOURCENAMEPROC)(GLuint program, GLenum programInterface, + GLuint index, GLsizei bufSize, + GLsizei *length, GLchar *name); +typedef void(GLAD_API_PTR *PFNGLGETPROGRAMRESOURCEFVNVPROC)(GLuint program, GLenum programInterface, + GLuint index, GLsizei propCount, + const GLenum *props, GLsizei count, + GLsizei *length, GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETPROGRAMRESOURCEIVPROC)(GLuint program, GLenum programInterface, + GLuint index, GLsizei propCount, + const GLenum *props, GLsizei count, + GLsizei *length, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETPROGRAMSTAGEIVPROC)(GLuint program, GLenum shadertype, + GLenum pname, GLint *values); +typedef void(GLAD_API_PTR *PFNGLGETPROGRAMSTRINGARBPROC)(GLenum target, GLenum pname, void *string); +typedef void(GLAD_API_PTR *PFNGLGETPROGRAMSTRINGNVPROC)(GLuint id, GLenum pname, GLubyte *program); +typedef void(GLAD_API_PTR *PFNGLGETPROGRAMSUBROUTINEPARAMETERUIVNVPROC)(GLenum target, GLuint index, + GLuint *param); +typedef void(GLAD_API_PTR *PFNGLGETPROGRAMIVPROC)(GLuint program, GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETPROGRAMIVARBPROC)(GLenum target, GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETPROGRAMIVNVPROC)(GLuint id, GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETQUERYBUFFEROBJECTI64VPROC)(GLuint id, GLuint buffer, + GLenum pname, GLintptr offset); +typedef void(GLAD_API_PTR *PFNGLGETQUERYBUFFEROBJECTIVPROC)(GLuint id, GLuint buffer, GLenum pname, + GLintptr offset); +typedef void(GLAD_API_PTR *PFNGLGETQUERYBUFFEROBJECTUI64VPROC)(GLuint id, GLuint buffer, + GLenum pname, GLintptr offset); +typedef void(GLAD_API_PTR *PFNGLGETQUERYBUFFEROBJECTUIVPROC)(GLuint id, GLuint buffer, GLenum pname, + GLintptr offset); +typedef void(GLAD_API_PTR *PFNGLGETQUERYINDEXEDIVPROC)(GLenum target, GLuint index, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETQUERYOBJECTI64VPROC)(GLuint id, GLenum pname, GLint64 *params); +typedef void(GLAD_API_PTR *PFNGLGETQUERYOBJECTI64VEXTPROC)(GLuint id, GLenum pname, + GLint64 *params); +typedef void(GLAD_API_PTR *PFNGLGETQUERYOBJECTIVPROC)(GLuint id, GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETQUERYOBJECTIVARBPROC)(GLuint id, GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETQUERYOBJECTUI64VPROC)(GLuint id, GLenum pname, GLuint64 *params); +typedef void(GLAD_API_PTR *PFNGLGETQUERYOBJECTUI64VEXTPROC)(GLuint id, GLenum pname, + GLuint64 *params); +typedef void(GLAD_API_PTR *PFNGLGETQUERYOBJECTUIVPROC)(GLuint id, GLenum pname, GLuint *params); +typedef void(GLAD_API_PTR *PFNGLGETQUERYOBJECTUIVARBPROC)(GLuint id, GLenum pname, GLuint *params); +typedef void(GLAD_API_PTR *PFNGLGETQUERYIVPROC)(GLenum target, GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETQUERYIVARBPROC)(GLenum target, GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETRENDERBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC)(GLenum target, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERIIVPROC)(GLuint sampler, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERIUIVPROC)(GLuint sampler, GLenum pname, + GLuint *params); +typedef void(GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERFVPROC)(GLuint sampler, GLenum pname, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERIVPROC)(GLuint sampler, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETSEMAPHOREPARAMETERIVNVPROC)(GLuint semaphore, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETSEMAPHOREPARAMETERUI64VEXTPROC)(GLuint semaphore, GLenum pname, + GLuint64 *params); +typedef void(GLAD_API_PTR *PFNGLGETSEPARABLEFILTEREXTPROC)(GLenum target, GLenum format, + GLenum type, void *row, void *column, + void *span); +typedef void(GLAD_API_PTR *PFNGLGETSHADERINFOLOGPROC)(GLuint shader, GLsizei bufSize, + GLsizei *length, GLchar *infoLog); +typedef void(GLAD_API_PTR *PFNGLGETSHADERPRECISIONFORMATPROC)(GLenum shadertype, + GLenum precisiontype, GLint *range, + GLint *precision); +typedef void(GLAD_API_PTR *PFNGLGETSHADERSOURCEPROC)(GLuint shader, GLsizei bufSize, + GLsizei *length, GLchar *source); +typedef void(GLAD_API_PTR *PFNGLGETSHADERSOURCEARBPROC)(GLhandleARB obj, GLsizei maxLength, + GLsizei *length, GLcharARB *source); +typedef void(GLAD_API_PTR *PFNGLGETSHADERIVPROC)(GLuint shader, GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETSHADINGRATEIMAGEPALETTENVPROC)(GLuint viewport, GLuint entry, + GLenum *rate); +typedef void(GLAD_API_PTR *PFNGLGETSHADINGRATESAMPLELOCATIONIVNVPROC)(GLenum rate, GLuint samples, + GLuint index, + GLint *location); +typedef void(GLAD_API_PTR *PFNGLGETSHARPENTEXFUNCSGISPROC)(GLenum target, GLfloat *points); +typedef GLushort(GLAD_API_PTR *PFNGLGETSTAGEINDEXNVPROC)(GLenum shadertype); +typedef const GLubyte *(GLAD_API_PTR *PFNGLGETSTRINGPROC)(GLenum name); +typedef const GLubyte *(GLAD_API_PTR *PFNGLGETSTRINGIPROC)(GLenum name, GLuint index); +typedef GLuint(GLAD_API_PTR *PFNGLGETSUBROUTINEINDEXPROC)(GLuint program, GLenum shadertype, + const GLchar *name); +typedef GLint(GLAD_API_PTR *PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC)(GLuint program, + GLenum shadertype, + const GLchar *name); +typedef void(GLAD_API_PTR *PFNGLGETSYNCIVPROC)(GLsync sync, GLenum pname, GLsizei count, + GLsizei *length, GLint *values); +typedef void(GLAD_API_PTR *PFNGLGETTEXBUMPPARAMETERFVATIPROC)(GLenum pname, GLfloat *param); +typedef void(GLAD_API_PTR *PFNGLGETTEXBUMPPARAMETERIVATIPROC)(GLenum pname, GLint *param); +typedef void(GLAD_API_PTR *PFNGLGETTEXENVXVOESPROC)(GLenum target, GLenum pname, GLfixed *params); +typedef void(GLAD_API_PTR *PFNGLGETTEXFILTERFUNCSGISPROC)(GLenum target, GLenum filter, + GLfloat *weights); +typedef void(GLAD_API_PTR *PFNGLGETTEXGENXVOESPROC)(GLenum coord, GLenum pname, GLfixed *params); +typedef void(GLAD_API_PTR *PFNGLGETTEXIMAGEPROC)(GLenum target, GLint level, GLenum format, + GLenum type, void *pixels); +typedef void(GLAD_API_PTR *PFNGLGETTEXLEVELPARAMETERFVPROC)(GLenum target, GLint level, + GLenum pname, GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETTEXLEVELPARAMETERIVPROC)(GLenum target, GLint level, + GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETTEXLEVELPARAMETERXVOESPROC)(GLenum target, GLint level, + GLenum pname, GLfixed *params); +typedef void(GLAD_API_PTR *PFNGLGETTEXPARAMETERIIVPROC)(GLenum target, GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETTEXPARAMETERIIVEXTPROC)(GLenum target, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETTEXPARAMETERIUIVPROC)(GLenum target, GLenum pname, + GLuint *params); +typedef void(GLAD_API_PTR *PFNGLGETTEXPARAMETERIUIVEXTPROC)(GLenum target, GLenum pname, + GLuint *params); +typedef void(GLAD_API_PTR *PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC)(GLenum target, GLenum pname, + void **params); +typedef void(GLAD_API_PTR *PFNGLGETTEXPARAMETERFVPROC)(GLenum target, GLenum pname, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETTEXPARAMETERIVPROC)(GLenum target, GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETTEXPARAMETERXVOESPROC)(GLenum target, GLenum pname, + GLfixed *params); +typedef GLuint64(GLAD_API_PTR *PFNGLGETTEXTUREHANDLEARBPROC)(GLuint texture); +typedef GLuint64(GLAD_API_PTR *PFNGLGETTEXTUREHANDLENVPROC)(GLuint texture); +typedef void(GLAD_API_PTR *PFNGLGETTEXTUREIMAGEPROC)(GLuint texture, GLint level, GLenum format, + GLenum type, GLsizei bufSize, void *pixels); +typedef void(GLAD_API_PTR *PFNGLGETTEXTUREIMAGEEXTPROC)(GLuint texture, GLenum target, GLint level, + GLenum format, GLenum type, void *pixels); +typedef void(GLAD_API_PTR *PFNGLGETTEXTURELEVELPARAMETERFVPROC)(GLuint texture, GLint level, + GLenum pname, GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC)(GLuint texture, GLenum target, + GLint level, GLenum pname, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETTEXTURELEVELPARAMETERIVPROC)(GLuint texture, GLint level, + GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC)(GLuint texture, GLenum target, + GLint level, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETTEXTUREPARAMETERIIVPROC)(GLuint texture, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETTEXTUREPARAMETERIIVEXTPROC)(GLuint texture, GLenum target, + GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETTEXTUREPARAMETERIUIVPROC)(GLuint texture, GLenum pname, + GLuint *params); +typedef void(GLAD_API_PTR *PFNGLGETTEXTUREPARAMETERIUIVEXTPROC)(GLuint texture, GLenum target, + GLenum pname, GLuint *params); +typedef void(GLAD_API_PTR *PFNGLGETTEXTUREPARAMETERFVPROC)(GLuint texture, GLenum pname, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETTEXTUREPARAMETERFVEXTPROC)(GLuint texture, GLenum target, + GLenum pname, GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETTEXTUREPARAMETERIVPROC)(GLuint texture, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETTEXTUREPARAMETERIVEXTPROC)(GLuint texture, GLenum target, + GLenum pname, GLint *params); +typedef GLuint64(GLAD_API_PTR *PFNGLGETTEXTURESAMPLERHANDLEARBPROC)(GLuint texture, GLuint sampler); +typedef GLuint64(GLAD_API_PTR *PFNGLGETTEXTURESAMPLERHANDLENVPROC)(GLuint texture, GLuint sampler); +typedef void(GLAD_API_PTR *PFNGLGETTEXTURESUBIMAGEPROC)(GLuint texture, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, + GLenum format, GLenum type, GLsizei bufSize, + void *pixels); +typedef void(GLAD_API_PTR *PFNGLGETTRACKMATRIXIVNVPROC)(GLenum target, GLuint address, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETTRANSFORMFEEDBACKVARYINGPROC)(GLuint program, GLuint index, + GLsizei bufSize, GLsizei *length, + GLsizei *size, GLenum *type, + GLchar *name); +typedef void(GLAD_API_PTR *PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC)(GLuint program, GLuint index, + GLsizei bufSize, + GLsizei *length, GLsizei *size, + GLenum *type, GLchar *name); +typedef void(GLAD_API_PTR *PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC)(GLuint program, GLuint index, + GLint *location); +typedef void(GLAD_API_PTR *PFNGLGETTRANSFORMFEEDBACKI64_VPROC)(GLuint xfb, GLenum pname, + GLuint index, GLint64 *param); +typedef void(GLAD_API_PTR *PFNGLGETTRANSFORMFEEDBACKI_VPROC)(GLuint xfb, GLenum pname, GLuint index, + GLint *param); +typedef void(GLAD_API_PTR *PFNGLGETTRANSFORMFEEDBACKIVPROC)(GLuint xfb, GLenum pname, GLint *param); +typedef GLuint(GLAD_API_PTR *PFNGLGETUNIFORMBLOCKINDEXPROC)(GLuint program, + const GLchar *uniformBlockName); +typedef GLint(GLAD_API_PTR *PFNGLGETUNIFORMBUFFERSIZEEXTPROC)(GLuint program, GLint location); +typedef void(GLAD_API_PTR *PFNGLGETUNIFORMINDICESPROC)(GLuint program, GLsizei uniformCount, + const GLchar *const *uniformNames, + GLuint *uniformIndices); +typedef GLint(GLAD_API_PTR *PFNGLGETUNIFORMLOCATIONPROC)(GLuint program, const GLchar *name); +typedef GLint(GLAD_API_PTR *PFNGLGETUNIFORMLOCATIONARBPROC)(GLhandleARB programObj, + const GLcharARB *name); +typedef GLintptr(GLAD_API_PTR *PFNGLGETUNIFORMOFFSETEXTPROC)(GLuint program, GLint location); +typedef void(GLAD_API_PTR *PFNGLGETUNIFORMSUBROUTINEUIVPROC)(GLenum shadertype, GLint location, + GLuint *params); +typedef void(GLAD_API_PTR *PFNGLGETUNIFORMDVPROC)(GLuint program, GLint location, GLdouble *params); +typedef void(GLAD_API_PTR *PFNGLGETUNIFORMFVPROC)(GLuint program, GLint location, GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETUNIFORMFVARBPROC)(GLhandleARB programObj, GLint location, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETUNIFORMI64VARBPROC)(GLuint program, GLint location, + GLint64 *params); +typedef void(GLAD_API_PTR *PFNGLGETUNIFORMI64VNVPROC)(GLuint program, GLint location, + GLint64EXT *params); +typedef void(GLAD_API_PTR *PFNGLGETUNIFORMIVPROC)(GLuint program, GLint location, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETUNIFORMIVARBPROC)(GLhandleARB programObj, GLint location, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETUNIFORMUI64VARBPROC)(GLuint program, GLint location, + GLuint64 *params); +typedef void(GLAD_API_PTR *PFNGLGETUNIFORMUI64VNVPROC)(GLuint program, GLint location, + GLuint64EXT *params); +typedef void(GLAD_API_PTR *PFNGLGETUNIFORMUIVPROC)(GLuint program, GLint location, GLuint *params); +typedef void(GLAD_API_PTR *PFNGLGETUNIFORMUIVEXTPROC)(GLuint program, GLint location, + GLuint *params); +typedef void(GLAD_API_PTR *PFNGLGETUNSIGNEDBYTEI_VEXTPROC)(GLenum target, GLuint index, + GLubyte *data); +typedef void(GLAD_API_PTR *PFNGLGETUNSIGNEDBYTEVEXTPROC)(GLenum pname, GLubyte *data); +typedef void(GLAD_API_PTR *PFNGLGETVARIANTARRAYOBJECTFVATIPROC)(GLuint id, GLenum pname, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETVARIANTARRAYOBJECTIVATIPROC)(GLuint id, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETVARIANTBOOLEANVEXTPROC)(GLuint id, GLenum value, + GLboolean *data); +typedef void(GLAD_API_PTR *PFNGLGETVARIANTFLOATVEXTPROC)(GLuint id, GLenum value, GLfloat *data); +typedef void(GLAD_API_PTR *PFNGLGETVARIANTINTEGERVEXTPROC)(GLuint id, GLenum value, GLint *data); +typedef void(GLAD_API_PTR *PFNGLGETVARIANTPOINTERVEXTPROC)(GLuint id, GLenum value, void **data); +typedef GLint(GLAD_API_PTR *PFNGLGETVARYINGLOCATIONNVPROC)(GLuint program, const GLchar *name); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXARRAYINDEXED64IVPROC)(GLuint vaobj, GLuint index, + GLenum pname, GLint64 *param); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXARRAYINDEXEDIVPROC)(GLuint vaobj, GLuint index, + GLenum pname, GLint *param); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXARRAYINTEGERI_VEXTPROC)(GLuint vaobj, GLuint index, + GLenum pname, GLint *param); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXARRAYINTEGERVEXTPROC)(GLuint vaobj, GLenum pname, + GLint *param); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXARRAYPOINTERI_VEXTPROC)(GLuint vaobj, GLuint index, + GLenum pname, void **param); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXARRAYPOINTERVEXTPROC)(GLuint vaobj, GLenum pname, + void **param); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXARRAYIVPROC)(GLuint vaobj, GLenum pname, GLint *param); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC)(GLuint index, GLenum pname, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC)(GLuint index, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBIIVPROC)(GLuint index, GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBIIVEXTPROC)(GLuint index, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBIUIVPROC)(GLuint index, GLenum pname, + GLuint *params); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBIUIVEXTPROC)(GLuint index, GLenum pname, + GLuint *params); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBLDVPROC)(GLuint index, GLenum pname, + GLdouble *params); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBLDVEXTPROC)(GLuint index, GLenum pname, + GLdouble *params); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBLI64VNVPROC)(GLuint index, GLenum pname, + GLint64EXT *params); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBLUI64VARBPROC)(GLuint index, GLenum pname, + GLuint64EXT *params); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBLUI64VNVPROC)(GLuint index, GLenum pname, + GLuint64EXT *params); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBPOINTERVPROC)(GLuint index, GLenum pname, + void **pointer); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBPOINTERVARBPROC)(GLuint index, GLenum pname, + void **pointer); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBPOINTERVNVPROC)(GLuint index, GLenum pname, + void **pointer); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBDVPROC)(GLuint index, GLenum pname, + GLdouble *params); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBDVARBPROC)(GLuint index, GLenum pname, + GLdouble *params); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBDVNVPROC)(GLuint index, GLenum pname, + GLdouble *params); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBFVPROC)(GLuint index, GLenum pname, GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBFVARBPROC)(GLuint index, GLenum pname, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBFVNVPROC)(GLuint index, GLenum pname, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBIVPROC)(GLuint index, GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBIVARBPROC)(GLuint index, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETVERTEXATTRIBIVNVPROC)(GLuint index, GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETVIDEOCAPTURESTREAMDVNVPROC)(GLuint video_capture_slot, + GLuint stream, GLenum pname, + GLdouble *params); +typedef void(GLAD_API_PTR *PFNGLGETVIDEOCAPTURESTREAMFVNVPROC)(GLuint video_capture_slot, + GLuint stream, GLenum pname, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETVIDEOCAPTURESTREAMIVNVPROC)(GLuint video_capture_slot, + GLuint stream, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETVIDEOCAPTUREIVNVPROC)(GLuint video_capture_slot, GLenum pname, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETVIDEOI64VNVPROC)(GLuint video_slot, GLenum pname, + GLint64EXT *params); +typedef void(GLAD_API_PTR *PFNGLGETVIDEOIVNVPROC)(GLuint video_slot, GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETVIDEOUI64VNVPROC)(GLuint video_slot, GLenum pname, + GLuint64EXT *params); +typedef void(GLAD_API_PTR *PFNGLGETVIDEOUIVNVPROC)(GLuint video_slot, GLenum pname, GLuint *params); +typedef GLVULKANPROCNV(GLAD_API_PTR *PFNGLGETVKPROCADDRNVPROC)(const GLchar *name); +typedef void(GLAD_API_PTR *PFNGLGETNCOMPRESSEDTEXIMAGEPROC)(GLenum target, GLint lod, + GLsizei bufSize, void *pixels); +typedef void(GLAD_API_PTR *PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC)(GLenum target, GLint lod, + GLsizei bufSize, void *img); +typedef void(GLAD_API_PTR *PFNGLGETNTEXIMAGEPROC)(GLenum target, GLint level, GLenum format, + GLenum type, GLsizei bufSize, void *pixels); +typedef void(GLAD_API_PTR *PFNGLGETNTEXIMAGEARBPROC)(GLenum target, GLint level, GLenum format, + GLenum type, GLsizei bufSize, void *img); +typedef void(GLAD_API_PTR *PFNGLGETNUNIFORMDVPROC)(GLuint program, GLint location, GLsizei bufSize, + GLdouble *params); +typedef void(GLAD_API_PTR *PFNGLGETNUNIFORMDVARBPROC)(GLuint program, GLint location, + GLsizei bufSize, GLdouble *params); +typedef void(GLAD_API_PTR *PFNGLGETNUNIFORMFVPROC)(GLuint program, GLint location, GLsizei bufSize, + GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETNUNIFORMFVARBPROC)(GLuint program, GLint location, + GLsizei bufSize, GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLGETNUNIFORMI64VARBPROC)(GLuint program, GLint location, + GLsizei bufSize, GLint64 *params); +typedef void(GLAD_API_PTR *PFNGLGETNUNIFORMIVPROC)(GLuint program, GLint location, GLsizei bufSize, + GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETNUNIFORMIVARBPROC)(GLuint program, GLint location, + GLsizei bufSize, GLint *params); +typedef void(GLAD_API_PTR *PFNGLGETNUNIFORMUI64VARBPROC)(GLuint program, GLint location, + GLsizei bufSize, GLuint64 *params); +typedef void(GLAD_API_PTR *PFNGLGETNUNIFORMUIVPROC)(GLuint program, GLint location, GLsizei bufSize, + GLuint *params); +typedef void(GLAD_API_PTR *PFNGLGETNUNIFORMUIVARBPROC)(GLuint program, GLint location, + GLsizei bufSize, GLuint *params); +typedef void(GLAD_API_PTR *PFNGLGLOBALALPHAFACTORBSUNPROC)(GLbyte factor); +typedef void(GLAD_API_PTR *PFNGLGLOBALALPHAFACTORDSUNPROC)(GLdouble factor); +typedef void(GLAD_API_PTR *PFNGLGLOBALALPHAFACTORFSUNPROC)(GLfloat factor); +typedef void(GLAD_API_PTR *PFNGLGLOBALALPHAFACTORISUNPROC)(GLint factor); +typedef void(GLAD_API_PTR *PFNGLGLOBALALPHAFACTORSSUNPROC)(GLshort factor); +typedef void(GLAD_API_PTR *PFNGLGLOBALALPHAFACTORUBSUNPROC)(GLubyte factor); +typedef void(GLAD_API_PTR *PFNGLGLOBALALPHAFACTORUISUNPROC)(GLuint factor); +typedef void(GLAD_API_PTR *PFNGLGLOBALALPHAFACTORUSSUNPROC)(GLushort factor); +typedef void(GLAD_API_PTR *PFNGLHINTPROC)(GLenum target, GLenum mode); +typedef void(GLAD_API_PTR *PFNGLHINTPGIPROC)(GLenum target, GLint mode); +typedef void(GLAD_API_PTR *PFNGLHISTOGRAMEXTPROC)(GLenum target, GLsizei width, + GLenum internalformat, GLboolean sink); +typedef void(GLAD_API_PTR *PFNGLIGLOOINTERFACESGIXPROC)(GLenum pname, const void *params); +typedef void(GLAD_API_PTR *PFNGLIMAGETRANSFORMPARAMETERFHPPROC)(GLenum target, GLenum pname, + GLfloat param); +typedef void(GLAD_API_PTR *PFNGLIMAGETRANSFORMPARAMETERFVHPPROC)(GLenum target, GLenum pname, + const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLIMAGETRANSFORMPARAMETERIHPPROC)(GLenum target, GLenum pname, + GLint param); +typedef void(GLAD_API_PTR *PFNGLIMAGETRANSFORMPARAMETERIVHPPROC)(GLenum target, GLenum pname, + const GLint *params); +typedef void(GLAD_API_PTR *PFNGLIMPORTMEMORYFDEXTPROC)(GLuint memory, GLuint64 size, + GLenum handleType, GLint fd); +typedef void(GLAD_API_PTR *PFNGLIMPORTMEMORYWIN32HANDLEEXTPROC)(GLuint memory, GLuint64 size, + GLenum handleType, void *handle); +typedef void(GLAD_API_PTR *PFNGLIMPORTMEMORYWIN32NAMEEXTPROC)(GLuint memory, GLuint64 size, + GLenum handleType, const void *name); +typedef void(GLAD_API_PTR *PFNGLIMPORTSEMAPHOREFDEXTPROC)(GLuint semaphore, GLenum handleType, + GLint fd); +typedef void(GLAD_API_PTR *PFNGLIMPORTSEMAPHOREWIN32HANDLEEXTPROC)(GLuint semaphore, + GLenum handleType, void *handle); +typedef void(GLAD_API_PTR *PFNGLIMPORTSEMAPHOREWIN32NAMEEXTPROC)(GLuint semaphore, + GLenum handleType, + const void *name); +typedef GLsync(GLAD_API_PTR *PFNGLIMPORTSYNCEXTPROC)(GLenum external_sync_type, + GLintptr external_sync, GLbitfield flags); +typedef void(GLAD_API_PTR *PFNGLINDEXFORMATNVPROC)(GLenum type, GLsizei stride); +typedef void(GLAD_API_PTR *PFNGLINDEXFUNCEXTPROC)(GLenum func, GLclampf ref); +typedef void(GLAD_API_PTR *PFNGLINDEXMATERIALEXTPROC)(GLenum face, GLenum mode); +typedef void(GLAD_API_PTR *PFNGLINDEXPOINTEREXTPROC)(GLenum type, GLsizei stride, GLsizei count, + const void *pointer); +typedef void(GLAD_API_PTR *PFNGLINDEXPOINTERLISTIBMPROC)(GLenum type, GLint stride, + const void **pointer, GLint ptrstride); +typedef void(GLAD_API_PTR *PFNGLINDEXXOESPROC)(GLfixed component); +typedef void(GLAD_API_PTR *PFNGLINDEXXVOESPROC)(const GLfixed *component); +typedef void(GLAD_API_PTR *PFNGLINSERTCOMPONENTEXTPROC)(GLuint res, GLuint src, GLuint num); +typedef void(GLAD_API_PTR *PFNGLINSERTEVENTMARKEREXTPROC)(GLsizei length, const GLchar *marker); +typedef void(GLAD_API_PTR *PFNGLINSTRUMENTSBUFFERSGIXPROC)(GLsizei size, GLint *buffer); +typedef void(GLAD_API_PTR *PFNGLINTERPOLATEPATHSNVPROC)(GLuint resultPath, GLuint pathA, + GLuint pathB, GLfloat weight); +typedef void(GLAD_API_PTR *PFNGLINVALIDATEBUFFERDATAPROC)(GLuint buffer); +typedef void(GLAD_API_PTR *PFNGLINVALIDATEBUFFERSUBDATAPROC)(GLuint buffer, GLintptr offset, + GLsizeiptr length); +typedef void(GLAD_API_PTR *PFNGLINVALIDATEFRAMEBUFFERPROC)(GLenum target, GLsizei numAttachments, + const GLenum *attachments); +typedef void(GLAD_API_PTR *PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC)(GLuint framebuffer, + GLsizei numAttachments, + const GLenum *attachments); +typedef void(GLAD_API_PTR *PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC)( + GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, + GLsizei width, GLsizei height); +typedef void(GLAD_API_PTR *PFNGLINVALIDATESUBFRAMEBUFFERPROC)(GLenum target, GLsizei numAttachments, + const GLenum *attachments, GLint x, + GLint y, GLsizei width, + GLsizei height); +typedef void(GLAD_API_PTR *PFNGLINVALIDATETEXIMAGEPROC)(GLuint texture, GLint level); +typedef void(GLAD_API_PTR *PFNGLINVALIDATETEXSUBIMAGEPROC)(GLuint texture, GLint level, + GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth); +typedef GLboolean(GLAD_API_PTR *PFNGLISASYNCMARKERSGIXPROC)(GLuint marker); +typedef GLboolean(GLAD_API_PTR *PFNGLISBUFFERPROC)(GLuint buffer); +typedef GLboolean(GLAD_API_PTR *PFNGLISBUFFERARBPROC)(GLuint buffer); +typedef GLboolean(GLAD_API_PTR *PFNGLISBUFFERRESIDENTNVPROC)(GLenum target); +typedef GLboolean(GLAD_API_PTR *PFNGLISCOMMANDLISTNVPROC)(GLuint list); +typedef GLboolean(GLAD_API_PTR *PFNGLISENABLEDPROC)(GLenum cap); +typedef GLboolean(GLAD_API_PTR *PFNGLISENABLEDINDEXEDEXTPROC)(GLenum target, GLuint index); +typedef GLboolean(GLAD_API_PTR *PFNGLISENABLEDIPROC)(GLenum target, GLuint index); +typedef GLboolean(GLAD_API_PTR *PFNGLISFENCEAPPLEPROC)(GLuint fence); +typedef GLboolean(GLAD_API_PTR *PFNGLISFENCENVPROC)(GLuint fence); +typedef GLboolean(GLAD_API_PTR *PFNGLISFRAMEBUFFERPROC)(GLuint framebuffer); +typedef GLboolean(GLAD_API_PTR *PFNGLISFRAMEBUFFEREXTPROC)(GLuint framebuffer); +typedef GLboolean(GLAD_API_PTR *PFNGLISIMAGEHANDLERESIDENTARBPROC)(GLuint64 handle); +typedef GLboolean(GLAD_API_PTR *PFNGLISIMAGEHANDLERESIDENTNVPROC)(GLuint64 handle); +typedef GLboolean(GLAD_API_PTR *PFNGLISMEMORYOBJECTEXTPROC)(GLuint memoryObject); +typedef GLboolean(GLAD_API_PTR *PFNGLISNAMEAMDPROC)(GLenum identifier, GLuint name); +typedef GLboolean(GLAD_API_PTR *PFNGLISNAMEDBUFFERRESIDENTNVPROC)(GLuint buffer); +typedef GLboolean(GLAD_API_PTR *PFNGLISNAMEDSTRINGARBPROC)(GLint namelen, const GLchar *name); +typedef GLboolean(GLAD_API_PTR *PFNGLISOBJECTBUFFERATIPROC)(GLuint buffer); +typedef GLboolean(GLAD_API_PTR *PFNGLISOCCLUSIONQUERYNVPROC)(GLuint id); +typedef GLboolean(GLAD_API_PTR *PFNGLISPATHNVPROC)(GLuint path); +typedef GLboolean(GLAD_API_PTR *PFNGLISPOINTINFILLPATHNVPROC)(GLuint path, GLuint mask, GLfloat x, + GLfloat y); +typedef GLboolean(GLAD_API_PTR *PFNGLISPOINTINSTROKEPATHNVPROC)(GLuint path, GLfloat x, GLfloat y); +typedef GLboolean(GLAD_API_PTR *PFNGLISPROGRAMPROC)(GLuint program); +typedef GLboolean(GLAD_API_PTR *PFNGLISPROGRAMARBPROC)(GLuint program); +typedef GLboolean(GLAD_API_PTR *PFNGLISPROGRAMNVPROC)(GLuint id); +typedef GLboolean(GLAD_API_PTR *PFNGLISPROGRAMPIPELINEPROC)(GLuint pipeline); +typedef GLboolean(GLAD_API_PTR *PFNGLISQUERYPROC)(GLuint id); +typedef GLboolean(GLAD_API_PTR *PFNGLISQUERYARBPROC)(GLuint id); +typedef GLboolean(GLAD_API_PTR *PFNGLISRENDERBUFFERPROC)(GLuint renderbuffer); +typedef GLboolean(GLAD_API_PTR *PFNGLISRENDERBUFFEREXTPROC)(GLuint renderbuffer); +typedef GLboolean(GLAD_API_PTR *PFNGLISSAMPLERPROC)(GLuint sampler); +typedef GLboolean(GLAD_API_PTR *PFNGLISSEMAPHOREEXTPROC)(GLuint semaphore); +typedef GLboolean(GLAD_API_PTR *PFNGLISSHADERPROC)(GLuint shader); +typedef GLboolean(GLAD_API_PTR *PFNGLISSTATENVPROC)(GLuint state); +typedef GLboolean(GLAD_API_PTR *PFNGLISSYNCPROC)(GLsync sync); +typedef GLboolean(GLAD_API_PTR *PFNGLISTEXTUREPROC)(GLuint texture); +typedef GLboolean(GLAD_API_PTR *PFNGLISTEXTUREEXTPROC)(GLuint texture); +typedef GLboolean(GLAD_API_PTR *PFNGLISTEXTUREHANDLERESIDENTARBPROC)(GLuint64 handle); +typedef GLboolean(GLAD_API_PTR *PFNGLISTEXTUREHANDLERESIDENTNVPROC)(GLuint64 handle); +typedef GLboolean(GLAD_API_PTR *PFNGLISTRANSFORMFEEDBACKPROC)(GLuint id); +typedef GLboolean(GLAD_API_PTR *PFNGLISTRANSFORMFEEDBACKNVPROC)(GLuint id); +typedef GLboolean(GLAD_API_PTR *PFNGLISVARIANTENABLEDEXTPROC)(GLuint id, GLenum cap); +typedef GLboolean(GLAD_API_PTR *PFNGLISVERTEXARRAYPROC)(GLuint array); +typedef GLboolean(GLAD_API_PTR *PFNGLISVERTEXARRAYAPPLEPROC)(GLuint array); +typedef GLboolean(GLAD_API_PTR *PFNGLISVERTEXATTRIBENABLEDAPPLEPROC)(GLuint index, GLenum pname); +typedef void(GLAD_API_PTR *PFNGLLGPUCOPYIMAGESUBDATANVXPROC)( + GLuint sourceGpu, GLbitfield destinationGpuMask, GLuint srcName, GLenum srcTarget, + GLint srcLevel, GLint srcX, GLint srxY, GLint srcZ, GLuint dstName, GLenum dstTarget, + GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, + GLsizei depth); +typedef void(GLAD_API_PTR *PFNGLLGPUINTERLOCKNVXPROC)(void); +typedef void(GLAD_API_PTR *PFNGLLGPUNAMEDBUFFERSUBDATANVXPROC)(GLbitfield gpuMask, GLuint buffer, + GLintptr offset, GLsizeiptr size, + const void *data); +typedef void(GLAD_API_PTR *PFNGLLABELOBJECTEXTPROC)(GLenum type, GLuint object, GLsizei length, + const GLchar *label); +typedef void(GLAD_API_PTR *PFNGLLIGHTENVISGIXPROC)(GLenum pname, GLint param); +typedef void(GLAD_API_PTR *PFNGLLIGHTMODELXOESPROC)(GLenum pname, GLfixed param); +typedef void(GLAD_API_PTR *PFNGLLIGHTMODELXVOESPROC)(GLenum pname, const GLfixed *param); +typedef void(GLAD_API_PTR *PFNGLLIGHTXOESPROC)(GLenum light, GLenum pname, GLfixed param); +typedef void(GLAD_API_PTR *PFNGLLIGHTXVOESPROC)(GLenum light, GLenum pname, const GLfixed *params); +typedef void(GLAD_API_PTR *PFNGLLINEWIDTHPROC)(GLfloat width); +typedef void(GLAD_API_PTR *PFNGLLINEWIDTHXOESPROC)(GLfixed width); +typedef void(GLAD_API_PTR *PFNGLLINKPROGRAMPROC)(GLuint program); +typedef void(GLAD_API_PTR *PFNGLLINKPROGRAMARBPROC)(GLhandleARB programObj); +typedef void(GLAD_API_PTR *PFNGLLISTDRAWCOMMANDSSTATESCLIENTNVPROC)( + GLuint list, GLuint segment, const void **indirects, const GLsizei *sizes, + const GLuint *states, const GLuint *fbos, GLuint count); +typedef void(GLAD_API_PTR *PFNGLLISTPARAMETERFSGIXPROC)(GLuint list, GLenum pname, GLfloat param); +typedef void(GLAD_API_PTR *PFNGLLISTPARAMETERFVSGIXPROC)(GLuint list, GLenum pname, + const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLLISTPARAMETERISGIXPROC)(GLuint list, GLenum pname, GLint param); +typedef void(GLAD_API_PTR *PFNGLLISTPARAMETERIVSGIXPROC)(GLuint list, GLenum pname, + const GLint *params); +typedef void(GLAD_API_PTR *PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC)(GLbitfield mask); +typedef void(GLAD_API_PTR *PFNGLLOADMATRIXXOESPROC)(const GLfixed *m); +typedef void(GLAD_API_PTR *PFNGLLOADPROGRAMNVPROC)(GLenum target, GLuint id, GLsizei len, + const GLubyte *program); +typedef void(GLAD_API_PTR *PFNGLLOADTRANSPOSEMATRIXDARBPROC)(const GLdouble *m); +typedef void(GLAD_API_PTR *PFNGLLOADTRANSPOSEMATRIXFARBPROC)(const GLfloat *m); +typedef void(GLAD_API_PTR *PFNGLLOADTRANSPOSEMATRIXXOESPROC)(const GLfixed *m); +typedef void(GLAD_API_PTR *PFNGLLOCKARRAYSEXTPROC)(GLint first, GLsizei count); +typedef void(GLAD_API_PTR *PFNGLLOGICOPPROC)(GLenum opcode); +typedef void(GLAD_API_PTR *PFNGLMAKEBUFFERNONRESIDENTNVPROC)(GLenum target); +typedef void(GLAD_API_PTR *PFNGLMAKEBUFFERRESIDENTNVPROC)(GLenum target, GLenum access); +typedef void(GLAD_API_PTR *PFNGLMAKEIMAGEHANDLENONRESIDENTARBPROC)(GLuint64 handle); +typedef void(GLAD_API_PTR *PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC)(GLuint64 handle); +typedef void(GLAD_API_PTR *PFNGLMAKEIMAGEHANDLERESIDENTARBPROC)(GLuint64 handle, GLenum access); +typedef void(GLAD_API_PTR *PFNGLMAKEIMAGEHANDLERESIDENTNVPROC)(GLuint64 handle, GLenum access); +typedef void(GLAD_API_PTR *PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC)(GLuint buffer); +typedef void(GLAD_API_PTR *PFNGLMAKENAMEDBUFFERRESIDENTNVPROC)(GLuint buffer, GLenum access); +typedef void(GLAD_API_PTR *PFNGLMAKETEXTUREHANDLENONRESIDENTARBPROC)(GLuint64 handle); +typedef void(GLAD_API_PTR *PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC)(GLuint64 handle); +typedef void(GLAD_API_PTR *PFNGLMAKETEXTUREHANDLERESIDENTARBPROC)(GLuint64 handle); +typedef void(GLAD_API_PTR *PFNGLMAKETEXTUREHANDLERESIDENTNVPROC)(GLuint64 handle); +typedef void(GLAD_API_PTR *PFNGLMAP1XOESPROC)(GLenum target, GLfixed u1, GLfixed u2, GLint stride, + GLint order, GLfixed points); +typedef void(GLAD_API_PTR *PFNGLMAP2XOESPROC)(GLenum target, GLfixed u1, GLfixed u2, GLint ustride, + GLint uorder, GLfixed v1, GLfixed v2, GLint vstride, + GLint vorder, GLfixed points); +typedef void *(GLAD_API_PTR *PFNGLMAPBUFFERPROC)(GLenum target, GLenum access); +typedef void *(GLAD_API_PTR *PFNGLMAPBUFFERARBPROC)(GLenum target, GLenum access); +typedef void *(GLAD_API_PTR *PFNGLMAPBUFFERRANGEPROC)(GLenum target, GLintptr offset, + GLsizeiptr length, GLbitfield access); +typedef void(GLAD_API_PTR *PFNGLMAPCONTROLPOINTSNVPROC)(GLenum target, GLuint index, GLenum type, + GLsizei ustride, GLsizei vstride, + GLint uorder, GLint vorder, + GLboolean packed, const void *points); +typedef void(GLAD_API_PTR *PFNGLMAPGRID1XOESPROC)(GLint n, GLfixed u1, GLfixed u2); +typedef void(GLAD_API_PTR *PFNGLMAPGRID2XOESPROC)(GLint n, GLfixed u1, GLfixed u2, GLfixed v1, + GLfixed v2); +typedef void *(GLAD_API_PTR *PFNGLMAPNAMEDBUFFERPROC)(GLuint buffer, GLenum access); +typedef void *(GLAD_API_PTR *PFNGLMAPNAMEDBUFFEREXTPROC)(GLuint buffer, GLenum access); +typedef void *(GLAD_API_PTR *PFNGLMAPNAMEDBUFFERRANGEPROC)(GLuint buffer, GLintptr offset, + GLsizeiptr length, GLbitfield access); +typedef void *(GLAD_API_PTR *PFNGLMAPNAMEDBUFFERRANGEEXTPROC)(GLuint buffer, GLintptr offset, + GLsizeiptr length, GLbitfield access); +typedef void *(GLAD_API_PTR *PFNGLMAPOBJECTBUFFERATIPROC)(GLuint buffer); +typedef void(GLAD_API_PTR *PFNGLMAPPARAMETERFVNVPROC)(GLenum target, GLenum pname, + const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLMAPPARAMETERIVNVPROC)(GLenum target, GLenum pname, + const GLint *params); +typedef void *(GLAD_API_PTR *PFNGLMAPTEXTURE2DINTELPROC)(GLuint texture, GLint level, + GLbitfield access, GLint *stride, + GLenum *layout); +typedef void(GLAD_API_PTR *PFNGLMAPVERTEXATTRIB1DAPPLEPROC)(GLuint index, GLuint size, GLdouble u1, + GLdouble u2, GLint stride, GLint order, + const GLdouble *points); +typedef void(GLAD_API_PTR *PFNGLMAPVERTEXATTRIB1FAPPLEPROC)(GLuint index, GLuint size, GLfloat u1, + GLfloat u2, GLint stride, GLint order, + const GLfloat *points); +typedef void(GLAD_API_PTR *PFNGLMAPVERTEXATTRIB2DAPPLEPROC)(GLuint index, GLuint size, GLdouble u1, + GLdouble u2, GLint ustride, + GLint uorder, GLdouble v1, GLdouble v2, + GLint vstride, GLint vorder, + const GLdouble *points); +typedef void(GLAD_API_PTR *PFNGLMAPVERTEXATTRIB2FAPPLEPROC)(GLuint index, GLuint size, GLfloat u1, + GLfloat u2, GLint ustride, GLint uorder, + GLfloat v1, GLfloat v2, GLint vstride, + GLint vorder, const GLfloat *points); +typedef void(GLAD_API_PTR *PFNGLMATERIALXOESPROC)(GLenum face, GLenum pname, GLfixed param); +typedef void(GLAD_API_PTR *PFNGLMATERIALXVOESPROC)(GLenum face, GLenum pname, const GLfixed *param); +typedef void(GLAD_API_PTR *PFNGLMATRIXFRUSTUMEXTPROC)(GLenum mode, GLdouble left, GLdouble right, + GLdouble bottom, GLdouble top, GLdouble zNear, + GLdouble zFar); +typedef void(GLAD_API_PTR *PFNGLMATRIXINDEXPOINTERARBPROC)(GLint size, GLenum type, GLsizei stride, + const void *pointer); +typedef void(GLAD_API_PTR *PFNGLMATRIXINDEXUBVARBPROC)(GLint size, const GLubyte *indices); +typedef void(GLAD_API_PTR *PFNGLMATRIXINDEXUIVARBPROC)(GLint size, const GLuint *indices); +typedef void(GLAD_API_PTR *PFNGLMATRIXINDEXUSVARBPROC)(GLint size, const GLushort *indices); +typedef void(GLAD_API_PTR *PFNGLMATRIXLOAD3X2FNVPROC)(GLenum matrixMode, const GLfloat *m); +typedef void(GLAD_API_PTR *PFNGLMATRIXLOAD3X3FNVPROC)(GLenum matrixMode, const GLfloat *m); +typedef void(GLAD_API_PTR *PFNGLMATRIXLOADIDENTITYEXTPROC)(GLenum mode); +typedef void(GLAD_API_PTR *PFNGLMATRIXLOADTRANSPOSE3X3FNVPROC)(GLenum matrixMode, const GLfloat *m); +typedef void(GLAD_API_PTR *PFNGLMATRIXLOADTRANSPOSEDEXTPROC)(GLenum mode, const GLdouble *m); +typedef void(GLAD_API_PTR *PFNGLMATRIXLOADTRANSPOSEFEXTPROC)(GLenum mode, const GLfloat *m); +typedef void(GLAD_API_PTR *PFNGLMATRIXLOADDEXTPROC)(GLenum mode, const GLdouble *m); +typedef void(GLAD_API_PTR *PFNGLMATRIXLOADFEXTPROC)(GLenum mode, const GLfloat *m); +typedef void(GLAD_API_PTR *PFNGLMATRIXMULT3X2FNVPROC)(GLenum matrixMode, const GLfloat *m); +typedef void(GLAD_API_PTR *PFNGLMATRIXMULT3X3FNVPROC)(GLenum matrixMode, const GLfloat *m); +typedef void(GLAD_API_PTR *PFNGLMATRIXMULTTRANSPOSE3X3FNVPROC)(GLenum matrixMode, const GLfloat *m); +typedef void(GLAD_API_PTR *PFNGLMATRIXMULTTRANSPOSEDEXTPROC)(GLenum mode, const GLdouble *m); +typedef void(GLAD_API_PTR *PFNGLMATRIXMULTTRANSPOSEFEXTPROC)(GLenum mode, const GLfloat *m); +typedef void(GLAD_API_PTR *PFNGLMATRIXMULTDEXTPROC)(GLenum mode, const GLdouble *m); +typedef void(GLAD_API_PTR *PFNGLMATRIXMULTFEXTPROC)(GLenum mode, const GLfloat *m); +typedef void(GLAD_API_PTR *PFNGLMATRIXORTHOEXTPROC)(GLenum mode, GLdouble left, GLdouble right, + GLdouble bottom, GLdouble top, GLdouble zNear, + GLdouble zFar); +typedef void(GLAD_API_PTR *PFNGLMATRIXPOPEXTPROC)(GLenum mode); +typedef void(GLAD_API_PTR *PFNGLMATRIXPUSHEXTPROC)(GLenum mode); +typedef void(GLAD_API_PTR *PFNGLMATRIXROTATEDEXTPROC)(GLenum mode, GLdouble angle, GLdouble x, + GLdouble y, GLdouble z); +typedef void(GLAD_API_PTR *PFNGLMATRIXROTATEFEXTPROC)(GLenum mode, GLfloat angle, GLfloat x, + GLfloat y, GLfloat z); +typedef void(GLAD_API_PTR *PFNGLMATRIXSCALEDEXTPROC)(GLenum mode, GLdouble x, GLdouble y, + GLdouble z); +typedef void(GLAD_API_PTR *PFNGLMATRIXSCALEFEXTPROC)(GLenum mode, GLfloat x, GLfloat y, GLfloat z); +typedef void(GLAD_API_PTR *PFNGLMATRIXTRANSLATEDEXTPROC)(GLenum mode, GLdouble x, GLdouble y, + GLdouble z); +typedef void(GLAD_API_PTR *PFNGLMATRIXTRANSLATEFEXTPROC)(GLenum mode, GLfloat x, GLfloat y, + GLfloat z); +typedef void(GLAD_API_PTR *PFNGLMAXSHADERCOMPILERTHREADSARBPROC)(GLuint count); +typedef void(GLAD_API_PTR *PFNGLMAXSHADERCOMPILERTHREADSKHRPROC)(GLuint count); +typedef void(GLAD_API_PTR *PFNGLMEMORYBARRIERPROC)(GLbitfield barriers); +typedef void(GLAD_API_PTR *PFNGLMEMORYBARRIERBYREGIONPROC)(GLbitfield barriers); +typedef void(GLAD_API_PTR *PFNGLMEMORYBARRIEREXTPROC)(GLbitfield barriers); +typedef void(GLAD_API_PTR *PFNGLMEMORYOBJECTPARAMETERIVEXTPROC)(GLuint memoryObject, GLenum pname, + const GLint *params); +typedef void(GLAD_API_PTR *PFNGLMINSAMPLESHADINGPROC)(GLfloat value); +typedef void(GLAD_API_PTR *PFNGLMINSAMPLESHADINGARBPROC)(GLfloat value); +typedef void(GLAD_API_PTR *PFNGLMINMAXEXTPROC)(GLenum target, GLenum internalformat, + GLboolean sink); +typedef void(GLAD_API_PTR *PFNGLMULTMATRIXXOESPROC)(const GLfixed *m); +typedef void(GLAD_API_PTR *PFNGLMULTTRANSPOSEMATRIXDARBPROC)(const GLdouble *m); +typedef void(GLAD_API_PTR *PFNGLMULTTRANSPOSEMATRIXFARBPROC)(const GLfloat *m); +typedef void(GLAD_API_PTR *PFNGLMULTTRANSPOSEMATRIXXOESPROC)(const GLfixed *m); +typedef void(GLAD_API_PTR *PFNGLMULTIDRAWARRAYSPROC)(GLenum mode, const GLint *first, + const GLsizei *count, GLsizei drawcount); +typedef void(GLAD_API_PTR *PFNGLMULTIDRAWARRAYSEXTPROC)(GLenum mode, const GLint *first, + const GLsizei *count, GLsizei primcount); +typedef void(GLAD_API_PTR *PFNGLMULTIDRAWARRAYSINDIRECTPROC)(GLenum mode, const void *indirect, + GLsizei drawcount, GLsizei stride); +typedef void(GLAD_API_PTR *PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC)(GLenum mode, const void *indirect, + GLsizei primcount, GLsizei stride); +typedef void(GLAD_API_PTR *PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSCOUNTNVPROC)( + GLenum mode, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, + GLint vertexBufferCount); +typedef void(GLAD_API_PTR *PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSNVPROC)(GLenum mode, + const void *indirect, + GLsizei drawCount, + GLsizei stride, + GLint vertexBufferCount); +typedef void(GLAD_API_PTR *PFNGLMULTIDRAWARRAYSINDIRECTCOUNTPROC)(GLenum mode, const void *indirect, + GLintptr drawcount, + GLsizei maxdrawcount, + GLsizei stride); +typedef void(GLAD_API_PTR *PFNGLMULTIDRAWARRAYSINDIRECTCOUNTARBPROC)(GLenum mode, + const void *indirect, + GLintptr drawcount, + GLsizei maxdrawcount, + GLsizei stride); +typedef void(GLAD_API_PTR *PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC)(GLenum mode, const GLint *first, + const GLsizei *count, + GLsizei primcount); +typedef void(GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSPROC)(GLenum mode, const GLsizei *count, + GLenum type, const void *const *indices, + GLsizei drawcount); +typedef void(GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC)(GLenum mode, const GLsizei *count, + GLenum type, + const void *const *indices, + GLsizei drawcount, + const GLint *basevertex); +typedef void(GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSEXTPROC)(GLenum mode, const GLsizei *count, + GLenum type, const void *const *indices, + GLsizei primcount); +typedef void(GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSINDIRECTPROC)(GLenum mode, GLenum type, + const void *indirect, + GLsizei drawcount, GLsizei stride); +typedef void(GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC)(GLenum mode, GLenum type, + const void *indirect, + GLsizei primcount, + GLsizei stride); +typedef void(GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSCOUNTNVPROC)( + GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, + GLsizei stride, GLint vertexBufferCount); +typedef void(GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSNVPROC)(GLenum mode, GLenum type, + const void *indirect, + GLsizei drawCount, + GLsizei stride, + GLint vertexBufferCount); +typedef void(GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTPROC)(GLenum mode, GLenum type, + const void *indirect, + GLintptr drawcount, + GLsizei maxdrawcount, + GLsizei stride); +typedef void(GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTARBPROC)(GLenum mode, GLenum type, + const void *indirect, + GLintptr drawcount, + GLsizei maxdrawcount, + GLsizei stride); +typedef void(GLAD_API_PTR *PFNGLMULTIDRAWMESHTASKSINDIRECTCOUNTNVPROC)(GLintptr indirect, + GLintptr drawcount, + GLsizei maxdrawcount, + GLsizei stride); +typedef void(GLAD_API_PTR *PFNGLMULTIDRAWMESHTASKSINDIRECTNVPROC)(GLintptr indirect, + GLsizei drawcount, + GLsizei stride); +typedef void(GLAD_API_PTR *PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC)(GLenum mode, GLuint start, + GLuint end, const GLint *first, + const GLsizei *count, + GLsizei primcount); +typedef void(GLAD_API_PTR *PFNGLMULTIMODEDRAWARRAYSIBMPROC)(const GLenum *mode, const GLint *first, + const GLsizei *count, GLsizei primcount, + GLint modestride); +typedef void(GLAD_API_PTR *PFNGLMULTIMODEDRAWELEMENTSIBMPROC)(const GLenum *mode, + const GLsizei *count, GLenum type, + const void *const *indices, + GLsizei primcount, GLint modestride); +typedef void(GLAD_API_PTR *PFNGLMULTITEXBUFFEREXTPROC)(GLenum texunit, GLenum target, + GLenum internalformat, GLuint buffer); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1BOESPROC)(GLenum texture, GLbyte s); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1BVOESPROC)(GLenum texture, const GLbyte *coords); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1DARBPROC)(GLenum target, GLdouble s); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1DVARBPROC)(GLenum target, const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1FARBPROC)(GLenum target, GLfloat s); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1FVARBPROC)(GLenum target, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1HNVPROC)(GLenum target, GLhalfNV s); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1HVNVPROC)(GLenum target, const GLhalfNV *v); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1IARBPROC)(GLenum target, GLint s); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1IVARBPROC)(GLenum target, const GLint *v); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1SARBPROC)(GLenum target, GLshort s); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1SVARBPROC)(GLenum target, const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1XOESPROC)(GLenum texture, GLfixed s); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD1XVOESPROC)(GLenum texture, const GLfixed *coords); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2BOESPROC)(GLenum texture, GLbyte s, GLbyte t); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2BVOESPROC)(GLenum texture, const GLbyte *coords); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2DARBPROC)(GLenum target, GLdouble s, GLdouble t); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2DVARBPROC)(GLenum target, const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2FARBPROC)(GLenum target, GLfloat s, GLfloat t); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2FVARBPROC)(GLenum target, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2HNVPROC)(GLenum target, GLhalfNV s, GLhalfNV t); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2HVNVPROC)(GLenum target, const GLhalfNV *v); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2IARBPROC)(GLenum target, GLint s, GLint t); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2IVARBPROC)(GLenum target, const GLint *v); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2SARBPROC)(GLenum target, GLshort s, GLshort t); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2SVARBPROC)(GLenum target, const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2XOESPROC)(GLenum texture, GLfixed s, GLfixed t); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD2XVOESPROC)(GLenum texture, const GLfixed *coords); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3BOESPROC)(GLenum texture, GLbyte s, GLbyte t, + GLbyte r); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3BVOESPROC)(GLenum texture, const GLbyte *coords); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3DARBPROC)(GLenum target, GLdouble s, GLdouble t, + GLdouble r); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3DVARBPROC)(GLenum target, const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3FARBPROC)(GLenum target, GLfloat s, GLfloat t, + GLfloat r); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3FVARBPROC)(GLenum target, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3HNVPROC)(GLenum target, GLhalfNV s, GLhalfNV t, + GLhalfNV r); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3HVNVPROC)(GLenum target, const GLhalfNV *v); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3IARBPROC)(GLenum target, GLint s, GLint t, GLint r); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3IVARBPROC)(GLenum target, const GLint *v); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3SARBPROC)(GLenum target, GLshort s, GLshort t, + GLshort r); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3SVARBPROC)(GLenum target, const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3XOESPROC)(GLenum texture, GLfixed s, GLfixed t, + GLfixed r); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD3XVOESPROC)(GLenum texture, const GLfixed *coords); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4BOESPROC)(GLenum texture, GLbyte s, GLbyte t, + GLbyte r, GLbyte q); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4BVOESPROC)(GLenum texture, const GLbyte *coords); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4DARBPROC)(GLenum target, GLdouble s, GLdouble t, + GLdouble r, GLdouble q); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4DVARBPROC)(GLenum target, const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4FARBPROC)(GLenum target, GLfloat s, GLfloat t, + GLfloat r, GLfloat q); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4FVARBPROC)(GLenum target, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4HNVPROC)(GLenum target, GLhalfNV s, GLhalfNV t, + GLhalfNV r, GLhalfNV q); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4HVNVPROC)(GLenum target, const GLhalfNV *v); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4IARBPROC)(GLenum target, GLint s, GLint t, GLint r, + GLint q); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4IVARBPROC)(GLenum target, const GLint *v); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4SARBPROC)(GLenum target, GLshort s, GLshort t, + GLshort r, GLshort q); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4SVARBPROC)(GLenum target, const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4XOESPROC)(GLenum texture, GLfixed s, GLfixed t, + GLfixed r, GLfixed q); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORD4XVOESPROC)(GLenum texture, const GLfixed *coords); +typedef void(GLAD_API_PTR *PFNGLMULTITEXCOORDPOINTEREXTPROC)(GLenum texunit, GLint size, + GLenum type, GLsizei stride, + const void *pointer); +typedef void(GLAD_API_PTR *PFNGLMULTITEXENVFEXTPROC)(GLenum texunit, GLenum target, GLenum pname, + GLfloat param); +typedef void(GLAD_API_PTR *PFNGLMULTITEXENVFVEXTPROC)(GLenum texunit, GLenum target, GLenum pname, + const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLMULTITEXENVIEXTPROC)(GLenum texunit, GLenum target, GLenum pname, + GLint param); +typedef void(GLAD_API_PTR *PFNGLMULTITEXENVIVEXTPROC)(GLenum texunit, GLenum target, GLenum pname, + const GLint *params); +typedef void(GLAD_API_PTR *PFNGLMULTITEXGENDEXTPROC)(GLenum texunit, GLenum coord, GLenum pname, + GLdouble param); +typedef void(GLAD_API_PTR *PFNGLMULTITEXGENDVEXTPROC)(GLenum texunit, GLenum coord, GLenum pname, + const GLdouble *params); +typedef void(GLAD_API_PTR *PFNGLMULTITEXGENFEXTPROC)(GLenum texunit, GLenum coord, GLenum pname, + GLfloat param); +typedef void(GLAD_API_PTR *PFNGLMULTITEXGENFVEXTPROC)(GLenum texunit, GLenum coord, GLenum pname, + const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLMULTITEXGENIEXTPROC)(GLenum texunit, GLenum coord, GLenum pname, + GLint param); +typedef void(GLAD_API_PTR *PFNGLMULTITEXGENIVEXTPROC)(GLenum texunit, GLenum coord, GLenum pname, + const GLint *params); +typedef void(GLAD_API_PTR *PFNGLMULTITEXIMAGE1DEXTPROC)(GLenum texunit, GLenum target, GLint level, + GLint internalformat, GLsizei width, + GLint border, GLenum format, GLenum type, + const void *pixels); +typedef void(GLAD_API_PTR *PFNGLMULTITEXIMAGE2DEXTPROC)(GLenum texunit, GLenum target, GLint level, + GLint internalformat, GLsizei width, + GLsizei height, GLint border, GLenum format, + GLenum type, const void *pixels); +typedef void(GLAD_API_PTR *PFNGLMULTITEXIMAGE3DEXTPROC)(GLenum texunit, GLenum target, GLint level, + GLint internalformat, GLsizei width, + GLsizei height, GLsizei depth, GLint border, + GLenum format, GLenum type, + const void *pixels); +typedef void(GLAD_API_PTR *PFNGLMULTITEXPARAMETERIIVEXTPROC)(GLenum texunit, GLenum target, + GLenum pname, const GLint *params); +typedef void(GLAD_API_PTR *PFNGLMULTITEXPARAMETERIUIVEXTPROC)(GLenum texunit, GLenum target, + GLenum pname, const GLuint *params); +typedef void(GLAD_API_PTR *PFNGLMULTITEXPARAMETERFEXTPROC)(GLenum texunit, GLenum target, + GLenum pname, GLfloat param); +typedef void(GLAD_API_PTR *PFNGLMULTITEXPARAMETERFVEXTPROC)(GLenum texunit, GLenum target, + GLenum pname, const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLMULTITEXPARAMETERIEXTPROC)(GLenum texunit, GLenum target, + GLenum pname, GLint param); +typedef void(GLAD_API_PTR *PFNGLMULTITEXPARAMETERIVEXTPROC)(GLenum texunit, GLenum target, + GLenum pname, const GLint *params); +typedef void(GLAD_API_PTR *PFNGLMULTITEXRENDERBUFFEREXTPROC)(GLenum texunit, GLenum target, + GLuint renderbuffer); +typedef void(GLAD_API_PTR *PFNGLMULTITEXSUBIMAGE1DEXTPROC)(GLenum texunit, GLenum target, + GLint level, GLint xoffset, + GLsizei width, GLenum format, + GLenum type, const void *pixels); +typedef void(GLAD_API_PTR *PFNGLMULTITEXSUBIMAGE2DEXTPROC)(GLenum texunit, GLenum target, + GLint level, GLint xoffset, + GLint yoffset, GLsizei width, + GLsizei height, GLenum format, + GLenum type, const void *pixels); +typedef void(GLAD_API_PTR *PFNGLMULTITEXSUBIMAGE3DEXTPROC)(GLenum texunit, GLenum target, + GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, + GLsizei depth, GLenum format, + GLenum type, const void *pixels); +typedef void(GLAD_API_PTR *PFNGLMULTICASTBARRIERNVPROC)(void); +typedef void(GLAD_API_PTR *PFNGLMULTICASTBLITFRAMEBUFFERNVPROC)( + GLuint srcGpu, GLuint dstGpu, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, + GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +typedef void(GLAD_API_PTR *PFNGLMULTICASTBUFFERSUBDATANVPROC)(GLbitfield gpuMask, GLuint buffer, + GLintptr offset, GLsizeiptr size, + const void *data); +typedef void(GLAD_API_PTR *PFNGLMULTICASTCOPYBUFFERSUBDATANVPROC)( + GLuint readGpu, GLbitfield writeGpuMask, GLuint readBuffer, GLuint writeBuffer, + GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +typedef void(GLAD_API_PTR *PFNGLMULTICASTCOPYIMAGESUBDATANVPROC)( + GLuint srcGpu, GLbitfield dstGpuMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, + GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, + GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); +typedef void(GLAD_API_PTR *PFNGLMULTICASTFRAMEBUFFERSAMPLELOCATIONSFVNVPROC)( + GLuint gpu, GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLMULTICASTGETQUERYOBJECTI64VNVPROC)(GLuint gpu, GLuint id, + GLenum pname, GLint64 *params); +typedef void(GLAD_API_PTR *PFNGLMULTICASTGETQUERYOBJECTIVNVPROC)(GLuint gpu, GLuint id, + GLenum pname, GLint *params); +typedef void(GLAD_API_PTR *PFNGLMULTICASTGETQUERYOBJECTUI64VNVPROC)(GLuint gpu, GLuint id, + GLenum pname, GLuint64 *params); +typedef void(GLAD_API_PTR *PFNGLMULTICASTGETQUERYOBJECTUIVNVPROC)(GLuint gpu, GLuint id, + GLenum pname, GLuint *params); +typedef void(GLAD_API_PTR *PFNGLMULTICASTSCISSORARRAYVNVXPROC)(GLuint gpu, GLuint first, + GLsizei count, const GLint *v); +typedef void(GLAD_API_PTR *PFNGLMULTICASTVIEWPORTARRAYVNVXPROC)(GLuint gpu, GLuint first, + GLsizei count, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLMULTICASTVIEWPORTPOSITIONWSCALENVXPROC)(GLuint gpu, GLuint index, + GLfloat xcoeff, + GLfloat ycoeff); +typedef void(GLAD_API_PTR *PFNGLMULTICASTWAITSYNCNVPROC)(GLuint signalGpu, GLbitfield waitGpuMask); +typedef void(GLAD_API_PTR *PFNGLNAMEDBUFFERATTACHMEMORYNVPROC)(GLuint buffer, GLuint memory, + GLuint64 offset); +typedef void(GLAD_API_PTR *PFNGLNAMEDBUFFERDATAPROC)(GLuint buffer, GLsizeiptr size, + const void *data, GLenum usage); +typedef void(GLAD_API_PTR *PFNGLNAMEDBUFFERDATAEXTPROC)(GLuint buffer, GLsizeiptr size, + const void *data, GLenum usage); +typedef void(GLAD_API_PTR *PFNGLNAMEDBUFFERPAGECOMMITMENTARBPROC)(GLuint buffer, GLintptr offset, + GLsizeiptr size, + GLboolean commit); +typedef void(GLAD_API_PTR *PFNGLNAMEDBUFFERPAGECOMMITMENTEXTPROC)(GLuint buffer, GLintptr offset, + GLsizeiptr size, + GLboolean commit); +typedef void(GLAD_API_PTR *PFNGLNAMEDBUFFERPAGECOMMITMENTMEMNVPROC)(GLuint buffer, GLintptr offset, + GLsizeiptr size, GLuint memory, + GLuint64 memOffset, + GLboolean commit); +typedef void(GLAD_API_PTR *PFNGLNAMEDBUFFERSTORAGEPROC)(GLuint buffer, GLsizeiptr size, + const void *data, GLbitfield flags); +typedef void(GLAD_API_PTR *PFNGLNAMEDBUFFERSTORAGEEXTPROC)(GLuint buffer, GLsizeiptr size, + const void *data, GLbitfield flags); +typedef void(GLAD_API_PTR *PFNGLNAMEDBUFFERSTORAGEEXTERNALEXTPROC)( + GLuint buffer, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, + GLbitfield flags); +typedef void(GLAD_API_PTR *PFNGLNAMEDBUFFERSTORAGEMEMEXTPROC)(GLuint buffer, GLsizeiptr size, + GLuint memory, GLuint64 offset); +typedef void(GLAD_API_PTR *PFNGLNAMEDBUFFERSUBDATAPROC)(GLuint buffer, GLintptr offset, + GLsizeiptr size, const void *data); +typedef void(GLAD_API_PTR *PFNGLNAMEDBUFFERSUBDATAEXTPROC)(GLuint buffer, GLintptr offset, + GLsizeiptr size, const void *data); +typedef void(GLAD_API_PTR *PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC)(GLuint readBuffer, + GLuint writeBuffer, + GLintptr readOffset, + GLintptr writeOffset, + GLsizeiptr size); +typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC)(GLuint framebuffer, GLenum buf); +typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC)(GLuint framebuffer, GLsizei n, + const GLenum *bufs); +typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC)(GLuint framebuffer, GLenum pname, + GLint param); +typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC)(GLuint framebuffer, GLenum pname, + GLint param); +typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC)(GLuint framebuffer, GLenum src); +typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC)(GLuint framebuffer, + GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer); +typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC)(GLuint framebuffer, + GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer); +typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVARBPROC)(GLuint framebuffer, + GLuint start, + GLsizei count, + const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVNVPROC)(GLuint framebuffer, + GLuint start, + GLsizei count, + const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERSAMPLEPOSITIONSFVAMDPROC)(GLuint framebuffer, + GLuint numsamples, + GLuint pixelindex, + const GLfloat *values); +typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERTEXTUREPROC)(GLuint framebuffer, GLenum attachment, + GLuint texture, GLint level); +typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC)(GLuint framebuffer, + GLenum attachment, + GLenum textarget, GLuint texture, + GLint level); +typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC)(GLuint framebuffer, + GLenum attachment, + GLenum textarget, GLuint texture, + GLint level); +typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC)(GLuint framebuffer, + GLenum attachment, + GLenum textarget, GLuint texture, + GLint level, GLint zoffset); +typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC)(GLuint framebuffer, + GLenum attachment, GLuint texture, + GLint level); +typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC)(GLuint framebuffer, + GLenum attachment, + GLuint texture, GLint level, + GLenum face); +typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC)(GLuint framebuffer, + GLenum attachment, GLuint texture, + GLint level, GLint layer); +typedef void(GLAD_API_PTR *PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC)(GLuint framebuffer, + GLenum attachment, + GLuint texture, GLint level, + GLint layer); +typedef void(GLAD_API_PTR *PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC)(GLuint program, GLenum target, + GLuint index, GLdouble x, + GLdouble y, GLdouble z, + GLdouble w); +typedef void(GLAD_API_PTR *PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC)(GLuint program, GLenum target, + GLuint index, + const GLdouble *params); +typedef void(GLAD_API_PTR *PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC)(GLuint program, GLenum target, + GLuint index, GLfloat x, + GLfloat y, GLfloat z, + GLfloat w); +typedef void(GLAD_API_PTR *PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC)(GLuint program, GLenum target, + GLuint index, + const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC)(GLuint program, GLenum target, + GLuint index, GLint x, + GLint y, GLint z, GLint w); +typedef void(GLAD_API_PTR *PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC)(GLuint program, + GLenum target, GLuint index, + const GLint *params); +typedef void(GLAD_API_PTR *PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC)(GLuint program, + GLenum target, GLuint index, + GLuint x, GLuint y, GLuint z, + GLuint w); +typedef void(GLAD_API_PTR *PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC)(GLuint program, + GLenum target, GLuint index, + const GLuint *params); +typedef void(GLAD_API_PTR *PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC)(GLuint program, + GLenum target, GLuint index, + GLsizei count, + const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC)(GLuint program, + GLenum target, GLuint index, + GLsizei count, + const GLint *params); +typedef void(GLAD_API_PTR *PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC)( + GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); +typedef void(GLAD_API_PTR *PFNGLNAMEDPROGRAMSTRINGEXTPROC)(GLuint program, GLenum target, + GLenum format, GLsizei len, + const void *string); +typedef void(GLAD_API_PTR *PFNGLNAMEDRENDERBUFFERSTORAGEPROC)(GLuint renderbuffer, + GLenum internalformat, GLsizei width, + GLsizei height); +typedef void(GLAD_API_PTR *PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC)(GLuint renderbuffer, + GLenum internalformat, + GLsizei width, GLsizei height); +typedef void(GLAD_API_PTR *PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC)( + GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void(GLAD_API_PTR *PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEADVANCEDAMDPROC)( + GLuint renderbuffer, GLsizei samples, GLsizei storageSamples, GLenum internalformat, + GLsizei width, GLsizei height); +typedef void(GLAD_API_PTR *PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC)( + GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, + GLsizei width, GLsizei height); +typedef void(GLAD_API_PTR *PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC)( + GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void(GLAD_API_PTR *PFNGLNAMEDSTRINGARBPROC)(GLenum type, GLint namelen, const GLchar *name, + GLint stringlen, const GLchar *string); +typedef GLuint(GLAD_API_PTR *PFNGLNEWOBJECTBUFFERATIPROC)(GLsizei size, const void *pointer, + GLenum usage); +typedef void(GLAD_API_PTR *PFNGLNORMAL3FVERTEX3FSUNPROC)(GLfloat nx, GLfloat ny, GLfloat nz, + GLfloat x, GLfloat y, GLfloat z); +typedef void(GLAD_API_PTR *PFNGLNORMAL3FVERTEX3FVSUNPROC)(const GLfloat *n, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLNORMAL3HNVPROC)(GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); +typedef void(GLAD_API_PTR *PFNGLNORMAL3HVNVPROC)(const GLhalfNV *v); +typedef void(GLAD_API_PTR *PFNGLNORMAL3XOESPROC)(GLfixed nx, GLfixed ny, GLfixed nz); +typedef void(GLAD_API_PTR *PFNGLNORMAL3XVOESPROC)(const GLfixed *coords); +typedef void(GLAD_API_PTR *PFNGLNORMALFORMATNVPROC)(GLenum type, GLsizei stride); +typedef void(GLAD_API_PTR *PFNGLNORMALPOINTEREXTPROC)(GLenum type, GLsizei stride, GLsizei count, + const void *pointer); +typedef void(GLAD_API_PTR *PFNGLNORMALPOINTERLISTIBMPROC)(GLenum type, GLint stride, + const void **pointer, GLint ptrstride); +typedef void(GLAD_API_PTR *PFNGLNORMALPOINTERVINTELPROC)(GLenum type, const void **pointer); +typedef void(GLAD_API_PTR *PFNGLNORMALSTREAM3BATIPROC)(GLenum stream, GLbyte nx, GLbyte ny, + GLbyte nz); +typedef void(GLAD_API_PTR *PFNGLNORMALSTREAM3BVATIPROC)(GLenum stream, const GLbyte *coords); +typedef void(GLAD_API_PTR *PFNGLNORMALSTREAM3DATIPROC)(GLenum stream, GLdouble nx, GLdouble ny, + GLdouble nz); +typedef void(GLAD_API_PTR *PFNGLNORMALSTREAM3DVATIPROC)(GLenum stream, const GLdouble *coords); +typedef void(GLAD_API_PTR *PFNGLNORMALSTREAM3FATIPROC)(GLenum stream, GLfloat nx, GLfloat ny, + GLfloat nz); +typedef void(GLAD_API_PTR *PFNGLNORMALSTREAM3FVATIPROC)(GLenum stream, const GLfloat *coords); +typedef void(GLAD_API_PTR *PFNGLNORMALSTREAM3IATIPROC)(GLenum stream, GLint nx, GLint ny, GLint nz); +typedef void(GLAD_API_PTR *PFNGLNORMALSTREAM3IVATIPROC)(GLenum stream, const GLint *coords); +typedef void(GLAD_API_PTR *PFNGLNORMALSTREAM3SATIPROC)(GLenum stream, GLshort nx, GLshort ny, + GLshort nz); +typedef void(GLAD_API_PTR *PFNGLNORMALSTREAM3SVATIPROC)(GLenum stream, const GLshort *coords); +typedef void(GLAD_API_PTR *PFNGLOBJECTLABELPROC)(GLenum identifier, GLuint name, GLsizei length, + const GLchar *label); +typedef void(GLAD_API_PTR *PFNGLOBJECTPTRLABELPROC)(const void *ptr, GLsizei length, + const GLchar *label); +typedef GLenum(GLAD_API_PTR *PFNGLOBJECTPURGEABLEAPPLEPROC)(GLenum objectType, GLuint name, + GLenum option); +typedef GLenum(GLAD_API_PTR *PFNGLOBJECTUNPURGEABLEAPPLEPROC)(GLenum objectType, GLuint name, + GLenum option); +typedef void(GLAD_API_PTR *PFNGLORTHOFOESPROC)(GLfloat l, GLfloat r, GLfloat b, GLfloat t, + GLfloat n, GLfloat f); +typedef void(GLAD_API_PTR *PFNGLORTHOXOESPROC)(GLfixed l, GLfixed r, GLfixed b, GLfixed t, + GLfixed n, GLfixed f); +typedef void(GLAD_API_PTR *PFNGLPNTRIANGLESFATIPROC)(GLenum pname, GLfloat param); +typedef void(GLAD_API_PTR *PFNGLPNTRIANGLESIATIPROC)(GLenum pname, GLint param); +typedef void(GLAD_API_PTR *PFNGLPASSTEXCOORDATIPROC)(GLuint dst, GLuint coord, GLenum swizzle); +typedef void(GLAD_API_PTR *PFNGLPASSTHROUGHXOESPROC)(GLfixed token); +typedef void(GLAD_API_PTR *PFNGLPATCHPARAMETERFVPROC)(GLenum pname, const GLfloat *values); +typedef void(GLAD_API_PTR *PFNGLPATCHPARAMETERIPROC)(GLenum pname, GLint value); +typedef void(GLAD_API_PTR *PFNGLPATHCOMMANDSNVPROC)(GLuint path, GLsizei numCommands, + const GLubyte *commands, GLsizei numCoords, + GLenum coordType, const void *coords); +typedef void(GLAD_API_PTR *PFNGLPATHCOORDSNVPROC)(GLuint path, GLsizei numCoords, GLenum coordType, + const void *coords); +typedef void(GLAD_API_PTR *PFNGLPATHCOVERDEPTHFUNCNVPROC)(GLenum func); +typedef void(GLAD_API_PTR *PFNGLPATHDASHARRAYNVPROC)(GLuint path, GLsizei dashCount, + const GLfloat *dashArray); +typedef GLenum(GLAD_API_PTR *PFNGLPATHGLYPHINDEXARRAYNVPROC)( + GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, + GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +typedef GLenum(GLAD_API_PTR *PFNGLPATHGLYPHINDEXRANGENVPROC)(GLenum fontTarget, + const void *fontName, + GLbitfield fontStyle, + GLuint pathParameterTemplate, + GLfloat emScale, GLuint *baseAndCount); +typedef void(GLAD_API_PTR *PFNGLPATHGLYPHRANGENVPROC)(GLuint firstPathName, GLenum fontTarget, + const void *fontName, GLbitfield fontStyle, + GLuint firstGlyph, GLsizei numGlyphs, + GLenum handleMissingGlyphs, + GLuint pathParameterTemplate, + GLfloat emScale); +typedef void(GLAD_API_PTR *PFNGLPATHGLYPHSNVPROC)(GLuint firstPathName, GLenum fontTarget, + const void *fontName, GLbitfield fontStyle, + GLsizei numGlyphs, GLenum type, + const void *charcodes, GLenum handleMissingGlyphs, + GLuint pathParameterTemplate, GLfloat emScale); +typedef GLenum(GLAD_API_PTR *PFNGLPATHMEMORYGLYPHINDEXARRAYNVPROC)( + GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, + GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, + GLfloat emScale); +typedef void(GLAD_API_PTR *PFNGLPATHPARAMETERFNVPROC)(GLuint path, GLenum pname, GLfloat value); +typedef void(GLAD_API_PTR *PFNGLPATHPARAMETERFVNVPROC)(GLuint path, GLenum pname, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLPATHPARAMETERINVPROC)(GLuint path, GLenum pname, GLint value); +typedef void(GLAD_API_PTR *PFNGLPATHPARAMETERIVNVPROC)(GLuint path, GLenum pname, + const GLint *value); +typedef void(GLAD_API_PTR *PFNGLPATHSTENCILDEPTHOFFSETNVPROC)(GLfloat factor, GLfloat units); +typedef void(GLAD_API_PTR *PFNGLPATHSTENCILFUNCNVPROC)(GLenum func, GLint ref, GLuint mask); +typedef void(GLAD_API_PTR *PFNGLPATHSTRINGNVPROC)(GLuint path, GLenum format, GLsizei length, + const void *pathString); +typedef void(GLAD_API_PTR *PFNGLPATHSUBCOMMANDSNVPROC)(GLuint path, GLsizei commandStart, + GLsizei commandsToDelete, + GLsizei numCommands, const GLubyte *commands, + GLsizei numCoords, GLenum coordType, + const void *coords); +typedef void(GLAD_API_PTR *PFNGLPATHSUBCOORDSNVPROC)(GLuint path, GLsizei coordStart, + GLsizei numCoords, GLenum coordType, + const void *coords); +typedef void(GLAD_API_PTR *PFNGLPAUSETRANSFORMFEEDBACKPROC)(void); +typedef void(GLAD_API_PTR *PFNGLPAUSETRANSFORMFEEDBACKNVPROC)(void); +typedef void(GLAD_API_PTR *PFNGLPIXELDATARANGENVPROC)(GLenum target, GLsizei length, + const void *pointer); +typedef void(GLAD_API_PTR *PFNGLPIXELMAPXPROC)(GLenum map, GLint size, const GLfixed *values); +typedef void(GLAD_API_PTR *PFNGLPIXELSTOREFPROC)(GLenum pname, GLfloat param); +typedef void(GLAD_API_PTR *PFNGLPIXELSTOREIPROC)(GLenum pname, GLint param); +typedef void(GLAD_API_PTR *PFNGLPIXELSTOREXPROC)(GLenum pname, GLfixed param); +typedef void(GLAD_API_PTR *PFNGLPIXELTEXGENPARAMETERFSGISPROC)(GLenum pname, GLfloat param); +typedef void(GLAD_API_PTR *PFNGLPIXELTEXGENPARAMETERFVSGISPROC)(GLenum pname, + const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLPIXELTEXGENPARAMETERISGISPROC)(GLenum pname, GLint param); +typedef void(GLAD_API_PTR *PFNGLPIXELTEXGENPARAMETERIVSGISPROC)(GLenum pname, const GLint *params); +typedef void(GLAD_API_PTR *PFNGLPIXELTEXGENSGIXPROC)(GLenum mode); +typedef void(GLAD_API_PTR *PFNGLPIXELTRANSFERXOESPROC)(GLenum pname, GLfixed param); +typedef void(GLAD_API_PTR *PFNGLPIXELTRANSFORMPARAMETERFEXTPROC)(GLenum target, GLenum pname, + GLfloat param); +typedef void(GLAD_API_PTR *PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC)(GLenum target, GLenum pname, + const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLPIXELTRANSFORMPARAMETERIEXTPROC)(GLenum target, GLenum pname, + GLint param); +typedef void(GLAD_API_PTR *PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC)(GLenum target, GLenum pname, + const GLint *params); +typedef void(GLAD_API_PTR *PFNGLPIXELZOOMXOESPROC)(GLfixed xfactor, GLfixed yfactor); +typedef GLboolean(GLAD_API_PTR *PFNGLPOINTALONGPATHNVPROC)(GLuint path, GLsizei startSegment, + GLsizei numSegments, GLfloat distance, + GLfloat *x, GLfloat *y, + GLfloat *tangentX, GLfloat *tangentY); +typedef void(GLAD_API_PTR *PFNGLPOINTPARAMETERFPROC)(GLenum pname, GLfloat param); +typedef void(GLAD_API_PTR *PFNGLPOINTPARAMETERFARBPROC)(GLenum pname, GLfloat param); +typedef void(GLAD_API_PTR *PFNGLPOINTPARAMETERFEXTPROC)(GLenum pname, GLfloat param); +typedef void(GLAD_API_PTR *PFNGLPOINTPARAMETERFSGISPROC)(GLenum pname, GLfloat param); +typedef void(GLAD_API_PTR *PFNGLPOINTPARAMETERFVPROC)(GLenum pname, const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLPOINTPARAMETERFVARBPROC)(GLenum pname, const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLPOINTPARAMETERFVEXTPROC)(GLenum pname, const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLPOINTPARAMETERFVSGISPROC)(GLenum pname, const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLPOINTPARAMETERIPROC)(GLenum pname, GLint param); +typedef void(GLAD_API_PTR *PFNGLPOINTPARAMETERINVPROC)(GLenum pname, GLint param); +typedef void(GLAD_API_PTR *PFNGLPOINTPARAMETERIVPROC)(GLenum pname, const GLint *params); +typedef void(GLAD_API_PTR *PFNGLPOINTPARAMETERIVNVPROC)(GLenum pname, const GLint *params); +typedef void(GLAD_API_PTR *PFNGLPOINTPARAMETERXVOESPROC)(GLenum pname, const GLfixed *params); +typedef void(GLAD_API_PTR *PFNGLPOINTSIZEPROC)(GLfloat size); +typedef void(GLAD_API_PTR *PFNGLPOINTSIZEXOESPROC)(GLfixed size); +typedef GLint(GLAD_API_PTR *PFNGLPOLLASYNCSGIXPROC)(GLuint *markerp); +typedef GLint(GLAD_API_PTR *PFNGLPOLLINSTRUMENTSSGIXPROC)(GLint *marker_p); +typedef void(GLAD_API_PTR *PFNGLPOLYGONMODEPROC)(GLenum face, GLenum mode); +typedef void(GLAD_API_PTR *PFNGLPOLYGONOFFSETPROC)(GLfloat factor, GLfloat units); +typedef void(GLAD_API_PTR *PFNGLPOLYGONOFFSETCLAMPPROC)(GLfloat factor, GLfloat units, + GLfloat clamp); +typedef void(GLAD_API_PTR *PFNGLPOLYGONOFFSETCLAMPEXTPROC)(GLfloat factor, GLfloat units, + GLfloat clamp); +typedef void(GLAD_API_PTR *PFNGLPOLYGONOFFSETEXTPROC)(GLfloat factor, GLfloat bias); +typedef void(GLAD_API_PTR *PFNGLPOLYGONOFFSETXOESPROC)(GLfixed factor, GLfixed units); +typedef void(GLAD_API_PTR *PFNGLPOPDEBUGGROUPPROC)(void); +typedef void(GLAD_API_PTR *PFNGLPOPGROUPMARKEREXTPROC)(void); +typedef void(GLAD_API_PTR *PFNGLPRESENTFRAMEDUALFILLNVPROC)( + GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, + GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, + GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3); +typedef void(GLAD_API_PTR *PFNGLPRESENTFRAMEKEYEDNVPROC)(GLuint video_slot, + GLuint64EXT minPresentTime, + GLuint beginPresentTimeId, + GLuint presentDurationId, GLenum type, + GLenum target0, GLuint fill0, GLuint key0, + GLenum target1, GLuint fill1, GLuint key1); +typedef void(GLAD_API_PTR *PFNGLPRIMITIVEBOUNDINGBOXARBPROC)(GLfloat minX, GLfloat minY, + GLfloat minZ, GLfloat minW, + GLfloat maxX, GLfloat maxY, + GLfloat maxZ, GLfloat maxW); +typedef void(GLAD_API_PTR *PFNGLPRIMITIVERESTARTINDEXPROC)(GLuint index); +typedef void(GLAD_API_PTR *PFNGLPRIMITIVERESTARTINDEXNVPROC)(GLuint index); +typedef void(GLAD_API_PTR *PFNGLPRIMITIVERESTARTNVPROC)(void); +typedef void(GLAD_API_PTR *PFNGLPRIORITIZETEXTURESEXTPROC)(GLsizei n, const GLuint *textures, + const GLclampf *priorities); +typedef void(GLAD_API_PTR *PFNGLPRIORITIZETEXTURESXOESPROC)(GLsizei n, const GLuint *textures, + const GLfixed *priorities); +typedef void(GLAD_API_PTR *PFNGLPROGRAMBINARYPROC)(GLuint program, GLenum binaryFormat, + const void *binary, GLsizei length); +typedef void(GLAD_API_PTR *PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC)(GLenum target, + GLuint bindingIndex, + GLuint wordIndex, GLsizei count, + const GLint *params); +typedef void(GLAD_API_PTR *PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC)(GLenum target, + GLuint bindingIndex, + GLuint wordIndex, GLsizei count, + const GLuint *params); +typedef void(GLAD_API_PTR *PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC)(GLenum target, GLuint bindingIndex, + GLuint wordIndex, GLsizei count, + const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLPROGRAMENVPARAMETER4DARBPROC)(GLenum target, GLuint index, + GLdouble x, GLdouble y, GLdouble z, + GLdouble w); +typedef void(GLAD_API_PTR *PFNGLPROGRAMENVPARAMETER4DVARBPROC)(GLenum target, GLuint index, + const GLdouble *params); +typedef void(GLAD_API_PTR *PFNGLPROGRAMENVPARAMETER4FARBPROC)(GLenum target, GLuint index, + GLfloat x, GLfloat y, GLfloat z, + GLfloat w); +typedef void(GLAD_API_PTR *PFNGLPROGRAMENVPARAMETER4FVARBPROC)(GLenum target, GLuint index, + const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLPROGRAMENVPARAMETERI4INVPROC)(GLenum target, GLuint index, GLint x, + GLint y, GLint z, GLint w); +typedef void(GLAD_API_PTR *PFNGLPROGRAMENVPARAMETERI4IVNVPROC)(GLenum target, GLuint index, + const GLint *params); +typedef void(GLAD_API_PTR *PFNGLPROGRAMENVPARAMETERI4UINVPROC)(GLenum target, GLuint index, + GLuint x, GLuint y, GLuint z, + GLuint w); +typedef void(GLAD_API_PTR *PFNGLPROGRAMENVPARAMETERI4UIVNVPROC)(GLenum target, GLuint index, + const GLuint *params); +typedef void(GLAD_API_PTR *PFNGLPROGRAMENVPARAMETERS4FVEXTPROC)(GLenum target, GLuint index, + GLsizei count, + const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLPROGRAMENVPARAMETERSI4IVNVPROC)(GLenum target, GLuint index, + GLsizei count, const GLint *params); +typedef void(GLAD_API_PTR *PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC)(GLenum target, GLuint index, + GLsizei count, + const GLuint *params); +typedef void(GLAD_API_PTR *PFNGLPROGRAMLOCALPARAMETER4DARBPROC)(GLenum target, GLuint index, + GLdouble x, GLdouble y, GLdouble z, + GLdouble w); +typedef void(GLAD_API_PTR *PFNGLPROGRAMLOCALPARAMETER4DVARBPROC)(GLenum target, GLuint index, + const GLdouble *params); +typedef void(GLAD_API_PTR *PFNGLPROGRAMLOCALPARAMETER4FARBPROC)(GLenum target, GLuint index, + GLfloat x, GLfloat y, GLfloat z, + GLfloat w); +typedef void(GLAD_API_PTR *PFNGLPROGRAMLOCALPARAMETER4FVARBPROC)(GLenum target, GLuint index, + const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLPROGRAMLOCALPARAMETERI4INVPROC)(GLenum target, GLuint index, + GLint x, GLint y, GLint z, GLint w); +typedef void(GLAD_API_PTR *PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC)(GLenum target, GLuint index, + const GLint *params); +typedef void(GLAD_API_PTR *PFNGLPROGRAMLOCALPARAMETERI4UINVPROC)(GLenum target, GLuint index, + GLuint x, GLuint y, GLuint z, + GLuint w); +typedef void(GLAD_API_PTR *PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC)(GLenum target, GLuint index, + const GLuint *params); +typedef void(GLAD_API_PTR *PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC)(GLenum target, GLuint index, + GLsizei count, + const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC)(GLenum target, GLuint index, + GLsizei count, + const GLint *params); +typedef void(GLAD_API_PTR *PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC)(GLenum target, GLuint index, + GLsizei count, + const GLuint *params); +typedef void(GLAD_API_PTR *PFNGLPROGRAMNAMEDPARAMETER4DNVPROC)(GLuint id, GLsizei len, + const GLubyte *name, GLdouble x, + GLdouble y, GLdouble z, GLdouble w); +typedef void(GLAD_API_PTR *PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC)(GLuint id, GLsizei len, + const GLubyte *name, + const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLPROGRAMNAMEDPARAMETER4FNVPROC)(GLuint id, GLsizei len, + const GLubyte *name, GLfloat x, + GLfloat y, GLfloat z, GLfloat w); +typedef void(GLAD_API_PTR *PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC)(GLuint id, GLsizei len, + const GLubyte *name, + const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLPROGRAMPARAMETER4DNVPROC)(GLenum target, GLuint index, GLdouble x, + GLdouble y, GLdouble z, GLdouble w); +typedef void(GLAD_API_PTR *PFNGLPROGRAMPARAMETER4DVNVPROC)(GLenum target, GLuint index, + const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLPROGRAMPARAMETER4FNVPROC)(GLenum target, GLuint index, GLfloat x, + GLfloat y, GLfloat z, GLfloat w); +typedef void(GLAD_API_PTR *PFNGLPROGRAMPARAMETER4FVNVPROC)(GLenum target, GLuint index, + const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLPROGRAMPARAMETERIPROC)(GLuint program, GLenum pname, GLint value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMPARAMETERIARBPROC)(GLuint program, GLenum pname, + GLint value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMPARAMETERIEXTPROC)(GLuint program, GLenum pname, + GLint value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMPARAMETERS4DVNVPROC)(GLenum target, GLuint index, + GLsizei count, const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLPROGRAMPARAMETERS4FVNVPROC)(GLenum target, GLuint index, + GLsizei count, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLPROGRAMPATHFRAGMENTINPUTGENNVPROC)(GLuint program, GLint location, + GLenum genMode, GLint components, + const GLfloat *coeffs); +typedef void(GLAD_API_PTR *PFNGLPROGRAMSTRINGARBPROC)(GLenum target, GLenum format, GLsizei len, + const void *string); +typedef void(GLAD_API_PTR *PFNGLPROGRAMSUBROUTINEPARAMETERSUIVNVPROC)(GLenum target, GLsizei count, + const GLuint *params); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1DPROC)(GLuint program, GLint location, GLdouble v0); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1DEXTPROC)(GLuint program, GLint location, + GLdouble x); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1DVPROC)(GLuint program, GLint location, + GLsizei count, const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1DVEXTPROC)(GLuint program, GLint location, + GLsizei count, const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1FPROC)(GLuint program, GLint location, GLfloat v0); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1FEXTPROC)(GLuint program, GLint location, + GLfloat v0); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1FVPROC)(GLuint program, GLint location, + GLsizei count, const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1FVEXTPROC)(GLuint program, GLint location, + GLsizei count, const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1IPROC)(GLuint program, GLint location, GLint v0); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1I64ARBPROC)(GLuint program, GLint location, + GLint64 x); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1I64NVPROC)(GLuint program, GLint location, + GLint64EXT x); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1I64VARBPROC)(GLuint program, GLint location, + GLsizei count, const GLint64 *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1I64VNVPROC)(GLuint program, GLint location, + GLsizei count, const GLint64EXT *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1IEXTPROC)(GLuint program, GLint location, GLint v0); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1IVPROC)(GLuint program, GLint location, + GLsizei count, const GLint *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1IVEXTPROC)(GLuint program, GLint location, + GLsizei count, const GLint *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1UIPROC)(GLuint program, GLint location, GLuint v0); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1UI64ARBPROC)(GLuint program, GLint location, + GLuint64 x); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1UI64NVPROC)(GLuint program, GLint location, + GLuint64EXT x); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1UI64VARBPROC)(GLuint program, GLint location, + GLsizei count, const GLuint64 *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1UI64VNVPROC)(GLuint program, GLint location, + GLsizei count, + const GLuint64EXT *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1UIEXTPROC)(GLuint program, GLint location, + GLuint v0); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1UIVPROC)(GLuint program, GLint location, + GLsizei count, const GLuint *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM1UIVEXTPROC)(GLuint program, GLint location, + GLsizei count, const GLuint *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2DPROC)(GLuint program, GLint location, GLdouble v0, + GLdouble v1); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2DEXTPROC)(GLuint program, GLint location, GLdouble x, + GLdouble y); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2DVPROC)(GLuint program, GLint location, + GLsizei count, const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2DVEXTPROC)(GLuint program, GLint location, + GLsizei count, const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2FPROC)(GLuint program, GLint location, GLfloat v0, + GLfloat v1); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2FEXTPROC)(GLuint program, GLint location, GLfloat v0, + GLfloat v1); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2FVPROC)(GLuint program, GLint location, + GLsizei count, const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2FVEXTPROC)(GLuint program, GLint location, + GLsizei count, const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2IPROC)(GLuint program, GLint location, GLint v0, + GLint v1); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2I64ARBPROC)(GLuint program, GLint location, + GLint64 x, GLint64 y); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2I64NVPROC)(GLuint program, GLint location, + GLint64EXT x, GLint64EXT y); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2I64VARBPROC)(GLuint program, GLint location, + GLsizei count, const GLint64 *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2I64VNVPROC)(GLuint program, GLint location, + GLsizei count, const GLint64EXT *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2IEXTPROC)(GLuint program, GLint location, GLint v0, + GLint v1); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2IVPROC)(GLuint program, GLint location, + GLsizei count, const GLint *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2IVEXTPROC)(GLuint program, GLint location, + GLsizei count, const GLint *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2UIPROC)(GLuint program, GLint location, GLuint v0, + GLuint v1); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2UI64ARBPROC)(GLuint program, GLint location, + GLuint64 x, GLuint64 y); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2UI64NVPROC)(GLuint program, GLint location, + GLuint64EXT x, GLuint64EXT y); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2UI64VARBPROC)(GLuint program, GLint location, + GLsizei count, const GLuint64 *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2UI64VNVPROC)(GLuint program, GLint location, + GLsizei count, + const GLuint64EXT *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2UIEXTPROC)(GLuint program, GLint location, GLuint v0, + GLuint v1); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2UIVPROC)(GLuint program, GLint location, + GLsizei count, const GLuint *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM2UIVEXTPROC)(GLuint program, GLint location, + GLsizei count, const GLuint *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3DPROC)(GLuint program, GLint location, GLdouble v0, + GLdouble v1, GLdouble v2); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3DEXTPROC)(GLuint program, GLint location, GLdouble x, + GLdouble y, GLdouble z); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3DVPROC)(GLuint program, GLint location, + GLsizei count, const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3DVEXTPROC)(GLuint program, GLint location, + GLsizei count, const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3FPROC)(GLuint program, GLint location, GLfloat v0, + GLfloat v1, GLfloat v2); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3FEXTPROC)(GLuint program, GLint location, GLfloat v0, + GLfloat v1, GLfloat v2); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3FVPROC)(GLuint program, GLint location, + GLsizei count, const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3FVEXTPROC)(GLuint program, GLint location, + GLsizei count, const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3IPROC)(GLuint program, GLint location, GLint v0, + GLint v1, GLint v2); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3I64ARBPROC)(GLuint program, GLint location, + GLint64 x, GLint64 y, GLint64 z); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3I64NVPROC)(GLuint program, GLint location, + GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3I64VARBPROC)(GLuint program, GLint location, + GLsizei count, const GLint64 *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3I64VNVPROC)(GLuint program, GLint location, + GLsizei count, const GLint64EXT *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3IEXTPROC)(GLuint program, GLint location, GLint v0, + GLint v1, GLint v2); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3IVPROC)(GLuint program, GLint location, + GLsizei count, const GLint *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3IVEXTPROC)(GLuint program, GLint location, + GLsizei count, const GLint *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3UIPROC)(GLuint program, GLint location, GLuint v0, + GLuint v1, GLuint v2); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3UI64ARBPROC)(GLuint program, GLint location, + GLuint64 x, GLuint64 y, GLuint64 z); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3UI64NVPROC)(GLuint program, GLint location, + GLuint64EXT x, GLuint64EXT y, + GLuint64EXT z); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3UI64VARBPROC)(GLuint program, GLint location, + GLsizei count, const GLuint64 *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3UI64VNVPROC)(GLuint program, GLint location, + GLsizei count, + const GLuint64EXT *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3UIEXTPROC)(GLuint program, GLint location, GLuint v0, + GLuint v1, GLuint v2); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3UIVPROC)(GLuint program, GLint location, + GLsizei count, const GLuint *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM3UIVEXTPROC)(GLuint program, GLint location, + GLsizei count, const GLuint *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4DPROC)(GLuint program, GLint location, GLdouble v0, + GLdouble v1, GLdouble v2, GLdouble v3); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4DEXTPROC)(GLuint program, GLint location, GLdouble x, + GLdouble y, GLdouble z, GLdouble w); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4DVPROC)(GLuint program, GLint location, + GLsizei count, const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4DVEXTPROC)(GLuint program, GLint location, + GLsizei count, const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4FPROC)(GLuint program, GLint location, GLfloat v0, + GLfloat v1, GLfloat v2, GLfloat v3); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4FEXTPROC)(GLuint program, GLint location, GLfloat v0, + GLfloat v1, GLfloat v2, GLfloat v3); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4FVPROC)(GLuint program, GLint location, + GLsizei count, const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4FVEXTPROC)(GLuint program, GLint location, + GLsizei count, const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4IPROC)(GLuint program, GLint location, GLint v0, + GLint v1, GLint v2, GLint v3); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4I64ARBPROC)(GLuint program, GLint location, + GLint64 x, GLint64 y, GLint64 z, + GLint64 w); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4I64NVPROC)(GLuint program, GLint location, + GLint64EXT x, GLint64EXT y, GLint64EXT z, + GLint64EXT w); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4I64VARBPROC)(GLuint program, GLint location, + GLsizei count, const GLint64 *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4I64VNVPROC)(GLuint program, GLint location, + GLsizei count, const GLint64EXT *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4IEXTPROC)(GLuint program, GLint location, GLint v0, + GLint v1, GLint v2, GLint v3); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4IVPROC)(GLuint program, GLint location, + GLsizei count, const GLint *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4IVEXTPROC)(GLuint program, GLint location, + GLsizei count, const GLint *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4UIPROC)(GLuint program, GLint location, GLuint v0, + GLuint v1, GLuint v2, GLuint v3); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4UI64ARBPROC)(GLuint program, GLint location, + GLuint64 x, GLuint64 y, GLuint64 z, + GLuint64 w); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4UI64NVPROC)(GLuint program, GLint location, + GLuint64EXT x, GLuint64EXT y, + GLuint64EXT z, GLuint64EXT w); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4UI64VARBPROC)(GLuint program, GLint location, + GLsizei count, const GLuint64 *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4UI64VNVPROC)(GLuint program, GLint location, + GLsizei count, + const GLuint64EXT *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4UIEXTPROC)(GLuint program, GLint location, GLuint v0, + GLuint v1, GLuint v2, GLuint v3); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4UIVPROC)(GLuint program, GLint location, + GLsizei count, const GLuint *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORM4UIVEXTPROC)(GLuint program, GLint location, + GLsizei count, const GLuint *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMHANDLEUI64ARBPROC)(GLuint program, GLint location, + GLuint64 value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC)(GLuint program, GLint location, + GLuint64 value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMHANDLEUI64VARBPROC)(GLuint program, GLint location, + GLsizei count, + const GLuint64 *values); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC)(GLuint program, GLint location, + GLsizei count, + const GLuint64 *values); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2DVPROC)(GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC)(GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2FVPROC)(GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC)(GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC)(GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC)(GLuint program, GLint location, + GLsizei count, + GLboolean transpose, + const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC)(GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC)(GLuint program, GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC)(GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC)(GLuint program, GLint location, + GLsizei count, + GLboolean transpose, + const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC)(GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC)(GLuint program, GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3DVPROC)(GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC)(GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3FVPROC)(GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC)(GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC)(GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC)(GLuint program, GLint location, + GLsizei count, + GLboolean transpose, + const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC)(GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC)(GLuint program, GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC)(GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC)(GLuint program, GLint location, + GLsizei count, + GLboolean transpose, + const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC)(GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC)(GLuint program, GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4DVPROC)(GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC)(GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4FVPROC)(GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC)(GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC)(GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC)(GLuint program, GLint location, + GLsizei count, + GLboolean transpose, + const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC)(GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC)(GLuint program, GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC)(GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC)(GLuint program, GLint location, + GLsizei count, + GLboolean transpose, + const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC)(GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC)(GLuint program, GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMUI64NVPROC)(GLuint program, GLint location, + GLuint64EXT value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMUNIFORMUI64VNVPROC)(GLuint program, GLint location, + GLsizei count, const GLuint64EXT *value); +typedef void(GLAD_API_PTR *PFNGLPROGRAMVERTEXLIMITNVPROC)(GLenum target, GLint limit); +typedef void(GLAD_API_PTR *PFNGLPROVOKINGVERTEXPROC)(GLenum mode); +typedef void(GLAD_API_PTR *PFNGLPROVOKINGVERTEXEXTPROC)(GLenum mode); +typedef void(GLAD_API_PTR *PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC)(GLbitfield mask); +typedef void(GLAD_API_PTR *PFNGLPUSHDEBUGGROUPPROC)(GLenum source, GLuint id, GLsizei length, + const GLchar *message); +typedef void(GLAD_API_PTR *PFNGLPUSHGROUPMARKEREXTPROC)(GLsizei length, const GLchar *marker); +typedef void(GLAD_API_PTR *PFNGLQUERYCOUNTERPROC)(GLuint id, GLenum target); +typedef GLbitfield(GLAD_API_PTR *PFNGLQUERYMATRIXXOESPROC)(GLfixed *mantissa, GLint *exponent); +typedef void(GLAD_API_PTR *PFNGLQUERYOBJECTPARAMETERUIAMDPROC)(GLenum target, GLuint id, + GLenum pname, GLuint param); +typedef GLint(GLAD_API_PTR *PFNGLQUERYRESOURCENVPROC)(GLenum queryType, GLint tagId, GLuint count, + GLint *buffer); +typedef void(GLAD_API_PTR *PFNGLQUERYRESOURCETAGNVPROC)(GLint tagId, const GLchar *tagString); +typedef void(GLAD_API_PTR *PFNGLRASTERPOS2XOESPROC)(GLfixed x, GLfixed y); +typedef void(GLAD_API_PTR *PFNGLRASTERPOS2XVOESPROC)(const GLfixed *coords); +typedef void(GLAD_API_PTR *PFNGLRASTERPOS3XOESPROC)(GLfixed x, GLfixed y, GLfixed z); +typedef void(GLAD_API_PTR *PFNGLRASTERPOS3XVOESPROC)(const GLfixed *coords); +typedef void(GLAD_API_PTR *PFNGLRASTERPOS4XOESPROC)(GLfixed x, GLfixed y, GLfixed z, GLfixed w); +typedef void(GLAD_API_PTR *PFNGLRASTERPOS4XVOESPROC)(const GLfixed *coords); +typedef void(GLAD_API_PTR *PFNGLRASTERSAMPLESEXTPROC)(GLuint samples, + GLboolean fixedsamplelocations); +typedef void(GLAD_API_PTR *PFNGLREADBUFFERPROC)(GLenum src); +typedef void(GLAD_API_PTR *PFNGLREADINSTRUMENTSSGIXPROC)(GLint marker); +typedef void(GLAD_API_PTR *PFNGLREADPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, void *pixels); +typedef void(GLAD_API_PTR *PFNGLREADNPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, GLsizei bufSize, + void *data); +typedef void(GLAD_API_PTR *PFNGLREADNPIXELSARBPROC)(GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, GLsizei bufSize, + void *data); +typedef void(GLAD_API_PTR *PFNGLRECTXOESPROC)(GLfixed x1, GLfixed y1, GLfixed x2, GLfixed y2); +typedef void(GLAD_API_PTR *PFNGLRECTXVOESPROC)(const GLfixed *v1, const GLfixed *v2); +typedef void(GLAD_API_PTR *PFNGLREFERENCEPLANESGIXPROC)(const GLdouble *equation); +typedef GLboolean(GLAD_API_PTR *PFNGLRELEASEKEYEDMUTEXWIN32EXTPROC)(GLuint memory, GLuint64 key); +typedef void(GLAD_API_PTR *PFNGLRELEASESHADERCOMPILERPROC)(void); +typedef void(GLAD_API_PTR *PFNGLRENDERGPUMASKNVPROC)(GLbitfield mask); +typedef void(GLAD_API_PTR *PFNGLRENDERBUFFERSTORAGEPROC)(GLenum target, GLenum internalformat, + GLsizei width, GLsizei height); +typedef void(GLAD_API_PTR *PFNGLRENDERBUFFERSTORAGEEXTPROC)(GLenum target, GLenum internalformat, + GLsizei width, GLsizei height); +typedef void(GLAD_API_PTR *PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC)(GLenum target, GLsizei samples, + GLenum internalformat, + GLsizei width, GLsizei height); +typedef void(GLAD_API_PTR *PFNGLRENDERBUFFERSTORAGEMULTISAMPLEADVANCEDAMDPROC)( + GLenum target, GLsizei samples, GLsizei storageSamples, GLenum internalformat, + GLsizei width, GLsizei height); +typedef void(GLAD_API_PTR *PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC)( + GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, + GLsizei width, GLsizei height); +typedef void(GLAD_API_PTR *PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC)( + GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEPOINTERSUNPROC)(GLenum type, GLsizei stride, + const void **pointer); +typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUBSUNPROC)(GLubyte code); +typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUBVSUNPROC)(const GLubyte *code); +typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC)(GLuint rc, GLfloat r, + GLfloat g, GLfloat b, + GLfloat x, GLfloat y, + GLfloat z); +typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC)(const GLuint *rc, + const GLfloat *c, + const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC)( + GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, + GLfloat x, GLfloat y, GLfloat z); +typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC)(const GLuint *rc, + const GLfloat *c, + const GLfloat *n, + const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC)(GLuint rc, GLubyte r, + GLubyte g, GLubyte b, + GLubyte a, GLfloat x, + GLfloat y, GLfloat z); +typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC)(const GLuint *rc, + const GLubyte *c, + const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC)(GLuint rc, GLfloat nx, + GLfloat ny, GLfloat nz, + GLfloat x, GLfloat y, + GLfloat z); +typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC)(const GLuint *rc, + const GLfloat *n, + const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUISUNPROC)(GLuint code); +typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC)( + GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, + GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC)( + const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC)( + GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, + GLfloat z); +typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC)( + const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC)(GLuint rc, GLfloat s, + GLfloat t, GLfloat x, + GLfloat y, GLfloat z); +typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC)(const GLuint *rc, + const GLfloat *tc, + const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC)(GLuint rc, GLfloat x, GLfloat y, + GLfloat z); +typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC)(const GLuint *rc, + const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUIVSUNPROC)(const GLuint *code); +typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUSSUNPROC)(GLushort code); +typedef void(GLAD_API_PTR *PFNGLREPLACEMENTCODEUSVSUNPROC)(const GLushort *code); +typedef void(GLAD_API_PTR *PFNGLREQUESTRESIDENTPROGRAMSNVPROC)(GLsizei n, const GLuint *programs); +typedef void(GLAD_API_PTR *PFNGLRESETHISTOGRAMEXTPROC)(GLenum target); +typedef void(GLAD_API_PTR *PFNGLRESETMEMORYOBJECTPARAMETERNVPROC)(GLuint memory, GLenum pname); +typedef void(GLAD_API_PTR *PFNGLRESETMINMAXEXTPROC)(GLenum target); +typedef void(GLAD_API_PTR *PFNGLRESIZEBUFFERSMESAPROC)(void); +typedef void(GLAD_API_PTR *PFNGLRESOLVEDEPTHVALUESNVPROC)(void); +typedef void(GLAD_API_PTR *PFNGLRESUMETRANSFORMFEEDBACKPROC)(void); +typedef void(GLAD_API_PTR *PFNGLRESUMETRANSFORMFEEDBACKNVPROC)(void); +typedef void(GLAD_API_PTR *PFNGLROTATEXOESPROC)(GLfixed angle, GLfixed x, GLfixed y, GLfixed z); +typedef void(GLAD_API_PTR *PFNGLSAMPLECOVERAGEPROC)(GLfloat value, GLboolean invert); +typedef void(GLAD_API_PTR *PFNGLSAMPLECOVERAGEARBPROC)(GLfloat value, GLboolean invert); +typedef void(GLAD_API_PTR *PFNGLSAMPLEMAPATIPROC)(GLuint dst, GLuint interp, GLenum swizzle); +typedef void(GLAD_API_PTR *PFNGLSAMPLEMASKEXTPROC)(GLclampf value, GLboolean invert); +typedef void(GLAD_API_PTR *PFNGLSAMPLEMASKINDEXEDNVPROC)(GLuint index, GLbitfield mask); +typedef void(GLAD_API_PTR *PFNGLSAMPLEMASKSGISPROC)(GLclampf value, GLboolean invert); +typedef void(GLAD_API_PTR *PFNGLSAMPLEMASKIPROC)(GLuint maskNumber, GLbitfield mask); +typedef void(GLAD_API_PTR *PFNGLSAMPLEPATTERNEXTPROC)(GLenum pattern); +typedef void(GLAD_API_PTR *PFNGLSAMPLEPATTERNSGISPROC)(GLenum pattern); +typedef void(GLAD_API_PTR *PFNGLSAMPLERPARAMETERIIVPROC)(GLuint sampler, GLenum pname, + const GLint *param); +typedef void(GLAD_API_PTR *PFNGLSAMPLERPARAMETERIUIVPROC)(GLuint sampler, GLenum pname, + const GLuint *param); +typedef void(GLAD_API_PTR *PFNGLSAMPLERPARAMETERFPROC)(GLuint sampler, GLenum pname, GLfloat param); +typedef void(GLAD_API_PTR *PFNGLSAMPLERPARAMETERFVPROC)(GLuint sampler, GLenum pname, + const GLfloat *param); +typedef void(GLAD_API_PTR *PFNGLSAMPLERPARAMETERIPROC)(GLuint sampler, GLenum pname, GLint param); +typedef void(GLAD_API_PTR *PFNGLSAMPLERPARAMETERIVPROC)(GLuint sampler, GLenum pname, + const GLint *param); +typedef void(GLAD_API_PTR *PFNGLSCALEXOESPROC)(GLfixed x, GLfixed y, GLfixed z); +typedef void(GLAD_API_PTR *PFNGLSCISSORPROC)(GLint x, GLint y, GLsizei width, GLsizei height); +typedef void(GLAD_API_PTR *PFNGLSCISSORARRAYVPROC)(GLuint first, GLsizei count, const GLint *v); +typedef void(GLAD_API_PTR *PFNGLSCISSOREXCLUSIVEARRAYVNVPROC)(GLuint first, GLsizei count, + const GLint *v); +typedef void(GLAD_API_PTR *PFNGLSCISSOREXCLUSIVENVPROC)(GLint x, GLint y, GLsizei width, + GLsizei height); +typedef void(GLAD_API_PTR *PFNGLSCISSORINDEXEDPROC)(GLuint index, GLint left, GLint bottom, + GLsizei width, GLsizei height); +typedef void(GLAD_API_PTR *PFNGLSCISSORINDEXEDVPROC)(GLuint index, const GLint *v); +typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3BEXTPROC)(GLbyte red, GLbyte green, GLbyte blue); +typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3BVEXTPROC)(const GLbyte *v); +typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3DEXTPROC)(GLdouble red, GLdouble green, + GLdouble blue); +typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3DVEXTPROC)(const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3FEXTPROC)(GLfloat red, GLfloat green, GLfloat blue); +typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3FVEXTPROC)(const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3HNVPROC)(GLhalfNV red, GLhalfNV green, + GLhalfNV blue); +typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3HVNVPROC)(const GLhalfNV *v); +typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3IEXTPROC)(GLint red, GLint green, GLint blue); +typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3IVEXTPROC)(const GLint *v); +typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3SEXTPROC)(GLshort red, GLshort green, GLshort blue); +typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3SVEXTPROC)(const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3UBEXTPROC)(GLubyte red, GLubyte green, GLubyte blue); +typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3UBVEXTPROC)(const GLubyte *v); +typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3UIEXTPROC)(GLuint red, GLuint green, GLuint blue); +typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3UIVEXTPROC)(const GLuint *v); +typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3USEXTPROC)(GLushort red, GLushort green, + GLushort blue); +typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLOR3USVEXTPROC)(const GLushort *v); +typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLORFORMATNVPROC)(GLint size, GLenum type, + GLsizei stride); +typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLORPOINTEREXTPROC)(GLint size, GLenum type, + GLsizei stride, const void *pointer); +typedef void(GLAD_API_PTR *PFNGLSECONDARYCOLORPOINTERLISTIBMPROC)(GLint size, GLenum type, + GLint stride, + const void **pointer, + GLint ptrstride); +typedef void(GLAD_API_PTR *PFNGLSELECTPERFMONITORCOUNTERSAMDPROC)(GLuint monitor, GLboolean enable, + GLuint group, GLint numCounters, + GLuint *counterList); +typedef void(GLAD_API_PTR *PFNGLSEMAPHOREPARAMETERIVNVPROC)(GLuint semaphore, GLenum pname, + const GLint *params); +typedef void(GLAD_API_PTR *PFNGLSEMAPHOREPARAMETERUI64VEXTPROC)(GLuint semaphore, GLenum pname, + const GLuint64 *params); +typedef void(GLAD_API_PTR *PFNGLSEPARABLEFILTER2DEXTPROC)(GLenum target, GLenum internalformat, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + const void *row, const void *column); +typedef void(GLAD_API_PTR *PFNGLSETFENCEAPPLEPROC)(GLuint fence); +typedef void(GLAD_API_PTR *PFNGLSETFENCENVPROC)(GLuint fence, GLenum condition); +typedef void(GLAD_API_PTR *PFNGLSETFRAGMENTSHADERCONSTANTATIPROC)(GLuint dst, const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLSETINVARIANTEXTPROC)(GLuint id, GLenum type, const void *addr); +typedef void(GLAD_API_PTR *PFNGLSETLOCALCONSTANTEXTPROC)(GLuint id, GLenum type, const void *addr); +typedef void(GLAD_API_PTR *PFNGLSETMULTISAMPLEFVAMDPROC)(GLenum pname, GLuint index, + const GLfloat *val); +typedef void(GLAD_API_PTR *PFNGLSHADERBINARYPROC)(GLsizei count, const GLuint *shaders, + GLenum binaryFormat, const void *binary, + GLsizei length); +typedef void(GLAD_API_PTR *PFNGLSHADEROP1EXTPROC)(GLenum op, GLuint res, GLuint arg1); +typedef void(GLAD_API_PTR *PFNGLSHADEROP2EXTPROC)(GLenum op, GLuint res, GLuint arg1, GLuint arg2); +typedef void(GLAD_API_PTR *PFNGLSHADEROP3EXTPROC)(GLenum op, GLuint res, GLuint arg1, GLuint arg2, + GLuint arg3); +typedef void(GLAD_API_PTR *PFNGLSHADERSOURCEPROC)(GLuint shader, GLsizei count, + const GLchar *const *string, const GLint *length); +typedef void(GLAD_API_PTR *PFNGLSHADERSOURCEARBPROC)(GLhandleARB shaderObj, GLsizei count, + const GLcharARB **string, const GLint *length); +typedef void(GLAD_API_PTR *PFNGLSHADERSTORAGEBLOCKBINDINGPROC)(GLuint program, + GLuint storageBlockIndex, + GLuint storageBlockBinding); +typedef void(GLAD_API_PTR *PFNGLSHADINGRATEIMAGEBARRIERNVPROC)(GLboolean synchronize); +typedef void(GLAD_API_PTR *PFNGLSHADINGRATEIMAGEPALETTENVPROC)(GLuint viewport, GLuint first, + GLsizei count, const GLenum *rates); +typedef void(GLAD_API_PTR *PFNGLSHADINGRATESAMPLEORDERCUSTOMNVPROC)(GLenum rate, GLuint samples, + const GLint *locations); +typedef void(GLAD_API_PTR *PFNGLSHADINGRATESAMPLEORDERNVPROC)(GLenum order); +typedef void(GLAD_API_PTR *PFNGLSHARPENTEXFUNCSGISPROC)(GLenum target, GLsizei n, + const GLfloat *points); +typedef void(GLAD_API_PTR *PFNGLSIGNALSEMAPHOREEXTPROC)(GLuint semaphore, GLuint numBufferBarriers, + const GLuint *buffers, + GLuint numTextureBarriers, + const GLuint *textures, + const GLenum *dstLayouts); +typedef void(GLAD_API_PTR *PFNGLSIGNALSEMAPHOREUI64NVXPROC)(GLuint signalGpu, + GLsizei fenceObjectCount, + const GLuint *semaphoreArray, + const GLuint64 *fenceValueArray); +typedef void(GLAD_API_PTR *PFNGLSIGNALVKFENCENVPROC)(GLuint64 vkFence); +typedef void(GLAD_API_PTR *PFNGLSIGNALVKSEMAPHORENVPROC)(GLuint64 vkSemaphore); +typedef void(GLAD_API_PTR *PFNGLSPECIALIZESHADERPROC)(GLuint shader, const GLchar *pEntryPoint, + GLuint numSpecializationConstants, + const GLuint *pConstantIndex, + const GLuint *pConstantValue); +typedef void(GLAD_API_PTR *PFNGLSPECIALIZESHADERARBPROC)(GLuint shader, const GLchar *pEntryPoint, + GLuint numSpecializationConstants, + const GLuint *pConstantIndex, + const GLuint *pConstantValue); +typedef void(GLAD_API_PTR *PFNGLSPRITEPARAMETERFSGIXPROC)(GLenum pname, GLfloat param); +typedef void(GLAD_API_PTR *PFNGLSPRITEPARAMETERFVSGIXPROC)(GLenum pname, const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLSPRITEPARAMETERISGIXPROC)(GLenum pname, GLint param); +typedef void(GLAD_API_PTR *PFNGLSPRITEPARAMETERIVSGIXPROC)(GLenum pname, const GLint *params); +typedef void(GLAD_API_PTR *PFNGLSTARTINSTRUMENTSSGIXPROC)(void); +typedef void(GLAD_API_PTR *PFNGLSTATECAPTURENVPROC)(GLuint state, GLenum mode); +typedef void(GLAD_API_PTR *PFNGLSTENCILCLEARTAGEXTPROC)(GLsizei stencilTagBits, + GLuint stencilClearTag); +typedef void(GLAD_API_PTR *PFNGLSTENCILFILLPATHINSTANCEDNVPROC)( + GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, + GLuint mask, GLenum transformType, const GLfloat *transformValues); +typedef void(GLAD_API_PTR *PFNGLSTENCILFILLPATHNVPROC)(GLuint path, GLenum fillMode, GLuint mask); +typedef void(GLAD_API_PTR *PFNGLSTENCILFUNCPROC)(GLenum func, GLint ref, GLuint mask); +typedef void(GLAD_API_PTR *PFNGLSTENCILFUNCSEPARATEPROC)(GLenum face, GLenum func, GLint ref, + GLuint mask); +typedef void(GLAD_API_PTR *PFNGLSTENCILFUNCSEPARATEATIPROC)(GLenum frontfunc, GLenum backfunc, + GLint ref, GLuint mask); +typedef void(GLAD_API_PTR *PFNGLSTENCILMASKPROC)(GLuint mask); +typedef void(GLAD_API_PTR *PFNGLSTENCILMASKSEPARATEPROC)(GLenum face, GLuint mask); +typedef void(GLAD_API_PTR *PFNGLSTENCILOPPROC)(GLenum fail, GLenum zfail, GLenum zpass); +typedef void(GLAD_API_PTR *PFNGLSTENCILOPSEPARATEPROC)(GLenum face, GLenum sfail, GLenum dpfail, + GLenum dppass); +typedef void(GLAD_API_PTR *PFNGLSTENCILOPSEPARATEATIPROC)(GLenum face, GLenum sfail, GLenum dpfail, + GLenum dppass); +typedef void(GLAD_API_PTR *PFNGLSTENCILOPVALUEAMDPROC)(GLenum face, GLuint value); +typedef void(GLAD_API_PTR *PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC)( + GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, + GLuint mask, GLenum transformType, const GLfloat *transformValues); +typedef void(GLAD_API_PTR *PFNGLSTENCILSTROKEPATHNVPROC)(GLuint path, GLint reference, GLuint mask); +typedef void(GLAD_API_PTR *PFNGLSTENCILTHENCOVERFILLPATHINSTANCEDNVPROC)( + GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, + GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +typedef void(GLAD_API_PTR *PFNGLSTENCILTHENCOVERFILLPATHNVPROC)(GLuint path, GLenum fillMode, + GLuint mask, GLenum coverMode); +typedef void(GLAD_API_PTR *PFNGLSTENCILTHENCOVERSTROKEPATHINSTANCEDNVPROC)( + GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, + GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +typedef void(GLAD_API_PTR *PFNGLSTENCILTHENCOVERSTROKEPATHNVPROC)(GLuint path, GLint reference, + GLuint mask, GLenum coverMode); +typedef void(GLAD_API_PTR *PFNGLSTOPINSTRUMENTSSGIXPROC)(GLint marker); +typedef void(GLAD_API_PTR *PFNGLSTRINGMARKERGREMEDYPROC)(GLsizei len, const void *string); +typedef void(GLAD_API_PTR *PFNGLSUBPIXELPRECISIONBIASNVPROC)(GLuint xbits, GLuint ybits); +typedef void(GLAD_API_PTR *PFNGLSWIZZLEEXTPROC)(GLuint res, GLuint in, GLenum outX, GLenum outY, + GLenum outZ, GLenum outW); +typedef void(GLAD_API_PTR *PFNGLSYNCTEXTUREINTELPROC)(GLuint texture); +typedef void(GLAD_API_PTR *PFNGLTAGSAMPLEBUFFERSGIXPROC)(void); +typedef void(GLAD_API_PTR *PFNGLTANGENT3BEXTPROC)(GLbyte tx, GLbyte ty, GLbyte tz); +typedef void(GLAD_API_PTR *PFNGLTANGENT3BVEXTPROC)(const GLbyte *v); +typedef void(GLAD_API_PTR *PFNGLTANGENT3DEXTPROC)(GLdouble tx, GLdouble ty, GLdouble tz); +typedef void(GLAD_API_PTR *PFNGLTANGENT3DVEXTPROC)(const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLTANGENT3FEXTPROC)(GLfloat tx, GLfloat ty, GLfloat tz); +typedef void(GLAD_API_PTR *PFNGLTANGENT3FVEXTPROC)(const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLTANGENT3IEXTPROC)(GLint tx, GLint ty, GLint tz); +typedef void(GLAD_API_PTR *PFNGLTANGENT3IVEXTPROC)(const GLint *v); +typedef void(GLAD_API_PTR *PFNGLTANGENT3SEXTPROC)(GLshort tx, GLshort ty, GLshort tz); +typedef void(GLAD_API_PTR *PFNGLTANGENT3SVEXTPROC)(const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLTANGENTPOINTEREXTPROC)(GLenum type, GLsizei stride, + const void *pointer); +typedef void(GLAD_API_PTR *PFNGLTBUFFERMASK3DFXPROC)(GLuint mask); +typedef void(GLAD_API_PTR *PFNGLTESSELLATIONFACTORAMDPROC)(GLfloat factor); +typedef void(GLAD_API_PTR *PFNGLTESSELLATIONMODEAMDPROC)(GLenum mode); +typedef GLboolean(GLAD_API_PTR *PFNGLTESTFENCEAPPLEPROC)(GLuint fence); +typedef GLboolean(GLAD_API_PTR *PFNGLTESTFENCENVPROC)(GLuint fence); +typedef GLboolean(GLAD_API_PTR *PFNGLTESTOBJECTAPPLEPROC)(GLenum object, GLuint name); +typedef void(GLAD_API_PTR *PFNGLTEXATTACHMEMORYNVPROC)(GLenum target, GLuint memory, + GLuint64 offset); +typedef void(GLAD_API_PTR *PFNGLTEXBUFFERPROC)(GLenum target, GLenum internalformat, GLuint buffer); +typedef void(GLAD_API_PTR *PFNGLTEXBUFFERARBPROC)(GLenum target, GLenum internalformat, + GLuint buffer); +typedef void(GLAD_API_PTR *PFNGLTEXBUFFEREXTPROC)(GLenum target, GLenum internalformat, + GLuint buffer); +typedef void(GLAD_API_PTR *PFNGLTEXBUFFERRANGEPROC)(GLenum target, GLenum internalformat, + GLuint buffer, GLintptr offset, + GLsizeiptr size); +typedef void(GLAD_API_PTR *PFNGLTEXBUMPPARAMETERFVATIPROC)(GLenum pname, const GLfloat *param); +typedef void(GLAD_API_PTR *PFNGLTEXBUMPPARAMETERIVATIPROC)(GLenum pname, const GLint *param); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD1BOESPROC)(GLbyte s); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD1BVOESPROC)(const GLbyte *coords); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD1HNVPROC)(GLhalfNV s); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD1HVNVPROC)(const GLhalfNV *v); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD1XOESPROC)(GLfixed s); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD1XVOESPROC)(const GLfixed *coords); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD2BOESPROC)(GLbyte s, GLbyte t); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD2BVOESPROC)(const GLbyte *coords); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC)(GLfloat s, GLfloat t, GLfloat r, + GLfloat g, GLfloat b, GLfloat x, + GLfloat y, GLfloat z); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC)(const GLfloat *tc, + const GLfloat *c, + const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC)( + GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, + GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC)(const GLfloat *tc, + const GLfloat *c, + const GLfloat *n, + const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC)(GLfloat s, GLfloat t, GLubyte r, + GLubyte g, GLubyte b, GLubyte a, + GLfloat x, GLfloat y, GLfloat z); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC)(const GLfloat *tc, + const GLubyte *c, + const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC)(GLfloat s, GLfloat t, GLfloat nx, + GLfloat ny, GLfloat nz, + GLfloat x, GLfloat y, GLfloat z); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC)(const GLfloat *tc, + const GLfloat *n, + const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD2FVERTEX3FSUNPROC)(GLfloat s, GLfloat t, GLfloat x, + GLfloat y, GLfloat z); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD2FVERTEX3FVSUNPROC)(const GLfloat *tc, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD2HNVPROC)(GLhalfNV s, GLhalfNV t); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD2HVNVPROC)(const GLhalfNV *v); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD2XOESPROC)(GLfixed s, GLfixed t); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD2XVOESPROC)(const GLfixed *coords); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD3BOESPROC)(GLbyte s, GLbyte t, GLbyte r); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD3BVOESPROC)(const GLbyte *coords); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD3HNVPROC)(GLhalfNV s, GLhalfNV t, GLhalfNV r); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD3HVNVPROC)(const GLhalfNV *v); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD3XOESPROC)(GLfixed s, GLfixed t, GLfixed r); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD3XVOESPROC)(const GLfixed *coords); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD4BOESPROC)(GLbyte s, GLbyte t, GLbyte r, GLbyte q); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD4BVOESPROC)(const GLbyte *coords); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC)( + GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, + GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC)(const GLfloat *tc, + const GLfloat *c, + const GLfloat *n, + const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD4FVERTEX4FSUNPROC)(GLfloat s, GLfloat t, GLfloat p, + GLfloat q, GLfloat x, GLfloat y, + GLfloat z, GLfloat w); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD4FVERTEX4FVSUNPROC)(const GLfloat *tc, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD4HNVPROC)(GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD4HVNVPROC)(const GLhalfNV *v); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD4XOESPROC)(GLfixed s, GLfixed t, GLfixed r, GLfixed q); +typedef void(GLAD_API_PTR *PFNGLTEXCOORD4XVOESPROC)(const GLfixed *coords); +typedef void(GLAD_API_PTR *PFNGLTEXCOORDFORMATNVPROC)(GLint size, GLenum type, GLsizei stride); +typedef void(GLAD_API_PTR *PFNGLTEXCOORDPOINTEREXTPROC)(GLint size, GLenum type, GLsizei stride, + GLsizei count, const void *pointer); +typedef void(GLAD_API_PTR *PFNGLTEXCOORDPOINTERLISTIBMPROC)(GLint size, GLenum type, GLint stride, + const void **pointer, GLint ptrstride); +typedef void(GLAD_API_PTR *PFNGLTEXCOORDPOINTERVINTELPROC)(GLint size, GLenum type, + const void **pointer); +typedef void(GLAD_API_PTR *PFNGLTEXENVXOESPROC)(GLenum target, GLenum pname, GLfixed param); +typedef void(GLAD_API_PTR *PFNGLTEXENVXVOESPROC)(GLenum target, GLenum pname, + const GLfixed *params); +typedef void(GLAD_API_PTR *PFNGLTEXFILTERFUNCSGISPROC)(GLenum target, GLenum filter, GLsizei n, + const GLfloat *weights); +typedef void(GLAD_API_PTR *PFNGLTEXGENXOESPROC)(GLenum coord, GLenum pname, GLfixed param); +typedef void(GLAD_API_PTR *PFNGLTEXGENXVOESPROC)(GLenum coord, GLenum pname, const GLfixed *params); +typedef void(GLAD_API_PTR *PFNGLTEXIMAGE1DPROC)(GLenum target, GLint level, GLint internalformat, + GLsizei width, GLint border, GLenum format, + GLenum type, const void *pixels); +typedef void(GLAD_API_PTR *PFNGLTEXIMAGE2DPROC)(GLenum target, GLint level, GLint internalformat, + GLsizei width, GLsizei height, GLint border, + GLenum format, GLenum type, const void *pixels); +typedef void(GLAD_API_PTR *PFNGLTEXIMAGE2DMULTISAMPLEPROC)(GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height, + GLboolean fixedsamplelocations); +typedef void(GLAD_API_PTR *PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC)( + GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, + GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +typedef void(GLAD_API_PTR *PFNGLTEXIMAGE3DPROC)(GLenum target, GLint level, GLint internalformat, + GLsizei width, GLsizei height, GLsizei depth, + GLint border, GLenum format, GLenum type, + const void *pixels); +typedef void(GLAD_API_PTR *PFNGLTEXIMAGE3DEXTPROC)(GLenum target, GLint level, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, GLint border, + GLenum format, GLenum type, const void *pixels); +typedef void(GLAD_API_PTR *PFNGLTEXIMAGE3DMULTISAMPLEPROC)(GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, + GLboolean fixedsamplelocations); +typedef void(GLAD_API_PTR *PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC)( + GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, + GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +typedef void(GLAD_API_PTR *PFNGLTEXIMAGE4DSGISPROC)(GLenum target, GLint level, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, GLsizei size4d, + GLint border, GLenum format, GLenum type, + const void *pixels); +typedef void(GLAD_API_PTR *PFNGLTEXPAGECOMMITMENTARBPROC)(GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, + GLsizei depth, GLboolean commit); +typedef void(GLAD_API_PTR *PFNGLTEXPAGECOMMITMENTMEMNVPROC)(GLenum target, GLint layer, GLint level, + GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, + GLuint memory, GLuint64 offset, + GLboolean commit); +typedef void(GLAD_API_PTR *PFNGLTEXPARAMETERIIVPROC)(GLenum target, GLenum pname, + const GLint *params); +typedef void(GLAD_API_PTR *PFNGLTEXPARAMETERIIVEXTPROC)(GLenum target, GLenum pname, + const GLint *params); +typedef void(GLAD_API_PTR *PFNGLTEXPARAMETERIUIVPROC)(GLenum target, GLenum pname, + const GLuint *params); +typedef void(GLAD_API_PTR *PFNGLTEXPARAMETERIUIVEXTPROC)(GLenum target, GLenum pname, + const GLuint *params); +typedef void(GLAD_API_PTR *PFNGLTEXPARAMETERFPROC)(GLenum target, GLenum pname, GLfloat param); +typedef void(GLAD_API_PTR *PFNGLTEXPARAMETERFVPROC)(GLenum target, GLenum pname, + const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLTEXPARAMETERIPROC)(GLenum target, GLenum pname, GLint param); +typedef void(GLAD_API_PTR *PFNGLTEXPARAMETERIVPROC)(GLenum target, GLenum pname, + const GLint *params); +typedef void(GLAD_API_PTR *PFNGLTEXPARAMETERXOESPROC)(GLenum target, GLenum pname, GLfixed param); +typedef void(GLAD_API_PTR *PFNGLTEXPARAMETERXVOESPROC)(GLenum target, GLenum pname, + const GLfixed *params); +typedef void(GLAD_API_PTR *PFNGLTEXRENDERBUFFERNVPROC)(GLenum target, GLuint renderbuffer); +typedef void(GLAD_API_PTR *PFNGLTEXSTORAGE1DPROC)(GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width); +typedef void(GLAD_API_PTR *PFNGLTEXSTORAGE1DEXTPROC)(GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width); +typedef void(GLAD_API_PTR *PFNGLTEXSTORAGE2DPROC)(GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, + GLsizei height); +typedef void(GLAD_API_PTR *PFNGLTEXSTORAGE2DEXTPROC)(GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, + GLsizei height); +typedef void(GLAD_API_PTR *PFNGLTEXSTORAGE2DMULTISAMPLEPROC)(GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height, + GLboolean fixedsamplelocations); +typedef void(GLAD_API_PTR *PFNGLTEXSTORAGE3DPROC)(GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth); +typedef void(GLAD_API_PTR *PFNGLTEXSTORAGE3DEXTPROC)(GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth); +typedef void(GLAD_API_PTR *PFNGLTEXSTORAGE3DMULTISAMPLEPROC)(GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, + GLboolean fixedsamplelocations); +typedef void(GLAD_API_PTR *PFNGLTEXSTORAGEMEM1DEXTPROC)(GLenum target, GLsizei levels, + GLenum internalFormat, GLsizei width, + GLuint memory, GLuint64 offset); +typedef void(GLAD_API_PTR *PFNGLTEXSTORAGEMEM2DEXTPROC)(GLenum target, GLsizei levels, + GLenum internalFormat, GLsizei width, + GLsizei height, GLuint memory, + GLuint64 offset); +typedef void(GLAD_API_PTR *PFNGLTEXSTORAGEMEM2DMULTISAMPLEEXTPROC)(GLenum target, GLsizei samples, + GLenum internalFormat, + GLsizei width, GLsizei height, + GLboolean fixedSampleLocations, + GLuint memory, GLuint64 offset); +typedef void(GLAD_API_PTR *PFNGLTEXSTORAGEMEM3DEXTPROC)(GLenum target, GLsizei levels, + GLenum internalFormat, GLsizei width, + GLsizei height, GLsizei depth, + GLuint memory, GLuint64 offset); +typedef void(GLAD_API_PTR *PFNGLTEXSTORAGEMEM3DMULTISAMPLEEXTPROC)( + GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, + GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); +typedef void(GLAD_API_PTR *PFNGLTEXSTORAGESPARSEAMDPROC)(GLenum target, GLenum internalFormat, + GLsizei width, GLsizei height, + GLsizei depth, GLsizei layers, + GLbitfield flags); +typedef void(GLAD_API_PTR *PFNGLTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, + GLsizei width, GLenum format, GLenum type, + const void *pixels); +typedef void(GLAD_API_PTR *PFNGLTEXSUBIMAGE1DEXTPROC)(GLenum target, GLint level, GLint xoffset, + GLsizei width, GLenum format, GLenum type, + const void *pixels); +typedef void(GLAD_API_PTR *PFNGLTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLsizei width, GLsizei height, + GLenum format, GLenum type, const void *pixels); +typedef void(GLAD_API_PTR *PFNGLTEXSUBIMAGE2DEXTPROC)(GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLsizei width, GLsizei height, + GLenum format, GLenum type, + const void *pixels); +typedef void(GLAD_API_PTR *PFNGLTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLenum format, + GLenum type, const void *pixels); +typedef void(GLAD_API_PTR *PFNGLTEXSUBIMAGE3DEXTPROC)(GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLenum format, + GLenum type, const void *pixels); +typedef void(GLAD_API_PTR *PFNGLTEXSUBIMAGE4DSGISPROC)(GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLint woffset, + GLsizei width, GLsizei height, GLsizei depth, + GLsizei size4d, GLenum format, GLenum type, + const void *pixels); +typedef void(GLAD_API_PTR *PFNGLTEXTUREATTACHMEMORYNVPROC)(GLuint texture, GLuint memory, + GLuint64 offset); +typedef void(GLAD_API_PTR *PFNGLTEXTUREBARRIERPROC)(void); +typedef void(GLAD_API_PTR *PFNGLTEXTUREBARRIERNVPROC)(void); +typedef void(GLAD_API_PTR *PFNGLTEXTUREBUFFERPROC)(GLuint texture, GLenum internalformat, + GLuint buffer); +typedef void(GLAD_API_PTR *PFNGLTEXTUREBUFFEREXTPROC)(GLuint texture, GLenum target, + GLenum internalformat, GLuint buffer); +typedef void(GLAD_API_PTR *PFNGLTEXTUREBUFFERRANGEPROC)(GLuint texture, GLenum internalformat, + GLuint buffer, GLintptr offset, + GLsizeiptr size); +typedef void(GLAD_API_PTR *PFNGLTEXTUREBUFFERRANGEEXTPROC)(GLuint texture, GLenum target, + GLenum internalformat, GLuint buffer, + GLintptr offset, GLsizeiptr size); +typedef void(GLAD_API_PTR *PFNGLTEXTURECOLORMASKSGISPROC)(GLboolean red, GLboolean green, + GLboolean blue, GLboolean alpha); +typedef void(GLAD_API_PTR *PFNGLTEXTUREIMAGE1DEXTPROC)(GLuint texture, GLenum target, GLint level, + GLint internalformat, GLsizei width, + GLint border, GLenum format, GLenum type, + const void *pixels); +typedef void(GLAD_API_PTR *PFNGLTEXTUREIMAGE2DEXTPROC)(GLuint texture, GLenum target, GLint level, + GLint internalformat, GLsizei width, + GLsizei height, GLint border, GLenum format, + GLenum type, const void *pixels); +typedef void(GLAD_API_PTR *PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC)( + GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, + GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +typedef void(GLAD_API_PTR *PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC)(GLuint texture, GLenum target, + GLsizei samples, + GLint internalFormat, + GLsizei width, GLsizei height, + GLboolean fixedSampleLocations); +typedef void(GLAD_API_PTR *PFNGLTEXTUREIMAGE3DEXTPROC)(GLuint texture, GLenum target, GLint level, + GLint internalformat, GLsizei width, + GLsizei height, GLsizei depth, GLint border, + GLenum format, GLenum type, + const void *pixels); +typedef void(GLAD_API_PTR *PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC)( + GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, + GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, + GLboolean fixedSampleLocations); +typedef void(GLAD_API_PTR *PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC)( + GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, + GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +typedef void(GLAD_API_PTR *PFNGLTEXTURELIGHTEXTPROC)(GLenum pname); +typedef void(GLAD_API_PTR *PFNGLTEXTUREMATERIALEXTPROC)(GLenum face, GLenum mode); +typedef void(GLAD_API_PTR *PFNGLTEXTURENORMALEXTPROC)(GLenum mode); +typedef void(GLAD_API_PTR *PFNGLTEXTUREPAGECOMMITMENTEXTPROC)(GLuint texture, GLint level, + GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, + GLboolean commit); +typedef void(GLAD_API_PTR *PFNGLTEXTUREPAGECOMMITMENTMEMNVPROC)(GLuint texture, GLint layer, + GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, + GLsizei depth, GLuint memory, + GLuint64 offset, GLboolean commit); +typedef void(GLAD_API_PTR *PFNGLTEXTUREPARAMETERIIVPROC)(GLuint texture, GLenum pname, + const GLint *params); +typedef void(GLAD_API_PTR *PFNGLTEXTUREPARAMETERIIVEXTPROC)(GLuint texture, GLenum target, + GLenum pname, const GLint *params); +typedef void(GLAD_API_PTR *PFNGLTEXTUREPARAMETERIUIVPROC)(GLuint texture, GLenum pname, + const GLuint *params); +typedef void(GLAD_API_PTR *PFNGLTEXTUREPARAMETERIUIVEXTPROC)(GLuint texture, GLenum target, + GLenum pname, const GLuint *params); +typedef void(GLAD_API_PTR *PFNGLTEXTUREPARAMETERFPROC)(GLuint texture, GLenum pname, GLfloat param); +typedef void(GLAD_API_PTR *PFNGLTEXTUREPARAMETERFEXTPROC)(GLuint texture, GLenum target, + GLenum pname, GLfloat param); +typedef void(GLAD_API_PTR *PFNGLTEXTUREPARAMETERFVPROC)(GLuint texture, GLenum pname, + const GLfloat *param); +typedef void(GLAD_API_PTR *PFNGLTEXTUREPARAMETERFVEXTPROC)(GLuint texture, GLenum target, + GLenum pname, const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLTEXTUREPARAMETERIPROC)(GLuint texture, GLenum pname, GLint param); +typedef void(GLAD_API_PTR *PFNGLTEXTUREPARAMETERIEXTPROC)(GLuint texture, GLenum target, + GLenum pname, GLint param); +typedef void(GLAD_API_PTR *PFNGLTEXTUREPARAMETERIVPROC)(GLuint texture, GLenum pname, + const GLint *param); +typedef void(GLAD_API_PTR *PFNGLTEXTUREPARAMETERIVEXTPROC)(GLuint texture, GLenum target, + GLenum pname, const GLint *params); +typedef void(GLAD_API_PTR *PFNGLTEXTURERANGEAPPLEPROC)(GLenum target, GLsizei length, + const void *pointer); +typedef void(GLAD_API_PTR *PFNGLTEXTURERENDERBUFFEREXTPROC)(GLuint texture, GLenum target, + GLuint renderbuffer); +typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGE1DPROC)(GLuint texture, GLsizei levels, + GLenum internalformat, GLsizei width); +typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGE1DEXTPROC)(GLuint texture, GLenum target, + GLsizei levels, GLenum internalformat, + GLsizei width); +typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGE2DPROC)(GLuint texture, GLsizei levels, + GLenum internalformat, GLsizei width, + GLsizei height); +typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGE2DEXTPROC)(GLuint texture, GLenum target, + GLsizei levels, GLenum internalformat, + GLsizei width, GLsizei height); +typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC)(GLuint texture, GLsizei samples, + GLenum internalformat, + GLsizei width, GLsizei height, + GLboolean fixedsamplelocations); +typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC)(GLuint texture, GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, GLsizei height, + GLboolean fixedsamplelocations); +typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGE3DPROC)(GLuint texture, GLsizei levels, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth); +typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGE3DEXTPROC)(GLuint texture, GLenum target, + GLsizei levels, GLenum internalformat, + GLsizei width, GLsizei height, + GLsizei depth); +typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC)(GLuint texture, GLsizei samples, + GLenum internalformat, + GLsizei width, GLsizei height, + GLsizei depth, + GLboolean fixedsamplelocations); +typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC)( + GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGEMEM1DEXTPROC)(GLuint texture, GLsizei levels, + GLenum internalFormat, GLsizei width, + GLuint memory, GLuint64 offset); +typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGEMEM2DEXTPROC)(GLuint texture, GLsizei levels, + GLenum internalFormat, GLsizei width, + GLsizei height, GLuint memory, + GLuint64 offset); +typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGEMEM2DMULTISAMPLEEXTPROC)( + GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, + GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); +typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGEMEM3DEXTPROC)(GLuint texture, GLsizei levels, + GLenum internalFormat, GLsizei width, + GLsizei height, GLsizei depth, + GLuint memory, GLuint64 offset); +typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGEMEM3DMULTISAMPLEEXTPROC)( + GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, + GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); +typedef void(GLAD_API_PTR *PFNGLTEXTURESTORAGESPARSEAMDPROC)(GLuint texture, GLenum target, + GLenum internalFormat, GLsizei width, + GLsizei height, GLsizei depth, + GLsizei layers, GLbitfield flags); +typedef void(GLAD_API_PTR *PFNGLTEXTURESUBIMAGE1DPROC)(GLuint texture, GLint level, GLint xoffset, + GLsizei width, GLenum format, GLenum type, + const void *pixels); +typedef void(GLAD_API_PTR *PFNGLTEXTURESUBIMAGE1DEXTPROC)(GLuint texture, GLenum target, + GLint level, GLint xoffset, GLsizei width, + GLenum format, GLenum type, + const void *pixels); +typedef void(GLAD_API_PTR *PFNGLTEXTURESUBIMAGE2DPROC)(GLuint texture, GLint level, GLint xoffset, + GLint yoffset, GLsizei width, GLsizei height, + GLenum format, GLenum type, + const void *pixels); +typedef void(GLAD_API_PTR *PFNGLTEXTURESUBIMAGE2DEXTPROC)(GLuint texture, GLenum target, + GLint level, GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + const void *pixels); +typedef void(GLAD_API_PTR *PFNGLTEXTURESUBIMAGE3DPROC)(GLuint texture, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLenum format, + GLenum type, const void *pixels); +typedef void(GLAD_API_PTR *PFNGLTEXTURESUBIMAGE3DEXTPROC)(GLuint texture, GLenum target, + GLint level, GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, + GLenum format, GLenum type, + const void *pixels); +typedef void(GLAD_API_PTR *PFNGLTEXTUREVIEWPROC)(GLuint texture, GLenum target, GLuint origtexture, + GLenum internalformat, GLuint minlevel, + GLuint numlevels, GLuint minlayer, + GLuint numlayers); +typedef void(GLAD_API_PTR *PFNGLTRACKMATRIXNVPROC)(GLenum target, GLuint address, GLenum matrix, + GLenum transform); +typedef void(GLAD_API_PTR *PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC)(GLsizei count, const GLint *attribs, + GLenum bufferMode); +typedef void(GLAD_API_PTR *PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC)(GLuint xfb, GLuint index, + GLuint buffer); +typedef void(GLAD_API_PTR *PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC)(GLuint xfb, GLuint index, + GLuint buffer, GLintptr offset, + GLsizeiptr size); +typedef void(GLAD_API_PTR *PFNGLTRANSFORMFEEDBACKSTREAMATTRIBSNVPROC)(GLsizei count, + const GLint *attribs, + GLsizei nbuffers, + const GLint *bufstreams, + GLenum bufferMode); +typedef void(GLAD_API_PTR *PFNGLTRANSFORMFEEDBACKVARYINGSPROC)(GLuint program, GLsizei count, + const GLchar *const *varyings, + GLenum bufferMode); +typedef void(GLAD_API_PTR *PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC)(GLuint program, GLsizei count, + const GLchar *const *varyings, + GLenum bufferMode); +typedef void(GLAD_API_PTR *PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC)(GLuint program, GLsizei count, + const GLint *locations, + GLenum bufferMode); +typedef void(GLAD_API_PTR *PFNGLTRANSFORMPATHNVPROC)(GLuint resultPath, GLuint srcPath, + GLenum transformType, + const GLfloat *transformValues); +typedef void(GLAD_API_PTR *PFNGLTRANSLATEXOESPROC)(GLfixed x, GLfixed y, GLfixed z); +typedef void(GLAD_API_PTR *PFNGLUNIFORM1DPROC)(GLint location, GLdouble x); +typedef void(GLAD_API_PTR *PFNGLUNIFORM1DVPROC)(GLint location, GLsizei count, + const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM1FPROC)(GLint location, GLfloat v0); +typedef void(GLAD_API_PTR *PFNGLUNIFORM1FARBPROC)(GLint location, GLfloat v0); +typedef void(GLAD_API_PTR *PFNGLUNIFORM1FVPROC)(GLint location, GLsizei count, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM1FVARBPROC)(GLint location, GLsizei count, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM1IPROC)(GLint location, GLint v0); +typedef void(GLAD_API_PTR *PFNGLUNIFORM1I64ARBPROC)(GLint location, GLint64 x); +typedef void(GLAD_API_PTR *PFNGLUNIFORM1I64NVPROC)(GLint location, GLint64EXT x); +typedef void(GLAD_API_PTR *PFNGLUNIFORM1I64VARBPROC)(GLint location, GLsizei count, + const GLint64 *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM1I64VNVPROC)(GLint location, GLsizei count, + const GLint64EXT *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM1IARBPROC)(GLint location, GLint v0); +typedef void(GLAD_API_PTR *PFNGLUNIFORM1IVPROC)(GLint location, GLsizei count, const GLint *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM1IVARBPROC)(GLint location, GLsizei count, + const GLint *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM1UIPROC)(GLint location, GLuint v0); +typedef void(GLAD_API_PTR *PFNGLUNIFORM1UI64ARBPROC)(GLint location, GLuint64 x); +typedef void(GLAD_API_PTR *PFNGLUNIFORM1UI64NVPROC)(GLint location, GLuint64EXT x); +typedef void(GLAD_API_PTR *PFNGLUNIFORM1UI64VARBPROC)(GLint location, GLsizei count, + const GLuint64 *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM1UI64VNVPROC)(GLint location, GLsizei count, + const GLuint64EXT *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM1UIEXTPROC)(GLint location, GLuint v0); +typedef void(GLAD_API_PTR *PFNGLUNIFORM1UIVPROC)(GLint location, GLsizei count, + const GLuint *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM1UIVEXTPROC)(GLint location, GLsizei count, + const GLuint *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM2DPROC)(GLint location, GLdouble x, GLdouble y); +typedef void(GLAD_API_PTR *PFNGLUNIFORM2DVPROC)(GLint location, GLsizei count, + const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM2FPROC)(GLint location, GLfloat v0, GLfloat v1); +typedef void(GLAD_API_PTR *PFNGLUNIFORM2FARBPROC)(GLint location, GLfloat v0, GLfloat v1); +typedef void(GLAD_API_PTR *PFNGLUNIFORM2FVPROC)(GLint location, GLsizei count, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM2FVARBPROC)(GLint location, GLsizei count, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM2IPROC)(GLint location, GLint v0, GLint v1); +typedef void(GLAD_API_PTR *PFNGLUNIFORM2I64ARBPROC)(GLint location, GLint64 x, GLint64 y); +typedef void(GLAD_API_PTR *PFNGLUNIFORM2I64NVPROC)(GLint location, GLint64EXT x, GLint64EXT y); +typedef void(GLAD_API_PTR *PFNGLUNIFORM2I64VARBPROC)(GLint location, GLsizei count, + const GLint64 *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM2I64VNVPROC)(GLint location, GLsizei count, + const GLint64EXT *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM2IARBPROC)(GLint location, GLint v0, GLint v1); +typedef void(GLAD_API_PTR *PFNGLUNIFORM2IVPROC)(GLint location, GLsizei count, const GLint *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM2IVARBPROC)(GLint location, GLsizei count, + const GLint *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM2UIPROC)(GLint location, GLuint v0, GLuint v1); +typedef void(GLAD_API_PTR *PFNGLUNIFORM2UI64ARBPROC)(GLint location, GLuint64 x, GLuint64 y); +typedef void(GLAD_API_PTR *PFNGLUNIFORM2UI64NVPROC)(GLint location, GLuint64EXT x, GLuint64EXT y); +typedef void(GLAD_API_PTR *PFNGLUNIFORM2UI64VARBPROC)(GLint location, GLsizei count, + const GLuint64 *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM2UI64VNVPROC)(GLint location, GLsizei count, + const GLuint64EXT *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM2UIEXTPROC)(GLint location, GLuint v0, GLuint v1); +typedef void(GLAD_API_PTR *PFNGLUNIFORM2UIVPROC)(GLint location, GLsizei count, + const GLuint *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM2UIVEXTPROC)(GLint location, GLsizei count, + const GLuint *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM3DPROC)(GLint location, GLdouble x, GLdouble y, GLdouble z); +typedef void(GLAD_API_PTR *PFNGLUNIFORM3DVPROC)(GLint location, GLsizei count, + const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM3FPROC)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void(GLAD_API_PTR *PFNGLUNIFORM3FARBPROC)(GLint location, GLfloat v0, GLfloat v1, + GLfloat v2); +typedef void(GLAD_API_PTR *PFNGLUNIFORM3FVPROC)(GLint location, GLsizei count, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM3FVARBPROC)(GLint location, GLsizei count, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM3IPROC)(GLint location, GLint v0, GLint v1, GLint v2); +typedef void(GLAD_API_PTR *PFNGLUNIFORM3I64ARBPROC)(GLint location, GLint64 x, GLint64 y, + GLint64 z); +typedef void(GLAD_API_PTR *PFNGLUNIFORM3I64NVPROC)(GLint location, GLint64EXT x, GLint64EXT y, + GLint64EXT z); +typedef void(GLAD_API_PTR *PFNGLUNIFORM3I64VARBPROC)(GLint location, GLsizei count, + const GLint64 *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM3I64VNVPROC)(GLint location, GLsizei count, + const GLint64EXT *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM3IARBPROC)(GLint location, GLint v0, GLint v1, GLint v2); +typedef void(GLAD_API_PTR *PFNGLUNIFORM3IVPROC)(GLint location, GLsizei count, const GLint *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM3IVARBPROC)(GLint location, GLsizei count, + const GLint *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM3UIPROC)(GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void(GLAD_API_PTR *PFNGLUNIFORM3UI64ARBPROC)(GLint location, GLuint64 x, GLuint64 y, + GLuint64 z); +typedef void(GLAD_API_PTR *PFNGLUNIFORM3UI64NVPROC)(GLint location, GLuint64EXT x, GLuint64EXT y, + GLuint64EXT z); +typedef void(GLAD_API_PTR *PFNGLUNIFORM3UI64VARBPROC)(GLint location, GLsizei count, + const GLuint64 *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM3UI64VNVPROC)(GLint location, GLsizei count, + const GLuint64EXT *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM3UIEXTPROC)(GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void(GLAD_API_PTR *PFNGLUNIFORM3UIVPROC)(GLint location, GLsizei count, + const GLuint *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM3UIVEXTPROC)(GLint location, GLsizei count, + const GLuint *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM4DPROC)(GLint location, GLdouble x, GLdouble y, GLdouble z, + GLdouble w); +typedef void(GLAD_API_PTR *PFNGLUNIFORM4DVPROC)(GLint location, GLsizei count, + const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM4FPROC)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, + GLfloat v3); +typedef void(GLAD_API_PTR *PFNGLUNIFORM4FARBPROC)(GLint location, GLfloat v0, GLfloat v1, + GLfloat v2, GLfloat v3); +typedef void(GLAD_API_PTR *PFNGLUNIFORM4FVPROC)(GLint location, GLsizei count, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM4FVARBPROC)(GLint location, GLsizei count, + const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM4IPROC)(GLint location, GLint v0, GLint v1, GLint v2, + GLint v3); +typedef void(GLAD_API_PTR *PFNGLUNIFORM4I64ARBPROC)(GLint location, GLint64 x, GLint64 y, GLint64 z, + GLint64 w); +typedef void(GLAD_API_PTR *PFNGLUNIFORM4I64NVPROC)(GLint location, GLint64EXT x, GLint64EXT y, + GLint64EXT z, GLint64EXT w); +typedef void(GLAD_API_PTR *PFNGLUNIFORM4I64VARBPROC)(GLint location, GLsizei count, + const GLint64 *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM4I64VNVPROC)(GLint location, GLsizei count, + const GLint64EXT *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM4IARBPROC)(GLint location, GLint v0, GLint v1, GLint v2, + GLint v3); +typedef void(GLAD_API_PTR *PFNGLUNIFORM4IVPROC)(GLint location, GLsizei count, const GLint *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM4IVARBPROC)(GLint location, GLsizei count, + const GLint *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM4UIPROC)(GLint location, GLuint v0, GLuint v1, GLuint v2, + GLuint v3); +typedef void(GLAD_API_PTR *PFNGLUNIFORM4UI64ARBPROC)(GLint location, GLuint64 x, GLuint64 y, + GLuint64 z, GLuint64 w); +typedef void(GLAD_API_PTR *PFNGLUNIFORM4UI64NVPROC)(GLint location, GLuint64EXT x, GLuint64EXT y, + GLuint64EXT z, GLuint64EXT w); +typedef void(GLAD_API_PTR *PFNGLUNIFORM4UI64VARBPROC)(GLint location, GLsizei count, + const GLuint64 *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM4UI64VNVPROC)(GLint location, GLsizei count, + const GLuint64EXT *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM4UIEXTPROC)(GLint location, GLuint v0, GLuint v1, GLuint v2, + GLuint v3); +typedef void(GLAD_API_PTR *PFNGLUNIFORM4UIVPROC)(GLint location, GLsizei count, + const GLuint *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORM4UIVEXTPROC)(GLint location, GLsizei count, + const GLuint *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORMBLOCKBINDINGPROC)(GLuint program, GLuint uniformBlockIndex, + GLuint uniformBlockBinding); +typedef void(GLAD_API_PTR *PFNGLUNIFORMBUFFEREXTPROC)(GLuint program, GLint location, + GLuint buffer); +typedef void(GLAD_API_PTR *PFNGLUNIFORMHANDLEUI64ARBPROC)(GLint location, GLuint64 value); +typedef void(GLAD_API_PTR *PFNGLUNIFORMHANDLEUI64NVPROC)(GLint location, GLuint64 value); +typedef void(GLAD_API_PTR *PFNGLUNIFORMHANDLEUI64VARBPROC)(GLint location, GLsizei count, + const GLuint64 *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORMHANDLEUI64VNVPROC)(GLint location, GLsizei count, + const GLuint64 *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX2DVPROC)(GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX2FVPROC)(GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX2FVARBPROC)(GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX2X3DVPROC)(GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX2X3FVPROC)(GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX2X4DVPROC)(GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX2X4FVPROC)(GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX3DVPROC)(GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX3FVPROC)(GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX3FVARBPROC)(GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX3X2DVPROC)(GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX3X2FVPROC)(GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX3X4DVPROC)(GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX3X4FVPROC)(GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX4DVPROC)(GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX4FVPROC)(GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX4FVARBPROC)(GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX4X2DVPROC)(GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX4X2FVPROC)(GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX4X3DVPROC)(GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORMMATRIX4X3FVPROC)(GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +typedef void(GLAD_API_PTR *PFNGLUNIFORMSUBROUTINESUIVPROC)(GLenum shadertype, GLsizei count, + const GLuint *indices); +typedef void(GLAD_API_PTR *PFNGLUNIFORMUI64NVPROC)(GLint location, GLuint64EXT value); +typedef void(GLAD_API_PTR *PFNGLUNIFORMUI64VNVPROC)(GLint location, GLsizei count, + const GLuint64EXT *value); +typedef void(GLAD_API_PTR *PFNGLUNLOCKARRAYSEXTPROC)(void); +typedef GLboolean(GLAD_API_PTR *PFNGLUNMAPBUFFERPROC)(GLenum target); +typedef GLboolean(GLAD_API_PTR *PFNGLUNMAPBUFFERARBPROC)(GLenum target); +typedef GLboolean(GLAD_API_PTR *PFNGLUNMAPNAMEDBUFFERPROC)(GLuint buffer); +typedef GLboolean(GLAD_API_PTR *PFNGLUNMAPNAMEDBUFFEREXTPROC)(GLuint buffer); +typedef void(GLAD_API_PTR *PFNGLUNMAPOBJECTBUFFERATIPROC)(GLuint buffer); +typedef void(GLAD_API_PTR *PFNGLUNMAPTEXTURE2DINTELPROC)(GLuint texture, GLint level); +typedef void(GLAD_API_PTR *PFNGLUPDATEOBJECTBUFFERATIPROC)(GLuint buffer, GLuint offset, + GLsizei size, const void *pointer, + GLenum preserve); +typedef void(GLAD_API_PTR *PFNGLUPLOADGPUMASKNVXPROC)(GLbitfield mask); +typedef void(GLAD_API_PTR *PFNGLUSEPROGRAMPROC)(GLuint program); +typedef void(GLAD_API_PTR *PFNGLUSEPROGRAMOBJECTARBPROC)(GLhandleARB programObj); +typedef void(GLAD_API_PTR *PFNGLUSEPROGRAMSTAGESPROC)(GLuint pipeline, GLbitfield stages, + GLuint program); +typedef void(GLAD_API_PTR *PFNGLUSESHADERPROGRAMEXTPROC)(GLenum type, GLuint program); +typedef void(GLAD_API_PTR *PFNGLVDPAUFININVPROC)(void); +typedef void(GLAD_API_PTR *PFNGLVDPAUGETSURFACEIVNVPROC)(GLvdpauSurfaceNV surface, GLenum pname, + GLsizei count, GLsizei *length, + GLint *values); +typedef void(GLAD_API_PTR *PFNGLVDPAUINITNVPROC)(const void *vdpDevice, const void *getProcAddress); +typedef GLboolean(GLAD_API_PTR *PFNGLVDPAUISSURFACENVPROC)(GLvdpauSurfaceNV surface); +typedef void(GLAD_API_PTR *PFNGLVDPAUMAPSURFACESNVPROC)(GLsizei numSurfaces, + const GLvdpauSurfaceNV *surfaces); +typedef GLvdpauSurfaceNV(GLAD_API_PTR *PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC)( + const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +typedef GLvdpauSurfaceNV(GLAD_API_PTR *PFNGLVDPAUREGISTERVIDEOSURFACENVPROC)( + const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +typedef GLvdpauSurfaceNV(GLAD_API_PTR *PFNGLVDPAUREGISTERVIDEOSURFACEWITHPICTURESTRUCTURENVPROC)( + const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames, + GLboolean isFrameStructure); +typedef void(GLAD_API_PTR *PFNGLVDPAUSURFACEACCESSNVPROC)(GLvdpauSurfaceNV surface, GLenum access); +typedef void(GLAD_API_PTR *PFNGLVDPAUUNMAPSURFACESNVPROC)(GLsizei numSurface, + const GLvdpauSurfaceNV *surfaces); +typedef void(GLAD_API_PTR *PFNGLVDPAUUNREGISTERSURFACENVPROC)(GLvdpauSurfaceNV surface); +typedef void(GLAD_API_PTR *PFNGLVALIDATEPROGRAMPROC)(GLuint program); +typedef void(GLAD_API_PTR *PFNGLVALIDATEPROGRAMARBPROC)(GLhandleARB programObj); +typedef void(GLAD_API_PTR *PFNGLVALIDATEPROGRAMPIPELINEPROC)(GLuint pipeline); +typedef void(GLAD_API_PTR *PFNGLVARIANTARRAYOBJECTATIPROC)(GLuint id, GLenum type, GLsizei stride, + GLuint buffer, GLuint offset); +typedef void(GLAD_API_PTR *PFNGLVARIANTPOINTEREXTPROC)(GLuint id, GLenum type, GLuint stride, + const void *addr); +typedef void(GLAD_API_PTR *PFNGLVARIANTBVEXTPROC)(GLuint id, const GLbyte *addr); +typedef void(GLAD_API_PTR *PFNGLVARIANTDVEXTPROC)(GLuint id, const GLdouble *addr); +typedef void(GLAD_API_PTR *PFNGLVARIANTFVEXTPROC)(GLuint id, const GLfloat *addr); +typedef void(GLAD_API_PTR *PFNGLVARIANTIVEXTPROC)(GLuint id, const GLint *addr); +typedef void(GLAD_API_PTR *PFNGLVARIANTSVEXTPROC)(GLuint id, const GLshort *addr); +typedef void(GLAD_API_PTR *PFNGLVARIANTUBVEXTPROC)(GLuint id, const GLubyte *addr); +typedef void(GLAD_API_PTR *PFNGLVARIANTUIVEXTPROC)(GLuint id, const GLuint *addr); +typedef void(GLAD_API_PTR *PFNGLVARIANTUSVEXTPROC)(GLuint id, const GLushort *addr); +typedef void(GLAD_API_PTR *PFNGLVERTEX2BOESPROC)(GLbyte x, GLbyte y); +typedef void(GLAD_API_PTR *PFNGLVERTEX2BVOESPROC)(const GLbyte *coords); +typedef void(GLAD_API_PTR *PFNGLVERTEX2HNVPROC)(GLhalfNV x, GLhalfNV y); +typedef void(GLAD_API_PTR *PFNGLVERTEX2HVNVPROC)(const GLhalfNV *v); +typedef void(GLAD_API_PTR *PFNGLVERTEX2XOESPROC)(GLfixed x); +typedef void(GLAD_API_PTR *PFNGLVERTEX2XVOESPROC)(const GLfixed *coords); +typedef void(GLAD_API_PTR *PFNGLVERTEX3BOESPROC)(GLbyte x, GLbyte y, GLbyte z); +typedef void(GLAD_API_PTR *PFNGLVERTEX3BVOESPROC)(const GLbyte *coords); +typedef void(GLAD_API_PTR *PFNGLVERTEX3HNVPROC)(GLhalfNV x, GLhalfNV y, GLhalfNV z); +typedef void(GLAD_API_PTR *PFNGLVERTEX3HVNVPROC)(const GLhalfNV *v); +typedef void(GLAD_API_PTR *PFNGLVERTEX3XOESPROC)(GLfixed x, GLfixed y); +typedef void(GLAD_API_PTR *PFNGLVERTEX3XVOESPROC)(const GLfixed *coords); +typedef void(GLAD_API_PTR *PFNGLVERTEX4BOESPROC)(GLbyte x, GLbyte y, GLbyte z, GLbyte w); +typedef void(GLAD_API_PTR *PFNGLVERTEX4BVOESPROC)(const GLbyte *coords); +typedef void(GLAD_API_PTR *PFNGLVERTEX4HNVPROC)(GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +typedef void(GLAD_API_PTR *PFNGLVERTEX4HVNVPROC)(const GLhalfNV *v); +typedef void(GLAD_API_PTR *PFNGLVERTEX4XOESPROC)(GLfixed x, GLfixed y, GLfixed z); +typedef void(GLAD_API_PTR *PFNGLVERTEX4XVOESPROC)(const GLfixed *coords); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYATTRIBBINDINGPROC)(GLuint vaobj, GLuint attribindex, + GLuint bindingindex); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYATTRIBFORMATPROC)(GLuint vaobj, GLuint attribindex, + GLint size, GLenum type, + GLboolean normalized, + GLuint relativeoffset); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYATTRIBIFORMATPROC)(GLuint vaobj, GLuint attribindex, + GLint size, GLenum type, + GLuint relativeoffset); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYATTRIBLFORMATPROC)(GLuint vaobj, GLuint attribindex, + GLint size, GLenum type, + GLuint relativeoffset); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC)(GLuint vaobj, + GLuint bindingindex, + GLuint buffer, GLintptr offset, + GLsizei stride); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYBINDINGDIVISORPROC)(GLuint vaobj, GLuint bindingindex, + GLuint divisor); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYCOLOROFFSETEXTPROC)(GLuint vaobj, GLuint buffer, + GLint size, GLenum type, + GLsizei stride, GLintptr offset); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYEDGEFLAGOFFSETEXTPROC)(GLuint vaobj, GLuint buffer, + GLsizei stride, GLintptr offset); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYELEMENTBUFFERPROC)(GLuint vaobj, GLuint buffer); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYFOGCOORDOFFSETEXTPROC)(GLuint vaobj, GLuint buffer, + GLenum type, GLsizei stride, + GLintptr offset); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYINDEXOFFSETEXTPROC)(GLuint vaobj, GLuint buffer, + GLenum type, GLsizei stride, + GLintptr offset); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYMULTITEXCOORDOFFSETEXTPROC)(GLuint vaobj, GLuint buffer, + GLenum texunit, GLint size, + GLenum type, GLsizei stride, + GLintptr offset); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYNORMALOFFSETEXTPROC)(GLuint vaobj, GLuint buffer, + GLenum type, GLsizei stride, + GLintptr offset); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYPARAMETERIAPPLEPROC)(GLenum pname, GLint param); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYRANGEAPPLEPROC)(GLsizei length, void *pointer); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYRANGENVPROC)(GLsizei length, const void *pointer); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYSECONDARYCOLOROFFSETEXTPROC)(GLuint vaobj, GLuint buffer, + GLint size, GLenum type, + GLsizei stride, + GLintptr offset); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYTEXCOORDOFFSETEXTPROC)(GLuint vaobj, GLuint buffer, + GLint size, GLenum type, + GLsizei stride, GLintptr offset); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC)(GLuint vaobj, + GLuint attribindex, + GLuint bindingindex); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXATTRIBDIVISOREXTPROC)(GLuint vaobj, GLuint index, + GLuint divisor); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC)(GLuint vaobj, + GLuint attribindex, + GLint size, GLenum type, + GLboolean normalized, + GLuint relativeoffset); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC)(GLuint vaobj, + GLuint attribindex, + GLint size, GLenum type, + GLuint relativeoffset); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXATTRIBIOFFSETEXTPROC)(GLuint vaobj, GLuint buffer, + GLuint index, GLint size, + GLenum type, GLsizei stride, + GLintptr offset); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC)(GLuint vaobj, + GLuint attribindex, + GLint size, GLenum type, + GLuint relativeoffset); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC)(GLuint vaobj, GLuint buffer, + GLuint index, GLint size, + GLenum type, GLsizei stride, + GLintptr offset); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXATTRIBOFFSETEXTPROC)( + GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, + GLsizei stride, GLintptr offset); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC)(GLuint vaobj, + GLuint bindingindex, + GLuint divisor); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXBUFFERPROC)(GLuint vaobj, GLuint bindingindex, + GLuint buffer, GLintptr offset, + GLsizei stride); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXBUFFERSPROC)(GLuint vaobj, GLuint first, + GLsizei count, const GLuint *buffers, + const GLintptr *offsets, + const GLsizei *strides); +typedef void(GLAD_API_PTR *PFNGLVERTEXARRAYVERTEXOFFSETEXTPROC)(GLuint vaobj, GLuint buffer, + GLint size, GLenum type, + GLsizei stride, GLintptr offset); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1DPROC)(GLuint index, GLdouble x); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1DARBPROC)(GLuint index, GLdouble x); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1DNVPROC)(GLuint index, GLdouble x); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1DVPROC)(GLuint index, const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1DVARBPROC)(GLuint index, const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1DVNVPROC)(GLuint index, const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1FPROC)(GLuint index, GLfloat x); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1FARBPROC)(GLuint index, GLfloat x); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1FNVPROC)(GLuint index, GLfloat x); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1FVPROC)(GLuint index, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1FVARBPROC)(GLuint index, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1FVNVPROC)(GLuint index, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1HNVPROC)(GLuint index, GLhalfNV x); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1HVNVPROC)(GLuint index, const GLhalfNV *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1SPROC)(GLuint index, GLshort x); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1SARBPROC)(GLuint index, GLshort x); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1SNVPROC)(GLuint index, GLshort x); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1SVPROC)(GLuint index, const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1SVARBPROC)(GLuint index, const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB1SVNVPROC)(GLuint index, const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2DPROC)(GLuint index, GLdouble x, GLdouble y); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2DARBPROC)(GLuint index, GLdouble x, GLdouble y); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2DNVPROC)(GLuint index, GLdouble x, GLdouble y); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2DVPROC)(GLuint index, const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2DVARBPROC)(GLuint index, const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2DVNVPROC)(GLuint index, const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2FPROC)(GLuint index, GLfloat x, GLfloat y); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2FARBPROC)(GLuint index, GLfloat x, GLfloat y); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2FNVPROC)(GLuint index, GLfloat x, GLfloat y); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2FVPROC)(GLuint index, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2FVARBPROC)(GLuint index, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2FVNVPROC)(GLuint index, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2HNVPROC)(GLuint index, GLhalfNV x, GLhalfNV y); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2HVNVPROC)(GLuint index, const GLhalfNV *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2SPROC)(GLuint index, GLshort x, GLshort y); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2SARBPROC)(GLuint index, GLshort x, GLshort y); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2SNVPROC)(GLuint index, GLshort x, GLshort y); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2SVPROC)(GLuint index, const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2SVARBPROC)(GLuint index, const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB2SVNVPROC)(GLuint index, const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3DPROC)(GLuint index, GLdouble x, GLdouble y, + GLdouble z); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3DARBPROC)(GLuint index, GLdouble x, GLdouble y, + GLdouble z); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3DNVPROC)(GLuint index, GLdouble x, GLdouble y, + GLdouble z); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3DVPROC)(GLuint index, const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3DVARBPROC)(GLuint index, const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3DVNVPROC)(GLuint index, const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3FPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3FARBPROC)(GLuint index, GLfloat x, GLfloat y, + GLfloat z); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3FNVPROC)(GLuint index, GLfloat x, GLfloat y, + GLfloat z); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3FVPROC)(GLuint index, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3FVARBPROC)(GLuint index, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3FVNVPROC)(GLuint index, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3HNVPROC)(GLuint index, GLhalfNV x, GLhalfNV y, + GLhalfNV z); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3HVNVPROC)(GLuint index, const GLhalfNV *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3SPROC)(GLuint index, GLshort x, GLshort y, GLshort z); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3SARBPROC)(GLuint index, GLshort x, GLshort y, + GLshort z); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3SNVPROC)(GLuint index, GLshort x, GLshort y, + GLshort z); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3SVPROC)(GLuint index, const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3SVARBPROC)(GLuint index, const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB3SVNVPROC)(GLuint index, const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NBVPROC)(GLuint index, const GLbyte *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NBVARBPROC)(GLuint index, const GLbyte *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NIVPROC)(GLuint index, const GLint *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NIVARBPROC)(GLuint index, const GLint *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NSVPROC)(GLuint index, const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NSVARBPROC)(GLuint index, const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NUBPROC)(GLuint index, GLubyte x, GLubyte y, GLubyte z, + GLubyte w); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NUBARBPROC)(GLuint index, GLubyte x, GLubyte y, + GLubyte z, GLubyte w); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NUBVPROC)(GLuint index, const GLubyte *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NUBVARBPROC)(GLuint index, const GLubyte *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NUIVPROC)(GLuint index, const GLuint *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NUIVARBPROC)(GLuint index, const GLuint *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NUSVPROC)(GLuint index, const GLushort *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4NUSVARBPROC)(GLuint index, const GLushort *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4BVPROC)(GLuint index, const GLbyte *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4BVARBPROC)(GLuint index, const GLbyte *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4DPROC)(GLuint index, GLdouble x, GLdouble y, + GLdouble z, GLdouble w); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4DARBPROC)(GLuint index, GLdouble x, GLdouble y, + GLdouble z, GLdouble w); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4DNVPROC)(GLuint index, GLdouble x, GLdouble y, + GLdouble z, GLdouble w); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4DVPROC)(GLuint index, const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4DVARBPROC)(GLuint index, const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4DVNVPROC)(GLuint index, const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4FPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat z, + GLfloat w); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4FARBPROC)(GLuint index, GLfloat x, GLfloat y, + GLfloat z, GLfloat w); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4FNVPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat z, + GLfloat w); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4FVPROC)(GLuint index, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4FVARBPROC)(GLuint index, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4FVNVPROC)(GLuint index, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4HNVPROC)(GLuint index, GLhalfNV x, GLhalfNV y, + GLhalfNV z, GLhalfNV w); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4HVNVPROC)(GLuint index, const GLhalfNV *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4IVPROC)(GLuint index, const GLint *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4IVARBPROC)(GLuint index, const GLint *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4SPROC)(GLuint index, GLshort x, GLshort y, GLshort z, + GLshort w); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4SARBPROC)(GLuint index, GLshort x, GLshort y, + GLshort z, GLshort w); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4SNVPROC)(GLuint index, GLshort x, GLshort y, GLshort z, + GLshort w); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4SVPROC)(GLuint index, const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4SVARBPROC)(GLuint index, const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4SVNVPROC)(GLuint index, const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4UBNVPROC)(GLuint index, GLubyte x, GLubyte y, + GLubyte z, GLubyte w); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4UBVPROC)(GLuint index, const GLubyte *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4UBVARBPROC)(GLuint index, const GLubyte *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4UBVNVPROC)(GLuint index, const GLubyte *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4UIVPROC)(GLuint index, const GLuint *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4UIVARBPROC)(GLuint index, const GLuint *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4USVPROC)(GLuint index, const GLushort *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIB4USVARBPROC)(GLuint index, const GLushort *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBARRAYOBJECTATIPROC)(GLuint index, GLint size, + GLenum type, GLboolean normalized, + GLsizei stride, GLuint buffer, + GLuint offset); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBBINDINGPROC)(GLuint attribindex, GLuint bindingindex); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBDIVISORPROC)(GLuint index, GLuint divisor); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBDIVISORARBPROC)(GLuint index, GLuint divisor); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBFORMATPROC)(GLuint attribindex, GLint size, GLenum type, + GLboolean normalized, + GLuint relativeoffset); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBFORMATNVPROC)(GLuint index, GLint size, GLenum type, + GLboolean normalized, GLsizei stride); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI1IPROC)(GLuint index, GLint x); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI1IEXTPROC)(GLuint index, GLint x); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI1IVPROC)(GLuint index, const GLint *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI1IVEXTPROC)(GLuint index, const GLint *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI1UIPROC)(GLuint index, GLuint x); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI1UIEXTPROC)(GLuint index, GLuint x); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI1UIVPROC)(GLuint index, const GLuint *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI1UIVEXTPROC)(GLuint index, const GLuint *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI2IPROC)(GLuint index, GLint x, GLint y); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI2IEXTPROC)(GLuint index, GLint x, GLint y); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI2IVPROC)(GLuint index, const GLint *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI2IVEXTPROC)(GLuint index, const GLint *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI2UIPROC)(GLuint index, GLuint x, GLuint y); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI2UIEXTPROC)(GLuint index, GLuint x, GLuint y); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI2UIVPROC)(GLuint index, const GLuint *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI2UIVEXTPROC)(GLuint index, const GLuint *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI3IPROC)(GLuint index, GLint x, GLint y, GLint z); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI3IEXTPROC)(GLuint index, GLint x, GLint y, GLint z); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI3IVPROC)(GLuint index, const GLint *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI3IVEXTPROC)(GLuint index, const GLint *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI3UIPROC)(GLuint index, GLuint x, GLuint y, GLuint z); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI3UIEXTPROC)(GLuint index, GLuint x, GLuint y, + GLuint z); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI3UIVPROC)(GLuint index, const GLuint *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI3UIVEXTPROC)(GLuint index, const GLuint *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4BVPROC)(GLuint index, const GLbyte *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4BVEXTPROC)(GLuint index, const GLbyte *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4IPROC)(GLuint index, GLint x, GLint y, GLint z, + GLint w); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4IEXTPROC)(GLuint index, GLint x, GLint y, GLint z, + GLint w); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4IVPROC)(GLuint index, const GLint *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4IVEXTPROC)(GLuint index, const GLint *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4SVPROC)(GLuint index, const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4SVEXTPROC)(GLuint index, const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4UBVPROC)(GLuint index, const GLubyte *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4UBVEXTPROC)(GLuint index, const GLubyte *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4UIPROC)(GLuint index, GLuint x, GLuint y, GLuint z, + GLuint w); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4UIEXTPROC)(GLuint index, GLuint x, GLuint y, GLuint z, + GLuint w); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4UIVPROC)(GLuint index, const GLuint *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4UIVEXTPROC)(GLuint index, const GLuint *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4USVPROC)(GLuint index, const GLushort *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBI4USVEXTPROC)(GLuint index, const GLushort *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBIFORMATPROC)(GLuint attribindex, GLint size, + GLenum type, GLuint relativeoffset); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBIFORMATNVPROC)(GLuint index, GLint size, GLenum type, + GLsizei stride); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBIPOINTERPROC)(GLuint index, GLint size, GLenum type, + GLsizei stride, const void *pointer); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBIPOINTEREXTPROC)(GLuint index, GLint size, GLenum type, + GLsizei stride, const void *pointer); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL1DPROC)(GLuint index, GLdouble x); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL1DEXTPROC)(GLuint index, GLdouble x); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL1DVPROC)(GLuint index, const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL1DVEXTPROC)(GLuint index, const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL1I64NVPROC)(GLuint index, GLint64EXT x); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL1I64VNVPROC)(GLuint index, const GLint64EXT *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL1UI64ARBPROC)(GLuint index, GLuint64EXT x); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL1UI64NVPROC)(GLuint index, GLuint64EXT x); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL1UI64VARBPROC)(GLuint index, const GLuint64EXT *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL1UI64VNVPROC)(GLuint index, const GLuint64EXT *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL2DPROC)(GLuint index, GLdouble x, GLdouble y); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL2DEXTPROC)(GLuint index, GLdouble x, GLdouble y); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL2DVPROC)(GLuint index, const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL2DVEXTPROC)(GLuint index, const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL2I64NVPROC)(GLuint index, GLint64EXT x, GLint64EXT y); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL2I64VNVPROC)(GLuint index, const GLint64EXT *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL2UI64NVPROC)(GLuint index, GLuint64EXT x, + GLuint64EXT y); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL2UI64VNVPROC)(GLuint index, const GLuint64EXT *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL3DPROC)(GLuint index, GLdouble x, GLdouble y, + GLdouble z); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL3DEXTPROC)(GLuint index, GLdouble x, GLdouble y, + GLdouble z); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL3DVPROC)(GLuint index, const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL3DVEXTPROC)(GLuint index, const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL3I64NVPROC)(GLuint index, GLint64EXT x, GLint64EXT y, + GLint64EXT z); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL3I64VNVPROC)(GLuint index, const GLint64EXT *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL3UI64NVPROC)(GLuint index, GLuint64EXT x, + GLuint64EXT y, GLuint64EXT z); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL3UI64VNVPROC)(GLuint index, const GLuint64EXT *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL4DPROC)(GLuint index, GLdouble x, GLdouble y, + GLdouble z, GLdouble w); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL4DEXTPROC)(GLuint index, GLdouble x, GLdouble y, + GLdouble z, GLdouble w); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL4DVPROC)(GLuint index, const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL4DVEXTPROC)(GLuint index, const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL4I64NVPROC)(GLuint index, GLint64EXT x, GLint64EXT y, + GLint64EXT z, GLint64EXT w); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL4I64VNVPROC)(GLuint index, const GLint64EXT *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL4UI64NVPROC)(GLuint index, GLuint64EXT x, + GLuint64EXT y, GLuint64EXT z, + GLuint64EXT w); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBL4UI64VNVPROC)(GLuint index, const GLuint64EXT *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBLFORMATPROC)(GLuint attribindex, GLint size, + GLenum type, GLuint relativeoffset); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBLFORMATNVPROC)(GLuint index, GLint size, GLenum type, + GLsizei stride); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBLPOINTERPROC)(GLuint index, GLint size, GLenum type, + GLsizei stride, const void *pointer); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBLPOINTEREXTPROC)(GLuint index, GLint size, GLenum type, + GLsizei stride, const void *pointer); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBP1UIPROC)(GLuint index, GLenum type, + GLboolean normalized, GLuint value); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBP1UIVPROC)(GLuint index, GLenum type, + GLboolean normalized, const GLuint *value); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBP2UIPROC)(GLuint index, GLenum type, + GLboolean normalized, GLuint value); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBP2UIVPROC)(GLuint index, GLenum type, + GLboolean normalized, const GLuint *value); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBP3UIPROC)(GLuint index, GLenum type, + GLboolean normalized, GLuint value); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBP3UIVPROC)(GLuint index, GLenum type, + GLboolean normalized, const GLuint *value); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBP4UIPROC)(GLuint index, GLenum type, + GLboolean normalized, GLuint value); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBP4UIVPROC)(GLuint index, GLenum type, + GLboolean normalized, const GLuint *value); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBPARAMETERIAMDPROC)(GLuint index, GLenum pname, + GLint param); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBPOINTERPROC)(GLuint index, GLint size, GLenum type, + GLboolean normalized, GLsizei stride, + const void *pointer); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBPOINTERARBPROC)(GLuint index, GLint size, GLenum type, + GLboolean normalized, GLsizei stride, + const void *pointer); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBPOINTERNVPROC)(GLuint index, GLint fsize, GLenum type, + GLsizei stride, const void *pointer); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS1DVNVPROC)(GLuint index, GLsizei count, + const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS1FVNVPROC)(GLuint index, GLsizei count, + const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS1HVNVPROC)(GLuint index, GLsizei n, const GLhalfNV *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS1SVNVPROC)(GLuint index, GLsizei count, + const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS2DVNVPROC)(GLuint index, GLsizei count, + const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS2FVNVPROC)(GLuint index, GLsizei count, + const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS2HVNVPROC)(GLuint index, GLsizei n, const GLhalfNV *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS2SVNVPROC)(GLuint index, GLsizei count, + const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS3DVNVPROC)(GLuint index, GLsizei count, + const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS3FVNVPROC)(GLuint index, GLsizei count, + const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS3HVNVPROC)(GLuint index, GLsizei n, const GLhalfNV *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS3SVNVPROC)(GLuint index, GLsizei count, + const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS4DVNVPROC)(GLuint index, GLsizei count, + const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS4FVNVPROC)(GLuint index, GLsizei count, + const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS4HVNVPROC)(GLuint index, GLsizei n, const GLhalfNV *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS4SVNVPROC)(GLuint index, GLsizei count, + const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXATTRIBS4UBVNVPROC)(GLuint index, GLsizei count, + const GLubyte *v); +typedef void(GLAD_API_PTR *PFNGLVERTEXBINDINGDIVISORPROC)(GLuint bindingindex, GLuint divisor); +typedef void(GLAD_API_PTR *PFNGLVERTEXBLENDARBPROC)(GLint count); +typedef void(GLAD_API_PTR *PFNGLVERTEXBLENDENVFATIPROC)(GLenum pname, GLfloat param); +typedef void(GLAD_API_PTR *PFNGLVERTEXBLENDENVIATIPROC)(GLenum pname, GLint param); +typedef void(GLAD_API_PTR *PFNGLVERTEXFORMATNVPROC)(GLint size, GLenum type, GLsizei stride); +typedef void(GLAD_API_PTR *PFNGLVERTEXPOINTEREXTPROC)(GLint size, GLenum type, GLsizei stride, + GLsizei count, const void *pointer); +typedef void(GLAD_API_PTR *PFNGLVERTEXPOINTERLISTIBMPROC)(GLint size, GLenum type, GLint stride, + const void **pointer, GLint ptrstride); +typedef void(GLAD_API_PTR *PFNGLVERTEXPOINTERVINTELPROC)(GLint size, GLenum type, + const void **pointer); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM1DATIPROC)(GLenum stream, GLdouble x); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM1DVATIPROC)(GLenum stream, const GLdouble *coords); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM1FATIPROC)(GLenum stream, GLfloat x); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM1FVATIPROC)(GLenum stream, const GLfloat *coords); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM1IATIPROC)(GLenum stream, GLint x); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM1IVATIPROC)(GLenum stream, const GLint *coords); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM1SATIPROC)(GLenum stream, GLshort x); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM1SVATIPROC)(GLenum stream, const GLshort *coords); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM2DATIPROC)(GLenum stream, GLdouble x, GLdouble y); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM2DVATIPROC)(GLenum stream, const GLdouble *coords); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM2FATIPROC)(GLenum stream, GLfloat x, GLfloat y); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM2FVATIPROC)(GLenum stream, const GLfloat *coords); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM2IATIPROC)(GLenum stream, GLint x, GLint y); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM2IVATIPROC)(GLenum stream, const GLint *coords); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM2SATIPROC)(GLenum stream, GLshort x, GLshort y); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM2SVATIPROC)(GLenum stream, const GLshort *coords); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM3DATIPROC)(GLenum stream, GLdouble x, GLdouble y, + GLdouble z); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM3DVATIPROC)(GLenum stream, const GLdouble *coords); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM3FATIPROC)(GLenum stream, GLfloat x, GLfloat y, + GLfloat z); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM3FVATIPROC)(GLenum stream, const GLfloat *coords); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM3IATIPROC)(GLenum stream, GLint x, GLint y, GLint z); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM3IVATIPROC)(GLenum stream, const GLint *coords); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM3SATIPROC)(GLenum stream, GLshort x, GLshort y, + GLshort z); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM3SVATIPROC)(GLenum stream, const GLshort *coords); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM4DATIPROC)(GLenum stream, GLdouble x, GLdouble y, + GLdouble z, GLdouble w); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM4DVATIPROC)(GLenum stream, const GLdouble *coords); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM4FATIPROC)(GLenum stream, GLfloat x, GLfloat y, + GLfloat z, GLfloat w); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM4FVATIPROC)(GLenum stream, const GLfloat *coords); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM4IATIPROC)(GLenum stream, GLint x, GLint y, GLint z, + GLint w); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM4IVATIPROC)(GLenum stream, const GLint *coords); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM4SATIPROC)(GLenum stream, GLshort x, GLshort y, + GLshort z, GLshort w); +typedef void(GLAD_API_PTR *PFNGLVERTEXSTREAM4SVATIPROC)(GLenum stream, const GLshort *coords); +typedef void(GLAD_API_PTR *PFNGLVERTEXWEIGHTPOINTEREXTPROC)(GLint size, GLenum type, GLsizei stride, + const void *pointer); +typedef void(GLAD_API_PTR *PFNGLVERTEXWEIGHTFEXTPROC)(GLfloat weight); +typedef void(GLAD_API_PTR *PFNGLVERTEXWEIGHTFVEXTPROC)(const GLfloat *weight); +typedef void(GLAD_API_PTR *PFNGLVERTEXWEIGHTHNVPROC)(GLhalfNV weight); +typedef void(GLAD_API_PTR *PFNGLVERTEXWEIGHTHVNVPROC)(const GLhalfNV *weight); +typedef GLenum(GLAD_API_PTR *PFNGLVIDEOCAPTURENVPROC)(GLuint video_capture_slot, + GLuint *sequence_num, + GLuint64EXT *capture_time); +typedef void(GLAD_API_PTR *PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC)(GLuint video_capture_slot, + GLuint stream, GLenum pname, + const GLdouble *params); +typedef void(GLAD_API_PTR *PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC)(GLuint video_capture_slot, + GLuint stream, GLenum pname, + const GLfloat *params); +typedef void(GLAD_API_PTR *PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC)(GLuint video_capture_slot, + GLuint stream, GLenum pname, + const GLint *params); +typedef void(GLAD_API_PTR *PFNGLVIEWPORTPROC)(GLint x, GLint y, GLsizei width, GLsizei height); +typedef void(GLAD_API_PTR *PFNGLVIEWPORTARRAYVPROC)(GLuint first, GLsizei count, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLVIEWPORTINDEXEDFPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat w, + GLfloat h); +typedef void(GLAD_API_PTR *PFNGLVIEWPORTINDEXEDFVPROC)(GLuint index, const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLVIEWPORTPOSITIONWSCALENVPROC)(GLuint index, GLfloat xcoeff, + GLfloat ycoeff); +typedef void(GLAD_API_PTR *PFNGLVIEWPORTSWIZZLENVPROC)(GLuint index, GLenum swizzlex, + GLenum swizzley, GLenum swizzlez, + GLenum swizzlew); +typedef void(GLAD_API_PTR *PFNGLWAITSEMAPHOREEXTPROC)(GLuint semaphore, GLuint numBufferBarriers, + const GLuint *buffers, + GLuint numTextureBarriers, + const GLuint *textures, + const GLenum *srcLayouts); +typedef void(GLAD_API_PTR *PFNGLWAITSEMAPHOREUI64NVXPROC)(GLuint waitGpu, GLsizei fenceObjectCount, + const GLuint *semaphoreArray, + const GLuint64 *fenceValueArray); +typedef void(GLAD_API_PTR *PFNGLWAITSYNCPROC)(GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void(GLAD_API_PTR *PFNGLWAITVKSEMAPHORENVPROC)(GLuint64 vkSemaphore); +typedef void(GLAD_API_PTR *PFNGLWEIGHTPATHSNVPROC)(GLuint resultPath, GLsizei numPaths, + const GLuint *paths, const GLfloat *weights); +typedef void(GLAD_API_PTR *PFNGLWEIGHTPOINTERARBPROC)(GLint size, GLenum type, GLsizei stride, + const void *pointer); +typedef void(GLAD_API_PTR *PFNGLWEIGHTBVARBPROC)(GLint size, const GLbyte *weights); +typedef void(GLAD_API_PTR *PFNGLWEIGHTDVARBPROC)(GLint size, const GLdouble *weights); +typedef void(GLAD_API_PTR *PFNGLWEIGHTFVARBPROC)(GLint size, const GLfloat *weights); +typedef void(GLAD_API_PTR *PFNGLWEIGHTIVARBPROC)(GLint size, const GLint *weights); +typedef void(GLAD_API_PTR *PFNGLWEIGHTSVARBPROC)(GLint size, const GLshort *weights); +typedef void(GLAD_API_PTR *PFNGLWEIGHTUBVARBPROC)(GLint size, const GLubyte *weights); +typedef void(GLAD_API_PTR *PFNGLWEIGHTUIVARBPROC)(GLint size, const GLuint *weights); +typedef void(GLAD_API_PTR *PFNGLWEIGHTUSVARBPROC)(GLint size, const GLushort *weights); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2DARBPROC)(GLdouble x, GLdouble y); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2DMESAPROC)(GLdouble x, GLdouble y); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2DVARBPROC)(const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2DVMESAPROC)(const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2FARBPROC)(GLfloat x, GLfloat y); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2FMESAPROC)(GLfloat x, GLfloat y); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2FVARBPROC)(const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2FVMESAPROC)(const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2IARBPROC)(GLint x, GLint y); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2IMESAPROC)(GLint x, GLint y); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2IVARBPROC)(const GLint *v); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2IVMESAPROC)(const GLint *v); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2SARBPROC)(GLshort x, GLshort y); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2SMESAPROC)(GLshort x, GLshort y); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2SVARBPROC)(const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS2SVMESAPROC)(const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3DARBPROC)(GLdouble x, GLdouble y, GLdouble z); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3DMESAPROC)(GLdouble x, GLdouble y, GLdouble z); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3DVARBPROC)(const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3DVMESAPROC)(const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3FARBPROC)(GLfloat x, GLfloat y, GLfloat z); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3FMESAPROC)(GLfloat x, GLfloat y, GLfloat z); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3FVARBPROC)(const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3FVMESAPROC)(const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3IARBPROC)(GLint x, GLint y, GLint z); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3IMESAPROC)(GLint x, GLint y, GLint z); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3IVARBPROC)(const GLint *v); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3IVMESAPROC)(const GLint *v); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3SARBPROC)(GLshort x, GLshort y, GLshort z); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3SMESAPROC)(GLshort x, GLshort y, GLshort z); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3SVARBPROC)(const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS3SVMESAPROC)(const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS4DMESAPROC)(GLdouble x, GLdouble y, GLdouble z, + GLdouble w); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS4DVMESAPROC)(const GLdouble *v); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS4FMESAPROC)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS4FVMESAPROC)(const GLfloat *v); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS4IMESAPROC)(GLint x, GLint y, GLint z, GLint w); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS4IVMESAPROC)(const GLint *v); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS4SMESAPROC)(GLshort x, GLshort y, GLshort z, GLshort w); +typedef void(GLAD_API_PTR *PFNGLWINDOWPOS4SVMESAPROC)(const GLshort *v); +typedef void(GLAD_API_PTR *PFNGLWINDOWRECTANGLESEXTPROC)(GLenum mode, GLsizei count, + const GLint *box); +typedef void(GLAD_API_PTR *PFNGLWRITEMASKEXTPROC)(GLuint res, GLuint in, GLenum outX, GLenum outY, + GLenum outZ, GLenum outW); + +typedef struct GladGLContext { + PFNGLACTIVESHADERPROGRAMPROC ActiveShaderProgram; + PFNGLACTIVETEXTUREPROC ActiveTexture; + PFNGLATTACHSHADERPROC AttachShader; + PFNGLBEGINCONDITIONALRENDERPROC BeginConditionalRender; + PFNGLBEGINQUERYPROC BeginQuery; + PFNGLBEGINQUERYINDEXEDPROC BeginQueryIndexed; + PFNGLBEGINTRANSFORMFEEDBACKPROC BeginTransformFeedback; + PFNGLBINDATTRIBLOCATIONPROC BindAttribLocation; + PFNGLBINDBUFFERPROC BindBuffer; + PFNGLBINDBUFFERBASEPROC BindBufferBase; + PFNGLBINDBUFFERRANGEPROC BindBufferRange; + PFNGLBINDBUFFERSBASEPROC BindBuffersBase; + PFNGLBINDBUFFERSRANGEPROC BindBuffersRange; + PFNGLBINDFRAGDATALOCATIONPROC BindFragDataLocation; + PFNGLBINDFRAGDATALOCATIONINDEXEDPROC BindFragDataLocationIndexed; + PFNGLBINDFRAMEBUFFERPROC BindFramebuffer; + PFNGLBINDIMAGETEXTUREPROC BindImageTexture; + PFNGLBINDIMAGETEXTURESPROC BindImageTextures; + PFNGLBINDPROGRAMPIPELINEPROC BindProgramPipeline; + PFNGLBINDRENDERBUFFERPROC BindRenderbuffer; + PFNGLBINDSAMPLERPROC BindSampler; + PFNGLBINDSAMPLERSPROC BindSamplers; + PFNGLBINDTEXTUREPROC BindTexture; + PFNGLBINDTEXTUREUNITPROC BindTextureUnit; + PFNGLBINDTEXTURESPROC BindTextures; + PFNGLBINDTRANSFORMFEEDBACKPROC BindTransformFeedback; + PFNGLBINDVERTEXARRAYPROC BindVertexArray; + PFNGLBINDVERTEXBUFFERPROC BindVertexBuffer; + PFNGLBINDVERTEXBUFFERSPROC BindVertexBuffers; + PFNGLBLENDCOLORPROC BlendColor; + PFNGLBLENDEQUATIONPROC BlendEquation; + PFNGLBLENDEQUATIONSEPARATEPROC BlendEquationSeparate; + PFNGLBLENDEQUATIONSEPARATEIPROC BlendEquationSeparatei; + PFNGLBLENDEQUATIONIPROC BlendEquationi; + PFNGLBLENDFUNCPROC BlendFunc; + PFNGLBLENDFUNCSEPARATEPROC BlendFuncSeparate; + PFNGLBLENDFUNCSEPARATEIPROC BlendFuncSeparatei; + PFNGLBLENDFUNCIPROC BlendFunci; + PFNGLBLITFRAMEBUFFERPROC BlitFramebuffer; + PFNGLBLITNAMEDFRAMEBUFFERPROC BlitNamedFramebuffer; + PFNGLBUFFERDATAPROC BufferData; + PFNGLBUFFERSTORAGEPROC BufferStorage; + PFNGLBUFFERSUBDATAPROC BufferSubData; + PFNGLCHECKFRAMEBUFFERSTATUSPROC CheckFramebufferStatus; + PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC CheckNamedFramebufferStatus; + PFNGLCLAMPCOLORPROC ClampColor; + PFNGLCLEARPROC Clear; + PFNGLCLEARBUFFERDATAPROC ClearBufferData; + PFNGLCLEARBUFFERSUBDATAPROC ClearBufferSubData; + PFNGLCLEARBUFFERFIPROC ClearBufferfi; + PFNGLCLEARBUFFERFVPROC ClearBufferfv; + PFNGLCLEARBUFFERIVPROC ClearBufferiv; + PFNGLCLEARBUFFERUIVPROC ClearBufferuiv; + PFNGLCLEARCOLORPROC ClearColor; + PFNGLCLEARDEPTHPROC ClearDepth; + PFNGLCLEARDEPTHFPROC ClearDepthf; + PFNGLCLEARNAMEDBUFFERDATAPROC ClearNamedBufferData; + PFNGLCLEARNAMEDBUFFERSUBDATAPROC ClearNamedBufferSubData; + PFNGLCLEARNAMEDFRAMEBUFFERFIPROC ClearNamedFramebufferfi; + PFNGLCLEARNAMEDFRAMEBUFFERFVPROC ClearNamedFramebufferfv; + PFNGLCLEARNAMEDFRAMEBUFFERIVPROC ClearNamedFramebufferiv; + PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC ClearNamedFramebufferuiv; + PFNGLCLEARSTENCILPROC ClearStencil; + PFNGLCLEARTEXIMAGEPROC ClearTexImage; + PFNGLCLEARTEXSUBIMAGEPROC ClearTexSubImage; + PFNGLCLIENTWAITSYNCPROC ClientWaitSync; + PFNGLCLIPCONTROLPROC ClipControl; + PFNGLCOLORMASKPROC ColorMask; + PFNGLCOLORMASKIPROC ColorMaski; + PFNGLCOMPILESHADERPROC CompileShader; + PFNGLCOMPRESSEDTEXIMAGE1DPROC CompressedTexImage1D; + PFNGLCOMPRESSEDTEXIMAGE2DPROC CompressedTexImage2D; + PFNGLCOMPRESSEDTEXIMAGE3DPROC CompressedTexImage3D; + PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC CompressedTexSubImage1D; + PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC CompressedTexSubImage2D; + PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC CompressedTexSubImage3D; + PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC CompressedTextureSubImage1D; + PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC CompressedTextureSubImage2D; + PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC CompressedTextureSubImage3D; + PFNGLCOPYBUFFERSUBDATAPROC CopyBufferSubData; + PFNGLCOPYIMAGESUBDATAPROC CopyImageSubData; + PFNGLCOPYNAMEDBUFFERSUBDATAPROC CopyNamedBufferSubData; + PFNGLCOPYTEXIMAGE1DPROC CopyTexImage1D; + PFNGLCOPYTEXIMAGE2DPROC CopyTexImage2D; + PFNGLCOPYTEXSUBIMAGE1DPROC CopyTexSubImage1D; + PFNGLCOPYTEXSUBIMAGE2DPROC CopyTexSubImage2D; + PFNGLCOPYTEXSUBIMAGE3DPROC CopyTexSubImage3D; + PFNGLCOPYTEXTURESUBIMAGE1DPROC CopyTextureSubImage1D; + PFNGLCOPYTEXTURESUBIMAGE2DPROC CopyTextureSubImage2D; + PFNGLCOPYTEXTURESUBIMAGE3DPROC CopyTextureSubImage3D; + PFNGLCREATEBUFFERSPROC CreateBuffers; + PFNGLCREATEFRAMEBUFFERSPROC CreateFramebuffers; + PFNGLCREATEPROGRAMPROC CreateProgram; + PFNGLCREATEPROGRAMPIPELINESPROC CreateProgramPipelines; + PFNGLCREATEQUERIESPROC CreateQueries; + PFNGLCREATERENDERBUFFERSPROC CreateRenderbuffers; + PFNGLCREATESAMPLERSPROC CreateSamplers; + PFNGLCREATESHADERPROC CreateShader; + PFNGLCREATESHADERPROGRAMVPROC CreateShaderProgramv; + PFNGLCREATETEXTURESPROC CreateTextures; + PFNGLCREATETRANSFORMFEEDBACKSPROC CreateTransformFeedbacks; + PFNGLCREATEVERTEXARRAYSPROC CreateVertexArrays; + PFNGLCULLFACEPROC CullFace; + PFNGLDEBUGMESSAGECALLBACKPROC DebugMessageCallback; + PFNGLDEBUGMESSAGECONTROLPROC DebugMessageControl; + PFNGLDEBUGMESSAGEINSERTPROC DebugMessageInsert; + PFNGLDELETEBUFFERSPROC DeleteBuffers; + PFNGLDELETEFRAMEBUFFERSPROC DeleteFramebuffers; + PFNGLDELETEPROGRAMPROC DeleteProgram; + PFNGLDELETEPROGRAMPIPELINESPROC DeleteProgramPipelines; + PFNGLDELETEQUERIESPROC DeleteQueries; + PFNGLDELETERENDERBUFFERSPROC DeleteRenderbuffers; + PFNGLDELETESAMPLERSPROC DeleteSamplers; + PFNGLDELETESHADERPROC DeleteShader; + PFNGLDELETESYNCPROC DeleteSync; + PFNGLDELETETEXTURESPROC DeleteTextures; + PFNGLDELETETRANSFORMFEEDBACKSPROC DeleteTransformFeedbacks; + PFNGLDELETEVERTEXARRAYSPROC DeleteVertexArrays; + PFNGLDEPTHFUNCPROC DepthFunc; + PFNGLDEPTHMASKPROC DepthMask; + PFNGLDEPTHRANGEPROC DepthRange; + PFNGLDEPTHRANGEARRAYVPROC DepthRangeArrayv; + PFNGLDEPTHRANGEINDEXEDPROC DepthRangeIndexed; + PFNGLDEPTHRANGEFPROC DepthRangef; + PFNGLDETACHSHADERPROC DetachShader; + PFNGLDISABLEPROC Disable; + PFNGLDISABLEVERTEXARRAYATTRIBPROC DisableVertexArrayAttrib; + PFNGLDISABLEVERTEXATTRIBARRAYPROC DisableVertexAttribArray; + PFNGLDISABLEIPROC Disablei; + PFNGLDISPATCHCOMPUTEPROC DispatchCompute; + PFNGLDISPATCHCOMPUTEINDIRECTPROC DispatchComputeIndirect; + PFNGLDRAWARRAYSPROC DrawArrays; + PFNGLDRAWARRAYSINDIRECTPROC DrawArraysIndirect; + PFNGLDRAWARRAYSINSTANCEDPROC DrawArraysInstanced; + PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC DrawArraysInstancedBaseInstance; + PFNGLDRAWBUFFERPROC DrawBuffer; + PFNGLDRAWBUFFERSPROC DrawBuffers; + PFNGLDRAWELEMENTSPROC DrawElements; + PFNGLDRAWELEMENTSBASEVERTEXPROC DrawElementsBaseVertex; + PFNGLDRAWELEMENTSINDIRECTPROC DrawElementsIndirect; + PFNGLDRAWELEMENTSINSTANCEDPROC DrawElementsInstanced; + PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC DrawElementsInstancedBaseInstance; + PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC DrawElementsInstancedBaseVertex; + PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC + DrawElementsInstancedBaseVertexBaseInstance; + PFNGLDRAWRANGEELEMENTSPROC DrawRangeElements; + PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC DrawRangeElementsBaseVertex; + PFNGLDRAWTRANSFORMFEEDBACKPROC DrawTransformFeedback; + PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC DrawTransformFeedbackInstanced; + PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC DrawTransformFeedbackStream; + PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC DrawTransformFeedbackStreamInstanced; + PFNGLENABLEPROC Enable; + PFNGLENABLEVERTEXARRAYATTRIBPROC EnableVertexArrayAttrib; + PFNGLENABLEVERTEXATTRIBARRAYPROC EnableVertexAttribArray; + PFNGLENABLEIPROC Enablei; + PFNGLENDCONDITIONALRENDERPROC EndConditionalRender; + PFNGLENDQUERYPROC EndQuery; + PFNGLENDQUERYINDEXEDPROC EndQueryIndexed; + PFNGLENDTRANSFORMFEEDBACKPROC EndTransformFeedback; + PFNGLFENCESYNCPROC FenceSync; + PFNGLFINISHPROC Finish; + PFNGLFLUSHPROC Flush; + PFNGLFLUSHMAPPEDBUFFERRANGEPROC FlushMappedBufferRange; + PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC FlushMappedNamedBufferRange; + PFNGLFRAMEBUFFERPARAMETERIPROC FramebufferParameteri; + PFNGLFRAMEBUFFERRENDERBUFFERPROC FramebufferRenderbuffer; + PFNGLFRAMEBUFFERTEXTUREPROC FramebufferTexture; + PFNGLFRAMEBUFFERTEXTURE1DPROC FramebufferTexture1D; + PFNGLFRAMEBUFFERTEXTURE2DPROC FramebufferTexture2D; + PFNGLFRAMEBUFFERTEXTURE3DPROC FramebufferTexture3D; + PFNGLFRAMEBUFFERTEXTURELAYERPROC FramebufferTextureLayer; + PFNGLFRONTFACEPROC FrontFace; + PFNGLGENBUFFERSPROC GenBuffers; + PFNGLGENFRAMEBUFFERSPROC GenFramebuffers; + PFNGLGENPROGRAMPIPELINESPROC GenProgramPipelines; + PFNGLGENQUERIESPROC GenQueries; + PFNGLGENRENDERBUFFERSPROC GenRenderbuffers; + PFNGLGENSAMPLERSPROC GenSamplers; + PFNGLGENTEXTURESPROC GenTextures; + PFNGLGENTRANSFORMFEEDBACKSPROC GenTransformFeedbacks; + PFNGLGENVERTEXARRAYSPROC GenVertexArrays; + PFNGLGENERATEMIPMAPPROC GenerateMipmap; + PFNGLGENERATETEXTUREMIPMAPPROC GenerateTextureMipmap; + PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC GetActiveAtomicCounterBufferiv; + PFNGLGETACTIVEATTRIBPROC GetActiveAttrib; + PFNGLGETACTIVESUBROUTINENAMEPROC GetActiveSubroutineName; + PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC GetActiveSubroutineUniformName; + PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC GetActiveSubroutineUniformiv; + PFNGLGETACTIVEUNIFORMPROC GetActiveUniform; + PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC GetActiveUniformBlockName; + PFNGLGETACTIVEUNIFORMBLOCKIVPROC GetActiveUniformBlockiv; + PFNGLGETACTIVEUNIFORMNAMEPROC GetActiveUniformName; + PFNGLGETACTIVEUNIFORMSIVPROC GetActiveUniformsiv; + PFNGLGETATTACHEDSHADERSPROC GetAttachedShaders; + PFNGLGETATTRIBLOCATIONPROC GetAttribLocation; + PFNGLGETBOOLEANI_VPROC GetBooleani_v; + PFNGLGETBOOLEANVPROC GetBooleanv; + PFNGLGETBUFFERPARAMETERI64VPROC GetBufferParameteri64v; + PFNGLGETBUFFERPARAMETERIVPROC GetBufferParameteriv; + PFNGLGETBUFFERPOINTERVPROC GetBufferPointerv; + PFNGLGETBUFFERSUBDATAPROC GetBufferSubData; + PFNGLGETCOMPRESSEDTEXIMAGEPROC GetCompressedTexImage; + PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC GetCompressedTextureImage; + PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC GetCompressedTextureSubImage; + PFNGLGETDEBUGMESSAGELOGPROC GetDebugMessageLog; + PFNGLGETDOUBLEI_VPROC GetDoublei_v; + PFNGLGETDOUBLEVPROC GetDoublev; + PFNGLGETERRORPROC GetError; + PFNGLGETFLOATI_VPROC GetFloati_v; + PFNGLGETFLOATVPROC GetFloatv; + PFNGLGETFRAGDATAINDEXPROC GetFragDataIndex; + PFNGLGETFRAGDATALOCATIONPROC GetFragDataLocation; + PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC GetFramebufferAttachmentParameteriv; + PFNGLGETFRAMEBUFFERPARAMETERIVPROC GetFramebufferParameteriv; + PFNGLGETGRAPHICSRESETSTATUSPROC GetGraphicsResetStatus; + PFNGLGETINTEGER64I_VPROC GetInteger64i_v; + PFNGLGETINTEGER64VPROC GetInteger64v; + PFNGLGETINTEGERI_VPROC GetIntegeri_v; + PFNGLGETINTEGERVPROC GetIntegerv; + PFNGLGETINTERNALFORMATI64VPROC GetInternalformati64v; + PFNGLGETINTERNALFORMATIVPROC GetInternalformativ; + PFNGLGETMULTISAMPLEFVPROC GetMultisamplefv; + PFNGLGETNAMEDBUFFERPARAMETERI64VPROC GetNamedBufferParameteri64v; + PFNGLGETNAMEDBUFFERPARAMETERIVPROC GetNamedBufferParameteriv; + PFNGLGETNAMEDBUFFERPOINTERVPROC GetNamedBufferPointerv; + PFNGLGETNAMEDBUFFERSUBDATAPROC GetNamedBufferSubData; + PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC GetNamedFramebufferAttachmentParameteriv; + PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC GetNamedFramebufferParameteriv; + PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC GetNamedRenderbufferParameteriv; + PFNGLGETOBJECTLABELPROC GetObjectLabel; + PFNGLGETOBJECTPTRLABELPROC GetObjectPtrLabel; + PFNGLGETPOINTERVPROC GetPointerv; + PFNGLGETPROGRAMBINARYPROC GetProgramBinary; + PFNGLGETPROGRAMINFOLOGPROC GetProgramInfoLog; + PFNGLGETPROGRAMINTERFACEIVPROC GetProgramInterfaceiv; + PFNGLGETPROGRAMPIPELINEINFOLOGPROC GetProgramPipelineInfoLog; + PFNGLGETPROGRAMPIPELINEIVPROC GetProgramPipelineiv; + PFNGLGETPROGRAMRESOURCEINDEXPROC GetProgramResourceIndex; + PFNGLGETPROGRAMRESOURCELOCATIONPROC GetProgramResourceLocation; + PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC GetProgramResourceLocationIndex; + PFNGLGETPROGRAMRESOURCENAMEPROC GetProgramResourceName; + PFNGLGETPROGRAMRESOURCEIVPROC GetProgramResourceiv; + PFNGLGETPROGRAMSTAGEIVPROC GetProgramStageiv; + PFNGLGETPROGRAMIVPROC GetProgramiv; + PFNGLGETQUERYBUFFEROBJECTI64VPROC GetQueryBufferObjecti64v; + PFNGLGETQUERYBUFFEROBJECTIVPROC GetQueryBufferObjectiv; + PFNGLGETQUERYBUFFEROBJECTUI64VPROC GetQueryBufferObjectui64v; + PFNGLGETQUERYBUFFEROBJECTUIVPROC GetQueryBufferObjectuiv; + PFNGLGETQUERYINDEXEDIVPROC GetQueryIndexediv; + PFNGLGETQUERYOBJECTI64VPROC GetQueryObjecti64v; + PFNGLGETQUERYOBJECTIVPROC GetQueryObjectiv; + PFNGLGETQUERYOBJECTUI64VPROC GetQueryObjectui64v; + PFNGLGETQUERYOBJECTUIVPROC GetQueryObjectuiv; + PFNGLGETQUERYIVPROC GetQueryiv; + PFNGLGETRENDERBUFFERPARAMETERIVPROC GetRenderbufferParameteriv; + PFNGLGETSAMPLERPARAMETERIIVPROC GetSamplerParameterIiv; + PFNGLGETSAMPLERPARAMETERIUIVPROC GetSamplerParameterIuiv; + PFNGLGETSAMPLERPARAMETERFVPROC GetSamplerParameterfv; + PFNGLGETSAMPLERPARAMETERIVPROC GetSamplerParameteriv; + PFNGLGETSHADERINFOLOGPROC GetShaderInfoLog; + PFNGLGETSHADERPRECISIONFORMATPROC GetShaderPrecisionFormat; + PFNGLGETSHADERSOURCEPROC GetShaderSource; + PFNGLGETSHADERIVPROC GetShaderiv; + PFNGLGETSTRINGPROC GetString; + PFNGLGETSTRINGIPROC GetStringi; + PFNGLGETSUBROUTINEINDEXPROC GetSubroutineIndex; + PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC GetSubroutineUniformLocation; + PFNGLGETSYNCIVPROC GetSynciv; + PFNGLGETTEXIMAGEPROC GetTexImage; + PFNGLGETTEXLEVELPARAMETERFVPROC GetTexLevelParameterfv; + PFNGLGETTEXLEVELPARAMETERIVPROC GetTexLevelParameteriv; + PFNGLGETTEXPARAMETERIIVPROC GetTexParameterIiv; + PFNGLGETTEXPARAMETERIUIVPROC GetTexParameterIuiv; + PFNGLGETTEXPARAMETERFVPROC GetTexParameterfv; + PFNGLGETTEXPARAMETERIVPROC GetTexParameteriv; + PFNGLGETTEXTUREIMAGEPROC GetTextureImage; + PFNGLGETTEXTURELEVELPARAMETERFVPROC GetTextureLevelParameterfv; + PFNGLGETTEXTURELEVELPARAMETERIVPROC GetTextureLevelParameteriv; + PFNGLGETTEXTUREPARAMETERIIVPROC GetTextureParameterIiv; + PFNGLGETTEXTUREPARAMETERIUIVPROC GetTextureParameterIuiv; + PFNGLGETTEXTUREPARAMETERFVPROC GetTextureParameterfv; + PFNGLGETTEXTUREPARAMETERIVPROC GetTextureParameteriv; + PFNGLGETTEXTURESUBIMAGEPROC GetTextureSubImage; + PFNGLGETTRANSFORMFEEDBACKVARYINGPROC GetTransformFeedbackVarying; + PFNGLGETTRANSFORMFEEDBACKI64_VPROC GetTransformFeedbacki64_v; + PFNGLGETTRANSFORMFEEDBACKI_VPROC GetTransformFeedbacki_v; + PFNGLGETTRANSFORMFEEDBACKIVPROC GetTransformFeedbackiv; + PFNGLGETUNIFORMBLOCKINDEXPROC GetUniformBlockIndex; + PFNGLGETUNIFORMINDICESPROC GetUniformIndices; + PFNGLGETUNIFORMLOCATIONPROC GetUniformLocation; + PFNGLGETUNIFORMSUBROUTINEUIVPROC GetUniformSubroutineuiv; + PFNGLGETUNIFORMDVPROC GetUniformdv; + PFNGLGETUNIFORMFVPROC GetUniformfv; + PFNGLGETUNIFORMIVPROC GetUniformiv; + PFNGLGETUNIFORMUIVPROC GetUniformuiv; + PFNGLGETVERTEXARRAYINDEXED64IVPROC GetVertexArrayIndexed64iv; + PFNGLGETVERTEXARRAYINDEXEDIVPROC GetVertexArrayIndexediv; + PFNGLGETVERTEXARRAYIVPROC GetVertexArrayiv; + PFNGLGETVERTEXATTRIBIIVPROC GetVertexAttribIiv; + PFNGLGETVERTEXATTRIBIUIVPROC GetVertexAttribIuiv; + PFNGLGETVERTEXATTRIBLDVPROC GetVertexAttribLdv; + PFNGLGETVERTEXATTRIBPOINTERVPROC GetVertexAttribPointerv; + PFNGLGETVERTEXATTRIBDVPROC GetVertexAttribdv; + PFNGLGETVERTEXATTRIBFVPROC GetVertexAttribfv; + PFNGLGETVERTEXATTRIBIVPROC GetVertexAttribiv; + PFNGLGETNCOMPRESSEDTEXIMAGEPROC GetnCompressedTexImage; + PFNGLGETNTEXIMAGEPROC GetnTexImage; + PFNGLGETNUNIFORMDVPROC GetnUniformdv; + PFNGLGETNUNIFORMFVPROC GetnUniformfv; + PFNGLGETNUNIFORMIVPROC GetnUniformiv; + PFNGLGETNUNIFORMUIVPROC GetnUniformuiv; + PFNGLHINTPROC Hint; + PFNGLINVALIDATEBUFFERDATAPROC InvalidateBufferData; + PFNGLINVALIDATEBUFFERSUBDATAPROC InvalidateBufferSubData; + PFNGLINVALIDATEFRAMEBUFFERPROC InvalidateFramebuffer; + PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC InvalidateNamedFramebufferData; + PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC InvalidateNamedFramebufferSubData; + PFNGLINVALIDATESUBFRAMEBUFFERPROC InvalidateSubFramebuffer; + PFNGLINVALIDATETEXIMAGEPROC InvalidateTexImage; + PFNGLINVALIDATETEXSUBIMAGEPROC InvalidateTexSubImage; + PFNGLISBUFFERPROC IsBuffer; + PFNGLISENABLEDPROC IsEnabled; + PFNGLISENABLEDIPROC IsEnabledi; + PFNGLISFRAMEBUFFERPROC IsFramebuffer; + PFNGLISPROGRAMPROC IsProgram; + PFNGLISPROGRAMPIPELINEPROC IsProgramPipeline; + PFNGLISQUERYPROC IsQuery; + PFNGLISRENDERBUFFERPROC IsRenderbuffer; + PFNGLISSAMPLERPROC IsSampler; + PFNGLISSHADERPROC IsShader; + PFNGLISSYNCPROC IsSync; + PFNGLISTEXTUREPROC IsTexture; + PFNGLISTRANSFORMFEEDBACKPROC IsTransformFeedback; + PFNGLISVERTEXARRAYPROC IsVertexArray; + PFNGLLINEWIDTHPROC LineWidth; + PFNGLLINKPROGRAMPROC LinkProgram; + PFNGLLOGICOPPROC LogicOp; + PFNGLMAPBUFFERPROC MapBuffer; + PFNGLMAPBUFFERRANGEPROC MapBufferRange; + PFNGLMAPNAMEDBUFFERPROC MapNamedBuffer; + PFNGLMAPNAMEDBUFFERRANGEPROC MapNamedBufferRange; + PFNGLMEMORYBARRIERPROC MemoryBarrier; + PFNGLMEMORYBARRIERBYREGIONPROC MemoryBarrierByRegion; + PFNGLMINSAMPLESHADINGPROC MinSampleShading; + PFNGLMULTIDRAWARRAYSPROC MultiDrawArrays; + PFNGLMULTIDRAWARRAYSINDIRECTPROC MultiDrawArraysIndirect; + PFNGLMULTIDRAWARRAYSINDIRECTCOUNTPROC MultiDrawArraysIndirectCount; + PFNGLMULTIDRAWELEMENTSPROC MultiDrawElements; + PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC MultiDrawElementsBaseVertex; + PFNGLMULTIDRAWELEMENTSINDIRECTPROC MultiDrawElementsIndirect; + PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTPROC MultiDrawElementsIndirectCount; + PFNGLNAMEDBUFFERDATAPROC NamedBufferData; + PFNGLNAMEDBUFFERSTORAGEPROC NamedBufferStorage; + PFNGLNAMEDBUFFERSUBDATAPROC NamedBufferSubData; + PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC NamedFramebufferDrawBuffer; + PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC NamedFramebufferDrawBuffers; + PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC NamedFramebufferParameteri; + PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC NamedFramebufferReadBuffer; + PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC NamedFramebufferRenderbuffer; + PFNGLNAMEDFRAMEBUFFERTEXTUREPROC NamedFramebufferTexture; + PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC NamedFramebufferTextureLayer; + PFNGLNAMEDRENDERBUFFERSTORAGEPROC NamedRenderbufferStorage; + PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC NamedRenderbufferStorageMultisample; + PFNGLOBJECTLABELPROC ObjectLabel; + PFNGLOBJECTPTRLABELPROC ObjectPtrLabel; + PFNGLPATCHPARAMETERFVPROC PatchParameterfv; + PFNGLPATCHPARAMETERIPROC PatchParameteri; + PFNGLPAUSETRANSFORMFEEDBACKPROC PauseTransformFeedback; + PFNGLPIXELSTOREFPROC PixelStoref; + PFNGLPIXELSTOREIPROC PixelStorei; + PFNGLPOINTPARAMETERFPROC PointParameterf; + PFNGLPOINTPARAMETERFVPROC PointParameterfv; + PFNGLPOINTPARAMETERIPROC PointParameteri; + PFNGLPOINTPARAMETERIVPROC PointParameteriv; + PFNGLPOINTSIZEPROC PointSize; + PFNGLPOLYGONMODEPROC PolygonMode; + PFNGLPOLYGONOFFSETPROC PolygonOffset; + PFNGLPOLYGONOFFSETCLAMPPROC PolygonOffsetClamp; + PFNGLPOPDEBUGGROUPPROC PopDebugGroup; + PFNGLPRIMITIVERESTARTINDEXPROC PrimitiveRestartIndex; + PFNGLPROGRAMBINARYPROC ProgramBinary; + PFNGLPROGRAMPARAMETERIPROC ProgramParameteri; + PFNGLPROGRAMUNIFORM1DPROC ProgramUniform1d; + PFNGLPROGRAMUNIFORM1DVPROC ProgramUniform1dv; + PFNGLPROGRAMUNIFORM1FPROC ProgramUniform1f; + PFNGLPROGRAMUNIFORM1FVPROC ProgramUniform1fv; + PFNGLPROGRAMUNIFORM1IPROC ProgramUniform1i; + PFNGLPROGRAMUNIFORM1IVPROC ProgramUniform1iv; + PFNGLPROGRAMUNIFORM1UIPROC ProgramUniform1ui; + PFNGLPROGRAMUNIFORM1UIVPROC ProgramUniform1uiv; + PFNGLPROGRAMUNIFORM2DPROC ProgramUniform2d; + PFNGLPROGRAMUNIFORM2DVPROC ProgramUniform2dv; + PFNGLPROGRAMUNIFORM2FPROC ProgramUniform2f; + PFNGLPROGRAMUNIFORM2FVPROC ProgramUniform2fv; + PFNGLPROGRAMUNIFORM2IPROC ProgramUniform2i; + PFNGLPROGRAMUNIFORM2IVPROC ProgramUniform2iv; + PFNGLPROGRAMUNIFORM2UIPROC ProgramUniform2ui; + PFNGLPROGRAMUNIFORM2UIVPROC ProgramUniform2uiv; + PFNGLPROGRAMUNIFORM3DPROC ProgramUniform3d; + PFNGLPROGRAMUNIFORM3DVPROC ProgramUniform3dv; + PFNGLPROGRAMUNIFORM3FPROC ProgramUniform3f; + PFNGLPROGRAMUNIFORM3FVPROC ProgramUniform3fv; + PFNGLPROGRAMUNIFORM3IPROC ProgramUniform3i; + PFNGLPROGRAMUNIFORM3IVPROC ProgramUniform3iv; + PFNGLPROGRAMUNIFORM3UIPROC ProgramUniform3ui; + PFNGLPROGRAMUNIFORM3UIVPROC ProgramUniform3uiv; + PFNGLPROGRAMUNIFORM4DPROC ProgramUniform4d; + PFNGLPROGRAMUNIFORM4DVPROC ProgramUniform4dv; + PFNGLPROGRAMUNIFORM4FPROC ProgramUniform4f; + PFNGLPROGRAMUNIFORM4FVPROC ProgramUniform4fv; + PFNGLPROGRAMUNIFORM4IPROC ProgramUniform4i; + PFNGLPROGRAMUNIFORM4IVPROC ProgramUniform4iv; + PFNGLPROGRAMUNIFORM4UIPROC ProgramUniform4ui; + PFNGLPROGRAMUNIFORM4UIVPROC ProgramUniform4uiv; + PFNGLPROGRAMUNIFORMMATRIX2DVPROC ProgramUniformMatrix2dv; + PFNGLPROGRAMUNIFORMMATRIX2FVPROC ProgramUniformMatrix2fv; + PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC ProgramUniformMatrix2x3dv; + PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC ProgramUniformMatrix2x3fv; + PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC ProgramUniformMatrix2x4dv; + PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC ProgramUniformMatrix2x4fv; + PFNGLPROGRAMUNIFORMMATRIX3DVPROC ProgramUniformMatrix3dv; + PFNGLPROGRAMUNIFORMMATRIX3FVPROC ProgramUniformMatrix3fv; + PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC ProgramUniformMatrix3x2dv; + PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC ProgramUniformMatrix3x2fv; + PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC ProgramUniformMatrix3x4dv; + PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC ProgramUniformMatrix3x4fv; + PFNGLPROGRAMUNIFORMMATRIX4DVPROC ProgramUniformMatrix4dv; + PFNGLPROGRAMUNIFORMMATRIX4FVPROC ProgramUniformMatrix4fv; + PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC ProgramUniformMatrix4x2dv; + PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC ProgramUniformMatrix4x2fv; + PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC ProgramUniformMatrix4x3dv; + PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC ProgramUniformMatrix4x3fv; + PFNGLPROVOKINGVERTEXPROC ProvokingVertex; + PFNGLPUSHDEBUGGROUPPROC PushDebugGroup; + PFNGLQUERYCOUNTERPROC QueryCounter; + PFNGLREADBUFFERPROC ReadBuffer; + PFNGLREADPIXELSPROC ReadPixels; + PFNGLREADNPIXELSPROC ReadnPixels; + PFNGLRELEASESHADERCOMPILERPROC ReleaseShaderCompiler; + PFNGLRENDERBUFFERSTORAGEPROC RenderbufferStorage; + PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC RenderbufferStorageMultisample; + PFNGLRESUMETRANSFORMFEEDBACKPROC ResumeTransformFeedback; + PFNGLSAMPLECOVERAGEPROC SampleCoverage; + PFNGLSAMPLEMASKIPROC SampleMaski; + PFNGLSAMPLERPARAMETERIIVPROC SamplerParameterIiv; + PFNGLSAMPLERPARAMETERIUIVPROC SamplerParameterIuiv; + PFNGLSAMPLERPARAMETERFPROC SamplerParameterf; + PFNGLSAMPLERPARAMETERFVPROC SamplerParameterfv; + PFNGLSAMPLERPARAMETERIPROC SamplerParameteri; + PFNGLSAMPLERPARAMETERIVPROC SamplerParameteriv; + PFNGLSCISSORPROC Scissor; + PFNGLSCISSORARRAYVPROC ScissorArrayv; + PFNGLSCISSORINDEXEDPROC ScissorIndexed; + PFNGLSCISSORINDEXEDVPROC ScissorIndexedv; + PFNGLSHADERBINARYPROC ShaderBinary; + PFNGLSHADERSOURCEPROC ShaderSource; + PFNGLSHADERSTORAGEBLOCKBINDINGPROC ShaderStorageBlockBinding; + PFNGLSPECIALIZESHADERPROC SpecializeShader; + PFNGLSTENCILFUNCPROC StencilFunc; + PFNGLSTENCILFUNCSEPARATEPROC StencilFuncSeparate; + PFNGLSTENCILMASKPROC StencilMask; + PFNGLSTENCILMASKSEPARATEPROC StencilMaskSeparate; + PFNGLSTENCILOPPROC StencilOp; + PFNGLSTENCILOPSEPARATEPROC StencilOpSeparate; + PFNGLTEXBUFFERPROC TexBuffer; + PFNGLTEXBUFFERRANGEPROC TexBufferRange; + PFNGLTEXIMAGE1DPROC TexImage1D; + PFNGLTEXIMAGE2DPROC TexImage2D; + PFNGLTEXIMAGE2DMULTISAMPLEPROC TexImage2DMultisample; + PFNGLTEXIMAGE3DPROC TexImage3D; + PFNGLTEXIMAGE3DMULTISAMPLEPROC TexImage3DMultisample; + PFNGLTEXPARAMETERIIVPROC TexParameterIiv; + PFNGLTEXPARAMETERIUIVPROC TexParameterIuiv; + PFNGLTEXPARAMETERFPROC TexParameterf; + PFNGLTEXPARAMETERFVPROC TexParameterfv; + PFNGLTEXPARAMETERIPROC TexParameteri; + PFNGLTEXPARAMETERIVPROC TexParameteriv; + PFNGLTEXSTORAGE1DPROC TexStorage1D; + PFNGLTEXSTORAGE2DPROC TexStorage2D; + PFNGLTEXSTORAGE2DMULTISAMPLEPROC TexStorage2DMultisample; + PFNGLTEXSTORAGE3DPROC TexStorage3D; + PFNGLTEXSTORAGE3DMULTISAMPLEPROC TexStorage3DMultisample; + PFNGLTEXSUBIMAGE1DPROC TexSubImage1D; + PFNGLTEXSUBIMAGE2DPROC TexSubImage2D; + PFNGLTEXSUBIMAGE3DPROC TexSubImage3D; + PFNGLTEXTUREBARRIERPROC TextureBarrier; + PFNGLTEXTUREBUFFERPROC TextureBuffer; + PFNGLTEXTUREBUFFERRANGEPROC TextureBufferRange; + PFNGLTEXTUREPARAMETERIIVPROC TextureParameterIiv; + PFNGLTEXTUREPARAMETERIUIVPROC TextureParameterIuiv; + PFNGLTEXTUREPARAMETERFPROC TextureParameterf; + PFNGLTEXTUREPARAMETERFVPROC TextureParameterfv; + PFNGLTEXTUREPARAMETERIPROC TextureParameteri; + PFNGLTEXTUREPARAMETERIVPROC TextureParameteriv; + PFNGLTEXTURESTORAGE1DPROC TextureStorage1D; + PFNGLTEXTURESTORAGE2DPROC TextureStorage2D; + PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC TextureStorage2DMultisample; + PFNGLTEXTURESTORAGE3DPROC TextureStorage3D; + PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC TextureStorage3DMultisample; + PFNGLTEXTURESUBIMAGE1DPROC TextureSubImage1D; + PFNGLTEXTURESUBIMAGE2DPROC TextureSubImage2D; + PFNGLTEXTURESUBIMAGE3DPROC TextureSubImage3D; + PFNGLTEXTUREVIEWPROC TextureView; + PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC TransformFeedbackBufferBase; + PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC TransformFeedbackBufferRange; + PFNGLTRANSFORMFEEDBACKVARYINGSPROC TransformFeedbackVaryings; + PFNGLUNIFORM1DPROC Uniform1d; + PFNGLUNIFORM1DVPROC Uniform1dv; + PFNGLUNIFORM1FPROC Uniform1f; + PFNGLUNIFORM1FVPROC Uniform1fv; + PFNGLUNIFORM1IPROC Uniform1i; + PFNGLUNIFORM1IVPROC Uniform1iv; + PFNGLUNIFORM1UIPROC Uniform1ui; + PFNGLUNIFORM1UIVPROC Uniform1uiv; + PFNGLUNIFORM2DPROC Uniform2d; + PFNGLUNIFORM2DVPROC Uniform2dv; + PFNGLUNIFORM2FPROC Uniform2f; + PFNGLUNIFORM2FVPROC Uniform2fv; + PFNGLUNIFORM2IPROC Uniform2i; + PFNGLUNIFORM2IVPROC Uniform2iv; + PFNGLUNIFORM2UIPROC Uniform2ui; + PFNGLUNIFORM2UIVPROC Uniform2uiv; + PFNGLUNIFORM3DPROC Uniform3d; + PFNGLUNIFORM3DVPROC Uniform3dv; + PFNGLUNIFORM3FPROC Uniform3f; + PFNGLUNIFORM3FVPROC Uniform3fv; + PFNGLUNIFORM3IPROC Uniform3i; + PFNGLUNIFORM3IVPROC Uniform3iv; + PFNGLUNIFORM3UIPROC Uniform3ui; + PFNGLUNIFORM3UIVPROC Uniform3uiv; + PFNGLUNIFORM4DPROC Uniform4d; + PFNGLUNIFORM4DVPROC Uniform4dv; + PFNGLUNIFORM4FPROC Uniform4f; + PFNGLUNIFORM4FVPROC Uniform4fv; + PFNGLUNIFORM4IPROC Uniform4i; + PFNGLUNIFORM4IVPROC Uniform4iv; + PFNGLUNIFORM4UIPROC Uniform4ui; + PFNGLUNIFORM4UIVPROC Uniform4uiv; + PFNGLUNIFORMBLOCKBINDINGPROC UniformBlockBinding; + PFNGLUNIFORMMATRIX2DVPROC UniformMatrix2dv; + PFNGLUNIFORMMATRIX2FVPROC UniformMatrix2fv; + PFNGLUNIFORMMATRIX2X3DVPROC UniformMatrix2x3dv; + PFNGLUNIFORMMATRIX2X3FVPROC UniformMatrix2x3fv; + PFNGLUNIFORMMATRIX2X4DVPROC UniformMatrix2x4dv; + PFNGLUNIFORMMATRIX2X4FVPROC UniformMatrix2x4fv; + PFNGLUNIFORMMATRIX3DVPROC UniformMatrix3dv; + PFNGLUNIFORMMATRIX3FVPROC UniformMatrix3fv; + PFNGLUNIFORMMATRIX3X2DVPROC UniformMatrix3x2dv; + PFNGLUNIFORMMATRIX3X2FVPROC UniformMatrix3x2fv; + PFNGLUNIFORMMATRIX3X4DVPROC UniformMatrix3x4dv; + PFNGLUNIFORMMATRIX3X4FVPROC UniformMatrix3x4fv; + PFNGLUNIFORMMATRIX4DVPROC UniformMatrix4dv; + PFNGLUNIFORMMATRIX4FVPROC UniformMatrix4fv; + PFNGLUNIFORMMATRIX4X2DVPROC UniformMatrix4x2dv; + PFNGLUNIFORMMATRIX4X2FVPROC UniformMatrix4x2fv; + PFNGLUNIFORMMATRIX4X3DVPROC UniformMatrix4x3dv; + PFNGLUNIFORMMATRIX4X3FVPROC UniformMatrix4x3fv; + PFNGLUNIFORMSUBROUTINESUIVPROC UniformSubroutinesuiv; + PFNGLUNMAPBUFFERPROC UnmapBuffer; + PFNGLUNMAPNAMEDBUFFERPROC UnmapNamedBuffer; + PFNGLUSEPROGRAMPROC UseProgram; + PFNGLUSEPROGRAMSTAGESPROC UseProgramStages; + PFNGLVALIDATEPROGRAMPROC ValidateProgram; + PFNGLVALIDATEPROGRAMPIPELINEPROC ValidateProgramPipeline; + PFNGLVERTEXARRAYATTRIBBINDINGPROC VertexArrayAttribBinding; + PFNGLVERTEXARRAYATTRIBFORMATPROC VertexArrayAttribFormat; + PFNGLVERTEXARRAYATTRIBIFORMATPROC VertexArrayAttribIFormat; + PFNGLVERTEXARRAYATTRIBLFORMATPROC VertexArrayAttribLFormat; + PFNGLVERTEXARRAYBINDINGDIVISORPROC VertexArrayBindingDivisor; + PFNGLVERTEXARRAYELEMENTBUFFERPROC VertexArrayElementBuffer; + PFNGLVERTEXARRAYVERTEXBUFFERPROC VertexArrayVertexBuffer; + PFNGLVERTEXARRAYVERTEXBUFFERSPROC VertexArrayVertexBuffers; + PFNGLVERTEXATTRIB1DPROC VertexAttrib1d; + PFNGLVERTEXATTRIB1DVPROC VertexAttrib1dv; + PFNGLVERTEXATTRIB1FPROC VertexAttrib1f; + PFNGLVERTEXATTRIB1FVPROC VertexAttrib1fv; + PFNGLVERTEXATTRIB1SPROC VertexAttrib1s; + PFNGLVERTEXATTRIB1SVPROC VertexAttrib1sv; + PFNGLVERTEXATTRIB2DPROC VertexAttrib2d; + PFNGLVERTEXATTRIB2DVPROC VertexAttrib2dv; + PFNGLVERTEXATTRIB2FPROC VertexAttrib2f; + PFNGLVERTEXATTRIB2FVPROC VertexAttrib2fv; + PFNGLVERTEXATTRIB2SPROC VertexAttrib2s; + PFNGLVERTEXATTRIB2SVPROC VertexAttrib2sv; + PFNGLVERTEXATTRIB3DPROC VertexAttrib3d; + PFNGLVERTEXATTRIB3DVPROC VertexAttrib3dv; + PFNGLVERTEXATTRIB3FPROC VertexAttrib3f; + PFNGLVERTEXATTRIB3FVPROC VertexAttrib3fv; + PFNGLVERTEXATTRIB3SPROC VertexAttrib3s; + PFNGLVERTEXATTRIB3SVPROC VertexAttrib3sv; + PFNGLVERTEXATTRIB4NBVPROC VertexAttrib4Nbv; + PFNGLVERTEXATTRIB4NIVPROC VertexAttrib4Niv; + PFNGLVERTEXATTRIB4NSVPROC VertexAttrib4Nsv; + PFNGLVERTEXATTRIB4NUBPROC VertexAttrib4Nub; + PFNGLVERTEXATTRIB4NUBVPROC VertexAttrib4Nubv; + PFNGLVERTEXATTRIB4NUIVPROC VertexAttrib4Nuiv; + PFNGLVERTEXATTRIB4NUSVPROC VertexAttrib4Nusv; + PFNGLVERTEXATTRIB4BVPROC VertexAttrib4bv; + PFNGLVERTEXATTRIB4DPROC VertexAttrib4d; + PFNGLVERTEXATTRIB4DVPROC VertexAttrib4dv; + PFNGLVERTEXATTRIB4FPROC VertexAttrib4f; + PFNGLVERTEXATTRIB4FVPROC VertexAttrib4fv; + PFNGLVERTEXATTRIB4IVPROC VertexAttrib4iv; + PFNGLVERTEXATTRIB4SPROC VertexAttrib4s; + PFNGLVERTEXATTRIB4SVPROC VertexAttrib4sv; + PFNGLVERTEXATTRIB4UBVPROC VertexAttrib4ubv; + PFNGLVERTEXATTRIB4UIVPROC VertexAttrib4uiv; + PFNGLVERTEXATTRIB4USVPROC VertexAttrib4usv; + PFNGLVERTEXATTRIBBINDINGPROC VertexAttribBinding; + PFNGLVERTEXATTRIBDIVISORPROC VertexAttribDivisor; + PFNGLVERTEXATTRIBFORMATPROC VertexAttribFormat; + PFNGLVERTEXATTRIBI1IPROC VertexAttribI1i; + PFNGLVERTEXATTRIBI1IVPROC VertexAttribI1iv; + PFNGLVERTEXATTRIBI1UIPROC VertexAttribI1ui; + PFNGLVERTEXATTRIBI1UIVPROC VertexAttribI1uiv; + PFNGLVERTEXATTRIBI2IPROC VertexAttribI2i; + PFNGLVERTEXATTRIBI2IVPROC VertexAttribI2iv; + PFNGLVERTEXATTRIBI2UIPROC VertexAttribI2ui; + PFNGLVERTEXATTRIBI2UIVPROC VertexAttribI2uiv; + PFNGLVERTEXATTRIBI3IPROC VertexAttribI3i; + PFNGLVERTEXATTRIBI3IVPROC VertexAttribI3iv; + PFNGLVERTEXATTRIBI3UIPROC VertexAttribI3ui; + PFNGLVERTEXATTRIBI3UIVPROC VertexAttribI3uiv; + PFNGLVERTEXATTRIBI4BVPROC VertexAttribI4bv; + PFNGLVERTEXATTRIBI4IPROC VertexAttribI4i; + PFNGLVERTEXATTRIBI4IVPROC VertexAttribI4iv; + PFNGLVERTEXATTRIBI4SVPROC VertexAttribI4sv; + PFNGLVERTEXATTRIBI4UBVPROC VertexAttribI4ubv; + PFNGLVERTEXATTRIBI4UIPROC VertexAttribI4ui; + PFNGLVERTEXATTRIBI4UIVPROC VertexAttribI4uiv; + PFNGLVERTEXATTRIBI4USVPROC VertexAttribI4usv; + PFNGLVERTEXATTRIBIFORMATPROC VertexAttribIFormat; + PFNGLVERTEXATTRIBIPOINTERPROC VertexAttribIPointer; + PFNGLVERTEXATTRIBL1DPROC VertexAttribL1d; + PFNGLVERTEXATTRIBL1DVPROC VertexAttribL1dv; + PFNGLVERTEXATTRIBL2DPROC VertexAttribL2d; + PFNGLVERTEXATTRIBL2DVPROC VertexAttribL2dv; + PFNGLVERTEXATTRIBL3DPROC VertexAttribL3d; + PFNGLVERTEXATTRIBL3DVPROC VertexAttribL3dv; + PFNGLVERTEXATTRIBL4DPROC VertexAttribL4d; + PFNGLVERTEXATTRIBL4DVPROC VertexAttribL4dv; + PFNGLVERTEXATTRIBLFORMATPROC VertexAttribLFormat; + PFNGLVERTEXATTRIBLPOINTERPROC VertexAttribLPointer; + PFNGLVERTEXATTRIBP1UIPROC VertexAttribP1ui; + PFNGLVERTEXATTRIBP1UIVPROC VertexAttribP1uiv; + PFNGLVERTEXATTRIBP2UIPROC VertexAttribP2ui; + PFNGLVERTEXATTRIBP2UIVPROC VertexAttribP2uiv; + PFNGLVERTEXATTRIBP3UIPROC VertexAttribP3ui; + PFNGLVERTEXATTRIBP3UIVPROC VertexAttribP3uiv; + PFNGLVERTEXATTRIBP4UIPROC VertexAttribP4ui; + PFNGLVERTEXATTRIBP4UIVPROC VertexAttribP4uiv; + PFNGLVERTEXATTRIBPOINTERPROC VertexAttribPointer; + PFNGLVERTEXBINDINGDIVISORPROC VertexBindingDivisor; + PFNGLVIEWPORTPROC Viewport; + PFNGLVIEWPORTARRAYVPROC ViewportArrayv; + PFNGLVIEWPORTINDEXEDFPROC ViewportIndexedf; + PFNGLVIEWPORTINDEXEDFVPROC ViewportIndexedfv; + PFNGLWAITSYNCPROC WaitSync; + +} GladGLContext; + +#ifdef __cplusplus +} +#endif +#endif diff --git a/StgSharp.Native/sn-head/glfw_function.h b/StgSharp.Native/sn-head/glfw_function.h index 57546488..36f7fc98 100644 --- a/StgSharp.Native/sn-head/glfw_function.h +++ b/StgSharp.Native/sn-head/glfw_function.h @@ -1,146 +1,146 @@ -#ifndef GLFW_FUNCTION_TABLE_H -#define GLFW_FUNCTION_TABLE_H - -#include "../lib/glfw/glfw3.h" - -#ifdef __cplusplus -extern "C" { -#endif -typedef struct GLFWFunctionTable { - GLFWcursor *(*glfwCreateCursor)(const GLFWimage *image, int xhot, int yhot); - GLFWcursor *(*glfwCreateStandardCursor)(int shape); - GLFWwindow *(*glfwCreateWindow)(int width, int height, const char *title, - GLFWmonitor *monitor, GLFWwindow *share); - void (*glfwDefaultWindowHints)(void); - void (*glfwDestroyCursor)(GLFWcursor *cursor); - void (*glfwDestroyWindow)(GLFWwindow *window); - int (*glfwExtensionSupported)(const char *extension); - void (*glfwFocusWindow)(GLFWwindow *window); - const char *(*glfwGetClipboardString)(GLFWwindow *window); - GLFWwindow *(*glfwGetCurrentContext)(void); - void (*glfwGetCursorPos)(GLFWwindow *window, double *xpos, double *ypos); - int (*glfwGetError)(const char **description); - void (*glfwGetFrameBufferSize)(GLFWwindow *window, int *width, int *height); - const char *(*glfwGetGamepadName)(int jid); - int (*glfwGetGamepadState)(int jid, GLFWgamepadstate *state); - const GLFWgammaramp *(*glfwGetGammaRamp)(GLFWmonitor *monitor); - int (*glfwGetInputMode)(GLFWwindow *window, int mode); - const float *(*glfwGetJoystickAxes)(int jid, int *count); - const unsigned char *(*glfwGetJoystickButtons)(int jid, int *count); - const char *(*glfwGetJoystickGUID)(int jid); - const unsigned char *(*glfwGetJoystickHats)(int jid, int *count); - const char *(*glfwGetJoystickName)(int jid); - void *(*glfwGetJoystickUserPointer)(int jid); - int (*glfwGetKey)(GLFWwindow *window, int key); - const char *(*glfwGetKeyName)(int key, int scancode); - int (*glfwGetKeyScancode)(int key); - void (*glfwGetMonitorContentScale)(GLFWmonitor *monitor, float *xscale, float *yscale); - const char *(*glfwGetMonitorName)(GLFWmonitor *monitor); - void (*glfwGetMonitorPhysicalSize)(GLFWmonitor *monitor, int *widthMM, int *heightMM); - void (*glfwGetMonitorPos)(GLFWmonitor *monitor, int *xpos, int *ypos); - GLFWmonitor **(*glfwGetMonitors)(int *count); - void *(*glfwGetMonitorUserPointer)(GLFWmonitor *monitor); - void (*glfwGetMonitorWorkarea)(GLFWmonitor *monitor, int *xpos, int *ypos, int *width, - int *height); - int (*glfwGetMouseButton)(GLFWwindow *window, int button); - GLFWmonitor *(*glfwGetPrimaryMonitor)(void); - GLFWglproc (*glfwGetProcAddress)(const char *procname); - const char **(*glfwGetRequiredInstanceExtensions)(unsigned int *count); - double (*glfwGetTime)(void); - unsigned long long (*glfwGetTimerFrequency)(void); - unsigned long long (*glfwGetTimerValue)(void); - void (*glfwGetVersion)(int *major, int *minor, int *rev); - const char *(*glfwGetVersionString)(void); - const GLFWvidmode *(*glfwGetVideoMode)(GLFWmonitor *monitor); - const GLFWvidmode *(*glfwGetVideoModes)(GLFWmonitor *monitor, int *count); - int (*glfwGetWindowAttrib)(GLFWwindow *window, int attrib); - void (*glfwGetWindowContentScale)(GLFWwindow *window, float *xscale, float *yscale); - void (*glfwGetWindowFrameSize)(GLFWwindow *window, int *left, int *top, int *right, - int *bottom); - GLFWmonitor *(*glfwGetWindowMonitor)(GLFWwindow *window); - float (*glfwGetWindowOpacity)(GLFWwindow *window); - void (*glfwGetWindowPos)(GLFWwindow *window, int *xpos, int *ypos); - void (*glfwGetWindowSize)(GLFWwindow *window, int *width, int *height); - void *(*glfwGetWindowUserPointer)(GLFWwindow *window); - void (*glfwHideWindow)(GLFWwindow *window); - void (*glfwIconifyWindow)(GLFWwindow *window); - int (*glfwInit)(void); - void (*glfwInitHint)(int hint, int value); - int (*glfwJoystickIsGamePad)(int jid); - int (*glfwJoystickPresent)(int jid); - void (*glfwMakeContextCurrent)(GLFWwindow *window); - void (*glfwMaximizeWindow)(GLFWwindow *window); - void (*glfwPollEvents)(void); - void (*glfwPostEmptyEvent)(void); - int (*glfwRawMouseMotionSupported)(void); - void (*glfwRequestWindowAttention)(GLFWwindow *window); - void (*glfwRestoreWindow)(GLFWwindow *window); - GLFWcharfun (*glfwSetCharCallback)(GLFWwindow *window, GLFWcharfun callback); - GLFWcharmodsfun (*glfwSetCharModsCallback)(GLFWwindow *window, GLFWcharmodsfun callback); - void (*glfwSetClipboardString)(GLFWwindow *window, const char *str); - void (*glfwSetCursor)(GLFWwindow *window, GLFWcursor *cursor); - GLFWcursorenterfun (*glfwSetCursorEnterCallback)(GLFWwindow *window, - GLFWcursorenterfun callback); - void (*glfwSetCursorPos)(GLFWwindow *window, double xpos, double ypos); - GLFWcursorposfun (*glfwSetCursorPosCallback)(GLFWwindow *window, GLFWcursorposfun callback); - GLFWdropfun (*glfwSetDropCallback)(GLFWwindow *window, GLFWdropfun callback); - GLFWerrorfun (*glfwSetErrorCallback)(GLFWerrorfun callback); - GLFWframebuffersizefun (*glfwSetFramebufferSizeCallback)(GLFWwindow *window, - GLFWframebuffersizefun callback); - void (*glfwSetGamma)(GLFWmonitor *monitor, float gamma); - void (*glfwSetGammaRamp)(GLFWmonitor *monitor, const GLFWgammaramp *ramp); - void (*glfwSetInputMode)(GLFWwindow *window, int mode, int value); - GLFWjoystickfun (*glfwSetJoystickCallback)(GLFWjoystickfun callback); - void (*glfwSetJoystickUserPointer)(int jid, void *pointer); - GLFWkeyfun (*glfwSetKeyCallback)(GLFWwindow *window, GLFWkeyfun callback); - GLFWmonitorfun (*glfwSetMonitorCallback)(GLFWmonitorfun callback); - void (*glfwSetMonitorUserPointer)(GLFWmonitor *monitor, void *pointer); - GLFWmousebuttonfun (*glfwSetMouseButtonCallback)(GLFWwindow *window, - GLFWmousebuttonfun callback); - GLFWscrollfun (*glfwSetScrollCallback)(GLFWwindow *window, GLFWscrollfun callback); - void (*glfwSetTime)(double time); - void (*glfwSetWindowAspectRatio)(GLFWwindow *window, int numer, int denom); - void (*glfwSetWindowAttrib)(GLFWwindow *window, int attrib, int value); - GLFWwindowclosefun (*glfwSetWindowCloseCallback)(GLFWwindow *window, - GLFWwindowclosefun callback); - GLFWwindowcontentscalefun (*glfwSetWindowContentScaleCallback)( - GLFWwindow *window, GLFWwindowcontentscalefun callback); - GLFWwindowfocusfun (*glfwSetWindowFocusCallback)(GLFWwindow *window, - GLFWwindowfocusfun callback); - void (*glfwSetWindowIcon)(GLFWwindow *window, int count, const GLFWimage *images); - GLFWwindowiconifyfun (*glfwSetWindowIconifyCallback)(GLFWwindow *window, - GLFWwindowiconifyfun callback); - GLFWwindowmaximizefun (*glfwSetWindowMaximizeCallback)(GLFWwindow *window, - GLFWwindowmaximizefun callback); - void (*glfwSetWindowMonitor)(GLFWwindow *window, GLFWmonitor *monitor, int xpos, int ypos, - int width, int height, int refreshRate); - void (*glfwSetWindowOpacity)(GLFWwindow *window, float opacity); - void (*glfwSetWindowPos)(GLFWwindow *window, int xpos, int ypos); - GLFWwindowposfun (*glfwSetWindowPosCallback)(GLFWwindow *window, GLFWwindowposfun callback); - GLFWwindowrefreshfun (*glfwSetWindowRefreshCallback)(GLFWwindow *window, - GLFWwindowrefreshfun callback); - void (*glfwSetWindowShouldClose)(GLFWwindow *window, int value); - void (*glfwSetWindowSize)(GLFWwindow *window, int width, int height); - GLFWwindowsizefun (*glfwSetWindowSizeCallback)(GLFWwindow *window, - GLFWwindowsizefun callback); - void (*glfwSetWindowSizeLimits)(GLFWwindow *window, int minwidth, int minheight, - int maxwidth, int maxheight); - void (*glfwSetWindowTitle)(GLFWwindow *window, const char *title); - void (*glfwSetWindowUserPointer)(GLFWwindow *window, void *pointer); - void (*glfwShowWindow)(GLFWwindow *window); - void (*glfwSwapBuffers)(GLFWwindow *window); - void (*glfwSwapInterval)(int interval); - void (*glfwTerminate)(void); - int (*glfwUpdateGamePadMappings)(const char *str); - int (*glfwVulkanSupported)(void); - void (*glfwWaitEvents)(void); - void (*glfwWaitEventsTimeout)(double timeout); - void (*glfwWindowHint)(int hint, int value); - void (*glfwWindowHintString)(int hint, const char *value); - int (*glfwWindowShouldClose)(GLFWwindow *window); -} GLFWFunctionTable; -#ifdef __cplusplus -} -#endif - -#endif +#ifndef GLFW_FUNCTION_TABLE_H +#define GLFW_FUNCTION_TABLE_H + +#include "../lib/glfw/glfw3.h" + +#ifdef __cplusplus +extern "C" { +#endif +typedef struct GLFWFunctionTable { + GLFWcursor *(*glfwCreateCursor)(const GLFWimage *image, int xhot, int yhot); + GLFWcursor *(*glfwCreateStandardCursor)(int shape); + GLFWwindow *(*glfwCreateWindow)(int width, int height, const char *title, + GLFWmonitor *monitor, GLFWwindow *share); + void (*glfwDefaultWindowHints)(void); + void (*glfwDestroyCursor)(GLFWcursor *cursor); + void (*glfwDestroyWindow)(GLFWwindow *window); + int (*glfwExtensionSupported)(const char *extension); + void (*glfwFocusWindow)(GLFWwindow *window); + const char *(*glfwGetClipboardString)(GLFWwindow *window); + GLFWwindow *(*glfwGetCurrentContext)(void); + void (*glfwGetCursorPos)(GLFWwindow *window, double *xpos, double *ypos); + int (*glfwGetError)(const char **description); + void (*glfwGetFrameBufferSize)(GLFWwindow *window, int *width, int *height); + const char *(*glfwGetGamepadName)(int jid); + int (*glfwGetGamepadState)(int jid, GLFWgamepadstate *state); + const GLFWgammaramp *(*glfwGetGammaRamp)(GLFWmonitor *monitor); + int (*glfwGetInputMode)(GLFWwindow *window, int mode); + const float *(*glfwGetJoystickAxes)(int jid, int *count); + const unsigned char *(*glfwGetJoystickButtons)(int jid, int *count); + const char *(*glfwGetJoystickGUID)(int jid); + const unsigned char *(*glfwGetJoystickHats)(int jid, int *count); + const char *(*glfwGetJoystickName)(int jid); + void *(*glfwGetJoystickUserPointer)(int jid); + int (*glfwGetKey)(GLFWwindow *window, int key); + const char *(*glfwGetKeyName)(int key, int scancode); + int (*glfwGetKeyScancode)(int key); + void (*glfwGetMonitorContentScale)(GLFWmonitor *monitor, float *xscale, float *yscale); + const char *(*glfwGetMonitorName)(GLFWmonitor *monitor); + void (*glfwGetMonitorPhysicalSize)(GLFWmonitor *monitor, int *widthMM, int *heightMM); + void (*glfwGetMonitorPos)(GLFWmonitor *monitor, int *xpos, int *ypos); + GLFWmonitor **(*glfwGetMonitors)(int *count); + void *(*glfwGetMonitorUserPointer)(GLFWmonitor *monitor); + void (*glfwGetMonitorWorkarea)(GLFWmonitor *monitor, int *xpos, int *ypos, int *width, + int *height); + int (*glfwGetMouseButton)(GLFWwindow *window, int button); + GLFWmonitor *(*glfwGetPrimaryMonitor)(void); + GLFWglproc (*glfwGetProcAddress)(const char *procname); + const char **(*glfwGetRequiredInstanceExtensions)(unsigned int *count); + double (*glfwGetTime)(void); + unsigned long long (*glfwGetTimerFrequency)(void); + unsigned long long (*glfwGetTimerValue)(void); + void (*glfwGetVersion)(int *major, int *minor, int *rev); + const char *(*glfwGetVersionString)(void); + const GLFWvidmode *(*glfwGetVideoMode)(GLFWmonitor *monitor); + const GLFWvidmode *(*glfwGetVideoModes)(GLFWmonitor *monitor, int *count); + int (*glfwGetWindowAttrib)(GLFWwindow *window, int attrib); + void (*glfwGetWindowContentScale)(GLFWwindow *window, float *xscale, float *yscale); + void (*glfwGetWindowFrameSize)(GLFWwindow *window, int *left, int *top, int *right, + int *bottom); + GLFWmonitor *(*glfwGetWindowMonitor)(GLFWwindow *window); + float (*glfwGetWindowOpacity)(GLFWwindow *window); + void (*glfwGetWindowPos)(GLFWwindow *window, int *xpos, int *ypos); + void (*glfwGetWindowSize)(GLFWwindow *window, int *width, int *height); + void *(*glfwGetWindowUserPointer)(GLFWwindow *window); + void (*glfwHideWindow)(GLFWwindow *window); + void (*glfwIconifyWindow)(GLFWwindow *window); + int (*glfwInit)(void); + void (*glfwInitHint)(int hint, int value); + int (*glfwJoystickIsGamePad)(int jid); + int (*glfwJoystickPresent)(int jid); + void (*glfwMakeContextCurrent)(GLFWwindow *window); + void (*glfwMaximizeWindow)(GLFWwindow *window); + void (*glfwPollEvents)(void); + void (*glfwPostEmptyEvent)(void); + int (*glfwRawMouseMotionSupported)(void); + void (*glfwRequestWindowAttention)(GLFWwindow *window); + void (*glfwRestoreWindow)(GLFWwindow *window); + GLFWcharfun (*glfwSetCharCallback)(GLFWwindow *window, GLFWcharfun callback); + GLFWcharmodsfun (*glfwSetCharModsCallback)(GLFWwindow *window, GLFWcharmodsfun callback); + void (*glfwSetClipboardString)(GLFWwindow *window, const char *str); + void (*glfwSetCursor)(GLFWwindow *window, GLFWcursor *cursor); + GLFWcursorenterfun (*glfwSetCursorEnterCallback)(GLFWwindow *window, + GLFWcursorenterfun callback); + void (*glfwSetCursorPos)(GLFWwindow *window, double xpos, double ypos); + GLFWcursorposfun (*glfwSetCursorPosCallback)(GLFWwindow *window, GLFWcursorposfun callback); + GLFWdropfun (*glfwSetDropCallback)(GLFWwindow *window, GLFWdropfun callback); + GLFWerrorfun (*glfwSetErrorCallback)(GLFWerrorfun callback); + GLFWframebuffersizefun (*glfwSetFramebufferSizeCallback)(GLFWwindow *window, + GLFWframebuffersizefun callback); + void (*glfwSetGamma)(GLFWmonitor *monitor, float gamma); + void (*glfwSetGammaRamp)(GLFWmonitor *monitor, const GLFWgammaramp *ramp); + void (*glfwSetInputMode)(GLFWwindow *window, int mode, int value); + GLFWjoystickfun (*glfwSetJoystickCallback)(GLFWjoystickfun callback); + void (*glfwSetJoystickUserPointer)(int jid, void *pointer); + GLFWkeyfun (*glfwSetKeyCallback)(GLFWwindow *window, GLFWkeyfun callback); + GLFWmonitorfun (*glfwSetMonitorCallback)(GLFWmonitorfun callback); + void (*glfwSetMonitorUserPointer)(GLFWmonitor *monitor, void *pointer); + GLFWmousebuttonfun (*glfwSetMouseButtonCallback)(GLFWwindow *window, + GLFWmousebuttonfun callback); + GLFWscrollfun (*glfwSetScrollCallback)(GLFWwindow *window, GLFWscrollfun callback); + void (*glfwSetTime)(double time); + void (*glfwSetWindowAspectRatio)(GLFWwindow *window, int numer, int denom); + void (*glfwSetWindowAttrib)(GLFWwindow *window, int attrib, int value); + GLFWwindowclosefun (*glfwSetWindowCloseCallback)(GLFWwindow *window, + GLFWwindowclosefun callback); + GLFWwindowcontentscalefun (*glfwSetWindowContentScaleCallback)( + GLFWwindow *window, GLFWwindowcontentscalefun callback); + GLFWwindowfocusfun (*glfwSetWindowFocusCallback)(GLFWwindow *window, + GLFWwindowfocusfun callback); + void (*glfwSetWindowIcon)(GLFWwindow *window, int count, const GLFWimage *images); + GLFWwindowiconifyfun (*glfwSetWindowIconifyCallback)(GLFWwindow *window, + GLFWwindowiconifyfun callback); + GLFWwindowmaximizefun (*glfwSetWindowMaximizeCallback)(GLFWwindow *window, + GLFWwindowmaximizefun callback); + void (*glfwSetWindowMonitor)(GLFWwindow *window, GLFWmonitor *monitor, int xpos, int ypos, + int width, int height, int refreshRate); + void (*glfwSetWindowOpacity)(GLFWwindow *window, float opacity); + void (*glfwSetWindowPos)(GLFWwindow *window, int xpos, int ypos); + GLFWwindowposfun (*glfwSetWindowPosCallback)(GLFWwindow *window, GLFWwindowposfun callback); + GLFWwindowrefreshfun (*glfwSetWindowRefreshCallback)(GLFWwindow *window, + GLFWwindowrefreshfun callback); + void (*glfwSetWindowShouldClose)(GLFWwindow *window, int value); + void (*glfwSetWindowSize)(GLFWwindow *window, int width, int height); + GLFWwindowsizefun (*glfwSetWindowSizeCallback)(GLFWwindow *window, + GLFWwindowsizefun callback); + void (*glfwSetWindowSizeLimits)(GLFWwindow *window, int minwidth, int minheight, + int maxwidth, int maxheight); + void (*glfwSetWindowTitle)(GLFWwindow *window, const char *title); + void (*glfwSetWindowUserPointer)(GLFWwindow *window, void *pointer); + void (*glfwShowWindow)(GLFWwindow *window); + void (*glfwSwapBuffers)(GLFWwindow *window); + void (*glfwSwapInterval)(int interval); + void (*glfwTerminate)(void); + int (*glfwUpdateGamePadMappings)(const char *str); + int (*glfwVulkanSupported)(void); + void (*glfwWaitEvents)(void); + void (*glfwWaitEventsTimeout)(double timeout); + void (*glfwWindowHint)(int hint, int value); + void (*glfwWindowHintString)(int hint, const char *value); + int (*glfwWindowShouldClose)(GLFWwindow *window); +} GLFWFunctionTable; +#ifdef __cplusplus +} +#endif + +#endif diff --git a/StgSharp.Native/sn-head/khrplatform.h b/StgSharp.Native/sn-head/khrplatform.h index 8c5ac556..5cd17f65 100644 --- a/StgSharp.Native/sn-head/khrplatform.h +++ b/StgSharp.Native/sn-head/khrplatform.h @@ -1,310 +1,310 @@ -#ifndef __khrplatform_h_ -#define __khrplatform_h_ - -/* -** Copyright (c) 2008-2018 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are 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 Materials. -** -** THE MATERIALS ARE 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 -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ - -/* Khronos platform-specific types and definitions. - * - * The master copy of khrplatform.h is maintained in the Khronos EGL - * Registry repository at https://github.com/KhronosGroup/EGL-Registry - * The last semantic modification to khrplatform.h was at commit ID: - * 67a3e0864c2d75ea5287b9f3d2eb74a745936692 - * - * Adopters may modify this file to suit their platform. Adopters are - * encouraged to submit platform specific modifications to the Khronos - * group so that they can be included in future versions of this file. - * Please submit changes by filing pull requests or issues on - * the EGL Registry repository linked above. - * - * - * See the Implementer's Guidelines for information about where this file - * should be located on your system and for more details of its use: - * http://www.khronos.org/registry/implementers_guide.pdf - * - * This file should be included as - * #include - * by Khronos client API header files that use its types and defines. - * - * The types in khrplatform.h should only be used to define API-specific types. - * - * Types defined in khrplatform.h: - * khronos_int8_t signed 8 bit - * khronos_uint8_t unsigned 8 bit - * khronos_int16_t signed 16 bit - * khronos_uint16_t unsigned 16 bit - * khronos_int32_t signed 32 bit - * khronos_uint32_t unsigned 32 bit - * khronos_int64_t signed 64 bit - * khronos_uint64_t unsigned 64 bit - * khronos_intptr_t signed same number of bits as a pointer - * khronos_uintptr_t unsigned same number of bits as a pointer - * khronos_ssize_t signed size - * khronos_usize_t unsigned size - * khronos_float_t signed 32 bit floating point - * khronos_time_ns_t unsigned 64 bit time in nanoseconds - * khronos_utime_nanoseconds_t unsigned time interval or absolute time in - * nanoseconds - * khronos_stime_nanoseconds_t signed time interval in nanoseconds - * khronos_boolean_enum_t enumerated boolean type. This should - * only be used as a base type when a client API's boolean type is - * an enum. Client APIs which use an integer or other type for - * booleans cannot use this as the base type for their boolean. - * - * Tokens defined in khrplatform.h: - * - * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values. - * - * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0. - * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0. - * - * Calling convention macros defined in this file: - * KHRONOS_APICALL - * KHRONOS_APIENTRY - * KHRONOS_APIATTRIBUTES - * - * These may be used in function prototypes as: - * - * KHRONOS_APICALL void KHRONOS_APIENTRY funcname( - * int arg1, - * int arg2) KHRONOS_APIATTRIBUTES; - */ - -#if defined(__SCITECH_SNAP__) && !defined(KHRONOS_STATIC) -#define KHRONOS_STATIC 1 -#endif - -/*------------------------------------------------------------------------- - * Definition of KHRONOS_APICALL - *------------------------------------------------------------------------- - * This precedes the return type of the function in the function prototype. - */ -#if defined(KHRONOS_STATIC) -/* If the preprocessor constant KHRONOS_STATIC is defined, make the - * header compatible with static linking. */ -#define KHRONOS_APICALL -#elif defined(_WIN32) -#define KHRONOS_APICALL __declspec(dllimport) -#elif defined(__SYMBIAN32__) -#define KHRONOS_APICALL IMPORT_C -#elif defined(__ANDROID__) -#define KHRONOS_APICALL __attribute__((visibility("default"))) -#else -#define KHRONOS_APICALL -#endif - -/*------------------------------------------------------------------------- - * Definition of KHRONOS_APIENTRY - *------------------------------------------------------------------------- - * This follows the return type of the function and precedes the function - * name in the function prototype. - */ -#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) -/* Win32 but not WinCE */ -#define KHRONOS_APIENTRY __stdcall -#else -#define KHRONOS_APIENTRY -#endif - -/*------------------------------------------------------------------------- - * Definition of KHRONOS_APIATTRIBUTES - *------------------------------------------------------------------------- - * This follows the closing parenthesis of the function prototype arguments. - */ -#if defined(__ARMCC_2__) -#define KHRONOS_APIATTRIBUTES __softfp -#else -#define KHRONOS_APIATTRIBUTES -#endif - -/*------------------------------------------------------------------------- - * basic type definitions - *-----------------------------------------------------------------------*/ -#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || \ - defined(__SCO__) || defined(__USLC__) - -/* - * Using - */ -#include -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 -/* - * To support platform where unsigned long cannot be used interchangeably with - * inptr_t (e.g. CHERI-extended ISAs), we can use the stdint.h intptr_t. - * Ideally, we could just use (u)intptr_t everywhere, but this could result in - * ABI breakage if khronos_uintptr_t is changed from unsigned long to - * unsigned long long or similar (this results in different C++ name mangling). - * To avoid changes for existing platforms, we restrict usage of intptr_t to - * platforms where the size of a pointer is larger than the size of long. - */ -#if defined(__SIZEOF_LONG__) && defined(__SIZEOF_POINTER__) -#if __SIZEOF_POINTER__ > __SIZEOF_LONG__ -#define KHRONOS_USE_INTPTR_T -#endif -#endif - -#elif defined(__VMS) || defined(__sgi) - -/* - * Using - */ -#include -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(_WIN32) && !defined(__SCITECH_SNAP__) - -/* - * Win32 - */ -typedef __int32 khronos_int32_t; -typedef unsigned __int32 khronos_uint32_t; -typedef __int64 khronos_int64_t; -typedef unsigned __int64 khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(__sun__) || defined(__digital__) - -/* - * Sun or Digital - */ -typedef int khronos_int32_t; -typedef unsigned int khronos_uint32_t; -#if defined(__arch64__) || defined(_LP64) -typedef long int khronos_int64_t; -typedef unsigned long int khronos_uint64_t; -#else -typedef long long int khronos_int64_t; -typedef unsigned long long int khronos_uint64_t; -#endif /* __arch64__ */ -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif 0 - -/* - * Hypothetical platform with no float or int64 support - */ -typedef int khronos_int32_t; -typedef unsigned int khronos_uint32_t; -#define KHRONOS_SUPPORT_INT64 0 -#define KHRONOS_SUPPORT_FLOAT 0 - -#else - -/* - * Generic fallback - */ -#include -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#endif - -/* - * Types that are (so far) the same on all platforms - */ -typedef signed char khronos_int8_t; -typedef unsigned char khronos_uint8_t; -typedef signed short int khronos_int16_t; -typedef unsigned short int khronos_uint16_t; - -/* - * Types that differ between LLP64 and LP64 architectures - in LLP64, - * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears - * to be the only LLP64 architecture in current use. - */ -#ifdef KHRONOS_USE_INTPTR_T -typedef intptr_t khronos_intptr_t; -typedef uintptr_t khronos_uintptr_t; -#elif defined(_WIN64) -typedef signed long long int khronos_intptr_t; -typedef unsigned long long int khronos_uintptr_t; -#else -typedef signed long int khronos_intptr_t; -typedef unsigned long int khronos_uintptr_t; -#endif - -#if defined(_WIN64) -typedef signed long long int khronos_ssize_t; -typedef unsigned long long int khronos_usize_t; -#else -typedef signed long int khronos_ssize_t; -typedef unsigned long int khronos_usize_t; -#endif - -#if KHRONOS_SUPPORT_FLOAT -/* - * Float type - */ -typedef float khronos_float_t; -#endif - -#if KHRONOS_SUPPORT_INT64 -/* Time types - * - * These types can be used to represent a time interval in nanoseconds or - * an absolute Unadjusted System Time. Unadjusted System Time is the number - * of nanoseconds since some arbitrary system event (e.g. since the last - * time the system booted). The Unadjusted System Time is an unsigned - * 64 bit value that wraps back to 0 every 584 years. Time intervals - * may be either signed or unsigned. - */ -typedef khronos_uint64_t khronos_utime_nanoseconds_t; -typedef khronos_int64_t khronos_stime_nanoseconds_t; -#endif - -/* - * Dummy value used to pad enum types to 32 bits. - */ -#ifndef KHRONOS_MAX_ENUM -#define KHRONOS_MAX_ENUM 0x7FFFFFFF -#endif - -/* - * Enumerated boolean type - * - * Values other than zero should be considered to be true. Therefore - * comparisons should not be made against KHRONOS_TRUE. - */ -typedef enum { - KHRONOS_FALSE = 0, - KHRONOS_TRUE = 1, - KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM -} khronos_boolean_enum_t; - -#endif /* __khrplatform_h_ */ +#ifndef __khrplatform_h_ +#define __khrplatform_h_ + +/* +** Copyright (c) 2008-2018 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are 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 Materials. +** +** THE MATERIALS ARE 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 +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +/* Khronos platform-specific types and definitions. + * + * The master copy of khrplatform.h is maintained in the Khronos EGL + * Registry repository at https://github.com/KhronosGroup/EGL-Registry + * The last semantic modification to khrplatform.h was at commit ID: + * 67a3e0864c2d75ea5287b9f3d2eb74a745936692 + * + * Adopters may modify this file to suit their platform. Adopters are + * encouraged to submit platform specific modifications to the Khronos + * group so that they can be included in future versions of this file. + * Please submit changes by filing pull requests or issues on + * the EGL Registry repository linked above. + * + * + * See the Implementer's Guidelines for information about where this file + * should be located on your system and for more details of its use: + * http://www.khronos.org/registry/implementers_guide.pdf + * + * This file should be included as + * #include + * by Khronos client API header files that use its types and defines. + * + * The types in khrplatform.h should only be used to define API-specific types. + * + * Types defined in khrplatform.h: + * khronos_int8_t signed 8 bit + * khronos_uint8_t unsigned 8 bit + * khronos_int16_t signed 16 bit + * khronos_uint16_t unsigned 16 bit + * khronos_int32_t signed 32 bit + * khronos_uint32_t unsigned 32 bit + * khronos_int64_t signed 64 bit + * khronos_uint64_t unsigned 64 bit + * khronos_intptr_t signed same number of bits as a pointer + * khronos_uintptr_t unsigned same number of bits as a pointer + * khronos_ssize_t signed size + * khronos_usize_t unsigned size + * khronos_float_t signed 32 bit floating point + * khronos_time_ns_t unsigned 64 bit time in nanoseconds + * khronos_utime_nanoseconds_t unsigned time interval or absolute time in + * nanoseconds + * khronos_stime_nanoseconds_t signed time interval in nanoseconds + * khronos_boolean_enum_t enumerated boolean type. This should + * only be used as a base type when a client API's boolean type is + * an enum. Client APIs which use an integer or other type for + * booleans cannot use this as the base type for their boolean. + * + * Tokens defined in khrplatform.h: + * + * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values. + * + * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0. + * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0. + * + * Calling convention macros defined in this file: + * KHRONOS_APICALL + * KHRONOS_APIENTRY + * KHRONOS_APIATTRIBUTES + * + * These may be used in function prototypes as: + * + * KHRONOS_APICALL void KHRONOS_APIENTRY funcname( + * int arg1, + * int arg2) KHRONOS_APIATTRIBUTES; + */ + +#if defined(__SCITECH_SNAP__) && !defined(KHRONOS_STATIC) +#define KHRONOS_STATIC 1 +#endif + +/*------------------------------------------------------------------------- + * Definition of KHRONOS_APICALL + *------------------------------------------------------------------------- + * This precedes the return type of the function in the function prototype. + */ +#if defined(KHRONOS_STATIC) +/* If the preprocessor constant KHRONOS_STATIC is defined, make the + * header compatible with static linking. */ +#define KHRONOS_APICALL +#elif defined(_WIN32) +#define KHRONOS_APICALL __declspec(dllimport) +#elif defined(__SYMBIAN32__) +#define KHRONOS_APICALL IMPORT_C +#elif defined(__ANDROID__) +#define KHRONOS_APICALL __attribute__((visibility("default"))) +#else +#define KHRONOS_APICALL +#endif + +/*------------------------------------------------------------------------- + * Definition of KHRONOS_APIENTRY + *------------------------------------------------------------------------- + * This follows the return type of the function and precedes the function + * name in the function prototype. + */ +#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) +/* Win32 but not WinCE */ +#define KHRONOS_APIENTRY __stdcall +#else +#define KHRONOS_APIENTRY +#endif + +/*------------------------------------------------------------------------- + * Definition of KHRONOS_APIATTRIBUTES + *------------------------------------------------------------------------- + * This follows the closing parenthesis of the function prototype arguments. + */ +#if defined(__ARMCC_2__) +#define KHRONOS_APIATTRIBUTES __softfp +#else +#define KHRONOS_APIATTRIBUTES +#endif + +/*------------------------------------------------------------------------- + * basic type definitions + *-----------------------------------------------------------------------*/ +#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || \ + defined(__SCO__) || defined(__USLC__) + +/* + * Using + */ +#include +typedef int32_t khronos_int32_t; +typedef uint32_t khronos_uint32_t; +typedef int64_t khronos_int64_t; +typedef uint64_t khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 +/* + * To support platform where unsigned long cannot be used interchangeably with + * inptr_t (e.g. CHERI-extended ISAs), we can use the stdint.h intptr_t. + * Ideally, we could just use (u)intptr_t everywhere, but this could result in + * ABI breakage if khronos_uintptr_t is changed from unsigned long to + * unsigned long long or similar (this results in different C++ name mangling). + * To avoid changes for existing platforms, we restrict usage of intptr_t to + * platforms where the size of a pointer is larger than the size of long. + */ +#if defined(__SIZEOF_LONG__) && defined(__SIZEOF_POINTER__) +#if __SIZEOF_POINTER__ > __SIZEOF_LONG__ +#define KHRONOS_USE_INTPTR_T +#endif +#endif + +#elif defined(__VMS) || defined(__sgi) + +/* + * Using + */ +#include +typedef int32_t khronos_int32_t; +typedef uint32_t khronos_uint32_t; +typedef int64_t khronos_int64_t; +typedef uint64_t khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif defined(_WIN32) && !defined(__SCITECH_SNAP__) + +/* + * Win32 + */ +typedef __int32 khronos_int32_t; +typedef unsigned __int32 khronos_uint32_t; +typedef __int64 khronos_int64_t; +typedef unsigned __int64 khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif defined(__sun__) || defined(__digital__) + +/* + * Sun or Digital + */ +typedef int khronos_int32_t; +typedef unsigned int khronos_uint32_t; +#if defined(__arch64__) || defined(_LP64) +typedef long int khronos_int64_t; +typedef unsigned long int khronos_uint64_t; +#else +typedef long long int khronos_int64_t; +typedef unsigned long long int khronos_uint64_t; +#endif /* __arch64__ */ +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif 0 + +/* + * Hypothetical platform with no float or int64 support + */ +typedef int khronos_int32_t; +typedef unsigned int khronos_uint32_t; +#define KHRONOS_SUPPORT_INT64 0 +#define KHRONOS_SUPPORT_FLOAT 0 + +#else + +/* + * Generic fallback + */ +#include +typedef int32_t khronos_int32_t; +typedef uint32_t khronos_uint32_t; +typedef int64_t khronos_int64_t; +typedef uint64_t khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#endif + +/* + * Types that are (so far) the same on all platforms + */ +typedef signed char khronos_int8_t; +typedef unsigned char khronos_uint8_t; +typedef signed short int khronos_int16_t; +typedef unsigned short int khronos_uint16_t; + +/* + * Types that differ between LLP64 and LP64 architectures - in LLP64, + * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears + * to be the only LLP64 architecture in current use. + */ +#ifdef KHRONOS_USE_INTPTR_T +typedef intptr_t khronos_intptr_t; +typedef uintptr_t khronos_uintptr_t; +#elif defined(_WIN64) +typedef signed long long int khronos_intptr_t; +typedef unsigned long long int khronos_uintptr_t; +#else +typedef signed long int khronos_intptr_t; +typedef unsigned long int khronos_uintptr_t; +#endif + +#if defined(_WIN64) +typedef signed long long int khronos_ssize_t; +typedef unsigned long long int khronos_usize_t; +#else +typedef signed long int khronos_ssize_t; +typedef unsigned long int khronos_usize_t; +#endif + +#if KHRONOS_SUPPORT_FLOAT +/* + * Float type + */ +typedef float khronos_float_t; +#endif + +#if KHRONOS_SUPPORT_INT64 +/* Time types + * + * These types can be used to represent a time interval in nanoseconds or + * an absolute Unadjusted System Time. Unadjusted System Time is the number + * of nanoseconds since some arbitrary system event (e.g. since the last + * time the system booted). The Unadjusted System Time is an unsigned + * 64 bit value that wraps back to 0 every 584 years. Time intervals + * may be either signed or unsigned. + */ +typedef khronos_uint64_t khronos_utime_nanoseconds_t; +typedef khronos_int64_t khronos_stime_nanoseconds_t; +#endif + +/* + * Dummy value used to pad enum types to 32 bits. + */ +#ifndef KHRONOS_MAX_ENUM +#define KHRONOS_MAX_ENUM 0x7FFFFFFF +#endif + +/* + * Enumerated boolean type + * + * Values other than zero should be considered to be true. Therefore + * comparisons should not be made against KHRONOS_TRUE. + */ +typedef enum { + KHRONOS_FALSE = 0, + KHRONOS_TRUE = 1, + KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM +} khronos_boolean_enum_t; + +#endif /* __khrplatform_h_ */ diff --git a/StgSharp.Native/sn-head/sn_internal.h b/StgSharp.Native/sn-head/sn_internal.h index cb1b9df0..1ee66c90 100644 --- a/StgSharp.Native/sn-head/sn_internal.h +++ b/StgSharp.Native/sn-head/sn_internal.h @@ -1,40 +1,40 @@ - -#ifndef SN_INTERNAL -#define SN_INTERNAL - -#include - -#define UNSAFE_AS(type, expr) *(type *)&(expr) - -#ifdef _MSC_VER -#define _CRT_SECURE_NO_WARNINGS 1 -#define WIN32_LEAN_AND_MEAN -#define SN_DECL __cdecl -#define SN_MAT_DECL __cdecl __forceinline -#define SN_API __declspec(dllexport) -#define FORCEINLINE __forceinline -#include -#elif defined(__clang__) || defined(__GNUC__) -#define SN_DECL __attribute__((cdecl)) -#define SN_MAT_DECL __attribute__((cdecl)) __attribute__((always_inline)) -#define SN_API __attribute__((dllexport)) -#define FORCEINLINE __attribute__((always_inline)) -#else -#define SN_API -#define SN_DECL -#define SN_MAT_DECL -#define FORCEINLINE -#endif - -#if defined(_MSC_VER) -#define SN_ALIGNAS(n) __declspec(align(n)) -#else -#define SN_ALIGNAS(n) __attribute__((aligned(n))) -#endif - -#define SN_APIDEF - -#define PRIVATE static -#define INTERNAL extern - -#endif // + +#ifndef SN_INTERNAL +#define SN_INTERNAL + +#include + +#define UNSAFE_AS(type, expr) *(type *)&(expr) + +#ifdef _MSC_VER +#define _CRT_SECURE_NO_WARNINGS 1 +#define WIN32_LEAN_AND_MEAN +#define SN_DECL __cdecl +#define SN_MAT_DECL __cdecl __forceinline +#define SN_API __declspec(dllexport) +#define FORCEINLINE __forceinline +#include +#elif defined(__clang__) || defined(__GNUC__) +#define SN_DECL __attribute__((cdecl)) +#define SN_MAT_DECL __attribute__((cdecl)) __attribute__((always_inline)) +#define SN_API __attribute__((dllexport)) +#define FORCEINLINE __attribute__((always_inline)) +#else +#define SN_API +#define SN_DECL +#define SN_MAT_DECL +#define FORCEINLINE +#endif + +#if defined(_MSC_VER) +#define SN_ALIGNAS(n) __declspec(align(n)) +#else +#define SN_ALIGNAS(n) __attribute__((aligned(n))) +#endif + +#define SN_APIDEF + +#define PRIVATE static +#define INTERNAL extern + +#endif // diff --git a/StgSharp.Native/sn-head/sn_intrinsic.h b/StgSharp.Native/sn-head/sn_intrinsic.h index 1b7536dd..26222f3a 100644 --- a/StgSharp.Native/sn-head/sn_intrinsic.h +++ b/StgSharp.Native/sn-head/sn_intrinsic.h @@ -1,123 +1,123 @@ -#ifndef SSC_INTRIN -#define SSC_INTRIN - -#define SSC_INTRIN_HEAD - -#include "StgSharpNative.h" -#include "sn_intrinsic.matkernel.h" -#include -#include -#include - -#ifdef _MSC_VER -#include -#include -#endif - -#define LASTTWO(x) (x & 3) -#define LAST(x) (x & 3) -#define get_align_begin(x) ((x + 15) & (~15)) - -#define SSE_INSERT(source, target, reset3, reset2, reset1, reset0) \ - (LASTTWO(source - 1) << 6) | (LASTTWO(target - 1) << 4) | (LAST(reset3) << 3) | \ - (LAST(reset2) << 2) | (LAST(reset1) << 1) | LAST(reset0) -#define SSE_INSERT_SIMPLE(source, target) SSE_INSERT(source, target, 0, 0, 0, 0) -#define M256_PERMUTE(s3, s2, s1, s0) \ - ((LASTTWO(s3) << 6) | (LASTTWO(s2) << 4) | (LASTTWO(s1) << 2) | (LASTTWO(s0))) -#define BIT_CVRT(pack, index, T) *(T *)(pack->data + index) -#define zero_vec _mm_setzero_ps() -#define zero_vec_256 _mm256_setzero_ps() - -#define SPAN(T) \ - struct SPAN_T { \ - T *pointer; \ - size_t length; \ - }; - -typedef union uint64_u { - uint64_t u64; - uint32_t u32[2]; -} uint64_u; - -typedef struct mat_kernel mat_kernel; - -typedef struct mat_panel mat_panel; - -typedef union scalar_pack { - uint64_t data[8]; -} scalar_pack; - -/* Mirrors StgSharp.Mathematics.Numeric.MatrixParallelTaskPackage (128 bytes). */ -#define MAT_TASK(T) \ - struct { \ - MAT_KERNEL(T) * mat_0; /* Offset 0: 1st matrix kernel base */ \ - MAT_KERNEL(T) * mat_1; /* Offset 8: 2nd matrix kernel base */ \ - MAT_KERNEL(T) * mat_2; /* Offset 16: 3rd matrix kernel base */ \ - void *scalar; /* Offset 24: scalar pack */ \ - int32_t x; /* Offset 32: row index of the result tile */ \ - int32_t y; /* Offset 36: column index of the result tile */ \ - int32_t z; /* Offset 40: column index of the result tile */ \ - int32_t common_x; /* Offset 44: row index of the result tile */ \ - int32_t common_y; /* Offset 48: column index of the result tile */ \ - int32_t common_z; /* Offset 52: column index of the result tile */ \ - uint32_t mask; /* Offset 56: mask for task schedualing, not useful in C side */ \ - uint32_t reverse; /* Offset 60: reserved for future use */ \ - scalar_pack padding; /* Offset 64: padding to make the struct size 128 bytes */ \ - } -typedef struct matrix_task matrix_task; - -#if defined(__cplusplus) -static_assert(sizeof(matrix_task) == 128, "matrix_parallel_task_package size mismatch"); -#elif defined(__STDC_VERSION__) -static_assert(sizeof(MAT_TASK(float)) == 128, "matrix_parallel_task_package size mismatch"); -#endif - -typedef void(SN_DECL *UNI_MK_PROC)(matrix_task *task); -typedef void(SN_DECL *UNI_SK_PROC)(mat_kernel const *left, mat_kernel const *right, - mat_kernel *restrict ans, uint64_t scalar); - -typedef void(SN_DECL *VECTORNORMALIZEPROC)(__m128 *source, __m128 *target); -typedef void(SN_DECL *DOTPROC)(void *transpose, __m128 *vector, __m128 *ans); -typedef uint64_t(SN_DECL *FACTORIALROC)(int n); - -#pragma region string - -typedef int(SN_DECL *HASH)(byte const *str, int length); -typedef int(SN_DECL *INDEX_PAIR)(short const *stram, uint32_t target, int length); - -#pragma endregion - -typedef struct mat_mk_intrinsic { - UNI_MK_PROC add; - UNI_MK_PROC fill; - UNI_MK_PROC scalar_mul; - UNI_MK_PROC sub; - UNI_MK_PROC transpose; - UNI_MK_PROC fma; - UNI_MK_PROC pivot; -} mat_mk_intrinsic; - -typedef struct mat_sk_intrinsic { - UNI_SK_PROC add; - UNI_SK_PROC fill; - UNI_SK_PROC scalar_mul; - UNI_SK_PROC sub; - UNI_SK_PROC transpose; - UNI_SK_PROC fma; - UNI_SK_PROC pivot; -} mat_sk_intrinsic; - -// Mirrors C# IntrinsicContext field order so managed/unmanaged layouts stay in sync. -typedef struct sn_intrinsic { - HASH city_hash_simplify; - FACTORIALROC factorial_simd; - VECTORNORMALIZEPROC vec_f32_normalize_3; - mat_mk_intrinsic mat_mk[0x0a]; - mat_sk_intrinsic mat_sk[0x0a]; -} sn_intrinsic; - -typedef enum elment_mask { F32 = 0, F64 = 1, I32 = 2, I64 = 3 } element_mask; - -#include "sn_target.h" - -#endif +#ifndef SSC_INTRIN +#define SSC_INTRIN + +#define SSC_INTRIN_HEAD + +#include "StgSharpNative.h" +#include "sn_intrinsic.matkernel.h" +#include +#include +#include + +#ifdef _MSC_VER +#include +#include +#endif + +#define LASTTWO(x) (x & 3) +#define LAST(x) (x & 3) +#define get_align_begin(x) ((x + 15) & (~15)) + +#define SSE_INSERT(source, target, reset3, reset2, reset1, reset0) \ + (LASTTWO(source - 1) << 6) | (LASTTWO(target - 1) << 4) | (LAST(reset3) << 3) | \ + (LAST(reset2) << 2) | (LAST(reset1) << 1) | LAST(reset0) +#define SSE_INSERT_SIMPLE(source, target) SSE_INSERT(source, target, 0, 0, 0, 0) +#define M256_PERMUTE(s3, s2, s1, s0) \ + ((LASTTWO(s3) << 6) | (LASTTWO(s2) << 4) | (LASTTWO(s1) << 2) | (LASTTWO(s0))) +#define BIT_CVRT(pack, index, T) *(T *)(pack->data + index) +#define zero_vec _mm_setzero_ps() +#define zero_vec_256 _mm256_setzero_ps() + +#define SPAN(T) \ + struct SPAN_T { \ + T *pointer; \ + size_t length; \ + }; + +typedef union uint64_u { + uint64_t u64; + uint32_t u32[2]; +} uint64_u; + +typedef struct mat_kernel mat_kernel; + +typedef struct mat_panel mat_panel; + +typedef union scalar_pack { + uint64_t data[8]; +} scalar_pack; + +/* Mirrors StgSharp.Mathematics.Numeric.MatrixParallelTaskPackage (128 bytes). */ +#define MAT_TASK(T) \ + struct { \ + MAT_KERNEL(T) * mat_0; /* Offset 0: 1st matrix kernel base */ \ + MAT_KERNEL(T) * mat_1; /* Offset 8: 2nd matrix kernel base */ \ + MAT_KERNEL(T) * mat_2; /* Offset 16: 3rd matrix kernel base */ \ + void *scalar; /* Offset 24: scalar pack */ \ + int32_t x; /* Offset 32: row index of the result tile */ \ + int32_t y; /* Offset 36: column index of the result tile */ \ + int32_t z; /* Offset 40: column index of the result tile */ \ + int32_t common_x; /* Offset 44: row index of the result tile */ \ + int32_t common_y; /* Offset 48: column index of the result tile */ \ + int32_t common_z; /* Offset 52: column index of the result tile */ \ + uint32_t mask; /* Offset 56: mask for task schedualing, not useful in C side */ \ + uint32_t reverse; /* Offset 60: reserved for future use */ \ + scalar_pack padding; /* Offset 64: padding to make the struct size 128 bytes */ \ + } +typedef struct matrix_task matrix_task; + +#if defined(__cplusplus) +static_assert(sizeof(matrix_task) == 128, "matrix_parallel_task_package size mismatch"); +#elif defined(__STDC_VERSION__) +static_assert(sizeof(MAT_TASK(float)) == 128, "matrix_parallel_task_package size mismatch"); +#endif + +typedef void(SN_DECL *UNI_MK_PROC)(matrix_task *task); +typedef void(SN_DECL *UNI_SK_PROC)(mat_kernel const *left, mat_kernel const *right, + mat_kernel *restrict ans, uint64_t scalar); + +typedef void(SN_DECL *VECTORNORMALIZEPROC)(__m128 *source, __m128 *target); +typedef void(SN_DECL *DOTPROC)(void *transpose, __m128 *vector, __m128 *ans); +typedef uint64_t(SN_DECL *FACTORIALROC)(int n); + +#pragma region string + +typedef int(SN_DECL *HASH)(byte const *str, int length); +typedef int(SN_DECL *INDEX_PAIR)(short const *stram, uint32_t target, int length); + +#pragma endregion + +typedef struct mat_mk_intrinsic { + UNI_MK_PROC add; + UNI_MK_PROC fill; + UNI_MK_PROC scalar_mul; + UNI_MK_PROC sub; + UNI_MK_PROC transpose; + UNI_MK_PROC fma; + UNI_MK_PROC pivot; +} mat_mk_intrinsic; + +typedef struct mat_sk_intrinsic { + UNI_SK_PROC add; + UNI_SK_PROC fill; + UNI_SK_PROC scalar_mul; + UNI_SK_PROC sub; + UNI_SK_PROC transpose; + UNI_SK_PROC fma; + UNI_SK_PROC pivot; +} mat_sk_intrinsic; + +// Mirrors C# IntrinsicContext field order so managed/unmanaged layouts stay in sync. +typedef struct sn_intrinsic { + HASH city_hash_simplify; + FACTORIALROC factorial_simd; + VECTORNORMALIZEPROC vec_f32_normalize_3; + mat_mk_intrinsic mat_mk[0x0a]; + mat_sk_intrinsic mat_sk[0x0a]; +} sn_intrinsic; + +typedef enum elment_mask { F32 = 0, F64 = 1, I32 = 2, I64 = 3 } element_mask; + +#include "sn_target.h" + +#endif diff --git a/StgSharp.Native/sn-head/sn_target.h b/StgSharp.Native/sn-head/sn_target.h index a3e25737..b6c01280 100644 --- a/StgSharp.Native/sn-head/sn_target.h +++ b/StgSharp.Native/sn-head/sn_target.h @@ -1,84 +1,84 @@ -#ifndef SN_TARGET -#define SN_TARGET - -#include "sn_internal.h" -#include - -#define SN_OS_WINDOWS 0 -#define SN_OS_LINUX 1 -#define SN_OS_MACOS 2 -#define SN_OS_IOS 3 -#define SN_OS_ANDROID 4 -#define SN_OS_UNKNOWN 5 - -#define SN_ARCH_X86_64 0 -#define SN_ARCH_ARM64 1 -#define SN_ARCH_RISCV64 2 -#define SN_ARCH_PPC64le 3 - -#if defined(_M_X64) || defined(_M_AMD64) || defined(__x86_64__) || defined(__amd64__) -#define SN_CURRENT_ARCH SN_ARCH_X86_64 - -#elif defined(_M_ARM64) || defined(__aarch64__) -#define SN_CURRENT_ARCH SN_ARCH_ARM64 - -#elif defined(_M_ARM) || defined(__arm__) -#define SN_CURRENT_ARCH SN_ARCH_ARM32 - -#elif defined(_M_IX86) || defined(__i386__) -#define SN_CURRENT_ARCH SN_ARCH_X86_32 - -#elif defined(__powerpc64__) && defined(__LITTLE_ENDIAN__) -#define SN_CURRENT_ARCH SN_ARCH_PPC64LE - -#elif defined(__riscv) && (__riscv_xlen == 64) -#define SN_CURRENT_ARCH SN_ARCH_RISCV64 - -#else -#error "SN: Unsupported target architecture" -#endif - -/* - * Target selection policy: - * - Default (no SN_EXTERN_TARGET): fixed Windows + x86_64. - * - External (SN_EXTERN_TARGET): build system must provide SN_OS and SN_ARCH. - */ -#ifndef SN_EXTERN_TARGET - -#define SN_OS_TARGET SN_OS_WINDOWS -#define SN_ARCH_TARGET SN_ARCH_X86_64 - -#else - -#ifndef SN_OS_TARGET -#error "SN_EXTERN_TARGET is defined but SN_OS is not provided." -#endif - -#ifndef SN_ARCH_TARGET -#error "SN_EXTERN_TARGET is defined but SN_ARCH is not provided." -#endif - -/* Validate externally supplied values are within known enum constants. */ -#if (SN_OS_TARGET != SN_OS_WINDOWS) && (SN_OS_TARGET != SN_OS_LINUX) && \ - (SN_OS_TARGET != SN_OS_MACOS) && (SN_OS_TARGET != SN_OS_IOS) && \ - (SN_OS_TARGET != SN_OS_ANDROID) && (SN_OS_TARGET != SN_OS_UNKNOWN) -#error "SN_OS has an invalid value. Use SN_OS_<...> enum constants." -#endif - -#if (SN_ARCH_TARGET != SN_ARCH_X86_64) && (SN_ARCH_TARGET != SN_ARCH_ARM64) && \ - (SN_ARCH_TARGET != SN_ARCH_RISCV64) && (SN_ARCH_TARGET != SN_ARCH_PPC64le) -#error "SN_ARCH has an invalid value. Use SN_ARCH_<...> enum constants." -#endif - -#endif - -#define SN_IS_OS(os) ((SN_OS_TARGET) == (os)) - -#define SN_IS_ARCH(arch) ((SN_ARCH_TARGET) == (arch)) - -typedef union SIMDID { - uint64_t mask; - char make_byte[8]; -} SIMDID; - -#endif // SN_TARGET +#ifndef SN_TARGET +#define SN_TARGET + +#include "sn_internal.h" +#include + +#define SN_OS_WINDOWS 0 +#define SN_OS_LINUX 1 +#define SN_OS_MACOS 2 +#define SN_OS_IOS 3 +#define SN_OS_ANDROID 4 +#define SN_OS_UNKNOWN 5 + +#define SN_ARCH_X86_64 0 +#define SN_ARCH_ARM64 1 +#define SN_ARCH_RISCV64 2 +#define SN_ARCH_PPC64le 3 + +#if defined(_M_X64) || defined(_M_AMD64) || defined(__x86_64__) || defined(__amd64__) +#define SN_CURRENT_ARCH SN_ARCH_X86_64 + +#elif defined(_M_ARM64) || defined(__aarch64__) +#define SN_CURRENT_ARCH SN_ARCH_ARM64 + +#elif defined(_M_ARM) || defined(__arm__) +#define SN_CURRENT_ARCH SN_ARCH_ARM32 + +#elif defined(_M_IX86) || defined(__i386__) +#define SN_CURRENT_ARCH SN_ARCH_X86_32 + +#elif defined(__powerpc64__) && defined(__LITTLE_ENDIAN__) +#define SN_CURRENT_ARCH SN_ARCH_PPC64LE + +#elif defined(__riscv) && (__riscv_xlen == 64) +#define SN_CURRENT_ARCH SN_ARCH_RISCV64 + +#else +#error "SN: Unsupported target architecture" +#endif + +/* + * Target selection policy: + * - Default (no SN_EXTERN_TARGET): fixed Windows + x86_64. + * - External (SN_EXTERN_TARGET): build system must provide SN_OS and SN_ARCH. + */ +#ifndef SN_EXTERN_TARGET + +#define SN_OS_TARGET SN_OS_WINDOWS +#define SN_ARCH_TARGET SN_ARCH_X86_64 + +#else + +#ifndef SN_OS_TARGET +#error "SN_EXTERN_TARGET is defined but SN_OS is not provided." +#endif + +#ifndef SN_ARCH_TARGET +#error "SN_EXTERN_TARGET is defined but SN_ARCH is not provided." +#endif + +/* Validate externally supplied values are within known enum constants. */ +#if (SN_OS_TARGET != SN_OS_WINDOWS) && (SN_OS_TARGET != SN_OS_LINUX) && \ + (SN_OS_TARGET != SN_OS_MACOS) && (SN_OS_TARGET != SN_OS_IOS) && \ + (SN_OS_TARGET != SN_OS_ANDROID) && (SN_OS_TARGET != SN_OS_UNKNOWN) +#error "SN_OS has an invalid value. Use SN_OS_<...> enum constants." +#endif + +#if (SN_ARCH_TARGET != SN_ARCH_X86_64) && (SN_ARCH_TARGET != SN_ARCH_ARM64) && \ + (SN_ARCH_TARGET != SN_ARCH_RISCV64) && (SN_ARCH_TARGET != SN_ARCH_PPC64le) +#error "SN_ARCH has an invalid value. Use SN_ARCH_<...> enum constants." +#endif + +#endif + +#define SN_IS_OS(os) ((SN_OS_TARGET) == (os)) + +#define SN_IS_ARCH(arch) ((SN_ARCH_TARGET) == (arch)) + +typedef union SIMDID { + uint64_t mask; + char make_byte[8]; +} SIMDID; + +#endif // SN_TARGET diff --git a/StgSharp.Native/sn-head/wgl.h b/StgSharp.Native/sn-head/wgl.h index d4d3be9e..a48052de 100644 --- a/StgSharp.Native/sn-head/wgl.h +++ b/StgSharp.Native/sn-head/wgl.h @@ -1,1076 +1,1076 @@ -/** - * Loader generated by glad 2.0.5 on Fri Feb 16 00:51:03 2024 - * - * SPDX-License-Identifier: (WTFPL OR CC0-1.0) AND Apache-2.0 - * - * Generator: C/C++ - * Specification: wgl - * Extensions: 57 - * - * APIs: - * - wgl=1.0 - * - * Options: - * - ALIAS = False - * - DEBUG = False - * - HEADER_ONLY = False - * - LOADER = False - * - MX = True - * - ON_DEMAND = False - * - * Commandline: - * --api='wgl=1.0' --extensions='WGL_3DFX_multisample,WGL_3DL_stereo_control,WGL_AMD_gpu_association,WGL_ARB_buffer_region,WGL_ARB_context_flush_control,WGL_ARB_create_context,WGL_ARB_create_context_no_error,WGL_ARB_create_context_profile,WGL_ARB_create_context_robustness,WGL_ARB_extensions_string,WGL_ARB_framebuffer_sRGB,WGL_ARB_make_current_read,WGL_ARB_multisample,WGL_ARB_pbuffer,WGL_ARB_pixel_format,WGL_ARB_pixel_format_float,WGL_ARB_render_texture,WGL_ARB_robustness_application_isolation,WGL_ARB_robustness_share_group_isolation,WGL_ATI_pixel_format_float,WGL_ATI_render_texture_rectangle,WGL_EXT_colorspace,WGL_EXT_create_context_es2_profile,WGL_EXT_create_context_es_profile,WGL_EXT_depth_float,WGL_EXT_display_color_table,WGL_EXT_extensions_string,WGL_EXT_framebuffer_sRGB,WGL_EXT_make_current_read,WGL_EXT_multisample,WGL_EXT_pbuffer,WGL_EXT_pixel_format,WGL_EXT_pixel_format_packed_float,WGL_EXT_swap_control,WGL_EXT_swap_control_tear,WGL_I3D_digital_video_control,WGL_I3D_gamma,WGL_I3D_genlock,WGL_I3D_image_buffer,WGL_I3D_swap_frame_lock,WGL_I3D_swap_frame_usage,WGL_NV_DX_interop,WGL_NV_DX_interop2,WGL_NV_copy_image,WGL_NV_delay_before_swap,WGL_NV_float_buffer,WGL_NV_gpu_affinity,WGL_NV_multigpu_context,WGL_NV_multisample_coverage,WGL_NV_present_video,WGL_NV_render_depth_texture,WGL_NV_render_texture_rectangle,WGL_NV_swap_group,WGL_NV_vertex_array_range,WGL_NV_video_capture,WGL_NV_video_output,WGL_OML_sync_control' c --mx - * - * Online: - * http://glad.sh/#api=wgl%3D1.0&extensions=WGL_3DFX_multisample%2CWGL_3DL_stereo_control%2CWGL_AMD_gpu_association%2CWGL_ARB_buffer_region%2CWGL_ARB_context_flush_control%2CWGL_ARB_create_context%2CWGL_ARB_create_context_no_error%2CWGL_ARB_create_context_profile%2CWGL_ARB_create_context_robustness%2CWGL_ARB_extensions_string%2CWGL_ARB_framebuffer_sRGB%2CWGL_ARB_make_current_read%2CWGL_ARB_multisample%2CWGL_ARB_pbuffer%2CWGL_ARB_pixel_format%2CWGL_ARB_pixel_format_float%2CWGL_ARB_render_texture%2CWGL_ARB_robustness_application_isolation%2CWGL_ARB_robustness_share_group_isolation%2CWGL_ATI_pixel_format_float%2CWGL_ATI_render_texture_rectangle%2CWGL_EXT_colorspace%2CWGL_EXT_create_context_es2_profile%2CWGL_EXT_create_context_es_profile%2CWGL_EXT_depth_float%2CWGL_EXT_display_color_table%2CWGL_EXT_extensions_string%2CWGL_EXT_framebuffer_sRGB%2CWGL_EXT_make_current_read%2CWGL_EXT_multisample%2CWGL_EXT_pbuffer%2CWGL_EXT_pixel_format%2CWGL_EXT_pixel_format_packed_float%2CWGL_EXT_swap_control%2CWGL_EXT_swap_control_tear%2CWGL_I3D_digital_video_control%2CWGL_I3D_gamma%2CWGL_I3D_genlock%2CWGL_I3D_image_buffer%2CWGL_I3D_swap_frame_lock%2CWGL_I3D_swap_frame_usage%2CWGL_NV_DX_interop%2CWGL_NV_DX_interop2%2CWGL_NV_copy_image%2CWGL_NV_delay_before_swap%2CWGL_NV_float_buffer%2CWGL_NV_gpu_affinity%2CWGL_NV_multigpu_context%2CWGL_NV_multisample_coverage%2CWGL_NV_present_video%2CWGL_NV_render_depth_texture%2CWGL_NV_render_texture_rectangle%2CWGL_NV_swap_group%2CWGL_NV_vertex_array_range%2CWGL_NV_video_capture%2CWGL_NV_video_output%2CWGL_OML_sync_control&generator=c&options=MX - * - */ - -#ifndef GLAD_WGL_H_ -#define GLAD_WGL_H_ - -#include -#include "gl.h" - -#define GLAD_WGL - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef GLAD_PLATFORM_H_ -#define GLAD_PLATFORM_H_ - -#ifndef GLAD_PLATFORM_WIN32 -#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__) -#define GLAD_PLATFORM_WIN32 1 -#else -#define GLAD_PLATFORM_WIN32 0 -#endif -#endif - -#ifndef GLAD_PLATFORM_APPLE -#ifdef __APPLE__ -#define GLAD_PLATFORM_APPLE 1 -#else -#define GLAD_PLATFORM_APPLE 0 -#endif -#endif - -#ifndef GLAD_PLATFORM_EMSCRIPTEN -#ifdef __EMSCRIPTEN__ -#define GLAD_PLATFORM_EMSCRIPTEN 1 -#else -#define GLAD_PLATFORM_EMSCRIPTEN 0 -#endif -#endif - -#ifndef GLAD_PLATFORM_UWP -#if defined(_MSC_VER) && !defined(GLAD_INTERNAL_HAVE_WINAPIFAMILY) -#ifdef __has_include -#if __has_include() -#define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1 -#endif -#elif _MSC_VER >= 1700 && !_USING_V110_SDK71_ -#define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1 -#endif -#endif - -#ifdef GLAD_INTERNAL_HAVE_WINAPIFAMILY -#include -#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && \ - WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) -#define GLAD_PLATFORM_UWP 1 -#endif -#endif - -#ifndef GLAD_PLATFORM_UWP -#define GLAD_PLATFORM_UWP 0 -#endif -#endif - -#ifdef __GNUC__ -#define GLAD_GNUC_EXTENSION __extension__ -#else -#define GLAD_GNUC_EXTENSION -#endif - -#define GLAD_UNUSED(x) (void)(x) - -#ifndef GLAD_API_CALL -#if defined(GLAD_API_CALL_EXPORT) -#if GLAD_PLATFORM_WIN32 || defined(__CYGWIN__) -#if defined(GLAD_API_CALL_EXPORT_BUILD) -#if defined(__GNUC__) -#define GLAD_API_CALL __attribute__((dllexport)) extern -#else -#define GLAD_API_CALL __declspec(dllexport) extern -#endif -#else -#if defined(__GNUC__) -#define GLAD_API_CALL __attribute__((dllimport)) extern -#else -#define GLAD_API_CALL __declspec(dllimport) extern -#endif -#endif -#elif defined(__GNUC__) && defined(GLAD_API_CALL_EXPORT_BUILD) -#define GLAD_API_CALL __attribute__((visibility("default"))) extern -#else -#define GLAD_API_CALL extern -#endif -#else -#define GLAD_API_CALL extern -#endif -#endif - -#ifdef APIENTRY -#define GLAD_API_PTR APIENTRY -#elif GLAD_PLATFORM_WIN32 -#define GLAD_API_PTR __stdcall -#else -#define GLAD_API_PTR -#endif - -#ifndef GLAPI -#define GLAPI GLAD_API_CALL -#endif - -#ifndef GLAPIENTRY -#define GLAPIENTRY GLAD_API_PTR -#endif - -#define GLAD_MAKE_VERSION(major, minor) (major * 10000 + minor) -#define GLAD_VERSION_MAJOR(version) (version / 10000) -#define GLAD_VERSION_MINOR(version) (version % 10000) - -#define GLAD_GENERATOR_VERSION "2.0.5" - -typedef void (*GLADapiproc)(void); - -typedef GLADapiproc (*GLADloadfunc)(const char *name); -typedef GLADapiproc (*GLADuserptrloadfunc)(void *userptr, const char *name); - -typedef void (*GLADprecallback)(const char *name, GLADapiproc apiproc, int len_args, ...); -typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apiproc, int len_args, - ...); - -#endif /* GLAD_PLATFORM_H_ */ - -#define ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0 -#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054 -#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043 -#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043 -#define ERROR_INVALID_PROFILE_ARB 0x2096 -#define ERROR_INVALID_VERSION_ARB 0x2095 -#define ERROR_MISSING_AFFINITY_MASK_NV 0x20D1 -#define WGL_ACCELERATION_ARB 0x2003 -#define WGL_ACCELERATION_EXT 0x2003 -#define WGL_ACCESS_READ_ONLY_NV 0x00000000 -#define WGL_ACCESS_READ_WRITE_NV 0x00000001 -#define WGL_ACCESS_WRITE_DISCARD_NV 0x00000002 -#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 -#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021 -#define WGL_ACCUM_BITS_ARB 0x201D -#define WGL_ACCUM_BITS_EXT 0x201D -#define WGL_ACCUM_BLUE_BITS_ARB 0x2020 -#define WGL_ACCUM_BLUE_BITS_EXT 0x2020 -#define WGL_ACCUM_GREEN_BITS_ARB 0x201F -#define WGL_ACCUM_GREEN_BITS_EXT 0x201F -#define WGL_ACCUM_RED_BITS_ARB 0x201E -#define WGL_ACCUM_RED_BITS_EXT 0x201E -#define WGL_ALPHA_BITS_ARB 0x201B -#define WGL_ALPHA_BITS_EXT 0x201B -#define WGL_ALPHA_SHIFT_ARB 0x201C -#define WGL_ALPHA_SHIFT_EXT 0x201C -#define WGL_AUX0_ARB 0x2087 -#define WGL_AUX1_ARB 0x2088 -#define WGL_AUX2_ARB 0x2089 -#define WGL_AUX3_ARB 0x208A -#define WGL_AUX4_ARB 0x208B -#define WGL_AUX5_ARB 0x208C -#define WGL_AUX6_ARB 0x208D -#define WGL_AUX7_ARB 0x208E -#define WGL_AUX8_ARB 0x208F -#define WGL_AUX9_ARB 0x2090 -#define WGL_AUX_BUFFERS_ARB 0x2024 -#define WGL_AUX_BUFFERS_EXT 0x2024 -#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002 -#define WGL_BACK_LEFT_ARB 0x2085 -#define WGL_BACK_RIGHT_ARB 0x2086 -#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3 -#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4 -#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4 -#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3 -#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2 -#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1 -#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1 -#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0 -#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071 -#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070 -#define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1 -#define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2 -#define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0 -#define WGL_BLUE_BITS_ARB 0x2019 -#define WGL_BLUE_BITS_EXT 0x2019 -#define WGL_BLUE_SHIFT_ARB 0x201A -#define WGL_BLUE_SHIFT_EXT 0x201A -#define WGL_COLORSPACE_EXT 0x309D -#define WGL_COLORSPACE_LINEAR_EXT 0x308A -#define WGL_COLORSPACE_SRGB_EXT 0x3089 -#define WGL_COLOR_BITS_ARB 0x2014 -#define WGL_COLOR_BITS_EXT 0x2014 -#define WGL_COLOR_SAMPLES_NV 0x20B9 -#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 -#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 -#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001 -#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004 -#define WGL_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004 -#define WGL_CONTEXT_FLAGS_ARB 0x2094 -#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 -#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093 -#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 -#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 -#define WGL_CONTEXT_MULTIGPU_ATTRIB_AFR_NV 0x20AC -#define WGL_CONTEXT_MULTIGPU_ATTRIB_MULTICAST_NV 0x20AD -#define WGL_CONTEXT_MULTIGPU_ATTRIB_MULTI_DISPLAY_MULTICAST_NV 0x20AE -#define WGL_CONTEXT_MULTIGPU_ATTRIB_NV 0x20AA -#define WGL_CONTEXT_MULTIGPU_ATTRIB_SINGLE_NV 0x20AB -#define WGL_CONTEXT_OPENGL_NO_ERROR_ARB 0x31B3 -#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126 -#define WGL_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097 -#define WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098 -#define WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0 -#define WGL_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008 -#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 -#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004 -#define WGL_COVERAGE_SAMPLES_NV 0x2042 -#define WGL_CUBE_MAP_FACE_ARB 0x207C -#define WGL_DEPTH_BITS_ARB 0x2022 -#define WGL_DEPTH_BITS_EXT 0x2022 -#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004 -#define WGL_DEPTH_COMPONENT_NV 0x20A7 -#define WGL_DEPTH_FLOAT_EXT 0x2040 -#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5 -#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050 -#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051 -#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052 -#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053 -#define WGL_DOUBLE_BUFFER_ARB 0x2011 -#define WGL_DOUBLE_BUFFER_EXT 0x2011 -#define WGL_DRAW_TO_BITMAP_ARB 0x2002 -#define WGL_DRAW_TO_BITMAP_EXT 0x2002 -#define WGL_DRAW_TO_PBUFFER_ARB 0x202D -#define WGL_DRAW_TO_PBUFFER_EXT 0x202D -#define WGL_DRAW_TO_WINDOW_ARB 0x2001 -#define WGL_DRAW_TO_WINDOW_EXT 0x2001 -#define WGL_FLOAT_COMPONENTS_NV 0x20B0 -#define WGL_FONT_LINES 0 -#define WGL_FONT_POLYGONS 1 -#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9 -#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9 -#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001 -#define WGL_FRONT_LEFT_ARB 0x2083 -#define WGL_FRONT_RIGHT_ARB 0x2084 -#define WGL_FULL_ACCELERATION_ARB 0x2027 -#define WGL_FULL_ACCELERATION_EXT 0x2027 -#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F -#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E -#define WGL_GENERIC_ACCELERATION_ARB 0x2026 -#define WGL_GENERIC_ACCELERATION_EXT 0x2026 -#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049 -#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048 -#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C -#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A -#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B -#define WGL_GENLOCK_SOURCE_EXTERNAL_FIELD_I3D 0x2046 -#define WGL_GENLOCK_SOURCE_EXTERNAL_SYNC_I3D 0x2045 -#define WGL_GENLOCK_SOURCE_EXTERNAL_TTL_I3D 0x2047 -#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044 -#define WGL_GPU_CLOCK_AMD 0x21A4 -#define WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2 -#define WGL_GPU_NUM_PIPES_AMD 0x21A5 -#define WGL_GPU_NUM_RB_AMD 0x21A7 -#define WGL_GPU_NUM_SIMD_AMD 0x21A6 -#define WGL_GPU_NUM_SPI_AMD 0x21A8 -#define WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02 -#define WGL_GPU_RAM_AMD 0x21A3 -#define WGL_GPU_RENDERER_STRING_AMD 0x1F01 -#define WGL_GPU_VENDOR_AMD 0x1F00 -#define WGL_GREEN_BITS_ARB 0x2017 -#define WGL_GREEN_BITS_EXT 0x2017 -#define WGL_GREEN_SHIFT_ARB 0x2018 -#define WGL_GREEN_SHIFT_EXT 0x2018 -#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002 -#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001 -#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 -#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030 -#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030 -#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E -#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E -#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F -#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F -#define WGL_MIPMAP_LEVEL_ARB 0x207B -#define WGL_MIPMAP_TEXTURE_ARB 0x2074 -#define WGL_NEED_PALETTE_ARB 0x2004 -#define WGL_NEED_PALETTE_EXT 0x2004 -#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005 -#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005 -#define WGL_NO_ACCELERATION_ARB 0x2025 -#define WGL_NO_ACCELERATION_EXT 0x2025 -#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261 -#define WGL_NO_TEXTURE_ARB 0x2077 -#define WGL_NUMBER_OVERLAYS_ARB 0x2008 -#define WGL_NUMBER_OVERLAYS_EXT 0x2008 -#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 -#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000 -#define WGL_NUMBER_UNDERLAYS_ARB 0x2009 -#define WGL_NUMBER_UNDERLAYS_EXT 0x2009 -#define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF -#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0 -#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032 -#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031 -#define WGL_PBUFFER_HEIGHT_ARB 0x2035 -#define WGL_PBUFFER_HEIGHT_EXT 0x2035 -#define WGL_PBUFFER_LARGEST_ARB 0x2033 -#define WGL_PBUFFER_LARGEST_EXT 0x2033 -#define WGL_PBUFFER_LOST_ARB 0x2036 -#define WGL_PBUFFER_WIDTH_ARB 0x2034 -#define WGL_PBUFFER_WIDTH_EXT 0x2034 -#define WGL_PIXEL_TYPE_ARB 0x2013 -#define WGL_PIXEL_TYPE_EXT 0x2013 -#define WGL_RED_BITS_ARB 0x2015 -#define WGL_RED_BITS_EXT 0x2015 -#define WGL_RED_SHIFT_ARB 0x2016 -#define WGL_RED_SHIFT_EXT 0x2016 -#define WGL_SAMPLES_3DFX 0x2061 -#define WGL_SAMPLES_ARB 0x2042 -#define WGL_SAMPLES_EXT 0x2042 -#define WGL_SAMPLE_BUFFERS_3DFX 0x2060 -#define WGL_SAMPLE_BUFFERS_ARB 0x2041 -#define WGL_SAMPLE_BUFFERS_EXT 0x2041 -#define WGL_SHARE_ACCUM_ARB 0x200E -#define WGL_SHARE_ACCUM_EXT 0x200E -#define WGL_SHARE_DEPTH_ARB 0x200C -#define WGL_SHARE_DEPTH_EXT 0x200C -#define WGL_SHARE_STENCIL_ARB 0x200D -#define WGL_SHARE_STENCIL_EXT 0x200D -#define WGL_STENCIL_BITS_ARB 0x2023 -#define WGL_STENCIL_BITS_EXT 0x2023 -#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008 -#define WGL_STEREO_ARB 0x2012 -#define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056 -#define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055 -#define WGL_STEREO_EXT 0x2012 -#define WGL_STEREO_POLARITY_INVERT_3DL 0x2058 -#define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057 -#define WGL_SUPPORT_GDI_ARB 0x200F -#define WGL_SUPPORT_GDI_EXT 0x200F -#define WGL_SUPPORT_OPENGL_ARB 0x2010 -#define WGL_SUPPORT_OPENGL_EXT 0x2010 -#define WGL_SWAP_COPY_ARB 0x2029 -#define WGL_SWAP_COPY_EXT 0x2029 -#define WGL_SWAP_EXCHANGE_ARB 0x2028 -#define WGL_SWAP_EXCHANGE_EXT 0x2028 -#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006 -#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006 -#define WGL_SWAP_MAIN_PLANE 0x00000001 -#define WGL_SWAP_METHOD_ARB 0x2007 -#define WGL_SWAP_METHOD_EXT 0x2007 -#define WGL_SWAP_OVERLAY1 0x00000002 -#define WGL_SWAP_OVERLAY10 0x00000400 -#define WGL_SWAP_OVERLAY11 0x00000800 -#define WGL_SWAP_OVERLAY12 0x00001000 -#define WGL_SWAP_OVERLAY13 0x00002000 -#define WGL_SWAP_OVERLAY14 0x00004000 -#define WGL_SWAP_OVERLAY15 0x00008000 -#define WGL_SWAP_OVERLAY2 0x00000004 -#define WGL_SWAP_OVERLAY3 0x00000008 -#define WGL_SWAP_OVERLAY4 0x00000010 -#define WGL_SWAP_OVERLAY5 0x00000020 -#define WGL_SWAP_OVERLAY6 0x00000040 -#define WGL_SWAP_OVERLAY7 0x00000080 -#define WGL_SWAP_OVERLAY8 0x00000100 -#define WGL_SWAP_OVERLAY9 0x00000200 -#define WGL_SWAP_UNDEFINED_ARB 0x202A -#define WGL_SWAP_UNDEFINED_EXT 0x202A -#define WGL_SWAP_UNDERLAY1 0x00010000 -#define WGL_SWAP_UNDERLAY10 0x02000000 -#define WGL_SWAP_UNDERLAY11 0x04000000 -#define WGL_SWAP_UNDERLAY12 0x08000000 -#define WGL_SWAP_UNDERLAY13 0x10000000 -#define WGL_SWAP_UNDERLAY14 0x20000000 -#define WGL_SWAP_UNDERLAY15 0x40000000 -#define WGL_SWAP_UNDERLAY2 0x00020000 -#define WGL_SWAP_UNDERLAY3 0x00040000 -#define WGL_SWAP_UNDERLAY4 0x00080000 -#define WGL_SWAP_UNDERLAY5 0x00100000 -#define WGL_SWAP_UNDERLAY6 0x00200000 -#define WGL_SWAP_UNDERLAY7 0x00400000 -#define WGL_SWAP_UNDERLAY8 0x00800000 -#define WGL_SWAP_UNDERLAY9 0x01000000 -#define WGL_TEXTURE_1D_ARB 0x2079 -#define WGL_TEXTURE_2D_ARB 0x207A -#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078 -#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E -#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080 -#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082 -#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D -#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F -#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081 -#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6 -#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8 -#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7 -#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6 -#define WGL_TEXTURE_FLOAT_R_NV 0x20B5 -#define WGL_TEXTURE_FORMAT_ARB 0x2072 -#define WGL_TEXTURE_RECTANGLE_ATI 0x21A5 -#define WGL_TEXTURE_RECTANGLE_NV 0x20A2 -#define WGL_TEXTURE_RGBA_ARB 0x2076 -#define WGL_TEXTURE_RGB_ARB 0x2075 -#define WGL_TEXTURE_TARGET_ARB 0x2073 -#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A -#define WGL_TRANSPARENT_ARB 0x200A -#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039 -#define WGL_TRANSPARENT_EXT 0x200A -#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038 -#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B -#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037 -#define WGL_TRANSPARENT_VALUE_EXT 0x200B -#define WGL_TYPE_COLORINDEX_ARB 0x202C -#define WGL_TYPE_COLORINDEX_EXT 0x202C -#define WGL_TYPE_RGBA_ARB 0x202B -#define WGL_TYPE_RGBA_EXT 0x202B -#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0 -#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0 -#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8 -#define WGL_UNIQUE_ID_NV 0x20CE -#define WGL_VIDEO_OUT_ALPHA_NV 0x20C4 -#define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 -#define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 -#define WGL_VIDEO_OUT_COLOR_NV 0x20C3 -#define WGL_VIDEO_OUT_DEPTH_NV 0x20C5 -#define WGL_VIDEO_OUT_FIELD_1 0x20C9 -#define WGL_VIDEO_OUT_FIELD_2 0x20CA -#define WGL_VIDEO_OUT_FRAME 0x20C8 -#define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB -#define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC - -struct _GPU_DEVICE { - DWORD cb; - CHAR DeviceName[32]; - CHAR DeviceString[128]; - DWORD Flags; - RECT rcVirtualScreen; -}; -DECLARE_HANDLE(HPBUFFERARB); -DECLARE_HANDLE(HPBUFFEREXT); -DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV); -DECLARE_HANDLE(HPVIDEODEV); -DECLARE_HANDLE(HPGPUNV); -DECLARE_HANDLE(HGPUNV); -DECLARE_HANDLE(HVIDEOINPUTDEVICENV); -typedef struct _GPU_DEVICE GPU_DEVICE; -typedef struct _GPU_DEVICE *PGPU_DEVICE; - -#define WGL_VERSION_1_0 1 -GLAD_API_CALL int GLAD_WGL_VERSION_1_0; -#define WGL_3DFX_multisample 1 -GLAD_API_CALL int GLAD_WGL_3DFX_multisample; -#define WGL_3DL_stereo_control 1 -GLAD_API_CALL int GLAD_WGL_3DL_stereo_control; -#define WGL_AMD_gpu_association 1 -GLAD_API_CALL int GLAD_WGL_AMD_gpu_association; -#define WGL_ARB_buffer_region 1 -GLAD_API_CALL int GLAD_WGL_ARB_buffer_region; -#define WGL_ARB_context_flush_control 1 -GLAD_API_CALL int GLAD_WGL_ARB_context_flush_control; -#define WGL_ARB_create_context 1 -GLAD_API_CALL int GLAD_WGL_ARB_create_context; -#define WGL_ARB_create_context_no_error 1 -GLAD_API_CALL int GLAD_WGL_ARB_create_context_no_error; -#define WGL_ARB_create_context_profile 1 -GLAD_API_CALL int GLAD_WGL_ARB_create_context_profile; -#define WGL_ARB_create_context_robustness 1 -GLAD_API_CALL int GLAD_WGL_ARB_create_context_robustness; -#define WGL_ARB_extensions_string 1 -GLAD_API_CALL int GLAD_WGL_ARB_extensions_string; -#define WGL_ARB_framebuffer_sRGB 1 -GLAD_API_CALL int GLAD_WGL_ARB_framebuffer_sRGB; -#define WGL_ARB_make_current_read 1 -GLAD_API_CALL int GLAD_WGL_ARB_make_current_read; -#define WGL_ARB_multisample 1 -GLAD_API_CALL int GLAD_WGL_ARB_multisample; -#define WGL_ARB_pbuffer 1 -GLAD_API_CALL int GLAD_WGL_ARB_pbuffer; -#define WGL_ARB_pixel_format 1 -GLAD_API_CALL int GLAD_WGL_ARB_pixel_format; -#define WGL_ARB_pixel_format_float 1 -GLAD_API_CALL int GLAD_WGL_ARB_pixel_format_float; -#define WGL_ARB_render_texture 1 -GLAD_API_CALL int GLAD_WGL_ARB_render_texture; -#define WGL_ARB_robustness_application_isolation 1 -GLAD_API_CALL int GLAD_WGL_ARB_robustness_application_isolation; -#define WGL_ARB_robustness_share_group_isolation 1 -GLAD_API_CALL int GLAD_WGL_ARB_robustness_share_group_isolation; -#define WGL_ATI_pixel_format_float 1 -GLAD_API_CALL int GLAD_WGL_ATI_pixel_format_float; -#define WGL_ATI_render_texture_rectangle 1 -GLAD_API_CALL int GLAD_WGL_ATI_render_texture_rectangle; -#define WGL_EXT_colorspace 1 -GLAD_API_CALL int GLAD_WGL_EXT_colorspace; -#define WGL_EXT_create_context_es2_profile 1 -GLAD_API_CALL int GLAD_WGL_EXT_create_context_es2_profile; -#define WGL_EXT_create_context_es_profile 1 -GLAD_API_CALL int GLAD_WGL_EXT_create_context_es_profile; -#define WGL_EXT_depth_float 1 -GLAD_API_CALL int GLAD_WGL_EXT_depth_float; -#define WGL_EXT_display_color_table 1 -GLAD_API_CALL int GLAD_WGL_EXT_display_color_table; -#define WGL_EXT_extensions_string 1 -GLAD_API_CALL int GLAD_WGL_EXT_extensions_string; -#define WGL_EXT_framebuffer_sRGB 1 -GLAD_API_CALL int GLAD_WGL_EXT_framebuffer_sRGB; -#define WGL_EXT_make_current_read 1 -GLAD_API_CALL int GLAD_WGL_EXT_make_current_read; -#define WGL_EXT_multisample 1 -GLAD_API_CALL int GLAD_WGL_EXT_multisample; -#define WGL_EXT_pbuffer 1 -GLAD_API_CALL int GLAD_WGL_EXT_pbuffer; -#define WGL_EXT_pixel_format 1 -GLAD_API_CALL int GLAD_WGL_EXT_pixel_format; -#define WGL_EXT_pixel_format_packed_float 1 -GLAD_API_CALL int GLAD_WGL_EXT_pixel_format_packed_float; -#define WGL_EXT_swap_control 1 -GLAD_API_CALL int GLAD_WGL_EXT_swap_control; -#define WGL_EXT_swap_control_tear 1 -GLAD_API_CALL int GLAD_WGL_EXT_swap_control_tear; -#define WGL_I3D_digital_video_control 1 -GLAD_API_CALL int GLAD_WGL_I3D_digital_video_control; -#define WGL_I3D_gamma 1 -GLAD_API_CALL int GLAD_WGL_I3D_gamma; -#define WGL_I3D_genlock 1 -GLAD_API_CALL int GLAD_WGL_I3D_genlock; -#define WGL_I3D_image_buffer 1 -GLAD_API_CALL int GLAD_WGL_I3D_image_buffer; -#define WGL_I3D_swap_frame_lock 1 -GLAD_API_CALL int GLAD_WGL_I3D_swap_frame_lock; -#define WGL_I3D_swap_frame_usage 1 -GLAD_API_CALL int GLAD_WGL_I3D_swap_frame_usage; -#define WGL_NV_DX_interop 1 -GLAD_API_CALL int GLAD_WGL_NV_DX_interop; -#define WGL_NV_DX_interop2 1 -GLAD_API_CALL int GLAD_WGL_NV_DX_interop2; -#define WGL_NV_copy_image 1 -GLAD_API_CALL int GLAD_WGL_NV_copy_image; -#define WGL_NV_delay_before_swap 1 -GLAD_API_CALL int GLAD_WGL_NV_delay_before_swap; -#define WGL_NV_float_buffer 1 -GLAD_API_CALL int GLAD_WGL_NV_float_buffer; -#define WGL_NV_gpu_affinity 1 -GLAD_API_CALL int GLAD_WGL_NV_gpu_affinity; -#define WGL_NV_multigpu_context 1 -GLAD_API_CALL int GLAD_WGL_NV_multigpu_context; -#define WGL_NV_multisample_coverage 1 -GLAD_API_CALL int GLAD_WGL_NV_multisample_coverage; -#define WGL_NV_present_video 1 -GLAD_API_CALL int GLAD_WGL_NV_present_video; -#define WGL_NV_render_depth_texture 1 -GLAD_API_CALL int GLAD_WGL_NV_render_depth_texture; -#define WGL_NV_render_texture_rectangle 1 -GLAD_API_CALL int GLAD_WGL_NV_render_texture_rectangle; -#define WGL_NV_swap_group 1 -GLAD_API_CALL int GLAD_WGL_NV_swap_group; -#define WGL_NV_vertex_array_range 1 -GLAD_API_CALL int GLAD_WGL_NV_vertex_array_range; -#define WGL_NV_video_capture 1 -GLAD_API_CALL int GLAD_WGL_NV_video_capture; -#define WGL_NV_video_output 1 -GLAD_API_CALL int GLAD_WGL_NV_video_output; -#define WGL_OML_sync_control 1 -GLAD_API_CALL int GLAD_WGL_OML_sync_control; - -typedef int(GLAD_API_PTR *PFNCHOOSEPIXELFORMATPROC)(HDC hDc, const PIXELFORMATDESCRIPTOR *pPfd); -typedef int(GLAD_API_PTR *PFNDESCRIBEPIXELFORMATPROC)(HDC hdc, int ipfd, UINT cjpfd, - PIXELFORMATDESCRIPTOR *ppfd); -typedef UINT(GLAD_API_PTR *PFNGETENHMETAFILEPIXELFORMATPROC)(HENHMETAFILE hemf, UINT cbBuffer, - PIXELFORMATDESCRIPTOR *ppfd); -typedef int(GLAD_API_PTR *PFNGETPIXELFORMATPROC)(HDC hdc); -typedef BOOL(GLAD_API_PTR *PFNSETPIXELFORMATPROC)(HDC hdc, int ipfd, - const PIXELFORMATDESCRIPTOR *ppfd); -typedef BOOL(GLAD_API_PTR *PFNSWAPBUFFERSPROC)(HDC hdc); -typedef void *(GLAD_API_PTR *PFNWGLALLOCATEMEMORYNVPROC)(GLsizei size, GLfloat readfreq, - GLfloat writefreq, GLfloat priority); -typedef BOOL(GLAD_API_PTR *PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC)(HDC hDC, const HANDLE *pEvent, - const LPVOID *pAddress, - const DWORD *pSize, UINT count); -typedef BOOL(GLAD_API_PTR *PFNWGLBEGINFRAMETRACKINGI3DPROC)(void); -typedef GLboolean(GLAD_API_PTR *PFNWGLBINDDISPLAYCOLORTABLEEXTPROC)(GLushort id); -typedef BOOL(GLAD_API_PTR *PFNWGLBINDSWAPBARRIERNVPROC)(GLuint group, GLuint barrier); -typedef BOOL(GLAD_API_PTR *PFNWGLBINDTEXIMAGEARBPROC)(HPBUFFERARB hPbuffer, int iBuffer); -typedef BOOL(GLAD_API_PTR *PFNWGLBINDVIDEOCAPTUREDEVICENVPROC)(UINT uVideoSlot, - HVIDEOINPUTDEVICENV hDevice); -typedef BOOL(GLAD_API_PTR *PFNWGLBINDVIDEODEVICENVPROC)(HDC hDc, unsigned int uVideoSlot, - HVIDEOOUTPUTDEVICENV hVideoDevice, - const int *piAttribList); -typedef BOOL(GLAD_API_PTR *PFNWGLBINDVIDEOIMAGENVPROC)(HPVIDEODEV hVideoDevice, - HPBUFFERARB hPbuffer, int iVideoBuffer); -typedef VOID(GLAD_API_PTR *PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC)( - HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, - GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -typedef BOOL(GLAD_API_PTR *PFNWGLCHOOSEPIXELFORMATARBPROC)(HDC hdc, const int *piAttribIList, - const FLOAT *pfAttribFList, - UINT nMaxFormats, int *piFormats, - UINT *nNumFormats); -typedef BOOL(GLAD_API_PTR *PFNWGLCHOOSEPIXELFORMATEXTPROC)(HDC hdc, const int *piAttribIList, - const FLOAT *pfAttribFList, - UINT nMaxFormats, int *piFormats, - UINT *nNumFormats); -typedef BOOL(GLAD_API_PTR *PFNWGLCOPYCONTEXTPROC)(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask); -typedef BOOL(GLAD_API_PTR *PFNWGLCOPYIMAGESUBDATANVPROC)( - HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, - GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, - GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); -typedef HDC(GLAD_API_PTR *PFNWGLCREATEAFFINITYDCNVPROC)(const HGPUNV *phGpuList); -typedef HGLRC(GLAD_API_PTR *PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC)(UINT id); -typedef HGLRC(GLAD_API_PTR *PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC)(UINT id, - HGLRC hShareContext, - const int *attribList); -typedef HANDLE(GLAD_API_PTR *PFNWGLCREATEBUFFERREGIONARBPROC)(HDC hDC, int iLayerPlane, UINT uType); -typedef HGLRC(GLAD_API_PTR *PFNWGLCREATECONTEXTPROC)(HDC hDc); -typedef HGLRC(GLAD_API_PTR *PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC hDC, HGLRC hShareContext, - const int *attribList); -typedef GLboolean(GLAD_API_PTR *PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC)(GLushort id); -typedef LPVOID(GLAD_API_PTR *PFNWGLCREATEIMAGEBUFFERI3DPROC)(HDC hDC, DWORD dwSize, UINT uFlags); -typedef HGLRC(GLAD_API_PTR *PFNWGLCREATELAYERCONTEXTPROC)(HDC hDc, int level); -typedef HPBUFFERARB(GLAD_API_PTR *PFNWGLCREATEPBUFFERARBPROC)(HDC hDC, int iPixelFormat, int iWidth, - int iHeight, const int *piAttribList); -typedef HPBUFFEREXT(GLAD_API_PTR *PFNWGLCREATEPBUFFEREXTPROC)(HDC hDC, int iPixelFormat, int iWidth, - int iHeight, const int *piAttribList); -typedef BOOL(GLAD_API_PTR *PFNWGLDXCLOSEDEVICENVPROC)(HANDLE hDevice); -typedef BOOL(GLAD_API_PTR *PFNWGLDXLOCKOBJECTSNVPROC)(HANDLE hDevice, GLint count, - HANDLE *hObjects); -typedef BOOL(GLAD_API_PTR *PFNWGLDXOBJECTACCESSNVPROC)(HANDLE hObject, GLenum access); -typedef HANDLE(GLAD_API_PTR *PFNWGLDXOPENDEVICENVPROC)(void *dxDevice); -typedef HANDLE(GLAD_API_PTR *PFNWGLDXREGISTEROBJECTNVPROC)(HANDLE hDevice, void *dxObject, - GLuint name, GLenum type, GLenum access); -typedef BOOL(GLAD_API_PTR *PFNWGLDXSETRESOURCESHAREHANDLENVPROC)(void *dxObject, - HANDLE shareHandle); -typedef BOOL(GLAD_API_PTR *PFNWGLDXUNLOCKOBJECTSNVPROC)(HANDLE hDevice, GLint count, - HANDLE *hObjects); -typedef BOOL(GLAD_API_PTR *PFNWGLDXUNREGISTEROBJECTNVPROC)(HANDLE hDevice, HANDLE hObject); -typedef BOOL(GLAD_API_PTR *PFNWGLDELAYBEFORESWAPNVPROC)(HDC hDC, GLfloat seconds); -typedef BOOL(GLAD_API_PTR *PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC)(HGLRC hglrc); -typedef VOID(GLAD_API_PTR *PFNWGLDELETEBUFFERREGIONARBPROC)(HANDLE hRegion); -typedef BOOL(GLAD_API_PTR *PFNWGLDELETECONTEXTPROC)(HGLRC oldContext); -typedef BOOL(GLAD_API_PTR *PFNWGLDELETEDCNVPROC)(HDC hdc); -typedef BOOL(GLAD_API_PTR *PFNWGLDESCRIBELAYERPLANEPROC)(HDC hDc, int pixelFormat, int layerPlane, - UINT nBytes, LAYERPLANEDESCRIPTOR *plpd); -typedef VOID(GLAD_API_PTR *PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC)(GLushort id); -typedef BOOL(GLAD_API_PTR *PFNWGLDESTROYIMAGEBUFFERI3DPROC)(HDC hDC, LPVOID pAddress); -typedef BOOL(GLAD_API_PTR *PFNWGLDESTROYPBUFFERARBPROC)(HPBUFFERARB hPbuffer); -typedef BOOL(GLAD_API_PTR *PFNWGLDESTROYPBUFFEREXTPROC)(HPBUFFEREXT hPbuffer); -typedef BOOL(GLAD_API_PTR *PFNWGLDISABLEFRAMELOCKI3DPROC)(void); -typedef BOOL(GLAD_API_PTR *PFNWGLDISABLEGENLOCKI3DPROC)(HDC hDC); -typedef BOOL(GLAD_API_PTR *PFNWGLENABLEFRAMELOCKI3DPROC)(void); -typedef BOOL(GLAD_API_PTR *PFNWGLENABLEGENLOCKI3DPROC)(HDC hDC); -typedef BOOL(GLAD_API_PTR *PFNWGLENDFRAMETRACKINGI3DPROC)(void); -typedef BOOL(GLAD_API_PTR *PFNWGLENUMGPUDEVICESNVPROC)(HGPUNV hGpu, UINT iDeviceIndex, - PGPU_DEVICE lpGpuDevice); -typedef BOOL(GLAD_API_PTR *PFNWGLENUMGPUSFROMAFFINITYDCNVPROC)(HDC hAffinityDC, UINT iGpuIndex, - HGPUNV *hGpu); -typedef BOOL(GLAD_API_PTR *PFNWGLENUMGPUSNVPROC)(UINT iGpuIndex, HGPUNV *phGpu); -typedef UINT(GLAD_API_PTR *PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC)( - HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList); -typedef int(GLAD_API_PTR *PFNWGLENUMERATEVIDEODEVICESNVPROC)(HDC hDc, - HVIDEOOUTPUTDEVICENV *phDeviceList); -typedef void(GLAD_API_PTR *PFNWGLFREEMEMORYNVPROC)(void *pointer); -typedef BOOL(GLAD_API_PTR *PFNWGLGENLOCKSAMPLERATEI3DPROC)(HDC hDC, UINT uRate); -typedef BOOL(GLAD_API_PTR *PFNWGLGENLOCKSOURCEDELAYI3DPROC)(HDC hDC, UINT uDelay); -typedef BOOL(GLAD_API_PTR *PFNWGLGENLOCKSOURCEEDGEI3DPROC)(HDC hDC, UINT uEdge); -typedef BOOL(GLAD_API_PTR *PFNWGLGENLOCKSOURCEI3DPROC)(HDC hDC, UINT uSource); -typedef UINT(GLAD_API_PTR *PFNWGLGETCONTEXTGPUIDAMDPROC)(HGLRC hglrc); -typedef HGLRC(GLAD_API_PTR *PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC)(void); -typedef HGLRC(GLAD_API_PTR *PFNWGLGETCURRENTCONTEXTPROC)(void); -typedef HDC(GLAD_API_PTR *PFNWGLGETCURRENTDCPROC)(void); -typedef HDC(GLAD_API_PTR *PFNWGLGETCURRENTREADDCARBPROC)(void); -typedef HDC(GLAD_API_PTR *PFNWGLGETCURRENTREADDCEXTPROC)(void); -typedef BOOL(GLAD_API_PTR *PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC)(HDC hDC, int iAttribute, - int *piValue); -typedef const char *(GLAD_API_PTR *PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC hdc); -typedef const char *(GLAD_API_PTR *PFNWGLGETEXTENSIONSSTRINGEXTPROC)(void); -typedef BOOL(GLAD_API_PTR *PFNWGLGETFRAMEUSAGEI3DPROC)(float *pUsage); -typedef UINT(GLAD_API_PTR *PFNWGLGETGPUIDSAMDPROC)(UINT maxCount, UINT *ids); -typedef INT(GLAD_API_PTR *PFNWGLGETGPUINFOAMDPROC)(UINT id, INT property, GLenum dataType, - UINT size, void *data); -typedef BOOL(GLAD_API_PTR *PFNWGLGETGAMMATABLEI3DPROC)(HDC hDC, int iEntries, USHORT *puRed, - USHORT *puGreen, USHORT *puBlue); -typedef BOOL(GLAD_API_PTR *PFNWGLGETGAMMATABLEPARAMETERSI3DPROC)(HDC hDC, int iAttribute, - int *piValue); -typedef BOOL(GLAD_API_PTR *PFNWGLGETGENLOCKSAMPLERATEI3DPROC)(HDC hDC, UINT *uRate); -typedef BOOL(GLAD_API_PTR *PFNWGLGETGENLOCKSOURCEDELAYI3DPROC)(HDC hDC, UINT *uDelay); -typedef BOOL(GLAD_API_PTR *PFNWGLGETGENLOCKSOURCEEDGEI3DPROC)(HDC hDC, UINT *uEdge); -typedef BOOL(GLAD_API_PTR *PFNWGLGETGENLOCKSOURCEI3DPROC)(HDC hDC, UINT *uSource); -typedef int(GLAD_API_PTR *PFNWGLGETLAYERPALETTEENTRIESPROC)(HDC hdc, int iLayerPlane, int iStart, - int cEntries, COLORREF *pcr); -typedef BOOL(GLAD_API_PTR *PFNWGLGETMSCRATEOMLPROC)(HDC hdc, INT32 *numerator, INT32 *denominator); -typedef HDC(GLAD_API_PTR *PFNWGLGETPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer); -typedef HDC(GLAD_API_PTR *PFNWGLGETPBUFFERDCEXTPROC)(HPBUFFEREXT hPbuffer); -typedef BOOL(GLAD_API_PTR *PFNWGLGETPIXELFORMATATTRIBFVARBPROC)(HDC hdc, int iPixelFormat, - int iLayerPlane, UINT nAttributes, - const int *piAttributes, - FLOAT *pfValues); -typedef BOOL(GLAD_API_PTR *PFNWGLGETPIXELFORMATATTRIBFVEXTPROC)(HDC hdc, int iPixelFormat, - int iLayerPlane, UINT nAttributes, - int *piAttributes, FLOAT *pfValues); -typedef BOOL(GLAD_API_PTR *PFNWGLGETPIXELFORMATATTRIBIVARBPROC)(HDC hdc, int iPixelFormat, - int iLayerPlane, UINT nAttributes, - const int *piAttributes, - int *piValues); -typedef BOOL(GLAD_API_PTR *PFNWGLGETPIXELFORMATATTRIBIVEXTPROC)(HDC hdc, int iPixelFormat, - int iLayerPlane, UINT nAttributes, - int *piAttributes, int *piValues); -typedef PROC(GLAD_API_PTR *PFNWGLGETPROCADDRESSPROC)(LPCSTR lpszProc); -typedef int(GLAD_API_PTR *PFNWGLGETSWAPINTERVALEXTPROC)(void); -typedef BOOL(GLAD_API_PTR *PFNWGLGETSYNCVALUESOMLPROC)(HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc); -typedef BOOL(GLAD_API_PTR *PFNWGLGETVIDEODEVICENVPROC)(HDC hDC, int numDevices, - HPVIDEODEV *hVideoDevice); -typedef BOOL(GLAD_API_PTR *PFNWGLGETVIDEOINFONVPROC)(HPVIDEODEV hpVideoDevice, - unsigned long *pulCounterOutputPbuffer, - unsigned long *pulCounterOutputVideo); -typedef BOOL(GLAD_API_PTR *PFNWGLISENABLEDFRAMELOCKI3DPROC)(BOOL *pFlag); -typedef BOOL(GLAD_API_PTR *PFNWGLISENABLEDGENLOCKI3DPROC)(HDC hDC, BOOL *pFlag); -typedef BOOL(GLAD_API_PTR *PFNWGLJOINSWAPGROUPNVPROC)(HDC hDC, GLuint group); -typedef GLboolean(GLAD_API_PTR *PFNWGLLOADDISPLAYCOLORTABLEEXTPROC)(const GLushort *table, - GLuint length); -typedef BOOL(GLAD_API_PTR *PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC)(HDC hDc, - HVIDEOINPUTDEVICENV hDevice); -typedef BOOL(GLAD_API_PTR *PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC)(HGLRC hglrc); -typedef BOOL(GLAD_API_PTR *PFNWGLMAKECONTEXTCURRENTARBPROC)(HDC hDrawDC, HDC hReadDC, HGLRC hglrc); -typedef BOOL(GLAD_API_PTR *PFNWGLMAKECONTEXTCURRENTEXTPROC)(HDC hDrawDC, HDC hReadDC, HGLRC hglrc); -typedef BOOL(GLAD_API_PTR *PFNWGLMAKECURRENTPROC)(HDC hDc, HGLRC newContext); -typedef BOOL(GLAD_API_PTR *PFNWGLQUERYCURRENTCONTEXTNVPROC)(int iAttribute, int *piValue); -typedef BOOL(GLAD_API_PTR *PFNWGLQUERYFRAMECOUNTNVPROC)(HDC hDC, GLuint *count); -typedef BOOL(GLAD_API_PTR *PFNWGLQUERYFRAMELOCKMASTERI3DPROC)(BOOL *pFlag); -typedef BOOL(GLAD_API_PTR *PFNWGLQUERYFRAMETRACKINGI3DPROC)(DWORD *pFrameCount, - DWORD *pMissedFrames, - float *pLastMissedUsage); -typedef BOOL(GLAD_API_PTR *PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC)(HDC hDC, UINT *uMaxLineDelay, - UINT *uMaxPixelDelay); -typedef BOOL(GLAD_API_PTR *PFNWGLQUERYMAXSWAPGROUPSNVPROC)(HDC hDC, GLuint *maxGroups, - GLuint *maxBarriers); -typedef BOOL(GLAD_API_PTR *PFNWGLQUERYPBUFFERARBPROC)(HPBUFFERARB hPbuffer, int iAttribute, - int *piValue); -typedef BOOL(GLAD_API_PTR *PFNWGLQUERYPBUFFEREXTPROC)(HPBUFFEREXT hPbuffer, int iAttribute, - int *piValue); -typedef BOOL(GLAD_API_PTR *PFNWGLQUERYSWAPGROUPNVPROC)(HDC hDC, GLuint *group, GLuint *barrier); -typedef BOOL(GLAD_API_PTR *PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC)(HDC hDc, - HVIDEOINPUTDEVICENV hDevice, - int iAttribute, int *piValue); -typedef BOOL(GLAD_API_PTR *PFNWGLREALIZELAYERPALETTEPROC)(HDC hdc, int iLayerPlane, BOOL bRealize); -typedef BOOL(GLAD_API_PTR *PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC)(HDC hDC, const LPVOID *pAddress, - UINT count); -typedef int(GLAD_API_PTR *PFNWGLRELEASEPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer, HDC hDC); -typedef int(GLAD_API_PTR *PFNWGLRELEASEPBUFFERDCEXTPROC)(HPBUFFEREXT hPbuffer, HDC hDC); -typedef BOOL(GLAD_API_PTR *PFNWGLRELEASETEXIMAGEARBPROC)(HPBUFFERARB hPbuffer, int iBuffer); -typedef BOOL(GLAD_API_PTR *PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC)(HDC hDc, - HVIDEOINPUTDEVICENV hDevice); -typedef BOOL(GLAD_API_PTR *PFNWGLRELEASEVIDEODEVICENVPROC)(HPVIDEODEV hVideoDevice); -typedef BOOL(GLAD_API_PTR *PFNWGLRELEASEVIDEOIMAGENVPROC)(HPBUFFERARB hPbuffer, int iVideoBuffer); -typedef BOOL(GLAD_API_PTR *PFNWGLRESETFRAMECOUNTNVPROC)(HDC hDC); -typedef BOOL(GLAD_API_PTR *PFNWGLRESTOREBUFFERREGIONARBPROC)(HANDLE hRegion, int x, int y, - int width, int height, int xSrc, - int ySrc); -typedef BOOL(GLAD_API_PTR *PFNWGLSAVEBUFFERREGIONARBPROC)(HANDLE hRegion, int x, int y, int width, - int height); -typedef BOOL(GLAD_API_PTR *PFNWGLSENDPBUFFERTOVIDEONVPROC)(HPBUFFERARB hPbuffer, int iBufferType, - unsigned long *pulCounterPbuffer, - BOOL bBlock); -typedef BOOL(GLAD_API_PTR *PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC)(HDC hDC, int iAttribute, - const int *piValue); -typedef BOOL(GLAD_API_PTR *PFNWGLSETGAMMATABLEI3DPROC)(HDC hDC, int iEntries, const USHORT *puRed, - const USHORT *puGreen, const USHORT *puBlue); -typedef BOOL(GLAD_API_PTR *PFNWGLSETGAMMATABLEPARAMETERSI3DPROC)(HDC hDC, int iAttribute, - const int *piValue); -typedef int(GLAD_API_PTR *PFNWGLSETLAYERPALETTEENTRIESPROC)(HDC hdc, int iLayerPlane, int iStart, - int cEntries, const COLORREF *pcr); -typedef BOOL(GLAD_API_PTR *PFNWGLSETPBUFFERATTRIBARBPROC)(HPBUFFERARB hPbuffer, - const int *piAttribList); -typedef BOOL(GLAD_API_PTR *PFNWGLSETSTEREOEMITTERSTATE3DLPROC)(HDC hDC, UINT uState); -typedef BOOL(GLAD_API_PTR *PFNWGLSHARELISTSPROC)(HGLRC hrcSrvShare, HGLRC hrcSrvSource); -typedef INT64(GLAD_API_PTR *PFNWGLSWAPBUFFERSMSCOMLPROC)(HDC hdc, INT64 target_msc, INT64 divisor, - INT64 remainder); -typedef BOOL(GLAD_API_PTR *PFNWGLSWAPINTERVALEXTPROC)(int interval); -typedef BOOL(GLAD_API_PTR *PFNWGLSWAPLAYERBUFFERSPROC)(HDC hdc, UINT fuFlags); -typedef INT64(GLAD_API_PTR *PFNWGLSWAPLAYERBUFFERSMSCOMLPROC)(HDC hdc, INT fuPlanes, - INT64 target_msc, INT64 divisor, - INT64 remainder); -typedef BOOL(GLAD_API_PTR *PFNWGLUSEFONTBITMAPSPROC)(HDC hDC, DWORD first, DWORD count, - DWORD listBase); -typedef BOOL(GLAD_API_PTR *PFNWGLUSEFONTBITMAPSAPROC)(HDC hDC, DWORD first, DWORD count, - DWORD listBase); -typedef BOOL(GLAD_API_PTR *PFNWGLUSEFONTBITMAPSWPROC)(HDC hDC, DWORD first, DWORD count, - DWORD listBase); -typedef BOOL(GLAD_API_PTR *PFNWGLUSEFONTOUTLINESPROC)(HDC hDC, DWORD first, DWORD count, - DWORD listBase, FLOAT deviation, - FLOAT extrusion, int format, - LPGLYPHMETRICSFLOAT lpgmf); -typedef BOOL(GLAD_API_PTR *PFNWGLUSEFONTOUTLINESAPROC)(HDC hDC, DWORD first, DWORD count, - DWORD listBase, FLOAT deviation, - FLOAT extrusion, int format, - LPGLYPHMETRICSFLOAT lpgmf); -typedef BOOL(GLAD_API_PTR *PFNWGLUSEFONTOUTLINESWPROC)(HDC hDC, DWORD first, DWORD count, - DWORD listBase, FLOAT deviation, - FLOAT extrusion, int format, - LPGLYPHMETRICSFLOAT lpgmf); -typedef BOOL(GLAD_API_PTR *PFNWGLWAITFORMSCOMLPROC)(HDC hdc, INT64 target_msc, INT64 divisor, - INT64 remainder, INT64 *ust, INT64 *msc, - INT64 *sbc); -typedef BOOL(GLAD_API_PTR *PFNWGLWAITFORSBCOMLPROC)(HDC hdc, INT64 target_sbc, INT64 *ust, - INT64 *msc, INT64 *sbc); - -GLAD_API_CALL PFNWGLALLOCATEMEMORYNVPROC glad_wglAllocateMemoryNV; -#define wglAllocateMemoryNV glad_wglAllocateMemoryNV -GLAD_API_CALL PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC glad_wglAssociateImageBufferEventsI3D; -#define wglAssociateImageBufferEventsI3D glad_wglAssociateImageBufferEventsI3D -GLAD_API_CALL PFNWGLBEGINFRAMETRACKINGI3DPROC glad_wglBeginFrameTrackingI3D; -#define wglBeginFrameTrackingI3D glad_wglBeginFrameTrackingI3D -GLAD_API_CALL PFNWGLBINDDISPLAYCOLORTABLEEXTPROC glad_wglBindDisplayColorTableEXT; -#define wglBindDisplayColorTableEXT glad_wglBindDisplayColorTableEXT -GLAD_API_CALL PFNWGLBINDSWAPBARRIERNVPROC glad_wglBindSwapBarrierNV; -#define wglBindSwapBarrierNV glad_wglBindSwapBarrierNV -GLAD_API_CALL PFNWGLBINDTEXIMAGEARBPROC glad_wglBindTexImageARB; -#define wglBindTexImageARB glad_wglBindTexImageARB -GLAD_API_CALL PFNWGLBINDVIDEOCAPTUREDEVICENVPROC glad_wglBindVideoCaptureDeviceNV; -#define wglBindVideoCaptureDeviceNV glad_wglBindVideoCaptureDeviceNV -GLAD_API_CALL PFNWGLBINDVIDEODEVICENVPROC glad_wglBindVideoDeviceNV; -#define wglBindVideoDeviceNV glad_wglBindVideoDeviceNV -GLAD_API_CALL PFNWGLBINDVIDEOIMAGENVPROC glad_wglBindVideoImageNV; -#define wglBindVideoImageNV glad_wglBindVideoImageNV -GLAD_API_CALL PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC glad_wglBlitContextFramebufferAMD; -#define wglBlitContextFramebufferAMD glad_wglBlitContextFramebufferAMD -GLAD_API_CALL PFNWGLCHOOSEPIXELFORMATARBPROC glad_wglChoosePixelFormatARB; -#define wglChoosePixelFormatARB glad_wglChoosePixelFormatARB -GLAD_API_CALL PFNWGLCHOOSEPIXELFORMATEXTPROC glad_wglChoosePixelFormatEXT; -#define wglChoosePixelFormatEXT glad_wglChoosePixelFormatEXT -GLAD_API_CALL PFNWGLCOPYIMAGESUBDATANVPROC glad_wglCopyImageSubDataNV; -#define wglCopyImageSubDataNV glad_wglCopyImageSubDataNV -GLAD_API_CALL PFNWGLCREATEAFFINITYDCNVPROC glad_wglCreateAffinityDCNV; -#define wglCreateAffinityDCNV glad_wglCreateAffinityDCNV -GLAD_API_CALL PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC glad_wglCreateAssociatedContextAMD; -#define wglCreateAssociatedContextAMD glad_wglCreateAssociatedContextAMD -GLAD_API_CALL PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC glad_wglCreateAssociatedContextAttribsAMD; -#define wglCreateAssociatedContextAttribsAMD glad_wglCreateAssociatedContextAttribsAMD -GLAD_API_CALL PFNWGLCREATEBUFFERREGIONARBPROC glad_wglCreateBufferRegionARB; -#define wglCreateBufferRegionARB glad_wglCreateBufferRegionARB -GLAD_API_CALL PFNWGLCREATECONTEXTATTRIBSARBPROC glad_wglCreateContextAttribsARB; -#define wglCreateContextAttribsARB glad_wglCreateContextAttribsARB -GLAD_API_CALL PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC glad_wglCreateDisplayColorTableEXT; -#define wglCreateDisplayColorTableEXT glad_wglCreateDisplayColorTableEXT -GLAD_API_CALL PFNWGLCREATEIMAGEBUFFERI3DPROC glad_wglCreateImageBufferI3D; -#define wglCreateImageBufferI3D glad_wglCreateImageBufferI3D -GLAD_API_CALL PFNWGLCREATEPBUFFERARBPROC glad_wglCreatePbufferARB; -#define wglCreatePbufferARB glad_wglCreatePbufferARB -GLAD_API_CALL PFNWGLCREATEPBUFFEREXTPROC glad_wglCreatePbufferEXT; -#define wglCreatePbufferEXT glad_wglCreatePbufferEXT -GLAD_API_CALL PFNWGLDXCLOSEDEVICENVPROC glad_wglDXCloseDeviceNV; -#define wglDXCloseDeviceNV glad_wglDXCloseDeviceNV -GLAD_API_CALL PFNWGLDXLOCKOBJECTSNVPROC glad_wglDXLockObjectsNV; -#define wglDXLockObjectsNV glad_wglDXLockObjectsNV -GLAD_API_CALL PFNWGLDXOBJECTACCESSNVPROC glad_wglDXObjectAccessNV; -#define wglDXObjectAccessNV glad_wglDXObjectAccessNV -GLAD_API_CALL PFNWGLDXOPENDEVICENVPROC glad_wglDXOpenDeviceNV; -#define wglDXOpenDeviceNV glad_wglDXOpenDeviceNV -GLAD_API_CALL PFNWGLDXREGISTEROBJECTNVPROC glad_wglDXRegisterObjectNV; -#define wglDXRegisterObjectNV glad_wglDXRegisterObjectNV -GLAD_API_CALL PFNWGLDXSETRESOURCESHAREHANDLENVPROC glad_wglDXSetResourceShareHandleNV; -#define wglDXSetResourceShareHandleNV glad_wglDXSetResourceShareHandleNV -GLAD_API_CALL PFNWGLDXUNLOCKOBJECTSNVPROC glad_wglDXUnlockObjectsNV; -#define wglDXUnlockObjectsNV glad_wglDXUnlockObjectsNV -GLAD_API_CALL PFNWGLDXUNREGISTEROBJECTNVPROC glad_wglDXUnregisterObjectNV; -#define wglDXUnregisterObjectNV glad_wglDXUnregisterObjectNV -GLAD_API_CALL PFNWGLDELAYBEFORESWAPNVPROC glad_wglDelayBeforeSwapNV; -#define wglDelayBeforeSwapNV glad_wglDelayBeforeSwapNV -GLAD_API_CALL PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC glad_wglDeleteAssociatedContextAMD; -#define wglDeleteAssociatedContextAMD glad_wglDeleteAssociatedContextAMD -GLAD_API_CALL PFNWGLDELETEBUFFERREGIONARBPROC glad_wglDeleteBufferRegionARB; -#define wglDeleteBufferRegionARB glad_wglDeleteBufferRegionARB -GLAD_API_CALL PFNWGLDELETEDCNVPROC glad_wglDeleteDCNV; -#define wglDeleteDCNV glad_wglDeleteDCNV -GLAD_API_CALL PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC glad_wglDestroyDisplayColorTableEXT; -#define wglDestroyDisplayColorTableEXT glad_wglDestroyDisplayColorTableEXT -GLAD_API_CALL PFNWGLDESTROYIMAGEBUFFERI3DPROC glad_wglDestroyImageBufferI3D; -#define wglDestroyImageBufferI3D glad_wglDestroyImageBufferI3D -GLAD_API_CALL PFNWGLDESTROYPBUFFERARBPROC glad_wglDestroyPbufferARB; -#define wglDestroyPbufferARB glad_wglDestroyPbufferARB -GLAD_API_CALL PFNWGLDESTROYPBUFFEREXTPROC glad_wglDestroyPbufferEXT; -#define wglDestroyPbufferEXT glad_wglDestroyPbufferEXT -GLAD_API_CALL PFNWGLDISABLEFRAMELOCKI3DPROC glad_wglDisableFrameLockI3D; -#define wglDisableFrameLockI3D glad_wglDisableFrameLockI3D -GLAD_API_CALL PFNWGLDISABLEGENLOCKI3DPROC glad_wglDisableGenlockI3D; -#define wglDisableGenlockI3D glad_wglDisableGenlockI3D -GLAD_API_CALL PFNWGLENABLEFRAMELOCKI3DPROC glad_wglEnableFrameLockI3D; -#define wglEnableFrameLockI3D glad_wglEnableFrameLockI3D -GLAD_API_CALL PFNWGLENABLEGENLOCKI3DPROC glad_wglEnableGenlockI3D; -#define wglEnableGenlockI3D glad_wglEnableGenlockI3D -GLAD_API_CALL PFNWGLENDFRAMETRACKINGI3DPROC glad_wglEndFrameTrackingI3D; -#define wglEndFrameTrackingI3D glad_wglEndFrameTrackingI3D -GLAD_API_CALL PFNWGLENUMGPUDEVICESNVPROC glad_wglEnumGpuDevicesNV; -#define wglEnumGpuDevicesNV glad_wglEnumGpuDevicesNV -GLAD_API_CALL PFNWGLENUMGPUSFROMAFFINITYDCNVPROC glad_wglEnumGpusFromAffinityDCNV; -#define wglEnumGpusFromAffinityDCNV glad_wglEnumGpusFromAffinityDCNV -GLAD_API_CALL PFNWGLENUMGPUSNVPROC glad_wglEnumGpusNV; -#define wglEnumGpusNV glad_wglEnumGpusNV -GLAD_API_CALL PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC glad_wglEnumerateVideoCaptureDevicesNV; -#define wglEnumerateVideoCaptureDevicesNV glad_wglEnumerateVideoCaptureDevicesNV -GLAD_API_CALL PFNWGLENUMERATEVIDEODEVICESNVPROC glad_wglEnumerateVideoDevicesNV; -#define wglEnumerateVideoDevicesNV glad_wglEnumerateVideoDevicesNV -GLAD_API_CALL PFNWGLFREEMEMORYNVPROC glad_wglFreeMemoryNV; -#define wglFreeMemoryNV glad_wglFreeMemoryNV -GLAD_API_CALL PFNWGLGENLOCKSAMPLERATEI3DPROC glad_wglGenlockSampleRateI3D; -#define wglGenlockSampleRateI3D glad_wglGenlockSampleRateI3D -GLAD_API_CALL PFNWGLGENLOCKSOURCEDELAYI3DPROC glad_wglGenlockSourceDelayI3D; -#define wglGenlockSourceDelayI3D glad_wglGenlockSourceDelayI3D -GLAD_API_CALL PFNWGLGENLOCKSOURCEEDGEI3DPROC glad_wglGenlockSourceEdgeI3D; -#define wglGenlockSourceEdgeI3D glad_wglGenlockSourceEdgeI3D -GLAD_API_CALL PFNWGLGENLOCKSOURCEI3DPROC glad_wglGenlockSourceI3D; -#define wglGenlockSourceI3D glad_wglGenlockSourceI3D -GLAD_API_CALL PFNWGLGETCONTEXTGPUIDAMDPROC glad_wglGetContextGPUIDAMD; -#define wglGetContextGPUIDAMD glad_wglGetContextGPUIDAMD -GLAD_API_CALL PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC glad_wglGetCurrentAssociatedContextAMD; -#define wglGetCurrentAssociatedContextAMD glad_wglGetCurrentAssociatedContextAMD -GLAD_API_CALL PFNWGLGETCURRENTREADDCARBPROC glad_wglGetCurrentReadDCARB; -#define wglGetCurrentReadDCARB glad_wglGetCurrentReadDCARB -GLAD_API_CALL PFNWGLGETCURRENTREADDCEXTPROC glad_wglGetCurrentReadDCEXT; -#define wglGetCurrentReadDCEXT glad_wglGetCurrentReadDCEXT -GLAD_API_CALL PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC glad_wglGetDigitalVideoParametersI3D; -#define wglGetDigitalVideoParametersI3D glad_wglGetDigitalVideoParametersI3D -GLAD_API_CALL PFNWGLGETEXTENSIONSSTRINGARBPROC glad_wglGetExtensionsStringARB; -#define wglGetExtensionsStringARB glad_wglGetExtensionsStringARB -GLAD_API_CALL PFNWGLGETEXTENSIONSSTRINGEXTPROC glad_wglGetExtensionsStringEXT; -#define wglGetExtensionsStringEXT glad_wglGetExtensionsStringEXT -GLAD_API_CALL PFNWGLGETFRAMEUSAGEI3DPROC glad_wglGetFrameUsageI3D; -#define wglGetFrameUsageI3D glad_wglGetFrameUsageI3D -GLAD_API_CALL PFNWGLGETGPUIDSAMDPROC glad_wglGetGPUIDsAMD; -#define wglGetGPUIDsAMD glad_wglGetGPUIDsAMD -GLAD_API_CALL PFNWGLGETGPUINFOAMDPROC glad_wglGetGPUInfoAMD; -#define wglGetGPUInfoAMD glad_wglGetGPUInfoAMD -GLAD_API_CALL PFNWGLGETGAMMATABLEI3DPROC glad_wglGetGammaTableI3D; -#define wglGetGammaTableI3D glad_wglGetGammaTableI3D -GLAD_API_CALL PFNWGLGETGAMMATABLEPARAMETERSI3DPROC glad_wglGetGammaTableParametersI3D; -#define wglGetGammaTableParametersI3D glad_wglGetGammaTableParametersI3D -GLAD_API_CALL PFNWGLGETGENLOCKSAMPLERATEI3DPROC glad_wglGetGenlockSampleRateI3D; -#define wglGetGenlockSampleRateI3D glad_wglGetGenlockSampleRateI3D -GLAD_API_CALL PFNWGLGETGENLOCKSOURCEDELAYI3DPROC glad_wglGetGenlockSourceDelayI3D; -#define wglGetGenlockSourceDelayI3D glad_wglGetGenlockSourceDelayI3D -GLAD_API_CALL PFNWGLGETGENLOCKSOURCEEDGEI3DPROC glad_wglGetGenlockSourceEdgeI3D; -#define wglGetGenlockSourceEdgeI3D glad_wglGetGenlockSourceEdgeI3D -GLAD_API_CALL PFNWGLGETGENLOCKSOURCEI3DPROC glad_wglGetGenlockSourceI3D; -#define wglGetGenlockSourceI3D glad_wglGetGenlockSourceI3D -GLAD_API_CALL PFNWGLGETMSCRATEOMLPROC glad_wglGetMscRateOML; -#define wglGetMscRateOML glad_wglGetMscRateOML -GLAD_API_CALL PFNWGLGETPBUFFERDCARBPROC glad_wglGetPbufferDCARB; -#define wglGetPbufferDCARB glad_wglGetPbufferDCARB -GLAD_API_CALL PFNWGLGETPBUFFERDCEXTPROC glad_wglGetPbufferDCEXT; -#define wglGetPbufferDCEXT glad_wglGetPbufferDCEXT -GLAD_API_CALL PFNWGLGETPIXELFORMATATTRIBFVARBPROC glad_wglGetPixelFormatAttribfvARB; -#define wglGetPixelFormatAttribfvARB glad_wglGetPixelFormatAttribfvARB -GLAD_API_CALL PFNWGLGETPIXELFORMATATTRIBFVEXTPROC glad_wglGetPixelFormatAttribfvEXT; -#define wglGetPixelFormatAttribfvEXT glad_wglGetPixelFormatAttribfvEXT -GLAD_API_CALL PFNWGLGETPIXELFORMATATTRIBIVARBPROC glad_wglGetPixelFormatAttribivARB; -#define wglGetPixelFormatAttribivARB glad_wglGetPixelFormatAttribivARB -GLAD_API_CALL PFNWGLGETPIXELFORMATATTRIBIVEXTPROC glad_wglGetPixelFormatAttribivEXT; -#define wglGetPixelFormatAttribivEXT glad_wglGetPixelFormatAttribivEXT -GLAD_API_CALL PFNWGLGETSWAPINTERVALEXTPROC glad_wglGetSwapIntervalEXT; -#define wglGetSwapIntervalEXT glad_wglGetSwapIntervalEXT -GLAD_API_CALL PFNWGLGETSYNCVALUESOMLPROC glad_wglGetSyncValuesOML; -#define wglGetSyncValuesOML glad_wglGetSyncValuesOML -GLAD_API_CALL PFNWGLGETVIDEODEVICENVPROC glad_wglGetVideoDeviceNV; -#define wglGetVideoDeviceNV glad_wglGetVideoDeviceNV -GLAD_API_CALL PFNWGLGETVIDEOINFONVPROC glad_wglGetVideoInfoNV; -#define wglGetVideoInfoNV glad_wglGetVideoInfoNV -GLAD_API_CALL PFNWGLISENABLEDFRAMELOCKI3DPROC glad_wglIsEnabledFrameLockI3D; -#define wglIsEnabledFrameLockI3D glad_wglIsEnabledFrameLockI3D -GLAD_API_CALL PFNWGLISENABLEDGENLOCKI3DPROC glad_wglIsEnabledGenlockI3D; -#define wglIsEnabledGenlockI3D glad_wglIsEnabledGenlockI3D -GLAD_API_CALL PFNWGLJOINSWAPGROUPNVPROC glad_wglJoinSwapGroupNV; -#define wglJoinSwapGroupNV glad_wglJoinSwapGroupNV -GLAD_API_CALL PFNWGLLOADDISPLAYCOLORTABLEEXTPROC glad_wglLoadDisplayColorTableEXT; -#define wglLoadDisplayColorTableEXT glad_wglLoadDisplayColorTableEXT -GLAD_API_CALL PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC glad_wglLockVideoCaptureDeviceNV; -#define wglLockVideoCaptureDeviceNV glad_wglLockVideoCaptureDeviceNV -GLAD_API_CALL PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC glad_wglMakeAssociatedContextCurrentAMD; -#define wglMakeAssociatedContextCurrentAMD glad_wglMakeAssociatedContextCurrentAMD -GLAD_API_CALL PFNWGLMAKECONTEXTCURRENTARBPROC glad_wglMakeContextCurrentARB; -#define wglMakeContextCurrentARB glad_wglMakeContextCurrentARB -GLAD_API_CALL PFNWGLMAKECONTEXTCURRENTEXTPROC glad_wglMakeContextCurrentEXT; -#define wglMakeContextCurrentEXT glad_wglMakeContextCurrentEXT -GLAD_API_CALL PFNWGLQUERYCURRENTCONTEXTNVPROC glad_wglQueryCurrentContextNV; -#define wglQueryCurrentContextNV glad_wglQueryCurrentContextNV -GLAD_API_CALL PFNWGLQUERYFRAMECOUNTNVPROC glad_wglQueryFrameCountNV; -#define wglQueryFrameCountNV glad_wglQueryFrameCountNV -GLAD_API_CALL PFNWGLQUERYFRAMELOCKMASTERI3DPROC glad_wglQueryFrameLockMasterI3D; -#define wglQueryFrameLockMasterI3D glad_wglQueryFrameLockMasterI3D -GLAD_API_CALL PFNWGLQUERYFRAMETRACKINGI3DPROC glad_wglQueryFrameTrackingI3D; -#define wglQueryFrameTrackingI3D glad_wglQueryFrameTrackingI3D -GLAD_API_CALL PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC glad_wglQueryGenlockMaxSourceDelayI3D; -#define wglQueryGenlockMaxSourceDelayI3D glad_wglQueryGenlockMaxSourceDelayI3D -GLAD_API_CALL PFNWGLQUERYMAXSWAPGROUPSNVPROC glad_wglQueryMaxSwapGroupsNV; -#define wglQueryMaxSwapGroupsNV glad_wglQueryMaxSwapGroupsNV -GLAD_API_CALL PFNWGLQUERYPBUFFERARBPROC glad_wglQueryPbufferARB; -#define wglQueryPbufferARB glad_wglQueryPbufferARB -GLAD_API_CALL PFNWGLQUERYPBUFFEREXTPROC glad_wglQueryPbufferEXT; -#define wglQueryPbufferEXT glad_wglQueryPbufferEXT -GLAD_API_CALL PFNWGLQUERYSWAPGROUPNVPROC glad_wglQuerySwapGroupNV; -#define wglQuerySwapGroupNV glad_wglQuerySwapGroupNV -GLAD_API_CALL PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC glad_wglQueryVideoCaptureDeviceNV; -#define wglQueryVideoCaptureDeviceNV glad_wglQueryVideoCaptureDeviceNV -GLAD_API_CALL PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC glad_wglReleaseImageBufferEventsI3D; -#define wglReleaseImageBufferEventsI3D glad_wglReleaseImageBufferEventsI3D -GLAD_API_CALL PFNWGLRELEASEPBUFFERDCARBPROC glad_wglReleasePbufferDCARB; -#define wglReleasePbufferDCARB glad_wglReleasePbufferDCARB -GLAD_API_CALL PFNWGLRELEASEPBUFFERDCEXTPROC glad_wglReleasePbufferDCEXT; -#define wglReleasePbufferDCEXT glad_wglReleasePbufferDCEXT -GLAD_API_CALL PFNWGLRELEASETEXIMAGEARBPROC glad_wglReleaseTexImageARB; -#define wglReleaseTexImageARB glad_wglReleaseTexImageARB -GLAD_API_CALL PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC glad_wglReleaseVideoCaptureDeviceNV; -#define wglReleaseVideoCaptureDeviceNV glad_wglReleaseVideoCaptureDeviceNV -GLAD_API_CALL PFNWGLRELEASEVIDEODEVICENVPROC glad_wglReleaseVideoDeviceNV; -#define wglReleaseVideoDeviceNV glad_wglReleaseVideoDeviceNV -GLAD_API_CALL PFNWGLRELEASEVIDEOIMAGENVPROC glad_wglReleaseVideoImageNV; -#define wglReleaseVideoImageNV glad_wglReleaseVideoImageNV -GLAD_API_CALL PFNWGLRESETFRAMECOUNTNVPROC glad_wglResetFrameCountNV; -#define wglResetFrameCountNV glad_wglResetFrameCountNV -GLAD_API_CALL PFNWGLRESTOREBUFFERREGIONARBPROC glad_wglRestoreBufferRegionARB; -#define wglRestoreBufferRegionARB glad_wglRestoreBufferRegionARB -GLAD_API_CALL PFNWGLSAVEBUFFERREGIONARBPROC glad_wglSaveBufferRegionARB; -#define wglSaveBufferRegionARB glad_wglSaveBufferRegionARB -GLAD_API_CALL PFNWGLSENDPBUFFERTOVIDEONVPROC glad_wglSendPbufferToVideoNV; -#define wglSendPbufferToVideoNV glad_wglSendPbufferToVideoNV -GLAD_API_CALL PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC glad_wglSetDigitalVideoParametersI3D; -#define wglSetDigitalVideoParametersI3D glad_wglSetDigitalVideoParametersI3D -GLAD_API_CALL PFNWGLSETGAMMATABLEI3DPROC glad_wglSetGammaTableI3D; -#define wglSetGammaTableI3D glad_wglSetGammaTableI3D -GLAD_API_CALL PFNWGLSETGAMMATABLEPARAMETERSI3DPROC glad_wglSetGammaTableParametersI3D; -#define wglSetGammaTableParametersI3D glad_wglSetGammaTableParametersI3D -GLAD_API_CALL PFNWGLSETPBUFFERATTRIBARBPROC glad_wglSetPbufferAttribARB; -#define wglSetPbufferAttribARB glad_wglSetPbufferAttribARB -GLAD_API_CALL PFNWGLSETSTEREOEMITTERSTATE3DLPROC glad_wglSetStereoEmitterState3DL; -#define wglSetStereoEmitterState3DL glad_wglSetStereoEmitterState3DL -GLAD_API_CALL PFNWGLSWAPBUFFERSMSCOMLPROC glad_wglSwapBuffersMscOML; -#define wglSwapBuffersMscOML glad_wglSwapBuffersMscOML -GLAD_API_CALL PFNWGLSWAPINTERVALEXTPROC glad_wglSwapIntervalEXT; -#define wglSwapIntervalEXT glad_wglSwapIntervalEXT -GLAD_API_CALL PFNWGLSWAPLAYERBUFFERSMSCOMLPROC glad_wglSwapLayerBuffersMscOML; -#define wglSwapLayerBuffersMscOML glad_wglSwapLayerBuffersMscOML -GLAD_API_CALL PFNWGLWAITFORMSCOMLPROC glad_wglWaitForMscOML; -#define wglWaitForMscOML glad_wglWaitForMscOML -GLAD_API_CALL PFNWGLWAITFORSBCOMLPROC glad_wglWaitForSbcOML; -#define wglWaitForSbcOML glad_wglWaitForSbcOML - -GLAD_API_CALL int gladLoadWGLUserPtr(HDC hdc, GLADuserptrloadfunc load, void *userptr); -GLAD_API_CALL int gladLoadWGL(HDC hdc, GLADloadfunc load); - -#ifdef __cplusplus -} -#endif -#endif +/** + * Loader generated by glad 2.0.5 on Fri Feb 16 00:51:03 2024 + * + * SPDX-License-Identifier: (WTFPL OR CC0-1.0) AND Apache-2.0 + * + * Generator: C/C++ + * Specification: wgl + * Extensions: 57 + * + * APIs: + * - wgl=1.0 + * + * Options: + * - ALIAS = False + * - DEBUG = False + * - HEADER_ONLY = False + * - LOADER = False + * - MX = True + * - ON_DEMAND = False + * + * Commandline: + * --api='wgl=1.0' --extensions='WGL_3DFX_multisample,WGL_3DL_stereo_control,WGL_AMD_gpu_association,WGL_ARB_buffer_region,WGL_ARB_context_flush_control,WGL_ARB_create_context,WGL_ARB_create_context_no_error,WGL_ARB_create_context_profile,WGL_ARB_create_context_robustness,WGL_ARB_extensions_string,WGL_ARB_framebuffer_sRGB,WGL_ARB_make_current_read,WGL_ARB_multisample,WGL_ARB_pbuffer,WGL_ARB_pixel_format,WGL_ARB_pixel_format_float,WGL_ARB_render_texture,WGL_ARB_robustness_application_isolation,WGL_ARB_robustness_share_group_isolation,WGL_ATI_pixel_format_float,WGL_ATI_render_texture_rectangle,WGL_EXT_colorspace,WGL_EXT_create_context_es2_profile,WGL_EXT_create_context_es_profile,WGL_EXT_depth_float,WGL_EXT_display_color_table,WGL_EXT_extensions_string,WGL_EXT_framebuffer_sRGB,WGL_EXT_make_current_read,WGL_EXT_multisample,WGL_EXT_pbuffer,WGL_EXT_pixel_format,WGL_EXT_pixel_format_packed_float,WGL_EXT_swap_control,WGL_EXT_swap_control_tear,WGL_I3D_digital_video_control,WGL_I3D_gamma,WGL_I3D_genlock,WGL_I3D_image_buffer,WGL_I3D_swap_frame_lock,WGL_I3D_swap_frame_usage,WGL_NV_DX_interop,WGL_NV_DX_interop2,WGL_NV_copy_image,WGL_NV_delay_before_swap,WGL_NV_float_buffer,WGL_NV_gpu_affinity,WGL_NV_multigpu_context,WGL_NV_multisample_coverage,WGL_NV_present_video,WGL_NV_render_depth_texture,WGL_NV_render_texture_rectangle,WGL_NV_swap_group,WGL_NV_vertex_array_range,WGL_NV_video_capture,WGL_NV_video_output,WGL_OML_sync_control' c --mx + * + * Online: + * http://glad.sh/#api=wgl%3D1.0&extensions=WGL_3DFX_multisample%2CWGL_3DL_stereo_control%2CWGL_AMD_gpu_association%2CWGL_ARB_buffer_region%2CWGL_ARB_context_flush_control%2CWGL_ARB_create_context%2CWGL_ARB_create_context_no_error%2CWGL_ARB_create_context_profile%2CWGL_ARB_create_context_robustness%2CWGL_ARB_extensions_string%2CWGL_ARB_framebuffer_sRGB%2CWGL_ARB_make_current_read%2CWGL_ARB_multisample%2CWGL_ARB_pbuffer%2CWGL_ARB_pixel_format%2CWGL_ARB_pixel_format_float%2CWGL_ARB_render_texture%2CWGL_ARB_robustness_application_isolation%2CWGL_ARB_robustness_share_group_isolation%2CWGL_ATI_pixel_format_float%2CWGL_ATI_render_texture_rectangle%2CWGL_EXT_colorspace%2CWGL_EXT_create_context_es2_profile%2CWGL_EXT_create_context_es_profile%2CWGL_EXT_depth_float%2CWGL_EXT_display_color_table%2CWGL_EXT_extensions_string%2CWGL_EXT_framebuffer_sRGB%2CWGL_EXT_make_current_read%2CWGL_EXT_multisample%2CWGL_EXT_pbuffer%2CWGL_EXT_pixel_format%2CWGL_EXT_pixel_format_packed_float%2CWGL_EXT_swap_control%2CWGL_EXT_swap_control_tear%2CWGL_I3D_digital_video_control%2CWGL_I3D_gamma%2CWGL_I3D_genlock%2CWGL_I3D_image_buffer%2CWGL_I3D_swap_frame_lock%2CWGL_I3D_swap_frame_usage%2CWGL_NV_DX_interop%2CWGL_NV_DX_interop2%2CWGL_NV_copy_image%2CWGL_NV_delay_before_swap%2CWGL_NV_float_buffer%2CWGL_NV_gpu_affinity%2CWGL_NV_multigpu_context%2CWGL_NV_multisample_coverage%2CWGL_NV_present_video%2CWGL_NV_render_depth_texture%2CWGL_NV_render_texture_rectangle%2CWGL_NV_swap_group%2CWGL_NV_vertex_array_range%2CWGL_NV_video_capture%2CWGL_NV_video_output%2CWGL_OML_sync_control&generator=c&options=MX + * + */ + +#ifndef GLAD_WGL_H_ +#define GLAD_WGL_H_ + +#include +#include "gl.h" + +#define GLAD_WGL + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef GLAD_PLATFORM_H_ +#define GLAD_PLATFORM_H_ + +#ifndef GLAD_PLATFORM_WIN32 +#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__) +#define GLAD_PLATFORM_WIN32 1 +#else +#define GLAD_PLATFORM_WIN32 0 +#endif +#endif + +#ifndef GLAD_PLATFORM_APPLE +#ifdef __APPLE__ +#define GLAD_PLATFORM_APPLE 1 +#else +#define GLAD_PLATFORM_APPLE 0 +#endif +#endif + +#ifndef GLAD_PLATFORM_EMSCRIPTEN +#ifdef __EMSCRIPTEN__ +#define GLAD_PLATFORM_EMSCRIPTEN 1 +#else +#define GLAD_PLATFORM_EMSCRIPTEN 0 +#endif +#endif + +#ifndef GLAD_PLATFORM_UWP +#if defined(_MSC_VER) && !defined(GLAD_INTERNAL_HAVE_WINAPIFAMILY) +#ifdef __has_include +#if __has_include() +#define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1 +#endif +#elif _MSC_VER >= 1700 && !_USING_V110_SDK71_ +#define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1 +#endif +#endif + +#ifdef GLAD_INTERNAL_HAVE_WINAPIFAMILY +#include +#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && \ + WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) +#define GLAD_PLATFORM_UWP 1 +#endif +#endif + +#ifndef GLAD_PLATFORM_UWP +#define GLAD_PLATFORM_UWP 0 +#endif +#endif + +#ifdef __GNUC__ +#define GLAD_GNUC_EXTENSION __extension__ +#else +#define GLAD_GNUC_EXTENSION +#endif + +#define GLAD_UNUSED(x) (void)(x) + +#ifndef GLAD_API_CALL +#if defined(GLAD_API_CALL_EXPORT) +#if GLAD_PLATFORM_WIN32 || defined(__CYGWIN__) +#if defined(GLAD_API_CALL_EXPORT_BUILD) +#if defined(__GNUC__) +#define GLAD_API_CALL __attribute__((dllexport)) extern +#else +#define GLAD_API_CALL __declspec(dllexport) extern +#endif +#else +#if defined(__GNUC__) +#define GLAD_API_CALL __attribute__((dllimport)) extern +#else +#define GLAD_API_CALL __declspec(dllimport) extern +#endif +#endif +#elif defined(__GNUC__) && defined(GLAD_API_CALL_EXPORT_BUILD) +#define GLAD_API_CALL __attribute__((visibility("default"))) extern +#else +#define GLAD_API_CALL extern +#endif +#else +#define GLAD_API_CALL extern +#endif +#endif + +#ifdef APIENTRY +#define GLAD_API_PTR APIENTRY +#elif GLAD_PLATFORM_WIN32 +#define GLAD_API_PTR __stdcall +#else +#define GLAD_API_PTR +#endif + +#ifndef GLAPI +#define GLAPI GLAD_API_CALL +#endif + +#ifndef GLAPIENTRY +#define GLAPIENTRY GLAD_API_PTR +#endif + +#define GLAD_MAKE_VERSION(major, minor) (major * 10000 + minor) +#define GLAD_VERSION_MAJOR(version) (version / 10000) +#define GLAD_VERSION_MINOR(version) (version % 10000) + +#define GLAD_GENERATOR_VERSION "2.0.5" + +typedef void (*GLADapiproc)(void); + +typedef GLADapiproc (*GLADloadfunc)(const char *name); +typedef GLADapiproc (*GLADuserptrloadfunc)(void *userptr, const char *name); + +typedef void (*GLADprecallback)(const char *name, GLADapiproc apiproc, int len_args, ...); +typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apiproc, int len_args, + ...); + +#endif /* GLAD_PLATFORM_H_ */ + +#define ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0 +#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054 +#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043 +#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043 +#define ERROR_INVALID_PROFILE_ARB 0x2096 +#define ERROR_INVALID_VERSION_ARB 0x2095 +#define ERROR_MISSING_AFFINITY_MASK_NV 0x20D1 +#define WGL_ACCELERATION_ARB 0x2003 +#define WGL_ACCELERATION_EXT 0x2003 +#define WGL_ACCESS_READ_ONLY_NV 0x00000000 +#define WGL_ACCESS_READ_WRITE_NV 0x00000001 +#define WGL_ACCESS_WRITE_DISCARD_NV 0x00000002 +#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 +#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021 +#define WGL_ACCUM_BITS_ARB 0x201D +#define WGL_ACCUM_BITS_EXT 0x201D +#define WGL_ACCUM_BLUE_BITS_ARB 0x2020 +#define WGL_ACCUM_BLUE_BITS_EXT 0x2020 +#define WGL_ACCUM_GREEN_BITS_ARB 0x201F +#define WGL_ACCUM_GREEN_BITS_EXT 0x201F +#define WGL_ACCUM_RED_BITS_ARB 0x201E +#define WGL_ACCUM_RED_BITS_EXT 0x201E +#define WGL_ALPHA_BITS_ARB 0x201B +#define WGL_ALPHA_BITS_EXT 0x201B +#define WGL_ALPHA_SHIFT_ARB 0x201C +#define WGL_ALPHA_SHIFT_EXT 0x201C +#define WGL_AUX0_ARB 0x2087 +#define WGL_AUX1_ARB 0x2088 +#define WGL_AUX2_ARB 0x2089 +#define WGL_AUX3_ARB 0x208A +#define WGL_AUX4_ARB 0x208B +#define WGL_AUX5_ARB 0x208C +#define WGL_AUX6_ARB 0x208D +#define WGL_AUX7_ARB 0x208E +#define WGL_AUX8_ARB 0x208F +#define WGL_AUX9_ARB 0x2090 +#define WGL_AUX_BUFFERS_ARB 0x2024 +#define WGL_AUX_BUFFERS_EXT 0x2024 +#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002 +#define WGL_BACK_LEFT_ARB 0x2085 +#define WGL_BACK_RIGHT_ARB 0x2086 +#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0 +#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071 +#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070 +#define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1 +#define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2 +#define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0 +#define WGL_BLUE_BITS_ARB 0x2019 +#define WGL_BLUE_BITS_EXT 0x2019 +#define WGL_BLUE_SHIFT_ARB 0x201A +#define WGL_BLUE_SHIFT_EXT 0x201A +#define WGL_COLORSPACE_EXT 0x309D +#define WGL_COLORSPACE_LINEAR_EXT 0x308A +#define WGL_COLORSPACE_SRGB_EXT 0x3089 +#define WGL_COLOR_BITS_ARB 0x2014 +#define WGL_COLOR_BITS_EXT 0x2014 +#define WGL_COLOR_SAMPLES_NV 0x20B9 +#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 +#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 +#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001 +#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004 +#define WGL_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004 +#define WGL_CONTEXT_FLAGS_ARB 0x2094 +#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 +#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093 +#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 +#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 +#define WGL_CONTEXT_MULTIGPU_ATTRIB_AFR_NV 0x20AC +#define WGL_CONTEXT_MULTIGPU_ATTRIB_MULTICAST_NV 0x20AD +#define WGL_CONTEXT_MULTIGPU_ATTRIB_MULTI_DISPLAY_MULTICAST_NV 0x20AE +#define WGL_CONTEXT_MULTIGPU_ATTRIB_NV 0x20AA +#define WGL_CONTEXT_MULTIGPU_ATTRIB_SINGLE_NV 0x20AB +#define WGL_CONTEXT_OPENGL_NO_ERROR_ARB 0x31B3 +#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126 +#define WGL_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097 +#define WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098 +#define WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0 +#define WGL_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008 +#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 +#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004 +#define WGL_COVERAGE_SAMPLES_NV 0x2042 +#define WGL_CUBE_MAP_FACE_ARB 0x207C +#define WGL_DEPTH_BITS_ARB 0x2022 +#define WGL_DEPTH_BITS_EXT 0x2022 +#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004 +#define WGL_DEPTH_COMPONENT_NV 0x20A7 +#define WGL_DEPTH_FLOAT_EXT 0x2040 +#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5 +#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050 +#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051 +#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052 +#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053 +#define WGL_DOUBLE_BUFFER_ARB 0x2011 +#define WGL_DOUBLE_BUFFER_EXT 0x2011 +#define WGL_DRAW_TO_BITMAP_ARB 0x2002 +#define WGL_DRAW_TO_BITMAP_EXT 0x2002 +#define WGL_DRAW_TO_PBUFFER_ARB 0x202D +#define WGL_DRAW_TO_PBUFFER_EXT 0x202D +#define WGL_DRAW_TO_WINDOW_ARB 0x2001 +#define WGL_DRAW_TO_WINDOW_EXT 0x2001 +#define WGL_FLOAT_COMPONENTS_NV 0x20B0 +#define WGL_FONT_LINES 0 +#define WGL_FONT_POLYGONS 1 +#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9 +#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9 +#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001 +#define WGL_FRONT_LEFT_ARB 0x2083 +#define WGL_FRONT_RIGHT_ARB 0x2084 +#define WGL_FULL_ACCELERATION_ARB 0x2027 +#define WGL_FULL_ACCELERATION_EXT 0x2027 +#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F +#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E +#define WGL_GENERIC_ACCELERATION_ARB 0x2026 +#define WGL_GENERIC_ACCELERATION_EXT 0x2026 +#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049 +#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048 +#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C +#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A +#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B +#define WGL_GENLOCK_SOURCE_EXTERNAL_FIELD_I3D 0x2046 +#define WGL_GENLOCK_SOURCE_EXTERNAL_SYNC_I3D 0x2045 +#define WGL_GENLOCK_SOURCE_EXTERNAL_TTL_I3D 0x2047 +#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044 +#define WGL_GPU_CLOCK_AMD 0x21A4 +#define WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2 +#define WGL_GPU_NUM_PIPES_AMD 0x21A5 +#define WGL_GPU_NUM_RB_AMD 0x21A7 +#define WGL_GPU_NUM_SIMD_AMD 0x21A6 +#define WGL_GPU_NUM_SPI_AMD 0x21A8 +#define WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02 +#define WGL_GPU_RAM_AMD 0x21A3 +#define WGL_GPU_RENDERER_STRING_AMD 0x1F01 +#define WGL_GPU_VENDOR_AMD 0x1F00 +#define WGL_GREEN_BITS_ARB 0x2017 +#define WGL_GREEN_BITS_EXT 0x2017 +#define WGL_GREEN_SHIFT_ARB 0x2018 +#define WGL_GREEN_SHIFT_EXT 0x2018 +#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002 +#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001 +#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 +#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030 +#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030 +#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E +#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E +#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F +#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F +#define WGL_MIPMAP_LEVEL_ARB 0x207B +#define WGL_MIPMAP_TEXTURE_ARB 0x2074 +#define WGL_NEED_PALETTE_ARB 0x2004 +#define WGL_NEED_PALETTE_EXT 0x2004 +#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005 +#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005 +#define WGL_NO_ACCELERATION_ARB 0x2025 +#define WGL_NO_ACCELERATION_EXT 0x2025 +#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261 +#define WGL_NO_TEXTURE_ARB 0x2077 +#define WGL_NUMBER_OVERLAYS_ARB 0x2008 +#define WGL_NUMBER_OVERLAYS_EXT 0x2008 +#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 +#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000 +#define WGL_NUMBER_UNDERLAYS_ARB 0x2009 +#define WGL_NUMBER_UNDERLAYS_EXT 0x2009 +#define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF +#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0 +#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032 +#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031 +#define WGL_PBUFFER_HEIGHT_ARB 0x2035 +#define WGL_PBUFFER_HEIGHT_EXT 0x2035 +#define WGL_PBUFFER_LARGEST_ARB 0x2033 +#define WGL_PBUFFER_LARGEST_EXT 0x2033 +#define WGL_PBUFFER_LOST_ARB 0x2036 +#define WGL_PBUFFER_WIDTH_ARB 0x2034 +#define WGL_PBUFFER_WIDTH_EXT 0x2034 +#define WGL_PIXEL_TYPE_ARB 0x2013 +#define WGL_PIXEL_TYPE_EXT 0x2013 +#define WGL_RED_BITS_ARB 0x2015 +#define WGL_RED_BITS_EXT 0x2015 +#define WGL_RED_SHIFT_ARB 0x2016 +#define WGL_RED_SHIFT_EXT 0x2016 +#define WGL_SAMPLES_3DFX 0x2061 +#define WGL_SAMPLES_ARB 0x2042 +#define WGL_SAMPLES_EXT 0x2042 +#define WGL_SAMPLE_BUFFERS_3DFX 0x2060 +#define WGL_SAMPLE_BUFFERS_ARB 0x2041 +#define WGL_SAMPLE_BUFFERS_EXT 0x2041 +#define WGL_SHARE_ACCUM_ARB 0x200E +#define WGL_SHARE_ACCUM_EXT 0x200E +#define WGL_SHARE_DEPTH_ARB 0x200C +#define WGL_SHARE_DEPTH_EXT 0x200C +#define WGL_SHARE_STENCIL_ARB 0x200D +#define WGL_SHARE_STENCIL_EXT 0x200D +#define WGL_STENCIL_BITS_ARB 0x2023 +#define WGL_STENCIL_BITS_EXT 0x2023 +#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008 +#define WGL_STEREO_ARB 0x2012 +#define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056 +#define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055 +#define WGL_STEREO_EXT 0x2012 +#define WGL_STEREO_POLARITY_INVERT_3DL 0x2058 +#define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057 +#define WGL_SUPPORT_GDI_ARB 0x200F +#define WGL_SUPPORT_GDI_EXT 0x200F +#define WGL_SUPPORT_OPENGL_ARB 0x2010 +#define WGL_SUPPORT_OPENGL_EXT 0x2010 +#define WGL_SWAP_COPY_ARB 0x2029 +#define WGL_SWAP_COPY_EXT 0x2029 +#define WGL_SWAP_EXCHANGE_ARB 0x2028 +#define WGL_SWAP_EXCHANGE_EXT 0x2028 +#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006 +#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006 +#define WGL_SWAP_MAIN_PLANE 0x00000001 +#define WGL_SWAP_METHOD_ARB 0x2007 +#define WGL_SWAP_METHOD_EXT 0x2007 +#define WGL_SWAP_OVERLAY1 0x00000002 +#define WGL_SWAP_OVERLAY10 0x00000400 +#define WGL_SWAP_OVERLAY11 0x00000800 +#define WGL_SWAP_OVERLAY12 0x00001000 +#define WGL_SWAP_OVERLAY13 0x00002000 +#define WGL_SWAP_OVERLAY14 0x00004000 +#define WGL_SWAP_OVERLAY15 0x00008000 +#define WGL_SWAP_OVERLAY2 0x00000004 +#define WGL_SWAP_OVERLAY3 0x00000008 +#define WGL_SWAP_OVERLAY4 0x00000010 +#define WGL_SWAP_OVERLAY5 0x00000020 +#define WGL_SWAP_OVERLAY6 0x00000040 +#define WGL_SWAP_OVERLAY7 0x00000080 +#define WGL_SWAP_OVERLAY8 0x00000100 +#define WGL_SWAP_OVERLAY9 0x00000200 +#define WGL_SWAP_UNDEFINED_ARB 0x202A +#define WGL_SWAP_UNDEFINED_EXT 0x202A +#define WGL_SWAP_UNDERLAY1 0x00010000 +#define WGL_SWAP_UNDERLAY10 0x02000000 +#define WGL_SWAP_UNDERLAY11 0x04000000 +#define WGL_SWAP_UNDERLAY12 0x08000000 +#define WGL_SWAP_UNDERLAY13 0x10000000 +#define WGL_SWAP_UNDERLAY14 0x20000000 +#define WGL_SWAP_UNDERLAY15 0x40000000 +#define WGL_SWAP_UNDERLAY2 0x00020000 +#define WGL_SWAP_UNDERLAY3 0x00040000 +#define WGL_SWAP_UNDERLAY4 0x00080000 +#define WGL_SWAP_UNDERLAY5 0x00100000 +#define WGL_SWAP_UNDERLAY6 0x00200000 +#define WGL_SWAP_UNDERLAY7 0x00400000 +#define WGL_SWAP_UNDERLAY8 0x00800000 +#define WGL_SWAP_UNDERLAY9 0x01000000 +#define WGL_TEXTURE_1D_ARB 0x2079 +#define WGL_TEXTURE_2D_ARB 0x207A +#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078 +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080 +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082 +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081 +#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6 +#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8 +#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7 +#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6 +#define WGL_TEXTURE_FLOAT_R_NV 0x20B5 +#define WGL_TEXTURE_FORMAT_ARB 0x2072 +#define WGL_TEXTURE_RECTANGLE_ATI 0x21A5 +#define WGL_TEXTURE_RECTANGLE_NV 0x20A2 +#define WGL_TEXTURE_RGBA_ARB 0x2076 +#define WGL_TEXTURE_RGB_ARB 0x2075 +#define WGL_TEXTURE_TARGET_ARB 0x2073 +#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A +#define WGL_TRANSPARENT_ARB 0x200A +#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039 +#define WGL_TRANSPARENT_EXT 0x200A +#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038 +#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B +#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037 +#define WGL_TRANSPARENT_VALUE_EXT 0x200B +#define WGL_TYPE_COLORINDEX_ARB 0x202C +#define WGL_TYPE_COLORINDEX_EXT 0x202C +#define WGL_TYPE_RGBA_ARB 0x202B +#define WGL_TYPE_RGBA_EXT 0x202B +#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0 +#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0 +#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8 +#define WGL_UNIQUE_ID_NV 0x20CE +#define WGL_VIDEO_OUT_ALPHA_NV 0x20C4 +#define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 +#define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 +#define WGL_VIDEO_OUT_COLOR_NV 0x20C3 +#define WGL_VIDEO_OUT_DEPTH_NV 0x20C5 +#define WGL_VIDEO_OUT_FIELD_1 0x20C9 +#define WGL_VIDEO_OUT_FIELD_2 0x20CA +#define WGL_VIDEO_OUT_FRAME 0x20C8 +#define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB +#define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC + +struct _GPU_DEVICE { + DWORD cb; + CHAR DeviceName[32]; + CHAR DeviceString[128]; + DWORD Flags; + RECT rcVirtualScreen; +}; +DECLARE_HANDLE(HPBUFFERARB); +DECLARE_HANDLE(HPBUFFEREXT); +DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV); +DECLARE_HANDLE(HPVIDEODEV); +DECLARE_HANDLE(HPGPUNV); +DECLARE_HANDLE(HGPUNV); +DECLARE_HANDLE(HVIDEOINPUTDEVICENV); +typedef struct _GPU_DEVICE GPU_DEVICE; +typedef struct _GPU_DEVICE *PGPU_DEVICE; + +#define WGL_VERSION_1_0 1 +GLAD_API_CALL int GLAD_WGL_VERSION_1_0; +#define WGL_3DFX_multisample 1 +GLAD_API_CALL int GLAD_WGL_3DFX_multisample; +#define WGL_3DL_stereo_control 1 +GLAD_API_CALL int GLAD_WGL_3DL_stereo_control; +#define WGL_AMD_gpu_association 1 +GLAD_API_CALL int GLAD_WGL_AMD_gpu_association; +#define WGL_ARB_buffer_region 1 +GLAD_API_CALL int GLAD_WGL_ARB_buffer_region; +#define WGL_ARB_context_flush_control 1 +GLAD_API_CALL int GLAD_WGL_ARB_context_flush_control; +#define WGL_ARB_create_context 1 +GLAD_API_CALL int GLAD_WGL_ARB_create_context; +#define WGL_ARB_create_context_no_error 1 +GLAD_API_CALL int GLAD_WGL_ARB_create_context_no_error; +#define WGL_ARB_create_context_profile 1 +GLAD_API_CALL int GLAD_WGL_ARB_create_context_profile; +#define WGL_ARB_create_context_robustness 1 +GLAD_API_CALL int GLAD_WGL_ARB_create_context_robustness; +#define WGL_ARB_extensions_string 1 +GLAD_API_CALL int GLAD_WGL_ARB_extensions_string; +#define WGL_ARB_framebuffer_sRGB 1 +GLAD_API_CALL int GLAD_WGL_ARB_framebuffer_sRGB; +#define WGL_ARB_make_current_read 1 +GLAD_API_CALL int GLAD_WGL_ARB_make_current_read; +#define WGL_ARB_multisample 1 +GLAD_API_CALL int GLAD_WGL_ARB_multisample; +#define WGL_ARB_pbuffer 1 +GLAD_API_CALL int GLAD_WGL_ARB_pbuffer; +#define WGL_ARB_pixel_format 1 +GLAD_API_CALL int GLAD_WGL_ARB_pixel_format; +#define WGL_ARB_pixel_format_float 1 +GLAD_API_CALL int GLAD_WGL_ARB_pixel_format_float; +#define WGL_ARB_render_texture 1 +GLAD_API_CALL int GLAD_WGL_ARB_render_texture; +#define WGL_ARB_robustness_application_isolation 1 +GLAD_API_CALL int GLAD_WGL_ARB_robustness_application_isolation; +#define WGL_ARB_robustness_share_group_isolation 1 +GLAD_API_CALL int GLAD_WGL_ARB_robustness_share_group_isolation; +#define WGL_ATI_pixel_format_float 1 +GLAD_API_CALL int GLAD_WGL_ATI_pixel_format_float; +#define WGL_ATI_render_texture_rectangle 1 +GLAD_API_CALL int GLAD_WGL_ATI_render_texture_rectangle; +#define WGL_EXT_colorspace 1 +GLAD_API_CALL int GLAD_WGL_EXT_colorspace; +#define WGL_EXT_create_context_es2_profile 1 +GLAD_API_CALL int GLAD_WGL_EXT_create_context_es2_profile; +#define WGL_EXT_create_context_es_profile 1 +GLAD_API_CALL int GLAD_WGL_EXT_create_context_es_profile; +#define WGL_EXT_depth_float 1 +GLAD_API_CALL int GLAD_WGL_EXT_depth_float; +#define WGL_EXT_display_color_table 1 +GLAD_API_CALL int GLAD_WGL_EXT_display_color_table; +#define WGL_EXT_extensions_string 1 +GLAD_API_CALL int GLAD_WGL_EXT_extensions_string; +#define WGL_EXT_framebuffer_sRGB 1 +GLAD_API_CALL int GLAD_WGL_EXT_framebuffer_sRGB; +#define WGL_EXT_make_current_read 1 +GLAD_API_CALL int GLAD_WGL_EXT_make_current_read; +#define WGL_EXT_multisample 1 +GLAD_API_CALL int GLAD_WGL_EXT_multisample; +#define WGL_EXT_pbuffer 1 +GLAD_API_CALL int GLAD_WGL_EXT_pbuffer; +#define WGL_EXT_pixel_format 1 +GLAD_API_CALL int GLAD_WGL_EXT_pixel_format; +#define WGL_EXT_pixel_format_packed_float 1 +GLAD_API_CALL int GLAD_WGL_EXT_pixel_format_packed_float; +#define WGL_EXT_swap_control 1 +GLAD_API_CALL int GLAD_WGL_EXT_swap_control; +#define WGL_EXT_swap_control_tear 1 +GLAD_API_CALL int GLAD_WGL_EXT_swap_control_tear; +#define WGL_I3D_digital_video_control 1 +GLAD_API_CALL int GLAD_WGL_I3D_digital_video_control; +#define WGL_I3D_gamma 1 +GLAD_API_CALL int GLAD_WGL_I3D_gamma; +#define WGL_I3D_genlock 1 +GLAD_API_CALL int GLAD_WGL_I3D_genlock; +#define WGL_I3D_image_buffer 1 +GLAD_API_CALL int GLAD_WGL_I3D_image_buffer; +#define WGL_I3D_swap_frame_lock 1 +GLAD_API_CALL int GLAD_WGL_I3D_swap_frame_lock; +#define WGL_I3D_swap_frame_usage 1 +GLAD_API_CALL int GLAD_WGL_I3D_swap_frame_usage; +#define WGL_NV_DX_interop 1 +GLAD_API_CALL int GLAD_WGL_NV_DX_interop; +#define WGL_NV_DX_interop2 1 +GLAD_API_CALL int GLAD_WGL_NV_DX_interop2; +#define WGL_NV_copy_image 1 +GLAD_API_CALL int GLAD_WGL_NV_copy_image; +#define WGL_NV_delay_before_swap 1 +GLAD_API_CALL int GLAD_WGL_NV_delay_before_swap; +#define WGL_NV_float_buffer 1 +GLAD_API_CALL int GLAD_WGL_NV_float_buffer; +#define WGL_NV_gpu_affinity 1 +GLAD_API_CALL int GLAD_WGL_NV_gpu_affinity; +#define WGL_NV_multigpu_context 1 +GLAD_API_CALL int GLAD_WGL_NV_multigpu_context; +#define WGL_NV_multisample_coverage 1 +GLAD_API_CALL int GLAD_WGL_NV_multisample_coverage; +#define WGL_NV_present_video 1 +GLAD_API_CALL int GLAD_WGL_NV_present_video; +#define WGL_NV_render_depth_texture 1 +GLAD_API_CALL int GLAD_WGL_NV_render_depth_texture; +#define WGL_NV_render_texture_rectangle 1 +GLAD_API_CALL int GLAD_WGL_NV_render_texture_rectangle; +#define WGL_NV_swap_group 1 +GLAD_API_CALL int GLAD_WGL_NV_swap_group; +#define WGL_NV_vertex_array_range 1 +GLAD_API_CALL int GLAD_WGL_NV_vertex_array_range; +#define WGL_NV_video_capture 1 +GLAD_API_CALL int GLAD_WGL_NV_video_capture; +#define WGL_NV_video_output 1 +GLAD_API_CALL int GLAD_WGL_NV_video_output; +#define WGL_OML_sync_control 1 +GLAD_API_CALL int GLAD_WGL_OML_sync_control; + +typedef int(GLAD_API_PTR *PFNCHOOSEPIXELFORMATPROC)(HDC hDc, const PIXELFORMATDESCRIPTOR *pPfd); +typedef int(GLAD_API_PTR *PFNDESCRIBEPIXELFORMATPROC)(HDC hdc, int ipfd, UINT cjpfd, + PIXELFORMATDESCRIPTOR *ppfd); +typedef UINT(GLAD_API_PTR *PFNGETENHMETAFILEPIXELFORMATPROC)(HENHMETAFILE hemf, UINT cbBuffer, + PIXELFORMATDESCRIPTOR *ppfd); +typedef int(GLAD_API_PTR *PFNGETPIXELFORMATPROC)(HDC hdc); +typedef BOOL(GLAD_API_PTR *PFNSETPIXELFORMATPROC)(HDC hdc, int ipfd, + const PIXELFORMATDESCRIPTOR *ppfd); +typedef BOOL(GLAD_API_PTR *PFNSWAPBUFFERSPROC)(HDC hdc); +typedef void *(GLAD_API_PTR *PFNWGLALLOCATEMEMORYNVPROC)(GLsizei size, GLfloat readfreq, + GLfloat writefreq, GLfloat priority); +typedef BOOL(GLAD_API_PTR *PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC)(HDC hDC, const HANDLE *pEvent, + const LPVOID *pAddress, + const DWORD *pSize, UINT count); +typedef BOOL(GLAD_API_PTR *PFNWGLBEGINFRAMETRACKINGI3DPROC)(void); +typedef GLboolean(GLAD_API_PTR *PFNWGLBINDDISPLAYCOLORTABLEEXTPROC)(GLushort id); +typedef BOOL(GLAD_API_PTR *PFNWGLBINDSWAPBARRIERNVPROC)(GLuint group, GLuint barrier); +typedef BOOL(GLAD_API_PTR *PFNWGLBINDTEXIMAGEARBPROC)(HPBUFFERARB hPbuffer, int iBuffer); +typedef BOOL(GLAD_API_PTR *PFNWGLBINDVIDEOCAPTUREDEVICENVPROC)(UINT uVideoSlot, + HVIDEOINPUTDEVICENV hDevice); +typedef BOOL(GLAD_API_PTR *PFNWGLBINDVIDEODEVICENVPROC)(HDC hDc, unsigned int uVideoSlot, + HVIDEOOUTPUTDEVICENV hVideoDevice, + const int *piAttribList); +typedef BOOL(GLAD_API_PTR *PFNWGLBINDVIDEOIMAGENVPROC)(HPVIDEODEV hVideoDevice, + HPBUFFERARB hPbuffer, int iVideoBuffer); +typedef VOID(GLAD_API_PTR *PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC)( + HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, + GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +typedef BOOL(GLAD_API_PTR *PFNWGLCHOOSEPIXELFORMATARBPROC)(HDC hdc, const int *piAttribIList, + const FLOAT *pfAttribFList, + UINT nMaxFormats, int *piFormats, + UINT *nNumFormats); +typedef BOOL(GLAD_API_PTR *PFNWGLCHOOSEPIXELFORMATEXTPROC)(HDC hdc, const int *piAttribIList, + const FLOAT *pfAttribFList, + UINT nMaxFormats, int *piFormats, + UINT *nNumFormats); +typedef BOOL(GLAD_API_PTR *PFNWGLCOPYCONTEXTPROC)(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask); +typedef BOOL(GLAD_API_PTR *PFNWGLCOPYIMAGESUBDATANVPROC)( + HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, + GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, + GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +typedef HDC(GLAD_API_PTR *PFNWGLCREATEAFFINITYDCNVPROC)(const HGPUNV *phGpuList); +typedef HGLRC(GLAD_API_PTR *PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC)(UINT id); +typedef HGLRC(GLAD_API_PTR *PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC)(UINT id, + HGLRC hShareContext, + const int *attribList); +typedef HANDLE(GLAD_API_PTR *PFNWGLCREATEBUFFERREGIONARBPROC)(HDC hDC, int iLayerPlane, UINT uType); +typedef HGLRC(GLAD_API_PTR *PFNWGLCREATECONTEXTPROC)(HDC hDc); +typedef HGLRC(GLAD_API_PTR *PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC hDC, HGLRC hShareContext, + const int *attribList); +typedef GLboolean(GLAD_API_PTR *PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC)(GLushort id); +typedef LPVOID(GLAD_API_PTR *PFNWGLCREATEIMAGEBUFFERI3DPROC)(HDC hDC, DWORD dwSize, UINT uFlags); +typedef HGLRC(GLAD_API_PTR *PFNWGLCREATELAYERCONTEXTPROC)(HDC hDc, int level); +typedef HPBUFFERARB(GLAD_API_PTR *PFNWGLCREATEPBUFFERARBPROC)(HDC hDC, int iPixelFormat, int iWidth, + int iHeight, const int *piAttribList); +typedef HPBUFFEREXT(GLAD_API_PTR *PFNWGLCREATEPBUFFEREXTPROC)(HDC hDC, int iPixelFormat, int iWidth, + int iHeight, const int *piAttribList); +typedef BOOL(GLAD_API_PTR *PFNWGLDXCLOSEDEVICENVPROC)(HANDLE hDevice); +typedef BOOL(GLAD_API_PTR *PFNWGLDXLOCKOBJECTSNVPROC)(HANDLE hDevice, GLint count, + HANDLE *hObjects); +typedef BOOL(GLAD_API_PTR *PFNWGLDXOBJECTACCESSNVPROC)(HANDLE hObject, GLenum access); +typedef HANDLE(GLAD_API_PTR *PFNWGLDXOPENDEVICENVPROC)(void *dxDevice); +typedef HANDLE(GLAD_API_PTR *PFNWGLDXREGISTEROBJECTNVPROC)(HANDLE hDevice, void *dxObject, + GLuint name, GLenum type, GLenum access); +typedef BOOL(GLAD_API_PTR *PFNWGLDXSETRESOURCESHAREHANDLENVPROC)(void *dxObject, + HANDLE shareHandle); +typedef BOOL(GLAD_API_PTR *PFNWGLDXUNLOCKOBJECTSNVPROC)(HANDLE hDevice, GLint count, + HANDLE *hObjects); +typedef BOOL(GLAD_API_PTR *PFNWGLDXUNREGISTEROBJECTNVPROC)(HANDLE hDevice, HANDLE hObject); +typedef BOOL(GLAD_API_PTR *PFNWGLDELAYBEFORESWAPNVPROC)(HDC hDC, GLfloat seconds); +typedef BOOL(GLAD_API_PTR *PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC)(HGLRC hglrc); +typedef VOID(GLAD_API_PTR *PFNWGLDELETEBUFFERREGIONARBPROC)(HANDLE hRegion); +typedef BOOL(GLAD_API_PTR *PFNWGLDELETECONTEXTPROC)(HGLRC oldContext); +typedef BOOL(GLAD_API_PTR *PFNWGLDELETEDCNVPROC)(HDC hdc); +typedef BOOL(GLAD_API_PTR *PFNWGLDESCRIBELAYERPLANEPROC)(HDC hDc, int pixelFormat, int layerPlane, + UINT nBytes, LAYERPLANEDESCRIPTOR *plpd); +typedef VOID(GLAD_API_PTR *PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC)(GLushort id); +typedef BOOL(GLAD_API_PTR *PFNWGLDESTROYIMAGEBUFFERI3DPROC)(HDC hDC, LPVOID pAddress); +typedef BOOL(GLAD_API_PTR *PFNWGLDESTROYPBUFFERARBPROC)(HPBUFFERARB hPbuffer); +typedef BOOL(GLAD_API_PTR *PFNWGLDESTROYPBUFFEREXTPROC)(HPBUFFEREXT hPbuffer); +typedef BOOL(GLAD_API_PTR *PFNWGLDISABLEFRAMELOCKI3DPROC)(void); +typedef BOOL(GLAD_API_PTR *PFNWGLDISABLEGENLOCKI3DPROC)(HDC hDC); +typedef BOOL(GLAD_API_PTR *PFNWGLENABLEFRAMELOCKI3DPROC)(void); +typedef BOOL(GLAD_API_PTR *PFNWGLENABLEGENLOCKI3DPROC)(HDC hDC); +typedef BOOL(GLAD_API_PTR *PFNWGLENDFRAMETRACKINGI3DPROC)(void); +typedef BOOL(GLAD_API_PTR *PFNWGLENUMGPUDEVICESNVPROC)(HGPUNV hGpu, UINT iDeviceIndex, + PGPU_DEVICE lpGpuDevice); +typedef BOOL(GLAD_API_PTR *PFNWGLENUMGPUSFROMAFFINITYDCNVPROC)(HDC hAffinityDC, UINT iGpuIndex, + HGPUNV *hGpu); +typedef BOOL(GLAD_API_PTR *PFNWGLENUMGPUSNVPROC)(UINT iGpuIndex, HGPUNV *phGpu); +typedef UINT(GLAD_API_PTR *PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC)( + HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList); +typedef int(GLAD_API_PTR *PFNWGLENUMERATEVIDEODEVICESNVPROC)(HDC hDc, + HVIDEOOUTPUTDEVICENV *phDeviceList); +typedef void(GLAD_API_PTR *PFNWGLFREEMEMORYNVPROC)(void *pointer); +typedef BOOL(GLAD_API_PTR *PFNWGLGENLOCKSAMPLERATEI3DPROC)(HDC hDC, UINT uRate); +typedef BOOL(GLAD_API_PTR *PFNWGLGENLOCKSOURCEDELAYI3DPROC)(HDC hDC, UINT uDelay); +typedef BOOL(GLAD_API_PTR *PFNWGLGENLOCKSOURCEEDGEI3DPROC)(HDC hDC, UINT uEdge); +typedef BOOL(GLAD_API_PTR *PFNWGLGENLOCKSOURCEI3DPROC)(HDC hDC, UINT uSource); +typedef UINT(GLAD_API_PTR *PFNWGLGETCONTEXTGPUIDAMDPROC)(HGLRC hglrc); +typedef HGLRC(GLAD_API_PTR *PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC)(void); +typedef HGLRC(GLAD_API_PTR *PFNWGLGETCURRENTCONTEXTPROC)(void); +typedef HDC(GLAD_API_PTR *PFNWGLGETCURRENTDCPROC)(void); +typedef HDC(GLAD_API_PTR *PFNWGLGETCURRENTREADDCARBPROC)(void); +typedef HDC(GLAD_API_PTR *PFNWGLGETCURRENTREADDCEXTPROC)(void); +typedef BOOL(GLAD_API_PTR *PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC)(HDC hDC, int iAttribute, + int *piValue); +typedef const char *(GLAD_API_PTR *PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC hdc); +typedef const char *(GLAD_API_PTR *PFNWGLGETEXTENSIONSSTRINGEXTPROC)(void); +typedef BOOL(GLAD_API_PTR *PFNWGLGETFRAMEUSAGEI3DPROC)(float *pUsage); +typedef UINT(GLAD_API_PTR *PFNWGLGETGPUIDSAMDPROC)(UINT maxCount, UINT *ids); +typedef INT(GLAD_API_PTR *PFNWGLGETGPUINFOAMDPROC)(UINT id, INT property, GLenum dataType, + UINT size, void *data); +typedef BOOL(GLAD_API_PTR *PFNWGLGETGAMMATABLEI3DPROC)(HDC hDC, int iEntries, USHORT *puRed, + USHORT *puGreen, USHORT *puBlue); +typedef BOOL(GLAD_API_PTR *PFNWGLGETGAMMATABLEPARAMETERSI3DPROC)(HDC hDC, int iAttribute, + int *piValue); +typedef BOOL(GLAD_API_PTR *PFNWGLGETGENLOCKSAMPLERATEI3DPROC)(HDC hDC, UINT *uRate); +typedef BOOL(GLAD_API_PTR *PFNWGLGETGENLOCKSOURCEDELAYI3DPROC)(HDC hDC, UINT *uDelay); +typedef BOOL(GLAD_API_PTR *PFNWGLGETGENLOCKSOURCEEDGEI3DPROC)(HDC hDC, UINT *uEdge); +typedef BOOL(GLAD_API_PTR *PFNWGLGETGENLOCKSOURCEI3DPROC)(HDC hDC, UINT *uSource); +typedef int(GLAD_API_PTR *PFNWGLGETLAYERPALETTEENTRIESPROC)(HDC hdc, int iLayerPlane, int iStart, + int cEntries, COLORREF *pcr); +typedef BOOL(GLAD_API_PTR *PFNWGLGETMSCRATEOMLPROC)(HDC hdc, INT32 *numerator, INT32 *denominator); +typedef HDC(GLAD_API_PTR *PFNWGLGETPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer); +typedef HDC(GLAD_API_PTR *PFNWGLGETPBUFFERDCEXTPROC)(HPBUFFEREXT hPbuffer); +typedef BOOL(GLAD_API_PTR *PFNWGLGETPIXELFORMATATTRIBFVARBPROC)(HDC hdc, int iPixelFormat, + int iLayerPlane, UINT nAttributes, + const int *piAttributes, + FLOAT *pfValues); +typedef BOOL(GLAD_API_PTR *PFNWGLGETPIXELFORMATATTRIBFVEXTPROC)(HDC hdc, int iPixelFormat, + int iLayerPlane, UINT nAttributes, + int *piAttributes, FLOAT *pfValues); +typedef BOOL(GLAD_API_PTR *PFNWGLGETPIXELFORMATATTRIBIVARBPROC)(HDC hdc, int iPixelFormat, + int iLayerPlane, UINT nAttributes, + const int *piAttributes, + int *piValues); +typedef BOOL(GLAD_API_PTR *PFNWGLGETPIXELFORMATATTRIBIVEXTPROC)(HDC hdc, int iPixelFormat, + int iLayerPlane, UINT nAttributes, + int *piAttributes, int *piValues); +typedef PROC(GLAD_API_PTR *PFNWGLGETPROCADDRESSPROC)(LPCSTR lpszProc); +typedef int(GLAD_API_PTR *PFNWGLGETSWAPINTERVALEXTPROC)(void); +typedef BOOL(GLAD_API_PTR *PFNWGLGETSYNCVALUESOMLPROC)(HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc); +typedef BOOL(GLAD_API_PTR *PFNWGLGETVIDEODEVICENVPROC)(HDC hDC, int numDevices, + HPVIDEODEV *hVideoDevice); +typedef BOOL(GLAD_API_PTR *PFNWGLGETVIDEOINFONVPROC)(HPVIDEODEV hpVideoDevice, + unsigned long *pulCounterOutputPbuffer, + unsigned long *pulCounterOutputVideo); +typedef BOOL(GLAD_API_PTR *PFNWGLISENABLEDFRAMELOCKI3DPROC)(BOOL *pFlag); +typedef BOOL(GLAD_API_PTR *PFNWGLISENABLEDGENLOCKI3DPROC)(HDC hDC, BOOL *pFlag); +typedef BOOL(GLAD_API_PTR *PFNWGLJOINSWAPGROUPNVPROC)(HDC hDC, GLuint group); +typedef GLboolean(GLAD_API_PTR *PFNWGLLOADDISPLAYCOLORTABLEEXTPROC)(const GLushort *table, + GLuint length); +typedef BOOL(GLAD_API_PTR *PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC)(HDC hDc, + HVIDEOINPUTDEVICENV hDevice); +typedef BOOL(GLAD_API_PTR *PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC)(HGLRC hglrc); +typedef BOOL(GLAD_API_PTR *PFNWGLMAKECONTEXTCURRENTARBPROC)(HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +typedef BOOL(GLAD_API_PTR *PFNWGLMAKECONTEXTCURRENTEXTPROC)(HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +typedef BOOL(GLAD_API_PTR *PFNWGLMAKECURRENTPROC)(HDC hDc, HGLRC newContext); +typedef BOOL(GLAD_API_PTR *PFNWGLQUERYCURRENTCONTEXTNVPROC)(int iAttribute, int *piValue); +typedef BOOL(GLAD_API_PTR *PFNWGLQUERYFRAMECOUNTNVPROC)(HDC hDC, GLuint *count); +typedef BOOL(GLAD_API_PTR *PFNWGLQUERYFRAMELOCKMASTERI3DPROC)(BOOL *pFlag); +typedef BOOL(GLAD_API_PTR *PFNWGLQUERYFRAMETRACKINGI3DPROC)(DWORD *pFrameCount, + DWORD *pMissedFrames, + float *pLastMissedUsage); +typedef BOOL(GLAD_API_PTR *PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC)(HDC hDC, UINT *uMaxLineDelay, + UINT *uMaxPixelDelay); +typedef BOOL(GLAD_API_PTR *PFNWGLQUERYMAXSWAPGROUPSNVPROC)(HDC hDC, GLuint *maxGroups, + GLuint *maxBarriers); +typedef BOOL(GLAD_API_PTR *PFNWGLQUERYPBUFFERARBPROC)(HPBUFFERARB hPbuffer, int iAttribute, + int *piValue); +typedef BOOL(GLAD_API_PTR *PFNWGLQUERYPBUFFEREXTPROC)(HPBUFFEREXT hPbuffer, int iAttribute, + int *piValue); +typedef BOOL(GLAD_API_PTR *PFNWGLQUERYSWAPGROUPNVPROC)(HDC hDC, GLuint *group, GLuint *barrier); +typedef BOOL(GLAD_API_PTR *PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC)(HDC hDc, + HVIDEOINPUTDEVICENV hDevice, + int iAttribute, int *piValue); +typedef BOOL(GLAD_API_PTR *PFNWGLREALIZELAYERPALETTEPROC)(HDC hdc, int iLayerPlane, BOOL bRealize); +typedef BOOL(GLAD_API_PTR *PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC)(HDC hDC, const LPVOID *pAddress, + UINT count); +typedef int(GLAD_API_PTR *PFNWGLRELEASEPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer, HDC hDC); +typedef int(GLAD_API_PTR *PFNWGLRELEASEPBUFFERDCEXTPROC)(HPBUFFEREXT hPbuffer, HDC hDC); +typedef BOOL(GLAD_API_PTR *PFNWGLRELEASETEXIMAGEARBPROC)(HPBUFFERARB hPbuffer, int iBuffer); +typedef BOOL(GLAD_API_PTR *PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC)(HDC hDc, + HVIDEOINPUTDEVICENV hDevice); +typedef BOOL(GLAD_API_PTR *PFNWGLRELEASEVIDEODEVICENVPROC)(HPVIDEODEV hVideoDevice); +typedef BOOL(GLAD_API_PTR *PFNWGLRELEASEVIDEOIMAGENVPROC)(HPBUFFERARB hPbuffer, int iVideoBuffer); +typedef BOOL(GLAD_API_PTR *PFNWGLRESETFRAMECOUNTNVPROC)(HDC hDC); +typedef BOOL(GLAD_API_PTR *PFNWGLRESTOREBUFFERREGIONARBPROC)(HANDLE hRegion, int x, int y, + int width, int height, int xSrc, + int ySrc); +typedef BOOL(GLAD_API_PTR *PFNWGLSAVEBUFFERREGIONARBPROC)(HANDLE hRegion, int x, int y, int width, + int height); +typedef BOOL(GLAD_API_PTR *PFNWGLSENDPBUFFERTOVIDEONVPROC)(HPBUFFERARB hPbuffer, int iBufferType, + unsigned long *pulCounterPbuffer, + BOOL bBlock); +typedef BOOL(GLAD_API_PTR *PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC)(HDC hDC, int iAttribute, + const int *piValue); +typedef BOOL(GLAD_API_PTR *PFNWGLSETGAMMATABLEI3DPROC)(HDC hDC, int iEntries, const USHORT *puRed, + const USHORT *puGreen, const USHORT *puBlue); +typedef BOOL(GLAD_API_PTR *PFNWGLSETGAMMATABLEPARAMETERSI3DPROC)(HDC hDC, int iAttribute, + const int *piValue); +typedef int(GLAD_API_PTR *PFNWGLSETLAYERPALETTEENTRIESPROC)(HDC hdc, int iLayerPlane, int iStart, + int cEntries, const COLORREF *pcr); +typedef BOOL(GLAD_API_PTR *PFNWGLSETPBUFFERATTRIBARBPROC)(HPBUFFERARB hPbuffer, + const int *piAttribList); +typedef BOOL(GLAD_API_PTR *PFNWGLSETSTEREOEMITTERSTATE3DLPROC)(HDC hDC, UINT uState); +typedef BOOL(GLAD_API_PTR *PFNWGLSHARELISTSPROC)(HGLRC hrcSrvShare, HGLRC hrcSrvSource); +typedef INT64(GLAD_API_PTR *PFNWGLSWAPBUFFERSMSCOMLPROC)(HDC hdc, INT64 target_msc, INT64 divisor, + INT64 remainder); +typedef BOOL(GLAD_API_PTR *PFNWGLSWAPINTERVALEXTPROC)(int interval); +typedef BOOL(GLAD_API_PTR *PFNWGLSWAPLAYERBUFFERSPROC)(HDC hdc, UINT fuFlags); +typedef INT64(GLAD_API_PTR *PFNWGLSWAPLAYERBUFFERSMSCOMLPROC)(HDC hdc, INT fuPlanes, + INT64 target_msc, INT64 divisor, + INT64 remainder); +typedef BOOL(GLAD_API_PTR *PFNWGLUSEFONTBITMAPSPROC)(HDC hDC, DWORD first, DWORD count, + DWORD listBase); +typedef BOOL(GLAD_API_PTR *PFNWGLUSEFONTBITMAPSAPROC)(HDC hDC, DWORD first, DWORD count, + DWORD listBase); +typedef BOOL(GLAD_API_PTR *PFNWGLUSEFONTBITMAPSWPROC)(HDC hDC, DWORD first, DWORD count, + DWORD listBase); +typedef BOOL(GLAD_API_PTR *PFNWGLUSEFONTOUTLINESPROC)(HDC hDC, DWORD first, DWORD count, + DWORD listBase, FLOAT deviation, + FLOAT extrusion, int format, + LPGLYPHMETRICSFLOAT lpgmf); +typedef BOOL(GLAD_API_PTR *PFNWGLUSEFONTOUTLINESAPROC)(HDC hDC, DWORD first, DWORD count, + DWORD listBase, FLOAT deviation, + FLOAT extrusion, int format, + LPGLYPHMETRICSFLOAT lpgmf); +typedef BOOL(GLAD_API_PTR *PFNWGLUSEFONTOUTLINESWPROC)(HDC hDC, DWORD first, DWORD count, + DWORD listBase, FLOAT deviation, + FLOAT extrusion, int format, + LPGLYPHMETRICSFLOAT lpgmf); +typedef BOOL(GLAD_API_PTR *PFNWGLWAITFORMSCOMLPROC)(HDC hdc, INT64 target_msc, INT64 divisor, + INT64 remainder, INT64 *ust, INT64 *msc, + INT64 *sbc); +typedef BOOL(GLAD_API_PTR *PFNWGLWAITFORSBCOMLPROC)(HDC hdc, INT64 target_sbc, INT64 *ust, + INT64 *msc, INT64 *sbc); + +GLAD_API_CALL PFNWGLALLOCATEMEMORYNVPROC glad_wglAllocateMemoryNV; +#define wglAllocateMemoryNV glad_wglAllocateMemoryNV +GLAD_API_CALL PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC glad_wglAssociateImageBufferEventsI3D; +#define wglAssociateImageBufferEventsI3D glad_wglAssociateImageBufferEventsI3D +GLAD_API_CALL PFNWGLBEGINFRAMETRACKINGI3DPROC glad_wglBeginFrameTrackingI3D; +#define wglBeginFrameTrackingI3D glad_wglBeginFrameTrackingI3D +GLAD_API_CALL PFNWGLBINDDISPLAYCOLORTABLEEXTPROC glad_wglBindDisplayColorTableEXT; +#define wglBindDisplayColorTableEXT glad_wglBindDisplayColorTableEXT +GLAD_API_CALL PFNWGLBINDSWAPBARRIERNVPROC glad_wglBindSwapBarrierNV; +#define wglBindSwapBarrierNV glad_wglBindSwapBarrierNV +GLAD_API_CALL PFNWGLBINDTEXIMAGEARBPROC glad_wglBindTexImageARB; +#define wglBindTexImageARB glad_wglBindTexImageARB +GLAD_API_CALL PFNWGLBINDVIDEOCAPTUREDEVICENVPROC glad_wglBindVideoCaptureDeviceNV; +#define wglBindVideoCaptureDeviceNV glad_wglBindVideoCaptureDeviceNV +GLAD_API_CALL PFNWGLBINDVIDEODEVICENVPROC glad_wglBindVideoDeviceNV; +#define wglBindVideoDeviceNV glad_wglBindVideoDeviceNV +GLAD_API_CALL PFNWGLBINDVIDEOIMAGENVPROC glad_wglBindVideoImageNV; +#define wglBindVideoImageNV glad_wglBindVideoImageNV +GLAD_API_CALL PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC glad_wglBlitContextFramebufferAMD; +#define wglBlitContextFramebufferAMD glad_wglBlitContextFramebufferAMD +GLAD_API_CALL PFNWGLCHOOSEPIXELFORMATARBPROC glad_wglChoosePixelFormatARB; +#define wglChoosePixelFormatARB glad_wglChoosePixelFormatARB +GLAD_API_CALL PFNWGLCHOOSEPIXELFORMATEXTPROC glad_wglChoosePixelFormatEXT; +#define wglChoosePixelFormatEXT glad_wglChoosePixelFormatEXT +GLAD_API_CALL PFNWGLCOPYIMAGESUBDATANVPROC glad_wglCopyImageSubDataNV; +#define wglCopyImageSubDataNV glad_wglCopyImageSubDataNV +GLAD_API_CALL PFNWGLCREATEAFFINITYDCNVPROC glad_wglCreateAffinityDCNV; +#define wglCreateAffinityDCNV glad_wglCreateAffinityDCNV +GLAD_API_CALL PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC glad_wglCreateAssociatedContextAMD; +#define wglCreateAssociatedContextAMD glad_wglCreateAssociatedContextAMD +GLAD_API_CALL PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC glad_wglCreateAssociatedContextAttribsAMD; +#define wglCreateAssociatedContextAttribsAMD glad_wglCreateAssociatedContextAttribsAMD +GLAD_API_CALL PFNWGLCREATEBUFFERREGIONARBPROC glad_wglCreateBufferRegionARB; +#define wglCreateBufferRegionARB glad_wglCreateBufferRegionARB +GLAD_API_CALL PFNWGLCREATECONTEXTATTRIBSARBPROC glad_wglCreateContextAttribsARB; +#define wglCreateContextAttribsARB glad_wglCreateContextAttribsARB +GLAD_API_CALL PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC glad_wglCreateDisplayColorTableEXT; +#define wglCreateDisplayColorTableEXT glad_wglCreateDisplayColorTableEXT +GLAD_API_CALL PFNWGLCREATEIMAGEBUFFERI3DPROC glad_wglCreateImageBufferI3D; +#define wglCreateImageBufferI3D glad_wglCreateImageBufferI3D +GLAD_API_CALL PFNWGLCREATEPBUFFERARBPROC glad_wglCreatePbufferARB; +#define wglCreatePbufferARB glad_wglCreatePbufferARB +GLAD_API_CALL PFNWGLCREATEPBUFFEREXTPROC glad_wglCreatePbufferEXT; +#define wglCreatePbufferEXT glad_wglCreatePbufferEXT +GLAD_API_CALL PFNWGLDXCLOSEDEVICENVPROC glad_wglDXCloseDeviceNV; +#define wglDXCloseDeviceNV glad_wglDXCloseDeviceNV +GLAD_API_CALL PFNWGLDXLOCKOBJECTSNVPROC glad_wglDXLockObjectsNV; +#define wglDXLockObjectsNV glad_wglDXLockObjectsNV +GLAD_API_CALL PFNWGLDXOBJECTACCESSNVPROC glad_wglDXObjectAccessNV; +#define wglDXObjectAccessNV glad_wglDXObjectAccessNV +GLAD_API_CALL PFNWGLDXOPENDEVICENVPROC glad_wglDXOpenDeviceNV; +#define wglDXOpenDeviceNV glad_wglDXOpenDeviceNV +GLAD_API_CALL PFNWGLDXREGISTEROBJECTNVPROC glad_wglDXRegisterObjectNV; +#define wglDXRegisterObjectNV glad_wglDXRegisterObjectNV +GLAD_API_CALL PFNWGLDXSETRESOURCESHAREHANDLENVPROC glad_wglDXSetResourceShareHandleNV; +#define wglDXSetResourceShareHandleNV glad_wglDXSetResourceShareHandleNV +GLAD_API_CALL PFNWGLDXUNLOCKOBJECTSNVPROC glad_wglDXUnlockObjectsNV; +#define wglDXUnlockObjectsNV glad_wglDXUnlockObjectsNV +GLAD_API_CALL PFNWGLDXUNREGISTEROBJECTNVPROC glad_wglDXUnregisterObjectNV; +#define wglDXUnregisterObjectNV glad_wglDXUnregisterObjectNV +GLAD_API_CALL PFNWGLDELAYBEFORESWAPNVPROC glad_wglDelayBeforeSwapNV; +#define wglDelayBeforeSwapNV glad_wglDelayBeforeSwapNV +GLAD_API_CALL PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC glad_wglDeleteAssociatedContextAMD; +#define wglDeleteAssociatedContextAMD glad_wglDeleteAssociatedContextAMD +GLAD_API_CALL PFNWGLDELETEBUFFERREGIONARBPROC glad_wglDeleteBufferRegionARB; +#define wglDeleteBufferRegionARB glad_wglDeleteBufferRegionARB +GLAD_API_CALL PFNWGLDELETEDCNVPROC glad_wglDeleteDCNV; +#define wglDeleteDCNV glad_wglDeleteDCNV +GLAD_API_CALL PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC glad_wglDestroyDisplayColorTableEXT; +#define wglDestroyDisplayColorTableEXT glad_wglDestroyDisplayColorTableEXT +GLAD_API_CALL PFNWGLDESTROYIMAGEBUFFERI3DPROC glad_wglDestroyImageBufferI3D; +#define wglDestroyImageBufferI3D glad_wglDestroyImageBufferI3D +GLAD_API_CALL PFNWGLDESTROYPBUFFERARBPROC glad_wglDestroyPbufferARB; +#define wglDestroyPbufferARB glad_wglDestroyPbufferARB +GLAD_API_CALL PFNWGLDESTROYPBUFFEREXTPROC glad_wglDestroyPbufferEXT; +#define wglDestroyPbufferEXT glad_wglDestroyPbufferEXT +GLAD_API_CALL PFNWGLDISABLEFRAMELOCKI3DPROC glad_wglDisableFrameLockI3D; +#define wglDisableFrameLockI3D glad_wglDisableFrameLockI3D +GLAD_API_CALL PFNWGLDISABLEGENLOCKI3DPROC glad_wglDisableGenlockI3D; +#define wglDisableGenlockI3D glad_wglDisableGenlockI3D +GLAD_API_CALL PFNWGLENABLEFRAMELOCKI3DPROC glad_wglEnableFrameLockI3D; +#define wglEnableFrameLockI3D glad_wglEnableFrameLockI3D +GLAD_API_CALL PFNWGLENABLEGENLOCKI3DPROC glad_wglEnableGenlockI3D; +#define wglEnableGenlockI3D glad_wglEnableGenlockI3D +GLAD_API_CALL PFNWGLENDFRAMETRACKINGI3DPROC glad_wglEndFrameTrackingI3D; +#define wglEndFrameTrackingI3D glad_wglEndFrameTrackingI3D +GLAD_API_CALL PFNWGLENUMGPUDEVICESNVPROC glad_wglEnumGpuDevicesNV; +#define wglEnumGpuDevicesNV glad_wglEnumGpuDevicesNV +GLAD_API_CALL PFNWGLENUMGPUSFROMAFFINITYDCNVPROC glad_wglEnumGpusFromAffinityDCNV; +#define wglEnumGpusFromAffinityDCNV glad_wglEnumGpusFromAffinityDCNV +GLAD_API_CALL PFNWGLENUMGPUSNVPROC glad_wglEnumGpusNV; +#define wglEnumGpusNV glad_wglEnumGpusNV +GLAD_API_CALL PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC glad_wglEnumerateVideoCaptureDevicesNV; +#define wglEnumerateVideoCaptureDevicesNV glad_wglEnumerateVideoCaptureDevicesNV +GLAD_API_CALL PFNWGLENUMERATEVIDEODEVICESNVPROC glad_wglEnumerateVideoDevicesNV; +#define wglEnumerateVideoDevicesNV glad_wglEnumerateVideoDevicesNV +GLAD_API_CALL PFNWGLFREEMEMORYNVPROC glad_wglFreeMemoryNV; +#define wglFreeMemoryNV glad_wglFreeMemoryNV +GLAD_API_CALL PFNWGLGENLOCKSAMPLERATEI3DPROC glad_wglGenlockSampleRateI3D; +#define wglGenlockSampleRateI3D glad_wglGenlockSampleRateI3D +GLAD_API_CALL PFNWGLGENLOCKSOURCEDELAYI3DPROC glad_wglGenlockSourceDelayI3D; +#define wglGenlockSourceDelayI3D glad_wglGenlockSourceDelayI3D +GLAD_API_CALL PFNWGLGENLOCKSOURCEEDGEI3DPROC glad_wglGenlockSourceEdgeI3D; +#define wglGenlockSourceEdgeI3D glad_wglGenlockSourceEdgeI3D +GLAD_API_CALL PFNWGLGENLOCKSOURCEI3DPROC glad_wglGenlockSourceI3D; +#define wglGenlockSourceI3D glad_wglGenlockSourceI3D +GLAD_API_CALL PFNWGLGETCONTEXTGPUIDAMDPROC glad_wglGetContextGPUIDAMD; +#define wglGetContextGPUIDAMD glad_wglGetContextGPUIDAMD +GLAD_API_CALL PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC glad_wglGetCurrentAssociatedContextAMD; +#define wglGetCurrentAssociatedContextAMD glad_wglGetCurrentAssociatedContextAMD +GLAD_API_CALL PFNWGLGETCURRENTREADDCARBPROC glad_wglGetCurrentReadDCARB; +#define wglGetCurrentReadDCARB glad_wglGetCurrentReadDCARB +GLAD_API_CALL PFNWGLGETCURRENTREADDCEXTPROC glad_wglGetCurrentReadDCEXT; +#define wglGetCurrentReadDCEXT glad_wglGetCurrentReadDCEXT +GLAD_API_CALL PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC glad_wglGetDigitalVideoParametersI3D; +#define wglGetDigitalVideoParametersI3D glad_wglGetDigitalVideoParametersI3D +GLAD_API_CALL PFNWGLGETEXTENSIONSSTRINGARBPROC glad_wglGetExtensionsStringARB; +#define wglGetExtensionsStringARB glad_wglGetExtensionsStringARB +GLAD_API_CALL PFNWGLGETEXTENSIONSSTRINGEXTPROC glad_wglGetExtensionsStringEXT; +#define wglGetExtensionsStringEXT glad_wglGetExtensionsStringEXT +GLAD_API_CALL PFNWGLGETFRAMEUSAGEI3DPROC glad_wglGetFrameUsageI3D; +#define wglGetFrameUsageI3D glad_wglGetFrameUsageI3D +GLAD_API_CALL PFNWGLGETGPUIDSAMDPROC glad_wglGetGPUIDsAMD; +#define wglGetGPUIDsAMD glad_wglGetGPUIDsAMD +GLAD_API_CALL PFNWGLGETGPUINFOAMDPROC glad_wglGetGPUInfoAMD; +#define wglGetGPUInfoAMD glad_wglGetGPUInfoAMD +GLAD_API_CALL PFNWGLGETGAMMATABLEI3DPROC glad_wglGetGammaTableI3D; +#define wglGetGammaTableI3D glad_wglGetGammaTableI3D +GLAD_API_CALL PFNWGLGETGAMMATABLEPARAMETERSI3DPROC glad_wglGetGammaTableParametersI3D; +#define wglGetGammaTableParametersI3D glad_wglGetGammaTableParametersI3D +GLAD_API_CALL PFNWGLGETGENLOCKSAMPLERATEI3DPROC glad_wglGetGenlockSampleRateI3D; +#define wglGetGenlockSampleRateI3D glad_wglGetGenlockSampleRateI3D +GLAD_API_CALL PFNWGLGETGENLOCKSOURCEDELAYI3DPROC glad_wglGetGenlockSourceDelayI3D; +#define wglGetGenlockSourceDelayI3D glad_wglGetGenlockSourceDelayI3D +GLAD_API_CALL PFNWGLGETGENLOCKSOURCEEDGEI3DPROC glad_wglGetGenlockSourceEdgeI3D; +#define wglGetGenlockSourceEdgeI3D glad_wglGetGenlockSourceEdgeI3D +GLAD_API_CALL PFNWGLGETGENLOCKSOURCEI3DPROC glad_wglGetGenlockSourceI3D; +#define wglGetGenlockSourceI3D glad_wglGetGenlockSourceI3D +GLAD_API_CALL PFNWGLGETMSCRATEOMLPROC glad_wglGetMscRateOML; +#define wglGetMscRateOML glad_wglGetMscRateOML +GLAD_API_CALL PFNWGLGETPBUFFERDCARBPROC glad_wglGetPbufferDCARB; +#define wglGetPbufferDCARB glad_wglGetPbufferDCARB +GLAD_API_CALL PFNWGLGETPBUFFERDCEXTPROC glad_wglGetPbufferDCEXT; +#define wglGetPbufferDCEXT glad_wglGetPbufferDCEXT +GLAD_API_CALL PFNWGLGETPIXELFORMATATTRIBFVARBPROC glad_wglGetPixelFormatAttribfvARB; +#define wglGetPixelFormatAttribfvARB glad_wglGetPixelFormatAttribfvARB +GLAD_API_CALL PFNWGLGETPIXELFORMATATTRIBFVEXTPROC glad_wglGetPixelFormatAttribfvEXT; +#define wglGetPixelFormatAttribfvEXT glad_wglGetPixelFormatAttribfvEXT +GLAD_API_CALL PFNWGLGETPIXELFORMATATTRIBIVARBPROC glad_wglGetPixelFormatAttribivARB; +#define wglGetPixelFormatAttribivARB glad_wglGetPixelFormatAttribivARB +GLAD_API_CALL PFNWGLGETPIXELFORMATATTRIBIVEXTPROC glad_wglGetPixelFormatAttribivEXT; +#define wglGetPixelFormatAttribivEXT glad_wglGetPixelFormatAttribivEXT +GLAD_API_CALL PFNWGLGETSWAPINTERVALEXTPROC glad_wglGetSwapIntervalEXT; +#define wglGetSwapIntervalEXT glad_wglGetSwapIntervalEXT +GLAD_API_CALL PFNWGLGETSYNCVALUESOMLPROC glad_wglGetSyncValuesOML; +#define wglGetSyncValuesOML glad_wglGetSyncValuesOML +GLAD_API_CALL PFNWGLGETVIDEODEVICENVPROC glad_wglGetVideoDeviceNV; +#define wglGetVideoDeviceNV glad_wglGetVideoDeviceNV +GLAD_API_CALL PFNWGLGETVIDEOINFONVPROC glad_wglGetVideoInfoNV; +#define wglGetVideoInfoNV glad_wglGetVideoInfoNV +GLAD_API_CALL PFNWGLISENABLEDFRAMELOCKI3DPROC glad_wglIsEnabledFrameLockI3D; +#define wglIsEnabledFrameLockI3D glad_wglIsEnabledFrameLockI3D +GLAD_API_CALL PFNWGLISENABLEDGENLOCKI3DPROC glad_wglIsEnabledGenlockI3D; +#define wglIsEnabledGenlockI3D glad_wglIsEnabledGenlockI3D +GLAD_API_CALL PFNWGLJOINSWAPGROUPNVPROC glad_wglJoinSwapGroupNV; +#define wglJoinSwapGroupNV glad_wglJoinSwapGroupNV +GLAD_API_CALL PFNWGLLOADDISPLAYCOLORTABLEEXTPROC glad_wglLoadDisplayColorTableEXT; +#define wglLoadDisplayColorTableEXT glad_wglLoadDisplayColorTableEXT +GLAD_API_CALL PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC glad_wglLockVideoCaptureDeviceNV; +#define wglLockVideoCaptureDeviceNV glad_wglLockVideoCaptureDeviceNV +GLAD_API_CALL PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC glad_wglMakeAssociatedContextCurrentAMD; +#define wglMakeAssociatedContextCurrentAMD glad_wglMakeAssociatedContextCurrentAMD +GLAD_API_CALL PFNWGLMAKECONTEXTCURRENTARBPROC glad_wglMakeContextCurrentARB; +#define wglMakeContextCurrentARB glad_wglMakeContextCurrentARB +GLAD_API_CALL PFNWGLMAKECONTEXTCURRENTEXTPROC glad_wglMakeContextCurrentEXT; +#define wglMakeContextCurrentEXT glad_wglMakeContextCurrentEXT +GLAD_API_CALL PFNWGLQUERYCURRENTCONTEXTNVPROC glad_wglQueryCurrentContextNV; +#define wglQueryCurrentContextNV glad_wglQueryCurrentContextNV +GLAD_API_CALL PFNWGLQUERYFRAMECOUNTNVPROC glad_wglQueryFrameCountNV; +#define wglQueryFrameCountNV glad_wglQueryFrameCountNV +GLAD_API_CALL PFNWGLQUERYFRAMELOCKMASTERI3DPROC glad_wglQueryFrameLockMasterI3D; +#define wglQueryFrameLockMasterI3D glad_wglQueryFrameLockMasterI3D +GLAD_API_CALL PFNWGLQUERYFRAMETRACKINGI3DPROC glad_wglQueryFrameTrackingI3D; +#define wglQueryFrameTrackingI3D glad_wglQueryFrameTrackingI3D +GLAD_API_CALL PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC glad_wglQueryGenlockMaxSourceDelayI3D; +#define wglQueryGenlockMaxSourceDelayI3D glad_wglQueryGenlockMaxSourceDelayI3D +GLAD_API_CALL PFNWGLQUERYMAXSWAPGROUPSNVPROC glad_wglQueryMaxSwapGroupsNV; +#define wglQueryMaxSwapGroupsNV glad_wglQueryMaxSwapGroupsNV +GLAD_API_CALL PFNWGLQUERYPBUFFERARBPROC glad_wglQueryPbufferARB; +#define wglQueryPbufferARB glad_wglQueryPbufferARB +GLAD_API_CALL PFNWGLQUERYPBUFFEREXTPROC glad_wglQueryPbufferEXT; +#define wglQueryPbufferEXT glad_wglQueryPbufferEXT +GLAD_API_CALL PFNWGLQUERYSWAPGROUPNVPROC glad_wglQuerySwapGroupNV; +#define wglQuerySwapGroupNV glad_wglQuerySwapGroupNV +GLAD_API_CALL PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC glad_wglQueryVideoCaptureDeviceNV; +#define wglQueryVideoCaptureDeviceNV glad_wglQueryVideoCaptureDeviceNV +GLAD_API_CALL PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC glad_wglReleaseImageBufferEventsI3D; +#define wglReleaseImageBufferEventsI3D glad_wglReleaseImageBufferEventsI3D +GLAD_API_CALL PFNWGLRELEASEPBUFFERDCARBPROC glad_wglReleasePbufferDCARB; +#define wglReleasePbufferDCARB glad_wglReleasePbufferDCARB +GLAD_API_CALL PFNWGLRELEASEPBUFFERDCEXTPROC glad_wglReleasePbufferDCEXT; +#define wglReleasePbufferDCEXT glad_wglReleasePbufferDCEXT +GLAD_API_CALL PFNWGLRELEASETEXIMAGEARBPROC glad_wglReleaseTexImageARB; +#define wglReleaseTexImageARB glad_wglReleaseTexImageARB +GLAD_API_CALL PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC glad_wglReleaseVideoCaptureDeviceNV; +#define wglReleaseVideoCaptureDeviceNV glad_wglReleaseVideoCaptureDeviceNV +GLAD_API_CALL PFNWGLRELEASEVIDEODEVICENVPROC glad_wglReleaseVideoDeviceNV; +#define wglReleaseVideoDeviceNV glad_wglReleaseVideoDeviceNV +GLAD_API_CALL PFNWGLRELEASEVIDEOIMAGENVPROC glad_wglReleaseVideoImageNV; +#define wglReleaseVideoImageNV glad_wglReleaseVideoImageNV +GLAD_API_CALL PFNWGLRESETFRAMECOUNTNVPROC glad_wglResetFrameCountNV; +#define wglResetFrameCountNV glad_wglResetFrameCountNV +GLAD_API_CALL PFNWGLRESTOREBUFFERREGIONARBPROC glad_wglRestoreBufferRegionARB; +#define wglRestoreBufferRegionARB glad_wglRestoreBufferRegionARB +GLAD_API_CALL PFNWGLSAVEBUFFERREGIONARBPROC glad_wglSaveBufferRegionARB; +#define wglSaveBufferRegionARB glad_wglSaveBufferRegionARB +GLAD_API_CALL PFNWGLSENDPBUFFERTOVIDEONVPROC glad_wglSendPbufferToVideoNV; +#define wglSendPbufferToVideoNV glad_wglSendPbufferToVideoNV +GLAD_API_CALL PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC glad_wglSetDigitalVideoParametersI3D; +#define wglSetDigitalVideoParametersI3D glad_wglSetDigitalVideoParametersI3D +GLAD_API_CALL PFNWGLSETGAMMATABLEI3DPROC glad_wglSetGammaTableI3D; +#define wglSetGammaTableI3D glad_wglSetGammaTableI3D +GLAD_API_CALL PFNWGLSETGAMMATABLEPARAMETERSI3DPROC glad_wglSetGammaTableParametersI3D; +#define wglSetGammaTableParametersI3D glad_wglSetGammaTableParametersI3D +GLAD_API_CALL PFNWGLSETPBUFFERATTRIBARBPROC glad_wglSetPbufferAttribARB; +#define wglSetPbufferAttribARB glad_wglSetPbufferAttribARB +GLAD_API_CALL PFNWGLSETSTEREOEMITTERSTATE3DLPROC glad_wglSetStereoEmitterState3DL; +#define wglSetStereoEmitterState3DL glad_wglSetStereoEmitterState3DL +GLAD_API_CALL PFNWGLSWAPBUFFERSMSCOMLPROC glad_wglSwapBuffersMscOML; +#define wglSwapBuffersMscOML glad_wglSwapBuffersMscOML +GLAD_API_CALL PFNWGLSWAPINTERVALEXTPROC glad_wglSwapIntervalEXT; +#define wglSwapIntervalEXT glad_wglSwapIntervalEXT +GLAD_API_CALL PFNWGLSWAPLAYERBUFFERSMSCOMLPROC glad_wglSwapLayerBuffersMscOML; +#define wglSwapLayerBuffersMscOML glad_wglSwapLayerBuffersMscOML +GLAD_API_CALL PFNWGLWAITFORMSCOMLPROC glad_wglWaitForMscOML; +#define wglWaitForMscOML glad_wglWaitForMscOML +GLAD_API_CALL PFNWGLWAITFORSBCOMLPROC glad_wglWaitForSbcOML; +#define wglWaitForSbcOML glad_wglWaitForSbcOML + +GLAD_API_CALL int gladLoadWGLUserPtr(HDC hdc, GLADuserptrloadfunc load, void *userptr); +GLAD_API_CALL int gladLoadWGL(HDC hdc, GLADloadfunc load); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/StgSharp.Native/sn-src/StgSharpC.c b/StgSharp.Native/sn-src/StgSharpC.c index 55a7c890..3e9a0fe6 100644 --- a/StgSharp.Native/sn-src/StgSharpC.c +++ b/StgSharp.Native/sn-src/StgSharpC.c @@ -1,75 +1,75 @@ -#include "StgSharpC.h" -#include "gl.h" -#include "glfw3.h" -#include -#include - -extern GladGLContext *currentContext; -extern char infolog[512]; - -SSCAPI int SSCDECL glCheckShaderStat(GladGLContext *context, uint64_t shaderHandle, int key, - char **logRef) -{ - int stat = 0; - context->GetShaderiv(shaderHandle, key, &stat); - if (!stat) { - context->GetShaderInfoLog(shaderHandle, 512, NULL, infolog); - } - *logRef = infolog; - return stat; -} - -SSCAPI void SSCDECL initGL(int majorVersion, int minorVersion) -{ - glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, majorVersion); - glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, minorVersion); - glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE); -} - -SSCAPI GLFWglproc SSCDECL loadGlfuncDefault(char const *procName) -{ - void *ret = glfwGetProcAddress(procName); - // printf("%llu\n", (uint64_t)ret); - if (ret == NULL) { - strcpy_s(infolog,30, "Failed to load OpenGL api:"); - for (size_t i = 0; i < sizeof(procName); i++) { - infolog[30 + i] = procName[i]; - } - //printf("%s\n", infolog); - } - return (GLFWglproc)ret; -} - -SSCAPI unsigned int linkShaderProgram(GladGLContext *context, GLuint shaderProgram) -{ - context->LinkProgram(shaderProgram); - - int success; - context->GetProgramiv(shaderProgram, GL_LINK_STATUS, &success); - if (!success) { - context->GetProgramInfoLog(shaderProgram, 512, NULL, infolog); - return 0; - } else { - return shaderProgram; - } -} - -SSCAPI void SSCDECL loadImageData(char const *location, Image *out, imageLoader loader) -{ - if (loader == NULL) { - loader = stbi_load; - } - out->pixelPtr = loader(location, &(out->width), &(out->height), &(out->channel), 0); -} - -SSCAPI void SSCDECL unloadImageData(Image *restrict out) -{ - free(out->pixelPtr); -} - -SSCAPI char *SSCDECL readLog() -{ - infolog[511] = '\0'; - return infolog; -} +#include "StgSharpC.h" +#include "gl.h" +#include "glfw3.h" +#include +#include + +extern GladGLContext *currentContext; +extern char infolog[512]; + +SSCAPI int SSCDECL glCheckShaderStat(GladGLContext *context, uint64_t shaderHandle, int key, + char **logRef) +{ + int stat = 0; + context->GetShaderiv(shaderHandle, key, &stat); + if (!stat) { + context->GetShaderInfoLog(shaderHandle, 512, NULL, infolog); + } + *logRef = infolog; + return stat; +} + +SSCAPI void SSCDECL initGL(int majorVersion, int minorVersion) +{ + glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, majorVersion); + glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, minorVersion); + glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); + glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE); +} + +SSCAPI GLFWglproc SSCDECL loadGlfuncDefault(char const *procName) +{ + void *ret = glfwGetProcAddress(procName); + // printf("%llu\n", (uint64_t)ret); + if (ret == NULL) { + strcpy_s(infolog,30, "Failed to load OpenGL api:"); + for (size_t i = 0; i < sizeof(procName); i++) { + infolog[30 + i] = procName[i]; + } + //printf("%s\n", infolog); + } + return (GLFWglproc)ret; +} + +SSCAPI unsigned int linkShaderProgram(GladGLContext *context, GLuint shaderProgram) +{ + context->LinkProgram(shaderProgram); + + int success; + context->GetProgramiv(shaderProgram, GL_LINK_STATUS, &success); + if (!success) { + context->GetProgramInfoLog(shaderProgram, 512, NULL, infolog); + return 0; + } else { + return shaderProgram; + } +} + +SSCAPI void SSCDECL loadImageData(char const *location, Image *out, imageLoader loader) +{ + if (loader == NULL) { + loader = stbi_load; + } + out->pixelPtr = loader(location, &(out->width), &(out->height), &(out->channel), 0); +} + +SSCAPI void SSCDECL unloadImageData(Image *restrict out) +{ + free(out->pixelPtr); +} + +SSCAPI char *SSCDECL readLog() +{ + infolog[511] = '\0'; + return infolog; +} diff --git a/StgSharp.Native/sn-src/dllmain.c b/StgSharp.Native/sn-src/dllmain.c index 0db4c993..9b6d5754 100644 --- a/StgSharp.Native/sn-src/dllmain.c +++ b/StgSharp.Native/sn-src/dllmain.c @@ -1,47 +1,47 @@ -#include "StgSharpNative.h" -#include "sn_intrinsic.matkernel.h" -#include - -#ifdef _WIN32 - -/* Define and initialize a global zero kernel aligned to 64 bytes for universal ISA usage */ -#ifdef __cplusplus -extern "C" { -#endif -__declspec(align(64)) sn_zero_kernel_u64 SN_ZERO_KERNEL; -#ifdef __cplusplus -} -#endif - -static void init_zero_kernel(void) -{ - for (int c = 0; c < 4; ++c) { - for (int r = 0; r < 4; ++r) { - SN_ZERO_KERNEL.m[r][c] = 0; - } - } -} - -BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) -{ - switch (ul_reason_for_call) { - case DLL_PROCESS_ATTACH: - init_zero_kernel(); - return 1; - case DLL_THREAD_ATTACH: - return 1; - case DLL_THREAD_DETACH: - return 1; - case DLL_PROCESS_DETACH: - return 1; - break; - } - return TRUE; -} -#else -attribute((constructor)) void DllMain() -{ - init_zero_kernel(); -} - -#endif // _WIN32 +#include "StgSharpNative.h" +#include "sn_intrinsic.matkernel.h" +#include + +#ifdef _WIN32 + +/* Define and initialize a global zero kernel aligned to 64 bytes for universal ISA usage */ +#ifdef __cplusplus +extern "C" { +#endif +__declspec(align(64)) sn_zero_kernel_u64 SN_ZERO_KERNEL; +#ifdef __cplusplus +} +#endif + +static void init_zero_kernel(void) +{ + for (int c = 0; c < 4; ++c) { + for (int r = 0; r < 4; ++r) { + SN_ZERO_KERNEL.m[r][c] = 0; + } + } +} + +BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) +{ + switch (ul_reason_for_call) { + case DLL_PROCESS_ATTACH: + init_zero_kernel(); + return 1; + case DLL_THREAD_ATTACH: + return 1; + case DLL_THREAD_DETACH: + return 1; + case DLL_PROCESS_DETACH: + return 1; + break; + } + return TRUE; +} +#else +attribute((constructor)) void DllMain() +{ + init_zero_kernel(); +} + +#endif // _WIN32 diff --git a/StgSharp.Native/sn-src/load_glfw.c b/StgSharp.Native/sn-src/load_glfw.c index ba23626d..02f0ec0b 100644 --- a/StgSharp.Native/sn-src/load_glfw.c +++ b/StgSharp.Native/sn-src/load_glfw.c @@ -1,123 +1,123 @@ -#include "StgSharpNative.h" -#include "glfw_function.h" -#include - -SN_API void SN_DECL load_glfw_functions(GLFWFunctionTable *table) -{ - table->glfwCreateCursor = glfwCreateCursor; - table->glfwCreateStandardCursor = glfwCreateStandardCursor; - table->glfwCreateWindow = glfwCreateWindow; - table->glfwDefaultWindowHints = glfwDefaultWindowHints; - table->glfwDestroyCursor = glfwDestroyCursor; - table->glfwDestroyWindow = glfwDestroyWindow; - table->glfwExtensionSupported = glfwExtensionSupported; - table->glfwFocusWindow = glfwFocusWindow; - table->glfwGetClipboardString = glfwGetClipboardString; - table->glfwGetCurrentContext = glfwGetCurrentContext; - table->glfwGetCursorPos = glfwGetCursorPos; - table->glfwGetError = glfwGetError; - table->glfwGetFrameBufferSize = glfwGetFramebufferSize; - table->glfwGetGamepadName = glfwGetGamepadName; - table->glfwGetGamepadState = glfwGetGamepadState; - table->glfwGetGammaRamp = glfwGetGammaRamp; - table->glfwGetInputMode = glfwGetInputMode; - table->glfwGetJoystickAxes = glfwGetJoystickAxes; - table->glfwGetJoystickButtons = glfwGetJoystickButtons; - table->glfwGetJoystickGUID = glfwGetJoystickGUID; - table->glfwGetJoystickHats = glfwGetJoystickHats; - table->glfwGetJoystickName = glfwGetJoystickName; - table->glfwGetJoystickUserPointer = glfwGetJoystickUserPointer; - table->glfwGetKey = glfwGetKey; - table->glfwGetKeyName = glfwGetKeyName; - table->glfwGetKeyScancode = glfwGetKeyScancode; - table->glfwGetMonitorContentScale = glfwGetMonitorContentScale; - table->glfwGetMonitorName = glfwGetMonitorName; - table->glfwGetMonitorPhysicalSize = glfwGetMonitorPhysicalSize; - table->glfwGetMonitorPos = glfwGetMonitorPos; - table->glfwGetMonitors = glfwGetMonitors; - table->glfwGetMonitorUserPointer = glfwGetMonitorUserPointer; - table->glfwGetMonitorWorkarea = glfwGetMonitorWorkarea; - table->glfwGetMouseButton = glfwGetMouseButton; - table->glfwGetPrimaryMonitor = glfwGetPrimaryMonitor; - table->glfwGetProcAddress = glfwGetProcAddress; - table->glfwGetRequiredInstanceExtensions = glfwGetRequiredInstanceExtensions; - table->glfwGetTime = glfwGetTime; - table->glfwGetTimerFrequency = glfwGetTimerFrequency; - table->glfwGetTimerValue = glfwGetTimerValue; - table->glfwGetVersion = glfwGetVersion; - table->glfwGetVersionString = glfwGetVersionString; - table->glfwGetVideoMode = glfwGetVideoMode; - table->glfwGetVideoModes = glfwGetVideoModes; - table->glfwGetWindowAttrib = glfwGetWindowAttrib; - table->glfwGetWindowContentScale = glfwGetWindowContentScale; - table->glfwGetWindowFrameSize = glfwGetWindowFrameSize; - table->glfwGetWindowMonitor = glfwGetWindowMonitor; - table->glfwGetWindowOpacity = glfwGetWindowOpacity; - table->glfwGetWindowPos = glfwGetWindowPos; - table->glfwGetWindowSize = glfwGetWindowSize; - table->glfwGetWindowUserPointer = glfwGetWindowUserPointer; - table->glfwHideWindow = glfwHideWindow; - table->glfwIconifyWindow = glfwIconifyWindow; - table->glfwInit = glfwInit; - table->glfwInitHint = glfwInitHint; - table->glfwJoystickIsGamePad = glfwJoystickIsGamepad; - table->glfwJoystickPresent = glfwJoystickPresent; - table->glfwMakeContextCurrent = glfwMakeContextCurrent; - table->glfwMaximizeWindow = glfwMaximizeWindow; - table->glfwPollEvents = glfwPollEvents; - table->glfwPostEmptyEvent = glfwPostEmptyEvent; - table->glfwRawMouseMotionSupported = glfwRawMouseMotionSupported; - table->glfwRequestWindowAttention = glfwRequestWindowAttention; - table->glfwRestoreWindow = glfwRestoreWindow; - table->glfwSetCharCallback = glfwSetCharCallback; - table->glfwSetCharModsCallback = glfwSetCharModsCallback; - table->glfwSetClipboardString = glfwSetClipboardString; - table->glfwSetCursor = glfwSetCursor; - table->glfwSetCursorEnterCallback = glfwSetCursorEnterCallback; - table->glfwSetCursorPos = glfwSetCursorPos; - table->glfwSetCursorPosCallback = glfwSetCursorPosCallback; - table->glfwSetDropCallback = glfwSetDropCallback; - table->glfwSetErrorCallback = glfwSetErrorCallback; - table->glfwSetFramebufferSizeCallback = glfwSetFramebufferSizeCallback; - table->glfwSetGamma = glfwSetGamma; - table->glfwSetGammaRamp = glfwSetGammaRamp; - table->glfwSetInputMode = glfwSetInputMode; - table->glfwSetJoystickCallback = glfwSetJoystickCallback; - table->glfwSetJoystickUserPointer = glfwSetJoystickUserPointer; - table->glfwSetKeyCallback = glfwSetKeyCallback; - table->glfwSetMonitorCallback = glfwSetMonitorCallback; - table->glfwSetMonitorUserPointer = glfwSetMonitorUserPointer; - table->glfwSetMouseButtonCallback = glfwSetMouseButtonCallback; - table->glfwSetScrollCallback = glfwSetScrollCallback; - table->glfwSetTime = glfwSetTime; - table->glfwSetWindowAspectRatio = glfwSetWindowAspectRatio; - table->glfwSetWindowAttrib = glfwSetWindowAttrib; - table->glfwSetWindowCloseCallback = glfwSetWindowCloseCallback; - table->glfwSetWindowContentScaleCallback = glfwSetWindowContentScaleCallback; - table->glfwSetWindowFocusCallback = glfwSetWindowFocusCallback; - table->glfwSetWindowIcon = glfwSetWindowIcon; - table->glfwSetWindowIconifyCallback = glfwSetWindowIconifyCallback; - table->glfwSetWindowMaximizeCallback = glfwSetWindowMaximizeCallback; - table->glfwSetWindowMonitor = glfwSetWindowMonitor; - table->glfwSetWindowOpacity = glfwSetWindowOpacity; - table->glfwSetWindowPos = glfwSetWindowPos; - table->glfwSetWindowPosCallback = glfwSetWindowPosCallback; - table->glfwSetWindowRefreshCallback = glfwSetWindowRefreshCallback; - table->glfwSetWindowShouldClose = glfwSetWindowShouldClose; - table->glfwSetWindowSize = glfwSetWindowSize; - table->glfwSetWindowSizeCallback = glfwSetWindowSizeCallback; - table->glfwSetWindowSizeLimits = glfwSetWindowSizeLimits; - table->glfwSetWindowTitle = glfwSetWindowTitle; - table->glfwSetWindowUserPointer = glfwSetWindowUserPointer; - table->glfwShowWindow = glfwShowWindow; - table->glfwSwapBuffers = glfwSwapBuffers; - table->glfwSwapInterval = glfwSwapInterval; - table->glfwTerminate = glfwTerminate; - table->glfwUpdateGamePadMappings = glfwUpdateGamepadMappings; - table->glfwVulkanSupported = glfwVulkanSupported; - table->glfwWaitEvents = glfwWaitEvents; - table->glfwWaitEventsTimeout = glfwWaitEventsTimeout; - table->glfwWindowHint = glfwWindowHint; - table->glfwWindowHintString = glfwWindowHintString; - table->glfwWindowShouldClose = glfwWindowShouldClose; -} +#include "StgSharpNative.h" +#include "glfw_function.h" +#include + +SN_API void SN_DECL load_glfw_functions(GLFWFunctionTable *table) +{ + table->glfwCreateCursor = glfwCreateCursor; + table->glfwCreateStandardCursor = glfwCreateStandardCursor; + table->glfwCreateWindow = glfwCreateWindow; + table->glfwDefaultWindowHints = glfwDefaultWindowHints; + table->glfwDestroyCursor = glfwDestroyCursor; + table->glfwDestroyWindow = glfwDestroyWindow; + table->glfwExtensionSupported = glfwExtensionSupported; + table->glfwFocusWindow = glfwFocusWindow; + table->glfwGetClipboardString = glfwGetClipboardString; + table->glfwGetCurrentContext = glfwGetCurrentContext; + table->glfwGetCursorPos = glfwGetCursorPos; + table->glfwGetError = glfwGetError; + table->glfwGetFrameBufferSize = glfwGetFramebufferSize; + table->glfwGetGamepadName = glfwGetGamepadName; + table->glfwGetGamepadState = glfwGetGamepadState; + table->glfwGetGammaRamp = glfwGetGammaRamp; + table->glfwGetInputMode = glfwGetInputMode; + table->glfwGetJoystickAxes = glfwGetJoystickAxes; + table->glfwGetJoystickButtons = glfwGetJoystickButtons; + table->glfwGetJoystickGUID = glfwGetJoystickGUID; + table->glfwGetJoystickHats = glfwGetJoystickHats; + table->glfwGetJoystickName = glfwGetJoystickName; + table->glfwGetJoystickUserPointer = glfwGetJoystickUserPointer; + table->glfwGetKey = glfwGetKey; + table->glfwGetKeyName = glfwGetKeyName; + table->glfwGetKeyScancode = glfwGetKeyScancode; + table->glfwGetMonitorContentScale = glfwGetMonitorContentScale; + table->glfwGetMonitorName = glfwGetMonitorName; + table->glfwGetMonitorPhysicalSize = glfwGetMonitorPhysicalSize; + table->glfwGetMonitorPos = glfwGetMonitorPos; + table->glfwGetMonitors = glfwGetMonitors; + table->glfwGetMonitorUserPointer = glfwGetMonitorUserPointer; + table->glfwGetMonitorWorkarea = glfwGetMonitorWorkarea; + table->glfwGetMouseButton = glfwGetMouseButton; + table->glfwGetPrimaryMonitor = glfwGetPrimaryMonitor; + table->glfwGetProcAddress = glfwGetProcAddress; + table->glfwGetRequiredInstanceExtensions = glfwGetRequiredInstanceExtensions; + table->glfwGetTime = glfwGetTime; + table->glfwGetTimerFrequency = glfwGetTimerFrequency; + table->glfwGetTimerValue = glfwGetTimerValue; + table->glfwGetVersion = glfwGetVersion; + table->glfwGetVersionString = glfwGetVersionString; + table->glfwGetVideoMode = glfwGetVideoMode; + table->glfwGetVideoModes = glfwGetVideoModes; + table->glfwGetWindowAttrib = glfwGetWindowAttrib; + table->glfwGetWindowContentScale = glfwGetWindowContentScale; + table->glfwGetWindowFrameSize = glfwGetWindowFrameSize; + table->glfwGetWindowMonitor = glfwGetWindowMonitor; + table->glfwGetWindowOpacity = glfwGetWindowOpacity; + table->glfwGetWindowPos = glfwGetWindowPos; + table->glfwGetWindowSize = glfwGetWindowSize; + table->glfwGetWindowUserPointer = glfwGetWindowUserPointer; + table->glfwHideWindow = glfwHideWindow; + table->glfwIconifyWindow = glfwIconifyWindow; + table->glfwInit = glfwInit; + table->glfwInitHint = glfwInitHint; + table->glfwJoystickIsGamePad = glfwJoystickIsGamepad; + table->glfwJoystickPresent = glfwJoystickPresent; + table->glfwMakeContextCurrent = glfwMakeContextCurrent; + table->glfwMaximizeWindow = glfwMaximizeWindow; + table->glfwPollEvents = glfwPollEvents; + table->glfwPostEmptyEvent = glfwPostEmptyEvent; + table->glfwRawMouseMotionSupported = glfwRawMouseMotionSupported; + table->glfwRequestWindowAttention = glfwRequestWindowAttention; + table->glfwRestoreWindow = glfwRestoreWindow; + table->glfwSetCharCallback = glfwSetCharCallback; + table->glfwSetCharModsCallback = glfwSetCharModsCallback; + table->glfwSetClipboardString = glfwSetClipboardString; + table->glfwSetCursor = glfwSetCursor; + table->glfwSetCursorEnterCallback = glfwSetCursorEnterCallback; + table->glfwSetCursorPos = glfwSetCursorPos; + table->glfwSetCursorPosCallback = glfwSetCursorPosCallback; + table->glfwSetDropCallback = glfwSetDropCallback; + table->glfwSetErrorCallback = glfwSetErrorCallback; + table->glfwSetFramebufferSizeCallback = glfwSetFramebufferSizeCallback; + table->glfwSetGamma = glfwSetGamma; + table->glfwSetGammaRamp = glfwSetGammaRamp; + table->glfwSetInputMode = glfwSetInputMode; + table->glfwSetJoystickCallback = glfwSetJoystickCallback; + table->glfwSetJoystickUserPointer = glfwSetJoystickUserPointer; + table->glfwSetKeyCallback = glfwSetKeyCallback; + table->glfwSetMonitorCallback = glfwSetMonitorCallback; + table->glfwSetMonitorUserPointer = glfwSetMonitorUserPointer; + table->glfwSetMouseButtonCallback = glfwSetMouseButtonCallback; + table->glfwSetScrollCallback = glfwSetScrollCallback; + table->glfwSetTime = glfwSetTime; + table->glfwSetWindowAspectRatio = glfwSetWindowAspectRatio; + table->glfwSetWindowAttrib = glfwSetWindowAttrib; + table->glfwSetWindowCloseCallback = glfwSetWindowCloseCallback; + table->glfwSetWindowContentScaleCallback = glfwSetWindowContentScaleCallback; + table->glfwSetWindowFocusCallback = glfwSetWindowFocusCallback; + table->glfwSetWindowIcon = glfwSetWindowIcon; + table->glfwSetWindowIconifyCallback = glfwSetWindowIconifyCallback; + table->glfwSetWindowMaximizeCallback = glfwSetWindowMaximizeCallback; + table->glfwSetWindowMonitor = glfwSetWindowMonitor; + table->glfwSetWindowOpacity = glfwSetWindowOpacity; + table->glfwSetWindowPos = glfwSetWindowPos; + table->glfwSetWindowPosCallback = glfwSetWindowPosCallback; + table->glfwSetWindowRefreshCallback = glfwSetWindowRefreshCallback; + table->glfwSetWindowShouldClose = glfwSetWindowShouldClose; + table->glfwSetWindowSize = glfwSetWindowSize; + table->glfwSetWindowSizeCallback = glfwSetWindowSizeCallback; + table->glfwSetWindowSizeLimits = glfwSetWindowSizeLimits; + table->glfwSetWindowTitle = glfwSetWindowTitle; + table->glfwSetWindowUserPointer = glfwSetWindowUserPointer; + table->glfwShowWindow = glfwShowWindow; + table->glfwSwapBuffers = glfwSwapBuffers; + table->glfwSwapInterval = glfwSwapInterval; + table->glfwTerminate = glfwTerminate; + table->glfwUpdateGamePadMappings = glfwUpdateGamepadMappings; + table->glfwVulkanSupported = glfwVulkanSupported; + table->glfwWaitEvents = glfwWaitEvents; + table->glfwWaitEventsTimeout = glfwWaitEventsTimeout; + table->glfwWindowHint = glfwWindowHint; + table->glfwWindowHintString = glfwWindowHintString; + table->glfwWindowShouldClose = glfwWindowShouldClose; +} diff --git a/StgSharp.Native/sn-src/load_intrinsic.x86.c b/StgSharp.Native/sn-src/load_intrinsic.x86.c index 4a220d7e..ff42dc9c 100644 --- a/StgSharp.Native/sn-src/load_intrinsic.x86.c +++ b/StgSharp.Native/sn-src/load_intrinsic.x86.c @@ -1,127 +1,127 @@ -#include "sn_target.h" - -#if SN_IS_ARCH(SN_ARCH_X86_64) - -#include "StgSharpNative.h" -#include "sn_intrinsic.h" -#include "sn_intrinsic.std.h" -#include "sn_intrinsic.context.x86.h" - -#if defined(_MSC_VER) && !defined(__clang__) -#include -#include -#else -#include -#endif // _MSC_VER - -PRIVATE void load_intrinsic_sse(sn_intrinsic *context, SIMDID id); -PRIVATE void load_intrinsic_avx(sn_intrinsic *context, SIMDID id); -PRIVATE void load_intrinsic_512(sn_intrinsic *context, SIMDID id); - -SN_API void load_intrinsic_function(void *intrinsic_context, uint64_t id) -{ - sn_null_assert(intrinsic_context); - - SIMDID simdid; - if (id) { - simdid.mask = id; - } else { - simdid = sn_get_simd_level_global(); - } - - sn_intrinsic *context = (sn_intrinsic *)intrinsic_context; - - switch (simdid.make_byte[1]) { - case SIMDID_MAIN_LVL_SSE: - load_intrinsic_sse(context, simdid); - break; - case SIMDID_MAIN_LVL_AVX2: - load_intrinsic_avx(context, simdid); - break; - case SIMDID_MAIN_LVL_AVX512: - case SIMDID_MAIN_LVL_AMX: - case SIMDID_MAIN_LVL_AVX10: - load_intrinsic_512(context, simdid); - break; - } -} - -void load_intrinsic_sse(sn_intrinsic *context, SIMDID id) -{ - context->city_hash_simplify = city_hash_simplify_sse; - context->factorial_simd = factorial_simd_sse; - - context->mat_mk[F32].add = MK_PROC_NAME_STD(float, sse, , add); - context->mat_mk[F32].fill = MK_PROC_NAME_STD(float, sse, , fill); - context->mat_mk[F32].scalar_mul = MK_PROC_NAME_STD(float, sse, , scalar_mul); - context->mat_mk[F32].sub = MK_PROC_NAME_STD(float, sse, , sub); - context->mat_mk[F32].transpose = MK_PROC_NAME_STD(float, sse, , transpose); - context->mat_mk[F32].fma = MK_PROC_NAME_STD(float, sse, , fma); - context->mat_mk[F32].pivot = NULL; - - context->mat_mk[F64].add = MK_PROC_NAME_STD(double, sse, , add); - context->mat_mk[F64].fill = MK_PROC_NAME_STD(double, sse, , fill); - context->mat_mk[F64].scalar_mul = MK_PROC_NAME_STD(double, sse, , scalar_mul); - context->mat_mk[F64].sub = MK_PROC_NAME_STD(double, sse, , sub); - context->mat_mk[F64].transpose = NULL; - context->mat_mk[F64].fma = MK_PROC_NAME_STD(double, sse, , fma); - context->mat_mk[F64].pivot = NULL; - - context->vec_f32_normalize_3 = f32_normalize; -} - -void load_intrinsic_avx(sn_intrinsic *context, SIMDID id) -{ - char avx_seg = id.make_byte[5]; - char is_fma = (avx_seg & SIMDID_AVX_FMA) != 0; - char is_f16c = (avx_seg & SIMDID_AVX_F16C) != 0; - - context->city_hash_simplify = city_hash_simplify_sse; - context->factorial_simd = factorial_simd_sse; - - context->mat_mk[F32].add = MK_PROC_NAME_STD(float, avx, , add); - context->mat_mk[F32].fill = MK_PROC_NAME_STD(float, avx, , fill); - context->mat_mk[F32].scalar_mul = MK_PROC_NAME_STD(float, avx, , scalar_mul); - context->mat_mk[F32].sub = MK_PROC_NAME_STD(float, avx, , sub); - context->mat_mk[F32].transpose = MK_PROC_NAME_STD(float, avx, , transpose); - context->mat_mk[F32].fma = is_fma ? MK_PROC_NAME_STD(float, avx, , fma) : - MK_PROC_NAME_STD(float, avx, _fma, fma); - context->mat_mk[F32].pivot = NULL; - - context->mat_mk[F64].add = MK_PROC_NAME_STD(double, avx, , add); - context->mat_mk[F64].fill = MK_PROC_NAME_STD(double, avx, , fill); - context->mat_mk[F64].scalar_mul = MK_PROC_NAME_STD(double, avx, , scalar_mul); - context->mat_mk[F64].sub = MK_PROC_NAME_STD(double, avx, , sub); - context->mat_mk[F64].transpose = NULL; - context->mat_mk[F64].fma = is_fma ? MK_PROC_NAME_STD(double, avx, , fma) : - MK_PROC_NAME_STD(double, avx, _fma, fma); - context->mat_mk[F64].pivot = NULL; - - context->vec_f32_normalize_3 = f32_normalize; -} - -void load_intrinsic_512(sn_intrinsic *context, SIMDID id) -{ - context->city_hash_simplify = city_hash_simplify_sse; - context->factorial_simd = factorial_simd_sse; - - context->mat_mk[F32].add = MK_PROC_NAME_STD(float, 512, , add); - context->mat_mk[F32].fill = MK_PROC_NAME_STD(float, 512, , fill); - context->mat_mk[F32].scalar_mul = MK_PROC_NAME_STD(float, 512, , scalar_mul); - context->mat_mk[F32].sub = MK_PROC_NAME_STD(float, 512, , sub); - context->mat_mk[F32].transpose = MK_PROC_NAME_STD(float, 512, , transpose); - context->mat_mk[F32].fma = MK_PROC_NAME_STD(float, 512, , fma); - context->mat_mk[F32].pivot = NULL; - - context->mat_mk[F64].add = MK_PROC_NAME_STD(double, 512, , add); - context->mat_mk[F64].fill = MK_PROC_NAME_STD(double, 512, , fill); - context->mat_mk[F64].scalar_mul = MK_PROC_NAME_STD(double, 512, , scalar_mul); - context->mat_mk[F64].sub = MK_PROC_NAME_STD(double, 512, , sub); - context->mat_mk[F64].transpose = NULL; - context->mat_mk[F64].fma = MK_PROC_NAME_STD(double, 512, , fma); - context->mat_mk[F64].pivot = NULL; - - context->vec_f32_normalize_3 = f32_normalize; -} - -#endif +#include "sn_target.h" + +#if SN_IS_ARCH(SN_ARCH_X86_64) + +#include "StgSharpNative.h" +#include "sn_intrinsic.h" +#include "sn_intrinsic.std.h" +#include "sn_intrinsic.context.x86.h" + +#if defined(_MSC_VER) && !defined(__clang__) +#include +#include +#else +#include +#endif // _MSC_VER + +PRIVATE void load_intrinsic_sse(sn_intrinsic *context, SIMDID id); +PRIVATE void load_intrinsic_avx(sn_intrinsic *context, SIMDID id); +PRIVATE void load_intrinsic_512(sn_intrinsic *context, SIMDID id); + +SN_API void load_intrinsic_function(void *intrinsic_context, uint64_t id) +{ + sn_null_assert(intrinsic_context); + + SIMDID simdid; + if (id) { + simdid.mask = id; + } else { + simdid = sn_get_simd_level_global(); + } + + sn_intrinsic *context = (sn_intrinsic *)intrinsic_context; + + switch (simdid.make_byte[1]) { + case SIMDID_MAIN_LVL_SSE: + load_intrinsic_sse(context, simdid); + break; + case SIMDID_MAIN_LVL_AVX2: + load_intrinsic_avx(context, simdid); + break; + case SIMDID_MAIN_LVL_AVX512: + case SIMDID_MAIN_LVL_AMX: + case SIMDID_MAIN_LVL_AVX10: + load_intrinsic_512(context, simdid); + break; + } +} + +void load_intrinsic_sse(sn_intrinsic *context, SIMDID id) +{ + context->city_hash_simplify = city_hash_simplify_sse; + context->factorial_simd = factorial_simd_sse; + + context->mat_mk[F32].add = MK_PROC_NAME_STD(float, sse, , add); + context->mat_mk[F32].fill = MK_PROC_NAME_STD(float, sse, , fill); + context->mat_mk[F32].scalar_mul = MK_PROC_NAME_STD(float, sse, , scalar_mul); + context->mat_mk[F32].sub = MK_PROC_NAME_STD(float, sse, , sub); + context->mat_mk[F32].transpose = MK_PROC_NAME_STD(float, sse, , transpose); + context->mat_mk[F32].fma = MK_PROC_NAME_STD(float, sse, , fma); + context->mat_mk[F32].pivot = NULL; + + context->mat_mk[F64].add = MK_PROC_NAME_STD(double, sse, , add); + context->mat_mk[F64].fill = MK_PROC_NAME_STD(double, sse, , fill); + context->mat_mk[F64].scalar_mul = MK_PROC_NAME_STD(double, sse, , scalar_mul); + context->mat_mk[F64].sub = MK_PROC_NAME_STD(double, sse, , sub); + context->mat_mk[F64].transpose = NULL; + context->mat_mk[F64].fma = MK_PROC_NAME_STD(double, sse, , fma); + context->mat_mk[F64].pivot = NULL; + + context->vec_f32_normalize_3 = f32_normalize; +} + +void load_intrinsic_avx(sn_intrinsic *context, SIMDID id) +{ + char avx_seg = id.make_byte[5]; + char is_fma = (avx_seg & SIMDID_AVX_FMA) != 0; + char is_f16c = (avx_seg & SIMDID_AVX_F16C) != 0; + + context->city_hash_simplify = city_hash_simplify_sse; + context->factorial_simd = factorial_simd_sse; + + context->mat_mk[F32].add = MK_PROC_NAME_STD(float, avx, , add); + context->mat_mk[F32].fill = MK_PROC_NAME_STD(float, avx, , fill); + context->mat_mk[F32].scalar_mul = MK_PROC_NAME_STD(float, avx, , scalar_mul); + context->mat_mk[F32].sub = MK_PROC_NAME_STD(float, avx, , sub); + context->mat_mk[F32].transpose = MK_PROC_NAME_STD(float, avx, , transpose); + context->mat_mk[F32].fma = is_fma ? MK_PROC_NAME_STD(float, avx, , fma) : + MK_PROC_NAME_STD(float, avx, _fma, fma); + context->mat_mk[F32].pivot = NULL; + + context->mat_mk[F64].add = MK_PROC_NAME_STD(double, avx, , add); + context->mat_mk[F64].fill = MK_PROC_NAME_STD(double, avx, , fill); + context->mat_mk[F64].scalar_mul = MK_PROC_NAME_STD(double, avx, , scalar_mul); + context->mat_mk[F64].sub = MK_PROC_NAME_STD(double, avx, , sub); + context->mat_mk[F64].transpose = NULL; + context->mat_mk[F64].fma = is_fma ? MK_PROC_NAME_STD(double, avx, , fma) : + MK_PROC_NAME_STD(double, avx, _fma, fma); + context->mat_mk[F64].pivot = NULL; + + context->vec_f32_normalize_3 = f32_normalize; +} + +void load_intrinsic_512(sn_intrinsic *context, SIMDID id) +{ + context->city_hash_simplify = city_hash_simplify_sse; + context->factorial_simd = factorial_simd_sse; + + context->mat_mk[F32].add = MK_PROC_NAME_STD(float, 512, , add); + context->mat_mk[F32].fill = MK_PROC_NAME_STD(float, 512, , fill); + context->mat_mk[F32].scalar_mul = MK_PROC_NAME_STD(float, 512, , scalar_mul); + context->mat_mk[F32].sub = MK_PROC_NAME_STD(float, 512, , sub); + context->mat_mk[F32].transpose = MK_PROC_NAME_STD(float, 512, , transpose); + context->mat_mk[F32].fma = MK_PROC_NAME_STD(float, 512, , fma); + context->mat_mk[F32].pivot = NULL; + + context->mat_mk[F64].add = MK_PROC_NAME_STD(double, 512, , add); + context->mat_mk[F64].fill = MK_PROC_NAME_STD(double, 512, , fill); + context->mat_mk[F64].scalar_mul = MK_PROC_NAME_STD(double, 512, , scalar_mul); + context->mat_mk[F64].sub = MK_PROC_NAME_STD(double, 512, , sub); + context->mat_mk[F64].transpose = NULL; + context->mat_mk[F64].fma = MK_PROC_NAME_STD(double, 512, , fma); + context->mat_mk[F64].pivot = NULL; + + context->vec_f32_normalize_3 = f32_normalize; +} + +#endif diff --git a/StgSharp.Native/sn-src/m.basic.x86.c b/StgSharp.Native/sn-src/m.basic.x86.c index a5ee5c95..2f6e2272 100644 --- a/StgSharp.Native/sn-src/m.basic.x86.c +++ b/StgSharp.Native/sn-src/m.basic.x86.c @@ -1,58 +1,58 @@ -#include "sn_target.h" - -#if SN_IS_ARCH(SN_ARCH_X86_64) - -#include "sn_intrinsic.h" -#include "sn_intrinsic.context.x86.h" -#include "sn_intrinsic.std.h" - -// Matrix transpose implementations -SN_MK_PROC_DECL_STD(float, sse, , transpose) -{ - __mk_param_std(KERNEL, RIGHT_ANS, float); - - register __m128 col0 = right->f32_x[0]; - register __m128 col1 = right->f32_x[1]; - register __m128 col2 = right->f32_x[2]; - register __m128 col3 = right->f32_x[3]; - register __m128 tmp0 = _mm_unpacklo_ps(col0, col1); - register __m128 tmp1 = _mm_unpackhi_ps(col0, col1); - register __m128 tmp2 = _mm_unpacklo_ps(col2, col3); - register __m128 tmp3 = _mm_unpackhi_ps(col2, col3); - - _mm_store_ps(&(ans->f32_x[0]), _mm_movelh_ps(tmp0, tmp2)); - _mm_store_ps(&(ans->f32_x[1]), _mm_movehl_ps(tmp2, tmp0)); - _mm_store_ps(&(ans->f32_x[2]), _mm_movelh_ps(tmp1, tmp3)); - _mm_store_ps(&(ans->f32_x[3]), _mm_movehl_ps(tmp3, tmp1)); -} - -SN_MK_PROC_DECL_STD(float, avx, , transpose) -{ - __mk_param_std(KERNEL, RIGHT_ANS, float); - register __m256 col_low = right->f32_y[0]; - register __m256 col_high = right->f32_y[1]; - - register __m256 unpack_low = _mm256_unpacklo_ps(col_low, col_high); - register __m256 unpack_high = _mm256_unpackhi_ps(col_low, col_high); - - col_low = _mm256_permute2f128_ps(unpack_low, unpack_high, 0x20); - col_high = _mm256_permute2f128_ps(unpack_low, unpack_high, 0x31); - - _mm256_store_ps(&(ans->f32_y[0]), - _mm256_shuffle_ps(col_high, col_low, _MM_SHUFFLE(2, 0, 2, 0))); - _mm256_store_ps(&(ans->f32_y[1]), - _mm256_shuffle_ps(col_high, col_low, _MM_SHUFFLE(3, 1, 3, 1))); -} - -SN_MK_PROC_DECL_STD(float, 512, , transpose) -{ - __mk_param_std(KERNEL, RIGHT_ANS, float); - register __m512 matrix = right->f32_z[0]; - - const __m512i transpose_indices = - _mm512_setr_epi32(0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15); - - _mm512_store_ps(&(ans->f32_z[0]), _mm512_permutexvar_ps(transpose_indices, matrix)); -} - -#endif +#include "sn_target.h" + +#if SN_IS_ARCH(SN_ARCH_X86_64) + +#include "sn_intrinsic.h" +#include "sn_intrinsic.context.x86.h" +#include "sn_intrinsic.std.h" + +// Matrix transpose implementations +SN_MK_PROC_DECL_STD(float, sse, , transpose) +{ + __mk_param_std(KERNEL, RIGHT_ANS, float); + + register __m128 col0 = right->f32_x[0]; + register __m128 col1 = right->f32_x[1]; + register __m128 col2 = right->f32_x[2]; + register __m128 col3 = right->f32_x[3]; + register __m128 tmp0 = _mm_unpacklo_ps(col0, col1); + register __m128 tmp1 = _mm_unpackhi_ps(col0, col1); + register __m128 tmp2 = _mm_unpacklo_ps(col2, col3); + register __m128 tmp3 = _mm_unpackhi_ps(col2, col3); + + _mm_store_ps(&(ans->f32_x[0]), _mm_movelh_ps(tmp0, tmp2)); + _mm_store_ps(&(ans->f32_x[1]), _mm_movehl_ps(tmp2, tmp0)); + _mm_store_ps(&(ans->f32_x[2]), _mm_movelh_ps(tmp1, tmp3)); + _mm_store_ps(&(ans->f32_x[3]), _mm_movehl_ps(tmp3, tmp1)); +} + +SN_MK_PROC_DECL_STD(float, avx, , transpose) +{ + __mk_param_std(KERNEL, RIGHT_ANS, float); + register __m256 col_low = right->f32_y[0]; + register __m256 col_high = right->f32_y[1]; + + register __m256 unpack_low = _mm256_unpacklo_ps(col_low, col_high); + register __m256 unpack_high = _mm256_unpackhi_ps(col_low, col_high); + + col_low = _mm256_permute2f128_ps(unpack_low, unpack_high, 0x20); + col_high = _mm256_permute2f128_ps(unpack_low, unpack_high, 0x31); + + _mm256_store_ps(&(ans->f32_y[0]), + _mm256_shuffle_ps(col_high, col_low, _MM_SHUFFLE(2, 0, 2, 0))); + _mm256_store_ps(&(ans->f32_y[1]), + _mm256_shuffle_ps(col_high, col_low, _MM_SHUFFLE(3, 1, 3, 1))); +} + +SN_MK_PROC_DECL_STD(float, 512, , transpose) +{ + __mk_param_std(KERNEL, RIGHT_ANS, float); + register __m512 matrix = right->f32_z[0]; + + const __m512i transpose_indices = + _mm512_setr_epi32(0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15); + + _mm512_store_ps(&(ans->f32_z[0]), _mm512_permutexvar_ps(transpose_indices, matrix)); +} + +#endif diff --git a/StgSharp.Native/sn-src/m.bufop.x86.c b/StgSharp.Native/sn-src/m.bufop.x86.c index 95958fe0..34b8f3c9 100644 --- a/StgSharp.Native/sn-src/m.bufop.x86.c +++ b/StgSharp.Native/sn-src/m.bufop.x86.c @@ -1,367 +1,367 @@ -#include "sn_target.h" - -#if SN_IS_ARCH(SN_ARCH_X86_64) - -#include "sn_intrinsic.h" -#include "sn_intrinsic.std.h" -#include "sn_intrinsic.context.x86.h" - -SN_MK_PROC_DECL_STD(float, sse, , fill) -{ - __mk_param_std(BUFFER, ANS_SCALAR, float); - register __m128 vec = _mm_set_ps1(((float *)(scalar->data))[0]); - for (size_t i = 0; i < count; i++) { - ans[i].f32_x[0] = vec; - ans[i].f32_x[1] = vec; - ans[i].f32_x[2] = vec; - ans[i].f32_x[3] = vec; - } -} - -SN_MK_PROC_DECL_STD(float, avx, , fill) -{ - __mk_param_std(BUFFER, ANS_SCALAR, float); - register __m256 vec = _mm256_broadcast_ss(((float *)(scalar->data))); - for (size_t i = 0; i < count; i++) { - ans[i].f32_y[0] = vec; - ans[i].f32_y[1] = vec; - } -} - -SN_MK_PROC_DECL_STD(float, 512, , fill) -{ - __mk_param_std(BUFFER, ANS_SCALAR, float); - register __m512 vec = _mm512_broadcastss_ps(((__m128 *)(scalar->data))[0]); - for (size_t i = 0; i < count; i++) { - ans[i].f32_z[0] = vec; - } -} - -SN_MK_PROC_DECL_STD(double, sse, , fill) -{ - __mk_param_std(BUFFER, ANS_SCALAR, double); - register __m128d vec = _mm_set1_pd(((double *)(scalar->data))[0]); - for (size_t i = 0; i < count; i++) { - ans[i].f64_x[0] = vec; - ans[i].f64_x[1] = vec; - ans[i].f64_x[2] = vec; - ans[i].f64_x[3] = vec; - ans[i].f64_x[4] = vec; - ans[i].f64_x[5] = vec; - ans[i].f64_x[6] = vec; - ans[i].f64_x[7] = vec; - } -} - -SN_MK_PROC_DECL_STD(double, avx, , fill) -{ - __mk_param_std(BUFFER, ANS_SCALAR, double); - register __m256d vec = _mm256_broadcast_sd(((double *)(scalar->data))); - for (size_t i = 0; i < count; i++) { - ans[i].f64_y[0] = vec; - ans[i].f64_y[1] = vec; - ans[i].f64_y[2] = vec; - ans[i].f64_y[3] = vec; - } -} - -SN_MK_PROC_DECL_STD(double, 512, , fill) -{ - __mk_param_std(BUFFER, ANS_SCALAR, double); - register __m512d vec = _mm512_broadcastsd_pd(_mm_loadu_pd(scalar)); - for (size_t i = 0; i < count; i++) { - ans[i].f64_z[0] = vec; - ans[i].f64_z[1] = vec; - } -} - -SN_MK_PROC_DECL_STD(float, sse, , add) -{ - __mk_param_std(BUFFER, LEFT_RIGHT_ANS, float); - - for (size_t i = 0; i < count; i++) { - register __m128 c0 = _mm_add_ps(left[i].f32_x[0], right[i].f32_x[0]); - register __m128 c1 = _mm_add_ps(left[i].f32_x[1], right[i].f32_x[1]); - register __m128 c2 = _mm_add_ps(left[i].f32_x[2], right[i].f32_x[2]); - register __m128 c3 = _mm_add_ps(left[i].f32_x[3], right[i].f32_x[3]); - - ans[i].f32_x[0] = c0; - ans[i].f32_x[1] = c1; - ans[i].f32_x[2] = c2; - ans[i].f32_x[3] = c3; - } -} - -SN_MK_PROC_DECL_STD(float, avx, , add) -{ - __mk_param_std(BUFFER, LEFT_RIGHT_ANS, float); - - for (size_t i = 0; i < count; i++) { - size_t s = sizeof(MAT_KERNEL(float)); - register __m256 c0 = _mm256_add_ps(left[i].f32_y[0], right[i].f32_y[0]); - register __m256 c1 = _mm256_add_ps(left[i].f32_y[1], right[i].f32_y[1]); - ans[i].f32_y[0] = c0; - ans[i].f32_y[1] = c1; - } -} - -SN_MK_PROC_DECL_STD(float, 512, , add) -{ - __mk_param_std(BUFFER, LEFT_RIGHT_ANS, float); - - for (size_t i = 0; i < count; i++) { - register __m512 c0 = _mm512_add_ps(left[i].f32_z[0], right[i].f32_z[0]); - ans[i].f32_z[0] = c0; - } -} -SN_MK_PROC_DECL_STD(double, sse, , add) -{ - __mk_param_std(BUFFER, LEFT_RIGHT_ANS, double); - - for (size_t i = 0; i < count; i++) { - register __m128d c0 = _mm_add_pd(_mm_castps_pd(left[i].f32_x[0]), - _mm_castps_pd(right[i].f32_x[0])); - register __m128d c1 = _mm_add_pd(_mm_castps_pd(left[i].f32_x[1]), - _mm_castps_pd(right[i].f32_x[1])); - register __m128d c2 = _mm_add_pd(_mm_castps_pd(left[i].f32_x[2]), - _mm_castps_pd(right[i].f32_x[2])); - register __m128d c3 = _mm_add_pd(_mm_castps_pd(left[i].f32_x[3]), - _mm_castps_pd(right[i].f32_x[3])); - register __m128d c4 = _mm_add_pd(_mm_castps_pd(left[i].f32_x[4]), - _mm_castps_pd(right[i].f32_x[4])); - register __m128d c5 = _mm_add_pd(_mm_castps_pd(left[i].f32_x[5]), - _mm_castps_pd(right[i].f32_x[5])); - register __m128d c6 = _mm_add_pd(_mm_castps_pd(left[i].f32_x[6]), - _mm_castps_pd(right[i].f32_x[6])); - register __m128d c7 = _mm_add_pd(_mm_castps_pd(left[i].f32_x[7]), - _mm_castps_pd(right[i].f32_x[7])); - - ans[i].f32_x[0] = _mm_castpd_ps(c0); - ans[i].f32_x[1] = _mm_castpd_ps(c1); - ans[i].f32_x[2] = _mm_castpd_ps(c2); - ans[i].f32_x[3] = _mm_castpd_ps(c3); - ans[i].f32_x[4] = _mm_castpd_ps(c4); - ans[i].f32_x[5] = _mm_castpd_ps(c5); - ans[i].f32_x[6] = _mm_castpd_ps(c6); - ans[i].f32_x[7] = _mm_castpd_ps(c7); - } -} - -SN_MK_PROC_DECL_STD(double, avx, , add) -{ - __mk_param_std(BUFFER, LEFT_RIGHT_ANS, double); - - for (size_t i = 0; i < count; i++) { - size_t s = sizeof(MAT_KERNEL(float)); - register __m256d c0 = _mm256_add_pd(left[i].f64_y[0], right[i].f64_y[0]); - register __m256d c1 = _mm256_add_pd(left[i].f64_y[1], right[i].f64_y[1]); - register __m256d c2 = _mm256_add_pd(left[i].f64_y[0], right[i].f64_y[0]); - register __m256d c3 = _mm256_add_pd(left[i].f64_y[1], right[i].f64_y[1]); - ans[i].f64_y[0] = c0; - ans[i].f64_y[1] = c1; - ans[i].f64_y[2] = c2; - ans[i].f64_y[3] = c3; - } -} - -SN_MK_PROC_DECL_STD(double, 512, , add) -{ - __mk_param_std(BUFFER, LEFT_RIGHT_ANS, double); - - for (size_t i = 0; i < count; i++) { - register __m512d c0 = _mm512_add_pd(left[i].f64_z[0], right[i].f64_z[0]); - register __m512d c1 = _mm512_add_pd(left[i].f64_z[1], right[i].f64_z[1]); - ans[i].f64_z[0] = c0; - ans[i].f64_z[1] = c1; - } -} - -SN_MK_PROC_DECL_STD(float, sse, , sub) -{ - __mk_param_std(BUFFER, LEFT_RIGHT_ANS, float); - - for (size_t i = 0; i < count; i++) { - register __m128 c0 = _mm_sub_ps(left[i].f32_x[0], right[i].f32_x[0]); - register __m128 c1 = _mm_sub_ps(left[i].f32_x[1], right[i].f32_x[1]); - register __m128 c2 = _mm_sub_ps(left[i].f32_x[2], right[i].f32_x[2]); - register __m128 c3 = _mm_sub_ps(left[i].f32_x[3], right[i].f32_x[3]); - - ans[i].f32_x[0] = c0; - ans[i].f32_x[1] = c1; - ans[i].f32_x[2] = c2; - ans[i].f32_x[3] = c3; - } -} - -SN_MK_PROC_DECL_STD(float, avx, , sub) -{ - __mk_param_std(BUFFER, LEFT_RIGHT_ANS, float); - - for (size_t i = 0; i < count; i++) { - register __m256 c0 = _mm256_sub_ps(left[i].f32_y[0], right[i].f32_y[0]); - register __m256 c1 = _mm256_sub_ps(left[i].f32_y[1], right[i].f32_y[1]); - ans[i].f32_y[0] = c0; - ans[i].f32_y[1] = c1; - } -} - -SN_MK_PROC_DECL_STD(float, 512, , sub) -{ - __mk_param_std(BUFFER, LEFT_RIGHT_ANS, float); - - for (size_t i = 0; i < count; i++) { - register __m512 c0 = _mm512_sub_ps(left[i].f32_z[0], right[i].f32_z[0]); - ans[i].f32_z[0] = c0; - } -} - -SN_MK_PROC_DECL_STD(double, sse, , sub) -{ - __mk_param_std(BUFFER, LEFT_RIGHT_ANS, double); - - for (size_t i = 0; i < count; i++) { - register __m128d c0 = _mm_sub_pd(left[i].f64_x[0], right[i].f64_x[0]); - register __m128d c1 = _mm_sub_pd(left[i].f64_x[1], right[i].f64_x[1]); - register __m128d c2 = _mm_sub_pd(left[i].f64_x[2], right[i].f64_x[2]); - register __m128d c3 = _mm_sub_pd(left[i].f64_x[3], right[i].f64_x[3]); - register __m128d c4 = _mm_sub_pd(left[i].f64_x[4], right[i].f64_x[4]); - register __m128d c5 = _mm_sub_pd(left[i].f64_x[5], right[i].f64_x[5]); - register __m128d c6 = _mm_sub_pd(left[i].f64_x[6], right[i].f64_x[6]); - register __m128d c7 = _mm_sub_pd(left[i].f64_x[7], right[i].f64_x[7]); - - ans[i].f64_x[0] = c0; - ans[i].f64_x[1] = c1; - ans[i].f64_x[2] = c2; - ans[i].f64_x[3] = c3; - ans[i].f64_x[4] = c4; - ans[i].f64_x[5] = c5; - ans[i].f64_x[6] = c6; - ans[i].f64_x[7] = c7; - } -} - -SN_MK_PROC_DECL_STD(double, avx, , sub) -{ - __mk_param_std(BUFFER, LEFT_RIGHT_ANS, double); - - for (size_t i = 0; i < count; i++) { - register __m256 c0 = _mm256_sub_ps(left[i].f32_y[0], right[i].f32_y[0]); - register __m256 c1 = _mm256_sub_ps(left[i].f32_y[1], right[i].f32_y[1]); - ans[i].f32_y[0] = c0; - ans[i].f32_y[1] = c1; - } -} - -SN_MK_PROC_DECL_STD(double, 512, , sub) -{ - __mk_param_std(BUFFER, LEFT_RIGHT_ANS, double); - - for (size_t i = 0; i < count; i++) { - register __m512 c0 = _mm512_sub_ps(left[i].f32_z[0], right[i].f32_z[0]); - ans[i].f32_z[0] = c0; - } -} - -SN_MK_PROC_DECL_STD(float, sse, , scalar_mul) -{ - __mk_param_std(BUFFER, RIGHT_ANS_SCALAR, float); - - register __m128 vec = _mm_set_ps1(((float *)(scalar->data))[0]); - for (size_t i = 0; i < count; i++) { - register __m128 c0 = _mm_mul_ps(right[i].f32_x[0], vec); - register __m128 c1 = _mm_mul_ps(right[i].f32_x[1], vec); - register __m128 c2 = _mm_mul_ps(right[i].f32_x[2], vec); - register __m128 c3 = _mm_mul_ps(right[i].f32_x[3], vec); - - ans[i].f32_x[0] = c0; - ans[i].f32_x[1] = c1; - ans[i].f32_x[2] = c2; - ans[i].f32_x[3] = c3; - } -} - -SN_MK_PROC_DECL_STD(float, avx, , scalar_mul) -{ - __mk_param_std(BUFFER, RIGHT_ANS_SCALAR, float); - - register __m256 vec = _mm256_broadcast_ss(((float *)(scalar->data))); - for (size_t i = 0; i < count; i++) { - register __m256 c0 = _mm256_mul_ps(right[i].f32_y[0], vec); - register __m256 c1 = _mm256_mul_ps(right[i].f32_y[1], vec); - - ans[i].f32_y[0] = c0; - ans[i].f32_y[1] = c1; - } -} - -SN_MK_PROC_DECL_STD(float, 512, , scalar_mul) -{ - __mk_param_std(BUFFER, RIGHT_ANS_SCALAR, float); - - register __m512 vec = _mm512_broadcastss_ps(((__m128 *)(scalar->data))[0]); - for (size_t i = 0; i < count; i++) { - register __m512 c0 = _mm512_mul_ps(right[i].f32_z[0], vec); - - ans[i].f32_z[0] = c0; - } -} - -SN_MK_PROC_DECL_STD(double, sse, , scalar_mul) -{ - __mk_param_std(BUFFER, RIGHT_ANS_SCALAR, double); - - register __m128d vec = _mm_set1_pd(((double *)(scalar->data))[0]); - for (size_t i = 0; i < count; i++) { - register __m128d c0 = _mm_mul_pd(right[i].f64_x[0], vec); - register __m128d c1 = _mm_mul_pd(right[i].f64_x[1], vec); - register __m128d c2 = _mm_mul_pd(right[i].f64_x[2], vec); - register __m128d c3 = _mm_mul_pd(right[i].f64_x[3], vec); - register __m128d c4 = _mm_mul_pd(right[i].f64_x[4], vec); - register __m128d c5 = _mm_mul_pd(right[i].f64_x[5], vec); - register __m128d c6 = _mm_mul_pd(right[i].f64_x[6], vec); - register __m128d c7 = _mm_mul_pd(right[i].f64_x[7], vec); - - ans[i].f64_x[0] = c0; - ans[i].f64_x[1] = c1; - ans[i].f64_x[2] = c2; - ans[i].f64_x[3] = c3; - ans[i].f64_x[4] = c4; - ans[i].f64_x[5] = c5; - ans[i].f64_x[6] = c6; - ans[i].f64_x[7] = c7; - } -} - -SN_MK_PROC_DECL_STD(double, avx, , scalar_mul) -{ - __mk_param_std(BUFFER, RIGHT_ANS_SCALAR, double); - - register __m256d vec = _mm256_broadcast_sd(((double *)(scalar->data))); - for (size_t i = 0; i < count; i++) { - register __m256d c0 = _mm256_mul_pd(right[i].f64_y[0], vec); - register __m256d c1 = _mm256_mul_pd(right[i].f64_y[1], vec); - register __m256d c2 = _mm256_mul_pd(right[i].f64_y[2], vec); - register __m256d c3 = _mm256_mul_pd(right[i].f64_y[3], vec); - - ans[i].f64_y[0] = c0; - ans[i].f64_y[1] = c1; - ans[i].f64_y[2] = c2; - ans[i].f64_y[3] = c3; - } -} - -SN_MK_PROC_DECL_STD(double, 512, , scalar_mul) -{ - __mk_param_std(BUFFER, RIGHT_ANS_SCALAR, double); - - register __m512d vec = _mm512_broadcastsd_pd(_mm_load_pd(scalar)); - for (size_t i = 0; i < count; i++) { - register __m512d c0 = _mm512_mul_pd(right[i].f64_z[0], vec); - register __m512d c1 = _mm512_mul_pd(right[i].f64_z[1], vec); - - ans[i].f64_z[0] = c0; - ans[i].f64_z[1] = c1; - } -} - -#endif +#include "sn_target.h" + +#if SN_IS_ARCH(SN_ARCH_X86_64) + +#include "sn_intrinsic.h" +#include "sn_intrinsic.std.h" +#include "sn_intrinsic.context.x86.h" + +SN_MK_PROC_DECL_STD(float, sse, , fill) +{ + __mk_param_std(BUFFER, ANS_SCALAR, float); + register __m128 vec = _mm_set_ps1(((float *)(scalar->data))[0]); + for (size_t i = 0; i < count; i++) { + ans[i].f32_x[0] = vec; + ans[i].f32_x[1] = vec; + ans[i].f32_x[2] = vec; + ans[i].f32_x[3] = vec; + } +} + +SN_MK_PROC_DECL_STD(float, avx, , fill) +{ + __mk_param_std(BUFFER, ANS_SCALAR, float); + register __m256 vec = _mm256_broadcast_ss(((float *)(scalar->data))); + for (size_t i = 0; i < count; i++) { + ans[i].f32_y[0] = vec; + ans[i].f32_y[1] = vec; + } +} + +SN_MK_PROC_DECL_STD(float, 512, , fill) +{ + __mk_param_std(BUFFER, ANS_SCALAR, float); + register __m512 vec = _mm512_broadcastss_ps(((__m128 *)(scalar->data))[0]); + for (size_t i = 0; i < count; i++) { + ans[i].f32_z[0] = vec; + } +} + +SN_MK_PROC_DECL_STD(double, sse, , fill) +{ + __mk_param_std(BUFFER, ANS_SCALAR, double); + register __m128d vec = _mm_set1_pd(((double *)(scalar->data))[0]); + for (size_t i = 0; i < count; i++) { + ans[i].f64_x[0] = vec; + ans[i].f64_x[1] = vec; + ans[i].f64_x[2] = vec; + ans[i].f64_x[3] = vec; + ans[i].f64_x[4] = vec; + ans[i].f64_x[5] = vec; + ans[i].f64_x[6] = vec; + ans[i].f64_x[7] = vec; + } +} + +SN_MK_PROC_DECL_STD(double, avx, , fill) +{ + __mk_param_std(BUFFER, ANS_SCALAR, double); + register __m256d vec = _mm256_broadcast_sd(((double *)(scalar->data))); + for (size_t i = 0; i < count; i++) { + ans[i].f64_y[0] = vec; + ans[i].f64_y[1] = vec; + ans[i].f64_y[2] = vec; + ans[i].f64_y[3] = vec; + } +} + +SN_MK_PROC_DECL_STD(double, 512, , fill) +{ + __mk_param_std(BUFFER, ANS_SCALAR, double); + register __m512d vec = _mm512_broadcastsd_pd(_mm_loadu_pd(scalar)); + for (size_t i = 0; i < count; i++) { + ans[i].f64_z[0] = vec; + ans[i].f64_z[1] = vec; + } +} + +SN_MK_PROC_DECL_STD(float, sse, , add) +{ + __mk_param_std(BUFFER, LEFT_RIGHT_ANS, float); + + for (size_t i = 0; i < count; i++) { + register __m128 c0 = _mm_add_ps(left[i].f32_x[0], right[i].f32_x[0]); + register __m128 c1 = _mm_add_ps(left[i].f32_x[1], right[i].f32_x[1]); + register __m128 c2 = _mm_add_ps(left[i].f32_x[2], right[i].f32_x[2]); + register __m128 c3 = _mm_add_ps(left[i].f32_x[3], right[i].f32_x[3]); + + ans[i].f32_x[0] = c0; + ans[i].f32_x[1] = c1; + ans[i].f32_x[2] = c2; + ans[i].f32_x[3] = c3; + } +} + +SN_MK_PROC_DECL_STD(float, avx, , add) +{ + __mk_param_std(BUFFER, LEFT_RIGHT_ANS, float); + + for (size_t i = 0; i < count; i++) { + size_t s = sizeof(MAT_KERNEL(float)); + register __m256 c0 = _mm256_add_ps(left[i].f32_y[0], right[i].f32_y[0]); + register __m256 c1 = _mm256_add_ps(left[i].f32_y[1], right[i].f32_y[1]); + ans[i].f32_y[0] = c0; + ans[i].f32_y[1] = c1; + } +} + +SN_MK_PROC_DECL_STD(float, 512, , add) +{ + __mk_param_std(BUFFER, LEFT_RIGHT_ANS, float); + + for (size_t i = 0; i < count; i++) { + register __m512 c0 = _mm512_add_ps(left[i].f32_z[0], right[i].f32_z[0]); + ans[i].f32_z[0] = c0; + } +} +SN_MK_PROC_DECL_STD(double, sse, , add) +{ + __mk_param_std(BUFFER, LEFT_RIGHT_ANS, double); + + for (size_t i = 0; i < count; i++) { + register __m128d c0 = _mm_add_pd(_mm_castps_pd(left[i].f32_x[0]), + _mm_castps_pd(right[i].f32_x[0])); + register __m128d c1 = _mm_add_pd(_mm_castps_pd(left[i].f32_x[1]), + _mm_castps_pd(right[i].f32_x[1])); + register __m128d c2 = _mm_add_pd(_mm_castps_pd(left[i].f32_x[2]), + _mm_castps_pd(right[i].f32_x[2])); + register __m128d c3 = _mm_add_pd(_mm_castps_pd(left[i].f32_x[3]), + _mm_castps_pd(right[i].f32_x[3])); + register __m128d c4 = _mm_add_pd(_mm_castps_pd(left[i].f32_x[4]), + _mm_castps_pd(right[i].f32_x[4])); + register __m128d c5 = _mm_add_pd(_mm_castps_pd(left[i].f32_x[5]), + _mm_castps_pd(right[i].f32_x[5])); + register __m128d c6 = _mm_add_pd(_mm_castps_pd(left[i].f32_x[6]), + _mm_castps_pd(right[i].f32_x[6])); + register __m128d c7 = _mm_add_pd(_mm_castps_pd(left[i].f32_x[7]), + _mm_castps_pd(right[i].f32_x[7])); + + ans[i].f32_x[0] = _mm_castpd_ps(c0); + ans[i].f32_x[1] = _mm_castpd_ps(c1); + ans[i].f32_x[2] = _mm_castpd_ps(c2); + ans[i].f32_x[3] = _mm_castpd_ps(c3); + ans[i].f32_x[4] = _mm_castpd_ps(c4); + ans[i].f32_x[5] = _mm_castpd_ps(c5); + ans[i].f32_x[6] = _mm_castpd_ps(c6); + ans[i].f32_x[7] = _mm_castpd_ps(c7); + } +} + +SN_MK_PROC_DECL_STD(double, avx, , add) +{ + __mk_param_std(BUFFER, LEFT_RIGHT_ANS, double); + + for (size_t i = 0; i < count; i++) { + size_t s = sizeof(MAT_KERNEL(float)); + register __m256d c0 = _mm256_add_pd(left[i].f64_y[0], right[i].f64_y[0]); + register __m256d c1 = _mm256_add_pd(left[i].f64_y[1], right[i].f64_y[1]); + register __m256d c2 = _mm256_add_pd(left[i].f64_y[0], right[i].f64_y[0]); + register __m256d c3 = _mm256_add_pd(left[i].f64_y[1], right[i].f64_y[1]); + ans[i].f64_y[0] = c0; + ans[i].f64_y[1] = c1; + ans[i].f64_y[2] = c2; + ans[i].f64_y[3] = c3; + } +} + +SN_MK_PROC_DECL_STD(double, 512, , add) +{ + __mk_param_std(BUFFER, LEFT_RIGHT_ANS, double); + + for (size_t i = 0; i < count; i++) { + register __m512d c0 = _mm512_add_pd(left[i].f64_z[0], right[i].f64_z[0]); + register __m512d c1 = _mm512_add_pd(left[i].f64_z[1], right[i].f64_z[1]); + ans[i].f64_z[0] = c0; + ans[i].f64_z[1] = c1; + } +} + +SN_MK_PROC_DECL_STD(float, sse, , sub) +{ + __mk_param_std(BUFFER, LEFT_RIGHT_ANS, float); + + for (size_t i = 0; i < count; i++) { + register __m128 c0 = _mm_sub_ps(left[i].f32_x[0], right[i].f32_x[0]); + register __m128 c1 = _mm_sub_ps(left[i].f32_x[1], right[i].f32_x[1]); + register __m128 c2 = _mm_sub_ps(left[i].f32_x[2], right[i].f32_x[2]); + register __m128 c3 = _mm_sub_ps(left[i].f32_x[3], right[i].f32_x[3]); + + ans[i].f32_x[0] = c0; + ans[i].f32_x[1] = c1; + ans[i].f32_x[2] = c2; + ans[i].f32_x[3] = c3; + } +} + +SN_MK_PROC_DECL_STD(float, avx, , sub) +{ + __mk_param_std(BUFFER, LEFT_RIGHT_ANS, float); + + for (size_t i = 0; i < count; i++) { + register __m256 c0 = _mm256_sub_ps(left[i].f32_y[0], right[i].f32_y[0]); + register __m256 c1 = _mm256_sub_ps(left[i].f32_y[1], right[i].f32_y[1]); + ans[i].f32_y[0] = c0; + ans[i].f32_y[1] = c1; + } +} + +SN_MK_PROC_DECL_STD(float, 512, , sub) +{ + __mk_param_std(BUFFER, LEFT_RIGHT_ANS, float); + + for (size_t i = 0; i < count; i++) { + register __m512 c0 = _mm512_sub_ps(left[i].f32_z[0], right[i].f32_z[0]); + ans[i].f32_z[0] = c0; + } +} + +SN_MK_PROC_DECL_STD(double, sse, , sub) +{ + __mk_param_std(BUFFER, LEFT_RIGHT_ANS, double); + + for (size_t i = 0; i < count; i++) { + register __m128d c0 = _mm_sub_pd(left[i].f64_x[0], right[i].f64_x[0]); + register __m128d c1 = _mm_sub_pd(left[i].f64_x[1], right[i].f64_x[1]); + register __m128d c2 = _mm_sub_pd(left[i].f64_x[2], right[i].f64_x[2]); + register __m128d c3 = _mm_sub_pd(left[i].f64_x[3], right[i].f64_x[3]); + register __m128d c4 = _mm_sub_pd(left[i].f64_x[4], right[i].f64_x[4]); + register __m128d c5 = _mm_sub_pd(left[i].f64_x[5], right[i].f64_x[5]); + register __m128d c6 = _mm_sub_pd(left[i].f64_x[6], right[i].f64_x[6]); + register __m128d c7 = _mm_sub_pd(left[i].f64_x[7], right[i].f64_x[7]); + + ans[i].f64_x[0] = c0; + ans[i].f64_x[1] = c1; + ans[i].f64_x[2] = c2; + ans[i].f64_x[3] = c3; + ans[i].f64_x[4] = c4; + ans[i].f64_x[5] = c5; + ans[i].f64_x[6] = c6; + ans[i].f64_x[7] = c7; + } +} + +SN_MK_PROC_DECL_STD(double, avx, , sub) +{ + __mk_param_std(BUFFER, LEFT_RIGHT_ANS, double); + + for (size_t i = 0; i < count; i++) { + register __m256 c0 = _mm256_sub_ps(left[i].f32_y[0], right[i].f32_y[0]); + register __m256 c1 = _mm256_sub_ps(left[i].f32_y[1], right[i].f32_y[1]); + ans[i].f32_y[0] = c0; + ans[i].f32_y[1] = c1; + } +} + +SN_MK_PROC_DECL_STD(double, 512, , sub) +{ + __mk_param_std(BUFFER, LEFT_RIGHT_ANS, double); + + for (size_t i = 0; i < count; i++) { + register __m512 c0 = _mm512_sub_ps(left[i].f32_z[0], right[i].f32_z[0]); + ans[i].f32_z[0] = c0; + } +} + +SN_MK_PROC_DECL_STD(float, sse, , scalar_mul) +{ + __mk_param_std(BUFFER, RIGHT_ANS_SCALAR, float); + + register __m128 vec = _mm_set_ps1(((float *)(scalar->data))[0]); + for (size_t i = 0; i < count; i++) { + register __m128 c0 = _mm_mul_ps(right[i].f32_x[0], vec); + register __m128 c1 = _mm_mul_ps(right[i].f32_x[1], vec); + register __m128 c2 = _mm_mul_ps(right[i].f32_x[2], vec); + register __m128 c3 = _mm_mul_ps(right[i].f32_x[3], vec); + + ans[i].f32_x[0] = c0; + ans[i].f32_x[1] = c1; + ans[i].f32_x[2] = c2; + ans[i].f32_x[3] = c3; + } +} + +SN_MK_PROC_DECL_STD(float, avx, , scalar_mul) +{ + __mk_param_std(BUFFER, RIGHT_ANS_SCALAR, float); + + register __m256 vec = _mm256_broadcast_ss(((float *)(scalar->data))); + for (size_t i = 0; i < count; i++) { + register __m256 c0 = _mm256_mul_ps(right[i].f32_y[0], vec); + register __m256 c1 = _mm256_mul_ps(right[i].f32_y[1], vec); + + ans[i].f32_y[0] = c0; + ans[i].f32_y[1] = c1; + } +} + +SN_MK_PROC_DECL_STD(float, 512, , scalar_mul) +{ + __mk_param_std(BUFFER, RIGHT_ANS_SCALAR, float); + + register __m512 vec = _mm512_broadcastss_ps(((__m128 *)(scalar->data))[0]); + for (size_t i = 0; i < count; i++) { + register __m512 c0 = _mm512_mul_ps(right[i].f32_z[0], vec); + + ans[i].f32_z[0] = c0; + } +} + +SN_MK_PROC_DECL_STD(double, sse, , scalar_mul) +{ + __mk_param_std(BUFFER, RIGHT_ANS_SCALAR, double); + + register __m128d vec = _mm_set1_pd(((double *)(scalar->data))[0]); + for (size_t i = 0; i < count; i++) { + register __m128d c0 = _mm_mul_pd(right[i].f64_x[0], vec); + register __m128d c1 = _mm_mul_pd(right[i].f64_x[1], vec); + register __m128d c2 = _mm_mul_pd(right[i].f64_x[2], vec); + register __m128d c3 = _mm_mul_pd(right[i].f64_x[3], vec); + register __m128d c4 = _mm_mul_pd(right[i].f64_x[4], vec); + register __m128d c5 = _mm_mul_pd(right[i].f64_x[5], vec); + register __m128d c6 = _mm_mul_pd(right[i].f64_x[6], vec); + register __m128d c7 = _mm_mul_pd(right[i].f64_x[7], vec); + + ans[i].f64_x[0] = c0; + ans[i].f64_x[1] = c1; + ans[i].f64_x[2] = c2; + ans[i].f64_x[3] = c3; + ans[i].f64_x[4] = c4; + ans[i].f64_x[5] = c5; + ans[i].f64_x[6] = c6; + ans[i].f64_x[7] = c7; + } +} + +SN_MK_PROC_DECL_STD(double, avx, , scalar_mul) +{ + __mk_param_std(BUFFER, RIGHT_ANS_SCALAR, double); + + register __m256d vec = _mm256_broadcast_sd(((double *)(scalar->data))); + for (size_t i = 0; i < count; i++) { + register __m256d c0 = _mm256_mul_pd(right[i].f64_y[0], vec); + register __m256d c1 = _mm256_mul_pd(right[i].f64_y[1], vec); + register __m256d c2 = _mm256_mul_pd(right[i].f64_y[2], vec); + register __m256d c3 = _mm256_mul_pd(right[i].f64_y[3], vec); + + ans[i].f64_y[0] = c0; + ans[i].f64_y[1] = c1; + ans[i].f64_y[2] = c2; + ans[i].f64_y[3] = c3; + } +} + +SN_MK_PROC_DECL_STD(double, 512, , scalar_mul) +{ + __mk_param_std(BUFFER, RIGHT_ANS_SCALAR, double); + + register __m512d vec = _mm512_broadcastsd_pd(_mm_load_pd(scalar)); + for (size_t i = 0; i < count; i++) { + register __m512d c0 = _mm512_mul_pd(right[i].f64_z[0], vec); + register __m512d c1 = _mm512_mul_pd(right[i].f64_z[1], vec); + + ans[i].f64_z[0] = c0; + ans[i].f64_z[1] = c1; + } +} + +#endif diff --git a/StgSharp.Native/sn-src/m.solve.x86.c b/StgSharp.Native/sn-src/m.solve.x86.c index 2e307674..d6d66cb7 100644 --- a/StgSharp.Native/sn-src/m.solve.x86.c +++ b/StgSharp.Native/sn-src/m.solve.x86.c @@ -1,185 +1,185 @@ -#include "sn_target.h" - -#if SN_IS_ARCH(SN_ARCH_X86_64) - -#include "sn_intrinsic.h" -#include "sn_intrinsic.std.h" -#include - -static const float quality_threshold = 1e-6f; - -SN_MK_PROC_DECL_STD(float, sse, , try_plu) -{ - __mk_param_std(TILE, LEFT_RIGHT_ANS_SCALAR, float); - - /* Aliases */ - MAT_KERNEL(float) *upper = left; /* U */ - MAT_KERNEL(float) *lower = right; /* L (unit diag) */ - MAT_KERNEL(float) *source = ans; /* A */ - unsigned char *pivot = (unsigned char *)&scalar->data[0]; /* length = 4 */ - int *success = (int *)&scalar->data[1]; - - /* Init permutation and outputs */ - pivot[0] = 0; - pivot[1] = 1; - pivot[2] = 2; - pivot[3] = 3; - *success = 1; - - /* Working copy of A in column-major a[col][row], load via SIMD view */ - MAT_KERNEL(float) a; - const __m128 z = _mm_setzero_ps(); - for (int c = 0; c < 4; ++c) { - __m128 col = _mm_load_ps((float *)&source->f32_x[c]); - _mm_storeu_ps((float *)&a.f32_x[c], col); - _mm_store_ps((float *)&upper->f32_x[c], z); - _mm_store_ps((float *)&lower->f32_x[c], z); - } - - const float eps = 1e-12f; - - for (int k = 0; k < 4; ++k) { - /* Pivot search on column k, rows k..3 */ - int p = k; - float maxabs = fabsf(a.m[k][p]); - for (int r = k + 1; r < 4; ++r) { - float v = fabsf(a.m[k][r]); - if (v > maxabs) { - maxabs = v; - p = r; - } - } - - if (maxabs < eps) { - *success = 0; - /* leave outputs zeroed */ - return; - } - - /* Swap rows if needed */ - if (p != k) { - for (int c = 0; c < 4; ++c) { - float tmp = a.m[c][k]; - a.m[c][k] = a.m[c][p]; - a.m[c][p] = tmp; - } - unsigned char tmpi = pivot[k]; - pivot[k] = pivot[p]; - pivot[p] = tmpi; - } - - float pivot_val = a.m[k][k]; - - /* Eliminate below pivot: store multipliers in L column k */ - for (int r = k + 1; r < 4; ++r) { - float factor = a.m[k][r] / pivot_val; - lower->m[k][r] = factor; - for (int c = k; c < 4; ++c) { - a.m[c][r] -= factor * a.m[c][k]; - } - } - - /* Set U row k (columns k..3) and L diagonal */ - lower->m[k][k] = 1.0f; - for (int c = k; c < 4; ++c) { - upper->m[c][k] = a.m[c][k]; - } - } - - /* Ensure remaining diagonal ones for L */ - for (int d = 0; d < 4; ++d) { - if (lower->m[d][d] == 0.0f) - lower->m[d][d] = 1.0f; - } -} - -#define DOT_F32_SSE(a, b, ans) \ - do { \ - __m128 _p = _mm_mul_ps((a), (b)); /* p0 p1 p2 p3 */ \ - __m128 _t = _mm_shuffle_ps(_p, _p, _MM_SHUFFLE(2, 3, 0, 1)); \ - _p = _mm_add_ps(_p, _t); \ - _t = _mm_movehl_ps(_t, _p); \ - ans = _mm_cvtss_f32(_mm_add_ss(_p, _t)); \ - } while (0) - -#define FIND_MAX_F32_SSE(a, b) \ - do { \ - __m128 _t = _mm_movehl_ps(a, a); \ - a = _mm_max_ps(a, _t); \ - _t = _mm_shuffle_ps(a, a, _MM_SHUFFLE(2, 3, 0, 1)); \ - b = _mm_max_ps(a, _t); \ - } while (0) - -/* -* layout of scalarpack: -* -*/ -SN_MK_PROC_DECL_STD(float, sse, , quality) -{ - __mk_param_std(KERNEL, RIGHT_ANS, float); - - static const __m128 tiny_source = { .m128_f32 = { 1e-6f, 1e-6f, 1e-6f, 1e-6f } }; - - register __m128 tiny = _mm_load_ps(tiny_source.m128_f32); - - register __m128 col0 = _mm_load_ps((float *)&right->f32_x[0]); - register __m128 col1 = _mm_load_ps((float *)&right->f32_x[1]); - register __m128 col2 = _mm_load_ps((float *)&right->f32_x[2]); - register __m128 col3 = _mm_load_ps((float *)&right->f32_x[3]); - - __m128 self_dot_src = { 0 }; - // try in reigister mix later - DOT_F32_SSE(col0, col0, self_dot_src.m128_f32[0]); - DOT_F32_SSE(col1, col1, self_dot_src.m128_f32[1]); - DOT_F32_SSE(col2, col2, self_dot_src.m128_f32[2]); - DOT_F32_SSE(col3, col3, self_dot_src.m128_f32[3]); - - register __m128 self_dot = _mm_load_ps(self_dot_src.m128_f32); - - register __m128 max; - FIND_MAX_F32_SSE(self_dot, max); - //float norm = _mm_cvtss_f32(max); - - // min on cross - register __m128 col_shuff_1 = _mm_shuffle_ps(col1, col1, _MM_SHUFFLE(0, 3, 2, 1)); - register __m128 col_shuff_2 = _mm_shuffle_ps(col2, col2, _MM_SHUFFLE(1, 0, 3, 2)); - register __m128 col_shuff_3 = _mm_shuffle_ps(col3, col3, _MM_SHUFFLE(2, 1, 0, 3)); - register __m128 min = _mm_min_ps(col0, col_shuff_1); - register __m128 min0 = _mm_min_ps(col_shuff_2, col_shuff_3); - min = _mm_min_ps(min, min0); - - float quality = _mm_cvtss_f32(_mm_div_ps(min, _mm_add_ps(max, tiny))); - ans->f32_x[0].m128_f32[0] = quality; - if (quality < quality_threshold) { - return; - } - - __m128 cross_dot_src[2]; - DOT_F32_SSE(col0, col1, cross_dot_src[0].m128_f32[0]); - DOT_F32_SSE(col0, col2, cross_dot_src[0].m128_f32[1]); - DOT_F32_SSE(col0, col3, cross_dot_src[0].m128_f32[2]); - DOT_F32_SSE(col1, col2, cross_dot_src[0].m128_f32[3]); - DOT_F32_SSE(col1, col3, cross_dot_src[1].m128_f32[0]); - DOT_F32_SSE(col2, col3, cross_dot_src[1].m128_f32[1]); - - register __m128 cross_dot_0 = _mm_load_ps(cross_dot_src[0].m128_f32); - register __m128 cross_dot_1 = _mm_load_ps(cross_dot_src[1].m128_f32); - - register __m128 base_0 = _mm_shuffle_ps(self_dot, self_dot, _MM_SHUFFLE(1, 0, 0, 0)); - register __m128 base_1 = _mm_shuffle_ps(self_dot, self_dot, _MM_SHUFFLE(3, 3, 2, 1)); - - register __m128 relation_0 = - _mm_div_ps(cross_dot_0, _mm_add_ps(_mm_mul_ps(base_0, base_1), tiny)); - - base_0 = _mm_shuffle_ps(self_dot, self_dot, _MM_SHUFFLE(2, 3, 2, 1)); - base_1 = _mm_shuffle_ps(self_dot, self_dot, _MM_SHUFFLE(3, 3, 3, 3)); - - register __m128 relation_1 = - _mm_div_ps(cross_dot_0, _mm_add_ps(_mm_mul_ps(base_0, base_1), tiny)); - - relation_0 = _mm_max_ps(relation_0, relation_1); - FIND_MAX_F32_SSE(relation_0, relation_0); - ans->f32_x[0].m128_f32[1] = _mm_cvtss_f32(relation_0); -} - -#endif +#include "sn_target.h" + +#if SN_IS_ARCH(SN_ARCH_X86_64) + +#include "sn_intrinsic.h" +#include "sn_intrinsic.std.h" +#include + +static const float quality_threshold = 1e-6f; + +SN_MK_PROC_DECL_STD(float, sse, , try_plu) +{ + __mk_param_std(TILE, LEFT_RIGHT_ANS_SCALAR, float); + + /* Aliases */ + MAT_KERNEL(float) *upper = left; /* U */ + MAT_KERNEL(float) *lower = right; /* L (unit diag) */ + MAT_KERNEL(float) *source = ans; /* A */ + unsigned char *pivot = (unsigned char *)&scalar->data[0]; /* length = 4 */ + int *success = (int *)&scalar->data[1]; + + /* Init permutation and outputs */ + pivot[0] = 0; + pivot[1] = 1; + pivot[2] = 2; + pivot[3] = 3; + *success = 1; + + /* Working copy of A in column-major a[col][row], load via SIMD view */ + MAT_KERNEL(float) a; + const __m128 z = _mm_setzero_ps(); + for (int c = 0; c < 4; ++c) { + __m128 col = _mm_load_ps((float *)&source->f32_x[c]); + _mm_storeu_ps((float *)&a.f32_x[c], col); + _mm_store_ps((float *)&upper->f32_x[c], z); + _mm_store_ps((float *)&lower->f32_x[c], z); + } + + const float eps = 1e-12f; + + for (int k = 0; k < 4; ++k) { + /* Pivot search on column k, rows k..3 */ + int p = k; + float maxabs = fabsf(a.m[k][p]); + for (int r = k + 1; r < 4; ++r) { + float v = fabsf(a.m[k][r]); + if (v > maxabs) { + maxabs = v; + p = r; + } + } + + if (maxabs < eps) { + *success = 0; + /* leave outputs zeroed */ + return; + } + + /* Swap rows if needed */ + if (p != k) { + for (int c = 0; c < 4; ++c) { + float tmp = a.m[c][k]; + a.m[c][k] = a.m[c][p]; + a.m[c][p] = tmp; + } + unsigned char tmpi = pivot[k]; + pivot[k] = pivot[p]; + pivot[p] = tmpi; + } + + float pivot_val = a.m[k][k]; + + /* Eliminate below pivot: store multipliers in L column k */ + for (int r = k + 1; r < 4; ++r) { + float factor = a.m[k][r] / pivot_val; + lower->m[k][r] = factor; + for (int c = k; c < 4; ++c) { + a.m[c][r] -= factor * a.m[c][k]; + } + } + + /* Set U row k (columns k..3) and L diagonal */ + lower->m[k][k] = 1.0f; + for (int c = k; c < 4; ++c) { + upper->m[c][k] = a.m[c][k]; + } + } + + /* Ensure remaining diagonal ones for L */ + for (int d = 0; d < 4; ++d) { + if (lower->m[d][d] == 0.0f) + lower->m[d][d] = 1.0f; + } +} + +#define DOT_F32_SSE(a, b, ans) \ + do { \ + __m128 _p = _mm_mul_ps((a), (b)); /* p0 p1 p2 p3 */ \ + __m128 _t = _mm_shuffle_ps(_p, _p, _MM_SHUFFLE(2, 3, 0, 1)); \ + _p = _mm_add_ps(_p, _t); \ + _t = _mm_movehl_ps(_t, _p); \ + ans = _mm_cvtss_f32(_mm_add_ss(_p, _t)); \ + } while (0) + +#define FIND_MAX_F32_SSE(a, b) \ + do { \ + __m128 _t = _mm_movehl_ps(a, a); \ + a = _mm_max_ps(a, _t); \ + _t = _mm_shuffle_ps(a, a, _MM_SHUFFLE(2, 3, 0, 1)); \ + b = _mm_max_ps(a, _t); \ + } while (0) + +/* +* layout of scalarpack: +* +*/ +SN_MK_PROC_DECL_STD(float, sse, , quality) +{ + __mk_param_std(KERNEL, RIGHT_ANS, float); + + static const __m128 tiny_source = { .m128_f32 = { 1e-6f, 1e-6f, 1e-6f, 1e-6f } }; + + register __m128 tiny = _mm_load_ps(tiny_source.m128_f32); + + register __m128 col0 = _mm_load_ps((float *)&right->f32_x[0]); + register __m128 col1 = _mm_load_ps((float *)&right->f32_x[1]); + register __m128 col2 = _mm_load_ps((float *)&right->f32_x[2]); + register __m128 col3 = _mm_load_ps((float *)&right->f32_x[3]); + + __m128 self_dot_src = { 0 }; + // try in reigister mix later + DOT_F32_SSE(col0, col0, self_dot_src.m128_f32[0]); + DOT_F32_SSE(col1, col1, self_dot_src.m128_f32[1]); + DOT_F32_SSE(col2, col2, self_dot_src.m128_f32[2]); + DOT_F32_SSE(col3, col3, self_dot_src.m128_f32[3]); + + register __m128 self_dot = _mm_load_ps(self_dot_src.m128_f32); + + register __m128 max; + FIND_MAX_F32_SSE(self_dot, max); + //float norm = _mm_cvtss_f32(max); + + // min on cross + register __m128 col_shuff_1 = _mm_shuffle_ps(col1, col1, _MM_SHUFFLE(0, 3, 2, 1)); + register __m128 col_shuff_2 = _mm_shuffle_ps(col2, col2, _MM_SHUFFLE(1, 0, 3, 2)); + register __m128 col_shuff_3 = _mm_shuffle_ps(col3, col3, _MM_SHUFFLE(2, 1, 0, 3)); + register __m128 min = _mm_min_ps(col0, col_shuff_1); + register __m128 min0 = _mm_min_ps(col_shuff_2, col_shuff_3); + min = _mm_min_ps(min, min0); + + float quality = _mm_cvtss_f32(_mm_div_ps(min, _mm_add_ps(max, tiny))); + ans->f32_x[0].m128_f32[0] = quality; + if (quality < quality_threshold) { + return; + } + + __m128 cross_dot_src[2]; + DOT_F32_SSE(col0, col1, cross_dot_src[0].m128_f32[0]); + DOT_F32_SSE(col0, col2, cross_dot_src[0].m128_f32[1]); + DOT_F32_SSE(col0, col3, cross_dot_src[0].m128_f32[2]); + DOT_F32_SSE(col1, col2, cross_dot_src[0].m128_f32[3]); + DOT_F32_SSE(col1, col3, cross_dot_src[1].m128_f32[0]); + DOT_F32_SSE(col2, col3, cross_dot_src[1].m128_f32[1]); + + register __m128 cross_dot_0 = _mm_load_ps(cross_dot_src[0].m128_f32); + register __m128 cross_dot_1 = _mm_load_ps(cross_dot_src[1].m128_f32); + + register __m128 base_0 = _mm_shuffle_ps(self_dot, self_dot, _MM_SHUFFLE(1, 0, 0, 0)); + register __m128 base_1 = _mm_shuffle_ps(self_dot, self_dot, _MM_SHUFFLE(3, 3, 2, 1)); + + register __m128 relation_0 = + _mm_div_ps(cross_dot_0, _mm_add_ps(_mm_mul_ps(base_0, base_1), tiny)); + + base_0 = _mm_shuffle_ps(self_dot, self_dot, _MM_SHUFFLE(2, 3, 2, 1)); + base_1 = _mm_shuffle_ps(self_dot, self_dot, _MM_SHUFFLE(3, 3, 3, 3)); + + register __m128 relation_1 = + _mm_div_ps(cross_dot_0, _mm_add_ps(_mm_mul_ps(base_0, base_1), tiny)); + + relation_0 = _mm_max_ps(relation_0, relation_1); + FIND_MAX_F32_SSE(relation_0, relation_0); + ans->f32_x[0].m128_f32[1] = _mm_cvtss_f32(relation_0); +} + +#endif diff --git a/StgSharp.Native/sn-src/s.factorial.x86.c b/StgSharp.Native/sn-src/s.factorial.x86.c index 423bc5e8..39b7c140 100644 --- a/StgSharp.Native/sn-src/s.factorial.x86.c +++ b/StgSharp.Native/sn-src/s.factorial.x86.c @@ -1,29 +1,29 @@ -#include "sn_target.h" - -#if SN_IS_ARCH(SN_ARCH_X86_64) - -#include "sn_internal.h" -#include "sn_intrinsic.h" - -INTERNAL __m128i facIncrement = { 4, 4, 4, 4 }; -INTERNAL __m128i facBase = { 1, 2, 3, 4 }; - -INTERNAL uint64_t SN_DECL factorial_simd_sse(int n) -{ - __m128i baseResult = facBase; - __m128i facBaseLocal = facBase; - const int cycle = (n - 3) >> 2; - const uint32_t rest = (cycle << 2) + 1; - for (size_t i = 0; i < cycle; i++) { - facBaseLocal = _mm_add_epi32(facBaseLocal, facIncrement); - baseResult = _mm_mullo_epi32(baseResult, facBaseLocal); - } - uint64_t result = (uint64_t)baseResult.m128i_i32[0] * (uint64_t)baseResult.m128i_i32[1] * - (uint64_t)baseResult.m128i_i32[2] * (uint64_t)baseResult.m128i_i32[3]; - for (uint64_t i = rest; i < n; i++) { - result *= i; - } - return result; -} - -#endif +#include "sn_target.h" + +#if SN_IS_ARCH(SN_ARCH_X86_64) + +#include "sn_internal.h" +#include "sn_intrinsic.h" + +INTERNAL __m128i facIncrement = { 4, 4, 4, 4 }; +INTERNAL __m128i facBase = { 1, 2, 3, 4 }; + +INTERNAL uint64_t SN_DECL factorial_simd_sse(int n) +{ + __m128i baseResult = facBase; + __m128i facBaseLocal = facBase; + const int cycle = (n - 3) >> 2; + const uint32_t rest = (cycle << 2) + 1; + for (size_t i = 0; i < cycle; i++) { + facBaseLocal = _mm_add_epi32(facBaseLocal, facIncrement); + baseResult = _mm_mullo_epi32(baseResult, facBaseLocal); + } + uint64_t result = (uint64_t)baseResult.m128i_i32[0] * (uint64_t)baseResult.m128i_i32[1] * + (uint64_t)baseResult.m128i_i32[2] * (uint64_t)baseResult.m128i_i32[3]; + for (uint64_t i = rest; i < n; i++) { + result *= i; + } + return result; +} + +#endif diff --git a/StgSharp.Native/sn-src/s.hash.x86.c b/StgSharp.Native/sn-src/s.hash.x86.c index 1637d080..295b192d 100644 --- a/StgSharp.Native/sn-src/s.hash.x86.c +++ b/StgSharp.Native/sn-src/s.hash.x86.c @@ -1,51 +1,51 @@ -#include "sn_target.h" - -#if SN_IS_ARCH(SN_ARCH_X86_64) - -#include "sn_intrinsic.h" -#include "StgSharpNative.h" - -INTERNAL int SN_DECL city_hash_simplify_sse(byte const *str, int const length) -{ - uint32_t hash = length, size = length << 1; - byte *end = str + size, *ptr = str; - - if (size < 4) { - for (; ptr < end; ptr += 2) { - hash = _mm_crc32_u16(hash, *ptr); - } - } else if (size < 16) { - byte *last = end - 4; - for (; ptr < end; ptr += 4) { - hash = _mm_crc32_u32(hash, *(uint32_t *)ptr); - } - for (; ptr < end; ptr++) { - hash = _mm_crc32_u16(hash, *ptr); - } - } else { - byte *last_128 = end - 16; - byte *last_32 = end - 4; - uint64_t hash64 = size; - for (; ptr < last_128; ptr += 16) { - __m128i vec = _mm_loadu_si32((int *)ptr); - hash64 = _mm_crc32_u64(hash64, _mm_extract_epi64(vec, 0)); - hash64 = _mm_crc32_u64(hash64, _mm_extract_epi64(vec, 1)); - } - hash = _mm_crc32_u8(hash, hash64); - hash = _mm_crc32_u8(hash, hash64 >> 32); - for (; ptr < last_32; ptr += 4) { - hash = _mm_crc32_u32(hash, *(uint32_t *)ptr); - } - for (; ptr < end; ptr += 2) { - hash = _mm_crc32_u8(hash, *ptr); - } - } - hash ^= hash >> 16; - hash *= 0x85ebca6b; - hash ^= hash >> 13; - hash *= 0xc2b2ae35; - hash ^= hash >> 16; - return hash; -} - -#endif +#include "sn_target.h" + +#if SN_IS_ARCH(SN_ARCH_X86_64) + +#include "sn_intrinsic.h" +#include "StgSharpNative.h" + +INTERNAL int SN_DECL city_hash_simplify_sse(byte const *str, int const length) +{ + uint32_t hash = length, size = length << 1; + byte *end = str + size, *ptr = str; + + if (size < 4) { + for (; ptr < end; ptr += 2) { + hash = _mm_crc32_u16(hash, *ptr); + } + } else if (size < 16) { + byte *last = end - 4; + for (; ptr < end; ptr += 4) { + hash = _mm_crc32_u32(hash, *(uint32_t *)ptr); + } + for (; ptr < end; ptr++) { + hash = _mm_crc32_u16(hash, *ptr); + } + } else { + byte *last_128 = end - 16; + byte *last_32 = end - 4; + uint64_t hash64 = size; + for (; ptr < last_128; ptr += 16) { + __m128i vec = _mm_loadu_si32((int *)ptr); + hash64 = _mm_crc32_u64(hash64, _mm_extract_epi64(vec, 0)); + hash64 = _mm_crc32_u64(hash64, _mm_extract_epi64(vec, 1)); + } + hash = _mm_crc32_u8(hash, hash64); + hash = _mm_crc32_u8(hash, hash64 >> 32); + for (; ptr < last_32; ptr += 4) { + hash = _mm_crc32_u32(hash, *(uint32_t *)ptr); + } + for (; ptr < end; ptr += 2) { + hash = _mm_crc32_u8(hash, *ptr); + } + } + hash ^= hash >> 16; + hash *= 0x85ebca6b; + hash ^= hash >> 13; + hash *= 0xc2b2ae35; + hash ^= hash >> 16; + return hash; +} + +#endif diff --git a/StgSharp.Native/sn-src/sn_native.c b/StgSharp.Native/sn-src/sn_native.c index e24487e8..8366c78f 100644 --- a/StgSharp.Native/sn-src/sn_native.c +++ b/StgSharp.Native/sn-src/sn_native.c @@ -1,77 +1,77 @@ -#ifndef STB_IMAGE_IMPLEMENTATION -#define STB_IMAGE_IMPLEMENTATION -#endif -#include "StgSharpNative.h" -#include "gl.h" -#include "../lib/glfw/glfw3.h" -#include -#include - -extern GladGLContext *currentContext; -extern char infolog[512]; - -SN_API int SN_DECL glCheckShaderStat(GladGLContext *context, uint64_t shaderHandle, int key, - char **logRef) -{ - int stat = 0; - context->GetShaderiv(shaderHandle, key, &stat); - if (!stat) { - context->GetShaderInfoLog(shaderHandle, 512, NULL, infolog); - } - *logRef = infolog; - return stat; -} - -SN_API void SN_DECL initGL(int majorVersion, int minorVersion) -{ - glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, majorVersion); - glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, minorVersion); - glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE); -} - -SN_API GLFWglproc SN_DECL loadGlfuncDefault(char const *procName) -{ - void *ret = glfwGetProcAddress(procName); - // printf("%llu\n", (uint64_t)ret); - if (ret == NULL) { - strcpy_s(infolog, 30, "Failed to load OpenGL api:"); - for (size_t i = 0; i < sizeof(procName); i++) { - infolog[30 + i] = procName[i]; - } - //printf("%s\n", infolog); - } - return (GLFWglproc)ret; -} - -SN_API unsigned int linkShaderProgram(GladGLContext *context, GLuint shaderProgram) -{ - context->LinkProgram(shaderProgram); - - int success; - context->GetProgramiv(shaderProgram, GL_LINK_STATUS, &success); - if (!success) { - context->GetProgramInfoLog(shaderProgram, 512, NULL, infolog); - return 0; - } else { - return shaderProgram; - } -} - -SN_API void SN_DECL loadImageData(char const *location, Image *out, imageLoader loader) -{ - if (loader == NULL) { - loader = stbi_load; - } - out->pixelPtr = loader(location, &(out->width), &(out->height), &(out->channel), 0); -} -SN_API void SN_DECL unloadImageData(Image *out) -{ - free(out->pixelPtr); -} - -SN_API char *SN_DECL readLog() -{ - infolog[511] = '\0'; - return infolog; -} +#ifndef STB_IMAGE_IMPLEMENTATION +#define STB_IMAGE_IMPLEMENTATION +#endif +#include "StgSharpNative.h" +#include "gl.h" +#include "../lib/glfw/glfw3.h" +#include +#include + +extern GladGLContext *currentContext; +extern char infolog[512]; + +SN_API int SN_DECL glCheckShaderStat(GladGLContext *context, uint64_t shaderHandle, int key, + char **logRef) +{ + int stat = 0; + context->GetShaderiv(shaderHandle, key, &stat); + if (!stat) { + context->GetShaderInfoLog(shaderHandle, 512, NULL, infolog); + } + *logRef = infolog; + return stat; +} + +SN_API void SN_DECL initGL(int majorVersion, int minorVersion) +{ + glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, majorVersion); + glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, minorVersion); + glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); + glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE); +} + +SN_API GLFWglproc SN_DECL loadGlfuncDefault(char const *procName) +{ + void *ret = glfwGetProcAddress(procName); + // printf("%llu\n", (uint64_t)ret); + if (ret == NULL) { + strcpy_s(infolog, 30, "Failed to load OpenGL api:"); + for (size_t i = 0; i < sizeof(procName); i++) { + infolog[30 + i] = procName[i]; + } + //printf("%s\n", infolog); + } + return (GLFWglproc)ret; +} + +SN_API unsigned int linkShaderProgram(GladGLContext *context, GLuint shaderProgram) +{ + context->LinkProgram(shaderProgram); + + int success; + context->GetProgramiv(shaderProgram, GL_LINK_STATUS, &success); + if (!success) { + context->GetProgramInfoLog(shaderProgram, 512, NULL, infolog); + return 0; + } else { + return shaderProgram; + } +} + +SN_API void SN_DECL loadImageData(char const *location, Image *out, imageLoader loader) +{ + if (loader == NULL) { + loader = stbi_load; + } + out->pixelPtr = loader(location, &(out->width), &(out->height), &(out->channel), 0); +} +SN_API void SN_DECL unloadImageData(Image *out) +{ + free(out->pixelPtr); +} + +SN_API char *SN_DECL readLog() +{ + infolog[511] = '\0'; + return infolog; +} diff --git a/StgSharp.Native/sn-src/vector.c b/StgSharp.Native/sn-src/vector.c index 201227ef..60bae8b3 100644 --- a/StgSharp.Native/sn-src/vector.c +++ b/StgSharp.Native/sn-src/vector.c @@ -1,32 +1,32 @@ -#include "sn_intrinsic.h" -#include "sn_internal.h" - -INTERNAL void SN_DECL f32_normalize(VEC(float) *restrict source, VEC(float) *restrict target) -{ - register __m128 s = _mm_load_ps(&source->f32_x); - register __m128 a_length_sq = _mm_mul_ps(s, s); - a_length_sq = _mm_add_ps(a_length_sq, - _mm_shuffle_ps(a_length_sq, a_length_sq, _MM_SHUFFLE(2, 3, 0, 1))); - a_length_sq = _mm_add_ss(a_length_sq, - _mm_shuffle_ps(a_length_sq, a_length_sq, _MM_SHUFFLE(0, 0, 3, 2))); - - __m128 a_inv_length = _mm_rsqrt_ps(a_length_sq); - s = _mm_mul_ps(s, a_inv_length); - - __m128 dot_product = _mm_mul_ps(target->f32_x[0], s); - dot_product = _mm_add_ps(dot_product, - _mm_shuffle_ps(dot_product, dot_product, _MM_SHUFFLE(2, 3, 0, 1))); - dot_product = _mm_add_ss(dot_product, - _mm_shuffle_ps(dot_product, dot_product, _MM_SHUFFLE(0, 0, 3, 2))); - - __m128 b_orthogonal = _mm_sub_ps(target->f32_x[0], _mm_mul_ps(s, dot_product)); - - __m128 b_length_sq = _mm_mul_ps(b_orthogonal, b_orthogonal); - b_length_sq = _mm_add_ps(b_length_sq, - _mm_shuffle_ps(b_length_sq, b_length_sq, _MM_SHUFFLE(2, 3, 0, 1))); - b_length_sq = _mm_add_ss(b_length_sq, - _mm_shuffle_ps(b_length_sq, b_length_sq, _MM_SHUFFLE(0, 0, 3, 2))); - - __m128 b_inv_length = _mm_rsqrt_ps(b_length_sq); - target->f32_x[0] = _mm_mul_ps(b_orthogonal, b_inv_length); -} +#include "sn_intrinsic.h" +#include "sn_internal.h" + +INTERNAL void SN_DECL f32_normalize(VEC(float) *restrict source, VEC(float) *restrict target) +{ + register __m128 s = _mm_load_ps(&source->f32_x); + register __m128 a_length_sq = _mm_mul_ps(s, s); + a_length_sq = _mm_add_ps(a_length_sq, + _mm_shuffle_ps(a_length_sq, a_length_sq, _MM_SHUFFLE(2, 3, 0, 1))); + a_length_sq = _mm_add_ss(a_length_sq, + _mm_shuffle_ps(a_length_sq, a_length_sq, _MM_SHUFFLE(0, 0, 3, 2))); + + __m128 a_inv_length = _mm_rsqrt_ps(a_length_sq); + s = _mm_mul_ps(s, a_inv_length); + + __m128 dot_product = _mm_mul_ps(target->f32_x[0], s); + dot_product = _mm_add_ps(dot_product, + _mm_shuffle_ps(dot_product, dot_product, _MM_SHUFFLE(2, 3, 0, 1))); + dot_product = _mm_add_ss(dot_product, + _mm_shuffle_ps(dot_product, dot_product, _MM_SHUFFLE(0, 0, 3, 2))); + + __m128 b_orthogonal = _mm_sub_ps(target->f32_x[0], _mm_mul_ps(s, dot_product)); + + __m128 b_length_sq = _mm_mul_ps(b_orthogonal, b_orthogonal); + b_length_sq = _mm_add_ps(b_length_sq, + _mm_shuffle_ps(b_length_sq, b_length_sq, _MM_SHUFFLE(2, 3, 0, 1))); + b_length_sq = _mm_add_ss(b_length_sq, + _mm_shuffle_ps(b_length_sq, b_length_sq, _MM_SHUFFLE(0, 0, 3, 2))); + + __m128 b_inv_length = _mm_rsqrt_ps(b_length_sq); + target->f32_x[0] = _mm_mul_ps(b_orthogonal, b_inv_length); +} diff --git a/StgSharp.Native/sn-src/vector_dot.c b/StgSharp.Native/sn-src/vector_dot.c index 99871db8..6b7ca295 100644 --- a/StgSharp.Native/sn-src/vector_dot.c +++ b/StgSharp.Native/sn-src/vector_dot.c @@ -1,67 +1,67 @@ -#include "sn_intrinsic.h" -#include "sn_internal.h" - -static const int avxdot_indices[] = { 0, 4, 1, 5, 2, 3, 6, 7 }; - -INTERNAL void FORCEINLINE SN_DECL dot_41_sse(MAT_KERNEL(float) const *transpose, - __m128 const *vector, __m128 *ans) -{ - *ans = _mm_dp_ps(transpose->f32_x[0], *vector, 0B11110001); - *ans = _mm_insert_ps(*ans, _mm_dp_ps(transpose->f32_x[1], *vector, 0B11110001), - SSE_INSERT_SIMPLE(1, 1)); - *ans = _mm_insert_ps(*ans, _mm_dp_ps(transpose->f32_x[2], *vector, 0B11110001), - SSE_INSERT_SIMPLE(1, 3)); - *ans = _mm_insert_ps(*ans, _mm_dp_ps(transpose->f32_x[3], *vector, 0B11110001), - SSE_INSERT_SIMPLE(1, 4)); -} - -INTERNAL void SN_DECL dot_41_avx(MAT_KERNEL(float) const *transpose, __m128 const *vector, - __m128 *ans) -{ - __m256 _double = _mm256_set_m128(vector[0], vector[0]); - __m256 tmp = _mm256_dp_ps(transpose->f32_y[0], _double, 0B11110001); - tmp = _mm256_blend_ps(tmp, _mm256_dp_ps(transpose->f32_y[0], _double, 0B11110010), - 0B00100010); - *ans = _mm256_castps256_ps128( - _mm256_permutevar8x32_ps(tmp, _mm256_loadu_epi32(avxdot_indices))); -} - -INTERNAL void SN_DECL dot_42_sse(MAT_KERNEL(float) const *transpose, __m128 const *vector, - __m128 *ans) -{ - ans[0] = _mm_dp_ps(transpose->f32_x[0], vector[0], 0B11110001); - ans[0] = _mm_insert_ps(*ans, _mm_dp_ps(transpose->f32_x[1], vector[0], 0B11110001), - SSE_INSERT_SIMPLE(1, 2)); - ans[0] = _mm_insert_ps(*ans, _mm_dp_ps(transpose->f32_x[2], vector[0], 0B11110001), - SSE_INSERT_SIMPLE(1, 3)); - ans[0] = _mm_insert_ps(*ans, _mm_dp_ps(transpose->f32_x[3], vector[0], 0B11110001), - SSE_INSERT_SIMPLE(1, 4)); - - ans[1] = _mm_dp_ps(transpose->f32_x[0], vector[1], 0B11110001); - ans[1] = _mm_insert_ps(*ans, _mm_dp_ps(transpose->f32_x[1], vector[1], 0B11110001), - SSE_INSERT_SIMPLE(1, 2)); - ans[1] = _mm_insert_ps(*ans, _mm_dp_ps(transpose->f32_x[2], vector[1], 0B11110001), - SSE_INSERT_SIMPLE(1, 3)); - ans[1] = _mm_insert_ps(*ans, _mm_dp_ps(transpose->f32_x[3], vector[1], 0B11110001), - SSE_INSERT_SIMPLE(1, 4)); -} - -INTERNAL void SN_DECL dot_42_avx(MAT_KERNEL(float) const *transpose, __m128 const *vector, - __m128 *ans) -{ - __m256 temp = transpose->f32_y[0]; - __m256 vector_stream = _mm256_set_m128(vector[1], vector[0]); - - __m256 result = _mm256_dp_ps(temp, vector_stream, 0B11110001); - temp = _mm256_permute2f128_ps(temp, temp, 0B00000001); - result = _mm256_blend_ps(result, _mm256_dp_ps(temp, vector_stream, 0B11110010), 0B00100010); - - temp = transpose->f32_y[1]; - result = _mm256_blend_ps(result, _mm256_dp_ps(temp, vector_stream, 0B11110100), 0B01000100); - temp = _mm256_permute2f128_ps(temp, temp, 0B00000001); - result = _mm256_blend_ps(result, _mm256_dp_ps(temp, vector_stream, 0B11111000), 0B10001000); - - ans[0] = _mm256_castps256_ps128(result); - ans[1] = _mm256_extractf128_ps(result, 1); - ans[1] = _mm_shuffle_ps(ans[1], ans[1], _MM_SHUFFLE(2, 3, 0, 1)); -} +#include "sn_intrinsic.h" +#include "sn_internal.h" + +static const int avxdot_indices[] = { 0, 4, 1, 5, 2, 3, 6, 7 }; + +INTERNAL void FORCEINLINE SN_DECL dot_41_sse(MAT_KERNEL(float) const *transpose, + __m128 const *vector, __m128 *ans) +{ + *ans = _mm_dp_ps(transpose->f32_x[0], *vector, 0B11110001); + *ans = _mm_insert_ps(*ans, _mm_dp_ps(transpose->f32_x[1], *vector, 0B11110001), + SSE_INSERT_SIMPLE(1, 1)); + *ans = _mm_insert_ps(*ans, _mm_dp_ps(transpose->f32_x[2], *vector, 0B11110001), + SSE_INSERT_SIMPLE(1, 3)); + *ans = _mm_insert_ps(*ans, _mm_dp_ps(transpose->f32_x[3], *vector, 0B11110001), + SSE_INSERT_SIMPLE(1, 4)); +} + +INTERNAL void SN_DECL dot_41_avx(MAT_KERNEL(float) const *transpose, __m128 const *vector, + __m128 *ans) +{ + __m256 _double = _mm256_set_m128(vector[0], vector[0]); + __m256 tmp = _mm256_dp_ps(transpose->f32_y[0], _double, 0B11110001); + tmp = _mm256_blend_ps(tmp, _mm256_dp_ps(transpose->f32_y[0], _double, 0B11110010), + 0B00100010); + *ans = _mm256_castps256_ps128( + _mm256_permutevar8x32_ps(tmp, _mm256_loadu_epi32(avxdot_indices))); +} + +INTERNAL void SN_DECL dot_42_sse(MAT_KERNEL(float) const *transpose, __m128 const *vector, + __m128 *ans) +{ + ans[0] = _mm_dp_ps(transpose->f32_x[0], vector[0], 0B11110001); + ans[0] = _mm_insert_ps(*ans, _mm_dp_ps(transpose->f32_x[1], vector[0], 0B11110001), + SSE_INSERT_SIMPLE(1, 2)); + ans[0] = _mm_insert_ps(*ans, _mm_dp_ps(transpose->f32_x[2], vector[0], 0B11110001), + SSE_INSERT_SIMPLE(1, 3)); + ans[0] = _mm_insert_ps(*ans, _mm_dp_ps(transpose->f32_x[3], vector[0], 0B11110001), + SSE_INSERT_SIMPLE(1, 4)); + + ans[1] = _mm_dp_ps(transpose->f32_x[0], vector[1], 0B11110001); + ans[1] = _mm_insert_ps(*ans, _mm_dp_ps(transpose->f32_x[1], vector[1], 0B11110001), + SSE_INSERT_SIMPLE(1, 2)); + ans[1] = _mm_insert_ps(*ans, _mm_dp_ps(transpose->f32_x[2], vector[1], 0B11110001), + SSE_INSERT_SIMPLE(1, 3)); + ans[1] = _mm_insert_ps(*ans, _mm_dp_ps(transpose->f32_x[3], vector[1], 0B11110001), + SSE_INSERT_SIMPLE(1, 4)); +} + +INTERNAL void SN_DECL dot_42_avx(MAT_KERNEL(float) const *transpose, __m128 const *vector, + __m128 *ans) +{ + __m256 temp = transpose->f32_y[0]; + __m256 vector_stream = _mm256_set_m128(vector[1], vector[0]); + + __m256 result = _mm256_dp_ps(temp, vector_stream, 0B11110001); + temp = _mm256_permute2f128_ps(temp, temp, 0B00000001); + result = _mm256_blend_ps(result, _mm256_dp_ps(temp, vector_stream, 0B11110010), 0B00100010); + + temp = transpose->f32_y[1]; + result = _mm256_blend_ps(result, _mm256_dp_ps(temp, vector_stream, 0B11110100), 0B01000100); + temp = _mm256_permute2f128_ps(temp, temp, 0B00000001); + result = _mm256_blend_ps(result, _mm256_dp_ps(temp, vector_stream, 0B11111000), 0B10001000); + + ans[0] = _mm256_castps256_ps128(result); + ans[1] = _mm256_extractf128_ps(result, 1); + ans[1] = _mm_shuffle_ps(ans[1], ans[1], _MM_SHUFFLE(2, 3, 0, 1)); +} diff --git a/StgSharp.RegularAnalysis/Abstraction/AbstractSyntaxTree.cs b/StgSharp.RegularAnalysis/Abstraction/AbstractSyntaxTree.cs index 9b5cd18e..072faeb9 100644 --- a/StgSharp.RegularAnalysis/Abstraction/AbstractSyntaxTree.cs +++ b/StgSharp.RegularAnalysis/Abstraction/AbstractSyntaxTree.cs @@ -1,264 +1,264 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="AbstractSyntaxTree" -// 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 System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.CompilerServices; -using System.Security.Cryptography.X509Certificates; -using System.Text; -using System.Xml.Linq; -using System.Xml.Schema; - -namespace StgSharp.RegularAnalysis.Abstraction -{ - public sealed class AbstractSyntaxTree where TNode : ISyntaxNode - where TType : unmanaged - { - - private HashSet _allToken = new(); - - public HashSet AllNodes - { - get { return _allToken; } - } - - public int Count - { - get { return _allToken.Count; } - } - - public TNode Root - { - get; - internal set - { - if (_allToken.Contains(value)) { - field = value; - } - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public bool AddNode( - TNode node - ) - { - return _allToken.Add(node); - } - - public bool Contains( - TNode node - ) - { - return _allToken.Contains(node); - } - - public IEnumerator GetEnumerator() - { - return new TreeEnumerator(this); - } - - } - - internal class TreeEnumerator( - TNode root - ) : IEnumerator where TNode : ISyntaxNode where TType : unmanaged - { - - private bool _completed = false; - - private int _state, _target; // 0: not started, 1: on right, 2: ended - private Stack _recycle = []; - private Stack _stack = []; - - // private TNode _lRoot; - private TNode _root = root; - - internal TreeEnumerator( - AbstractSyntaxTree tree - ) - : this(tree.Root) { } - - public int Depth => _stack.Count; - - public TNode Current - { - get - { - if (_stack.TryPeek(out Record? r)) { - return r.Node; - } - return TNode.Empty; - } - } - - public void Dispose() - { - return; - } - - public bool MoveNext() - { - if (_completed) { - return false; - } - while (_stack.TryPeek(out Record? cur)) - { - switch (cur.State) - { - case 0: - cur.State++; - if (TNode.IsNullOrEmpty(cur.Node.Left)) - { - goto case 1; - } else - { - _stack.Push(GetNewRecord(cur.Node.Left)); - return true; - } - case 1: - cur.State++; - if (TNode.IsNullOrEmpty(cur.Node.Right)) - { - goto case 2; - } else - { - _stack.Push(GetNewRecord(cur.Node.Right)); - return true; - } - case 2: - _recycle.Push(_stack.Pop()); - if (TNode.IsNullOrEmpty(cur.Node.Next)) - { - if (_stack.Count == 0) - { - _completed = true; - return false; - } - } else - { - _stack.Push(GetNewRecord(cur.Node.Next)); - return true; - } - break; - default: - break; - } - } - _stack.Push(GetNewRecord(_root)); - return true; - } - - public void Reset() - { - _completed = false; - _stack.Clear(); - _state = 0; - } - - /// - /// Skips the node and its subtree if the current node is the given node. Otherwise, do - /// nothing. - /// - /// - /// The node to skip. - /// - public void SkipNode( - TNode node - ) - { - if (_stack.TryPeek(out Record? r) && ReferenceEquals(r.Node, node)) - { - _ = _stack.Pop(); - _recycle.Push(r); - } - } - - public void SkipOnce() - { - if (_stack.TryPeek(out Record? cur)) - { - switch (cur.State) - { - case 0: - cur.State++; - break; - case 1: - cur.State++; - break; - case 2: - if (TNode.IsNullOrEmpty(cur.Node.Next)) - { - _recycle.Push(_stack.Pop()); - if (_stack.Count == 0) - { - _completed = true; - return; - } - } else - { - _stack.Push(GetNewRecord(cur.Node.Next)); - } - break; - default: - break; - } - } - } - - private Record GetNewRecord( - TNode node - ) - { - if (_recycle.TryPop(out Record? r)) - { - r.State = 0; - r.Node = node; - return r; - } - return new Record(node, 0); - } - - object IEnumerator.Current => Current; - - private class Record( - TNode node, - int state - ) - { - - public int State { get; set; } = state; - - public TNode Node { get; set; } = node; - - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="AbstractSyntaxTree" +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using System.Security.Cryptography.X509Certificates; +using System.Text; +using System.Xml.Linq; +using System.Xml.Schema; + +namespace StgSharp.RegularAnalysis.Abstraction +{ + public sealed class AbstractSyntaxTree where TNode : ISyntaxNode + where TType : unmanaged + { + + private HashSet _allToken = new(); + + public HashSet AllNodes + { + get { return _allToken; } + } + + public int Count + { + get { return _allToken.Count; } + } + + public TNode Root + { + get; + internal set + { + if (_allToken.Contains(value)) { + field = value; + } + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool AddNode( + TNode node + ) + { + return _allToken.Add(node); + } + + public bool Contains( + TNode node + ) + { + return _allToken.Contains(node); + } + + public IEnumerator GetEnumerator() + { + return new TreeEnumerator(this); + } + + } + + internal class TreeEnumerator( + TNode root + ) : IEnumerator where TNode : ISyntaxNode where TType : unmanaged + { + + private bool _completed = false; + + private int _state, _target; // 0: not started, 1: on right, 2: ended + private Stack _recycle = []; + private Stack _stack = []; + + // private TNode _lRoot; + private TNode _root = root; + + internal TreeEnumerator( + AbstractSyntaxTree tree + ) + : this(tree.Root) { } + + public int Depth => _stack.Count; + + public TNode Current + { + get + { + if (_stack.TryPeek(out Record? r)) { + return r.Node; + } + return TNode.Empty; + } + } + + public void Dispose() + { + return; + } + + public bool MoveNext() + { + if (_completed) { + return false; + } + while (_stack.TryPeek(out Record? cur)) + { + switch (cur.State) + { + case 0: + cur.State++; + if (TNode.IsNullOrEmpty(cur.Node.Left)) + { + goto case 1; + } else + { + _stack.Push(GetNewRecord(cur.Node.Left)); + return true; + } + case 1: + cur.State++; + if (TNode.IsNullOrEmpty(cur.Node.Right)) + { + goto case 2; + } else + { + _stack.Push(GetNewRecord(cur.Node.Right)); + return true; + } + case 2: + _recycle.Push(_stack.Pop()); + if (TNode.IsNullOrEmpty(cur.Node.Next)) + { + if (_stack.Count == 0) + { + _completed = true; + return false; + } + } else + { + _stack.Push(GetNewRecord(cur.Node.Next)); + return true; + } + break; + default: + break; + } + } + _stack.Push(GetNewRecord(_root)); + return true; + } + + public void Reset() + { + _completed = false; + _stack.Clear(); + _state = 0; + } + + /// + /// Skips the node and its subtree if the current node is the given node. Otherwise, do + /// nothing. + /// + /// + /// The node to skip. + /// + public void SkipNode( + TNode node + ) + { + if (_stack.TryPeek(out Record? r) && ReferenceEquals(r.Node, node)) + { + _ = _stack.Pop(); + _recycle.Push(r); + } + } + + public void SkipOnce() + { + if (_stack.TryPeek(out Record? cur)) + { + switch (cur.State) + { + case 0: + cur.State++; + break; + case 1: + cur.State++; + break; + case 2: + if (TNode.IsNullOrEmpty(cur.Node.Next)) + { + _recycle.Push(_stack.Pop()); + if (_stack.Count == 0) + { + _completed = true; + return; + } + } else + { + _stack.Push(GetNewRecord(cur.Node.Next)); + } + break; + default: + break; + } + } + } + + private Record GetNewRecord( + TNode node + ) + { + if (_recycle.TryPop(out Record? r)) + { + r.State = 0; + r.Node = node; + return r; + } + return new Record(node, 0); + } + + object IEnumerator.Current => Current; + + private class Record( + TNode node, + int state + ) + { + + public int State { get; set; } = state; + + public TNode Node { get; set; } = node; + + } + + } +} diff --git a/StgSharp.RegularAnalysis/Abstraction/CompileDepthState.cs b/StgSharp.RegularAnalysis/Abstraction/CompileDepthState.cs index 1c5a4488..8cbadce1 100644 --- a/StgSharp.RegularAnalysis/Abstraction/CompileDepthState.cs +++ b/StgSharp.RegularAnalysis/Abstraction/CompileDepthState.cs @@ -1,73 +1,73 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="CompileDepthState" -// 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 System; -using System.Collections.Generic; -using System.Data; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.RegularAnalysis.Abstraction -{ - public interface ICompileDepthState - { - - string CurrentState { get; set; } - - } - - public class CompileDepthMark - { - - internal CompileDepthMark(int operatorBegin, int operandBegin, int usage) - { - OperatorBegin = operatorBegin; - OperandBegin = operandBegin; - Usage = usage; - } - - internal CompileDepthMark(int operatorBegin, int operandBegin, int usage, ICompileDepthState stateCache) - { - OperatorBegin = operatorBegin; - OperandBegin = operandBegin; - Usage = usage; - StateCache = stateCache; - } - - public bool IsBeginOfBlock { get; internal set; } - - public ICompileDepthState StateCache { get; internal set; } - - public int OperandBegin { get; internal set; } - - public int OperatorBegin { get; internal set; } - - public int Usage { get; internal set; } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="CompileDepthState" +// 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 System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.RegularAnalysis.Abstraction +{ + public interface ICompileDepthState + { + + string CurrentState { get; set; } + + } + + public class CompileDepthMark + { + + internal CompileDepthMark(int operatorBegin, int operandBegin, int usage) + { + OperatorBegin = operatorBegin; + OperandBegin = operandBegin; + Usage = usage; + } + + internal CompileDepthMark(int operatorBegin, int operandBegin, int usage, ICompileDepthState stateCache) + { + OperatorBegin = operatorBegin; + OperandBegin = operandBegin; + Usage = usage; + StateCache = stateCache; + } + + public bool IsBeginOfBlock { get; internal set; } + + public ICompileDepthState StateCache { get; internal set; } + + public int OperandBegin { get; internal set; } + + public int OperatorBegin { get; internal set; } + + public int Usage { get; internal set; } + + } +} diff --git a/StgSharp.RegularAnalysis/Abstraction/CompileStack.cs b/StgSharp.RegularAnalysis/Abstraction/CompileStack.cs index 9fc946cf..a33cf88b 100644 --- a/StgSharp.RegularAnalysis/Abstraction/CompileStack.cs +++ b/StgSharp.RegularAnalysis/Abstraction/CompileStack.cs @@ -1,199 +1,199 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="CompileStack" -// 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 System; -using System.Collections.Generic; -using System.Data; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.RegularAnalysis.Abstraction -{ - public partial class CompileStack where TNode : ISyntaxNode - where TLabel : unmanaged - { - - private readonly RandomAccessibleStack _depthMarks = []; - private readonly RandomAccessibleStack _operands = []; - private readonly RandomAccessibleStack _operators = []; - - public CompileStack() - { - _depthMarks.Push(new DepthMark(0, 0, 0)); - } - - public int OperandInDepthCount - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => _operands.Count - _depthMarks.Peek().OperandPos; - } - - public int OperatorInDepthCount - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => _operators.Count - _depthMarks.Peek().OperatorPos; - } - - public int Depth - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => _depthMarks.Count; - } - - private record struct DepthMark( - int OperandPos, - int OperatorPos, - int Mark - ); - - #region operator - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public TNode PopOperator( - ) - { - if (OperatorInDepthCount > 0) { - return _operators.Pop(); - } - return TNode.Empty; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void PushOperator( - TNode operatorNode - ) - { - _operators.Push(operatorNode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public bool TryPopOperator( - out TNode op - ) - { - if (OperatorInDepthCount > 0) - { - op = _operators.Pop(); - return true; - } - op = TNode.Empty; - return false; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public bool TryPeekOperator( - out TNode op - ) - { - if (OperatorInDepthCount > 0) - { - op = _operators.Peek(); - return true; - } - op = TNode.Empty; - return false; - } - - #endregion - - #region operand - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public TNode PopOperand( - ) - { - if (OperandInDepthCount > 0) { - return _operands.Pop(); - } - return TNode.Empty; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void PushOperand( - TNode operatorNode - ) - { - _operands.Push(operatorNode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public bool TryPopOperand( - out TNode op - ) - { - if (OperandInDepthCount > 0) - { - op = _operands.Pop(); - return true; - } - op = TNode.Empty; - return false; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public bool TryPeekOperand( - out TNode op - ) - { - if (OperandInDepthCount > 0) - { - op = _operands.Peek(); - return true; - } - op = TNode.Empty; - return false; - } - - #endregion - - #region depth - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void DecreaseDepth( - ) - { - if (Depth > 1) - { - DepthMark mark = _depthMarks.Pop(); - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void IncreaseDepth( - int mark - ) - { - _depthMarks.Push(new DepthMark(_operands.Count, _operators.Count, mark)); - } - - #endregion - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="CompileStack" +// 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 System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.RegularAnalysis.Abstraction +{ + public partial class CompileStack where TNode : ISyntaxNode + where TLabel : unmanaged + { + + private readonly RandomAccessibleStack _depthMarks = []; + private readonly RandomAccessibleStack _operands = []; + private readonly RandomAccessibleStack _operators = []; + + public CompileStack() + { + _depthMarks.Push(new DepthMark(0, 0, 0)); + } + + public int OperandInDepthCount + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => _operands.Count - _depthMarks.Peek().OperandPos; + } + + public int OperatorInDepthCount + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => _operators.Count - _depthMarks.Peek().OperatorPos; + } + + public int Depth + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => _depthMarks.Count; + } + + private record struct DepthMark( + int OperandPos, + int OperatorPos, + int Mark + ); + + #region operator + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public TNode PopOperator( + ) + { + if (OperatorInDepthCount > 0) { + return _operators.Pop(); + } + return TNode.Empty; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void PushOperator( + TNode operatorNode + ) + { + _operators.Push(operatorNode); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool TryPopOperator( + out TNode op + ) + { + if (OperatorInDepthCount > 0) + { + op = _operators.Pop(); + return true; + } + op = TNode.Empty; + return false; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool TryPeekOperator( + out TNode op + ) + { + if (OperatorInDepthCount > 0) + { + op = _operators.Peek(); + return true; + } + op = TNode.Empty; + return false; + } + + #endregion + + #region operand + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public TNode PopOperand( + ) + { + if (OperandInDepthCount > 0) { + return _operands.Pop(); + } + return TNode.Empty; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void PushOperand( + TNode operatorNode + ) + { + _operands.Push(operatorNode); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool TryPopOperand( + out TNode op + ) + { + if (OperandInDepthCount > 0) + { + op = _operands.Pop(); + return true; + } + op = TNode.Empty; + return false; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool TryPeekOperand( + out TNode op + ) + { + if (OperandInDepthCount > 0) + { + op = _operands.Peek(); + return true; + } + op = TNode.Empty; + return false; + } + + #endregion + + #region depth + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void DecreaseDepth( + ) + { + if (Depth > 1) + { + DepthMark mark = _depthMarks.Pop(); + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void IncreaseDepth( + int mark + ) + { + _depthMarks.Push(new DepthMark(_operands.Count, _operators.Count, mark)); + } + + #endregion + } +} diff --git a/StgSharp.RegularAnalysis/Abstraction/ISyntaxNode.cs b/StgSharp.RegularAnalysis/Abstraction/ISyntaxNode.cs index 3ddad59e..0d816001 100644 --- a/StgSharp.RegularAnalysis/Abstraction/ISyntaxNode.cs +++ b/StgSharp.RegularAnalysis/Abstraction/ISyntaxNode.cs @@ -1,82 +1,82 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ISyntaxNode" -// 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 System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Text; - -namespace StgSharp.RegularAnalysis.Abstraction -{ - public interface ISyntaxNode where TNode : ISyntaxNode - where TLabel : unmanaged - { - - long NodeFlag { get; } - - string CodeConvertTemplate { get; } - - TLabel EqualityTypeConvert { get; } - - TNode Previous { get; set; } - - TNode Next { get; set; } - - TNode Left { get; set; } - - TNode Right { get; set; } - - TNode Parent { get; set; } - - static abstract TNode Empty { get; } - - Token Source { get; } - - protected internal int EnumState { get; set; } - - void AppendNode( - TNode nextToken - ); - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static virtual bool IsNullOrEmpty( - TNode node - ) - { - return node is null || node.Equals(TNode.Empty); - } - - void PrependNode( - TNode previousNode - ); - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ISyntaxNode" +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Text; + +namespace StgSharp.RegularAnalysis.Abstraction +{ + public interface ISyntaxNode where TNode : ISyntaxNode + where TLabel : unmanaged + { + + long NodeFlag { get; } + + string CodeConvertTemplate { get; } + + TLabel EqualityTypeConvert { get; } + + TNode Previous { get; set; } + + TNode Next { get; set; } + + TNode Left { get; set; } + + TNode Right { get; set; } + + TNode Parent { get; set; } + + static abstract TNode Empty { get; } + + Token Source { get; } + + protected internal int EnumState { get; set; } + + void AppendNode( + TNode nextToken + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static virtual bool IsNullOrEmpty( + TNode node + ) + { + return node is null || node.Equals(TNode.Empty); + } + + void PrependNode( + TNode previousNode + ); + + } +} diff --git a/StgSharp.RegularAnalysis/Abstraction/ITokenParser.cs b/StgSharp.RegularAnalysis/Abstraction/ITokenParser.cs index b8a66b28..1c0aa3c2 100644 --- a/StgSharp.RegularAnalysis/Abstraction/ITokenParser.cs +++ b/StgSharp.RegularAnalysis/Abstraction/ITokenParser.cs @@ -1,51 +1,51 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ITokenParser" -// 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.RegularAnalysis.Abstraction -{ - public abstract class TokenParser : ITokenReader where TIn : unmanaged - where TOut : unmanaged - { - - public abstract bool IsEmpty { get; } - - protected internal ITokenReader Source { get; internal set; } - - public abstract Token ReadToken(); - - public abstract bool TryReadToken( - out Token t - ); - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ITokenParser" +// 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.RegularAnalysis.Abstraction +{ + public abstract class TokenParser : ITokenReader where TIn : unmanaged + where TOut : unmanaged + { + + public abstract bool IsEmpty { get; } + + protected internal ITokenReader Source { get; internal set; } + + public abstract Token ReadToken(); + + public abstract bool TryReadToken( + out Token t + ); + + } +} diff --git a/StgSharp.RegularAnalysis/Abstraction/ITokenReader.cs b/StgSharp.RegularAnalysis/Abstraction/ITokenReader.cs index a603d34e..3d44aef2 100644 --- a/StgSharp.RegularAnalysis/Abstraction/ITokenReader.cs +++ b/StgSharp.RegularAnalysis/Abstraction/ITokenReader.cs @@ -1,59 +1,59 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ITokenReader" -// 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; - -namespace StgSharp.RegularAnalysis.Abstraction -{ - public static class TokenReader - { - - public static TokenParser Pipe( - this ITokenReader source, - Func> builder - ) where TIn : unmanaged where TOut : unmanaged - { - TokenParser parser = builder(); - parser.Source = source; - return parser; - } - - } - - public interface ITokenReader where TLabel : unmanaged - { - - bool IsEmpty { get; } - - Token ReadToken(); - - bool TryReadToken( - out Token t - ); - - } +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ITokenReader" +// 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; + +namespace StgSharp.RegularAnalysis.Abstraction +{ + public static class TokenReader + { + + public static TokenParser Pipe( + this ITokenReader source, + Func> builder + ) where TIn : unmanaged where TOut : unmanaged + { + TokenParser parser = builder(); + parser.Source = source; + return parser; + } + + } + + public interface ITokenReader where TLabel : unmanaged + { + + bool IsEmpty { get; } + + Token ReadToken(); + + bool TryReadToken( + out Token t + ); + + } } \ No newline at end of file diff --git a/StgSharp.RegularAnalysis/Abstraction/Token.cs b/StgSharp.RegularAnalysis/Abstraction/Token.cs index e35df5e0..17c19cc8 100644 --- a/StgSharp.RegularAnalysis/Abstraction/Token.cs +++ b/StgSharp.RegularAnalysis/Abstraction/Token.cs @@ -1,118 +1,118 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="Token" -// 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.RegularAnalysis.Abstraction -{ - public readonly struct Token where TLabel : unmanaged - { - - private static readonly Token EmptyToken = new Token(); - - public readonly int Column; - public readonly int Line; - public readonly string Value; - public readonly TLabel Flag; - - public Token() - { - Column = 0; - Line = 0; - Value = string.Empty; - Flag = default; - } - - public Token( - string chars, - int lineNumber, - int columnNumber, - TLabel flag - ) - { - Value = chars; - Line = lineNumber; - Column = columnNumber; - Flag = flag; - } - - public static Token Empty => EmptyToken; - - public override bool Equals( - [NotNullWhen(true)] object? obj - ) - { - return base.Equals(obj); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public Token ReLocate( - int line, - int column - ) - { - return new Token(Value, line, column, Flag); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public Token Remark( - TNewLabel label - ) where TNewLabel : unmanaged - { - return new Token(Value, Line, Column, label); - } - - public static bool operator !=( - Token left, - Token right - ) - { - return !left.Value.SequenceEqual(right.Value) || - left.Line != right.Line || - left.Column != right.Column || - !left.Flag.Equals(right.Flag); - } - - public static bool operator ==( - Token left, - Token right - ) - { - return left.Value.SequenceEqual(right.Value) && - left.Line == right.Line && - left.Column == right.Column && - left.Flag.Equals(right.Flag); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="Token" +// 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.RegularAnalysis.Abstraction +{ + public readonly struct Token where TLabel : unmanaged + { + + private static readonly Token EmptyToken = new Token(); + + public readonly int Column; + public readonly int Line; + public readonly string Value; + public readonly TLabel Flag; + + public Token() + { + Column = 0; + Line = 0; + Value = string.Empty; + Flag = default; + } + + public Token( + string chars, + int lineNumber, + int columnNumber, + TLabel flag + ) + { + Value = chars; + Line = lineNumber; + Column = columnNumber; + Flag = flag; + } + + public static Token Empty => EmptyToken; + + public override bool Equals( + [NotNullWhen(true)] object? obj + ) + { + return base.Equals(obj); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Token ReLocate( + int line, + int column + ) + { + return new Token(Value, line, column, Flag); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Token Remark( + TNewLabel label + ) where TNewLabel : unmanaged + { + return new Token(Value, Line, Column, label); + } + + public static bool operator !=( + Token left, + Token right + ) + { + return !left.Value.SequenceEqual(right.Value) || + left.Line != right.Line || + left.Column != right.Column || + !left.Flag.Equals(right.Flag); + } + + public static bool operator ==( + Token left, + Token right + ) + { + return left.Value.SequenceEqual(right.Value) && + left.Line == right.Line && + left.Column == right.Column && + left.Flag.Equals(right.Flag); + } + + } +} diff --git a/StgSharp.RegularAnalysis/Global.cs b/StgSharp.RegularAnalysis/Global.cs index ca8018d3..c9bc3b52 100644 --- a/StgSharp.RegularAnalysis/Global.cs +++ b/StgSharp.RegularAnalysis/Global.cs @@ -1,35 +1,35 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// 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. -// -// ----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; - +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// 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. +// +// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + [assembly: InternalsVisibleTo("StgSharpDebug")] \ No newline at end of file diff --git a/StgSharp.RegularAnalysis/GroupIndex.cs b/StgSharp.RegularAnalysis/GroupIndex.cs index 1b69f077..f77a6c7c 100644 --- a/StgSharp.RegularAnalysis/GroupIndex.cs +++ b/StgSharp.RegularAnalysis/GroupIndex.cs @@ -1,50 +1,50 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="GroupIndex" -// 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.Runtime.InteropServices; - -namespace StgSharp.RegularAnalysis -{ - public record struct GroupIndex - { - - public GroupIndex( - int index, - string name - ) - { - Index = index; - Name = name; - } - - public int Index { get; internal set; } - - public string Name { get; internal set; } - - } -} - +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="GroupIndex" +// 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.Runtime.InteropServices; + +namespace StgSharp.RegularAnalysis +{ + public record struct GroupIndex + { + + public GroupIndex( + int index, + string name + ) + { + Index = index; + Name = name; + } + + public int Index { get; internal set; } + + public string Name { get; internal set; } + + } +} + diff --git a/StgSharp.RegularAnalysis/RegularMachine/Node.Boarder.cs b/StgSharp.RegularAnalysis/RegularMachine/Node.Boarder.cs index 8c24abd3..3b8cdf5d 100644 --- a/StgSharp.RegularAnalysis/RegularMachine/Node.Boarder.cs +++ b/StgSharp.RegularAnalysis/RegularMachine/Node.Boarder.cs @@ -1,97 +1,97 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="Node.Boarder" -// 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.RegularAnalysis -{ - internal class RegularExpressionLeftBoarderNode : RegularStateNode - { - - public RegularExpressionLeftBoarderNode( - int index, - string name - ) - { - Boarder = new GroupIndex - { - Index = index, - Name = name - }; - } - - public event EventHandler OnBoarderEntered; - - public GroupIndex Boarder { get; private set; } - - public override NodeType Type => NodeType.LEFT_BOARDER; - - public override bool IsValidateFrom( - RegularStateNode former, - RegularContext context - ) - { - return true; - } - - } - - internal class RegularExpressionRightBoarderNode : RegularStateNode - { - - public RegularExpressionRightBoarderNode( - int index, - string name - ) - { - Boarder = new GroupIndex - { - Index = index, - Name = name - }; - } - - public event EventHandler OnBoarderEntered; - - public GroupIndex Boarder { get; private set; } - - public override NodeType Type => NodeType.RIGHT_BOARDER; - - public override bool IsValidateFrom( - RegularStateNode former, - RegularContext context - ) - { - return true; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="Node.Boarder" +// 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.RegularAnalysis +{ + internal class RegularExpressionLeftBoarderNode : RegularStateNode + { + + public RegularExpressionLeftBoarderNode( + int index, + string name + ) + { + Boarder = new GroupIndex + { + Index = index, + Name = name + }; + } + + public event EventHandler OnBoarderEntered; + + public GroupIndex Boarder { get; private set; } + + public override NodeType Type => NodeType.LEFT_BOARDER; + + public override bool IsValidateFrom( + RegularStateNode former, + RegularContext context + ) + { + return true; + } + + } + + internal class RegularExpressionRightBoarderNode : RegularStateNode + { + + public RegularExpressionRightBoarderNode( + int index, + string name + ) + { + Boarder = new GroupIndex + { + Index = index, + Name = name + }; + } + + public event EventHandler OnBoarderEntered; + + public GroupIndex Boarder { get; private set; } + + public override NodeType Type => NodeType.RIGHT_BOARDER; + + public override bool IsValidateFrom( + RegularStateNode former, + RegularContext context + ) + { + return true; + } + + } +} diff --git a/StgSharp.RegularAnalysis/RegularMachine/Node.Branch.cs b/StgSharp.RegularAnalysis/RegularMachine/Node.Branch.cs index ccf8e87d..dd871f26 100644 --- a/StgSharp.RegularAnalysis/RegularMachine/Node.Branch.cs +++ b/StgSharp.RegularAnalysis/RegularMachine/Node.Branch.cs @@ -1,107 +1,107 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="Node.Branch" -// 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.Contracts; -using System.Linq; -using System.Text; -using System.Text.RegularExpressions; -using System.Threading.Tasks; - -namespace StgSharp.RegularAnalysis -{ - internal sealed class RegularBranchNode : RegularStateNode - { - - private int _afterBranch; - - private int _lastBranch; - - private List _result; - - public override NodeType Type => NodeType.BRANCH; - - public override bool IsValidateFrom( - RegularStateNode former, - RegularContext context - ) - { - return true; - } - - public override bool TryTransaction( - ReadOnlySpan nodeSpan, - RegularContext context, - out int label - ) - { - if (context.StateCode == 0) - { - // branch match - label = _afterBranch; - _ = context.LastBranch.Pop(); - _lastBranch = 0; - return true; - } - - // restore sequence position - int pos = context.LastBranch.Peek(); - context.Position = pos; - if (AvailableNodes.Length > _lastBranch) - { - label = FailNodeIndex; - return false; - } - _lastBranch++; - label = AvailableNodes[_lastBranch]; - return true; - } - - } - - internal struct BranchMeasureResult - { - - internal BranchMeasureResult( - bool match, - int size - ) - { - IsMatch = match; - - Length = size; - } - - public bool IsMatch { get; init; } - - public static BranchMeasureResult Fail { get; } = new BranchMeasureResult(); - - public int Length { get; init; } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="Node.Branch" +// 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.Contracts; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; + +namespace StgSharp.RegularAnalysis +{ + internal sealed class RegularBranchNode : RegularStateNode + { + + private int _afterBranch; + + private int _lastBranch; + + private List _result; + + public override NodeType Type => NodeType.BRANCH; + + public override bool IsValidateFrom( + RegularStateNode former, + RegularContext context + ) + { + return true; + } + + public override bool TryTransaction( + ReadOnlySpan nodeSpan, + RegularContext context, + out int label + ) + { + if (context.StateCode == 0) + { + // branch match + label = _afterBranch; + _ = context.LastBranch.Pop(); + _lastBranch = 0; + return true; + } + + // restore sequence position + int pos = context.LastBranch.Peek(); + context.Position = pos; + if (AvailableNodes.Length > _lastBranch) + { + label = FailNodeIndex; + return false; + } + _lastBranch++; + label = AvailableNodes[_lastBranch]; + return true; + } + + } + + internal struct BranchMeasureResult + { + + internal BranchMeasureResult( + bool match, + int size + ) + { + IsMatch = match; + + Length = size; + } + + public bool IsMatch { get; init; } + + public static BranchMeasureResult Fail { get; } = new BranchMeasureResult(); + + public int Length { get; init; } + + } +} diff --git a/StgSharp.RegularAnalysis/RegularMachine/Node.Char.cs b/StgSharp.RegularAnalysis/RegularMachine/Node.Char.cs index d2d4b651..57460392 100644 --- a/StgSharp.RegularAnalysis/RegularMachine/Node.Char.cs +++ b/StgSharp.RegularAnalysis/RegularMachine/Node.Char.cs @@ -1,196 +1,196 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="Node.Char" -// 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.State; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.RegularAnalysis -{ - internal enum EpsilonKind - { - - Always, - Begin, - End, - LineBegin, - LineEnd, - WordBoundary, - NonWordBoundary - - } - - internal class RegularExpressionEpsilonNode : RegularStateNode - { - - public RegularExpressionEpsilonNode( - EpsilonKind kind = EpsilonKind.Always - ) - { - Kind = kind; - } - - public EpsilonKind Kind { get; } - - public override NodeType Type => NodeType.EPSILON; - - public override bool IsValidateFrom( - RegularStateNode former, - RegularContext context - ) - { - int pos = context.Position; - int len = context.Source?.Length ?? 0; - - bool PrevIsWord() - { - if (pos - 1 < 0 || pos - 1 >= len) { - return false; - } - - char c = context.Source[pos - 1]; - return char.IsLetterOrDigit(c) || c == '_'; - } - - bool NextIsWord() - { - if (pos < 0 || pos >= len) { - return false; - } - - char c = context.Source[pos]; - return char.IsLetterOrDigit(c) || c == '_'; - } - - switch (Kind) - { - case EpsilonKind.Always: - return true; - case EpsilonKind.Begin: - return pos == context.Begin; - case EpsilonKind.End: - return pos == len; - case EpsilonKind.LineBegin: - if (pos == 0) { - return true; - } - - if (pos - 1 < 0 || pos - 1 >= len) { - return false; - } - - return context.Source[pos - 1] == '\n' || context.Source[pos - 1] == '\r'; - case EpsilonKind.LineEnd: - if (pos == len) { - return true; - } - - if (pos < 0 || pos >= len) { - return false; - } - - return context.Source[pos] == '\n' || context.Source[pos] == '\r'; - case EpsilonKind.WordBoundary: - return PrevIsWord() != NextIsWord(); - case EpsilonKind.NonWordBoundary: - return PrevIsWord() == NextIsWord(); - default: - return false; - } - } - - } - - internal class RegularExpressionCharNode : RegularStateNode - { - - private char _char; - - public RegularExpressionCharNode( - char c - ) - { - _char = c; - } - - public override NodeType Type => NodeType.CHAR; - - public override bool IsValidateFrom( - RegularStateNode former, - RegularContext context - ) - { - int pos = context.Position; - char c = context.CurrentCharSpan[pos + 1]; - return c == _char; - } - - } - - internal class RegularExpressionCharsetNode : RegularStateNode - { - - private bool _isNegated; - private HashSet _charset; - - public RegularExpressionCharsetNode( - IEnumerable charset, - bool isNegated = false - ) - { - _charset = new(charset); - _isNegated = isNegated; - } - - public RegularExpressionCharsetNode( - ReadOnlySpan charset, - bool isNegated = false - ) - { - _charset = new(charset.Length); - _isNegated = isNegated; - } - - public override NodeType Type => NodeType.CHARSET; - - public override bool IsValidateFrom( - RegularStateNode former, - RegularContext context - ) - { - int pos = context.Position; - char c = context.CurrentCharSpan[pos + 1]; - bool contains = _charset.Contains(c); - return _isNegated ? !contains : contains; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="Node.Char" +// 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.State; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.RegularAnalysis +{ + internal enum EpsilonKind + { + + Always, + Begin, + End, + LineBegin, + LineEnd, + WordBoundary, + NonWordBoundary + + } + + internal class RegularExpressionEpsilonNode : RegularStateNode + { + + public RegularExpressionEpsilonNode( + EpsilonKind kind = EpsilonKind.Always + ) + { + Kind = kind; + } + + public EpsilonKind Kind { get; } + + public override NodeType Type => NodeType.EPSILON; + + public override bool IsValidateFrom( + RegularStateNode former, + RegularContext context + ) + { + int pos = context.Position; + int len = context.Source?.Length ?? 0; + + bool PrevIsWord() + { + if (pos - 1 < 0 || pos - 1 >= len) { + return false; + } + + char c = context.Source[pos - 1]; + return char.IsLetterOrDigit(c) || c == '_'; + } + + bool NextIsWord() + { + if (pos < 0 || pos >= len) { + return false; + } + + char c = context.Source[pos]; + return char.IsLetterOrDigit(c) || c == '_'; + } + + switch (Kind) + { + case EpsilonKind.Always: + return true; + case EpsilonKind.Begin: + return pos == context.Begin; + case EpsilonKind.End: + return pos == len; + case EpsilonKind.LineBegin: + if (pos == 0) { + return true; + } + + if (pos - 1 < 0 || pos - 1 >= len) { + return false; + } + + return context.Source[pos - 1] == '\n' || context.Source[pos - 1] == '\r'; + case EpsilonKind.LineEnd: + if (pos == len) { + return true; + } + + if (pos < 0 || pos >= len) { + return false; + } + + return context.Source[pos] == '\n' || context.Source[pos] == '\r'; + case EpsilonKind.WordBoundary: + return PrevIsWord() != NextIsWord(); + case EpsilonKind.NonWordBoundary: + return PrevIsWord() == NextIsWord(); + default: + return false; + } + } + + } + + internal class RegularExpressionCharNode : RegularStateNode + { + + private char _char; + + public RegularExpressionCharNode( + char c + ) + { + _char = c; + } + + public override NodeType Type => NodeType.CHAR; + + public override bool IsValidateFrom( + RegularStateNode former, + RegularContext context + ) + { + int pos = context.Position; + char c = context.CurrentCharSpan[pos + 1]; + return c == _char; + } + + } + + internal class RegularExpressionCharsetNode : RegularStateNode + { + + private bool _isNegated; + private HashSet _charset; + + public RegularExpressionCharsetNode( + IEnumerable charset, + bool isNegated = false + ) + { + _charset = new(charset); + _isNegated = isNegated; + } + + public RegularExpressionCharsetNode( + ReadOnlySpan charset, + bool isNegated = false + ) + { + _charset = new(charset.Length); + _isNegated = isNegated; + } + + public override NodeType Type => NodeType.CHARSET; + + public override bool IsValidateFrom( + RegularStateNode former, + RegularContext context + ) + { + int pos = context.Position; + char c = context.CurrentCharSpan[pos + 1]; + bool contains = _charset.Contains(c); + return _isNegated ? !contains : contains; + } + + } +} diff --git a/StgSharp.RegularAnalysis/RegularMachine/Node.Count.cs b/StgSharp.RegularAnalysis/RegularMachine/Node.Count.cs index 5a17b8cd..b1b0792e 100644 --- a/StgSharp.RegularAnalysis/RegularMachine/Node.Count.cs +++ b/StgSharp.RegularAnalysis/RegularMachine/Node.Count.cs @@ -1,73 +1,73 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="Node.Count" -// 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.RegularAnalysis -{ - internal class RegularExpressionCounterNode : RegularStateNode - { - - private readonly int _maxCount; - private readonly int _minCount; - - public RegularExpressionCounterNode( - int minCount, - bool isEager - ) - { - _minCount = minCount; - IsEager = isEager; - } - - public bool IsEager { get; init; } - - public int Count { get; private set; } - - public override NodeType Type => NodeType.COUNT; - - public RegularStateNode LoopBack { get; set; } - - public override bool IsValidateFrom( - RegularStateNode former, - RegularContext context - ) - { - return true; - } - - public void Reset() - { - Count = 0; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="Node.Count" +// 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.RegularAnalysis +{ + internal class RegularExpressionCounterNode : RegularStateNode + { + + private readonly int _maxCount; + private readonly int _minCount; + + public RegularExpressionCounterNode( + int minCount, + bool isEager + ) + { + _minCount = minCount; + IsEager = isEager; + } + + public bool IsEager { get; init; } + + public int Count { get; private set; } + + public override NodeType Type => NodeType.COUNT; + + public RegularStateNode LoopBack { get; set; } + + public override bool IsValidateFrom( + RegularStateNode former, + RegularContext context + ) + { + return true; + } + + public void Reset() + { + Count = 0; + } + + } +} diff --git a/StgSharp.RegularAnalysis/RegularMachine/Node.Sequence.cs b/StgSharp.RegularAnalysis/RegularMachine/Node.Sequence.cs index 93d2788a..d6b27eae 100644 --- a/StgSharp.RegularAnalysis/RegularMachine/Node.Sequence.cs +++ b/StgSharp.RegularAnalysis/RegularMachine/Node.Sequence.cs @@ -1,27 +1,27 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection.Emit; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.RegularAnalysis -{ - internal sealed class RegularSequenceNode : RegularStateNode - { - - private string _sequence; - - public override NodeType Type => NodeType.SEQUENCE; - - public override bool IsValidateFrom( - RegularStateNode former, - RegularContext context - ) - { - int pos = context.Position + 1; - return context.CurrentCharSpan[pos.._sequence.Length].SequenceEqual(_sequence); - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection.Emit; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.RegularAnalysis +{ + internal sealed class RegularSequenceNode : RegularStateNode + { + + private string _sequence; + + public override NodeType Type => NodeType.SEQUENCE; + + public override bool IsValidateFrom( + RegularStateNode former, + RegularContext context + ) + { + int pos = context.Position + 1; + return context.CurrentCharSpan[pos.._sequence.Length].SequenceEqual(_sequence); + } + + } +} diff --git a/StgSharp.RegularAnalysis/RegularMachine/Node.cs b/StgSharp.RegularAnalysis/RegularMachine/Node.cs index 453a8032..a2a6c71c 100644 --- a/StgSharp.RegularAnalysis/RegularMachine/Node.cs +++ b/StgSharp.RegularAnalysis/RegularMachine/Node.cs @@ -1,70 +1,70 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="Node" -// 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.State; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.RegularAnalysis -{ - internal abstract class RegularStateNode : SimpleStateMachineNode - { - - public int FailNodeIndex { get; set; } - - public abstract NodeType Type { get; } - - public override bool TryTransaction( - ReadOnlySpan nodeSpan, - RegularContext context, - out int label - ) - { - int pos = context.Position; - if (pos < 0) - { - label = FailNodeIndex; - return false; - } - char c = context.CurrentCharSpan[pos]; - foreach (int index in AvailableNodes) - { - if (nodeSpan[index].IsValidateFrom(this, context)) - { - label = index; - return true; - } - } - label = FailNodeIndex; - return false; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="Node" +// 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.State; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.RegularAnalysis +{ + internal abstract class RegularStateNode : SimpleStateMachineNode + { + + public int FailNodeIndex { get; set; } + + public abstract NodeType Type { get; } + + public override bool TryTransaction( + ReadOnlySpan nodeSpan, + RegularContext context, + out int label + ) + { + int pos = context.Position; + if (pos < 0) + { + label = FailNodeIndex; + return false; + } + char c = context.CurrentCharSpan[pos]; + foreach (int index in AvailableNodes) + { + if (nodeSpan[index].IsValidateFrom(this, context)) + { + label = index; + return true; + } + } + label = FailNodeIndex; + return false; + } + + } +} diff --git a/StgSharp.RegularAnalysis/RegularMachine/NodeType.cs b/StgSharp.RegularAnalysis/RegularMachine/NodeType.cs index 2336aec5..405a59a3 100644 --- a/StgSharp.RegularAnalysis/RegularMachine/NodeType.cs +++ b/StgSharp.RegularAnalysis/RegularMachine/NodeType.cs @@ -1,65 +1,65 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="RegularExpression.NodeState" -// 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.RegularAnalysis -{ - internal enum NodeType - { - - // single unicode character: a、B、1、@、汉字 etc. - CHAR, - - // collections of finate characters: [abc]、[^abc]、\d、\w、\s、\D、\W、\S etc. - CHARSET, - - // increase count of a counter, half function of *+? quantifiers - COUNT, - - // left boarder of a sub sequnce, usually begin of match group or lookaround - LEFT_BOARDER, - - // right boarder of a sub sequnce, usually end of match group or lookaround - RIGHT_BOARDER, - - // zero length char or structure - EPSILON, - - // more than one cases to match, like alter|nation - BRANCH, - - // a sequence of nodes to match in order, each char should be fully defined but not charset - SEQUENCE - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="RegularExpression.NodeState" +// 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.RegularAnalysis +{ + internal enum NodeType + { + + // single unicode character: a、B、1、@、汉字 etc. + CHAR, + + // collections of finate characters: [abc]、[^abc]、\d、\w、\s、\D、\W、\S etc. + CHARSET, + + // increase count of a counter, half function of *+? quantifiers + COUNT, + + // left boarder of a sub sequnce, usually begin of match group or lookaround + LEFT_BOARDER, + + // right boarder of a sub sequnce, usually end of match group or lookaround + RIGHT_BOARDER, + + // zero length char or structure + EPSILON, + + // more than one cases to match, like alter|nation + BRANCH, + + // a sequence of nodes to match in order, each char should be fully defined but not charset + SEQUENCE + + } +} \ No newline at end of file diff --git a/StgSharp.RegularAnalysis/RegularMachine/StateMachine.cs b/StgSharp.RegularAnalysis/RegularMachine/StateMachine.cs index 774b5e1f..edce8232 100644 --- a/StgSharp.RegularAnalysis/RegularMachine/StateMachine.cs +++ b/StgSharp.RegularAnalysis/RegularMachine/StateMachine.cs @@ -1,138 +1,138 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="StateMachine" -// 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 StgSharp.State; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using System.Threading.Tasks; - -namespace StgSharp.RegularAnalysis -{ - internal class RegularExpressionState : ISimpleStateMachine - { - - private List _nodes; - private RegularStateNode _currentState; - - public RegularStateNode this[ - int label - ] => _nodes[label]; - - public ref readonly RegularStateNode GetCurrentStateNode() - { - throw new NotImplementedException(); - } - - public void Reset() - { - throw new NotImplementedException(); - } - - public bool TryMoveNext( - RegularContext ctx - ) - { - throw new NotImplementedException(); - } - - #region node factory - - public RegularExpressionCharNode AddChar( - char c - ) - { - RegularExpressionCharNode node = new RegularExpressionCharNode(c); - int index = _nodes.Count; - _nodes.Add(node); - node.FailNodeIndex = index; // Point to self by default - return node; - } - - public RegularExpressionCharsetNode AddCharset( - ReadOnlySpan chars, - bool isNegate - ) - { - RegularExpressionCharsetNode node = new RegularExpressionCharsetNode(chars, isNegate); - int index = _nodes.Count; - _nodes.Add(node); - node.FailNodeIndex = index; // Point to self by default - return node; - } - - public (RegularExpressionLeftBoarderNode left,RegularExpressionRightBoarderNode right) AddBoarder( - string groupName, - int groupIndex - ) - { - RegularExpressionLeftBoarderNode leftNode = new RegularExpressionLeftBoarderNode(groupIndex, groupName); - int leftIndex = _nodes.Count; - _nodes.Add(leftNode); - leftNode.FailNodeIndex = leftIndex; // Point to self by default - RegularExpressionRightBoarderNode rightNode = new RegularExpressionRightBoarderNode(groupIndex, groupName); - int rightIndex = _nodes.Count; - _nodes.Add(rightNode); - rightNode.FailNodeIndex = rightIndex; // Point to self by default - return (left: leftNode,right:rightNode); - } - - public RegularExpressionCounterNode AddCounter( - int minCount, - bool isEager - ) - { - RegularExpressionCounterNode node = new RegularExpressionCounterNode(minCount, isEager); - int index = _nodes.Count; - _nodes.Add(node); - node.FailNodeIndex = index; // Point to self by default - return node; - } - - #endregion - } - - internal class RegularContext : StateContext - { - - public int Begin { get; set; } - - public int Position { get; set; } = -1; - - public int StateCode { get; set; } = 0; - - public ReadOnlySpan CurrentCharSpan => Source.AsSpan()[Begin..Position]; - - public string Source { get; init; } - - internal Stack LastBranch { get; } = new(); - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="StateMachine" +// 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 StgSharp.State; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +using System.Threading.Tasks; + +namespace StgSharp.RegularAnalysis +{ + internal class RegularExpressionState : ISimpleStateMachine + { + + private List _nodes; + private RegularStateNode _currentState; + + public RegularStateNode this[ + int label + ] => _nodes[label]; + + public ref readonly RegularStateNode GetCurrentStateNode() + { + throw new NotImplementedException(); + } + + public void Reset() + { + throw new NotImplementedException(); + } + + public bool TryMoveNext( + RegularContext ctx + ) + { + throw new NotImplementedException(); + } + + #region node factory + + public RegularExpressionCharNode AddChar( + char c + ) + { + RegularExpressionCharNode node = new RegularExpressionCharNode(c); + int index = _nodes.Count; + _nodes.Add(node); + node.FailNodeIndex = index; // Point to self by default + return node; + } + + public RegularExpressionCharsetNode AddCharset( + ReadOnlySpan chars, + bool isNegate + ) + { + RegularExpressionCharsetNode node = new RegularExpressionCharsetNode(chars, isNegate); + int index = _nodes.Count; + _nodes.Add(node); + node.FailNodeIndex = index; // Point to self by default + return node; + } + + public (RegularExpressionLeftBoarderNode left,RegularExpressionRightBoarderNode right) AddBoarder( + string groupName, + int groupIndex + ) + { + RegularExpressionLeftBoarderNode leftNode = new RegularExpressionLeftBoarderNode(groupIndex, groupName); + int leftIndex = _nodes.Count; + _nodes.Add(leftNode); + leftNode.FailNodeIndex = leftIndex; // Point to self by default + RegularExpressionRightBoarderNode rightNode = new RegularExpressionRightBoarderNode(groupIndex, groupName); + int rightIndex = _nodes.Count; + _nodes.Add(rightNode); + rightNode.FailNodeIndex = rightIndex; // Point to self by default + return (left: leftNode,right:rightNode); + } + + public RegularExpressionCounterNode AddCounter( + int minCount, + bool isEager + ) + { + RegularExpressionCounterNode node = new RegularExpressionCounterNode(minCount, isEager); + int index = _nodes.Count; + _nodes.Add(node); + node.FailNodeIndex = index; // Point to self by default + return node; + } + + #endregion + } + + internal class RegularContext : StateContext + { + + public int Begin { get; set; } + + public int Position { get; set; } = -1; + + public int StateCode { get; set; } = 0; + + public ReadOnlySpan CurrentCharSpan => Source.AsSpan()[Begin..Position]; + + public string Source { get; init; } + + internal Stack LastBranch { get; } = new(); + + } +} diff --git a/StgSharp.RegularAnalysis/StgSharp.RegularAnalysis.csproj b/StgSharp.RegularAnalysis/StgSharp.RegularAnalysis.csproj index 5321bf24..d4495f72 100644 --- a/StgSharp.RegularAnalysis/StgSharp.RegularAnalysis.csproj +++ b/StgSharp.RegularAnalysis/StgSharp.RegularAnalysis.csproj @@ -1,7 +1,7 @@ - - - - - - - + + + + + + + diff --git a/StgSharp.RegularAnalysis/TextRegex/RegexAstNode.cs b/StgSharp.RegularAnalysis/TextRegex/RegexAstNode.cs index b4da0e6d..b40ece0c 100644 --- a/StgSharp.RegularAnalysis/TextRegex/RegexAstNode.cs +++ b/StgSharp.RegularAnalysis/TextRegex/RegexAstNode.cs @@ -1,212 +1,212 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="RegexAstNode" -// 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.RegularAnalysis.Abstraction; -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; -using System.Xml.Linq; - -namespace StgSharp.RegularAnalysis.TextRegex -{ - internal class RegexAstNode : ISyntaxNode - { - - // private RegexAstNode _left, _right; - - public RegexAstNode( - Token source - ) - { - Source = source; - } - - public int EnumState { get; set; } - - public long NodeFlag => (long)Source.Flag; - - public static RegexAstNode Empty { get; } - = new EmptyRegexAstNode(); - - public RegexAstNode Previous { get; set; } - - public RegexAstNode Next { get; set; } - - public RegexAstNode Parent { get; set; } - - public RegexAstNode Left - { - get; - set - { - _ = (field?.Parent = Empty); - field = value; - if (!IsNullOrEmpty(value)) { - value.Parent = this; - } - } - } - - public RegexAstNode Right - { - get; - set - { - _ = (field?.Parent = Empty); - field = value; - if (!IsNullOrEmpty(value)) { - value.Parent = this; - } - } - } - - public RegexElementLabel EqualityTypeConvert => Source.Flag; - - public string Value => Source.Value; - - public string CodeConvertTemplate { get; } - - public Token Source { get; private protected set; } - - public void AppendNode( - RegexAstNode nextToken - ) - { - Next = nextToken; - nextToken.Previous = this; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static (bool Valid, int Value) ComparePrecedence( - RegexElementLabel left, - RegexElementLabel right - ) - { - left &= RegexElementLabel.OPERATOR; - right &= RegexElementLabel.OPERATOR; - int v_left = (int)left, v_right = (int)right; - if (v_left == 0 || v_right == 0) { - return (false,0); - } - return (true,v_left - v_right); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool IsNullOrEmpty( - RegexAstNode node - ) - { - return node is null || ReferenceEquals(node, Empty); - } - /**/ - - public void PrependNode( - RegexAstNode previousNode - ) - { - Previous = previousNode; - previousNode.Next = this; - } - - public void RemoveChild( - RegexAstNode node - ) - { - if (Left == node) - { - Left = Empty; - } else if (Right == node) { - Right = Empty; - } - node.Parent = Empty; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static RegexAstNode NewEmptyNode( - ) - { - return new EmptyRegexAstNode(); - } - - internal void RemoveAndAsChild( - bool useLeft - ) - { - if (useLeft) - { - Source = Left.Source; - Left.Parent = Empty; - Left = Empty; - } else - { - Source = Right.Source; - Right.Parent = Empty; - Right = Empty; - } - } - /**/ - - internal void ReplaceBy( - RegexAstNode node - ) - { - Source = node.Source; - Left = node.Left; - Right = node.Right; - if (!IsNullOrEmpty(Left)) { - Left.Parent = this; - } - if (!IsNullOrEmpty(Right)) { - Right.Parent = this; - } - Previous = node.Previous; - Next = node.Next; - - RegexAstNode prev = Previous; - RegexAstNode next = Next; - if (!IsNullOrEmpty(prev)) { - prev.Next = this; - } - if (!IsNullOrEmpty(next)) { - next.Previous = this; - } - } - - private sealed class EmptyRegexAstNode : RegexAstNode - - { - - public EmptyRegexAstNode() : base(Token.Empty) { } - - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="RegexAstNode" +// 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.RegularAnalysis.Abstraction; +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Linq; + +namespace StgSharp.RegularAnalysis.TextRegex +{ + internal class RegexAstNode : ISyntaxNode + { + + // private RegexAstNode _left, _right; + + public RegexAstNode( + Token source + ) + { + Source = source; + } + + public int EnumState { get; set; } + + public long NodeFlag => (long)Source.Flag; + + public static RegexAstNode Empty { get; } + = new EmptyRegexAstNode(); + + public RegexAstNode Previous { get; set; } + + public RegexAstNode Next { get; set; } + + public RegexAstNode Parent { get; set; } + + public RegexAstNode Left + { + get; + set + { + _ = (field?.Parent = Empty); + field = value; + if (!IsNullOrEmpty(value)) { + value.Parent = this; + } + } + } + + public RegexAstNode Right + { + get; + set + { + _ = (field?.Parent = Empty); + field = value; + if (!IsNullOrEmpty(value)) { + value.Parent = this; + } + } + } + + public RegexElementLabel EqualityTypeConvert => Source.Flag; + + public string Value => Source.Value; + + public string CodeConvertTemplate { get; } + + public Token Source { get; private protected set; } + + public void AppendNode( + RegexAstNode nextToken + ) + { + Next = nextToken; + nextToken.Previous = this; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static (bool Valid, int Value) ComparePrecedence( + RegexElementLabel left, + RegexElementLabel right + ) + { + left &= RegexElementLabel.OPERATOR; + right &= RegexElementLabel.OPERATOR; + int v_left = (int)left, v_right = (int)right; + if (v_left == 0 || v_right == 0) { + return (false,0); + } + return (true,v_left - v_right); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool IsNullOrEmpty( + RegexAstNode node + ) + { + return node is null || ReferenceEquals(node, Empty); + } + /**/ + + public void PrependNode( + RegexAstNode previousNode + ) + { + Previous = previousNode; + previousNode.Next = this; + } + + public void RemoveChild( + RegexAstNode node + ) + { + if (Left == node) + { + Left = Empty; + } else if (Right == node) { + Right = Empty; + } + node.Parent = Empty; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static RegexAstNode NewEmptyNode( + ) + { + return new EmptyRegexAstNode(); + } + + internal void RemoveAndAsChild( + bool useLeft + ) + { + if (useLeft) + { + Source = Left.Source; + Left.Parent = Empty; + Left = Empty; + } else + { + Source = Right.Source; + Right.Parent = Empty; + Right = Empty; + } + } + /**/ + + internal void ReplaceBy( + RegexAstNode node + ) + { + Source = node.Source; + Left = node.Left; + Right = node.Right; + if (!IsNullOrEmpty(Left)) { + Left.Parent = this; + } + if (!IsNullOrEmpty(Right)) { + Right.Parent = this; + } + Previous = node.Previous; + Next = node.Next; + + RegexAstNode prev = Previous; + RegexAstNode next = Next; + if (!IsNullOrEmpty(prev)) { + prev.Next = this; + } + if (!IsNullOrEmpty(next)) { + next.Previous = this; + } + } + + private sealed class EmptyRegexAstNode : RegexAstNode + + { + + public EmptyRegexAstNode() : base(Token.Empty) { } + + } + + } +} diff --git a/StgSharp.RegularAnalysis/TextRegex/RegexElementLabel.cs b/StgSharp.RegularAnalysis/TextRegex/RegexElementLabel.cs index d2b21c17..67ee3515 100644 --- a/StgSharp.RegularAnalysis/TextRegex/RegexElementLabel.cs +++ b/StgSharp.RegularAnalysis/TextRegex/RegexElementLabel.cs @@ -1,56 +1,56 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="RegexElementLabel" -// 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.RegularAnalysis.TextRegex -{ - [Flags] - public enum RegexElementLabel - { - - NONE = 0, - UNIT = 1, - UNIT_SET = 2, - UNIT_SPAN = 4, - GROUP_BEGIN = 8, - GROUP_END = 16, - COUNT = 32, - CONCAT = 64, - ALT = 128, - SEQUENCE = UNIT | UNIT_SPAN | UNIT_SET, - SINGLE = UNIT | UNIT_SET, - OPERATOR = COUNT | ALT | CONCAT, - ATOM_BEGIN = SEQUENCE | GROUP_BEGIN , - ATOM_END = SEQUENCE | GROUP_END | COUNT, - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="RegexElementLabel" +// 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.RegularAnalysis.TextRegex +{ + [Flags] + public enum RegexElementLabel + { + + NONE = 0, + UNIT = 1, + UNIT_SET = 2, + UNIT_SPAN = 4, + GROUP_BEGIN = 8, + GROUP_END = 16, + COUNT = 32, + CONCAT = 64, + ALT = 128, + SEQUENCE = UNIT | UNIT_SPAN | UNIT_SET, + SINGLE = UNIT | UNIT_SET, + OPERATOR = COUNT | ALT | CONCAT, + ATOM_BEGIN = SEQUENCE | GROUP_BEGIN , + ATOM_END = SEQUENCE | GROUP_END | COUNT, + + } +} diff --git a/StgSharp.RegularAnalysis/TextRegex/RegexInterpreter.Optimize.cs b/StgSharp.RegularAnalysis/TextRegex/RegexInterpreter.Optimize.cs index a65462cf..4e422cb9 100644 --- a/StgSharp.RegularAnalysis/TextRegex/RegexInterpreter.Optimize.cs +++ b/StgSharp.RegularAnalysis/TextRegex/RegexInterpreter.Optimize.cs @@ -1,417 +1,417 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="RegexInterpreter.Optimize" -// 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.RegularAnalysis.Abstraction; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Net.Security; -using System.Runtime.CompilerServices; -using System.Security.Permissions; -using System.Text; -using System.Threading.Tasks; -using System.Xml.Linq; - -namespace StgSharp.RegularAnalysis.TextRegex -{ - public partial class RegexInterpreter - { - - private static RegexAstNode FlattenAlt( - RegexAstNode root - ) - { - TreeEnumerator enumerator = new(root); - List cases = []; - RegexAstNode current; - _ = enumerator.MoveNext(); // skip root - while (enumerator.MoveNext()) - { - current = enumerator.Current; - if (current.EqualityTypeConvert != RegexElementLabel.ALT) - { - cases.Add(current); - enumerator.SkipNode(current); - } - current.Parent.RemoveChild(current); - } - for (int i = 0; i < cases.Count - 1; i++) - { - cases[i].AppendNode(cases[i + 1]); - cases[i].Parent = root; - } - cases[^1].Parent = root; - return cases[0]; - } - - private static bool MergeConcat( - RegexAstNode root - ) - { - if (root.EqualityTypeConvert != RegexElementLabel.CONCAT) { - return false; - } - - /* - * concat → 'a' - * ╱ - * 'a' - */ - if ((root.Left.EqualityTypeConvert & RegexElementLabel.SEQUENCE) != 0 && - RegexAstNode.IsNullOrEmpty(root.Right)) - { - root.RemoveAndAsChild(true); - return true; - } - if ((root.Right.EqualityTypeConvert & RegexElementLabel.SEQUENCE) != 0 && - RegexAstNode.IsNullOrEmpty(root.Left)) - { - root.RemoveAndAsChild(false); - return true; - } - - /* - * concat → concat - * ╱ ╲ / - * 'a' concat "abc" - * / \ - * 'b' 'c' - */ - List buffer = []; - int length = 0; - RegexAstNode right = root.Right; - RegexAstNode left = root.Left; - if (left.EqualityTypeConvert != RegexElementLabel.UNIT_SPAN && - left.EqualityTypeConvert != RegexElementLabel.UNIT) { - return false; - } - string str = left.Value; - buffer.Add(str); - length += str.Length; - while (!RegexAstNode.IsNullOrEmpty(right) && - right.EqualityTypeConvert == RegexElementLabel.CONCAT) - { - left = right.Left; - if (left.EqualityTypeConvert != RegexElementLabel.UNIT_SPAN && - left.EqualityTypeConvert != RegexElementLabel.UNIT) - { - break; - } - str = left.Value; - buffer.Add(str); - length += str.Length; - root.Right = right.Right; - right.Parent = RegexAstNode.Empty; - right = root.Right; - right.Parent = root; - } - if (right.EqualityTypeConvert == RegexElementLabel.UNIT_SPAN || - right.EqualityTypeConvert == RegexElementLabel.UNIT) - { - root.Right = RegexAstNode.Empty; - buffer.Add(right.Value); - length += right.Value.Length; - } - str = string.Create(length, buffer, static( - span, - buffer - ) => { - int offset = 0; - for (int i = 0; i < buffer.Count; i++) - { - buffer[i].AsSpan().CopyTo(span[offset..]); - offset += buffer[i].Length; - } - }); - root.Left = new RegexAstNode(new Token(str, left.Source.Line, - left.Source.Column, - str.Length == 1 ? - RegexElementLabel.UNIT : - RegexElementLabel.UNIT_SPAN)); - return true; - } - - private static void RotateConcat( - RegexAstNode root - ) - { - RegexAstNode left = root.Left; - while (!RegexAstNode.IsNullOrEmpty(left) && - left.EqualityTypeConvert == RegexElementLabel.CONCAT) - { - /* - * root → root - * ╱ ╲ ╱ ╲ - * left c a left - * ╱ ╲ ╱ ╲ - * a b b c - */ - RegexAstNode a = left.Left; - RegexAstNode b = left.Right; - RegexAstNode c = root.Right; - root.Left = a; - if (RegexAstNode.IsNullOrEmpty(a)) { - a.Parent = root; - } - - root.Right = left; - left.Left = b; - left.Right = c; - if (RegexAstNode.IsNullOrEmpty(b)) { - b.Parent = left; - } - - if (RegexAstNode.IsNullOrEmpty(c)) { - c.Parent = left; - } - left = root.Left; - } - } - - #region merge alt - - /// - /// Get union beginning part of cases - /// - /// - /// - /// - /// - /// - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static RegexAstNode MergeAlt( - List cases - ) - { - UnionAlt union = new(0, cases); - RegexAstNode root = union.AsNormal(); - - return root; - } - - private class UnionAlt : RegexAstNode - { - - private const int MaxLevel = 8; - - private UnionAlt( - int level, - RegexAstNode node - ) - : base(node.Source) - { - Level = level; - Cases = new List(); - - RegexAstNode right = IsNullOrEmpty(node.Right) ? - new RegexAstNode( - new Token(node.Value, 0, node.Source.Column, - RegexElementLabel.UNIT) - ) : - node.Right; - Cases.Add(right); - - node.PrependNode(Empty); - node.AppendNode(Empty); - UnionBegin = node; - UnionEnd = node; - } - - public UnionAlt( - int level, - List c - ) - : base(c[0].Source) - { - Cases = c; - Level = level; - } - - public List Cases { get; set; } - - public RegexAstNode UnionBegin { get; set; } - - public RegexAstNode UnionEnd { get; set; } - - private int Level { get; set; } - - public RegexAstNode AsNormal() - { - if (Level >= MaxLevel) - { - goto build; - } - merge: - List buffer = []; - for (int i = 0; i < Cases.Count; i++) - { - if ((Cases[i].EqualityTypeConvert & RegexElementLabel.SEQUENCE) != 0) - { - RegexAstNode concat = new RegexAstNode(new Token(string.Empty, - 0, - Cases[i].Source.Column, - RegexElementLabel.CONCAT)); - concat.Left = Cases[i]; - Cases[i].Parent = concat; - concat.Right = Empty; - Cases[i] = concat; - } - RegexAstNode current = Cases[i]; - int j = 0; - for (; j < buffer.Count; j++) - { - if (CanMerge(current, buffer[j])) - { - // find a case in buffer that can merge with current case, - // then merge them and break - RegexAstNode b = buffer[j]; - if (b is not UnionAlt alt) - { - alt = new UnionAlt(Level + 1, b); - alt.AddCase(current); - buffer[j] = alt; - } else - { - alt.AddCase(current); - } - break; - } - } - if (j >= buffer.Count) { - buffer.Add(current); - } - } - if (Cases.Count != buffer.Count) { - Cases = buffer; - } - - if (buffer.Count == 1) - { - // if there is only one case, - // then we suppose that its contained cases has a same beginning, - // so we attach it to UnionEnd and stay level unchanged - UnionAlt alt = (Cases[0] as UnionAlt)!; - if (IsNullOrEmpty(UnionBegin)) - { - UnionBegin = alt.UnionBegin; - UnionEnd = alt.UnionEnd; - } else - { - alt.UnionBegin.Parent = UnionEnd; - UnionEnd.Right = alt.UnionBegin; - UnionEnd = alt.UnionBegin; - } - - Cases = alt.Cases; - goto merge; - } - - build: - - // suppose that from UnionBegin to UnionEnd is a normal form without union - for (int i = 0; i < Cases.Count; i++) - { - if (Cases[i] is UnionAlt union) { - Cases[i] = union.AsNormal(); - } - } - - RegexAstNode branch; - if (IsNullOrEmpty(UnionEnd)) - { - branch = new RegexAstNode(new Token(string.Empty, 0, - Source.Column, - RegexElementLabel.ALT)); - UnionBegin = branch; - UnionEnd = branch; - } else - { - branch = new RegexAstNode(new Token(string.Empty, 0, - UnionEnd.Source.Column, - RegexElementLabel.ALT)); - UnionEnd.Right = branch; - branch.Parent = UnionEnd; - UnionEnd = branch; - } - - for (int i = 0; i < Cases.Count - 1; i++) - { - Cases[i] ??= NewEmptyNode(); - Cases[i].AppendNode(Cases[i + 1]); - Cases[i].Parent = UnionEnd; - } - UnionEnd.Right = Cases[0]; - TreeEnumerator enumerator = new TreeEnumerator(UnionBegin); - - return UnionBegin; - } - - private void AddCase( - RegexAstNode _case - ) - { - RegexAstNode right = IsNullOrEmpty(_case.Right) ? - new RegexAstNode( - new Token(_case.Value, 0, _case.Source.Column, - RegexElementLabel.UNIT) - ) : - _case.Right; - Cases.Add(right); - } - - private static bool CanMerge( - RegexAstNode origin, - RegexAstNode target - ) - { - // suppose that origin is not a union, - if (target is UnionAlt alt) - { - // then we suppose that alt has only one are same - return origin .EqualityTypeConvert == RegexElementLabel.CONCAT && - (origin.Left.EqualityTypeConvert & RegexElementLabel.SINGLE) != 0 && - origin.Left.EqualityTypeConvert == alt.UnionEnd.Left.EqualityTypeConvert && - origin.Left.Value == alt.UnionEnd.Left.Value; - } else - { - return origin.EqualityTypeConvert == RegexElementLabel.CONCAT && - target.EqualityTypeConvert == RegexElementLabel.CONCAT && - (origin.Left.EqualityTypeConvert & RegexElementLabel.SINGLE) != 0 && - origin.Left.EqualityTypeConvert == target.Left.EqualityTypeConvert && - origin.Left.Value == target.Left.Value; - } - } - - } - - #endregion - - /**/ - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="RegexInterpreter.Optimize" +// 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.RegularAnalysis.Abstraction; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net.Security; +using System.Runtime.CompilerServices; +using System.Security.Permissions; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Linq; + +namespace StgSharp.RegularAnalysis.TextRegex +{ + public partial class RegexInterpreter + { + + private static RegexAstNode FlattenAlt( + RegexAstNode root + ) + { + TreeEnumerator enumerator = new(root); + List cases = []; + RegexAstNode current; + _ = enumerator.MoveNext(); // skip root + while (enumerator.MoveNext()) + { + current = enumerator.Current; + if (current.EqualityTypeConvert != RegexElementLabel.ALT) + { + cases.Add(current); + enumerator.SkipNode(current); + } + current.Parent.RemoveChild(current); + } + for (int i = 0; i < cases.Count - 1; i++) + { + cases[i].AppendNode(cases[i + 1]); + cases[i].Parent = root; + } + cases[^1].Parent = root; + return cases[0]; + } + + private static bool MergeConcat( + RegexAstNode root + ) + { + if (root.EqualityTypeConvert != RegexElementLabel.CONCAT) { + return false; + } + + /* + * concat → 'a' + * ╱ + * 'a' + */ + if ((root.Left.EqualityTypeConvert & RegexElementLabel.SEQUENCE) != 0 && + RegexAstNode.IsNullOrEmpty(root.Right)) + { + root.RemoveAndAsChild(true); + return true; + } + if ((root.Right.EqualityTypeConvert & RegexElementLabel.SEQUENCE) != 0 && + RegexAstNode.IsNullOrEmpty(root.Left)) + { + root.RemoveAndAsChild(false); + return true; + } + + /* + * concat → concat + * ╱ ╲ / + * 'a' concat "abc" + * / \ + * 'b' 'c' + */ + List buffer = []; + int length = 0; + RegexAstNode right = root.Right; + RegexAstNode left = root.Left; + if (left.EqualityTypeConvert != RegexElementLabel.UNIT_SPAN && + left.EqualityTypeConvert != RegexElementLabel.UNIT) { + return false; + } + string str = left.Value; + buffer.Add(str); + length += str.Length; + while (!RegexAstNode.IsNullOrEmpty(right) && + right.EqualityTypeConvert == RegexElementLabel.CONCAT) + { + left = right.Left; + if (left.EqualityTypeConvert != RegexElementLabel.UNIT_SPAN && + left.EqualityTypeConvert != RegexElementLabel.UNIT) + { + break; + } + str = left.Value; + buffer.Add(str); + length += str.Length; + root.Right = right.Right; + right.Parent = RegexAstNode.Empty; + right = root.Right; + right.Parent = root; + } + if (right.EqualityTypeConvert == RegexElementLabel.UNIT_SPAN || + right.EqualityTypeConvert == RegexElementLabel.UNIT) + { + root.Right = RegexAstNode.Empty; + buffer.Add(right.Value); + length += right.Value.Length; + } + str = string.Create(length, buffer, static( + span, + buffer + ) => { + int offset = 0; + for (int i = 0; i < buffer.Count; i++) + { + buffer[i].AsSpan().CopyTo(span[offset..]); + offset += buffer[i].Length; + } + }); + root.Left = new RegexAstNode(new Token(str, left.Source.Line, + left.Source.Column, + str.Length == 1 ? + RegexElementLabel.UNIT : + RegexElementLabel.UNIT_SPAN)); + return true; + } + + private static void RotateConcat( + RegexAstNode root + ) + { + RegexAstNode left = root.Left; + while (!RegexAstNode.IsNullOrEmpty(left) && + left.EqualityTypeConvert == RegexElementLabel.CONCAT) + { + /* + * root → root + * ╱ ╲ ╱ ╲ + * left c a left + * ╱ ╲ ╱ ╲ + * a b b c + */ + RegexAstNode a = left.Left; + RegexAstNode b = left.Right; + RegexAstNode c = root.Right; + root.Left = a; + if (RegexAstNode.IsNullOrEmpty(a)) { + a.Parent = root; + } + + root.Right = left; + left.Left = b; + left.Right = c; + if (RegexAstNode.IsNullOrEmpty(b)) { + b.Parent = left; + } + + if (RegexAstNode.IsNullOrEmpty(c)) { + c.Parent = left; + } + left = root.Left; + } + } + + #region merge alt + + /// + /// Get union beginning part of cases + /// + /// + /// + /// + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static RegexAstNode MergeAlt( + List cases + ) + { + UnionAlt union = new(0, cases); + RegexAstNode root = union.AsNormal(); + + return root; + } + + private class UnionAlt : RegexAstNode + { + + private const int MaxLevel = 8; + + private UnionAlt( + int level, + RegexAstNode node + ) + : base(node.Source) + { + Level = level; + Cases = new List(); + + RegexAstNode right = IsNullOrEmpty(node.Right) ? + new RegexAstNode( + new Token(node.Value, 0, node.Source.Column, + RegexElementLabel.UNIT) + ) : + node.Right; + Cases.Add(right); + + node.PrependNode(Empty); + node.AppendNode(Empty); + UnionBegin = node; + UnionEnd = node; + } + + public UnionAlt( + int level, + List c + ) + : base(c[0].Source) + { + Cases = c; + Level = level; + } + + public List Cases { get; set; } + + public RegexAstNode UnionBegin { get; set; } + + public RegexAstNode UnionEnd { get; set; } + + private int Level { get; set; } + + public RegexAstNode AsNormal() + { + if (Level >= MaxLevel) + { + goto build; + } + merge: + List buffer = []; + for (int i = 0; i < Cases.Count; i++) + { + if ((Cases[i].EqualityTypeConvert & RegexElementLabel.SEQUENCE) != 0) + { + RegexAstNode concat = new RegexAstNode(new Token(string.Empty, + 0, + Cases[i].Source.Column, + RegexElementLabel.CONCAT)); + concat.Left = Cases[i]; + Cases[i].Parent = concat; + concat.Right = Empty; + Cases[i] = concat; + } + RegexAstNode current = Cases[i]; + int j = 0; + for (; j < buffer.Count; j++) + { + if (CanMerge(current, buffer[j])) + { + // find a case in buffer that can merge with current case, + // then merge them and break + RegexAstNode b = buffer[j]; + if (b is not UnionAlt alt) + { + alt = new UnionAlt(Level + 1, b); + alt.AddCase(current); + buffer[j] = alt; + } else + { + alt.AddCase(current); + } + break; + } + } + if (j >= buffer.Count) { + buffer.Add(current); + } + } + if (Cases.Count != buffer.Count) { + Cases = buffer; + } + + if (buffer.Count == 1) + { + // if there is only one case, + // then we suppose that its contained cases has a same beginning, + // so we attach it to UnionEnd and stay level unchanged + UnionAlt alt = (Cases[0] as UnionAlt)!; + if (IsNullOrEmpty(UnionBegin)) + { + UnionBegin = alt.UnionBegin; + UnionEnd = alt.UnionEnd; + } else + { + alt.UnionBegin.Parent = UnionEnd; + UnionEnd.Right = alt.UnionBegin; + UnionEnd = alt.UnionBegin; + } + + Cases = alt.Cases; + goto merge; + } + + build: + + // suppose that from UnionBegin to UnionEnd is a normal form without union + for (int i = 0; i < Cases.Count; i++) + { + if (Cases[i] is UnionAlt union) { + Cases[i] = union.AsNormal(); + } + } + + RegexAstNode branch; + if (IsNullOrEmpty(UnionEnd)) + { + branch = new RegexAstNode(new Token(string.Empty, 0, + Source.Column, + RegexElementLabel.ALT)); + UnionBegin = branch; + UnionEnd = branch; + } else + { + branch = new RegexAstNode(new Token(string.Empty, 0, + UnionEnd.Source.Column, + RegexElementLabel.ALT)); + UnionEnd.Right = branch; + branch.Parent = UnionEnd; + UnionEnd = branch; + } + + for (int i = 0; i < Cases.Count - 1; i++) + { + Cases[i] ??= NewEmptyNode(); + Cases[i].AppendNode(Cases[i + 1]); + Cases[i].Parent = UnionEnd; + } + UnionEnd.Right = Cases[0]; + TreeEnumerator enumerator = new TreeEnumerator(UnionBegin); + + return UnionBegin; + } + + private void AddCase( + RegexAstNode _case + ) + { + RegexAstNode right = IsNullOrEmpty(_case.Right) ? + new RegexAstNode( + new Token(_case.Value, 0, _case.Source.Column, + RegexElementLabel.UNIT) + ) : + _case.Right; + Cases.Add(right); + } + + private static bool CanMerge( + RegexAstNode origin, + RegexAstNode target + ) + { + // suppose that origin is not a union, + if (target is UnionAlt alt) + { + // then we suppose that alt has only one are same + return origin .EqualityTypeConvert == RegexElementLabel.CONCAT && + (origin.Left.EqualityTypeConvert & RegexElementLabel.SINGLE) != 0 && + origin.Left.EqualityTypeConvert == alt.UnionEnd.Left.EqualityTypeConvert && + origin.Left.Value == alt.UnionEnd.Left.Value; + } else + { + return origin.EqualityTypeConvert == RegexElementLabel.CONCAT && + target.EqualityTypeConvert == RegexElementLabel.CONCAT && + (origin.Left.EqualityTypeConvert & RegexElementLabel.SINGLE) != 0 && + origin.Left.EqualityTypeConvert == target.Left.EqualityTypeConvert && + origin.Left.Value == target.Left.Value; + } + } + + } + + #endregion + + /**/ + } +} diff --git a/StgSharp.RegularAnalysis/TextRegex/RegexInterpreter.cs b/StgSharp.RegularAnalysis/TextRegex/RegexInterpreter.cs index d71b809a..be2a6053 100644 --- a/StgSharp.RegularAnalysis/TextRegex/RegexInterpreter.cs +++ b/StgSharp.RegularAnalysis/TextRegex/RegexInterpreter.cs @@ -1,273 +1,273 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="RegexInterpreter" -// 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.RegularAnalysis.Abstraction; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection.Emit; -using System.Runtime.CompilerServices; -using System.Text; - -using System.Threading.Tasks; - -namespace StgSharp.RegularAnalysis.TextRegex -{ - public partial class RegexInterpreter - { - - private AbstractSyntaxTree _tree = new(); - private CompileStack _stack = new(); - private Exception _interpreteException; - private string _source; - - private RegexInterpreter() { } - - internal AbstractSyntaxTree Tree - { - get - { - if (_interpreteException != null) { - throw new InvalidOperationException("The regex interpretation failed.", _interpreteException); - } - return _tree; - } - } - - public static RegexInterpreter Analyze( - string regex - ) - { - RegexInterpreter interpreter = new RegexInterpreter(); - interpreter._source = regex; - bool isSuccess; - try - { - interpreter.Analyze(); - interpreter.OptimizeTree(); - isSuccess = true; - } - catch (Exception ex) - { - interpreter._interpreteException = ex; - isSuccess = false; - } - return interpreter; - } - - private void Analyze() - { - RegexTokenReader reader = new RegexTokenReader(_source); - TokenParser lexer = reader.Pipe(() => new RegexTokenParser()); - - while (lexer.TryReadToken(out Token token)) - { - if ((token.Flag & RegexElementLabel.SEQUENCE) != 0) - { - // char or charset - _stack.PushOperand(new RegexAstNode(token)); - } else if ((token.Flag & RegexElementLabel.GROUP_BEGIN) != 0) - { - _stack.PushOperator(new RegexAstNode(token)); - _stack.IncreaseDepth(0); - } else if ((token.Flag & RegexElementLabel.GROUP_END) != 0) - { - // close all nodes here - RegexAstNode op; - while (_stack.TryPopOperator(out op)) { - ProcessOperator(op); - } - if (_stack.OperandInDepthCount != 1) { - throw new InvalidOperationException(); - } - _stack.DecreaseDepth(); - op = _stack.PopOperator(); - if (op.Source.Flag != RegexElementLabel.GROUP_BEGIN) { - throw new InvalidOperationException("Unmatched group begin and end symbol"); - } - if (op.Source.Value.Length > 1) - { - op.Right = _stack.PopOperand(); - _stack.PushOperand(op); - } - } else if ((token.Flag & RegexElementLabel.OPERATOR) != 0) - { - if (_stack.OperatorInDepthCount == 0) - { - // the first operator in stack - _stack.PushOperator(new RegexAstNode(token)); - } else - { - // process operator by precedence - while (_stack.TryPeekOperator(out RegexAstNode topOp)) - { - (bool Valid, int Value) cmp = RegexAstNode.ComparePrecedence(topOp.Source.Flag, token.Flag); - - if (!cmp.Valid) { - throw new InvalidOperationException("Operators with same precedence are not supported."); - } - if (cmp.Value < 0) - { - _stack.PopOperator(); - ProcessOperator(topOp); - continue; - } else - { - break; - } - } - _stack.PushOperator(new RegexAstNode(token)); - } - } - } - if (_stack.Depth == 1) - { - if (_stack.OperandInDepthCount != 1 || _stack.OperatorInDepthCount != 0) - { - while (_stack.TryPopOperator(out RegexAstNode? op)) { - ProcessOperator(op); - } - } - if (_stack.OperandInDepthCount == 1 && _stack.OperatorInDepthCount == 0) - { - _tree.Root = _stack.PopOperand(); - return; - } - } - throw new InvalidOperationException("Invalid regular expression syntax."); - } - - private void OptimizeTree( - ) - { - // phase0: scan container and remove no parent nodes - _tree.AllNodes.RemoveWhere(node => node.Parent == null && node != _tree.Root); - TreeEnumerator enumerator = new TreeEnumerator(_tree.Root); - RegexAstNode current; - - // phase1: ALT flatten - // phase3: CONCAT normalize - int i = 0; - List altNodes = []; - while (enumerator.MoveNext()) - { - current = enumerator.Current; - if (current.EqualityTypeConvert == RegexElementLabel.ALT) - { - RegexAstNode union = FlattenAlt(current); - altNodes.Add(current); - current.Right = union; - current.Left = RegexAstNode.Empty; - } else if (current.EqualityTypeConvert == RegexElementLabel.CONCAT) { - RotateConcat(current); - } - } - - List cases = []; - - // phase2: then ALT union - foreach (RegexAstNode item in altNodes) - { - RegexAstNode _case = item.Right; - do - { - cases.Add(_case); - _case = _case.Next; - } while (!RegexAstNode.IsNullOrEmpty(_case)); - RegexAstNode newAlt = MergeAlt(cases); - item.ReplaceBy(newAlt); - } - - // return; - - // phase4: CONCAT merge - enumerator.Reset(); - while (enumerator.MoveNext()) - { - // suppose all concat is now in normalized form, - // we can merge adjacent unit nodes into a single unit node with string value - current = enumerator.Current; - if (current.EqualityTypeConvert == RegexElementLabel.CONCAT) - { - if (MergeConcat(current)) { - enumerator.SkipOnce(); - } - } - } - } - - private void ProcessOperator( - RegexAstNode op - ) - { - if (op.EqualityTypeConvert == RegexElementLabel.CONCAT) - { - if (_stack.TryPopOperand(out RegexAstNode? _1) && - _stack.TryPopOperand(out RegexAstNode? _2)) - { - op.Left = _2; - op.Right = _1; - _stack.PushOperand(op); - _tree.AddNode(op); - _tree.AddNode(_1); - _tree.AddNode(_2); - } else - { - throw new InvalidOperationException("Insufficient operands for CONCAT operator."); - } - } else if (op.EqualityTypeConvert == RegexElementLabel.COUNT) - { - if (_stack.TryPopOperand(out RegexAstNode? _1)) - { - op.Left = _1; - _stack.PushOperand(op); - _tree.AddNode(_1); - _tree.AddNode(op); - } else - { - throw new InvalidOperationException("Insufficient operands for CONCAT operator."); - } - } else if (op.EqualityTypeConvert == RegexElementLabel.ALT) - { - if (_stack.TryPopOperand(out RegexAstNode? _1) && - _stack.TryPopOperand(out RegexAstNode? _2)) - { - op.Left = _2; - op.Right = _1; - _stack.PushOperand(op); - _tree.AddNode(op); - _tree.AddNode(_1); - _tree.AddNode(_2); - } else - { - throw new InvalidOperationException("Insufficient operands for CONCAT operator."); - } - } - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="RegexInterpreter" +// 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.RegularAnalysis.Abstraction; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection.Emit; +using System.Runtime.CompilerServices; +using System.Text; + +using System.Threading.Tasks; + +namespace StgSharp.RegularAnalysis.TextRegex +{ + public partial class RegexInterpreter + { + + private AbstractSyntaxTree _tree = new(); + private CompileStack _stack = new(); + private Exception _interpreteException; + private string _source; + + private RegexInterpreter() { } + + internal AbstractSyntaxTree Tree + { + get + { + if (_interpreteException != null) { + throw new InvalidOperationException("The regex interpretation failed.", _interpreteException); + } + return _tree; + } + } + + public static RegexInterpreter Analyze( + string regex + ) + { + RegexInterpreter interpreter = new RegexInterpreter(); + interpreter._source = regex; + bool isSuccess; + try + { + interpreter.Analyze(); + interpreter.OptimizeTree(); + isSuccess = true; + } + catch (Exception ex) + { + interpreter._interpreteException = ex; + isSuccess = false; + } + return interpreter; + } + + private void Analyze() + { + RegexTokenReader reader = new RegexTokenReader(_source); + TokenParser lexer = reader.Pipe(() => new RegexTokenParser()); + + while (lexer.TryReadToken(out Token token)) + { + if ((token.Flag & RegexElementLabel.SEQUENCE) != 0) + { + // char or charset + _stack.PushOperand(new RegexAstNode(token)); + } else if ((token.Flag & RegexElementLabel.GROUP_BEGIN) != 0) + { + _stack.PushOperator(new RegexAstNode(token)); + _stack.IncreaseDepth(0); + } else if ((token.Flag & RegexElementLabel.GROUP_END) != 0) + { + // close all nodes here + RegexAstNode op; + while (_stack.TryPopOperator(out op)) { + ProcessOperator(op); + } + if (_stack.OperandInDepthCount != 1) { + throw new InvalidOperationException(); + } + _stack.DecreaseDepth(); + op = _stack.PopOperator(); + if (op.Source.Flag != RegexElementLabel.GROUP_BEGIN) { + throw new InvalidOperationException("Unmatched group begin and end symbol"); + } + if (op.Source.Value.Length > 1) + { + op.Right = _stack.PopOperand(); + _stack.PushOperand(op); + } + } else if ((token.Flag & RegexElementLabel.OPERATOR) != 0) + { + if (_stack.OperatorInDepthCount == 0) + { + // the first operator in stack + _stack.PushOperator(new RegexAstNode(token)); + } else + { + // process operator by precedence + while (_stack.TryPeekOperator(out RegexAstNode topOp)) + { + (bool Valid, int Value) cmp = RegexAstNode.ComparePrecedence(topOp.Source.Flag, token.Flag); + + if (!cmp.Valid) { + throw new InvalidOperationException("Operators with same precedence are not supported."); + } + if (cmp.Value < 0) + { + _stack.PopOperator(); + ProcessOperator(topOp); + continue; + } else + { + break; + } + } + _stack.PushOperator(new RegexAstNode(token)); + } + } + } + if (_stack.Depth == 1) + { + if (_stack.OperandInDepthCount != 1 || _stack.OperatorInDepthCount != 0) + { + while (_stack.TryPopOperator(out RegexAstNode? op)) { + ProcessOperator(op); + } + } + if (_stack.OperandInDepthCount == 1 && _stack.OperatorInDepthCount == 0) + { + _tree.Root = _stack.PopOperand(); + return; + } + } + throw new InvalidOperationException("Invalid regular expression syntax."); + } + + private void OptimizeTree( + ) + { + // phase0: scan container and remove no parent nodes + _tree.AllNodes.RemoveWhere(node => node.Parent == null && node != _tree.Root); + TreeEnumerator enumerator = new TreeEnumerator(_tree.Root); + RegexAstNode current; + + // phase1: ALT flatten + // phase3: CONCAT normalize + int i = 0; + List altNodes = []; + while (enumerator.MoveNext()) + { + current = enumerator.Current; + if (current.EqualityTypeConvert == RegexElementLabel.ALT) + { + RegexAstNode union = FlattenAlt(current); + altNodes.Add(current); + current.Right = union; + current.Left = RegexAstNode.Empty; + } else if (current.EqualityTypeConvert == RegexElementLabel.CONCAT) { + RotateConcat(current); + } + } + + List cases = []; + + // phase2: then ALT union + foreach (RegexAstNode item in altNodes) + { + RegexAstNode _case = item.Right; + do + { + cases.Add(_case); + _case = _case.Next; + } while (!RegexAstNode.IsNullOrEmpty(_case)); + RegexAstNode newAlt = MergeAlt(cases); + item.ReplaceBy(newAlt); + } + + // return; + + // phase4: CONCAT merge + enumerator.Reset(); + while (enumerator.MoveNext()) + { + // suppose all concat is now in normalized form, + // we can merge adjacent unit nodes into a single unit node with string value + current = enumerator.Current; + if (current.EqualityTypeConvert == RegexElementLabel.CONCAT) + { + if (MergeConcat(current)) { + enumerator.SkipOnce(); + } + } + } + } + + private void ProcessOperator( + RegexAstNode op + ) + { + if (op.EqualityTypeConvert == RegexElementLabel.CONCAT) + { + if (_stack.TryPopOperand(out RegexAstNode? _1) && + _stack.TryPopOperand(out RegexAstNode? _2)) + { + op.Left = _2; + op.Right = _1; + _stack.PushOperand(op); + _tree.AddNode(op); + _tree.AddNode(_1); + _tree.AddNode(_2); + } else + { + throw new InvalidOperationException("Insufficient operands for CONCAT operator."); + } + } else if (op.EqualityTypeConvert == RegexElementLabel.COUNT) + { + if (_stack.TryPopOperand(out RegexAstNode? _1)) + { + op.Left = _1; + _stack.PushOperand(op); + _tree.AddNode(_1); + _tree.AddNode(op); + } else + { + throw new InvalidOperationException("Insufficient operands for CONCAT operator."); + } + } else if (op.EqualityTypeConvert == RegexElementLabel.ALT) + { + if (_stack.TryPopOperand(out RegexAstNode? _1) && + _stack.TryPopOperand(out RegexAstNode? _2)) + { + op.Left = _2; + op.Right = _1; + _stack.PushOperand(op); + _tree.AddNode(op); + _tree.AddNode(_1); + _tree.AddNode(_2); + } else + { + throw new InvalidOperationException("Insufficient operands for CONCAT operator."); + } + } + } + + } +} diff --git a/StgSharp.RegularAnalysis/TextRegex/RegexTokenParser.cs b/StgSharp.RegularAnalysis/TextRegex/RegexTokenParser.cs index 45f6556c..f7888def 100644 --- a/StgSharp.RegularAnalysis/TextRegex/RegexTokenParser.cs +++ b/StgSharp.RegularAnalysis/TextRegex/RegexTokenParser.cs @@ -1,89 +1,89 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="RegexTokenParser" -// 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.RegularAnalysis.Abstraction; -using System; -using System.Collections.Generic; -using System.Diagnostics.Tracing; -using System.IO.Pipes; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.RegularAnalysis.TextRegex -{ - internal class RegexTokenParser : TokenParser - { - - private readonly Queue> _buffer = []; - - private RegexElementLabel _prev; - - public override bool IsEmpty => Source.IsEmpty && _buffer.Count == 0; - - public override Token ReadToken() - { - if (_buffer.TryDequeue(out Token token)) { - return token; - } - if (Source.TryReadToken(out Token orig)) - { - if (((int)(orig.Flag & RegexElementLabel.ATOM_BEGIN) != 0) && ((int)_prev != 0)) - { - Token ret = new Token(string.Empty, - orig.Line, - orig.Column, - RegexElementLabel.CONCAT); - _buffer.Enqueue(orig); - _prev = orig.Flag & RegexElementLabel.ATOM_END; - return ret; - } else - { - _prev = orig.Flag & RegexElementLabel.ATOM_END; - return orig; - } - } else - { - return Token.Empty; - } - } - - public override bool TryReadToken( - out Token t - ) - { - if (IsEmpty) - { - t = Token.Empty; - return false; - } - t = ReadToken(); - return t == Token.Empty; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="RegexTokenParser" +// 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.RegularAnalysis.Abstraction; +using System; +using System.Collections.Generic; +using System.Diagnostics.Tracing; +using System.IO.Pipes; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.RegularAnalysis.TextRegex +{ + internal class RegexTokenParser : TokenParser + { + + private readonly Queue> _buffer = []; + + private RegexElementLabel _prev; + + public override bool IsEmpty => Source.IsEmpty && _buffer.Count == 0; + + public override Token ReadToken() + { + if (_buffer.TryDequeue(out Token token)) { + return token; + } + if (Source.TryReadToken(out Token orig)) + { + if (((int)(orig.Flag & RegexElementLabel.ATOM_BEGIN) != 0) && ((int)_prev != 0)) + { + Token ret = new Token(string.Empty, + orig.Line, + orig.Column, + RegexElementLabel.CONCAT); + _buffer.Enqueue(orig); + _prev = orig.Flag & RegexElementLabel.ATOM_END; + return ret; + } else + { + _prev = orig.Flag & RegexElementLabel.ATOM_END; + return orig; + } + } else + { + return Token.Empty; + } + } + + public override bool TryReadToken( + out Token t + ) + { + if (IsEmpty) + { + t = Token.Empty; + return false; + } + t = ReadToken(); + return t == Token.Empty; + } + + } +} diff --git a/StgSharp.RegularAnalysis/TextRegex/RegexTokenReader.cs b/StgSharp.RegularAnalysis/TextRegex/RegexTokenReader.cs index 813c6f2b..c07a4de9 100644 --- a/StgSharp.RegularAnalysis/TextRegex/RegexTokenReader.cs +++ b/StgSharp.RegularAnalysis/TextRegex/RegexTokenReader.cs @@ -1,306 +1,306 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="RegexTokenReader" -// 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.RegularAnalysis.Abstraction; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices; -using System.Security.Permissions; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.RegularAnalysis.TextRegex -{ - internal class RegexTokenReader : ITokenReader - { - - private static string _source; - - private int position = 0; - - public RegexTokenReader() { } - - public RegexTokenReader(string source) - { - _source = source; - } - - public bool IsEmpty => string.IsNullOrEmpty(_source) || position >= _source.Length; - - public Token ReadToken() - { - int pos = position; - switch (_source[pos]) - { - case '\\': - if (pos + 1 == _source.Length) { - throw new InvalidOperationException("Unclosed char"); - } - if (_source[pos + 1] == 'x') - { - string value = _source[(pos + 1)..(pos + 3)]; - pos += 4; - if (uint.TryParse(value, out uint code) && Rune.TryCreate(code, out Rune result)) - { - return new Token(result.ToString(), 0, pos, RegexElementLabel.UNIT); - } else - { - throw new InvalidCastException($"Failed to convert {value} to a valid ascii code point."); - } - } else if (_source[pos + 1] == 'u') - { - string value = _source[(pos + 1)..(pos + 5)]; - pos += 6; - if (uint.TryParse(value, out uint code) && Rune.TryCreate(code, out Rune result)) - { - return new Token(result.ToString(), 0, pos, RegexElementLabel.UNIT); - } else - { - throw new InvalidCastException($"Failed to convert {value} to a valid unicode code point."); - } - } else if (_source[pos + 1] == 'p') - { - int i = pos + 2; - if (_source[i] != '{') { - throw new InvalidOperationException("Invalid Unicode property escape sequence."); - } - for (; i < _source.Length; i++) - { - if (_source[i] == '}') - { - position = i + 1; - return new Token(_source[(pos)..(i + 1)], 0, pos, - RegexElementLabel.UNIT_SET); - } - } - throw new InvalidOperationException("Unclosed Unicode property escape sequence."); - } else - { - position = pos + 2; - return new Token(_source[(pos)..(pos + 2)], 0, pos, - RegexElementLabel.UNIT_SET); - } - case '[': - for (int i = pos + 1; i < _source.Length; i++) - { - if (_source[i] == ']' && _source[i - 1] != '\\') - { - int length = (i - pos - 1); - position = i + 1; - return new Token(_source[(pos)..(i + 1)], 0, position, - RegexElementLabel.UNIT_SET); - } - } - throw new InvalidOperationException("Unclosed character set"); - case '|': - position = pos + 1; - return new Token(_source[(pos)..(pos + 1)], 0, pos, RegexElementLabel.ALT); - case '(': - - // very comlex here - return ReadGroupBeginToken(); - case ')': - position = pos + 1; - return new Token(_source[(pos)..(pos + 1)], 0, pos, RegexElementLabel.GROUP_END); - case '{': - for (int i = pos + 1; i < _source.Length; i++) - { - if (_source[i] == '}') - { - position = i + 1; - return new Token(_source[(pos)..(i + 1)], 0, pos, - RegexElementLabel.COUNT); - } - } - throw new InvalidOperationException("Unclosed count specifier"); - case '*' or '+': - int count = _source[pos + 1] == '?' ? 2 : 1; - position = pos + count; - return new Token(_source[(pos)..(pos + count)], 0, pos, RegexElementLabel.COUNT); - case '?': - position = pos + 1; - return new Token(_source[(pos)..(pos + 1)], 0, pos, RegexElementLabel.COUNT); - case '.': - return new Token(_source[(pos)..(pos + 1)], 0, pos, RegexElementLabel.UNIT); - default: - position = pos + 1; - return new Token(_source[(pos)..(pos + 1)], 0, pos, RegexElementLabel.UNIT); - } - } - - public bool TryReadToken(out Token t) - { - if (IsEmpty) - { - t = Token.Empty; - return false; - } - t = ReadToken(); - return Token.Empty == t; - } - - private Token ReadGroupBeginToken() - { - if (IsEmpty) { - throw new InvalidOperationException("Source is null."); - } - - int start = position; - - if (start >= _source.Length || _source[start] != '(') { - throw new InvalidOperationException("ReadGroupBeginToken called when current char is not '('."); - } - - // Case 1: plain capturing group "(" - if (start + 1 >= _source.Length || _source[start + 1] != '?') - { - position = start + 1; - return new Token("(", 0, start, RegexElementLabel.GROUP_BEGIN); - } - - // From here we have "(?" - if (start + 2 >= _source.Length) - { - throw new InvalidOperationException("Unfinished group prefix '(?'."); - } - - char c2 = _source[start + 2]; - - // Case 2: non-capturing group "(?:" - if (c2 == ':') - { - position = start + 3; - return new Token("(?:", 0, start, RegexElementLabel.GROUP_BEGIN); - } - - // Assertions (write the first-level cases, but not supported yet) - if (c2 == '=') - { - // "(?=" - position = start + 3; - throw new NotSupportedException("Positive lookahead '(?=...)' is not supported yet."); - } - if (c2 == '!') - { - // "(?!" - position = start + 3; - throw new NotSupportedException("Negative lookahead '(?!...)' is not supported yet."); - } - - // Named capturing group or lookbehind starts with "(?<" - if (c2 == '<') - { - if (start + 3 >= _source.Length) { - throw new InvalidOperationException("Unfinished group prefix '(?<'."); - } - - char c3 = _source[start + 3]; - - // Lookbehind prefixes: "(?<=" and "(?" - int nameStart = start + 3; - - // Read name until '>' - int i = nameStart; - - // Name must start with [A-Za-z_] - if (i >= _source.Length) - { - throw new InvalidOperationException("Unfinished named group prefix."); - } - - char first = _source[i]; - if (!(first == '_' || char.IsLetter(first))) { - throw new InvalidOperationException($"Invalid named group name start '{first}' at position {i}."); - } - - i++; - - while (i < _source.Length) - { - char ch = _source[i]; - if (ch == '>') - { - break; - } - - if (!(ch == '_' || char.IsLetterOrDigit(ch))) { - throw new InvalidOperationException($"Invalid character '{ch}' in group name at position {i}."); - } - - i++; - } - - if (i >= _source.Length || _source[i] != '>') { - throw new InvalidOperationException("Unclosed named group prefix; missing '>'."); - } - - // Consume "(?" - int consumedLen = (i - start) + 1; // include '>' - string text = _source.Substring(start, consumedLen); - position = start + consumedLen; - - return new Token(text, 0, start, RegexElementLabel.GROUP_BEGIN); - } - - // Optional: comments "(?#...)" or inline options "(?i:...)" etc. - // First-level cases listed but not supported yet: - if (c2 == '#') - { - position = start + 3; - throw new NotSupportedException("Comment group '(?#...)' is not supported yet."); - } - - // Inline options: (?i:...), (?m:...), (?-i:...), (?im), etc. - // Too many dialect differences; reserve the prefix but mark unsupported. - if (char.IsLetter(c2) || c2 == '-') - { - // We don't know how long the option spec is here; do NOT advance position too much. - // Keep position at '(' so caller can decide how to handle, or just throw. - position = start; - throw new NotSupportedException("Inline option groups like '(?i:...)' are not supported yet."); - } - - // Unknown "(?X" prefix - position = start; - throw new InvalidOperationException($"Unknown or unsupported group prefix starting at position {start}: '{_source.Substring(start, Math.Min(4, _source.Length - start))}'"); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="RegexTokenReader" +// 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.RegularAnalysis.Abstraction; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using System.Security.Permissions; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.RegularAnalysis.TextRegex +{ + internal class RegexTokenReader : ITokenReader + { + + private static string _source; + + private int position = 0; + + public RegexTokenReader() { } + + public RegexTokenReader(string source) + { + _source = source; + } + + public bool IsEmpty => string.IsNullOrEmpty(_source) || position >= _source.Length; + + public Token ReadToken() + { + int pos = position; + switch (_source[pos]) + { + case '\\': + if (pos + 1 == _source.Length) { + throw new InvalidOperationException("Unclosed char"); + } + if (_source[pos + 1] == 'x') + { + string value = _source[(pos + 1)..(pos + 3)]; + pos += 4; + if (uint.TryParse(value, out uint code) && Rune.TryCreate(code, out Rune result)) + { + return new Token(result.ToString(), 0, pos, RegexElementLabel.UNIT); + } else + { + throw new InvalidCastException($"Failed to convert {value} to a valid ascii code point."); + } + } else if (_source[pos + 1] == 'u') + { + string value = _source[(pos + 1)..(pos + 5)]; + pos += 6; + if (uint.TryParse(value, out uint code) && Rune.TryCreate(code, out Rune result)) + { + return new Token(result.ToString(), 0, pos, RegexElementLabel.UNIT); + } else + { + throw new InvalidCastException($"Failed to convert {value} to a valid unicode code point."); + } + } else if (_source[pos + 1] == 'p') + { + int i = pos + 2; + if (_source[i] != '{') { + throw new InvalidOperationException("Invalid Unicode property escape sequence."); + } + for (; i < _source.Length; i++) + { + if (_source[i] == '}') + { + position = i + 1; + return new Token(_source[(pos)..(i + 1)], 0, pos, + RegexElementLabel.UNIT_SET); + } + } + throw new InvalidOperationException("Unclosed Unicode property escape sequence."); + } else + { + position = pos + 2; + return new Token(_source[(pos)..(pos + 2)], 0, pos, + RegexElementLabel.UNIT_SET); + } + case '[': + for (int i = pos + 1; i < _source.Length; i++) + { + if (_source[i] == ']' && _source[i - 1] != '\\') + { + int length = (i - pos - 1); + position = i + 1; + return new Token(_source[(pos)..(i + 1)], 0, position, + RegexElementLabel.UNIT_SET); + } + } + throw new InvalidOperationException("Unclosed character set"); + case '|': + position = pos + 1; + return new Token(_source[(pos)..(pos + 1)], 0, pos, RegexElementLabel.ALT); + case '(': + + // very comlex here + return ReadGroupBeginToken(); + case ')': + position = pos + 1; + return new Token(_source[(pos)..(pos + 1)], 0, pos, RegexElementLabel.GROUP_END); + case '{': + for (int i = pos + 1; i < _source.Length; i++) + { + if (_source[i] == '}') + { + position = i + 1; + return new Token(_source[(pos)..(i + 1)], 0, pos, + RegexElementLabel.COUNT); + } + } + throw new InvalidOperationException("Unclosed count specifier"); + case '*' or '+': + int count = _source[pos + 1] == '?' ? 2 : 1; + position = pos + count; + return new Token(_source[(pos)..(pos + count)], 0, pos, RegexElementLabel.COUNT); + case '?': + position = pos + 1; + return new Token(_source[(pos)..(pos + 1)], 0, pos, RegexElementLabel.COUNT); + case '.': + return new Token(_source[(pos)..(pos + 1)], 0, pos, RegexElementLabel.UNIT); + default: + position = pos + 1; + return new Token(_source[(pos)..(pos + 1)], 0, pos, RegexElementLabel.UNIT); + } + } + + public bool TryReadToken(out Token t) + { + if (IsEmpty) + { + t = Token.Empty; + return false; + } + t = ReadToken(); + return Token.Empty == t; + } + + private Token ReadGroupBeginToken() + { + if (IsEmpty) { + throw new InvalidOperationException("Source is null."); + } + + int start = position; + + if (start >= _source.Length || _source[start] != '(') { + throw new InvalidOperationException("ReadGroupBeginToken called when current char is not '('."); + } + + // Case 1: plain capturing group "(" + if (start + 1 >= _source.Length || _source[start + 1] != '?') + { + position = start + 1; + return new Token("(", 0, start, RegexElementLabel.GROUP_BEGIN); + } + + // From here we have "(?" + if (start + 2 >= _source.Length) + { + throw new InvalidOperationException("Unfinished group prefix '(?'."); + } + + char c2 = _source[start + 2]; + + // Case 2: non-capturing group "(?:" + if (c2 == ':') + { + position = start + 3; + return new Token("(?:", 0, start, RegexElementLabel.GROUP_BEGIN); + } + + // Assertions (write the first-level cases, but not supported yet) + if (c2 == '=') + { + // "(?=" + position = start + 3; + throw new NotSupportedException("Positive lookahead '(?=...)' is not supported yet."); + } + if (c2 == '!') + { + // "(?!" + position = start + 3; + throw new NotSupportedException("Negative lookahead '(?!...)' is not supported yet."); + } + + // Named capturing group or lookbehind starts with "(?<" + if (c2 == '<') + { + if (start + 3 >= _source.Length) { + throw new InvalidOperationException("Unfinished group prefix '(?<'."); + } + + char c3 = _source[start + 3]; + + // Lookbehind prefixes: "(?<=" and "(?" + int nameStart = start + 3; + + // Read name until '>' + int i = nameStart; + + // Name must start with [A-Za-z_] + if (i >= _source.Length) + { + throw new InvalidOperationException("Unfinished named group prefix."); + } + + char first = _source[i]; + if (!(first == '_' || char.IsLetter(first))) { + throw new InvalidOperationException($"Invalid named group name start '{first}' at position {i}."); + } + + i++; + + while (i < _source.Length) + { + char ch = _source[i]; + if (ch == '>') + { + break; + } + + if (!(ch == '_' || char.IsLetterOrDigit(ch))) { + throw new InvalidOperationException($"Invalid character '{ch}' in group name at position {i}."); + } + + i++; + } + + if (i >= _source.Length || _source[i] != '>') { + throw new InvalidOperationException("Unclosed named group prefix; missing '>'."); + } + + // Consume "(?" + int consumedLen = (i - start) + 1; // include '>' + string text = _source.Substring(start, consumedLen); + position = start + consumedLen; + + return new Token(text, 0, start, RegexElementLabel.GROUP_BEGIN); + } + + // Optional: comments "(?#...)" or inline options "(?i:...)" etc. + // First-level cases listed but not supported yet: + if (c2 == '#') + { + position = start + 3; + throw new NotSupportedException("Comment group '(?#...)' is not supported yet."); + } + + // Inline options: (?i:...), (?m:...), (?-i:...), (?im), etc. + // Too many dialect differences; reserve the prefix but mark unsupported. + if (char.IsLetter(c2) || c2 == '-') + { + // We don't know how long the option spec is here; do NOT advance position too much. + // Keep position at '(' so caller can decide how to handle, or just throw. + position = start; + throw new NotSupportedException("Inline option groups like '(?i:...)' are not supported yet."); + } + + // Unknown "(?X" prefix + position = start; + throw new InvalidOperationException($"Unknown or unsupported group prefix starting at position {start}: '{_source.Substring(start, Math.Min(4, _source.Length - start))}'"); + } + + } +} diff --git a/StgSharp.RegularAnalysis/TextRegex/RegexTokenUtil.cs b/StgSharp.RegularAnalysis/TextRegex/RegexTokenUtil.cs index 35c434f3..3d51ab3c 100644 --- a/StgSharp.RegularAnalysis/TextRegex/RegexTokenUtil.cs +++ b/StgSharp.RegularAnalysis/TextRegex/RegexTokenUtil.cs @@ -1,49 +1,49 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="RegexTokenUtil" -// 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.RegularAnalysis.Abstraction; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.RegularAnalysis.TextRegex -{ - internal static class RegexTokenUtil - { - - public static bool IsAccurateChar( - this Token token - ) - { - return ((token.Flag & RegexElementLabel.UNIT) != 0 && token.Value.Length == 1) || - (token.Flag & RegexElementLabel.UNIT_SPAN) != 0; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="RegexTokenUtil" +// 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.RegularAnalysis.Abstraction; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.RegularAnalysis.TextRegex +{ + internal static class RegexTokenUtil + { + + public static bool IsAccurateChar( + this Token token + ) + { + return ((token.Flag & RegexElementLabel.UNIT) != 0 && token.Value.Length == 1) || + (token.Flag & RegexElementLabel.UNIT_SPAN) != 0; + } + + } +} diff --git a/StgSharp.RegularAnalysis/regex_node_transaction.md b/StgSharp.RegularAnalysis/regex_node_transaction.md index 6f238577..ab70da42 100644 --- a/StgSharp.RegularAnalysis/regex_node_transaction.md +++ b/StgSharp.RegularAnalysis/regex_node_transaction.md @@ -1,24 +1,24 @@ -### basic -char/charset->char/charset - -### count -char/charset-match->count increment -count increment-loop back->char/charset -char/charset-miss match->count end -count end-exit->count increment-judge->next node - -### match group/lookaround - -left boarder-> match group start //push stack, add group index --> match logic // recored index --> match group end //pop stack, set group end, build sub sequence - - - - - - - - - - +### basic +char/charset->char/charset + +### count +char/charset-match->count increment +count increment-loop back->char/charset +char/charset-miss match->count end +count end-exit->count increment-judge->next node + +### match group/lookaround + +left boarder-> match group start //push stack, add group index +-> match logic // recored index +-> match group end //pop stack, set group end, build sub sequence + + + + + + + + + + diff --git a/StgSharp.Script/Common/AbstractSyntaxTree.cs b/StgSharp.Script/Common/AbstractSyntaxTree.cs index dc1119a2..fa58578f 100644 --- a/StgSharp.Script/Common/AbstractSyntaxTree.cs +++ b/StgSharp.Script/Common/AbstractSyntaxTree.cs @@ -1,57 +1,57 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="AbstractSyntaxTree" -// 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.Collections; - -using System; -using System.Collections.Generic; -using System.Text; -using System.Xml.Schema; - -namespace StgSharp.Script -{ - public sealed class AbstractSyntaxTree where TNode: ISyntaxNode - where TType: ITypeSource - { - - private List _allToken = new(); - private TNode _root; - - public int Count - { - get { return _allToken.Count; } - } - - public TNode Root => _root; - - public bool Contains(TNode node) - { - return _allToken.Contains(node); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="AbstractSyntaxTree" +// 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.Collections; + +using System; +using System.Collections.Generic; +using System.Text; +using System.Xml.Schema; + +namespace StgSharp.Script +{ + public sealed class AbstractSyntaxTree where TNode: ISyntaxNode + where TType: ITypeSource + { + + private List _allToken = new(); + private TNode _root; + + public int Count + { + get { return _allToken.Count; } + } + + public TNode Root => _root; + + public bool Contains(TNode node) + { + return _allToken.Contains(node); + } + + } +} diff --git a/StgSharp.Script/Common/CodeLineHelper.cs b/StgSharp.Script/Common/CodeLineHelper.cs index 100e1c26..f8d711f1 100644 --- a/StgSharp.Script/Common/CodeLineHelper.cs +++ b/StgSharp.Script/Common/CodeLineHelper.cs @@ -1,100 +1,100 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="CodeLineHelper" -// 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 System; -using System.Collections.Generic; -using System.Text; - -namespace StgSharp.Script -{ - public static class CodeLineHelper - { - - public static string SliceAndTrim(this string line, int startIndex) - { - if (line == null) { - throw new ArgumentNullException(nameof(line)); - } - - if (startIndex < 0 || startIndex >= line.Length) { - throw new ArgumentOutOfRangeException(nameof(startIndex)); - } - - ReadOnlySpan sourceSpan = line.AsSpan(); - ReadOnlySpan subSpan = sourceSpan.Slice(startIndex); - - int start = 0; - while (start < subSpan.Length && char.IsWhiteSpace(subSpan[start])) { - start++; - } - int end = subSpan.Length - 1; - while (end >= start && char.IsWhiteSpace(subSpan[end])) { - end--; - } - if (start > end) { - return string.Empty; - } - int finalLength = end - start + 1; - - return new string(subSpan.Slice(start, finalLength)); - } - - public static string SliceAndTrim(this string line, int startIndex, int length) - { - if (line == null) { - throw new ArgumentNullException(nameof(line)); - } - - if (startIndex < 0 || startIndex >= line.Length) { - throw new ArgumentOutOfRangeException(nameof(startIndex)); - } - - if (length < 0 || startIndex + length > line.Length) { - throw new ArgumentOutOfRangeException(nameof(length)); - } - - ReadOnlySpan sourceSpan = line.AsSpan(); - ReadOnlySpan subSpan = sourceSpan.Slice(startIndex, length); - - int start = 0; - while (start < subSpan.Length && char.IsWhiteSpace(subSpan[start])) { - start++; - } - int end = subSpan.Length - 1; - while (end >= start && char.IsWhiteSpace(subSpan[end])) { - end--; - } - if (start > end) { - return string.Empty; - } - int finalLength = end - start + 1; - - return new string(subSpan.Slice(start, finalLength)); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="CodeLineHelper" +// 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 System; +using System.Collections.Generic; +using System.Text; + +namespace StgSharp.Script +{ + public static class CodeLineHelper + { + + public static string SliceAndTrim(this string line, int startIndex) + { + if (line == null) { + throw new ArgumentNullException(nameof(line)); + } + + if (startIndex < 0 || startIndex >= line.Length) { + throw new ArgumentOutOfRangeException(nameof(startIndex)); + } + + ReadOnlySpan sourceSpan = line.AsSpan(); + ReadOnlySpan subSpan = sourceSpan.Slice(startIndex); + + int start = 0; + while (start < subSpan.Length && char.IsWhiteSpace(subSpan[start])) { + start++; + } + int end = subSpan.Length - 1; + while (end >= start && char.IsWhiteSpace(subSpan[end])) { + end--; + } + if (start > end) { + return string.Empty; + } + int finalLength = end - start + 1; + + return new string(subSpan.Slice(start, finalLength)); + } + + public static string SliceAndTrim(this string line, int startIndex, int length) + { + if (line == null) { + throw new ArgumentNullException(nameof(line)); + } + + if (startIndex < 0 || startIndex >= line.Length) { + throw new ArgumentOutOfRangeException(nameof(startIndex)); + } + + if (length < 0 || startIndex + length > line.Length) { + throw new ArgumentOutOfRangeException(nameof(length)); + } + + ReadOnlySpan sourceSpan = line.AsSpan(); + ReadOnlySpan subSpan = sourceSpan.Slice(startIndex, length); + + int start = 0; + while (start < subSpan.Length && char.IsWhiteSpace(subSpan[start])) { + start++; + } + int end = subSpan.Length - 1; + while (end >= start && char.IsWhiteSpace(subSpan[end])) { + end--; + } + if (start > end) { + return string.Empty; + } + int finalLength = end - start + 1; + + return new string(subSpan.Slice(start, finalLength)); + } + + } +} diff --git a/StgSharp.Script/Common/CompileDepthState.cs b/StgSharp.Script/Common/CompileDepthState.cs index a82a3358..8f071b0a 100644 --- a/StgSharp.Script/Common/CompileDepthState.cs +++ b/StgSharp.Script/Common/CompileDepthState.cs @@ -1,73 +1,73 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="CompileDepthState" -// 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 System; -using System.Collections.Generic; -using System.Data; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Script -{ - public interface ICompileDepthState - { - - string CurrentState { get; set; } - - } - - public class CompileDepthMark - { - - internal CompileDepthMark(int operatorBegin, int operandBegin, int usage) - { - OperatorBegin = operatorBegin; - OperandBegin = operandBegin; - Usage = usage; - } - - internal CompileDepthMark(int operatorBegin, int operandBegin, int usage, ICompileDepthState stateCache) - { - OperatorBegin = operatorBegin; - OperandBegin = operandBegin; - Usage = usage; - StateCache = stateCache; - } - - public bool IsBeginOfBlock { get; internal set; } - - public ICompileDepthState StateCache { get; internal set; } - - public int OperandBegin { get; internal set; } - - public int OperatorBegin { get; internal set; } - - public int Usage { get; internal set; } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="CompileDepthState" +// 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 System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Script +{ + public interface ICompileDepthState + { + + string CurrentState { get; set; } + + } + + public class CompileDepthMark + { + + internal CompileDepthMark(int operatorBegin, int operandBegin, int usage) + { + OperatorBegin = operatorBegin; + OperandBegin = operandBegin; + Usage = usage; + } + + internal CompileDepthMark(int operatorBegin, int operandBegin, int usage, ICompileDepthState stateCache) + { + OperatorBegin = operatorBegin; + OperandBegin = operandBegin; + Usage = usage; + StateCache = stateCache; + } + + public bool IsBeginOfBlock { get; internal set; } + + public ICompileDepthState StateCache { get; internal set; } + + public int OperandBegin { get; internal set; } + + public int OperatorBegin { get; internal set; } + + public int Usage { get; internal set; } + + } +} diff --git a/StgSharp.Script/Common/CompileStack.cs b/StgSharp.Script/Common/CompileStack.cs index 099bd2f2..052d0680 100644 --- a/StgSharp.Script/Common/CompileStack.cs +++ b/StgSharp.Script/Common/CompileStack.cs @@ -1,329 +1,329 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="CompileStack" -// 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.Collections; - -using System; -using System.Collections.Generic; -using System.Data; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Script -{ - public partial class CompileStack where TNode: ISyntaxNode - where TType: ITypeSource - { - - private Token? _lastToken; - - private TNode[] _nodeArray = new TNode[4]; - private Token[] _operatorArray = new Token[4]; - private Token[] _tokenArray = new Token[4]; - - private int _nodeCount,_tokenCount, _operatorCount; - private RandomAccessibleStack _depthStack = new RandomAccessibleStack( - ); - - private RandomAccessibleStack _isNode = new RandomAccessibleStack( - 8); - private Stack> _statementCache = new Stack>(); - private TNode _lastNode; - - public CompileStack() - { - _depthStack.Push(new CompileDepthMark(0, 0, 0, null!)); - _statementCache.Push(new Stack()); - } - - public bool IsLastAddedOperator { get; private set; } - - public CompileDepthMark CurrentDepthMark - { - get => _depthStack.Peek(); - } - - public int Depth => _depthStack.Count; - - public int OperandCount => _isNode.Count; - - public int OperatorCount => _operatorCount; - - public int OperatorAheadOfDepth - { - get => OperatorCount - _depthStack.Peek().OperatorBegin; - } - - public int OperandAheadOfDepth - { - get => OperandCount - _depthStack.Peek().OperandBegin; - } - - public Stack StatementsInDepth - { - get => _statementCache.Peek(); - } - - public void DecreaseDepth() - { - CompileDepthMark mark = _depthStack.Pop(); - Stack statementsInDepth = _statementCache.Pop(); - } - - public bool GetOperandAt(Index i, out TNode operandNode, out Token operandToken) - { - OperandIndex index = _isNode[i]; - if (index.IsNode) - { - operandNode = _nodeArray[index.Index]; - operandToken = Token.Empty; - return true; - } else - { - operandToken = _tokenArray[index.Index]; - operandNode = default!; - return false; - } - } - - public bool GetOperandAt(CompileDepthMark depth, Index i, out Token operandToken, out TNode operandNode) - { - OperandIndex index = _isNode[i]; - - _depthStack.Contains(depth); - if (index.IsNode) - { - operandNode = _nodeArray[index.Index]; - operandToken = Token.Empty; - return true; - } else - { - operandToken = _tokenArray[index.Index]; - operandNode = default!; - return false; - } - } - - public CompileDepthMark IncreaseDepth(int usage) - { - CompileDepthMark mark = - new CompileDepthMark(OperatorCount, OperandCount, usage); - - _depthStack.Push(mark); - _statementCache.Push(new Stack()); - return mark; - } - - public TNode PackAllStatements() - { - if (StatementsInDepth.Count == 0) { - return TNode.Empty; - } - TNode end = StatementsInDepth.Peek(); - TNode first = end; - while (StatementsInDepth.Count > 0) - { - first = StatementsInDepth.Pop(); - end.PrependNode(first); - end = first; - } - return first; - } - - public bool PeekOperand(out Token t, out TNode n) - { - if (OperandAheadOfDepth <= 0) - { - t = Token.Empty; - n = TNode.Empty; - return false; - } - if (_isNode.Pop().IsNode) - { - t = Token.Empty; - n = _nodeArray[_nodeCount - 1]; - return true; - } else - { - t = _tokenArray[_tokenCount - 1]; - n = TNode.Empty; - return false; - } - } - - public Token PeekOperator() - { - if (OperatorAheadOfDepth > 0) { - return _operatorArray[_operatorCount - 1]; - } - return Token.Empty; - } - - public bool PopOperand(out Token t, out TNode n) - { - if (OperandAheadOfDepth <= 0) - { - t = Token.Empty; - n = TNode.Empty; - return false; - } - if (_isNode.Pop().IsNode) - { - t = Token.Empty; - n = _nodeArray[--_nodeCount]; - return true; - } else - { - t = _tokenArray[--_tokenCount]; - n = TNode.Empty; - return false; - } - } - - public Token PopOperator() - { - if (OperatorAheadOfDepth > 0) - { - _operatorCount--; - return _operatorArray[_operatorCount]; - } - return Token.Empty; - } - - public void PushOperand(TNode node) - { - if (_nodeArray.Length == _nodeCount) { - Array.Resize(ref _nodeArray, _nodeArray.Length * 2); - } - _nodeArray[_nodeCount] = node; - _isNode.Push(new(true, _nodeCount)); - _nodeCount++; - IsLastAddedOperator = false; - } - - public void PushOperand(Token token) - { - if (_tokenArray.Length == _tokenCount) { - Array.Resize(ref _tokenArray, _tokenArray.Length * 2); - } - _tokenArray[_tokenCount] = token; - _isNode.Push(new(false, _tokenCount)); - _tokenCount++; - IsLastAddedOperator = false; - } - - public void PushOperator(Token token) - { - if (_operatorArray.Length == _operatorCount) { - Array.Resize(ref _operatorArray, _operatorArray.Length * 2); - } - _operatorArray[_operatorCount] = token; - _operatorCount++; - IsLastAddedOperator = true; - } - - public T StateOfCurrentDepth() where T: class, ICompileDepthState - { - return (CurrentDepthMark.StateCache as T)!; - } - - public bool TryPeekOperand(out bool isNode, out Token t, out TNode n) - { - if (OperandAheadOfDepth <= 0) - { - t = Token.Empty; - n = TNode.Empty; - isNode = false; - return false; - } - if (_isNode.Pop().IsNode) - { - t = Token.Empty; - n = _nodeArray[_nodeCount - 1]; - isNode = true; - return true; - } else - { - t = _tokenArray[_tokenCount - 1]; - n = TNode.Empty; - isNode = false; - return false; - } - } - - public bool TryPeekOperator(out Token op) - { - if (OperatorAheadOfDepth > 0) - { - op = _operatorArray[_operatorCount - 1]; - return true; - } - op = Token.Empty; - return false; - } - - public bool TryPopOperand(out bool isNode, out Token t, out TNode n) - { - if (OperandAheadOfDepth <= 0) - { - t = Token.Empty; - n = TNode.Empty; - isNode = false; - return false; - } - if (_isNode.Pop().IsNode) - { - t = Token.Empty; - n = _nodeArray[--_nodeCount]; - isNode = true; - return true; - } else - { - t = _tokenArray[--_tokenCount]; - n = TNode.Empty; - isNode = false; - return true; - } - } - - public bool TryPopOperator(out Token op) - { - if (OperatorAheadOfDepth > 0) - { - op = _operatorArray[--_operatorCount]; - return true; - } - op = Token.Empty; - return false; - } - - private record struct OperandIndex(bool IsNode, int Index); - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="CompileStack" +// 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.Collections; + +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Script +{ + public partial class CompileStack where TNode: ISyntaxNode + where TType: ITypeSource + { + + private Token? _lastToken; + + private TNode[] _nodeArray = new TNode[4]; + private Token[] _operatorArray = new Token[4]; + private Token[] _tokenArray = new Token[4]; + + private int _nodeCount,_tokenCount, _operatorCount; + private RandomAccessibleStack _depthStack = new RandomAccessibleStack( + ); + + private RandomAccessibleStack _isNode = new RandomAccessibleStack( + 8); + private Stack> _statementCache = new Stack>(); + private TNode _lastNode; + + public CompileStack() + { + _depthStack.Push(new CompileDepthMark(0, 0, 0, null!)); + _statementCache.Push(new Stack()); + } + + public bool IsLastAddedOperator { get; private set; } + + public CompileDepthMark CurrentDepthMark + { + get => _depthStack.Peek(); + } + + public int Depth => _depthStack.Count; + + public int OperandCount => _isNode.Count; + + public int OperatorCount => _operatorCount; + + public int OperatorAheadOfDepth + { + get => OperatorCount - _depthStack.Peek().OperatorBegin; + } + + public int OperandAheadOfDepth + { + get => OperandCount - _depthStack.Peek().OperandBegin; + } + + public Stack StatementsInDepth + { + get => _statementCache.Peek(); + } + + public void DecreaseDepth() + { + CompileDepthMark mark = _depthStack.Pop(); + Stack statementsInDepth = _statementCache.Pop(); + } + + public bool GetOperandAt(Index i, out TNode operandNode, out Token operandToken) + { + OperandIndex index = _isNode[i]; + if (index.IsNode) + { + operandNode = _nodeArray[index.Index]; + operandToken = Token.Empty; + return true; + } else + { + operandToken = _tokenArray[index.Index]; + operandNode = default!; + return false; + } + } + + public bool GetOperandAt(CompileDepthMark depth, Index i, out Token operandToken, out TNode operandNode) + { + OperandIndex index = _isNode[i]; + + _depthStack.Contains(depth); + if (index.IsNode) + { + operandNode = _nodeArray[index.Index]; + operandToken = Token.Empty; + return true; + } else + { + operandToken = _tokenArray[index.Index]; + operandNode = default!; + return false; + } + } + + public CompileDepthMark IncreaseDepth(int usage) + { + CompileDepthMark mark = + new CompileDepthMark(OperatorCount, OperandCount, usage); + + _depthStack.Push(mark); + _statementCache.Push(new Stack()); + return mark; + } + + public TNode PackAllStatements() + { + if (StatementsInDepth.Count == 0) { + return TNode.Empty; + } + TNode end = StatementsInDepth.Peek(); + TNode first = end; + while (StatementsInDepth.Count > 0) + { + first = StatementsInDepth.Pop(); + end.PrependNode(first); + end = first; + } + return first; + } + + public bool PeekOperand(out Token t, out TNode n) + { + if (OperandAheadOfDepth <= 0) + { + t = Token.Empty; + n = TNode.Empty; + return false; + } + if (_isNode.Pop().IsNode) + { + t = Token.Empty; + n = _nodeArray[_nodeCount - 1]; + return true; + } else + { + t = _tokenArray[_tokenCount - 1]; + n = TNode.Empty; + return false; + } + } + + public Token PeekOperator() + { + if (OperatorAheadOfDepth > 0) { + return _operatorArray[_operatorCount - 1]; + } + return Token.Empty; + } + + public bool PopOperand(out Token t, out TNode n) + { + if (OperandAheadOfDepth <= 0) + { + t = Token.Empty; + n = TNode.Empty; + return false; + } + if (_isNode.Pop().IsNode) + { + t = Token.Empty; + n = _nodeArray[--_nodeCount]; + return true; + } else + { + t = _tokenArray[--_tokenCount]; + n = TNode.Empty; + return false; + } + } + + public Token PopOperator() + { + if (OperatorAheadOfDepth > 0) + { + _operatorCount--; + return _operatorArray[_operatorCount]; + } + return Token.Empty; + } + + public void PushOperand(TNode node) + { + if (_nodeArray.Length == _nodeCount) { + Array.Resize(ref _nodeArray, _nodeArray.Length * 2); + } + _nodeArray[_nodeCount] = node; + _isNode.Push(new(true, _nodeCount)); + _nodeCount++; + IsLastAddedOperator = false; + } + + public void PushOperand(Token token) + { + if (_tokenArray.Length == _tokenCount) { + Array.Resize(ref _tokenArray, _tokenArray.Length * 2); + } + _tokenArray[_tokenCount] = token; + _isNode.Push(new(false, _tokenCount)); + _tokenCount++; + IsLastAddedOperator = false; + } + + public void PushOperator(Token token) + { + if (_operatorArray.Length == _operatorCount) { + Array.Resize(ref _operatorArray, _operatorArray.Length * 2); + } + _operatorArray[_operatorCount] = token; + _operatorCount++; + IsLastAddedOperator = true; + } + + public T StateOfCurrentDepth() where T: class, ICompileDepthState + { + return (CurrentDepthMark.StateCache as T)!; + } + + public bool TryPeekOperand(out bool isNode, out Token t, out TNode n) + { + if (OperandAheadOfDepth <= 0) + { + t = Token.Empty; + n = TNode.Empty; + isNode = false; + return false; + } + if (_isNode.Pop().IsNode) + { + t = Token.Empty; + n = _nodeArray[_nodeCount - 1]; + isNode = true; + return true; + } else + { + t = _tokenArray[_tokenCount - 1]; + n = TNode.Empty; + isNode = false; + return false; + } + } + + public bool TryPeekOperator(out Token op) + { + if (OperatorAheadOfDepth > 0) + { + op = _operatorArray[_operatorCount - 1]; + return true; + } + op = Token.Empty; + return false; + } + + public bool TryPopOperand(out bool isNode, out Token t, out TNode n) + { + if (OperandAheadOfDepth <= 0) + { + t = Token.Empty; + n = TNode.Empty; + isNode = false; + return false; + } + if (_isNode.Pop().IsNode) + { + t = Token.Empty; + n = _nodeArray[--_nodeCount]; + isNode = true; + return true; + } else + { + t = _tokenArray[--_tokenCount]; + n = TNode.Empty; + isNode = false; + return true; + } + } + + public bool TryPopOperator(out Token op) + { + if (OperatorAheadOfDepth > 0) + { + op = _operatorArray[--_operatorCount]; + return true; + } + op = Token.Empty; + return false; + } + + private record struct OperandIndex(bool IsNode, int Index); + + } +} diff --git a/StgSharp.Script/Common/IScriptSourceProvider.cs b/StgSharp.Script/Common/IScriptSourceProvider.cs index 3fce1cca..fe1c4ba1 100644 --- a/StgSharp.Script/Common/IScriptSourceProvider.cs +++ b/StgSharp.Script/Common/IScriptSourceProvider.cs @@ -1,59 +1,59 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="IScriptSourceProvider" -// 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 System; -using System.Collections.Generic; -using System.Text; - -namespace StgSharp.Script -{ - public interface IScriptSourceProvider - { - - bool IsEmpty { get; } - - int Location { get; } - - void EndWriting(); - - string ReadLine(); - - string ReadLine(out int position); - - /// - /// Return part of current provider. - /// - /// - /// Count of lines to be sliced - /// - /// - /// - /// - public IScriptSourceProvider Slice(int location, int count); - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="IScriptSourceProvider" +// 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 System; +using System.Collections.Generic; +using System.Text; + +namespace StgSharp.Script +{ + public interface IScriptSourceProvider + { + + bool IsEmpty { get; } + + int Location { get; } + + void EndWriting(); + + string ReadLine(); + + string ReadLine(out int position); + + /// + /// Return part of current provider. + /// + /// + /// Count of lines to be sliced + /// + /// + /// + /// + public IScriptSourceProvider Slice(int location, int count); + + } +} diff --git a/StgSharp.Script/Common/IScriptTokenReader.cs b/StgSharp.Script/Common/IScriptTokenReader.cs index baf1cfd1..18fc83d7 100644 --- a/StgSharp.Script/Common/IScriptTokenReader.cs +++ b/StgSharp.Script/Common/IScriptTokenReader.cs @@ -1,40 +1,40 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="IScriptTokenReader" -// 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. -// -// ----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -namespace StgSharp.Script -{ - public interface IScriptTokenReader - { - - bool IsEmpty { get; } - - Token ReadToken(); - - bool TryReadToken(out Token t); - - } +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="IScriptTokenReader" +// 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. +// +// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +namespace StgSharp.Script +{ + public interface IScriptTokenReader + { + + bool IsEmpty { get; } + + Token ReadToken(); + + bool TryReadToken(out Token t); + + } } \ No newline at end of file diff --git a/StgSharp.Script/Common/ISyntaxAnalyzer.cs b/StgSharp.Script/Common/ISyntaxAnalyzer.cs index dd5da1d7..2f28c33d 100644 --- a/StgSharp.Script/Common/ISyntaxAnalyzer.cs +++ b/StgSharp.Script/Common/ISyntaxAnalyzer.cs @@ -1,36 +1,36 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ISyntaxAnalyzer" -// 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. -// -// ----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -namespace StgSharp.Script -{ - public interface ISyntaxAnalyzer - { - - void AppendToken(Token t); - - } +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ISyntaxAnalyzer" +// 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. +// +// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +namespace StgSharp.Script +{ + public interface ISyntaxAnalyzer + { + + void AppendToken(Token t); + + } } \ No newline at end of file diff --git a/StgSharp.Script/Common/ISyntaxNode.cs b/StgSharp.Script/Common/ISyntaxNode.cs index 8d3b82fa..bebf0fb6 100644 --- a/StgSharp.Script/Common/ISyntaxNode.cs +++ b/StgSharp.Script/Common/ISyntaxNode.cs @@ -1,65 +1,65 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ISyntaxNode" -// 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.Collections; -using StgSharp.Script.Express; - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using System.Text; - -namespace StgSharp.Script -{ - public interface ISyntaxNode where TNode: ISyntaxNode where TType: ITypeSource - { - - long NodeFlag { get; } - - string CodeConvertTemplate { get; } - - TNode Previous { get; set; } - - TNode Next { get; set; } - - TNode Left { get; } - - TNode Right { get; } - - static abstract TNode Empty { get; } - - Token Source { get; } - - TType EqualityTypeConvert { get; } - - void AppendNode(TNode nextToken); - - void PrependNode(TNode previusNode); - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ISyntaxNode" +// 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.Collections; +using StgSharp.Script.Express; + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using System.Text; + +namespace StgSharp.Script +{ + public interface ISyntaxNode where TNode: ISyntaxNode where TType: ITypeSource + { + + long NodeFlag { get; } + + string CodeConvertTemplate { get; } + + TNode Previous { get; set; } + + TNode Next { get; set; } + + TNode Left { get; } + + TNode Right { get; } + + static abstract TNode Empty { get; } + + Token Source { get; } + + TType EqualityTypeConvert { get; } + + void AppendNode(TNode nextToken); + + void PrependNode(TNode previusNode); + + } +} diff --git a/StgSharp.Script/Common/ITypeSource.cs b/StgSharp.Script/Common/ITypeSource.cs index 266b81ab..ebae3eec 100644 --- a/StgSharp.Script/Common/ITypeSource.cs +++ b/StgSharp.Script/Common/ITypeSource.cs @@ -1,42 +1,42 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ITypeSource" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Script -{ - public interface ITypeSource where TConvert: ITypeSource - { - - bool IsConvertable(TConvert targetType); - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ITypeSource" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Script +{ + public interface ITypeSource where TConvert: ITypeSource + { + + bool IsConvertable(TConvert targetType); + + } +} diff --git a/StgSharp.Script/Common/ScriptSourceTransmitter.cs b/StgSharp.Script/Common/ScriptSourceTransmitter.cs index 5589a407..3778ea37 100644 --- a/StgSharp.Script/Common/ScriptSourceTransmitter.cs +++ b/StgSharp.Script/Common/ScriptSourceTransmitter.cs @@ -1,151 +1,151 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ScriptSourceTransmitter" -// 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 System; -using System.Collections; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Text; -using System.Text.RegularExpressions; - -namespace StgSharp.Script -{ - /// - /// Transmit a continuous part of script code to interpreter or compiler. This transmitter is - /// designed for single-thread-write and single-thread read. Any multi thread operation will - /// cause undefined behaviour. - /// - public class ScriptSourceTransmitter : IScriptSourceProvider - { - - private static ScriptSourceTransmitter _empty = new ScriptSourceTransmitter( - string.Empty, 0, 0) - { - _cache = [], - _buffer = [] - }; - - private string[] _buffer; - private bool _isWriting = true; - private int _begin, _index; - private List _cache; - private readonly string _completeMark; - - internal ScriptSourceTransmitter(string[] buffer, int start) - { - _buffer = buffer; - _begin = start; - _isWriting = false; - } - - public ScriptSourceTransmitter(string endMark, int start) - { - _cache = new List(); - _completeMark = endMark; - _begin = start; - _index = 0; - } - - public ScriptSourceTransmitter(string endMark, int start, int capacity) - { - _cache = new List(capacity); - _completeMark = endMark; - _begin = start; - _index = 0; - } - - public bool IsEmpty => _isWriting ? (_cache.Count == 0) : (_buffer.Length == 0) || (_index >= _buffer.Length); - - public bool IsFrozen => !_isWriting; - - public int Location => _begin + _index; - - public static ScriptSourceTransmitter Empty => _empty; - - public void EndWriting() - { - if (!_isWriting) { - return; - } - _isWriting = false; - _buffer = _cache.ToArray(); - _cache = null!; - } - - public string ReadLine() - { - if (_isWriting) { - throw new InvalidOperationException("Cannot read before all writing operation."); - } - if (_index >= _buffer.Length) { - return string.Empty; - } - string str = _buffer[_index]; - _index++; - return str; - } - - public string ReadLine(out int position) - { - if (_isWriting) { - throw new InvalidOperationException("Cannot read before all writing operation."); - } - if (_index >= _buffer.Length) - { - position = -1; - return string.Empty; - } - position = _begin + _index; - string str = _buffer[_index]; - _index++; - return str; - } - - public IScriptSourceProvider Slice(int location, int count) - { - ArgumentOutOfRangeException.ThrowIfLessThan(location, _begin); - ArgumentOutOfRangeException.ThrowIfGreaterThan( - location + count, _begin + _buffer.Length); - return new ScriptSourceTransmitter( - _buffer.AsSpan().Slice(location, count).ToArray(), location); - } - - public void WriteLine(string line) - { - if (!_isWriting) { - return; - } - if (string.Equals(_completeMark, line)) - { - EndWriting(); - return; - } - _cache.Add(line); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ScriptSourceTransmitter" +// 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 System; +using System.Collections; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Text; +using System.Text.RegularExpressions; + +namespace StgSharp.Script +{ + /// + /// Transmit a continuous part of script code to interpreter or compiler. This transmitter is + /// designed for single-thread-write and single-thread read. Any multi thread operation will + /// cause undefined behaviour. + /// + public class ScriptSourceTransmitter : IScriptSourceProvider + { + + private static ScriptSourceTransmitter _empty = new ScriptSourceTransmitter( + string.Empty, 0, 0) + { + _cache = [], + _buffer = [] + }; + + private string[] _buffer; + private bool _isWriting = true; + private int _begin, _index; + private List _cache; + private readonly string _completeMark; + + internal ScriptSourceTransmitter(string[] buffer, int start) + { + _buffer = buffer; + _begin = start; + _isWriting = false; + } + + public ScriptSourceTransmitter(string endMark, int start) + { + _cache = new List(); + _completeMark = endMark; + _begin = start; + _index = 0; + } + + public ScriptSourceTransmitter(string endMark, int start, int capacity) + { + _cache = new List(capacity); + _completeMark = endMark; + _begin = start; + _index = 0; + } + + public bool IsEmpty => _isWriting ? (_cache.Count == 0) : (_buffer.Length == 0) || (_index >= _buffer.Length); + + public bool IsFrozen => !_isWriting; + + public int Location => _begin + _index; + + public static ScriptSourceTransmitter Empty => _empty; + + public void EndWriting() + { + if (!_isWriting) { + return; + } + _isWriting = false; + _buffer = _cache.ToArray(); + _cache = null!; + } + + public string ReadLine() + { + if (_isWriting) { + throw new InvalidOperationException("Cannot read before all writing operation."); + } + if (_index >= _buffer.Length) { + return string.Empty; + } + string str = _buffer[_index]; + _index++; + return str; + } + + public string ReadLine(out int position) + { + if (_isWriting) { + throw new InvalidOperationException("Cannot read before all writing operation."); + } + if (_index >= _buffer.Length) + { + position = -1; + return string.Empty; + } + position = _begin + _index; + string str = _buffer[_index]; + _index++; + return str; + } + + public IScriptSourceProvider Slice(int location, int count) + { + ArgumentOutOfRangeException.ThrowIfLessThan(location, _begin); + ArgumentOutOfRangeException.ThrowIfGreaterThan( + location + count, _begin + _buffer.Length); + return new ScriptSourceTransmitter( + _buffer.AsSpan().Slice(location, count).ToArray(), location); + } + + public void WriteLine(string line) + { + if (!_isWriting) { + return; + } + if (string.Equals(_completeMark, line)) + { + EndWriting(); + return; + } + _cache.Add(line); + } + + } +} diff --git a/StgSharp.Script/Common/Token.cs b/StgSharp.Script/Common/Token.cs index 3b6a62bb..9e382fc6 100644 --- a/StgSharp.Script/Common/Token.cs +++ b/StgSharp.Script/Common/Token.cs @@ -1,82 +1,82 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="Token" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Script -{ - public readonly struct Token - { - - private static Token EmptyToken = new Token(); - - public readonly int Column; - public readonly int Line; - public readonly string Value; - public readonly TokenFlag Flag; - - public Token(string chars, int lineNumber, int columnNumber, TokenFlag flag) - { - Value = chars; - Line = lineNumber; - Column = columnNumber; - Flag = flag; - } - - public static Token Empty => EmptyToken; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public Token ReLocate(int line, int column) - { - return new Token(Value, line, column, Flag); - } - - } - - public enum TokenFlag : int - { - - None = 0, - Symbol_Unary = 1, - Symbol_Binary = 2, - Number = 3, - String = 4, - Member = 5, - Separator_Middle = 6, - Separator_Left = 7, - Separator_Right = 8, - Index_Left = 9, - Index_Right = 10, - Enum = 11 - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="Token" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Script +{ + public readonly struct Token + { + + private static Token EmptyToken = new Token(); + + public readonly int Column; + public readonly int Line; + public readonly string Value; + public readonly TokenFlag Flag; + + public Token(string chars, int lineNumber, int columnNumber, TokenFlag flag) + { + Value = chars; + Line = lineNumber; + Column = columnNumber; + Flag = flag; + } + + public static Token Empty => EmptyToken; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Token ReLocate(int line, int column) + { + return new Token(Value, line, column, Flag); + } + + } + + public enum TokenFlag : int + { + + None = 0, + Symbol_Unary = 1, + Symbol_Binary = 2, + Number = 3, + String = 4, + Member = 5, + Separator_Middle = 6, + Separator_Left = 7, + Separator_Right = 8, + Index_Left = 9, + Index_Right = 10, + Enum = 11 + + } +} diff --git a/StgSharp.Script/Express/Builtin/ExpBuiltinType.cs b/StgSharp.Script/Express/Builtin/ExpBuiltinType.cs index 9f9229c0..ffa350c8 100644 --- a/StgSharp.Script/Express/Builtin/ExpBuiltinType.cs +++ b/StgSharp.Script/Express/Builtin/ExpBuiltinType.cs @@ -1,55 +1,55 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpBuiltinType" -// 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.Data; - -using System; -using System.Collections.Generic; -using System.Text; - -namespace StgSharp.Script.Express -{ - internal sealed class ExpBuiltinType : ExpTypeSource - { - - private Type _marshalType; - - internal ExpBuiltinType(string name, Type origin) - : base(name, ScriptSourceTransmitter.Empty) - { - _marshalType = origin; - } - - public override void Analyse() - { - return; - } - - // A method convert value to CLR type - // Used for direct running rather than compiling to C# code. - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpBuiltinType" +// 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.Data; + +using System; +using System.Collections.Generic; +using System.Text; + +namespace StgSharp.Script.Express +{ + internal sealed class ExpBuiltinType : ExpTypeSource + { + + private Type _marshalType; + + internal ExpBuiltinType(string name, Type origin) + : base(name, ScriptSourceTransmitter.Empty) + { + _marshalType = origin; + } + + public override void Analyse() + { + return; + } + + // A method convert value to CLR type + // Used for direct running rather than compiling to C# code. + } +} diff --git a/StgSharp.Script/Express/Builtin/ExpCollection.cs b/StgSharp.Script/Express/Builtin/ExpCollection.cs index 1296bf9a..bfb7a7c1 100644 --- a/StgSharp.Script/Express/Builtin/ExpCollection.cs +++ b/StgSharp.Script/Express/Builtin/ExpCollection.cs @@ -1,192 +1,192 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpCollection" -// 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 System; -using System.Collections; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace StgSharp.Script.Express -{ - public abstract class ExpCollectionBase : ExpInstantiableElement, IEnumerable - { - - protected internal string _accurateType; - - protected ExpCollectionBase(string accurateType) - { - _accurateType = accurateType; - } - - public override ExpElementType ElementType => ExpElementType.Collection; - - public abstract int Count { get; } - - public sealed override IScriptSourceProvider SourceProvider => ScriptSourceTransmitter.Empty; - - public string MemberType - { - get => _accurateType; - } - - public override void Analyse() - { - return; - } - - public abstract IEnumerator GetEnumerator(); - - public override bool TryGetMember(string name, out ExpSyntaxNode memberNode) - { - memberNode = ExpSyntaxNode.Empty; - return false; - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - } - - public class ExpArray : ExpCollectionBase - { - - private ExpElementInstance[] _collection; - - public ExpArray(string accurateType) : base(accurateType) { } - - public ExpElementInstance this[int index] - { - get { return _collection[index]; } - set - { - if (value.TypeName != MemberType) { - throw new ExpInvalidCollectionMemberTypeException(value, this); - } - _collection[index] = value; - } - } - - public override int Count => _collection.Length; - - public override string Name => ExpressCompile.PoolString("ARRAY"); - - public override ExpSyntaxNode CreateInstanceNode(Token t) - { - throw new NotImplementedException(); - } - - public override IEnumerator GetEnumerator() - { - return ((IEnumerable)_collection) - .GetEnumerator(); - } - - } - - public class ExpBag : ExpCollectionBase - { - - private ConcurrentBag _collection = new ConcurrentBag( - ); - - public ExpBag(string accurateType) : base(accurateType) { } - - public override int Count => _collection.Count; - - public override string Name => ExpressCompile.PoolString("BAG"); - - public override ExpSyntaxNode CreateInstanceNode(Token t) - { - throw new NotImplementedException(); - } - - public override IEnumerator GetEnumerator() - { - return _collection.GetEnumerator(); - } - - } - - public sealed class ExpList : ExpCollectionBase - { - - private List _collection = new List(); - - public ExpList(string accurateType) : base(accurateType) { } - - public override int Count => _collection.Count; - - public override string Name => ExpressCompile.PoolString("LIST"); - - public override ExpSyntaxNode CreateInstanceNode(Token t) - { - throw new NotImplementedException(); - } - - public override IEnumerator GetEnumerator() - { - return _collection.GetEnumerator(); - } - - } - - public class ExpSet : ExpCollectionBase - { - - private HashSet _collection = new(); - - public ExpSet(string accurateType) : base(accurateType) { } - - public override int Count => _collection.Count; - - public override string Name => ExpressCompile.PoolString("SET"); - - public void Add(ExpElementInstance token) - { - if (token.TypeName != MemberType) { - throw new ExpInvalidCollectionMemberTypeException(token, this); - } - _collection.Add(token); - } - - public override ExpSyntaxNode CreateInstanceNode(Token t) - { - throw new NotImplementedException(); - } - - public sealed override IEnumerator GetEnumerator() - { - return ((IEnumerable)_collection) - .GetEnumerator(); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpCollection" +// 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 System; +using System.Collections; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace StgSharp.Script.Express +{ + public abstract class ExpCollectionBase : ExpInstantiableElement, IEnumerable + { + + protected internal string _accurateType; + + protected ExpCollectionBase(string accurateType) + { + _accurateType = accurateType; + } + + public override ExpElementType ElementType => ExpElementType.Collection; + + public abstract int Count { get; } + + public sealed override IScriptSourceProvider SourceProvider => ScriptSourceTransmitter.Empty; + + public string MemberType + { + get => _accurateType; + } + + public override void Analyse() + { + return; + } + + public abstract IEnumerator GetEnumerator(); + + public override bool TryGetMember(string name, out ExpSyntaxNode memberNode) + { + memberNode = ExpSyntaxNode.Empty; + return false; + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + } + + public class ExpArray : ExpCollectionBase + { + + private ExpElementInstance[] _collection; + + public ExpArray(string accurateType) : base(accurateType) { } + + public ExpElementInstance this[int index] + { + get { return _collection[index]; } + set + { + if (value.TypeName != MemberType) { + throw new ExpInvalidCollectionMemberTypeException(value, this); + } + _collection[index] = value; + } + } + + public override int Count => _collection.Length; + + public override string Name => ExpressCompile.PoolString("ARRAY"); + + public override ExpSyntaxNode CreateInstanceNode(Token t) + { + throw new NotImplementedException(); + } + + public override IEnumerator GetEnumerator() + { + return ((IEnumerable)_collection) + .GetEnumerator(); + } + + } + + public class ExpBag : ExpCollectionBase + { + + private ConcurrentBag _collection = new ConcurrentBag( + ); + + public ExpBag(string accurateType) : base(accurateType) { } + + public override int Count => _collection.Count; + + public override string Name => ExpressCompile.PoolString("BAG"); + + public override ExpSyntaxNode CreateInstanceNode(Token t) + { + throw new NotImplementedException(); + } + + public override IEnumerator GetEnumerator() + { + return _collection.GetEnumerator(); + } + + } + + public sealed class ExpList : ExpCollectionBase + { + + private List _collection = new List(); + + public ExpList(string accurateType) : base(accurateType) { } + + public override int Count => _collection.Count; + + public override string Name => ExpressCompile.PoolString("LIST"); + + public override ExpSyntaxNode CreateInstanceNode(Token t) + { + throw new NotImplementedException(); + } + + public override IEnumerator GetEnumerator() + { + return _collection.GetEnumerator(); + } + + } + + public class ExpSet : ExpCollectionBase + { + + private HashSet _collection = new(); + + public ExpSet(string accurateType) : base(accurateType) { } + + public override int Count => _collection.Count; + + public override string Name => ExpressCompile.PoolString("SET"); + + public void Add(ExpElementInstance token) + { + if (token.TypeName != MemberType) { + throw new ExpInvalidCollectionMemberTypeException(token, this); + } + _collection.Add(token); + } + + public override ExpSyntaxNode CreateInstanceNode(Token t) + { + throw new NotImplementedException(); + } + + public sealed override IEnumerator GetEnumerator() + { + return ((IEnumerable)_collection) + .GetEnumerator(); + } + + } +} diff --git a/StgSharp.Script/Express/Builtin/ExpCollectionInstance.cs b/StgSharp.Script/Express/Builtin/ExpCollectionInstance.cs index 541fd9d1..59035ea0 100644 --- a/StgSharp.Script/Express/Builtin/ExpCollectionInstance.cs +++ b/StgSharp.Script/Express/Builtin/ExpCollectionInstance.cs @@ -1,129 +1,129 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpCollectionInstance" -// 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 System; -using System.Collections.Generic; -using System.Text; - -namespace StgSharp.Script.Express -{ - public abstract class ExpCollectionInstanceBase : ExpSyntaxNode - { - - protected internal (int min, int max) _range; - protected internal ExpElementType _memberType; - - protected ExpCollectionInstanceBase(Token source) : base(source) { } - - public abstract ExpCollectionBase CollectionValue { get; } - - public ExpElementType MemberType - { - get => _memberType; - } - - public override ExpSyntaxNode Left => null!; - - public override ExpSyntaxNode Right => null!; - - public int MinCapacity => _range.min; - - public int MaxCapacity => _range.max; - - } - - public sealed class ExpSetInstance : ExpCollectionInstanceBase - { - - private ExpSet _collection; - - public ExpSetInstance(Token source, ExpSet set) - : base(source) - { - _collection = set; - } - - public override ExpCollectionBase CollectionValue => _collection; - - public override ExpInstantiableElement EqualityTypeConvert => throw new NotImplementedException( - ); - - } - - public sealed class ExpBagInstance : ExpCollectionInstanceBase - { - - private ExpBag _collection; - - public ExpBagInstance(Token source, ExpBag bag) - : base(source) - { - _collection = bag; - } - - public override ExpCollectionBase CollectionValue => _collection; - - public override ExpInstantiableElement EqualityTypeConvert => throw new NotImplementedException( - ); - - } - - public sealed class ExpListInstance : ExpCollectionInstanceBase - { - - private ExpList _collection; - - public ExpListInstance(Token source, ExpList list) - : base(source) - { - _collection = list; - } - - public override ExpCollectionBase CollectionValue => _collection; - - public override ExpInstantiableElement EqualityTypeConvert => throw new NotImplementedException( - ); - - } - - public sealed class ExpArrayInstance : ExpCollectionInstanceBase - { - - private ExpArray _collection; - - public ExpArrayInstance(Token source, ExpArray array) - : base(source) - { - _collection = array; - } - - public override ExpCollectionBase CollectionValue => _collection; - - public override ExpInstantiableElement EqualityTypeConvert => _collection; - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpCollectionInstance" +// 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 System; +using System.Collections.Generic; +using System.Text; + +namespace StgSharp.Script.Express +{ + public abstract class ExpCollectionInstanceBase : ExpSyntaxNode + { + + protected internal (int min, int max) _range; + protected internal ExpElementType _memberType; + + protected ExpCollectionInstanceBase(Token source) : base(source) { } + + public abstract ExpCollectionBase CollectionValue { get; } + + public ExpElementType MemberType + { + get => _memberType; + } + + public override ExpSyntaxNode Left => null!; + + public override ExpSyntaxNode Right => null!; + + public int MinCapacity => _range.min; + + public int MaxCapacity => _range.max; + + } + + public sealed class ExpSetInstance : ExpCollectionInstanceBase + { + + private ExpSet _collection; + + public ExpSetInstance(Token source, ExpSet set) + : base(source) + { + _collection = set; + } + + public override ExpCollectionBase CollectionValue => _collection; + + public override ExpInstantiableElement EqualityTypeConvert => throw new NotImplementedException( + ); + + } + + public sealed class ExpBagInstance : ExpCollectionInstanceBase + { + + private ExpBag _collection; + + public ExpBagInstance(Token source, ExpBag bag) + : base(source) + { + _collection = bag; + } + + public override ExpCollectionBase CollectionValue => _collection; + + public override ExpInstantiableElement EqualityTypeConvert => throw new NotImplementedException( + ); + + } + + public sealed class ExpListInstance : ExpCollectionInstanceBase + { + + private ExpList _collection; + + public ExpListInstance(Token source, ExpList list) + : base(source) + { + _collection = list; + } + + public override ExpCollectionBase CollectionValue => _collection; + + public override ExpInstantiableElement EqualityTypeConvert => throw new NotImplementedException( + ); + + } + + public sealed class ExpArrayInstance : ExpCollectionInstanceBase + { + + private ExpArray _collection; + + public ExpArrayInstance(Token source, ExpArray array) + : base(source) + { + _collection = array; + } + + public override ExpCollectionBase CollectionValue => _collection; + + public override ExpInstantiableElement EqualityTypeConvert => _collection; + + } +} diff --git a/StgSharp.Script/Express/Builtin/ExpLogic.cs b/StgSharp.Script/Express/Builtin/ExpLogic.cs index 07359625..a833f2c1 100644 --- a/StgSharp.Script/Express/Builtin/ExpLogic.cs +++ b/StgSharp.Script/Express/Builtin/ExpLogic.cs @@ -1,129 +1,129 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpLogic" -// 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 System; -using System.Collections.Generic; -using System.Runtime.CompilerServices; -using System.Text; - -namespace StgSharp.Script.Express -{ - public enum ExpLogicValue - { - - True, - False, - Unknown - - } - - public struct ExpLogic - { - - public static readonly ExpLogic False = new ExpLogic(ExpLogicValue.False); - - public static readonly ExpLogic True = new ExpLogic(ExpLogicValue.True); - public static readonly ExpLogic Unknown = new ExpLogic(ExpLogicValue.Unknown); - - private readonly ExpLogicValue _value; - - public ExpLogic(ExpLogicValue value) - { - _value = value; - } - - public bool IsTrue => _value == ExpLogicValue.True; - - public bool IsFalse => _value == ExpLogicValue.False; - - public bool IsUnknown => _value == ExpLogicValue.Unknown; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public bool ToBoolean() - { - return _value == ExpLogicValue.True; - } - - public override string ToString() => _value.ToString(); - - public static bool TryParse(ReadOnlySpan value, out ExpLogic result) - { - if (Enum.TryParse(value, out ExpLogicValue e)) - { - result = new ExpLogic(e); - return true; - } - result = default; - return false; - } - - // NOT ! - public static ExpLogic operator !(ExpLogic a) - { - return a.IsTrue ? False : a.IsFalse ? True : Unknown; - } - - // AND & - public static ExpLogic operator &(ExpLogic a, ExpLogic b) - { - if (a.IsFalse || b.IsFalse) { - return False; - } - - if (a.IsUnknown || b.IsUnknown) { - return Unknown; - } - - return True; - } - - // XOR ^ - public static ExpLogic operator ^(ExpLogic a, ExpLogic b) - { - if (a.IsUnknown || b.IsUnknown) { - return Unknown; - } - - return (a.IsTrue ^ b.IsTrue) ? True : False; - } - - // OR | - public static ExpLogic operator |(ExpLogic a, ExpLogic b) - { - if (a.IsTrue || b.IsTrue) { - return True; - } - - if (a.IsUnknown || b.IsUnknown) { - return Unknown; - } - - return False; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpLogic" +// 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 System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using System.Text; + +namespace StgSharp.Script.Express +{ + public enum ExpLogicValue + { + + True, + False, + Unknown + + } + + public struct ExpLogic + { + + public static readonly ExpLogic False = new ExpLogic(ExpLogicValue.False); + + public static readonly ExpLogic True = new ExpLogic(ExpLogicValue.True); + public static readonly ExpLogic Unknown = new ExpLogic(ExpLogicValue.Unknown); + + private readonly ExpLogicValue _value; + + public ExpLogic(ExpLogicValue value) + { + _value = value; + } + + public bool IsTrue => _value == ExpLogicValue.True; + + public bool IsFalse => _value == ExpLogicValue.False; + + public bool IsUnknown => _value == ExpLogicValue.Unknown; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool ToBoolean() + { + return _value == ExpLogicValue.True; + } + + public override string ToString() => _value.ToString(); + + public static bool TryParse(ReadOnlySpan value, out ExpLogic result) + { + if (Enum.TryParse(value, out ExpLogicValue e)) + { + result = new ExpLogic(e); + return true; + } + result = default; + return false; + } + + // NOT ! + public static ExpLogic operator !(ExpLogic a) + { + return a.IsTrue ? False : a.IsFalse ? True : Unknown; + } + + // AND & + public static ExpLogic operator &(ExpLogic a, ExpLogic b) + { + if (a.IsFalse || b.IsFalse) { + return False; + } + + if (a.IsUnknown || b.IsUnknown) { + return Unknown; + } + + return True; + } + + // XOR ^ + public static ExpLogic operator ^(ExpLogic a, ExpLogic b) + { + if (a.IsUnknown || b.IsUnknown) { + return Unknown; + } + + return (a.IsTrue ^ b.IsTrue) ? True : False; + } + + // OR | + public static ExpLogic operator |(ExpLogic a, ExpLogic b) + { + if (a.IsTrue || b.IsTrue) { + return True; + } + + if (a.IsUnknown || b.IsUnknown) { + return Unknown; + } + + return False; + } + + } +} diff --git a/StgSharp.Script/Express/CompileEnv/BuiltinType.cs b/StgSharp.Script/Express/CompileEnv/BuiltinType.cs index 76cdf4e3..0731a975 100644 --- a/StgSharp.Script/Express/CompileEnv/BuiltinType.cs +++ b/StgSharp.Script/Express/CompileEnv/BuiltinType.cs @@ -1,48 +1,48 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="BuiltinType" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Script.Express -{ - public static partial class ExpressCompile - { - - public static ExpTypeSource ExpInt { get; private set; } - - public static ExpTypeSource ExpReal { get; private set; } - - public static ExpTypeSource ExpBool { get; private set; } - - public static ExpTypeSource ExpString { get; private set; } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="BuiltinType" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Script.Express +{ + public static partial class ExpressCompile + { + + public static ExpTypeSource ExpInt { get; private set; } + + public static ExpTypeSource ExpReal { get; private set; } + + public static ExpTypeSource ExpBool { get; private set; } + + public static ExpTypeSource ExpString { get; private set; } + + } +} diff --git a/StgSharp.Script/Express/CompileEnv/DefaultSchema.cs b/StgSharp.Script/Express/CompileEnv/DefaultSchema.cs index 9753fdfd..de7d860e 100644 --- a/StgSharp.Script/Express/CompileEnv/DefaultSchema.cs +++ b/StgSharp.Script/Express/CompileEnv/DefaultSchema.cs @@ -1,124 +1,124 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="DefaultSchema" -// 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 System; -using System.Collections; -using System.Collections.Frozen; -using System.Collections.Generic; -using System.Linq; - -using static StgSharp.Script.Express.ExpressCompile; - -namespace StgSharp.Script.Express -{ - public sealed partial class ExpSchema_Builtin : ExpSchema - { - - private static readonly ExpSchema_Builtin _onlyInstance = new ExpSchema_Builtin(); - - private ExpSchema_Builtin() - : base() - { - Name = "Nitload"; - } - - internal static ExpSchema_Builtin Only - { - get => _onlyInstance; - } - - public override void LoadFromSource(ExpSchemaSource source) - { - return; - } - - public override bool TryGetConst(string name, out ExpElementInstance c) - { - return ConstDict.TryGetValue(name, out c); - } - - public override bool TryGetEntity(string name, out ExpEntitySource e) - { - e = null; - return false; - } - - public override bool TryGetFunction(string name, out ExpFunctionSource f) - { - return FunctionDict.TryGetValue(name, out f!); - } - - public override bool TryGetProcedure(string name, out ExpProcedureSource p) - { - return ProcedureDict.TryGetValue(name, out p!); - } - - public override bool TryGetRule(string name, out ExpRuleSource r) - { - r = null!; - return false; - } - - public override bool TryGetSchemaInclude(string name, out ExpSchema include) - { - include = null!; - return false; - } - - public override bool TryGetType(string name, out ExpTypeSource t) - { - return TypeDict.TryGetValue(name, out t); - } - - internal void Init() - { - IEnumerable> builtinTypeSource = [ new KeyValuePair( - PoolString(Keyword.Integer), - new ExpBuiltinType(Keyword.Integer, typeof(int))), new KeyValuePair( - PoolString(Keyword.Real), new ExpBuiltinType(Keyword.Real, typeof(float))), new KeyValuePair( - PoolString(Keyword.Boolean), - new ExpBuiltinType(Keyword.Boolean, typeof(bool))), new KeyValuePair( - PoolString(Keyword.Logical), - new ExpBuiltinType(Keyword.Logical, typeof(ExpLogic))), new KeyValuePair( - PoolString(Keyword.String), - new ExpBuiltinType(Keyword.String, typeof(string))), new KeyValuePair( - PoolString(Keyword.Binary), - new ExpBuiltinType(Keyword.Binary, typeof(BitArray))), ]; - TypeDict = new Dictionary(builtinTypeSource, - Multiplexer).ToFrozenDictionary(); - - - ConstDict = new Dictionary(Multiplexer) { - { PoolString("PI"), new ExpRealNumberNode( - new Token(PoolString("PI"), -1, -1, TokenFlag.Number), MathF.PI, true) }, - { PoolString("E"), new ExpRealNumberNode( - new Token(PoolString("E"), -1, -1, TokenFlag.Number), MathF.E, true) }, - }.ToFrozenDictionary(); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="DefaultSchema" +// 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 System; +using System.Collections; +using System.Collections.Frozen; +using System.Collections.Generic; +using System.Linq; + +using static StgSharp.Script.Express.ExpressCompile; + +namespace StgSharp.Script.Express +{ + public sealed partial class ExpSchema_Builtin : ExpSchema + { + + private static readonly ExpSchema_Builtin _onlyInstance = new ExpSchema_Builtin(); + + private ExpSchema_Builtin() + : base() + { + Name = "Nitload"; + } + + internal static ExpSchema_Builtin Only + { + get => _onlyInstance; + } + + public override void LoadFromSource(ExpSchemaSource source) + { + return; + } + + public override bool TryGetConst(string name, out ExpElementInstance c) + { + return ConstDict.TryGetValue(name, out c); + } + + public override bool TryGetEntity(string name, out ExpEntitySource e) + { + e = null; + return false; + } + + public override bool TryGetFunction(string name, out ExpFunctionSource f) + { + return FunctionDict.TryGetValue(name, out f!); + } + + public override bool TryGetProcedure(string name, out ExpProcedureSource p) + { + return ProcedureDict.TryGetValue(name, out p!); + } + + public override bool TryGetRule(string name, out ExpRuleSource r) + { + r = null!; + return false; + } + + public override bool TryGetSchemaInclude(string name, out ExpSchema include) + { + include = null!; + return false; + } + + public override bool TryGetType(string name, out ExpTypeSource t) + { + return TypeDict.TryGetValue(name, out t); + } + + internal void Init() + { + IEnumerable> builtinTypeSource = [ new KeyValuePair( + PoolString(Keyword.Integer), + new ExpBuiltinType(Keyword.Integer, typeof(int))), new KeyValuePair( + PoolString(Keyword.Real), new ExpBuiltinType(Keyword.Real, typeof(float))), new KeyValuePair( + PoolString(Keyword.Boolean), + new ExpBuiltinType(Keyword.Boolean, typeof(bool))), new KeyValuePair( + PoolString(Keyword.Logical), + new ExpBuiltinType(Keyword.Logical, typeof(ExpLogic))), new KeyValuePair( + PoolString(Keyword.String), + new ExpBuiltinType(Keyword.String, typeof(string))), new KeyValuePair( + PoolString(Keyword.Binary), + new ExpBuiltinType(Keyword.Binary, typeof(BitArray))), ]; + TypeDict = new Dictionary(builtinTypeSource, + Multiplexer).ToFrozenDictionary(); + + + ConstDict = new Dictionary(Multiplexer) { + { PoolString("PI"), new ExpRealNumberNode( + new Token(PoolString("PI"), -1, -1, TokenFlag.Number), MathF.PI, true) }, + { PoolString("E"), new ExpRealNumberNode( + new Token(PoolString("E"), -1, -1, TokenFlag.Number), MathF.E, true) }, + }.ToFrozenDictionary(); + } + + } +} diff --git a/StgSharp.Script/Express/CompileEnv/ExpCompile.cs b/StgSharp.Script/Express/CompileEnv/ExpCompile.cs index ff6bf5df..a4272184 100644 --- a/StgSharp.Script/Express/CompileEnv/ExpCompile.cs +++ b/StgSharp.Script/Express/CompileEnv/ExpCompile.cs @@ -1,142 +1,142 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpCompile" -// 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 CommunityToolkit.HighPerformance.Buffers; - -using StgSharp.Collections; - -using System; -using System.Collections; -using System.Collections.Frozen; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.ComponentModel; -using System.Text; - -namespace StgSharp.Script.Express -{ - public static partial class ExpressCompile - { - - private static string[] _operatorsWithLetter; - private static ConcurrentStringHashMultiplexer _multiplexer; - private static FrozenDictionary _builtinConst; - private static FrozenDictionary _builtinType; - private static FrozenDictionary _operators; - private static StringPool _compileStringCache,_emptyCache; - - internal static ConcurrentStringHashMultiplexer Multiplexer - { - get - { - if (_multiplexer == null) { - throw new ExpCompileNotInitializedException(); - } - return _multiplexer; - } - } - - public static void ClearStringCache() - { - _compileStringCache.Reset(); - } - - public static void DeinitCompile() - { - _compileStringCache.Reset(); - _compileStringCache = null!; - - _multiplexer.Dispose(); - _multiplexer = null!; - } - - public static void InitCompile() - { - _compileStringCache = new StringPool(); - _multiplexer = new ConcurrentStringHashMultiplexer(); - - ExpSchema_Builtin.Only.Init(); - - PoolKeywords(); - InitPrecedence(); - - _operatorsWithLetter = [ Keyword.Add, Keyword.Sub, Keyword.Mul, Keyword.Div, Keyword.And, Keyword.Or, Keyword.Xor, Keyword.AndOr, Keyword.Not, ]; - - ExpSchema_Builtin.Only - .TryGetType( - PoolString(Keyword.Integer), out ExpTypeSource? _expInt); - ExpInt = _expInt; - - ExpSchema_Builtin.Only.TryGetType(PoolString(Keyword.Real), out ExpTypeSource? _expReal); - ExpReal = _expReal; - ExpSchema_Builtin.Only - .TryGetType( - PoolString(Keyword.Boolean), out ExpTypeSource? _expBool); - ExpBool = _expBool; - - ExpSchema_Builtin.Only - .TryGetType( - PoolString(Keyword.Boolean), out ExpTypeSource? _expString); - ExpString = _expString; - - - _emptyCache = new StringPool(); - /* - foreach( string str in _compileStringCache ) { - _emptyCache.Add( str ); - } - /**/ - } - - public static bool LetterIsKeyword(string str) - { - if (char.IsLetter(str[0])) { - return _keywordSet.Contains(str); - } - return true; - } - - public static bool LetterIsOperator(string str) - { - if (char.IsLetter(str[0])) { - return Array.IndexOf(_operatorsWithLetter, str) != -1; - } - return true; - } - - public static string PoolString(string str) - { - return _compileStringCache.GetOrAdd(str); - } - - public static string PoolString(ReadOnlySpan str) - { - return _compileStringCache.GetOrAdd(str); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpCompile" +// 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 CommunityToolkit.HighPerformance.Buffers; + +using StgSharp.Collections; + +using System; +using System.Collections; +using System.Collections.Frozen; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel; +using System.Text; + +namespace StgSharp.Script.Express +{ + public static partial class ExpressCompile + { + + private static string[] _operatorsWithLetter; + private static ConcurrentStringHashMultiplexer _multiplexer; + private static FrozenDictionary _builtinConst; + private static FrozenDictionary _builtinType; + private static FrozenDictionary _operators; + private static StringPool _compileStringCache,_emptyCache; + + internal static ConcurrentStringHashMultiplexer Multiplexer + { + get + { + if (_multiplexer == null) { + throw new ExpCompileNotInitializedException(); + } + return _multiplexer; + } + } + + public static void ClearStringCache() + { + _compileStringCache.Reset(); + } + + public static void DeinitCompile() + { + _compileStringCache.Reset(); + _compileStringCache = null!; + + _multiplexer.Dispose(); + _multiplexer = null!; + } + + public static void InitCompile() + { + _compileStringCache = new StringPool(); + _multiplexer = new ConcurrentStringHashMultiplexer(); + + ExpSchema_Builtin.Only.Init(); + + PoolKeywords(); + InitPrecedence(); + + _operatorsWithLetter = [ Keyword.Add, Keyword.Sub, Keyword.Mul, Keyword.Div, Keyword.And, Keyword.Or, Keyword.Xor, Keyword.AndOr, Keyword.Not, ]; + + ExpSchema_Builtin.Only + .TryGetType( + PoolString(Keyword.Integer), out ExpTypeSource? _expInt); + ExpInt = _expInt; + + ExpSchema_Builtin.Only.TryGetType(PoolString(Keyword.Real), out ExpTypeSource? _expReal); + ExpReal = _expReal; + ExpSchema_Builtin.Only + .TryGetType( + PoolString(Keyword.Boolean), out ExpTypeSource? _expBool); + ExpBool = _expBool; + + ExpSchema_Builtin.Only + .TryGetType( + PoolString(Keyword.Boolean), out ExpTypeSource? _expString); + ExpString = _expString; + + + _emptyCache = new StringPool(); + /* + foreach( string str in _compileStringCache ) { + _emptyCache.Add( str ); + } + /**/ + } + + public static bool LetterIsKeyword(string str) + { + if (char.IsLetter(str[0])) { + return _keywordSet.Contains(str); + } + return true; + } + + public static bool LetterIsOperator(string str) + { + if (char.IsLetter(str[0])) { + return Array.IndexOf(_operatorsWithLetter, str) != -1; + } + return true; + } + + public static string PoolString(string str) + { + return _compileStringCache.GetOrAdd(str); + } + + public static string PoolString(ReadOnlySpan str) + { + return _compileStringCache.GetOrAdd(str); + } + + } +} diff --git a/StgSharp.Script/Express/CompileEnv/ExpOperatorPrecedence.cs b/StgSharp.Script/Express/CompileEnv/ExpOperatorPrecedence.cs index abbf2e70..1f599c47 100644 --- a/StgSharp.Script/Express/CompileEnv/ExpOperatorPrecedence.cs +++ b/StgSharp.Script/Express/CompileEnv/ExpOperatorPrecedence.cs @@ -1,66 +1,66 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpOperatorPrecedence" -// 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 System; -using System.Collections.Frozen; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Script.Express -{ - public static partial class ExpressCompile - { - - public static bool TryGetOperatorPrecedence(string operatorName, out int precedence) - { - return _operatorPrecedence.TryGetValue(operatorName, out precedence); - } - - public static bool TryGetSuperTypeOperatorPrecedence(string operatorName, out int precedence) - { - return _superTypeOperatorPrecedent.TryGetValue(operatorName, out precedence); - } - - private static void InitPrecedence() - { - KeyValuePair[] source = [ new KeyValuePair(PoolString("["), 1), new KeyValuePair(PoolString("."), 1), new KeyValuePair(PoolString("\\"), 1), new KeyValuePair(PoolString("unary+"), 2), new KeyValuePair(PoolString("unary-"), 2), new KeyValuePair(PoolString("NOT"), 2), new KeyValuePair(PoolString("**"), 3), new KeyValuePair(PoolString("*"), 4), new KeyValuePair(PoolString("/"), 4), new KeyValuePair(PoolString("AND"), 4), new KeyValuePair(PoolString("MOD"), 4), new KeyValuePair(PoolString("DIV"), 4), new KeyValuePair(PoolString("||"), 4), new KeyValuePair(PoolString("+"), 5), new KeyValuePair(PoolString("-"), 5), new KeyValuePair(PoolString("OR"), 5), new KeyValuePair(PoolString("XOR"), 5), new KeyValuePair(PoolString("="), 6), new KeyValuePair(PoolString("<>"), 6), new KeyValuePair(PoolString("<="), 6), new KeyValuePair(PoolString(">="), 6), new KeyValuePair(PoolString(">"), 6), new KeyValuePair(PoolString("<"), 6), new KeyValuePair(PoolString(":=:"), 6), new KeyValuePair(PoolString(":<>:"), 6), new KeyValuePair(PoolString("IN"), 6), new KeyValuePair(PoolString("LIKE"), 6), new KeyValuePair(PoolString(Keyword.Assignment), 7) ]; - _operatorPrecedence = new Dictionary(source, - _multiplexer).ToFrozenDictionary(); - source = [ new KeyValuePair("ONEOF", 1), new KeyValuePair("AND", 2), new KeyValuePair("ANDOR", 3), ]; - _superTypeOperatorPrecedent = new Dictionary(source, - _multiplexer).ToFrozenDictionary( - ); - } - - #pragma warning disable CS8618 - private static FrozenDictionary _superTypeOperatorPrecedent; - private static FrozenDictionary _operatorPrecedence; - #pragma warning restore CS8618 - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpOperatorPrecedence" +// 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 System; +using System.Collections.Frozen; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Script.Express +{ + public static partial class ExpressCompile + { + + public static bool TryGetOperatorPrecedence(string operatorName, out int precedence) + { + return _operatorPrecedence.TryGetValue(operatorName, out precedence); + } + + public static bool TryGetSuperTypeOperatorPrecedence(string operatorName, out int precedence) + { + return _superTypeOperatorPrecedent.TryGetValue(operatorName, out precedence); + } + + private static void InitPrecedence() + { + KeyValuePair[] source = [ new KeyValuePair(PoolString("["), 1), new KeyValuePair(PoolString("."), 1), new KeyValuePair(PoolString("\\"), 1), new KeyValuePair(PoolString("unary+"), 2), new KeyValuePair(PoolString("unary-"), 2), new KeyValuePair(PoolString("NOT"), 2), new KeyValuePair(PoolString("**"), 3), new KeyValuePair(PoolString("*"), 4), new KeyValuePair(PoolString("/"), 4), new KeyValuePair(PoolString("AND"), 4), new KeyValuePair(PoolString("MOD"), 4), new KeyValuePair(PoolString("DIV"), 4), new KeyValuePair(PoolString("||"), 4), new KeyValuePair(PoolString("+"), 5), new KeyValuePair(PoolString("-"), 5), new KeyValuePair(PoolString("OR"), 5), new KeyValuePair(PoolString("XOR"), 5), new KeyValuePair(PoolString("="), 6), new KeyValuePair(PoolString("<>"), 6), new KeyValuePair(PoolString("<="), 6), new KeyValuePair(PoolString(">="), 6), new KeyValuePair(PoolString(">"), 6), new KeyValuePair(PoolString("<"), 6), new KeyValuePair(PoolString(":=:"), 6), new KeyValuePair(PoolString(":<>:"), 6), new KeyValuePair(PoolString("IN"), 6), new KeyValuePair(PoolString("LIKE"), 6), new KeyValuePair(PoolString(Keyword.Assignment), 7) ]; + _operatorPrecedence = new Dictionary(source, + _multiplexer).ToFrozenDictionary(); + source = [ new KeyValuePair("ONEOF", 1), new KeyValuePair("AND", 2), new KeyValuePair("ANDOR", 3), ]; + _superTypeOperatorPrecedent = new Dictionary(source, + _multiplexer).ToFrozenDictionary( + ); + } + + #pragma warning disable CS8618 + private static FrozenDictionary _superTypeOperatorPrecedent; + private static FrozenDictionary _operatorPrecedence; + #pragma warning restore CS8618 + } +} diff --git a/StgSharp.Script/Express/CompileEnv/KeyWord.cs b/StgSharp.Script/Express/CompileEnv/KeyWord.cs index d807c43b..711f3d1d 100644 --- a/StgSharp.Script/Express/CompileEnv/KeyWord.cs +++ b/StgSharp.Script/Express/CompileEnv/KeyWord.cs @@ -1,318 +1,318 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="KeyWord" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Script.Express -{ - public static partial class ExpressCompile - { - - private static HashSet _keywordSet; - - private static void PoolKeywords() - { - _keywordSet = new(); - - FieldInfo[] fields = typeof(Keyword).GetFields(BindingFlags.Public); - ParallelLoopResult result = Parallel.ForEach( - fields, static(field) => { - if (field.FieldType == typeof(string) && field.GetValue(null) is string str) - { - _compileStringCache.GetOrAdd(str); - _keywordSet.Add(str); - } - }); - while (!result.IsCompleted) { } - } - - public static class Keyword - { - - public static HashSet ScopeBlock = new HashSet { - EndAlias, EndCase, EndConstant, EndEntity, EndFunction, EndIf, EndLocal, EndProcedure, EndRepeat, EndRule, EndSchema, EndSubtypeConstraint, EndType - }; - - public static HashSet Symbols = [ Dot, Comma, Semicolon, Colon, Percent, Apostrophe, Backslash, IndexOf, RightBracket, LeftBrace, RightBrace, Pipe, LeftParen, RightParen, LeftAsterisk, Assignment, DoublePipe, ExpSymbol, CommentSingleLine, CommentStart, CommentEnd, InstanceEqual, InstanceNotEqual ]; - - public static HashSet DataTypes { get; } = [ Array, Bag, Binary, Boolean, Enumeration, Integer, List, Logical, Number, Of, Real, Set, String ]; - - public static HashSet InternalProcess { get; } = [ Insert, Remove ]; - - public static HashSet BuiltinFunctions { get; } = [ Abs, Acos, Asin, Atan, BLength, Cos, Exists, Exp, Format, HiBound, HiIndex, Length, LoBound, Log, Log2, Log10, LoIndex, Nvl, Odd, Rolesof, Sin, Sizeof, Sqrt, Tan, Typeof, Usedin, Value, ValueIn, ValueUnique ]; - - public static HashSet Literals { get; } = [ QuestionMark, Self, Const, E, Pi, False, True, Unknown ]; - - public static HashSet Operators { get; } = [ And, AndOr, Div, In, Like, Mod, Not, Or, Xor, Add, Sub, Mul, Slash, Equal, NotEqual, LessThan, GreaterThan, LessThanOrEqual, GreaterThanOrEqual ]; - - public static HashSet Aliasing { get; } = [ Alias, Renamed ]; - - public static HashSet ModifiersAttributes { get; } = [ Abstract, Aggregate, As, BasedOn, By, Escape, Fixed, From, Use, With ]; - - public static HashSet QueryReference { get; } = [ Query, Reference, Select ]; - - public static HashSet ConstraintsInheritance { get; } = [ Oneof, Optional, Subtype, SubtypeConstraint, Supertype, TotalOver, Unique, Where ]; - - public static HashSet Declarations { get; } = [ Constant, Derive, Entity, Extensible, Fixed, Function, Generic, GenericEntity, Inverse, Local, Procedure, Rule, Schema, Type, Var ]; - - public static HashSet FlowControl { get; } = [ Begin, Case, Else, End, For, If, Otherwise, Repeat, Return, Skip, Then, To, Until, While ]; - - #region Basic Data Type - - public const string Array = "ARRAY"; - public const string Bag = "BAG"; - public const string Binary = "BINARY"; - public const string Boolean = "BOOLEAN"; - public const string Enumeration = "ENUMERATION"; - public const string Integer = "INTEGER"; - public const string List = "LIST"; - public const string Logical = "LOGICAL"; - public const string Number = "NUMBER"; - public const string Of = "OF"; - public const string Real = "REAL"; - public const string Set = "SET"; - public const string String = "STRING"; - - #endregion - - #region Flow Control - - public const string Begin = "BEGIN"; - public const string Case = "CASE"; - public const string Else = "ELSE"; - public const string End = "END"; - public const string For = "FOR"; - public const string If = "IF"; - public const string Otherwise = "OTHERWISE"; - public const string Repeat = "REPEAT"; - public const string Return = "RETURN"; - public const string Skip = "SKIP"; - public const string Then = "THEN"; - public const string To = "TO"; - public const string Until = "UNTIL"; - public const string While = "WHILE"; - - #endregion - - #region Declarations - - public const string Constant = "CONSTANT"; - public const string Derive = "DERIVE"; - public const string Entity = "ENTITY"; - public const string Extensible = "EXTENSIBLE"; - public const string Fixed = "FIXED"; - public const string Function = "FUNCTION"; - public const string Generic = "GENERIC"; - public const string GenericEntity = "GENERIC_ENTITY"; - public const string Inverse = "INVERSE"; - public const string Local = "LOCAL"; - public const string Procedure = "PROCEDURE"; - public const string Rule = "RULE"; - public const string Schema = "SCHEMA"; - public const string Type = "TYPE"; - public const string Var = "VAR"; - - #endregion - - #region Constraints Inheritance - - public const string Oneof = "ONEOF"; - public const string Optional = "OPTIONAL"; - public const string Subtype = "SUBTYPE"; - public const string SubtypeConstraint = "SUBTYPE CONSTRAINT"; - public const string Supertype = "SUPERTYPE"; - public const string TotalOver = "TOTAL OVER"; - public const string Unique = "UNIQUE"; - public const string Where = "WHERE"; - - #endregion - - #region Scope - - public const string EndAlias = "END_ALIAS"; - public const string EndCase = "END_CASE"; - public const string EndConstant = "END_CONSTANT"; - public const string EndEntity = "END_ENTITY"; - public const string EndFunction = "END_FUNCTION"; - public const string EndIf = "END_IF"; - public const string EndLocal = "END_LOCAL"; - public const string EndProcedure = "END_PROCEDURE"; - public const string EndRepeat = "END_REPEAT"; - public const string EndRule = "END_RULE"; - public const string EndSchema = "END_SCHEMA"; - public const string EndSubtypeConstraint = "END_SUBTYPE CONSTRAINT"; - public const string EndType = "END_TYPE"; - - #endregion - - #region Index and Ref - - public const string Query = "QUERY"; - public const string Reference = "REFERENCE"; - public const string Select = "SELECT"; - - #endregion - - #region Modifiers Attributes - - public const string Abstract = "ABSTRACT"; - public const string Aggregate = "AGGREGATE"; - public const string As = "AS"; - public const string BasedOn = "BASED ON"; - public const string By = "BY"; - public const string Escape = "ESCAPE"; - public const string From = "FROM"; - public const string Use = "USE"; - public const string With = "WITH"; - - #endregion - - #region Aliasing - - public const string Alias = "ALIAS"; - public const string Renamed = "RENAMED"; - - #endregion - - #region Operator - - public const string And = "AND"; - public const string AndOr = "ANDOR"; - public const string Div = "DIV"; - public const string In = "IN"; - public const string Like = "LIKE"; - public const string Mod = "MOD"; - public const string Not = "NOT"; - public const string Or = "OR"; - public const string Xor = "XOR"; - - #endregion - - #region Constants - - public const string QuestionMark = "?"; - public const string Self = "SELF"; - public const string Const = "CONST"; - public const string E = "E"; - public const string Pi = "PI"; - public const string False = "FALSE"; - public const string True = "TRUE"; - public const string Unknown = "UNKNOWN"; - - #endregion - - #region Functions - - public const string Abs = "ABS"; - public const string Acos = "ACOS"; - public const string Asin = "ASIN"; - public const string Atan = "ATAN"; - public const string BLength = "BLENGTH"; - public const string Cos = "COS"; - public const string Exists = "EXISTS"; - public const string Exp = "EXP"; - public const string Format = "FORMAT"; - public const string HiBound = "HIBOUND"; - public const string HiIndex = "HIINDEX"; - public const string Length = "LENGTH"; - public const string LoBound = "LObound"; - public const string Log = "LOG"; - public const string Log2 = "LOG2"; - public const string Log10 = "LOG10"; - public const string LoIndex = "LOINDEX"; - public const string Nvl = "NVL"; - public const string Odd = "ODD"; - public const string Rolesof = "ROLESOF"; - public const string Sin = "SIN"; - public const string Sizeof = "SIZEOF"; - public const string Sqrt = "SQRT"; - public const string Tan = "TAN"; - public const string Typeof = "TYPEOF"; - public const string Usedin = "USEDIN"; - public const string Value = "VALUE"; - public const string ValueIn = "VALUE IN"; - public const string ValueUnique = "VALUE UNIQUE"; - - #endregion - - #region Procedure - - public const string Insert = "INSERT"; - public const string Remove = "REMOVE"; - - #endregion - - #region Symbols - - public const string Dot = "."; - public const string Comma = ","; - public const string Semicolon = ";"; - public const string Colon = ":"; - public const string Mul = "*"; - public const string Add = "+"; - public const string UnaryPlus = "+"; - public const string Sub = "-"; - public const string UnaryMinus = "-"; - public const string Equal = "="; - public const string Percent = "%"; - public const string Apostrophe = "'"; - public const string Backslash = "\\"; - public const string Slash = "/"; - public const string LessThan = "<"; - public const string GreaterThan = ">"; - public const string IndexOf = "["; - public const string LeftBracket = "["; - public const string RightBracket = "]"; - public const string LeftBrace = "{"; - public const string RightBrace = "}"; - public const string Pipe = "|"; - public const string EConstant = "E"; - public const string LeftParen = "("; - public const string RightParen = ")"; - public const string LessThanOrEqual = "<="; - public const string NotEqual = "<>"; - public const string GreaterThanOrEqual = ">="; - public const string LeftAsterisk = "<*"; - public const string Assignment = ":="; - public const string DoublePipe = "||"; - public const string ExpSymbol = "**"; - public const string CommentSingleLine = "--"; - public const string CommentStart = "(*"; - public const string CommentEnd = "*)"; - public const string InstanceEqual = ":=:"; - public const string InstanceNotEqual = ":<>:"; - - #endregion - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="KeyWord" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Script.Express +{ + public static partial class ExpressCompile + { + + private static HashSet _keywordSet; + + private static void PoolKeywords() + { + _keywordSet = new(); + + FieldInfo[] fields = typeof(Keyword).GetFields(BindingFlags.Public); + ParallelLoopResult result = Parallel.ForEach( + fields, static(field) => { + if (field.FieldType == typeof(string) && field.GetValue(null) is string str) + { + _compileStringCache.GetOrAdd(str); + _keywordSet.Add(str); + } + }); + while (!result.IsCompleted) { } + } + + public static class Keyword + { + + public static HashSet ScopeBlock = new HashSet { + EndAlias, EndCase, EndConstant, EndEntity, EndFunction, EndIf, EndLocal, EndProcedure, EndRepeat, EndRule, EndSchema, EndSubtypeConstraint, EndType + }; + + public static HashSet Symbols = [ Dot, Comma, Semicolon, Colon, Percent, Apostrophe, Backslash, IndexOf, RightBracket, LeftBrace, RightBrace, Pipe, LeftParen, RightParen, LeftAsterisk, Assignment, DoublePipe, ExpSymbol, CommentSingleLine, CommentStart, CommentEnd, InstanceEqual, InstanceNotEqual ]; + + public static HashSet DataTypes { get; } = [ Array, Bag, Binary, Boolean, Enumeration, Integer, List, Logical, Number, Of, Real, Set, String ]; + + public static HashSet InternalProcess { get; } = [ Insert, Remove ]; + + public static HashSet BuiltinFunctions { get; } = [ Abs, Acos, Asin, Atan, BLength, Cos, Exists, Exp, Format, HiBound, HiIndex, Length, LoBound, Log, Log2, Log10, LoIndex, Nvl, Odd, Rolesof, Sin, Sizeof, Sqrt, Tan, Typeof, Usedin, Value, ValueIn, ValueUnique ]; + + public static HashSet Literals { get; } = [ QuestionMark, Self, Const, E, Pi, False, True, Unknown ]; + + public static HashSet Operators { get; } = [ And, AndOr, Div, In, Like, Mod, Not, Or, Xor, Add, Sub, Mul, Slash, Equal, NotEqual, LessThan, GreaterThan, LessThanOrEqual, GreaterThanOrEqual ]; + + public static HashSet Aliasing { get; } = [ Alias, Renamed ]; + + public static HashSet ModifiersAttributes { get; } = [ Abstract, Aggregate, As, BasedOn, By, Escape, Fixed, From, Use, With ]; + + public static HashSet QueryReference { get; } = [ Query, Reference, Select ]; + + public static HashSet ConstraintsInheritance { get; } = [ Oneof, Optional, Subtype, SubtypeConstraint, Supertype, TotalOver, Unique, Where ]; + + public static HashSet Declarations { get; } = [ Constant, Derive, Entity, Extensible, Fixed, Function, Generic, GenericEntity, Inverse, Local, Procedure, Rule, Schema, Type, Var ]; + + public static HashSet FlowControl { get; } = [ Begin, Case, Else, End, For, If, Otherwise, Repeat, Return, Skip, Then, To, Until, While ]; + + #region Basic Data Type + + public const string Array = "ARRAY"; + public const string Bag = "BAG"; + public const string Binary = "BINARY"; + public const string Boolean = "BOOLEAN"; + public const string Enumeration = "ENUMERATION"; + public const string Integer = "INTEGER"; + public const string List = "LIST"; + public const string Logical = "LOGICAL"; + public const string Number = "NUMBER"; + public const string Of = "OF"; + public const string Real = "REAL"; + public const string Set = "SET"; + public const string String = "STRING"; + + #endregion + + #region Flow Control + + public const string Begin = "BEGIN"; + public const string Case = "CASE"; + public const string Else = "ELSE"; + public const string End = "END"; + public const string For = "FOR"; + public const string If = "IF"; + public const string Otherwise = "OTHERWISE"; + public const string Repeat = "REPEAT"; + public const string Return = "RETURN"; + public const string Skip = "SKIP"; + public const string Then = "THEN"; + public const string To = "TO"; + public const string Until = "UNTIL"; + public const string While = "WHILE"; + + #endregion + + #region Declarations + + public const string Constant = "CONSTANT"; + public const string Derive = "DERIVE"; + public const string Entity = "ENTITY"; + public const string Extensible = "EXTENSIBLE"; + public const string Fixed = "FIXED"; + public const string Function = "FUNCTION"; + public const string Generic = "GENERIC"; + public const string GenericEntity = "GENERIC_ENTITY"; + public const string Inverse = "INVERSE"; + public const string Local = "LOCAL"; + public const string Procedure = "PROCEDURE"; + public const string Rule = "RULE"; + public const string Schema = "SCHEMA"; + public const string Type = "TYPE"; + public const string Var = "VAR"; + + #endregion + + #region Constraints Inheritance + + public const string Oneof = "ONEOF"; + public const string Optional = "OPTIONAL"; + public const string Subtype = "SUBTYPE"; + public const string SubtypeConstraint = "SUBTYPE CONSTRAINT"; + public const string Supertype = "SUPERTYPE"; + public const string TotalOver = "TOTAL OVER"; + public const string Unique = "UNIQUE"; + public const string Where = "WHERE"; + + #endregion + + #region Scope + + public const string EndAlias = "END_ALIAS"; + public const string EndCase = "END_CASE"; + public const string EndConstant = "END_CONSTANT"; + public const string EndEntity = "END_ENTITY"; + public const string EndFunction = "END_FUNCTION"; + public const string EndIf = "END_IF"; + public const string EndLocal = "END_LOCAL"; + public const string EndProcedure = "END_PROCEDURE"; + public const string EndRepeat = "END_REPEAT"; + public const string EndRule = "END_RULE"; + public const string EndSchema = "END_SCHEMA"; + public const string EndSubtypeConstraint = "END_SUBTYPE CONSTRAINT"; + public const string EndType = "END_TYPE"; + + #endregion + + #region Index and Ref + + public const string Query = "QUERY"; + public const string Reference = "REFERENCE"; + public const string Select = "SELECT"; + + #endregion + + #region Modifiers Attributes + + public const string Abstract = "ABSTRACT"; + public const string Aggregate = "AGGREGATE"; + public const string As = "AS"; + public const string BasedOn = "BASED ON"; + public const string By = "BY"; + public const string Escape = "ESCAPE"; + public const string From = "FROM"; + public const string Use = "USE"; + public const string With = "WITH"; + + #endregion + + #region Aliasing + + public const string Alias = "ALIAS"; + public const string Renamed = "RENAMED"; + + #endregion + + #region Operator + + public const string And = "AND"; + public const string AndOr = "ANDOR"; + public const string Div = "DIV"; + public const string In = "IN"; + public const string Like = "LIKE"; + public const string Mod = "MOD"; + public const string Not = "NOT"; + public const string Or = "OR"; + public const string Xor = "XOR"; + + #endregion + + #region Constants + + public const string QuestionMark = "?"; + public const string Self = "SELF"; + public const string Const = "CONST"; + public const string E = "E"; + public const string Pi = "PI"; + public const string False = "FALSE"; + public const string True = "TRUE"; + public const string Unknown = "UNKNOWN"; + + #endregion + + #region Functions + + public const string Abs = "ABS"; + public const string Acos = "ACOS"; + public const string Asin = "ASIN"; + public const string Atan = "ATAN"; + public const string BLength = "BLENGTH"; + public const string Cos = "COS"; + public const string Exists = "EXISTS"; + public const string Exp = "EXP"; + public const string Format = "FORMAT"; + public const string HiBound = "HIBOUND"; + public const string HiIndex = "HIINDEX"; + public const string Length = "LENGTH"; + public const string LoBound = "LObound"; + public const string Log = "LOG"; + public const string Log2 = "LOG2"; + public const string Log10 = "LOG10"; + public const string LoIndex = "LOINDEX"; + public const string Nvl = "NVL"; + public const string Odd = "ODD"; + public const string Rolesof = "ROLESOF"; + public const string Sin = "SIN"; + public const string Sizeof = "SIZEOF"; + public const string Sqrt = "SQRT"; + public const string Tan = "TAN"; + public const string Typeof = "TYPEOF"; + public const string Usedin = "USEDIN"; + public const string Value = "VALUE"; + public const string ValueIn = "VALUE IN"; + public const string ValueUnique = "VALUE UNIQUE"; + + #endregion + + #region Procedure + + public const string Insert = "INSERT"; + public const string Remove = "REMOVE"; + + #endregion + + #region Symbols + + public const string Dot = "."; + public const string Comma = ","; + public const string Semicolon = ";"; + public const string Colon = ":"; + public const string Mul = "*"; + public const string Add = "+"; + public const string UnaryPlus = "+"; + public const string Sub = "-"; + public const string UnaryMinus = "-"; + public const string Equal = "="; + public const string Percent = "%"; + public const string Apostrophe = "'"; + public const string Backslash = "\\"; + public const string Slash = "/"; + public const string LessThan = "<"; + public const string GreaterThan = ">"; + public const string IndexOf = "["; + public const string LeftBracket = "["; + public const string RightBracket = "]"; + public const string LeftBrace = "{"; + public const string RightBrace = "}"; + public const string Pipe = "|"; + public const string EConstant = "E"; + public const string LeftParen = "("; + public const string RightParen = ")"; + public const string LessThanOrEqual = "<="; + public const string NotEqual = "<>"; + public const string GreaterThanOrEqual = ">="; + public const string LeftAsterisk = "<*"; + public const string Assignment = ":="; + public const string DoublePipe = "||"; + public const string ExpSymbol = "**"; + public const string CommentSingleLine = "--"; + public const string CommentStart = "(*"; + public const string CommentEnd = "*)"; + public const string InstanceEqual = ":=:"; + public const string InstanceNotEqual = ":<>:"; + + #endregion + } + + } +} diff --git a/StgSharp.Script/Express/Element/ExpConst.cs b/StgSharp.Script/Express/Element/ExpConst.cs index 3e94bcf5..308ddc23 100644 --- a/StgSharp.Script/Express/Element/ExpConst.cs +++ b/StgSharp.Script/Express/Element/ExpConst.cs @@ -1,101 +1,101 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpConst" -// 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 System; -using System.Collections; -using System.Collections.Frozen; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq.Expressions; -using System.Runtime.CompilerServices; -using System.Text; - -namespace StgSharp.Script.Express -{ - public sealed class ExpConstantCollectionSource : ExpImmutableElement - { - - private Dictionary _constants; - private IScriptSourceProvider _sourceProvider; - - public ExpConstantCollectionSource(IScriptSourceProvider sourceProvider) - { - _sourceProvider = sourceProvider; - _constants = new Dictionary(ExpressCompile.Multiplexer); - } - - public override ExpElementType ElementType => ExpElementType.Const; - - public override IScriptSourceProvider SourceProvider => _sourceProvider; - - public override string Name - { - get => ExpressCompile.Keyword.Constant; - } - - public override void Analyse() - { - throw new NotImplementedException(); - } - - public override ExpSyntaxNode MakeReference(params object[] options) - { - if (options.Length == 0 || options[0] is not string str) { - return null!; - } - if (_constants.Count == 0) { - return null!; - } - if (_constants.TryGetValue(str, out ExpElementInstance? token)) { - return token; - } - return null!; - } - - public bool TryGetConstant(string name, out ExpElementInstance instance) - { - return _constants.TryGetValue(name, out instance); - } - - public override bool TryGetMember(string name, out ExpSyntaxNode memberNode) - { - if (_constants.TryGetValue(name, out ExpElementInstance? node)) - { - memberNode = node; - return true; - } - memberNode = ExpSyntaxNode.Empty; - return false; - } - - internal void AddConstant(string name, ExpElementInstance value) - { - _constants.Add(name, value); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpConst" +// 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 System; +using System.Collections; +using System.Collections.Frozen; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq.Expressions; +using System.Runtime.CompilerServices; +using System.Text; + +namespace StgSharp.Script.Express +{ + public sealed class ExpConstantCollectionSource : ExpImmutableElement + { + + private Dictionary _constants; + private IScriptSourceProvider _sourceProvider; + + public ExpConstantCollectionSource(IScriptSourceProvider sourceProvider) + { + _sourceProvider = sourceProvider; + _constants = new Dictionary(ExpressCompile.Multiplexer); + } + + public override ExpElementType ElementType => ExpElementType.Const; + + public override IScriptSourceProvider SourceProvider => _sourceProvider; + + public override string Name + { + get => ExpressCompile.Keyword.Constant; + } + + public override void Analyse() + { + throw new NotImplementedException(); + } + + public override ExpSyntaxNode MakeReference(params object[] options) + { + if (options.Length == 0 || options[0] is not string str) { + return null!; + } + if (_constants.Count == 0) { + return null!; + } + if (_constants.TryGetValue(str, out ExpElementInstance? token)) { + return token; + } + return null!; + } + + public bool TryGetConstant(string name, out ExpElementInstance instance) + { + return _constants.TryGetValue(name, out instance); + } + + public override bool TryGetMember(string name, out ExpSyntaxNode memberNode) + { + if (_constants.TryGetValue(name, out ExpElementInstance? node)) + { + memberNode = node; + return true; + } + memberNode = ExpSyntaxNode.Empty; + return false; + } + + internal void AddConstant(string name, ExpElementInstance value) + { + _constants.Add(name, value); + } + + } +} diff --git a/StgSharp.Script/Express/Element/ExpEntity.cs b/StgSharp.Script/Express/Element/ExpEntity.cs index a8ce6606..d0b5188a 100644 --- a/StgSharp.Script/Express/Element/ExpEntity.cs +++ b/StgSharp.Script/Express/Element/ExpEntity.cs @@ -1,69 +1,69 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpEntity" -// 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 System; -using System.Collections.Generic; -using System.Text; - -namespace StgSharp.Script.Express -{ - public class ExpEntitySource : ExpInstantiableElement - { - - private AbstractSyntaxTree _expressionTree; - private ScriptSourceTransmitter _source; - private string _name; - - public ExpEntitySource(string name, ScriptSourceTransmitter provider) - { - _name = name; - _source = provider; - } - - public override ExpElementType ElementType => ExpElementType.Entity; - - public override IScriptSourceProvider SourceProvider => _source; - - public override string Name => _name; - - public override void Analyse() - { - throw new NotImplementedException(); - } - - public override ExpSyntaxNode CreateInstanceNode(Token t) - { - throw new NotImplementedException(); - } - - public override bool TryGetMember(string name, out ExpSyntaxNode memberNode) - { - throw new NotImplementedException(); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpEntity" +// 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 System; +using System.Collections.Generic; +using System.Text; + +namespace StgSharp.Script.Express +{ + public class ExpEntitySource : ExpInstantiableElement + { + + private AbstractSyntaxTree _expressionTree; + private ScriptSourceTransmitter _source; + private string _name; + + public ExpEntitySource(string name, ScriptSourceTransmitter provider) + { + _name = name; + _source = provider; + } + + public override ExpElementType ElementType => ExpElementType.Entity; + + public override IScriptSourceProvider SourceProvider => _source; + + public override string Name => _name; + + public override void Analyse() + { + throw new NotImplementedException(); + } + + public override ExpSyntaxNode CreateInstanceNode(Token t) + { + throw new NotImplementedException(); + } + + public override bool TryGetMember(string name, out ExpSyntaxNode memberNode) + { + throw new NotImplementedException(); + } + + } +} diff --git a/StgSharp.Script/Express/Element/ExpFunction.cs b/StgSharp.Script/Express/Element/ExpFunction.cs index 88c7f4a4..9bfa67a0 100644 --- a/StgSharp.Script/Express/Element/ExpFunction.cs +++ b/StgSharp.Script/Express/Element/ExpFunction.cs @@ -1,94 +1,94 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpFunction" -// 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 System; -using System.Collections.Generic; -using System.Text; - -namespace StgSharp.Script.Express -{ - public class ExpFunctionSource : ExpImmutableElement - { - - private ScriptSourceTransmitter _transmitter; - private string _name; - - public ExpFunctionSource(string name, ScriptSourceTransmitter transmitter) - { - _name = name; - _transmitter = transmitter; - } - - public Dictionary FuncParams { get; init; } = new Dictionary( - ); - - public Dictionary LocalVariables { get; init; } = new Dictionary( - ); - - public override ExpElementType ElementType => ExpElementType.Function; - - public ExpInstantiableElement ReturningType { get; protected set; } - - public override IScriptSourceProvider SourceProvider => _transmitter; - - public override string Name => _name; - - public string CallingFormat { get; private set; } - - public override void Analyse() - { - throw new NotImplementedException(); - /* - * generate parameter list, - * generate C# code - * generate calling syntax - */ - } - - public override ExpSyntaxNode MakeReference(params object[] options) - { - throw new NotImplementedException(); - } - - public override bool TryGetMember(string name, out ExpSyntaxNode memberNode) - { - if (FuncParams.TryGetValue(name, out ExpElementInstance? param)) - { - memberNode = param; - return true; - } - if (LocalVariables.TryGetValue(name, out ExpElementInstance? variable)) - { - memberNode = variable; - return true; - } - memberNode = ExpSyntaxNode.Empty; - return false; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpFunction" +// 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 System; +using System.Collections.Generic; +using System.Text; + +namespace StgSharp.Script.Express +{ + public class ExpFunctionSource : ExpImmutableElement + { + + private ScriptSourceTransmitter _transmitter; + private string _name; + + public ExpFunctionSource(string name, ScriptSourceTransmitter transmitter) + { + _name = name; + _transmitter = transmitter; + } + + public Dictionary FuncParams { get; init; } = new Dictionary( + ); + + public Dictionary LocalVariables { get; init; } = new Dictionary( + ); + + public override ExpElementType ElementType => ExpElementType.Function; + + public ExpInstantiableElement ReturningType { get; protected set; } + + public override IScriptSourceProvider SourceProvider => _transmitter; + + public override string Name => _name; + + public string CallingFormat { get; private set; } + + public override void Analyse() + { + throw new NotImplementedException(); + /* + * generate parameter list, + * generate C# code + * generate calling syntax + */ + } + + public override ExpSyntaxNode MakeReference(params object[] options) + { + throw new NotImplementedException(); + } + + public override bool TryGetMember(string name, out ExpSyntaxNode memberNode) + { + if (FuncParams.TryGetValue(name, out ExpElementInstance? param)) + { + memberNode = param; + return true; + } + if (LocalVariables.TryGetValue(name, out ExpElementInstance? variable)) + { + memberNode = variable; + return true; + } + memberNode = ExpSyntaxNode.Empty; + return false; + } + + } +} diff --git a/StgSharp.Script/Express/Element/ExpProcedureSource.cs b/StgSharp.Script/Express/Element/ExpProcedureSource.cs index 0062aef2..2ea0bf6f 100644 --- a/StgSharp.Script/Express/Element/ExpProcedureSource.cs +++ b/StgSharp.Script/Express/Element/ExpProcedureSource.cs @@ -1,61 +1,61 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpProcedureSource" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Script.Express -{ - public class ExpProcedureSource : ExpImmutableElement - { - - public override ExpElementType ElementType => ExpElementType.Procedure; - - public override IScriptSourceProvider SourceProvider => throw new NotImplementedException(); - - public override string Name => throw new NotImplementedException(); - - public override void Analyse() - { - throw new NotImplementedException(); - } - - public override ExpSyntaxNode MakeReference(params object[] options) - { - throw new NotImplementedException(); - } - - public override bool TryGetMember(string name, out ExpSyntaxNode memberNode) - { - throw new NotImplementedException(); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpProcedureSource" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Script.Express +{ + public class ExpProcedureSource : ExpImmutableElement + { + + public override ExpElementType ElementType => ExpElementType.Procedure; + + public override IScriptSourceProvider SourceProvider => throw new NotImplementedException(); + + public override string Name => throw new NotImplementedException(); + + public override void Analyse() + { + throw new NotImplementedException(); + } + + public override ExpSyntaxNode MakeReference(params object[] options) + { + throw new NotImplementedException(); + } + + public override bool TryGetMember(string name, out ExpSyntaxNode memberNode) + { + throw new NotImplementedException(); + } + + } +} diff --git a/StgSharp.Script/Express/Element/ExpRule.cs b/StgSharp.Script/Express/Element/ExpRule.cs index aabe915b..49a7cc78 100644 --- a/StgSharp.Script/Express/Element/ExpRule.cs +++ b/StgSharp.Script/Express/Element/ExpRule.cs @@ -1,91 +1,91 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpRule" -// 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 System; -using System.Collections.Generic; -using System.Data; -using System.Reflection.Metadata.Ecma335; -using System.Text; - -namespace StgSharp.Script.Express -{ - public class ExpRule : ExpElementInstance - { - - private ExpRuleSource _source; - - public ExpRule(Token source) : base(source) { } - - public object? value => throw new NotImplementedException(); - - public override ExpInstantiableElement EqualityTypeConvert => throw new NotImplementedException( - ); - - public override ExpSyntaxNode Left => throw new NotImplementedException(); - - public override ExpSyntaxNode Right => throw new NotImplementedException(); - - public override string TypeName => _source.Name; - - } - - public class ExpRuleSource : ExpImmutableElement - { - - private ScriptSourceTransmitter _transmitter; - private string _name; - - public ExpRuleSource(string name, ScriptSourceTransmitter transmitter) - { - _name = name; - _transmitter = transmitter; - } - - public override ExpElementType ElementType => ExpElementType.Rule; - - public override IScriptSourceProvider SourceProvider => _transmitter; - - public override string Name => _name; - - public override void Analyse() - { - throw new NotImplementedException(); - } - - public override ExpSyntaxNode MakeReference(params object[] options) - { - throw new NotImplementedException(); - } - - public override bool TryGetMember(string name, out ExpSyntaxNode memberNode) - { - memberNode = ExpSyntaxNode.Empty; - return false; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpRule" +// 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 System; +using System.Collections.Generic; +using System.Data; +using System.Reflection.Metadata.Ecma335; +using System.Text; + +namespace StgSharp.Script.Express +{ + public class ExpRule : ExpElementInstance + { + + private ExpRuleSource _source; + + public ExpRule(Token source) : base(source) { } + + public object? value => throw new NotImplementedException(); + + public override ExpInstantiableElement EqualityTypeConvert => throw new NotImplementedException( + ); + + public override ExpSyntaxNode Left => throw new NotImplementedException(); + + public override ExpSyntaxNode Right => throw new NotImplementedException(); + + public override string TypeName => _source.Name; + + } + + public class ExpRuleSource : ExpImmutableElement + { + + private ScriptSourceTransmitter _transmitter; + private string _name; + + public ExpRuleSource(string name, ScriptSourceTransmitter transmitter) + { + _name = name; + _transmitter = transmitter; + } + + public override ExpElementType ElementType => ExpElementType.Rule; + + public override IScriptSourceProvider SourceProvider => _transmitter; + + public override string Name => _name; + + public override void Analyse() + { + throw new NotImplementedException(); + } + + public override ExpSyntaxNode MakeReference(params object[] options) + { + throw new NotImplementedException(); + } + + public override bool TryGetMember(string name, out ExpSyntaxNode memberNode) + { + memberNode = ExpSyntaxNode.Empty; + return false; + } + + } +} diff --git a/StgSharp.Script/Express/Element/ExpType.cs b/StgSharp.Script/Express/Element/ExpType.cs index 02d431ba..55f22c16 100644 --- a/StgSharp.Script/Express/Element/ExpType.cs +++ b/StgSharp.Script/Express/Element/ExpType.cs @@ -1,113 +1,113 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpType" -// 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.Script; - -using System; -using System.Collections.Generic; - -namespace StgSharp.Script.Express -{ - public class ExpTypeSource : ExpInstantiableElement - { - - private ScriptSourceTransmitter _transmitter; - private string _name; - protected bool _isBuiltinType; - - protected ExpTypeSource(string name) - { - _name = name; - _transmitter = ScriptSourceTransmitter.Empty; - _isBuiltinType = true; - } - - public ExpTypeSource(string name, ScriptSourceTransmitter transmitter) - { - _name = name; - _transmitter = transmitter; - _isBuiltinType = false; - } - - public bool IsLanguageBuiltinType - { - get => _isBuiltinType; - } - - public override ExpElementType ElementType => ExpElementType.Type; - - public static ExpTypeSource Void - { - get => ExpVoidType.Only; - } - - public override IScriptSourceProvider SourceProvider => _transmitter; - - public override string Name => _name; - - public override void Analyse() - { - throw new NotImplementedException(); - } - - public override ExpElementInstance CreateInstanceNode(Token t) - { - throw new NotImplementedException(); - } - - public static bool IsNullOrVoid(IExpElementSource type) - { - return type == null || type == ExpVoidType.Only; - } - - public override bool TryGetMember(string name, out ExpSyntaxNode memberNode) - { - memberNode = ExpSyntaxNode.Empty; - return false; - } - - private class ExpVoidType : ExpTypeSource - { - - private static readonly ExpVoidType _onlyInstance = new ExpVoidType(); - - private ExpVoidType() : base(string.Empty) { } - - public static ExpVoidType Only - { - get => _onlyInstance; - } - - public override void Analyse() - { - return; - } - - } - - } +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpType" +// 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.Script; + +using System; +using System.Collections.Generic; + +namespace StgSharp.Script.Express +{ + public class ExpTypeSource : ExpInstantiableElement + { + + private ScriptSourceTransmitter _transmitter; + private string _name; + protected bool _isBuiltinType; + + protected ExpTypeSource(string name) + { + _name = name; + _transmitter = ScriptSourceTransmitter.Empty; + _isBuiltinType = true; + } + + public ExpTypeSource(string name, ScriptSourceTransmitter transmitter) + { + _name = name; + _transmitter = transmitter; + _isBuiltinType = false; + } + + public bool IsLanguageBuiltinType + { + get => _isBuiltinType; + } + + public override ExpElementType ElementType => ExpElementType.Type; + + public static ExpTypeSource Void + { + get => ExpVoidType.Only; + } + + public override IScriptSourceProvider SourceProvider => _transmitter; + + public override string Name => _name; + + public override void Analyse() + { + throw new NotImplementedException(); + } + + public override ExpElementInstance CreateInstanceNode(Token t) + { + throw new NotImplementedException(); + } + + public static bool IsNullOrVoid(IExpElementSource type) + { + return type == null || type == ExpVoidType.Only; + } + + public override bool TryGetMember(string name, out ExpSyntaxNode memberNode) + { + memberNode = ExpSyntaxNode.Empty; + return false; + } + + private class ExpVoidType : ExpTypeSource + { + + private static readonly ExpVoidType _onlyInstance = new ExpVoidType(); + + private ExpVoidType() : base(string.Empty) { } + + public static ExpVoidType Only + { + get => _onlyInstance; + } + + public override void Analyse() + { + return; + } + + } + + } } \ No newline at end of file diff --git a/StgSharp.Script/Express/ExpAstNode/ExpBinaryOperatorNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpBinaryOperatorNode.cs index 751dd20a..97bcf6cb 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpBinaryOperatorNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpBinaryOperatorNode.cs @@ -1,258 +1,258 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpBinaryOperatorNode" -// 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 Microsoft.CodeAnalysis.CSharp; - -using System; -using System.Collections.Generic; -using System.Data.Common; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Script.Express -{ - public class ExpBinaryOperatorNode : ExpSyntaxNode - { - - private ExpInstantiableElement _returnType; - - private ExpSyntaxNode _left; - private ExpSyntaxNode _right; - - private ExpBinaryOperatorNode(Token source, ExpSyntaxNode left, ExpSyntaxNode right) - : base(source) - { - _left = left; - _right = right; - } - - public override ExpInstantiableElement EqualityTypeConvert => _returnType; - - public override ExpSyntaxNode Left => _left; - - public override ExpSyntaxNode Right => _right; - - public string Operator { get; private set; } - - public static ExpBinaryOperatorNode Add(Token source, ExpSyntaxNode left, ExpSyntaxNode right) - { - if (!left.IsNumber && !right.IsNumber) { - throw new ExpInvalidTypeException(source, "Number", - left.EqualityTypeConvert.Name); - } - bool isFloat = - (left._nodeFlag | ExpNodeFlag.BuiltinType_Real) == 0 || - (right._nodeFlag | ExpNodeFlag.BuiltinType_Real) == 0; - return new ExpBinaryOperatorNode(source, left, right) - { - _returnType = isFloat ? ExpressCompile.ExpReal : ExpressCompile.ExpInt, - _nodeFlag = ExpNodeFlag.Operator_Binary | ExpNodeFlag.BuiltinType_Number, - CodeConvertTemplate = "{0} + {1}", - }; - } - - public static ExpBinaryOperatorNode Assign(Token source, ExpSyntaxNode left, ExpSyntaxNode right) - { - if (left.EqualityTypeConvert != right.EqualityTypeConvert) { - throw new ExpInvalidTypeException( - source, left.EqualityTypeConvert.Name, right.EqualityTypeConvert.Name); - } - return new ExpBinaryOperatorNode(source, left, right) - { - _returnType = ExpInstantiableElement.Void, - _nodeFlag = ExpNodeFlag.Operator_Binary | left._nodeFlag, - Operator = "=", - CodeConvertTemplate = "{0} = {1}", - }; - } - - public static ExpBinaryOperatorNode CompareInstanceEqual(Token source, ExpSyntaxNode left, ExpSyntaxNode right) - { - return new ExpBinaryOperatorNode(source, left, right) - { - _returnType = ExpressCompile.ExpBool, - _nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary, - CodeConvertTemplate = "!ReferenceEquals({0}, {1})", - }; - } - - public static ExpBinaryOperatorNode CompareInstanceNotEqual( - Token source, - ExpSyntaxNode left, - ExpSyntaxNode right) - { - return new ExpBinaryOperatorNode(source, left, right) - { - _returnType = ExpressCompile.ExpBool, - _nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary, - CodeConvertTemplate = "ReferenceEquals({0}, {1})", - }; - } - - public static ExpBinaryOperatorNode ConvertElement(Token source, ExpSyntaxNode left, ExpSyntaxNode right) - { - if (right is not ExpMetaRefNode metaRef) { - throw new ExpInvalidTypeException( - source, "", right.EqualityTypeConvert.Name); - } - return new ExpBinaryOperatorNode(source, left, right) - { - _returnType = metaRef.SourceRef, - _nodeFlag = ExpNodeFlag.Operator_Binary, - /* - * 0. instance to convert - * 1. target type - */ - CodeConvertTemplate = @"({0} as {1})" - }; - } - - public static ExpBinaryOperatorNode Div(Token source, ExpSyntaxNode left, ExpSyntaxNode right) - { - if (!left.IsNumber && !right.IsNumber) { - throw new ExpInvalidTypeException(source, "Number", - left.EqualityTypeConvert.Name); - } - bool isFloat = - (left._nodeFlag | ExpNodeFlag.BuiltinType_Real) == 0 || - (right._nodeFlag | ExpNodeFlag.BuiltinType_Real) == 0; - return new ExpBinaryOperatorNode(source, left, right) - { - _returnType = isFloat ? ExpressCompile.ExpReal : ExpressCompile.ExpInt, - _nodeFlag = ExpNodeFlag.Operator_Binary | ExpNodeFlag.BuiltinType_Number, - CodeConvertTemplate = "{0} / {1}", - }; - } - - public static ExpBinaryOperatorNode EqualTo(Token source, ExpSyntaxNode left, ExpSyntaxNode right) - { - if (left.EqualityTypeConvert != right.EqualityTypeConvert) { - throw new ExpInvalidTypeException( - source, left.EqualityTypeConvert.Name, right.EqualityTypeConvert.Name); - } - return new ExpBinaryOperatorNode(source, left, right) - { - _returnType = ExpressCompile.ExpBool, - _nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary, - CodeConvertTemplate = "{0} == {1}", - }; - } - - public static ExpBinaryOperatorNode GreaterThan(Token source, ExpSyntaxNode left, ExpSyntaxNode right) - { - if (!left.IsNumber && !right.IsNumber) { - throw new ExpInvalidTypeException(source, "Number", - left.EqualityTypeConvert.Name); - } - return new ExpBinaryOperatorNode(source, left, right) - { - _returnType = ExpressCompile.ExpBool, - _nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary, - CodeConvertTemplate = "{0} > {1}", - }; - } - - public static ExpBinaryOperatorNode LessThan(Token source, ExpSyntaxNode left, ExpSyntaxNode right) - { - if (!left.IsNumber && !right.IsNumber) { - throw new ExpInvalidTypeException(source, "Number", - left.EqualityTypeConvert.Name); - } - return new ExpBinaryOperatorNode(source, left, right) - { - _returnType = ExpressCompile.ExpBool, - _nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary, - CodeConvertTemplate = "{0} < {1}", - }; - } - - public static ExpBinaryOperatorNode Mul(Token source, ExpSyntaxNode left, ExpSyntaxNode right) - { - if (!left.IsNumber && !right.IsNumber) { - throw new ExpInvalidTypeException(source, "Number", - left.EqualityTypeConvert.Name); - } - bool isFloat = - (left._nodeFlag | ExpNodeFlag.BuiltinType_Real) == 0 || - (right._nodeFlag | ExpNodeFlag.BuiltinType_Real) == 0; - return new ExpBinaryOperatorNode(source, left, right) - { - _returnType = isFloat ? ExpressCompile.ExpReal : ExpressCompile.ExpInt, - _nodeFlag = ExpNodeFlag.Operator_Binary | ExpNodeFlag.BuiltinType_Number, - CodeConvertTemplate = "{0} * {1}", - }; - } - - public static ExpBinaryOperatorNode NotEqualTo(Token source, ExpSyntaxNode left, ExpSyntaxNode right) - { - if (left.EqualityTypeConvert != right.EqualityTypeConvert) { - throw new ExpInvalidTypeException( - source, left.EqualityTypeConvert.Name, right.EqualityTypeConvert.Name); - } - return new ExpBinaryOperatorNode(source, left, right) - { - _returnType = ExpressCompile.ExpBool, - _nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary, - CodeConvertTemplate = "{0} != {1}", - }; - } - - public static ExpBinaryOperatorNode SmallerThan(Token source, ExpSyntaxNode left, ExpSyntaxNode right) - { - if (!left.IsNumber && !right.IsNumber) { - throw new ExpInvalidTypeException(source, "Number", - left.EqualityTypeConvert.Name); - } - return new ExpBinaryOperatorNode(source, left, right) - { - _returnType = ExpressCompile.ExpBool, - _nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary, - CodeConvertTemplate = "{0} < {1}", - }; - } - - public static ExpBinaryOperatorNode Sub(Token source, ExpSyntaxNode left, ExpSyntaxNode right) - { - if (!left.IsNumber && !right.IsNumber) { - throw new ExpInvalidTypeException(source, "Number", - left.EqualityTypeConvert.Name); - } - bool isFloat = - (left._nodeFlag | ExpNodeFlag.BuiltinType_Real) == 0 || - (right._nodeFlag | ExpNodeFlag.BuiltinType_Real) == 0; - return new ExpBinaryOperatorNode(source, left, right) - { - _returnType = isFloat ? ExpressCompile.ExpReal : ExpressCompile.ExpInt, - _nodeFlag = ExpNodeFlag.Operator_Binary | ExpNodeFlag.BuiltinType_Number, - CodeConvertTemplate = "{0} - {1}", - }; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpBinaryOperatorNode" +// 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 Microsoft.CodeAnalysis.CSharp; + +using System; +using System.Collections.Generic; +using System.Data.Common; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Script.Express +{ + public class ExpBinaryOperatorNode : ExpSyntaxNode + { + + private ExpInstantiableElement _returnType; + + private ExpSyntaxNode _left; + private ExpSyntaxNode _right; + + private ExpBinaryOperatorNode(Token source, ExpSyntaxNode left, ExpSyntaxNode right) + : base(source) + { + _left = left; + _right = right; + } + + public override ExpInstantiableElement EqualityTypeConvert => _returnType; + + public override ExpSyntaxNode Left => _left; + + public override ExpSyntaxNode Right => _right; + + public string Operator { get; private set; } + + public static ExpBinaryOperatorNode Add(Token source, ExpSyntaxNode left, ExpSyntaxNode right) + { + if (!left.IsNumber && !right.IsNumber) { + throw new ExpInvalidTypeException(source, "Number", + left.EqualityTypeConvert.Name); + } + bool isFloat = + (left._nodeFlag | ExpNodeFlag.BuiltinType_Real) == 0 || + (right._nodeFlag | ExpNodeFlag.BuiltinType_Real) == 0; + return new ExpBinaryOperatorNode(source, left, right) + { + _returnType = isFloat ? ExpressCompile.ExpReal : ExpressCompile.ExpInt, + _nodeFlag = ExpNodeFlag.Operator_Binary | ExpNodeFlag.BuiltinType_Number, + CodeConvertTemplate = "{0} + {1}", + }; + } + + public static ExpBinaryOperatorNode Assign(Token source, ExpSyntaxNode left, ExpSyntaxNode right) + { + if (left.EqualityTypeConvert != right.EqualityTypeConvert) { + throw new ExpInvalidTypeException( + source, left.EqualityTypeConvert.Name, right.EqualityTypeConvert.Name); + } + return new ExpBinaryOperatorNode(source, left, right) + { + _returnType = ExpInstantiableElement.Void, + _nodeFlag = ExpNodeFlag.Operator_Binary | left._nodeFlag, + Operator = "=", + CodeConvertTemplate = "{0} = {1}", + }; + } + + public static ExpBinaryOperatorNode CompareInstanceEqual(Token source, ExpSyntaxNode left, ExpSyntaxNode right) + { + return new ExpBinaryOperatorNode(source, left, right) + { + _returnType = ExpressCompile.ExpBool, + _nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary, + CodeConvertTemplate = "!ReferenceEquals({0}, {1})", + }; + } + + public static ExpBinaryOperatorNode CompareInstanceNotEqual( + Token source, + ExpSyntaxNode left, + ExpSyntaxNode right) + { + return new ExpBinaryOperatorNode(source, left, right) + { + _returnType = ExpressCompile.ExpBool, + _nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary, + CodeConvertTemplate = "ReferenceEquals({0}, {1})", + }; + } + + public static ExpBinaryOperatorNode ConvertElement(Token source, ExpSyntaxNode left, ExpSyntaxNode right) + { + if (right is not ExpMetaRefNode metaRef) { + throw new ExpInvalidTypeException( + source, "", right.EqualityTypeConvert.Name); + } + return new ExpBinaryOperatorNode(source, left, right) + { + _returnType = metaRef.SourceRef, + _nodeFlag = ExpNodeFlag.Operator_Binary, + /* + * 0. instance to convert + * 1. target type + */ + CodeConvertTemplate = @"({0} as {1})" + }; + } + + public static ExpBinaryOperatorNode Div(Token source, ExpSyntaxNode left, ExpSyntaxNode right) + { + if (!left.IsNumber && !right.IsNumber) { + throw new ExpInvalidTypeException(source, "Number", + left.EqualityTypeConvert.Name); + } + bool isFloat = + (left._nodeFlag | ExpNodeFlag.BuiltinType_Real) == 0 || + (right._nodeFlag | ExpNodeFlag.BuiltinType_Real) == 0; + return new ExpBinaryOperatorNode(source, left, right) + { + _returnType = isFloat ? ExpressCompile.ExpReal : ExpressCompile.ExpInt, + _nodeFlag = ExpNodeFlag.Operator_Binary | ExpNodeFlag.BuiltinType_Number, + CodeConvertTemplate = "{0} / {1}", + }; + } + + public static ExpBinaryOperatorNode EqualTo(Token source, ExpSyntaxNode left, ExpSyntaxNode right) + { + if (left.EqualityTypeConvert != right.EqualityTypeConvert) { + throw new ExpInvalidTypeException( + source, left.EqualityTypeConvert.Name, right.EqualityTypeConvert.Name); + } + return new ExpBinaryOperatorNode(source, left, right) + { + _returnType = ExpressCompile.ExpBool, + _nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary, + CodeConvertTemplate = "{0} == {1}", + }; + } + + public static ExpBinaryOperatorNode GreaterThan(Token source, ExpSyntaxNode left, ExpSyntaxNode right) + { + if (!left.IsNumber && !right.IsNumber) { + throw new ExpInvalidTypeException(source, "Number", + left.EqualityTypeConvert.Name); + } + return new ExpBinaryOperatorNode(source, left, right) + { + _returnType = ExpressCompile.ExpBool, + _nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary, + CodeConvertTemplate = "{0} > {1}", + }; + } + + public static ExpBinaryOperatorNode LessThan(Token source, ExpSyntaxNode left, ExpSyntaxNode right) + { + if (!left.IsNumber && !right.IsNumber) { + throw new ExpInvalidTypeException(source, "Number", + left.EqualityTypeConvert.Name); + } + return new ExpBinaryOperatorNode(source, left, right) + { + _returnType = ExpressCompile.ExpBool, + _nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary, + CodeConvertTemplate = "{0} < {1}", + }; + } + + public static ExpBinaryOperatorNode Mul(Token source, ExpSyntaxNode left, ExpSyntaxNode right) + { + if (!left.IsNumber && !right.IsNumber) { + throw new ExpInvalidTypeException(source, "Number", + left.EqualityTypeConvert.Name); + } + bool isFloat = + (left._nodeFlag | ExpNodeFlag.BuiltinType_Real) == 0 || + (right._nodeFlag | ExpNodeFlag.BuiltinType_Real) == 0; + return new ExpBinaryOperatorNode(source, left, right) + { + _returnType = isFloat ? ExpressCompile.ExpReal : ExpressCompile.ExpInt, + _nodeFlag = ExpNodeFlag.Operator_Binary | ExpNodeFlag.BuiltinType_Number, + CodeConvertTemplate = "{0} * {1}", + }; + } + + public static ExpBinaryOperatorNode NotEqualTo(Token source, ExpSyntaxNode left, ExpSyntaxNode right) + { + if (left.EqualityTypeConvert != right.EqualityTypeConvert) { + throw new ExpInvalidTypeException( + source, left.EqualityTypeConvert.Name, right.EqualityTypeConvert.Name); + } + return new ExpBinaryOperatorNode(source, left, right) + { + _returnType = ExpressCompile.ExpBool, + _nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary, + CodeConvertTemplate = "{0} != {1}", + }; + } + + public static ExpBinaryOperatorNode SmallerThan(Token source, ExpSyntaxNode left, ExpSyntaxNode right) + { + if (!left.IsNumber && !right.IsNumber) { + throw new ExpInvalidTypeException(source, "Number", + left.EqualityTypeConvert.Name); + } + return new ExpBinaryOperatorNode(source, left, right) + { + _returnType = ExpressCompile.ExpBool, + _nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary, + CodeConvertTemplate = "{0} < {1}", + }; + } + + public static ExpBinaryOperatorNode Sub(Token source, ExpSyntaxNode left, ExpSyntaxNode right) + { + if (!left.IsNumber && !right.IsNumber) { + throw new ExpInvalidTypeException(source, "Number", + left.EqualityTypeConvert.Name); + } + bool isFloat = + (left._nodeFlag | ExpNodeFlag.BuiltinType_Real) == 0 || + (right._nodeFlag | ExpNodeFlag.BuiltinType_Real) == 0; + return new ExpBinaryOperatorNode(source, left, right) + { + _returnType = isFloat ? ExpressCompile.ExpReal : ExpressCompile.ExpInt, + _nodeFlag = ExpNodeFlag.Operator_Binary | ExpNodeFlag.BuiltinType_Number, + CodeConvertTemplate = "{0} - {1}", + }; + } + + } +} diff --git a/StgSharp.Script/Express/ExpAstNode/ExpCollectionIndexNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpCollectionIndexNode.cs index ac67639b..d4543867 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpCollectionIndexNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpCollectionIndexNode.cs @@ -1,70 +1,70 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpCollectionIndexNode" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Script.Express -{ - public class ExpCollectionIndexNode : ExpSyntaxNode - { - - private ExpCollectionInstanceBase _collection; - - private ExpSyntaxNode _indexExpression; - - private ExpCollectionIndexNode(Token source, ExpCollectionInstanceBase instance, ExpSyntaxNode indexExpression) - : base(source) - { - _collection = instance; - _indexExpression = indexExpression; - CodeConvertTemplate = @"{0}[{1}]"; - } - - public override ExpSyntaxNode Left => _collection; - - public override ExpSyntaxNode Right => _indexExpression; - - public override IExpElementSource EqualityTypeConvert => _collection.EqualityTypeConvert; - - public static ExpCollectionIndexNode Create( - Token source, - ExpCollectionInstanceBase instance, - ExpSyntaxNode indexExpression) - { - if (!indexExpression.IsNumber) { - throw new ExpInvalidTypeException( - source, "Number", indexExpression.EqualityTypeConvert.Name); - } - return new ExpCollectionIndexNode(source, instance, indexExpression); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpCollectionIndexNode" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Script.Express +{ + public class ExpCollectionIndexNode : ExpSyntaxNode + { + + private ExpCollectionInstanceBase _collection; + + private ExpSyntaxNode _indexExpression; + + private ExpCollectionIndexNode(Token source, ExpCollectionInstanceBase instance, ExpSyntaxNode indexExpression) + : base(source) + { + _collection = instance; + _indexExpression = indexExpression; + CodeConvertTemplate = @"{0}[{1}]"; + } + + public override ExpSyntaxNode Left => _collection; + + public override ExpSyntaxNode Right => _indexExpression; + + public override IExpElementSource EqualityTypeConvert => _collection.EqualityTypeConvert; + + public static ExpCollectionIndexNode Create( + Token source, + ExpCollectionInstanceBase instance, + ExpSyntaxNode indexExpression) + { + if (!indexExpression.IsNumber) { + throw new ExpInvalidTypeException( + source, "Number", indexExpression.EqualityTypeConvert.Name); + } + return new ExpCollectionIndexNode(source, instance, indexExpression); + } + + } +} diff --git a/StgSharp.Script/Express/ExpAstNode/ExpElementInitializingNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpElementInitializingNode.cs index b926915d..4d0a5ff3 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpElementInitializingNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpElementInitializingNode.cs @@ -1,67 +1,67 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpElementInitializingNode" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Script.Express -{ - public class ExpElementInitializingNode : ExpSyntaxNode - { - - private ExpMetaRefNode _type; - private ExpSyntaxNode _init; - - private ExpElementInitializingNode(Token source, ExpMetaRefNode type, ExpSyntaxNode initParameter) - : base(source) - { - _type = type; - _init = initParameter; - } - - public override ExpSyntaxNode Left => _type; - - public override ExpSyntaxNode Right => _init; - - public override IExpElementSource EqualityTypeConvert => _type.SourceRef; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public ExpElementInitializingNode InitializeElement(Token source, ExpMetaRefNode type, ExpSyntaxNode init) - { - if (init is ExpTupleNode tupleNode) { - init = tupleNode.Right; - } - ExpElementInitializingNode node = new ExpElementInitializingNode(source, type, init); - return node; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpElementInitializingNode" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Script.Express +{ + public class ExpElementInitializingNode : ExpSyntaxNode + { + + private ExpMetaRefNode _type; + private ExpSyntaxNode _init; + + private ExpElementInitializingNode(Token source, ExpMetaRefNode type, ExpSyntaxNode initParameter) + : base(source) + { + _type = type; + _init = initParameter; + } + + public override ExpSyntaxNode Left => _type; + + public override ExpSyntaxNode Right => _init; + + public override IExpElementSource EqualityTypeConvert => _type.SourceRef; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ExpElementInitializingNode InitializeElement(Token source, ExpMetaRefNode type, ExpSyntaxNode init) + { + if (init is ExpTupleNode tupleNode) { + init = tupleNode.Right; + } + ExpElementInitializingNode node = new ExpElementInitializingNode(source, type, init); + return node; + } + + } +} diff --git a/StgSharp.Script/Express/ExpAstNode/ExpElementMemberNameNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpElementMemberNameNode.cs index 0f8ff876..4afddc5a 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpElementMemberNameNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpElementMemberNameNode.cs @@ -1,65 +1,65 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpElementMemberNameNode" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Script.Express -{ - public class ExpElementMemberNameNode : ExpSyntaxNode - { - - internal ExpElementMemberNameNode(Token source) - : base(source) - { - _nodeFlag = ExpNodeFlag.Name_Operator; - CodeConvertTemplate = source.Value; - } - - public override ExpSyntaxNode Left => Empty; - - public override ExpSyntaxNode Right => Empty; - - public override IExpElementSource EqualityTypeConvert - { - get - { - ExpSchema.BuiltinSchema.TryGetType(ExpressCompile.Keyword.String, out ExpTypeSource? strType); - return strType; - } - } - - public static ExpElementMemberNameNode Create(Token t) - { - return new ExpElementMemberNameNode(t); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpElementMemberNameNode" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Script.Express +{ + public class ExpElementMemberNameNode : ExpSyntaxNode + { + + internal ExpElementMemberNameNode(Token source) + : base(source) + { + _nodeFlag = ExpNodeFlag.Name_Operator; + CodeConvertTemplate = source.Value; + } + + public override ExpSyntaxNode Left => Empty; + + public override ExpSyntaxNode Right => Empty; + + public override IExpElementSource EqualityTypeConvert + { + get + { + ExpSchema.BuiltinSchema.TryGetType(ExpressCompile.Keyword.String, out ExpTypeSource? strType); + return strType; + } + } + + public static ExpElementMemberNameNode Create(Token t) + { + return new ExpElementMemberNameNode(t); + } + + } +} diff --git a/StgSharp.Script/Express/ExpAstNode/ExpEnumLiteralNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpEnumLiteralNode.cs index 8ddb870f..ce6c9875 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpEnumLiteralNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpEnumLiteralNode.cs @@ -1,65 +1,65 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpEnumLiteralNode" -// 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.Script; - -using System; - -namespace StgSharp.Script.Express -{ - public class ExpEnumLiteralNode : ExpSyntaxNode - { - - private ExpEnumLiteralNode(Token t) : base(t) { } - - public override ExpSyntaxNode Left => Empty; - - public override ExpSyntaxNode Right => Empty; - - public override IExpElementSource EqualityTypeConvert => ExpInstantiableElement.Void; - - public string Literal { get; private set; } - - public static ExpEnumLiteralNode Create(Token t, Func parser) - { - string l; - if (parser is null) - { - l = t.Value; - } else - { - l = parser(t.Value); - } - return new ExpEnumLiteralNode(t) - { - Literal = l, - CodeConvertTemplate = l - }; - } - - } +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpEnumLiteralNode" +// 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.Script; + +using System; + +namespace StgSharp.Script.Express +{ + public class ExpEnumLiteralNode : ExpSyntaxNode + { + + private ExpEnumLiteralNode(Token t) : base(t) { } + + public override ExpSyntaxNode Left => Empty; + + public override ExpSyntaxNode Right => Empty; + + public override IExpElementSource EqualityTypeConvert => ExpInstantiableElement.Void; + + public string Literal { get; private set; } + + public static ExpEnumLiteralNode Create(Token t, Func parser) + { + string l; + if (parser is null) + { + l = t.Value; + } else + { + l = parser(t.Value); + } + return new ExpEnumLiteralNode(t) + { + Literal = l, + CodeConvertTemplate = l + }; + } + + } } \ No newline at end of file diff --git a/StgSharp.Script/Express/ExpAstNode/ExpFunctionCallingNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpFunctionCallingNode.cs index 094d09d1..96ac07d6 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpFunctionCallingNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpFunctionCallingNode.cs @@ -1,75 +1,75 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpFunctionCallingNode" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Script.Express -{ - public class ExpFunctionCallingNode : ExpSyntaxNode - { - - private ExpFunctionSource _function; - - private ExpSyntaxNode _parameter; - - private ExpFunctionCallingNode(Token source, ExpFunctionSource function, ExpSyntaxNode parameterEnumeration) - : base(source) - { - if (parameterEnumeration is ExpTupleNode tuple) { - parameterEnumeration = tuple.Right; - } - _function = function; - _parameter = parameterEnumeration; - } - - public ExpFunctionSource FunctionCaller => _function; - - public override ExpInstantiableElement EqualityTypeConvert => _function.ReturningType; - - public override ExpSyntaxNode Left => Empty; - - public override ExpSyntaxNode Right => _parameter; - - public void AppendParameter(ExpSyntaxNode parameter) - { - _parameter.AppendNode(parameter); - } - - public static ExpFunctionCallingNode CallFunction(Token source, ExpFunctionSource function, ExpSyntaxNode param) - { - if (param is ExpTupleNode) { - param = param.Right; - } - return new ExpFunctionCallingNode(source, function, param); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpFunctionCallingNode" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Script.Express +{ + public class ExpFunctionCallingNode : ExpSyntaxNode + { + + private ExpFunctionSource _function; + + private ExpSyntaxNode _parameter; + + private ExpFunctionCallingNode(Token source, ExpFunctionSource function, ExpSyntaxNode parameterEnumeration) + : base(source) + { + if (parameterEnumeration is ExpTupleNode tuple) { + parameterEnumeration = tuple.Right; + } + _function = function; + _parameter = parameterEnumeration; + } + + public ExpFunctionSource FunctionCaller => _function; + + public override ExpInstantiableElement EqualityTypeConvert => _function.ReturningType; + + public override ExpSyntaxNode Left => Empty; + + public override ExpSyntaxNode Right => _parameter; + + public void AppendParameter(ExpSyntaxNode parameter) + { + _parameter.AppendNode(parameter); + } + + public static ExpFunctionCallingNode CallFunction(Token source, ExpFunctionSource function, ExpSyntaxNode param) + { + if (param is ExpTupleNode) { + param = param.Right; + } + return new ExpFunctionCallingNode(source, function, param); + } + + } +} diff --git a/StgSharp.Script/Express/ExpAstNode/ExpIfNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpIfNode.cs index fc60d652..f04f5972 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpIfNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpIfNode.cs @@ -1,95 +1,95 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpIfNode" -// 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.Script.Express; - -using System; -using System.Collections.Generic; -using System.Text; - -namespace StgSharp.Script.Express -{ - public sealed class ExpIfNode : ExpSyntaxNode - { - - private ExpSyntaxNode _falseOpBegin; - private ExpSyntaxNode _rule; - private ExpSyntaxNode _trueOpBegin ; - - public ExpIfNode(Token source, ExpSyntaxNode rule, ExpSyntaxNode trueOpBegin) - : base(source) - { - _rule = rule; - _trueOpBegin = trueOpBegin; - CodeConvertTemplate = ExpressCompile.PoolString( - """ - if ( {0} ) - { - {1} - } - """); - } - - public ExpIfNode( - Token source, - ExpSyntaxNode rule, - ExpSyntaxNode rootOperationIfTrue, - ExpSyntaxNode rootOperationIfFalse) - : base(source) - { - _rule = rule; - _trueOpBegin = rootOperationIfFalse; - _falseOpBegin = rootOperationIfFalse; - CodeConvertTemplate = ExpressCompile.PoolString( - """ - if( {0} ) - { - {1} - } else { - {2} - } - """); - } - - public override ExpSyntaxNode Left => _trueOpBegin; - - public override ExpSyntaxNode Right => _falseOpBegin; - - public override IExpElementSource EqualityTypeConvert => null!; - - public void AppendFalseOperation(ExpSyntaxNode expressionRoot) - { - _falseOpBegin.AppendNode(expressionRoot); - } - - public void AppendTrueOperation(ExpSyntaxNode expressionRoot) - { - _trueOpBegin.AppendNode(expressionRoot); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpIfNode" +// 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.Script.Express; + +using System; +using System.Collections.Generic; +using System.Text; + +namespace StgSharp.Script.Express +{ + public sealed class ExpIfNode : ExpSyntaxNode + { + + private ExpSyntaxNode _falseOpBegin; + private ExpSyntaxNode _rule; + private ExpSyntaxNode _trueOpBegin ; + + public ExpIfNode(Token source, ExpSyntaxNode rule, ExpSyntaxNode trueOpBegin) + : base(source) + { + _rule = rule; + _trueOpBegin = trueOpBegin; + CodeConvertTemplate = ExpressCompile.PoolString( + """ + if ( {0} ) + { + {1} + } + """); + } + + public ExpIfNode( + Token source, + ExpSyntaxNode rule, + ExpSyntaxNode rootOperationIfTrue, + ExpSyntaxNode rootOperationIfFalse) + : base(source) + { + _rule = rule; + _trueOpBegin = rootOperationIfFalse; + _falseOpBegin = rootOperationIfFalse; + CodeConvertTemplate = ExpressCompile.PoolString( + """ + if( {0} ) + { + {1} + } else { + {2} + } + """); + } + + public override ExpSyntaxNode Left => _trueOpBegin; + + public override ExpSyntaxNode Right => _falseOpBegin; + + public override IExpElementSource EqualityTypeConvert => null!; + + public void AppendFalseOperation(ExpSyntaxNode expressionRoot) + { + _falseOpBegin.AppendNode(expressionRoot); + } + + public void AppendTrueOperation(ExpSyntaxNode expressionRoot) + { + _trueOpBegin.AppendNode(expressionRoot); + } + + } +} diff --git a/StgSharp.Script/Express/ExpAstNode/ExpInstanceMemberNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpInstanceMemberNode.cs index 2365e951..b5ad12d0 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpInstanceMemberNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpInstanceMemberNode.cs @@ -1,60 +1,60 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpInstanceMemberNode" -// 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 CommunityToolkit.HighPerformance.Helpers; - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Script.Express -{ - public class ExpInstanceMemberNode : ExpSyntaxNode - { - - private ExpElementInstance _instance; - private ExpElementMemberNameNode _memberName; - private ExpSyntaxNode _member; - - public ExpInstanceMemberNode(Token source, ExpElementInstance instance, ExpElementMemberNameNode memberName) - : base(source) - { - _instance = instance; - _memberName = memberName; - _instance.TryGetMember(memberName.CodeConvertTemplate, out _member); - } - - public override ExpSyntaxNode Left => _instance; - - public override ExpSyntaxNode Right => _memberName; - - public override IExpElementSource EqualityTypeConvert => _member.EqualityTypeConvert; - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpInstanceMemberNode" +// 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 CommunityToolkit.HighPerformance.Helpers; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Script.Express +{ + public class ExpInstanceMemberNode : ExpSyntaxNode + { + + private ExpElementInstance _instance; + private ExpElementMemberNameNode _memberName; + private ExpSyntaxNode _member; + + public ExpInstanceMemberNode(Token source, ExpElementInstance instance, ExpElementMemberNameNode memberName) + : base(source) + { + _instance = instance; + _memberName = memberName; + _instance.TryGetMember(memberName.CodeConvertTemplate, out _member); + } + + public override ExpSyntaxNode Left => _instance; + + public override ExpSyntaxNode Right => _memberName; + + public override IExpElementSource EqualityTypeConvert => _member.EqualityTypeConvert; + + } +} diff --git a/StgSharp.Script/Express/ExpAstNode/ExpInstanceReferenceNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpInstanceReferenceNode.cs index aa37762b..917e35e7 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpInstanceReferenceNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpInstanceReferenceNode.cs @@ -1,80 +1,80 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpInstanceReferenceNode" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Script.Express -{ - public class ExpInstanceReferenceNode : ExpSyntaxNode - { - - internal ExpInstanceReferenceNode(Token source, ExpElementInstance instance) - : base(source) - { - OriginObject = instance; - _nodeFlag = (OriginObject._nodeFlag | (ExpNodeFlag.Name_Any | ExpNodeFlag.Collection_Any)); - CodeConvertTemplate = source.Value; - } - - internal ExpInstanceReferenceNode(Token source, ExpInstanceReferenceNode reference) - : base(source) - { - OriginObject = reference.OriginObject; - _nodeFlag = (OriginObject._nodeFlag | (ExpNodeFlag.Name_Any | ExpNodeFlag.Collection_Any)); - CodeConvertTemplate = source.Value; - } - - public ExpElementInstance OriginObject { get ; private set; } - - public override ExpSyntaxNode Left => Empty; - - public override ExpSyntaxNode Right => Empty; - - public override IExpElementSource EqualityTypeConvert => OriginObject.EqualityTypeConvert; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ExpInstanceReferenceNode MakeReferenceFrom(Token source, ExpElementInstance instance) - { - /**/ - if (instance.IsLiteral) - { - throw new ExpCompileException(source, "Cannot make reference to a literal."); - } - if (instance.CodeConvertTemplate != source.Value) { - throw new ExpCompileException(source, "Token point at a wrong instance"); - } - /**/ - return new ExpInstanceReferenceNode(source, instance); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpInstanceReferenceNode" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Script.Express +{ + public class ExpInstanceReferenceNode : ExpSyntaxNode + { + + internal ExpInstanceReferenceNode(Token source, ExpElementInstance instance) + : base(source) + { + OriginObject = instance; + _nodeFlag = (OriginObject._nodeFlag | (ExpNodeFlag.Name_Any | ExpNodeFlag.Collection_Any)); + CodeConvertTemplate = source.Value; + } + + internal ExpInstanceReferenceNode(Token source, ExpInstanceReferenceNode reference) + : base(source) + { + OriginObject = reference.OriginObject; + _nodeFlag = (OriginObject._nodeFlag | (ExpNodeFlag.Name_Any | ExpNodeFlag.Collection_Any)); + CodeConvertTemplate = source.Value; + } + + public ExpElementInstance OriginObject { get ; private set; } + + public override ExpSyntaxNode Left => Empty; + + public override ExpSyntaxNode Right => Empty; + + public override IExpElementSource EqualityTypeConvert => OriginObject.EqualityTypeConvert; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ExpInstanceReferenceNode MakeReferenceFrom(Token source, ExpElementInstance instance) + { + /**/ + if (instance.IsLiteral) + { + throw new ExpCompileException(source, "Cannot make reference to a literal."); + } + if (instance.CodeConvertTemplate != source.Value) { + throw new ExpCompileException(source, "Token point at a wrong instance"); + } + /**/ + return new ExpInstanceReferenceNode(source, instance); + } + + } +} diff --git a/StgSharp.Script/Express/ExpAstNode/ExpLiteralNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpLiteralNode.cs index 5a69a2e8..f7c3be85 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpLiteralNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpLiteralNode.cs @@ -1,187 +1,187 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpLiteralNode" -// 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.Data; - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.Text.RegularExpressions; - -namespace StgSharp.Script.Express -{ - public class ExpIntNode : ExpElementInstance - { - - private int _value; - - public ExpIntNode(Token source, int value, bool isLiteral) - : base(source) - { - this.IsLiteral = isLiteral; - _value = value; - _nodeFlag = ExpNodeFlag.BuiltinType_Int | ExpNodeFlag.Element_Type; - CodeConvertTemplate = IsLiteral ? value.ToString() : source.Value; - } - - public override IExpElementSource EqualityTypeConvert - { - get => ExpressCompile.ExpInt; - } - - public int Value => _value; - - public override string TypeName => ExpressCompile.Keyword.Integer; - - } - - public class ExpStringNode : ExpElementInstance - { - - private readonly string _value; - - public ExpStringNode(Token source, string value, bool isLiteral) - : base(source) - { - this.IsLiteral = IsLiteral; - _value = value; - _nodeFlag = ExpNodeFlag.BuiltinType_String | ExpNodeFlag.Element_Type; - CodeConvertTemplate = IsLiteral ? $"\"{value}\"" : source.Value; - } - - public override IExpElementSource EqualityTypeConvert - { - get => ExpressCompile.ExpString; - } - - public override string TypeName => EqualityTypeConvert.Name; - - public string Value => _value; - - } - - public interface IExpBooleanSyntax - { - - bool Value { get; } - - } - - public class ExpBoolNode : ExpElementInstance, IExpBooleanSyntax - { - - private readonly bool _value; - - public ExpBoolNode(Token source, bool value, bool isLiteral) - : base(source) - { - this.IsLiteral = isLiteral; - _value = value; - _nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Element_Type; - CodeConvertTemplate = IsLiteral ? value.ToString() : source.Value; - } - - public bool Value => _value; - - public override IExpElementSource EqualityTypeConvert - { - get => ExpSchema.BuiltinSchema.TryGetType(ExpressCompile.Keyword.Boolean, out ExpTypeSource? type) ? - type : - throw new ExpCompileNotInitializedException(); - } - - public override string TypeName => EqualityTypeConvert.Name; - - public static ExpBoolNode False(Token? t) - { - return new(t ?? new Token("FALSE", 0, -1, TokenFlag.Member), false, - isLiteral:true); - } - - public static ExpBoolNode True(Token? t) - { - return new(t ?? new Token("TRUE", 0, -1, TokenFlag.Member), true, isLiteral:true); - } - - } - - public class ExpRealNumberNode : ExpElementInstance - { - - private readonly float _value; - - public ExpRealNumberNode(Token source, float value, bool isLiteral) - : base(source) - { - _value = value; - _nodeFlag = ExpNodeFlag.BuiltinType_Real | ExpNodeFlag.Element_Type; - CodeConvertTemplate = isLiteral ? $"{value:F8}f" : source.Value; - } - - public float Value => _value; - - public override IExpElementSource EqualityTypeConvert - { - get => ExpSchema.BuiltinSchema.TryGetType(ExpressCompile.Keyword.String, out ExpTypeSource? type) ? - type : - throw new ExpCompileNotInitializedException(); - } - - public override string TypeName => EqualityTypeConvert.Name; - - } - - public class ExpLogicValueNode : ExpElementInstance, IExpBooleanSyntax - { - - private readonly ExpLogic _value; - - public ExpLogicValueNode(Token source, ExpLogic value, bool isLiteral) - : base(source) - { - this.IsLiteral = isLiteral; - _value = value; - _nodeFlag = ExpNodeFlag.BuiltinType_Logic | ExpNodeFlag.Element_Type; - CodeConvertTemplate = isLiteral ? value.ToString() : source.Value; - } - - public ExpLogic LogicValue => _value; - - public override IExpElementSource EqualityTypeConvert - { - get => ExpSchema.BuiltinSchema.TryGetType(ExpressCompile.Keyword.Logical, out ExpTypeSource? type) ? - type : - throw new ExpCompileNotInitializedException(); - } - - public override string TypeName => EqualityTypeConvert.Name; - - bool IExpBooleanSyntax.Value => _value.ToBoolean(); - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpLiteralNode" +// 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.Data; + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.Text.RegularExpressions; + +namespace StgSharp.Script.Express +{ + public class ExpIntNode : ExpElementInstance + { + + private int _value; + + public ExpIntNode(Token source, int value, bool isLiteral) + : base(source) + { + this.IsLiteral = isLiteral; + _value = value; + _nodeFlag = ExpNodeFlag.BuiltinType_Int | ExpNodeFlag.Element_Type; + CodeConvertTemplate = IsLiteral ? value.ToString() : source.Value; + } + + public override IExpElementSource EqualityTypeConvert + { + get => ExpressCompile.ExpInt; + } + + public int Value => _value; + + public override string TypeName => ExpressCompile.Keyword.Integer; + + } + + public class ExpStringNode : ExpElementInstance + { + + private readonly string _value; + + public ExpStringNode(Token source, string value, bool isLiteral) + : base(source) + { + this.IsLiteral = IsLiteral; + _value = value; + _nodeFlag = ExpNodeFlag.BuiltinType_String | ExpNodeFlag.Element_Type; + CodeConvertTemplate = IsLiteral ? $"\"{value}\"" : source.Value; + } + + public override IExpElementSource EqualityTypeConvert + { + get => ExpressCompile.ExpString; + } + + public override string TypeName => EqualityTypeConvert.Name; + + public string Value => _value; + + } + + public interface IExpBooleanSyntax + { + + bool Value { get; } + + } + + public class ExpBoolNode : ExpElementInstance, IExpBooleanSyntax + { + + private readonly bool _value; + + public ExpBoolNode(Token source, bool value, bool isLiteral) + : base(source) + { + this.IsLiteral = isLiteral; + _value = value; + _nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Element_Type; + CodeConvertTemplate = IsLiteral ? value.ToString() : source.Value; + } + + public bool Value => _value; + + public override IExpElementSource EqualityTypeConvert + { + get => ExpSchema.BuiltinSchema.TryGetType(ExpressCompile.Keyword.Boolean, out ExpTypeSource? type) ? + type : + throw new ExpCompileNotInitializedException(); + } + + public override string TypeName => EqualityTypeConvert.Name; + + public static ExpBoolNode False(Token? t) + { + return new(t ?? new Token("FALSE", 0, -1, TokenFlag.Member), false, + isLiteral:true); + } + + public static ExpBoolNode True(Token? t) + { + return new(t ?? new Token("TRUE", 0, -1, TokenFlag.Member), true, isLiteral:true); + } + + } + + public class ExpRealNumberNode : ExpElementInstance + { + + private readonly float _value; + + public ExpRealNumberNode(Token source, float value, bool isLiteral) + : base(source) + { + _value = value; + _nodeFlag = ExpNodeFlag.BuiltinType_Real | ExpNodeFlag.Element_Type; + CodeConvertTemplate = isLiteral ? $"{value:F8}f" : source.Value; + } + + public float Value => _value; + + public override IExpElementSource EqualityTypeConvert + { + get => ExpSchema.BuiltinSchema.TryGetType(ExpressCompile.Keyword.String, out ExpTypeSource? type) ? + type : + throw new ExpCompileNotInitializedException(); + } + + public override string TypeName => EqualityTypeConvert.Name; + + } + + public class ExpLogicValueNode : ExpElementInstance, IExpBooleanSyntax + { + + private readonly ExpLogic _value; + + public ExpLogicValueNode(Token source, ExpLogic value, bool isLiteral) + : base(source) + { + this.IsLiteral = isLiteral; + _value = value; + _nodeFlag = ExpNodeFlag.BuiltinType_Logic | ExpNodeFlag.Element_Type; + CodeConvertTemplate = isLiteral ? value.ToString() : source.Value; + } + + public ExpLogic LogicValue => _value; + + public override IExpElementSource EqualityTypeConvert + { + get => ExpSchema.BuiltinSchema.TryGetType(ExpressCompile.Keyword.Logical, out ExpTypeSource? type) ? + type : + throw new ExpCompileNotInitializedException(); + } + + public override string TypeName => EqualityTypeConvert.Name; + + bool IExpBooleanSyntax.Value => _value.ToBoolean(); + + } +} diff --git a/StgSharp.Script/Express/ExpAstNode/ExpMetaRefNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpMetaRefNode.cs index 3f632f42..aad65c74 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpMetaRefNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpMetaRefNode.cs @@ -1,85 +1,85 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpMetaRefNode" -// 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 Microsoft.CodeAnalysis; - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Script.Express -{ - public class ExpMetaRefNode : ExpSyntaxNode - { - - internal ExpMetaRefNode(Token source, ExpInstantiableElement element) - : base(source) - { - SourceRef = element; - } - - public ExpInstantiableElement SourceRef { get; init; } - - public override ExpSyntaxNode Left => Empty; - - public override ExpSyntaxNode Right => Empty; - - public override IExpElementSource EqualityTypeConvert => ExpInstantiableElement.Void; - - public static ExpMetaRefNode RefEntity(Token position, ExpEntitySource entity) - { - if (position.Value != entity.Name) { - throw new ExpCompileException( - position, - $"Meta data does not match, name of source to match is {entity.Name}, but token is {position.Value}"); - } - ExpMetaRefNode node = new ExpMetaRefNode(position, entity) - { - CodeConvertTemplate = entity.Name, - }; - return node; - } - - public static ExpMetaRefNode RefType(Token position, ExpTypeSource type) - { - if (position.Value != type.Name) { - throw new ExpCompileException( - position, - $"Meta data does not match, name of source to match is {type.Name}, but token is {position.Value}"); - } - ExpMetaRefNode node = new ExpMetaRefNode(position, type) - { - CodeConvertTemplate = type.Name, - }; - ; - return node; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpMetaRefNode" +// 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 Microsoft.CodeAnalysis; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Script.Express +{ + public class ExpMetaRefNode : ExpSyntaxNode + { + + internal ExpMetaRefNode(Token source, ExpInstantiableElement element) + : base(source) + { + SourceRef = element; + } + + public ExpInstantiableElement SourceRef { get; init; } + + public override ExpSyntaxNode Left => Empty; + + public override ExpSyntaxNode Right => Empty; + + public override IExpElementSource EqualityTypeConvert => ExpInstantiableElement.Void; + + public static ExpMetaRefNode RefEntity(Token position, ExpEntitySource entity) + { + if (position.Value != entity.Name) { + throw new ExpCompileException( + position, + $"Meta data does not match, name of source to match is {entity.Name}, but token is {position.Value}"); + } + ExpMetaRefNode node = new ExpMetaRefNode(position, entity) + { + CodeConvertTemplate = entity.Name, + }; + return node; + } + + public static ExpMetaRefNode RefType(Token position, ExpTypeSource type) + { + if (position.Value != type.Name) { + throw new ExpCompileException( + position, + $"Meta data does not match, name of source to match is {type.Name}, but token is {position.Value}"); + } + ExpMetaRefNode node = new ExpMetaRefNode(position, type) + { + CodeConvertTemplate = type.Name, + }; + ; + return node; + } + + } +} diff --git a/StgSharp.Script/Express/ExpAstNode/ExpProcedureCallingNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpProcedureCallingNode.cs index 17de69bc..896f5cb2 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpProcedureCallingNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpProcedureCallingNode.cs @@ -1,76 +1,76 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpProcedureCallingNode" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Script.Express -{ - public class ExpProcedureCallingNode : ExpSyntaxNode - { - - private ExpSyntaxNode _params; - - public ExpProcedureCallingNode(Token source, ExpProcedureSource caller, ExpSyntaxNode param) - : base(source) - { - _params = param; - CalledProcedure = caller; - } - - public ExpProcedureSource CalledProcedure { get; init; } - - public override ExpSyntaxNode Left => Empty; - - public override ExpSyntaxNode Right => _params; - - public override IExpElementSource EqualityTypeConvert => ExpInstantiableElement.Void; - - public static ExpProcedureCallingNode CallProcedure( - Token postion, - ExpProcedureSource caller, - ExpSyntaxNode input) - { - ExpProcedureCallingNode node = new ExpProcedureCallingNode(postion, caller, input) - { - /* - * 0. parameters - */ - CodeConvertTemplate = - $$""" - {{caller.Name}}( {0} ) - """ - }; - return node; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpProcedureCallingNode" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Script.Express +{ + public class ExpProcedureCallingNode : ExpSyntaxNode + { + + private ExpSyntaxNode _params; + + public ExpProcedureCallingNode(Token source, ExpProcedureSource caller, ExpSyntaxNode param) + : base(source) + { + _params = param; + CalledProcedure = caller; + } + + public ExpProcedureSource CalledProcedure { get; init; } + + public override ExpSyntaxNode Left => Empty; + + public override ExpSyntaxNode Right => _params; + + public override IExpElementSource EqualityTypeConvert => ExpInstantiableElement.Void; + + public static ExpProcedureCallingNode CallProcedure( + Token postion, + ExpProcedureSource caller, + ExpSyntaxNode input) + { + ExpProcedureCallingNode node = new ExpProcedureCallingNode(postion, caller, input) + { + /* + * 0. parameters + */ + CodeConvertTemplate = + $$""" + {{caller.Name}}( {0} ) + """ + }; + return node; + } + + } +} diff --git a/StgSharp.Script/Express/ExpAstNode/ExpProcedureControlNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpProcedureControlNode.cs index 96b7534d..76148610 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpProcedureControlNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpProcedureControlNode.cs @@ -1,77 +1,77 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpProcedureControlNode" -// 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 Microsoft.CodeAnalysis.CSharp.Syntax; - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword; - -namespace StgSharp.Script.Express -{ - public class ExpProcedureControlNode : ExpSyntaxNode - { - - private ExpSyntaxNode _additional; - - internal ExpProcedureControlNode(Token source) : base(source) { } - - public override ExpSyntaxNode Left => Empty; - - public override ExpSyntaxNode Right => _additional; - - public override IExpElementSource EqualityTypeConvert => ExpTypeSource.Void; - - public static ExpProcedureControlNode Return(Token t, ExpSyntaxNode valueToReturn) - { - if (t.Value != ExpKeyword.Return) { - throw new InvalidCastException(); - } - ExpProcedureControlNode ret = new ExpProcedureControlNode(t) - { - _additional = valueToReturn ?? Empty, - CodeConvertTemplate = IsNullOrEmpty(valueToReturn!) ? ExpKeyword.Return : "return {0}", - }; - return ret; - } - - public static ExpProcedureControlNode Skip(Token t) - { - ExpProcedureControlNode ret = new ExpProcedureControlNode(t) - { - _additional = Empty, - CodeConvertTemplate = "break" - }; - return ret; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpProcedureControlNode" +// 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 Microsoft.CodeAnalysis.CSharp.Syntax; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword; + +namespace StgSharp.Script.Express +{ + public class ExpProcedureControlNode : ExpSyntaxNode + { + + private ExpSyntaxNode _additional; + + internal ExpProcedureControlNode(Token source) : base(source) { } + + public override ExpSyntaxNode Left => Empty; + + public override ExpSyntaxNode Right => _additional; + + public override IExpElementSource EqualityTypeConvert => ExpTypeSource.Void; + + public static ExpProcedureControlNode Return(Token t, ExpSyntaxNode valueToReturn) + { + if (t.Value != ExpKeyword.Return) { + throw new InvalidCastException(); + } + ExpProcedureControlNode ret = new ExpProcedureControlNode(t) + { + _additional = valueToReturn ?? Empty, + CodeConvertTemplate = IsNullOrEmpty(valueToReturn!) ? ExpKeyword.Return : "return {0}", + }; + return ret; + } + + public static ExpProcedureControlNode Skip(Token t) + { + ExpProcedureControlNode ret = new ExpProcedureControlNode(t) + { + _additional = Empty, + CodeConvertTemplate = "break" + }; + return ret; + } + + } +} diff --git a/StgSharp.Script/Express/ExpAstNode/ExpRangeAndIndexNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpRangeAndIndexNode.cs index ff06862e..9cec7dba 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpRangeAndIndexNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpRangeAndIndexNode.cs @@ -1,119 +1,119 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpRangeAndIndexNode" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Linq.Expressions; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Script.Express -{ - public class ExpIndexNode : ExpSyntaxNode - { - - private const string _codeTemplate = @"[{0}]"; - - private ExpSyntaxNode _index; - - internal ExpIndexNode(Token t, ExpSyntaxNode node) - : base(t) - { - _index = node; - CodeConvertTemplate = _codeTemplate; - } - - public override ExpSyntaxNode Left => _index; - - public override ExpSyntaxNode Right => Empty; - - public override IExpElementSource EqualityTypeConvert => throw new NotImplementedException(); - - public static ExpIndexNode IndexAt(Token position, ExpSyntaxNode expression) - { - ArgumentNullException.ThrowIfNull(expression); - if (ExpNodeFlag.BuiltinType_Int.IsNotInFlag(expression.NodeFlag)) { - throw new ExpInvalidTypeException( - position, "Integer", expression.EqualityTypeConvert.Name); - } - return new ExpIndexNode(position, expression); - } - - } - - public class ExpRangeNode : ExpSyntaxNode - { - - private const string _codeTemplate = "[{0}..{1}]"; - - private ExpSyntaxNode _begin, _end; - - internal ExpRangeNode(Token t, ExpSyntaxNode begin, ExpSyntaxNode end) - : base(t) - { - _begin = begin; - _end = end; - CodeConvertTemplate = _codeTemplate; - } - - public override ExpSyntaxNode Left => _begin; - - public override ExpSyntaxNode Right => _end; - - public override IExpElementSource EqualityTypeConvert => ExpInstantiableElement.Void; - - public static ExpRangeNode RangeNode(Token position, ExpSyntaxNode beginNode, ExpSyntaxNode endNode) - { - ArgumentNullException.ThrowIfNull(beginNode); - ArgumentNullException.ThrowIfNull(endNode); - if (ExpNodeFlag.BuiltinType_Int.IsNotInFlag(beginNode.NodeFlag)) { - throw new ExpInvalidTypeException( - position, "Integer", beginNode.EqualityTypeConvert.Name); - } - if (ExpNodeFlag.BuiltinType_Int.IsNotInFlag(endNode.NodeFlag)) { - throw new ExpInvalidTypeException( - position, "Integer", endNode.EqualityTypeConvert.Name); - } - return new ExpRangeNode(position, beginNode, endNode); - } - - } - - public class ExpCollectionExpressionNode : ExpSyntaxNode - { - - internal ExpCollectionExpressionNode(Token t, ExpTupleNode tupleNode) : base(t) { } - - public override ExpSyntaxNode Left => throw new NotImplementedException(); - - public override ExpSyntaxNode Right => throw new NotImplementedException(); - - public override IExpElementSource EqualityTypeConvert => throw new NotImplementedException(); - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpRangeAndIndexNode" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Script.Express +{ + public class ExpIndexNode : ExpSyntaxNode + { + + private const string _codeTemplate = @"[{0}]"; + + private ExpSyntaxNode _index; + + internal ExpIndexNode(Token t, ExpSyntaxNode node) + : base(t) + { + _index = node; + CodeConvertTemplate = _codeTemplate; + } + + public override ExpSyntaxNode Left => _index; + + public override ExpSyntaxNode Right => Empty; + + public override IExpElementSource EqualityTypeConvert => throw new NotImplementedException(); + + public static ExpIndexNode IndexAt(Token position, ExpSyntaxNode expression) + { + ArgumentNullException.ThrowIfNull(expression); + if (ExpNodeFlag.BuiltinType_Int.IsNotInFlag(expression.NodeFlag)) { + throw new ExpInvalidTypeException( + position, "Integer", expression.EqualityTypeConvert.Name); + } + return new ExpIndexNode(position, expression); + } + + } + + public class ExpRangeNode : ExpSyntaxNode + { + + private const string _codeTemplate = "[{0}..{1}]"; + + private ExpSyntaxNode _begin, _end; + + internal ExpRangeNode(Token t, ExpSyntaxNode begin, ExpSyntaxNode end) + : base(t) + { + _begin = begin; + _end = end; + CodeConvertTemplate = _codeTemplate; + } + + public override ExpSyntaxNode Left => _begin; + + public override ExpSyntaxNode Right => _end; + + public override IExpElementSource EqualityTypeConvert => ExpInstantiableElement.Void; + + public static ExpRangeNode RangeNode(Token position, ExpSyntaxNode beginNode, ExpSyntaxNode endNode) + { + ArgumentNullException.ThrowIfNull(beginNode); + ArgumentNullException.ThrowIfNull(endNode); + if (ExpNodeFlag.BuiltinType_Int.IsNotInFlag(beginNode.NodeFlag)) { + throw new ExpInvalidTypeException( + position, "Integer", beginNode.EqualityTypeConvert.Name); + } + if (ExpNodeFlag.BuiltinType_Int.IsNotInFlag(endNode.NodeFlag)) { + throw new ExpInvalidTypeException( + position, "Integer", endNode.EqualityTypeConvert.Name); + } + return new ExpRangeNode(position, beginNode, endNode); + } + + } + + public class ExpCollectionExpressionNode : ExpSyntaxNode + { + + internal ExpCollectionExpressionNode(Token t, ExpTupleNode tupleNode) : base(t) { } + + public override ExpSyntaxNode Left => throw new NotImplementedException(); + + public override ExpSyntaxNode Right => throw new NotImplementedException(); + + public override IExpElementSource EqualityTypeConvert => throw new NotImplementedException(); + + } +} diff --git a/StgSharp.Script/Express/ExpAstNode/ExpRepeatNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpRepeatNode.cs index 4decf32f..d47162f6 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpRepeatNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpRepeatNode.cs @@ -1,198 +1,198 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpRepeatNode" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.Serialization; -using System.Text; -using System.Threading.Channels; - -namespace StgSharp.Script.Express -{ - public class ExpRepeatNode : ExpSyntaxNode - { - - private ExpElementInstance _variable; - private ExpSyntaxNode _begin, _end, _increment, _operationBegin,_untilRule,_whileRule; - - internal ExpRepeatNode( - Token source, - ExpElementInstance variable, - ExpSyntaxNode begin, - ExpSyntaxNode end, - ExpSyntaxNode increment, - ExpSyntaxNode operationBegin, - ExpSyntaxNode untilRule, - ExpSyntaxNode whileRule) - : base(source) - { - if (variable.NodeFlag != begin.NodeFlag || - begin.NodeFlag != end.NodeFlag || - (increment != null && end.NodeFlag != increment.NodeFlag)) { - throw new InvalidCastException(); - } - if (IsNullOrEmpty(increment)) - { - switch ((ExpNodeFlag)variable.NodeFlag | ExpNodeFlag.BuiltinType_Any) - { - case ExpNodeFlag.BuiltinType_Real: - increment = new ExpRealNumberNode( - new Token( - ExpressCompile.PoolString("1.0f"), source.Line, -1, - TokenFlag.Number), - 1.0f, isLiteral:true); - break; - case ExpNodeFlag.BuiltinType_Int: - increment = new ExpIntNode( - new Token( - ExpressCompile.PoolString("1"), source.Line, -1, TokenFlag.Number), - 1, isLiteral:true); - break; - default: - throw new ExpInvalidTypeException(variable, "Int or Real", "otherwise"); - } - } - _variable = variable; - _begin = begin; - _end = end; - _increment = increment!; - _operationBegin = operationBegin; - _untilRule = untilRule; - _whileRule = whileRule; - } - - public override ExpSyntaxNode Left => throw new NotImplementedException(); - - public override ExpSyntaxNode Right => _operationBegin; - - public override IExpElementSource EqualityTypeConvert => null!; - - public void AppendRepeatedOperation(ExpSyntaxNode node) - { - _operationBegin.AppendNode(node); - } - - /// - /// Create an AST node for repeat expression in EXPRESS language. The loop does not has - /// WHILE and UNTIL regulation. - /// - /// - /// AllocatorHandle of the loop. - /// - /// - /// The variable recording increment by step. - /// - /// - /// Beginning value of the loop. - /// - /// - /// When reach the value, the loop ends. - /// - /// - /// Expressions to operate multiple times. - /// - /// - /// A representing the repeat expression. - /// - public static ExpRepeatNode Create( - Token t, - ExpInstanceReferenceNode repeatVariable, - ExpSyntaxNode begin, - ExpSyntaxNode end, - ExpSyntaxNode increment, - ExpSyntaxNode whileRule, - ExpSyntaxNode untilRule, - ExpSyntaxNode body) - { - untilRule = ExpBoolNode.False(null); - whileRule = ExpBoolNode.True(null); - ExpRepeatNode ret = new ExpRepeatNode( - t, repeatVariable.OriginObject, begin, end, increment, body, whileRule, untilRule) - { - /* - * 0: variable name - * 1: beginning value - * 2: ending value - * 3: increment - * 4: body - * 5: while - * 6: until - */ - - CodeConvertTemplate = - $$""" - for( {0} = {1}; {0} <= {2}; {0} += {3}) - { - if(!( {5} )) break; - {4} - if( {6} ) break; - } - """ - }; - return ret; - } - - public static ExpRepeatNode Create( - Token t, - ExpElementInstance repeatVariable, - ExpSyntaxNode begin, - ExpSyntaxNode end, - ExpSyntaxNode increment, - ExpSyntaxNode whileRule, - ExpSyntaxNode untilRule, - ExpSyntaxNode body) - { - whileRule = IsNullOrEmpty(whileRule) ? ExpBoolNode.True(t) : whileRule; - untilRule = IsNullOrEmpty(untilRule) ? ExpBoolNode.False(t) : untilRule; - ExpRepeatNode ret = new ExpRepeatNode(t, repeatVariable, begin, end, increment, body, whileRule, untilRule) - { - /* - * 0: variable name - * 1: beginning value - * 2: ending value - * 3: increment - * 4: body - * 5: while - * 6: until - */ - - CodeConvertTemplate = - $$""" - for({{repeatVariable.TypeName}} {0} = {1}; {0} <= {2}; {0} += {3}) - { - if(!( {5} )) break; - {4} - if( {6} ) break; - } - """ - }; - return ret; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpRepeatNode" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Threading.Channels; + +namespace StgSharp.Script.Express +{ + public class ExpRepeatNode : ExpSyntaxNode + { + + private ExpElementInstance _variable; + private ExpSyntaxNode _begin, _end, _increment, _operationBegin,_untilRule,_whileRule; + + internal ExpRepeatNode( + Token source, + ExpElementInstance variable, + ExpSyntaxNode begin, + ExpSyntaxNode end, + ExpSyntaxNode increment, + ExpSyntaxNode operationBegin, + ExpSyntaxNode untilRule, + ExpSyntaxNode whileRule) + : base(source) + { + if (variable.NodeFlag != begin.NodeFlag || + begin.NodeFlag != end.NodeFlag || + (increment != null && end.NodeFlag != increment.NodeFlag)) { + throw new InvalidCastException(); + } + if (IsNullOrEmpty(increment)) + { + switch ((ExpNodeFlag)variable.NodeFlag | ExpNodeFlag.BuiltinType_Any) + { + case ExpNodeFlag.BuiltinType_Real: + increment = new ExpRealNumberNode( + new Token( + ExpressCompile.PoolString("1.0f"), source.Line, -1, + TokenFlag.Number), + 1.0f, isLiteral:true); + break; + case ExpNodeFlag.BuiltinType_Int: + increment = new ExpIntNode( + new Token( + ExpressCompile.PoolString("1"), source.Line, -1, TokenFlag.Number), + 1, isLiteral:true); + break; + default: + throw new ExpInvalidTypeException(variable, "Int or Real", "otherwise"); + } + } + _variable = variable; + _begin = begin; + _end = end; + _increment = increment!; + _operationBegin = operationBegin; + _untilRule = untilRule; + _whileRule = whileRule; + } + + public override ExpSyntaxNode Left => throw new NotImplementedException(); + + public override ExpSyntaxNode Right => _operationBegin; + + public override IExpElementSource EqualityTypeConvert => null!; + + public void AppendRepeatedOperation(ExpSyntaxNode node) + { + _operationBegin.AppendNode(node); + } + + /// + /// Create an AST node for repeat expression in EXPRESS language. The loop does not has + /// WHILE and UNTIL regulation. + /// + /// + /// AllocatorHandle of the loop. + /// + /// + /// The variable recording increment by step. + /// + /// + /// Beginning value of the loop. + /// + /// + /// When reach the value, the loop ends. + /// + /// + /// Expressions to operate multiple times. + /// + /// + /// A representing the repeat expression. + /// + public static ExpRepeatNode Create( + Token t, + ExpInstanceReferenceNode repeatVariable, + ExpSyntaxNode begin, + ExpSyntaxNode end, + ExpSyntaxNode increment, + ExpSyntaxNode whileRule, + ExpSyntaxNode untilRule, + ExpSyntaxNode body) + { + untilRule = ExpBoolNode.False(null); + whileRule = ExpBoolNode.True(null); + ExpRepeatNode ret = new ExpRepeatNode( + t, repeatVariable.OriginObject, begin, end, increment, body, whileRule, untilRule) + { + /* + * 0: variable name + * 1: beginning value + * 2: ending value + * 3: increment + * 4: body + * 5: while + * 6: until + */ + + CodeConvertTemplate = + $$""" + for( {0} = {1}; {0} <= {2}; {0} += {3}) + { + if(!( {5} )) break; + {4} + if( {6} ) break; + } + """ + }; + return ret; + } + + public static ExpRepeatNode Create( + Token t, + ExpElementInstance repeatVariable, + ExpSyntaxNode begin, + ExpSyntaxNode end, + ExpSyntaxNode increment, + ExpSyntaxNode whileRule, + ExpSyntaxNode untilRule, + ExpSyntaxNode body) + { + whileRule = IsNullOrEmpty(whileRule) ? ExpBoolNode.True(t) : whileRule; + untilRule = IsNullOrEmpty(untilRule) ? ExpBoolNode.False(t) : untilRule; + ExpRepeatNode ret = new ExpRepeatNode(t, repeatVariable, begin, end, increment, body, whileRule, untilRule) + { + /* + * 0: variable name + * 1: beginning value + * 2: ending value + * 3: increment + * 4: body + * 5: while + * 6: until + */ + + CodeConvertTemplate = + $$""" + for({{repeatVariable.TypeName}} {0} = {1}; {0} <= {2}; {0} += {3}) + { + if(!( {5} )) break; + {4} + if( {6} ) break; + } + """ + }; + return ret; + } + + } +} diff --git a/StgSharp.Script/Express/ExpAstNode/ExpSwitchNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpSwitchNode.cs index 56c7883d..5c912964 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpSwitchNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpSwitchNode.cs @@ -1,133 +1,133 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpSwitchNode" -// 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 System; -using System.Collections.Frozen; -using System.Collections.Generic; -using System.Text; - -namespace StgSharp.Script.Express -{ - public class ExpSwitchNode : ExpSyntaxNode - { - - private ExpSyntaxNode _default; - private ExpSyntaxNode _target; - - private FrozenDictionary _cases; - - public ExpSwitchNode( - Token source, - ExpSyntaxNode target, - ExpSyntaxNode defaultCase, - params (ExpSyntaxNode label, ExpSyntaxNode op)[] cases) - : base(source) - { - _target = target; - _default = defaultCase; - Dictionary casesDic = new Dictionary( - ); - foreach ((ExpSyntaxNode label, ExpSyntaxNode op ) item in cases) - { - if (item.op == null) - { - casesDic.Add(item.label, null!); - } else - { - casesDic.Add(item.label, item.op); - } - } - _cases = casesDic.ToFrozenDictionary(); - - - string str = @"switch( {0} ){"; - StringBuilder codeFormatBuilder = new StringBuilder(); - codeFormatBuilder.AppendLine(str); - for (int i = 0; i < casesDic.Count; i++) - { - int index = i * 2 + 1; - codeFormatBuilder.AppendLine( - $$""" - case {{{index}}}: - {{{index + 1}}} - break; - """); - } - CodeConvertTemplate = codeFormatBuilder.ToString(); - } - - public ExpSwitchNode( - Token source, - ExpSyntaxNode target, - ExpSyntaxNode defaultCase, - IDictionary cases) - : base(source) - { - _target = target; - _default = defaultCase; - _cases = cases.ToFrozenDictionary(); - - string str = @"switch( {0} ){"; - StringBuilder codeFormatBuilder = new StringBuilder(); - codeFormatBuilder.AppendLine(str); - for (int i = 0; i < cases.Count; i++) - { - int index = i * 2 + 1; - codeFormatBuilder.AppendLine( - $$""" - case {{{index}}}: - {{{index + 1}}} - break; - """); - } - CodeConvertTemplate = codeFormatBuilder.ToString(); - } - - public ExpSyntaxNode this[ExpSyntaxNode index] - { - get - { - if (_cases.TryGetValue(index, out ExpSyntaxNode? ret)) { - return ret; - } - return _default; - } - } - - public override ExpSyntaxNode Left => Empty; - - public override ExpSyntaxNode Right => Empty; - - public override IExpElementSource EqualityTypeConvert => null!; - - public bool ContainsCase(ExpSyntaxNode token) - { - return _cases.ContainsKey(token); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpSwitchNode" +// 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 System; +using System.Collections.Frozen; +using System.Collections.Generic; +using System.Text; + +namespace StgSharp.Script.Express +{ + public class ExpSwitchNode : ExpSyntaxNode + { + + private ExpSyntaxNode _default; + private ExpSyntaxNode _target; + + private FrozenDictionary _cases; + + public ExpSwitchNode( + Token source, + ExpSyntaxNode target, + ExpSyntaxNode defaultCase, + params (ExpSyntaxNode label, ExpSyntaxNode op)[] cases) + : base(source) + { + _target = target; + _default = defaultCase; + Dictionary casesDic = new Dictionary( + ); + foreach ((ExpSyntaxNode label, ExpSyntaxNode op ) item in cases) + { + if (item.op == null) + { + casesDic.Add(item.label, null!); + } else + { + casesDic.Add(item.label, item.op); + } + } + _cases = casesDic.ToFrozenDictionary(); + + + string str = @"switch( {0} ){"; + StringBuilder codeFormatBuilder = new StringBuilder(); + codeFormatBuilder.AppendLine(str); + for (int i = 0; i < casesDic.Count; i++) + { + int index = i * 2 + 1; + codeFormatBuilder.AppendLine( + $$""" + case {{{index}}}: + {{{index + 1}}} + break; + """); + } + CodeConvertTemplate = codeFormatBuilder.ToString(); + } + + public ExpSwitchNode( + Token source, + ExpSyntaxNode target, + ExpSyntaxNode defaultCase, + IDictionary cases) + : base(source) + { + _target = target; + _default = defaultCase; + _cases = cases.ToFrozenDictionary(); + + string str = @"switch( {0} ){"; + StringBuilder codeFormatBuilder = new StringBuilder(); + codeFormatBuilder.AppendLine(str); + for (int i = 0; i < cases.Count; i++) + { + int index = i * 2 + 1; + codeFormatBuilder.AppendLine( + $$""" + case {{{index}}}: + {{{index + 1}}} + break; + """); + } + CodeConvertTemplate = codeFormatBuilder.ToString(); + } + + public ExpSyntaxNode this[ExpSyntaxNode index] + { + get + { + if (_cases.TryGetValue(index, out ExpSyntaxNode? ret)) { + return ret; + } + return _default; + } + } + + public override ExpSyntaxNode Left => Empty; + + public override ExpSyntaxNode Right => Empty; + + public override IExpElementSource EqualityTypeConvert => null!; + + public bool ContainsCase(ExpSyntaxNode token) + { + return _cases.ContainsKey(token); + } + + } +} diff --git a/StgSharp.Script/Express/ExpAstNode/ExpTupleNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpTupleNode.cs index 8b81392c..a4bb97f9 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpTupleNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpTupleNode.cs @@ -1,66 +1,66 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpTupleNode" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Script.Express -{ - public class ExpTupleNode : ExpSyntaxNode - { - - private ExpSyntaxNode node; - - private ExpTupleNode(ExpSyntaxNode node) - : base(node._source) - { - this.node = node; - } - - public override ExpSyntaxNode Left => Empty; - - public override ExpSyntaxNode Right => node; - - public override IExpElementSource EqualityTypeConvert => throw new NotImplementedException(); - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ExpTupleNode Pack(ExpSyntaxNode node) - { - return new ExpTupleNode(node); - } - - public ExpNodePresidentEnumerator TupleAsEnumerator() - { - return node.ToPresidentEnumerator(); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpTupleNode" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Script.Express +{ + public class ExpTupleNode : ExpSyntaxNode + { + + private ExpSyntaxNode node; + + private ExpTupleNode(ExpSyntaxNode node) + : base(node._source) + { + this.node = node; + } + + public override ExpSyntaxNode Left => Empty; + + public override ExpSyntaxNode Right => node; + + public override IExpElementSource EqualityTypeConvert => throw new NotImplementedException(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ExpTupleNode Pack(ExpSyntaxNode node) + { + return new ExpTupleNode(node); + } + + public ExpNodePresidentEnumerator TupleAsEnumerator() + { + return node.ToPresidentEnumerator(); + } + + } +} diff --git a/StgSharp.Script/Express/ExpAstNode/ExpUnaryOperatorNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpUnaryOperatorNode.cs index 925f4bad..80777523 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpUnaryOperatorNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpUnaryOperatorNode.cs @@ -1,99 +1,99 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpUnaryOperatorNode" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Script.Express -{ - public class ExpUnaryOperatorNode : ExpSyntaxNode - { - - private ExpSyntaxNode _operand; - - private ExpUnaryOperatorNode(Token source) : base(source) { } - - public ExpUnaryOperatorNode(Token source, ExpSyntaxNode operand, ExpSchema context) - : base(source) - { - _operand = operand; - } - - public override ExpSyntaxNode Left => null!; - - public override ExpSyntaxNode Right => _operand; - - public override IExpElementSource EqualityTypeConvert => _operand.EqualityTypeConvert; - - public static ExpUnaryOperatorNode UnaryMinus(Token source, ExpSyntaxNode operand) - { - if (!operand.IsNumber) { - throw new ExpInvalidTypeException( - source, "Number", operand.EqualityTypeConvert.Name); - } - bool isFloat = - (operand._nodeFlag | ExpNodeFlag.BuiltinType_Real) == 0; - return new ExpUnaryOperatorNode(source) - { - _nodeFlag = ExpNodeFlag.Operator_Unary | ExpNodeFlag.BuiltinType_Number, - CodeConvertTemplate = "- {0}", - }; - } - - public static ExpUnaryOperatorNode UnaryNot(Token source, ExpSyntaxNode operand) - { - if ((operand._nodeFlag | (ExpNodeFlag.BuiltinType_Logic | ExpNodeFlag.BuiltinType_Logic)) == 0) { - throw new ExpInvalidTypeException( - source, "Bool or Logic", operand.EqualityTypeConvert.Name); - } - return new ExpUnaryOperatorNode(source) - { - _nodeFlag = ExpNodeFlag.Operator_Unary | ExpNodeFlag.BuiltinType_Logic, - CodeConvertTemplate = "! {0}", - }; - } - - public static ExpUnaryOperatorNode UnaryPlus(Token source, ExpSyntaxNode operand) - { - if (!operand.IsNumber) { - throw new ExpInvalidTypeException( - source, "Number", operand.EqualityTypeConvert.Name); - } - bool isFloat = - (operand._nodeFlag | ExpNodeFlag.BuiltinType_Real) == 0; - return new ExpUnaryOperatorNode(source) - { - _nodeFlag = ExpNodeFlag.Operator_Unary | ExpNodeFlag.BuiltinType_Number, - CodeConvertTemplate = "+ {0}", - }; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpUnaryOperatorNode" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Script.Express +{ + public class ExpUnaryOperatorNode : ExpSyntaxNode + { + + private ExpSyntaxNode _operand; + + private ExpUnaryOperatorNode(Token source) : base(source) { } + + public ExpUnaryOperatorNode(Token source, ExpSyntaxNode operand, ExpSchema context) + : base(source) + { + _operand = operand; + } + + public override ExpSyntaxNode Left => null!; + + public override ExpSyntaxNode Right => _operand; + + public override IExpElementSource EqualityTypeConvert => _operand.EqualityTypeConvert; + + public static ExpUnaryOperatorNode UnaryMinus(Token source, ExpSyntaxNode operand) + { + if (!operand.IsNumber) { + throw new ExpInvalidTypeException( + source, "Number", operand.EqualityTypeConvert.Name); + } + bool isFloat = + (operand._nodeFlag | ExpNodeFlag.BuiltinType_Real) == 0; + return new ExpUnaryOperatorNode(source) + { + _nodeFlag = ExpNodeFlag.Operator_Unary | ExpNodeFlag.BuiltinType_Number, + CodeConvertTemplate = "- {0}", + }; + } + + public static ExpUnaryOperatorNode UnaryNot(Token source, ExpSyntaxNode operand) + { + if ((operand._nodeFlag | (ExpNodeFlag.BuiltinType_Logic | ExpNodeFlag.BuiltinType_Logic)) == 0) { + throw new ExpInvalidTypeException( + source, "Bool or Logic", operand.EqualityTypeConvert.Name); + } + return new ExpUnaryOperatorNode(source) + { + _nodeFlag = ExpNodeFlag.Operator_Unary | ExpNodeFlag.BuiltinType_Logic, + CodeConvertTemplate = "! {0}", + }; + } + + public static ExpUnaryOperatorNode UnaryPlus(Token source, ExpSyntaxNode operand) + { + if (!operand.IsNumber) { + throw new ExpInvalidTypeException( + source, "Number", operand.EqualityTypeConvert.Name); + } + bool isFloat = + (operand._nodeFlag | ExpNodeFlag.BuiltinType_Real) == 0; + return new ExpUnaryOperatorNode(source) + { + _nodeFlag = ExpNodeFlag.Operator_Unary | ExpNodeFlag.BuiltinType_Number, + CodeConvertTemplate = "+ {0}", + }; + } + + } +} diff --git a/StgSharp.Script/Express/ExpAstNode/_ExpNode.cs b/StgSharp.Script/Express/ExpAstNode/_ExpNode.cs index 8304ce73..65828290 100644 --- a/StgSharp.Script/Express/ExpAstNode/_ExpNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/_ExpNode.cs @@ -1,149 +1,149 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="_ExpNode" -// 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 CommunityToolkit.HighPerformance.Buffers; - -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Text; - -namespace StgSharp.Script.Express -{ - public abstract class ExpSyntaxNode : ISyntaxNode - { - - protected internal ExpNodeFlag _nodeFlag; - protected internal Token _source; - - protected ExpSyntaxNode(Token source) - { - _source = source; - Next = this; - Previous = this; - } - - public bool IsNumber - { - get { return (_nodeFlag | ExpNodeFlag.BuiltinType_Number) != 0; } - } - - public abstract ExpSyntaxNode Left { get; } - - public static ExpSyntaxNode Empty - { - get => ExpEmptyNode._only; - } - - public ExpSyntaxNode Next { get; set; } - - public abstract ExpSyntaxNode Right { get; } - - public ExpSyntaxNode Previous { get; set; } - - public abstract IExpElementSource EqualityTypeConvert { get; } - - public int Line => _source.Line; - - public int Column => _source.Column; - - public long NodeFlag => (long)_nodeFlag; - - public string CodeConvertTemplate { get; init; } - - public Token Source - { - get => _source; - } - - public void AppendNode(ExpSyntaxNode nextNode) - { - Next.Previous = nextNode; - nextNode.Next = Next; - Next = nextNode; - Next.Previous = this; - } - - public static bool IsNullOrEmpty([AllowNull]ExpSyntaxNode node) - { - return node == ExpEmptyNode._only || node == null; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ExpSyntaxNode NonOperation(Token source) - { - return new ExpEmptyNode(source.Line, source.Column); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ExpSyntaxNode NonOperation(int line, int column) - { - return new ExpEmptyNode(line, column); - } - - public void PrependNode(ExpSyntaxNode previousNode) - { - Previous.Next = previousNode; - previousNode.Previous = Previous; - Previous = previousNode; - previousNode.Next = this; - } - - public static bool VerifyTypeConvertable(ExpSyntaxNode left, ExpSyntaxNode right) - { - IExpElementSource tLeft = left.EqualityTypeConvert, - tRight = right.EqualityTypeConvert; - if (tLeft is not ExpInstantiableElement tLeftIns || tRight is not ExpInstantiableElement tRightIns) { - return false; - } - if (ExpInstantiableElement.IsNullOrVoid(tLeftIns) || ExpInstantiableElement.IsNullOrVoid(tLeftIns)) { - return false; - } - return tLeft.IsConvertable(tRight); - } - - private class ExpEmptyNode : ExpSyntaxNode - { - - internal static readonly ExpEmptyNode _only = new(); - - public ExpEmptyNode() : base(Token.Empty) { } - - public ExpEmptyNode(int line, int column) : base(new Token(string.Empty, line, column, TokenFlag.None)) { } - - public override ExpInstantiableElement EqualityTypeConvert => ExpInstantiableElement.Void; - - public override ExpSyntaxNode Left => _only; - - public override ExpSyntaxNode Right => _only; - - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="_ExpNode" +// 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 CommunityToolkit.HighPerformance.Buffers; + +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; + +namespace StgSharp.Script.Express +{ + public abstract class ExpSyntaxNode : ISyntaxNode + { + + protected internal ExpNodeFlag _nodeFlag; + protected internal Token _source; + + protected ExpSyntaxNode(Token source) + { + _source = source; + Next = this; + Previous = this; + } + + public bool IsNumber + { + get { return (_nodeFlag | ExpNodeFlag.BuiltinType_Number) != 0; } + } + + public abstract ExpSyntaxNode Left { get; } + + public static ExpSyntaxNode Empty + { + get => ExpEmptyNode._only; + } + + public ExpSyntaxNode Next { get; set; } + + public abstract ExpSyntaxNode Right { get; } + + public ExpSyntaxNode Previous { get; set; } + + public abstract IExpElementSource EqualityTypeConvert { get; } + + public int Line => _source.Line; + + public int Column => _source.Column; + + public long NodeFlag => (long)_nodeFlag; + + public string CodeConvertTemplate { get; init; } + + public Token Source + { + get => _source; + } + + public void AppendNode(ExpSyntaxNode nextNode) + { + Next.Previous = nextNode; + nextNode.Next = Next; + Next = nextNode; + Next.Previous = this; + } + + public static bool IsNullOrEmpty([AllowNull]ExpSyntaxNode node) + { + return node == ExpEmptyNode._only || node == null; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ExpSyntaxNode NonOperation(Token source) + { + return new ExpEmptyNode(source.Line, source.Column); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ExpSyntaxNode NonOperation(int line, int column) + { + return new ExpEmptyNode(line, column); + } + + public void PrependNode(ExpSyntaxNode previousNode) + { + Previous.Next = previousNode; + previousNode.Previous = Previous; + Previous = previousNode; + previousNode.Next = this; + } + + public static bool VerifyTypeConvertable(ExpSyntaxNode left, ExpSyntaxNode right) + { + IExpElementSource tLeft = left.EqualityTypeConvert, + tRight = right.EqualityTypeConvert; + if (tLeft is not ExpInstantiableElement tLeftIns || tRight is not ExpInstantiableElement tRightIns) { + return false; + } + if (ExpInstantiableElement.IsNullOrVoid(tLeftIns) || ExpInstantiableElement.IsNullOrVoid(tLeftIns)) { + return false; + } + return tLeft.IsConvertable(tRight); + } + + private class ExpEmptyNode : ExpSyntaxNode + { + + internal static readonly ExpEmptyNode _only = new(); + + public ExpEmptyNode() : base(Token.Empty) { } + + public ExpEmptyNode(int line, int column) : base(new Token(string.Empty, line, column, TokenFlag.None)) { } + + public override ExpInstantiableElement EqualityTypeConvert => ExpInstantiableElement.Void; + + public override ExpSyntaxNode Left => _only; + + public override ExpSyntaxNode Right => _only; + + } + + } +} diff --git a/StgSharp.Script/Express/ExpElementInstance.cs b/StgSharp.Script/Express/ExpElementInstance.cs index bf63807d..b0492952 100644 --- a/StgSharp.Script/Express/ExpElementInstance.cs +++ b/StgSharp.Script/Express/ExpElementInstance.cs @@ -1,130 +1,130 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpElementInstance" -// 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 System; -using System.Collections.Generic; -using System.IO; -using System.Runtime.CompilerServices; -using System.Text; - -namespace StgSharp.Script.Express -{ - [Flags] - public enum ExpElementType : int - { - - Void = 0, - Const = 1, - Entity = 2, - Type = 4, - Function = 8, - Section = 16, - Expression = 32, - Rule = 64, - Procedure = 128, - Collection = 256, - - } - - public abstract class ExpElementInstance : ExpSyntaxNode - { - - protected ExpElementInstance(Token source) - : base(source) - { - CodeConvertTemplate = source.Value; - } - - public bool IsLiteral { get; init; } - - public ExpElementType ElementType { get; } - - public override ExpSyntaxNode Left => Empty; - - public override ExpSyntaxNode Right => Empty; - - public abstract string TypeName { get; } - - public static ExpElementInstance CreateLiteral(Token t) - { - if (int.TryParse(t.Value, out int _int)) - { - return new ExpIntNode(t, _int, true); - } else if (float.TryParse(t.Value, out float _float)) - { - return new ExpRealNumberNode(t, _float, true); - } else if (bool.TryParse(t.Value, out bool _bool)) - { - return new ExpBoolNode(t, _bool, true); - } else if (ExpLogic.TryParse(t.Value, out ExpLogic _logic)) - { - return new ExpLogicValueNode(t, _logic, true); - } else - { - return new ExpStringNode(t, t.Value, true); - } - } - - public ExpInstanceReferenceNode MakeReference(Token t) - { - return new ExpInstanceReferenceNode(t, this); - } - - public static bool TryCreateLiteral(Token t, out ExpElementInstance instance) - { - if (int.TryParse(t.Value, out int _int)) - { - instance = new ExpIntNode(t, _int, true); - return true; - } else if (float.TryParse(t.Value, out float _float)) - { - instance = new ExpRealNumberNode(t, _float, true); - return true; - } else if (bool.TryParse(t.Value, out bool _bool)) - { - instance = new ExpBoolNode(t, _bool, true); - return true; - } else if (ExpLogic.TryParse(t.Value, out ExpLogic _logic)) - { - instance = new ExpLogicValueNode(t, _logic, true); - return true; - } else if (t.Flag == TokenFlag.String) - { - instance = new ExpStringNode(t, t.Value, true); - return true; - } - instance = null!; - return false; - } - - public bool TryGetMember(string name, out ExpSyntaxNode node) - { - return EqualityTypeConvert.TryGetMember(name, out node); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpElementInstance" +// 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 System; +using System.Collections.Generic; +using System.IO; +using System.Runtime.CompilerServices; +using System.Text; + +namespace StgSharp.Script.Express +{ + [Flags] + public enum ExpElementType : int + { + + Void = 0, + Const = 1, + Entity = 2, + Type = 4, + Function = 8, + Section = 16, + Expression = 32, + Rule = 64, + Procedure = 128, + Collection = 256, + + } + + public abstract class ExpElementInstance : ExpSyntaxNode + { + + protected ExpElementInstance(Token source) + : base(source) + { + CodeConvertTemplate = source.Value; + } + + public bool IsLiteral { get; init; } + + public ExpElementType ElementType { get; } + + public override ExpSyntaxNode Left => Empty; + + public override ExpSyntaxNode Right => Empty; + + public abstract string TypeName { get; } + + public static ExpElementInstance CreateLiteral(Token t) + { + if (int.TryParse(t.Value, out int _int)) + { + return new ExpIntNode(t, _int, true); + } else if (float.TryParse(t.Value, out float _float)) + { + return new ExpRealNumberNode(t, _float, true); + } else if (bool.TryParse(t.Value, out bool _bool)) + { + return new ExpBoolNode(t, _bool, true); + } else if (ExpLogic.TryParse(t.Value, out ExpLogic _logic)) + { + return new ExpLogicValueNode(t, _logic, true); + } else + { + return new ExpStringNode(t, t.Value, true); + } + } + + public ExpInstanceReferenceNode MakeReference(Token t) + { + return new ExpInstanceReferenceNode(t, this); + } + + public static bool TryCreateLiteral(Token t, out ExpElementInstance instance) + { + if (int.TryParse(t.Value, out int _int)) + { + instance = new ExpIntNode(t, _int, true); + return true; + } else if (float.TryParse(t.Value, out float _float)) + { + instance = new ExpRealNumberNode(t, _float, true); + return true; + } else if (bool.TryParse(t.Value, out bool _bool)) + { + instance = new ExpBoolNode(t, _bool, true); + return true; + } else if (ExpLogic.TryParse(t.Value, out ExpLogic _logic)) + { + instance = new ExpLogicValueNode(t, _logic, true); + return true; + } else if (t.Flag == TokenFlag.String) + { + instance = new ExpStringNode(t, t.Value, true); + return true; + } + instance = null!; + return false; + } + + public bool TryGetMember(string name, out ExpSyntaxNode node) + { + return EqualityTypeConvert.TryGetMember(name, out node); + } + + } +} diff --git a/StgSharp.Script/Express/ExpElmentSource.cs b/StgSharp.Script/Express/ExpElmentSource.cs index 2fa113e1..94913d8c 100644 --- a/StgSharp.Script/Express/ExpElmentSource.cs +++ b/StgSharp.Script/Express/ExpElmentSource.cs @@ -1,153 +1,153 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpElmentSource" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Script.Express -{ - public interface IExpElementSource : ITypeSource - { - - public ExpElementType ElementType { get; } - - IScriptSourceProvider SourceProvider { get; } - - string Name { get; } - - public void AddMember(string name, ExpSyntaxNode memberNode); - - public void Analyse(); - - public bool TryGetMember(string name, out ExpSyntaxNode memberNode); - - } - - public abstract class ExpInstantiableElement : IExpElementSource - { - - private List _baseList = new List(), - _derivationList = new List(); - - public abstract ExpElementType ElementType { get; } - - public static ExpInstantiableElement Void - { - get => ExpVoidElement.Only; - } - - public abstract IScriptSourceProvider SourceProvider { get; } - - public abstract string Name { get; } - - public void AddMember(string name, ExpSyntaxNode memberNode) - { - throw new NotImplementedException(); - } - - public abstract void Analyse(); - - public abstract ExpSyntaxNode CreateInstanceNode(Token t); - - public bool IsConvertable(IExpElementSource targetType) - { - if (targetType == null) { - return false; - } - throw new NotImplementedException(); - } - - public static bool IsNullOrVoid(ExpInstantiableElement element) - { - return element == null || element == ExpVoidElement.Only; - } - - public abstract bool TryGetMember(string name, out ExpSyntaxNode memberNode); - - private sealed class ExpVoidElement : ExpInstantiableElement - { - - private static readonly ExpVoidElement _only = new ExpVoidElement(); - - public override ExpElementType ElementType => ExpElementType.Void; - - public static ExpVoidElement Only => _only; - - public override IScriptSourceProvider SourceProvider => ScriptSourceTransmitter.Empty; - - public override string Name => "void"; - - public override void Analyse() - { - return; - } - - public override ExpSyntaxNode CreateInstanceNode(Token t) - { - return ExpSyntaxNode.Empty; - } - - public override bool TryGetMember(string name, out ExpSyntaxNode memberNode) - { - memberNode = ExpSyntaxNode.Empty; - return false; - } - - } - - } - - public abstract class ExpImmutableElement : IExpElementSource - { - - public abstract ExpElementType ElementType { get; } - - public abstract IScriptSourceProvider SourceProvider { get; } - - public abstract string Name { get; } - - public void AddMember(string name, ExpSyntaxNode memberNode) - { - throw new NotImplementedException(); - } - - public abstract void Analyse(); - - public bool IsConvertable(IExpElementSource targetType) - { - return false; - } - - public abstract ExpSyntaxNode MakeReference(params object[] options); - - public abstract bool TryGetMember(string name, out ExpSyntaxNode memberNode); - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpElmentSource" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Script.Express +{ + public interface IExpElementSource : ITypeSource + { + + public ExpElementType ElementType { get; } + + IScriptSourceProvider SourceProvider { get; } + + string Name { get; } + + public void AddMember(string name, ExpSyntaxNode memberNode); + + public void Analyse(); + + public bool TryGetMember(string name, out ExpSyntaxNode memberNode); + + } + + public abstract class ExpInstantiableElement : IExpElementSource + { + + private List _baseList = new List(), + _derivationList = new List(); + + public abstract ExpElementType ElementType { get; } + + public static ExpInstantiableElement Void + { + get => ExpVoidElement.Only; + } + + public abstract IScriptSourceProvider SourceProvider { get; } + + public abstract string Name { get; } + + public void AddMember(string name, ExpSyntaxNode memberNode) + { + throw new NotImplementedException(); + } + + public abstract void Analyse(); + + public abstract ExpSyntaxNode CreateInstanceNode(Token t); + + public bool IsConvertable(IExpElementSource targetType) + { + if (targetType == null) { + return false; + } + throw new NotImplementedException(); + } + + public static bool IsNullOrVoid(ExpInstantiableElement element) + { + return element == null || element == ExpVoidElement.Only; + } + + public abstract bool TryGetMember(string name, out ExpSyntaxNode memberNode); + + private sealed class ExpVoidElement : ExpInstantiableElement + { + + private static readonly ExpVoidElement _only = new ExpVoidElement(); + + public override ExpElementType ElementType => ExpElementType.Void; + + public static ExpVoidElement Only => _only; + + public override IScriptSourceProvider SourceProvider => ScriptSourceTransmitter.Empty; + + public override string Name => "void"; + + public override void Analyse() + { + return; + } + + public override ExpSyntaxNode CreateInstanceNode(Token t) + { + return ExpSyntaxNode.Empty; + } + + public override bool TryGetMember(string name, out ExpSyntaxNode memberNode) + { + memberNode = ExpSyntaxNode.Empty; + return false; + } + + } + + } + + public abstract class ExpImmutableElement : IExpElementSource + { + + public abstract ExpElementType ElementType { get; } + + public abstract IScriptSourceProvider SourceProvider { get; } + + public abstract string Name { get; } + + public void AddMember(string name, ExpSyntaxNode memberNode) + { + throw new NotImplementedException(); + } + + public abstract void Analyse(); + + public bool IsConvertable(IExpElementSource targetType) + { + return false; + } + + public abstract ExpSyntaxNode MakeReference(params object[] options); + + public abstract bool TryGetMember(string name, out ExpSyntaxNode memberNode); + + } +} diff --git a/StgSharp.Script/Express/ExpExceptions.cs b/StgSharp.Script/Express/ExpExceptions.cs index a910ec22..ff08f6a7 100644 --- a/StgSharp.Script/Express/ExpExceptions.cs +++ b/StgSharp.Script/Express/ExpExceptions.cs @@ -1,180 +1,180 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpExceptions" -// 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 System; -using System.Collections.Generic; -using System.ComponentModel; -using System.IO; -using System.Runtime.CompilerServices; -using System.Runtime.Serialization; -using System.Security.Cryptography.X509Certificates; -using System.Text; - -namespace StgSharp.Script.Express -{ - public class ExpException : Exception - { - - private Token _pos; - - public ExpException(string message) : base(message) { } - - public ExpException(Token position, string message) - : base($"Express compile error at {position.Line}-{position.Column}:\n{message}") - { - _pos = position; - } - - public ExpException(ExpSyntaxNode node, string message) - : base( - $"Express compile error at {node.Source.Line}-{node.Source.Column}:\n{message}") - { - _pos = node._source; - } - - } - - public class ExpInvalidCharException : ExpException - { - - public ExpInvalidCharException(char c) : base($"An unknown char {c} occurred.") { } - - public ExpInvalidCharException(int index) : base($"Cannot read a token from line at {index}") { } - - } - - public class ExpStringNotCloseException : ExpException - { - - public ExpStringNotCloseException(int linenum) : base($"A string does not closed at end of line {linenum}.") { } - - } - - public class ExpInvalidSyntaxException : ExpException - { - - public ExpInvalidSyntaxException(string message) : base(message) { } - - public static void ThrowNonCollectionIndex(Token t) - { - throw new ExpInvalidSyntaxException( - $"Use a collection indexer to a non-collection variable at line {t.Line} column {t.Column}"); - } - - public static void ThrowNoOperator(Token t) - { - throw new ExpInvalidSyntaxException( - $"No operator but more than one operand before line {t.Line} column {t.Column}"); - } - - } - - public class ExpInvalidElementDeclareEndingExceptions : ExpException - { - - public ExpInvalidElementDeclareEndingExceptions(string declaredName, string endedName) - : base( - $"The datatype is declared with name {declaredName} but ended with {endedName}") { } - - } - - public class ExpInvalidElementNameException : ExpException - { - - public ExpInvalidElementNameException(string elementName, ExpSchema schema) - : base($"Cannot find any element named {elementName} in {schema.Name}") { } - - } - - public class ExpInvalidTypeException : ExpException - { - - public ExpInvalidTypeException(ExpSyntaxNode node, string required, string provided) - : base( - node, - $"Type {required} is required at position, but a {provided} instance is provided.") { } - - public ExpInvalidTypeException(Token t, string required, string provided) - : base( - t, - $"Type {required} is required at position, but a {provided} instance is provided.") { } - - } - - public class ExpCaseNotFoundException : ArgumentOutOfRangeException - { - - public ExpCaseNotFoundException(ExpSwitchNode token, ExpSyntaxNode label) - : base( - $"Attempt to read or write the label at ({token.Line},{token.Column}), that does not exist in SWITCH expression at ({token.Line},{token.Column})") { } - - } - - public class ExpInvalidCollectionMemberTypeException : InvalidCastException - { - - public ExpInvalidCollectionMemberTypeException(ExpElementInstance elementInstance, ExpCollectionBase collection) - : base( - $"Attempt to add or remove an element of type: {elementInstance.ElementType} from a collection collects {collection.MemberType}") { } - - } - - public class ExpInvalidSchemaIncludeException : InvalidOperationException - { - - public ExpInvalidSchemaIncludeException(ExpSchema context, ExpSchema source) - : base( - $"Attempted to refer to an EXPRESS language expression in the current schema context '{context.Name}', but this expression comes from another schema '{source.Name}' that has not been included.") { } - - } - - public class ExpElementLoadException : TypeLoadException - { - - public ExpElementLoadException(string typeName, ExpSchema context) - : base( - $"Cannot find the element {typeName} in schema {context.Name} and its included schemas") { } - - } - - public class ExpCompileNotInitializedException : InvalidOperationException - { - - public ExpCompileNotInitializedException() - : base("Attempt to compile an EXPRESS script before the init of compiler.") { } - - } - - public class ExpCompileException : ExpException - { - - public ExpCompileException(Token pos, string message) - : base( - $"Compiler exception occur when processing token at line {pos.Line}, column {pos.Column}. Detailed message:{Environment.NewLine}{message} ") { } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpExceptions" +// 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 System; +using System.Collections.Generic; +using System.ComponentModel; +using System.IO; +using System.Runtime.CompilerServices; +using System.Runtime.Serialization; +using System.Security.Cryptography.X509Certificates; +using System.Text; + +namespace StgSharp.Script.Express +{ + public class ExpException : Exception + { + + private Token _pos; + + public ExpException(string message) : base(message) { } + + public ExpException(Token position, string message) + : base($"Express compile error at {position.Line}-{position.Column}:\n{message}") + { + _pos = position; + } + + public ExpException(ExpSyntaxNode node, string message) + : base( + $"Express compile error at {node.Source.Line}-{node.Source.Column}:\n{message}") + { + _pos = node._source; + } + + } + + public class ExpInvalidCharException : ExpException + { + + public ExpInvalidCharException(char c) : base($"An unknown char {c} occurred.") { } + + public ExpInvalidCharException(int index) : base($"Cannot read a token from line at {index}") { } + + } + + public class ExpStringNotCloseException : ExpException + { + + public ExpStringNotCloseException(int linenum) : base($"A string does not closed at end of line {linenum}.") { } + + } + + public class ExpInvalidSyntaxException : ExpException + { + + public ExpInvalidSyntaxException(string message) : base(message) { } + + public static void ThrowNonCollectionIndex(Token t) + { + throw new ExpInvalidSyntaxException( + $"Use a collection indexer to a non-collection variable at line {t.Line} column {t.Column}"); + } + + public static void ThrowNoOperator(Token t) + { + throw new ExpInvalidSyntaxException( + $"No operator but more than one operand before line {t.Line} column {t.Column}"); + } + + } + + public class ExpInvalidElementDeclareEndingExceptions : ExpException + { + + public ExpInvalidElementDeclareEndingExceptions(string declaredName, string endedName) + : base( + $"The datatype is declared with name {declaredName} but ended with {endedName}") { } + + } + + public class ExpInvalidElementNameException : ExpException + { + + public ExpInvalidElementNameException(string elementName, ExpSchema schema) + : base($"Cannot find any element named {elementName} in {schema.Name}") { } + + } + + public class ExpInvalidTypeException : ExpException + { + + public ExpInvalidTypeException(ExpSyntaxNode node, string required, string provided) + : base( + node, + $"Type {required} is required at position, but a {provided} instance is provided.") { } + + public ExpInvalidTypeException(Token t, string required, string provided) + : base( + t, + $"Type {required} is required at position, but a {provided} instance is provided.") { } + + } + + public class ExpCaseNotFoundException : ArgumentOutOfRangeException + { + + public ExpCaseNotFoundException(ExpSwitchNode token, ExpSyntaxNode label) + : base( + $"Attempt to read or write the label at ({token.Line},{token.Column}), that does not exist in SWITCH expression at ({token.Line},{token.Column})") { } + + } + + public class ExpInvalidCollectionMemberTypeException : InvalidCastException + { + + public ExpInvalidCollectionMemberTypeException(ExpElementInstance elementInstance, ExpCollectionBase collection) + : base( + $"Attempt to add or remove an element of type: {elementInstance.ElementType} from a collection collects {collection.MemberType}") { } + + } + + public class ExpInvalidSchemaIncludeException : InvalidOperationException + { + + public ExpInvalidSchemaIncludeException(ExpSchema context, ExpSchema source) + : base( + $"Attempted to refer to an EXPRESS language expression in the current schema context '{context.Name}', but this expression comes from another schema '{source.Name}' that has not been included.") { } + + } + + public class ExpElementLoadException : TypeLoadException + { + + public ExpElementLoadException(string typeName, ExpSchema context) + : base( + $"Cannot find the element {typeName} in schema {context.Name} and its included schemas") { } + + } + + public class ExpCompileNotInitializedException : InvalidOperationException + { + + public ExpCompileNotInitializedException() + : base("Attempt to compile an EXPRESS script before the init of compiler.") { } + + } + + public class ExpCompileException : ExpException + { + + public ExpCompileException(Token pos, string message) + : base( + $"Compiler exception occur when processing token at line {pos.Line}, column {pos.Column}. Detailed message:{Environment.NewLine}{message} ") { } + + } +} diff --git a/StgSharp.Script/Express/ExpNodeFlag.cs b/StgSharp.Script/Express/ExpNodeFlag.cs index 1762763d..9d85bab4 100644 --- a/StgSharp.Script/Express/ExpNodeFlag.cs +++ b/StgSharp.Script/Express/ExpNodeFlag.cs @@ -1,121 +1,121 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpNodeFlag" -// 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 System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Script.Express -{ - [EditorBrowsable(EditorBrowsableState.Never)] - public static class ExpNodeFlagHelper - { - - public static bool IsInFlag(this ExpNodeFlag flag, long target) - { - return ((long)flag & target) != 0; - } - - public static bool IsInFlag(this ExpNodeFlag flag, ExpNodeFlag target) - { - return (long)(flag & target) != 0; - } - - public static bool IsNotInFlag(this ExpNodeFlag flag, long target) - { - return ((long)flag & target) == 0; - } - - public static bool IsNotInFlag(this ExpNodeFlag flag, ExpNodeFlag target) - { - return (long)(flag & target) == 0; - } - - } - - [Flags] - public enum ExpNodeFlag : long - { - - // string as name of non-builtin variables - None = 0, - Name_Element = 1, - Name_Param = 2, - Name_Block = 4, - Name_Keyword = 8, - Name_Operator = 16, - Name_Any = Name_Block | Name_Element | Name_Keyword | Name_Param | Name_Operator, - - // any type of collections, also has NAME flag - Collection_Set = 32, - Collection_Bag = 64, - Collection_Array = 128, - Collection_List = 256, - Collection_Any = Collection_Set | Collection_Bag | Collection_Array | Collection_List, - - // the variable is type of element, both builtin and non-builtin has this flag - Element_Const = 512, - Element_Entity = 1024, - Element_Type = 2048, - Element_Rule = 4096, - Element_Function = 8192, - Element_Any = Element_Entity | Element_Const | Element_Function | Element_Rule | Element_Type, - - // variable is one of these builtin type - BuiltinType_Int = 16384, - BuiltinType_Real = 32768, - BuiltinType_String = 65536, - BuiltinType_Boolean = 0x2000, - BuiltinType_Binary = 0x4000, - BuiltinType_Logic = 0x8000, - BuiltinType_Number = BuiltinType_Real | BuiltinType_Int, - BuiltinType_Any = BuiltinType_Int | BuiltinType_Real | BuiltinType_String | BuiltinType_Boolean | BuiltinType_Binary | BuiltinType_Logic, - - // the token is root of a branch - Branch_If = 0x1_000, - Branch_Switch = 0x2_0000, - Branch_Repeat = 0x4_0000, - Branch_Any = Branch_If | Branch_Repeat | Branch_Switch, - - // the token is one of separators - Separator_Inline = 0x8_0000, //, or sth else - Separator_Line = 0x10_0000, //; or eth else - Separator_Block = 0x20_0000, //{}or sth else - Separator_Range = 0x40_0000, //()or sth else - Separator_Any = Separator_Inline | Separator_Line | Separator_Block | Separator_Range, - - // the token is a kind of operator - Operator_Unary = 0x40_0000, - Operator_Binary = 0x80_0000, - Operator_SuperType = 0x100_0000, - Operator_Any = Operator_Unary | Operator_Binary | Operator_SuperType, - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpNodeFlag" +// 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 System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Script.Express +{ + [EditorBrowsable(EditorBrowsableState.Never)] + public static class ExpNodeFlagHelper + { + + public static bool IsInFlag(this ExpNodeFlag flag, long target) + { + return ((long)flag & target) != 0; + } + + public static bool IsInFlag(this ExpNodeFlag flag, ExpNodeFlag target) + { + return (long)(flag & target) != 0; + } + + public static bool IsNotInFlag(this ExpNodeFlag flag, long target) + { + return ((long)flag & target) == 0; + } + + public static bool IsNotInFlag(this ExpNodeFlag flag, ExpNodeFlag target) + { + return (long)(flag & target) == 0; + } + + } + + [Flags] + public enum ExpNodeFlag : long + { + + // string as name of non-builtin variables + None = 0, + Name_Element = 1, + Name_Param = 2, + Name_Block = 4, + Name_Keyword = 8, + Name_Operator = 16, + Name_Any = Name_Block | Name_Element | Name_Keyword | Name_Param | Name_Operator, + + // any type of collections, also has NAME flag + Collection_Set = 32, + Collection_Bag = 64, + Collection_Array = 128, + Collection_List = 256, + Collection_Any = Collection_Set | Collection_Bag | Collection_Array | Collection_List, + + // the variable is type of element, both builtin and non-builtin has this flag + Element_Const = 512, + Element_Entity = 1024, + Element_Type = 2048, + Element_Rule = 4096, + Element_Function = 8192, + Element_Any = Element_Entity | Element_Const | Element_Function | Element_Rule | Element_Type, + + // variable is one of these builtin type + BuiltinType_Int = 16384, + BuiltinType_Real = 32768, + BuiltinType_String = 65536, + BuiltinType_Boolean = 0x2000, + BuiltinType_Binary = 0x4000, + BuiltinType_Logic = 0x8000, + BuiltinType_Number = BuiltinType_Real | BuiltinType_Int, + BuiltinType_Any = BuiltinType_Int | BuiltinType_Real | BuiltinType_String | BuiltinType_Boolean | BuiltinType_Binary | BuiltinType_Logic, + + // the token is root of a branch + Branch_If = 0x1_000, + Branch_Switch = 0x2_0000, + Branch_Repeat = 0x4_0000, + Branch_Any = Branch_If | Branch_Repeat | Branch_Switch, + + // the token is one of separators + Separator_Inline = 0x8_0000, //, or sth else + Separator_Line = 0x10_0000, //; or eth else + Separator_Block = 0x20_0000, //{}or sth else + Separator_Range = 0x40_0000, //()or sth else + Separator_Any = Separator_Inline | Separator_Line | Separator_Block | Separator_Range, + + // the token is a kind of operator + Operator_Unary = 0x40_0000, + Operator_Binary = 0x80_0000, + Operator_SuperType = 0x100_0000, + Operator_Any = Operator_Unary | Operator_Binary | Operator_SuperType, + + } +} diff --git a/StgSharp.Script/Express/ExpNodeTempEnumerator.cs b/StgSharp.Script/Express/ExpNodeTempEnumerator.cs index e2ff0b4d..10ffe319 100644 --- a/StgSharp.Script/Express/ExpNodeTempEnumerator.cs +++ b/StgSharp.Script/Express/ExpNodeTempEnumerator.cs @@ -1,194 +1,194 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpNodeTempEnumerator" -// 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 Microsoft.CodeAnalysis.CSharp.Syntax; - -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Script.Express -{ - public static class ExpNodeNextEnumeratorExtensions - { - - public static ExpNodeTempEnumerator AsCollectionEnumerator(this ExpSyntaxNode token, bool unpack) - { - ExpNodeTempEnumerator enumerator = new ExpNodeTempEnumerator(token, unpack); - IExpElementSource type = token.EqualityTypeConvert; - while (enumerator.MoveNext()) - { - if (enumerator. Current != type) { - throw new InvalidCastException(); - } - } - return enumerator; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ExpNodePresidentEnumerator ToPresidentEnumerator(this ExpSyntaxNode node) - { - return new ExpNodePresidentEnumerator(node); - } - - public static ExpNodePresidentEnumerator TupleToPresidentEnumerator(this ExpSyntaxNode tuple) - { - return new ExpNodePresidentEnumerator(tuple.Right); - } - - } - - public class ExpNodePresidentEnumerator : IEnumerator - { - - private int _index = -1; - private List _begin = new List(); - - public ExpNodePresidentEnumerator(ExpSyntaxNode token) - { - _begin.Add(token); - ExpSyntaxNode t = token; - while (!ReferenceEquals(t.Next, token) && t.Next != null) - { - t = t.Next; - _begin.Add(t); - } - } - - public ExpSyntaxNode this[int index] - { - get - { - ArgumentOutOfRangeException.ThrowIfNegative(index); - ArgumentOutOfRangeException.ThrowIfGreaterThan(index, _begin.Count); - return _begin[index]; - } - } - - public ExpSyntaxNode Current => _begin[_index]; - - public int Count => _begin.Count; - - public void AssertEnumeratorCount(int count) - { - if (_begin.Count != count) { - throw new InvalidOperationException( - $"Enumerator count mismatch. Expected {count}, but got {_begin.Count}."); - } - } - - public void AssertEnumeratorCount(int min, int max) - { - if (_begin.Count < min || _begin.Count > max) { - throw new InvalidOperationException( - $"Enumerator count mismatch. Expected between {min} and {max}, but got {_begin.Count}."); - } - } - - public Span AsSpan() - { - return CollectionsMarshal.AsSpan(_begin); - } - - public void Dispose() - { - return; - } - - public bool MoveNext() - { - if (_index < _begin.Count - 1) - { - _index++; - return true; - } - return false; - } - - public void Reset() - { - _index = -1; - } - - object IEnumerator.Current => this.Current; - - } - - public class ExpNodeTempEnumerator : IEnumerator - { - - private ExpSyntaxNode? _current,_begin; - - public ExpNodeTempEnumerator(ExpSyntaxNode node) - { - _current = null; - _begin = node; - } - - public ExpNodeTempEnumerator(ExpSyntaxNode node, bool unpack) - { - _current = null; - _begin = unpack ? node.Right : node; - } - - public ExpSyntaxNode Current => _current!; - - public bool MoveNext() - { - if (_current == null) - { - _current = _begin; - return true; - } - ExpSyntaxNode next = _current.Next; - if (ReferenceEquals(next, _begin) || next == null) { - return false; - } - _current = next; - return true; - } - - void IDisposable.Dispose() - { - return; - } - - void IEnumerator.Reset() - { - _current = null; - } - - object IEnumerator.Current => _current; - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpNodeTempEnumerator" +// 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 Microsoft.CodeAnalysis.CSharp.Syntax; + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Script.Express +{ + public static class ExpNodeNextEnumeratorExtensions + { + + public static ExpNodeTempEnumerator AsCollectionEnumerator(this ExpSyntaxNode token, bool unpack) + { + ExpNodeTempEnumerator enumerator = new ExpNodeTempEnumerator(token, unpack); + IExpElementSource type = token.EqualityTypeConvert; + while (enumerator.MoveNext()) + { + if (enumerator. Current != type) { + throw new InvalidCastException(); + } + } + return enumerator; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ExpNodePresidentEnumerator ToPresidentEnumerator(this ExpSyntaxNode node) + { + return new ExpNodePresidentEnumerator(node); + } + + public static ExpNodePresidentEnumerator TupleToPresidentEnumerator(this ExpSyntaxNode tuple) + { + return new ExpNodePresidentEnumerator(tuple.Right); + } + + } + + public class ExpNodePresidentEnumerator : IEnumerator + { + + private int _index = -1; + private List _begin = new List(); + + public ExpNodePresidentEnumerator(ExpSyntaxNode token) + { + _begin.Add(token); + ExpSyntaxNode t = token; + while (!ReferenceEquals(t.Next, token) && t.Next != null) + { + t = t.Next; + _begin.Add(t); + } + } + + public ExpSyntaxNode this[int index] + { + get + { + ArgumentOutOfRangeException.ThrowIfNegative(index); + ArgumentOutOfRangeException.ThrowIfGreaterThan(index, _begin.Count); + return _begin[index]; + } + } + + public ExpSyntaxNode Current => _begin[_index]; + + public int Count => _begin.Count; + + public void AssertEnumeratorCount(int count) + { + if (_begin.Count != count) { + throw new InvalidOperationException( + $"Enumerator count mismatch. Expected {count}, but got {_begin.Count}."); + } + } + + public void AssertEnumeratorCount(int min, int max) + { + if (_begin.Count < min || _begin.Count > max) { + throw new InvalidOperationException( + $"Enumerator count mismatch. Expected between {min} and {max}, but got {_begin.Count}."); + } + } + + public Span AsSpan() + { + return CollectionsMarshal.AsSpan(_begin); + } + + public void Dispose() + { + return; + } + + public bool MoveNext() + { + if (_index < _begin.Count - 1) + { + _index++; + return true; + } + return false; + } + + public void Reset() + { + _index = -1; + } + + object IEnumerator.Current => this.Current; + + } + + public class ExpNodeTempEnumerator : IEnumerator + { + + private ExpSyntaxNode? _current,_begin; + + public ExpNodeTempEnumerator(ExpSyntaxNode node) + { + _current = null; + _begin = node; + } + + public ExpNodeTempEnumerator(ExpSyntaxNode node, bool unpack) + { + _current = null; + _begin = unpack ? node.Right : node; + } + + public ExpSyntaxNode Current => _current!; + + public bool MoveNext() + { + if (_current == null) + { + _current = _begin; + return true; + } + ExpSyntaxNode next = _current.Next; + if (ReferenceEquals(next, _begin) || next == null) { + return false; + } + _current = next; + return true; + } + + void IDisposable.Dispose() + { + return; + } + + void IEnumerator.Reset() + { + _current = null; + } + + object IEnumerator.Current => _current; + + } +} diff --git a/StgSharp.Script/Express/ExpPostProcessor.cs b/StgSharp.Script/Express/ExpPostProcessor.cs index 10b32c9e..ab1af4a5 100644 --- a/StgSharp.Script/Express/ExpPostProcessor.cs +++ b/StgSharp.Script/Express/ExpPostProcessor.cs @@ -1,105 +1,105 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpPostProcessor" -// 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 Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp; -using Microsoft.CodeAnalysis.CSharp.Syntax; - -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; - -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Script.Express -{ - public class ExpPostProcessor - { - - private readonly string _interfaceName /*= typeof( )/**/; - private readonly string _sourcePath; - - public string Process(string filePath) - { - Dictionary factoryMethods = new Dictionary(); - - FileStream file = File.OpenRead(filePath); - SyntaxTree syntaxTree = CSharpSyntaxTree.ParseText(File.ReadAllText(filePath)); - - CSharpCompilation compilation = CSharpCompilation.Create("Analysis") - .AddSyntaxTrees(syntaxTree) - .AddReferences( - MetadataReference.CreateFromFile( - typeof(object).Assembly.Location)); - - INamedTypeSymbol? interfaceSymbol = compilation.GetTypeByMetadataName(_interfaceName); - - if (interfaceSymbol == null) { - throw new InvalidOperationException($"Interface '{_interfaceName}' not found."); - } - - SemanticModel semanticModel = compilation.GetSemanticModel(syntaxTree); - SyntaxNode root = syntaxTree.GetRoot(); - - IEnumerable classDeclarations = root.DescendantNodes() - .OfType( - ) - .Where( - cls => cls.BaseList?.Types.Any( - t => SymbolEqualityComparer.Default - .Equals( - semanticModel.GetTypeInfo( - t.Type) - .Type, - interfaceSymbol)) ?? - false); - - foreach (ClassDeclarationSyntax classDeclaration in classDeclarations) - { - string className = classDeclaration.Identifier.Text; - IMethodSymbol? factoryMethod = interfaceSymbol.GetMembers() - .OfType() - .FirstOrDefault( - m => m.IsStatic && m.Name == "CreateInstance"); - - if (factoryMethod != null) { - factoryMethods[className] = $"() => {interfaceSymbol.Name}.CreateInstance()"; - } - } - - string code = "var factoryMethods = new Dictionary>\n{\n"; - code += string.Join( - ",\n", factoryMethods.Select(kvp => $" {{ \"{kvp.Key}\", {kvp.Value} }}")); - code += "\n};"; - - return code; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpPostProcessor" +// 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 Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; + +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Script.Express +{ + public class ExpPostProcessor + { + + private readonly string _interfaceName /*= typeof( )/**/; + private readonly string _sourcePath; + + public string Process(string filePath) + { + Dictionary factoryMethods = new Dictionary(); + + FileStream file = File.OpenRead(filePath); + SyntaxTree syntaxTree = CSharpSyntaxTree.ParseText(File.ReadAllText(filePath)); + + CSharpCompilation compilation = CSharpCompilation.Create("Analysis") + .AddSyntaxTrees(syntaxTree) + .AddReferences( + MetadataReference.CreateFromFile( + typeof(object).Assembly.Location)); + + INamedTypeSymbol? interfaceSymbol = compilation.GetTypeByMetadataName(_interfaceName); + + if (interfaceSymbol == null) { + throw new InvalidOperationException($"Interface '{_interfaceName}' not found."); + } + + SemanticModel semanticModel = compilation.GetSemanticModel(syntaxTree); + SyntaxNode root = syntaxTree.GetRoot(); + + IEnumerable classDeclarations = root.DescendantNodes() + .OfType( + ) + .Where( + cls => cls.BaseList?.Types.Any( + t => SymbolEqualityComparer.Default + .Equals( + semanticModel.GetTypeInfo( + t.Type) + .Type, + interfaceSymbol)) ?? + false); + + foreach (ClassDeclarationSyntax classDeclaration in classDeclarations) + { + string className = classDeclaration.Identifier.Text; + IMethodSymbol? factoryMethod = interfaceSymbol.GetMembers() + .OfType() + .FirstOrDefault( + m => m.IsStatic && m.Name == "CreateInstance"); + + if (factoryMethod != null) { + factoryMethods[className] = $"() => {interfaceSymbol.Name}.CreateInstance()"; + } + } + + string code = "var factoryMethods = new Dictionary>\n{\n"; + code += string.Join( + ",\n", factoryMethods.Select(kvp => $" {{ \"{kvp.Key}\", {kvp.Value} }}")); + code += "\n};"; + + return code; + } + + } +} diff --git a/StgSharp.Script/Express/ExpSchemaBase.cs b/StgSharp.Script/Express/ExpSchemaBase.cs index 7b8bdcfe..ffcb062a 100644 --- a/StgSharp.Script/Express/ExpSchemaBase.cs +++ b/StgSharp.Script/Express/ExpSchemaBase.cs @@ -1,85 +1,85 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpSchemaBase" -// 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.Collections; - -using System; -using System.Collections; -using System.Collections.Concurrent; -using System.Collections.Frozen; -using System.Collections.Generic; -using System.Linq; - -namespace StgSharp.Script.Express -{ - public abstract class ExpSchema - { - - public static ExpSchema BuiltinSchema - { - get => ExpSchema_Builtin.Only; - } - - public string Name { get; internal set; } - - public abstract void LoadFromSource(ExpSchemaSource source); - - public abstract bool TryGetConst(string name, out ExpElementInstance c); - - public abstract bool TryGetEntity(string name, out ExpEntitySource e); - - public abstract bool TryGetFunction(string name, out ExpFunctionSource f); - - public abstract bool TryGetProcedure(string name, out ExpProcedureSource p); - - public abstract bool TryGetRule(string name, out ExpRuleSource r); - - public abstract bool TryGetSchemaInclude(string name, out ExpSchema include); - - public abstract bool TryGetType(string name, out ExpTypeSource t); - - #pragma warning disable CS8618 - protected FrozenDictionary ConstDict { get; set; } - - public IEnumerable IncludedSchema => IncludedSchema; - - protected FrozenDictionary EntityDict { get; set; } - - protected FrozenDictionary FunctionDict { get; set; } - - protected ConcurrentStringHashMultiplexer StringMultiplexer => ExpressCompile.Multiplexer; - - protected ConcurrentDictionary ProcedureDict { get; set; } - - protected FrozenDictionary RuleDict { get; set; } - - protected FrozenDictionary SchemaInclude { get; set; } - - protected FrozenDictionary TypeDict { get; set; } -#pragma warning restore CS8618 - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpSchemaBase" +// 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.Collections; + +using System; +using System.Collections; +using System.Collections.Concurrent; +using System.Collections.Frozen; +using System.Collections.Generic; +using System.Linq; + +namespace StgSharp.Script.Express +{ + public abstract class ExpSchema + { + + public static ExpSchema BuiltinSchema + { + get => ExpSchema_Builtin.Only; + } + + public string Name { get; internal set; } + + public abstract void LoadFromSource(ExpSchemaSource source); + + public abstract bool TryGetConst(string name, out ExpElementInstance c); + + public abstract bool TryGetEntity(string name, out ExpEntitySource e); + + public abstract bool TryGetFunction(string name, out ExpFunctionSource f); + + public abstract bool TryGetProcedure(string name, out ExpProcedureSource p); + + public abstract bool TryGetRule(string name, out ExpRuleSource r); + + public abstract bool TryGetSchemaInclude(string name, out ExpSchema include); + + public abstract bool TryGetType(string name, out ExpTypeSource t); + + #pragma warning disable CS8618 + protected FrozenDictionary ConstDict { get; set; } + + public IEnumerable IncludedSchema => IncludedSchema; + + protected FrozenDictionary EntityDict { get; set; } + + protected FrozenDictionary FunctionDict { get; set; } + + protected ConcurrentStringHashMultiplexer StringMultiplexer => ExpressCompile.Multiplexer; + + protected ConcurrentDictionary ProcedureDict { get; set; } + + protected FrozenDictionary RuleDict { get; set; } + + protected FrozenDictionary SchemaInclude { get; set; } + + protected FrozenDictionary TypeDict { get; set; } +#pragma warning restore CS8618 + } +} diff --git a/StgSharp.Script/Express/ExpSchemaSource.Compile.cs b/StgSharp.Script/Express/ExpSchemaSource.Compile.cs index ed2bf47a..96195e09 100644 --- a/StgSharp.Script/Express/ExpSchemaSource.Compile.cs +++ b/StgSharp.Script/Express/ExpSchemaSource.Compile.cs @@ -1,69 +1,69 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpSchemaSource.Compile" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Script.Express -{ - public enum ExpressCompileOption - { - - Default = 0, - Translate = 1, - Compile = 2, - - } - - public partial class ExpSchemaSource - { - - public ExpSchema Compile(ExpressCompileOption option) - { - switch (option) - { - case ExpressCompileOption.Default: - return Compile_Translate(option); - case ExpressCompileOption.Translate: - return Compile_Translate(option); - case ExpressCompileOption.Compile: - throw new NotSupportedException(); - default: - throw new ArgumentException(); - } - } - - internal GeneratedExpSchema Compile_Translate(ExpressCompileOption option) - { - throw new NotImplementedException(); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpSchemaSource.Compile" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Script.Express +{ + public enum ExpressCompileOption + { + + Default = 0, + Translate = 1, + Compile = 2, + + } + + public partial class ExpSchemaSource + { + + public ExpSchema Compile(ExpressCompileOption option) + { + switch (option) + { + case ExpressCompileOption.Default: + return Compile_Translate(option); + case ExpressCompileOption.Translate: + return Compile_Translate(option); + case ExpressCompileOption.Compile: + throw new NotSupportedException(); + default: + throw new ArgumentException(); + } + } + + internal GeneratedExpSchema Compile_Translate(ExpressCompileOption option) + { + throw new NotImplementedException(); + } + + } +} diff --git a/StgSharp.Script/Express/ExpSchemaSource.cs b/StgSharp.Script/Express/ExpSchemaSource.cs index b4013cc8..3a9e5b66 100644 --- a/StgSharp.Script/Express/ExpSchemaSource.cs +++ b/StgSharp.Script/Express/ExpSchemaSource.cs @@ -1,329 +1,329 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpSchemaSource" -// 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.Collections; -using StgSharp.Graphics.OpenGL; - -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Diagnostics; -using System.Diagnostics.Tracing; -using System.Text; -using System.Text.RegularExpressions; - -namespace StgSharp.Script.Express -{ - public partial class ExpSchemaSource - { - - private static Regex - _constDefineBegin = GetConstDefineBegin(), - _constDefineEnd = GetConstDefineEnd(), - _schemaBegin = GetSchemaBegin(), - _schemaEnd = GetSchemaEnd(), - _entityDefineBegin = GetEntityDefineBegin(), - _entityDefineEnd = GetEntityDefineEnd(), - _typeDefineBegin = GetTypeDefineBegin(), - _typeDefineEnd = GetTypeDefineEnd(), - _functionDefineBegin = GetFunctionDefineBegin(), - _functionDefineEnd = GetFunctionDefineEnd(), - _ruleDefineBegin = GetRuleDefineBegin(), - _ruleDefineEnd = GetRuleDefineEnd(); - - private readonly GeneratedExpSchema _compileResult = new GeneratedExpSchema(); - - private List _sourceCache = []; - - private string name; - - public ExpSchemaSource() { } - - public List Cache - { - get => _sourceCache; - } - - public string Name - { - get => _compileResult.Name; - internal set => _compileResult.Name = value; - } - - public ExpSchema Organize() - { - _compileResult.LoadFromSource(this); - return _compileResult; - } - - public void ReadSchema(ExpFileSource reader) - { - string line = reader.ReadLine(); - while (!_schemaBegin.IsMatch(line)) { - line = reader.ReadLine(); - } - name = _schemaBegin.Match(line).Groups["namespace"].Value; - - while (!_schemaEnd.IsMatch(line)) - { - if (TryReadConst(line, reader, out IExpElementSource source)) - { - _sourceCache.Add(source); - } else if (TryReadType(line, reader, out source)) - { - _sourceCache.Add(source); - } else if (TryReadEntity(line, reader, out source)) - { - _sourceCache.Add(source); - } else if (TryReadRule(line, reader, out source)) - { - _sourceCache.Add(source); - } else if (TryReadFunction(line, reader, out source)) { - _sourceCache.Add(source); - } - line = reader.ReadLine(); - } - } - - public static bool TryReadSchema(string firstLine, ExpFileSource reader, out ExpSchemaSource source) - { - if (!_schemaBegin.IsMatch(firstLine)) - { - source = null!; - return false; - } - ExpSchemaSource _source = new ExpSchemaSource(); - _source.name = _schemaBegin.Match(firstLine).Groups["namespace"].Value; - - while (!_schemaEnd.IsMatch(firstLine)) - { - if (_source.TryReadConst(firstLine, reader, - out IExpElementSource _elementSource)) - { - _source._sourceCache.Add(_elementSource); - } else if (_source.TryReadType(firstLine, reader, out _elementSource)) - { - _source._sourceCache.Add(_elementSource); - } else if (_source.TryReadEntity(firstLine, reader, out _elementSource)) - { - _source._sourceCache.Add(_elementSource); - } else if (_source.TryReadRule(firstLine, reader, out _elementSource)) - { - _source._sourceCache.Add(_elementSource); - } else if (_source.TryReadFunction(firstLine, reader, out _elementSource)) { - _source._sourceCache.Add(_elementSource); - } - firstLine = reader.ReadLine(); - } - source = _source; - return true; - } - - [GeneratedRegex(@"\s*CONSTANT")] - private static partial Regex GetConstDefineBegin(); - - [GeneratedRegex(@"\s*END_CONSTANT;")] - private static partial Regex GetConstDefineEnd(); - - [GeneratedRegex(@"\s*ENTITY\s*(?[A-Za-z0-9_]+)\s*", RegexOptions.Compiled)] - private static partial Regex GetEntityDefineBegin(); - - [GeneratedRegex(@"\s*END_ENTITY;\s*--\s*(?[A-Za-z0-9_]+)\s*", RegexOptions.Compiled)] - private static partial Regex GetEntityDefineEnd(); - - [GeneratedRegex(@"\s*FUNCTION\s*\s*(?[a-zA-Z0-9_]+)\s*(?.*)", RegexOptions.Compiled)] - private static partial Regex GetFunctionDefineBegin(); - - [GeneratedRegex(@"\s*END_FUNCTION\s*;\s*--\s*(?[a-zA-Z0-9_]+)", RegexOptions.Compiled)] - private static partial Regex GetFunctionDefineEnd(); - - [GeneratedRegex( - @"\s*RULE\s*(?[a-zA-Z0-9_]+)\s*FOR\s*\((?[a-zA-Z0-9_]*(?:\s*\)\s*;)?)", - RegexOptions.Compiled)] - private static partial Regex GetRuleDefineBegin(); - - [GeneratedRegex(@"\s*END_RULE\s*;\s*--\s*(?[A-Za-z0-9_]+)", RegexOptions.Compiled)] - private static partial Regex GetRuleDefineEnd(); - - [GeneratedRegex(@"\s*SCHEMA\s*(?[A-Za-z0-9_]+)\s?;")] - private static partial Regex GetSchemaBegin(); - - [GeneratedRegex(@"END_SCHEMA;\s*--\s*(?[A-Za-z0-9_]+)", RegexOptions.Compiled)] - private static partial Regex GetSchemaEnd(); - - [GeneratedRegex(@"\s*TYPE\s+(?[A-Za-z0-9_]+)\s*=\s*(?[A-Z]+)", RegexOptions.Compiled)] - private static partial Regex GetTypeDefineBegin(); - - [GeneratedRegex(@"\s*END_TYPE\s*;\s*--\s*(?[a-zA-Z0-9_]+)", RegexOptions.Compiled)] - private static partial Regex GetTypeDefineEnd(); - - private bool TryReadConst(string firstLine, ExpFileSource reader, out IExpElementSource source) - { - Match match = _constDefineBegin.Match(firstLine); - if (match.Success) - { - ScriptSourceTransmitter transmitter = new ScriptSourceTransmitter( - "END_CONSTANT", reader.Location); - ExpConstantCollectionSource _source = new ExpConstantCollectionSource(transmitter); - string line = reader.ReadLine(); - while (!_constDefineEnd.IsMatch(line)) - { - transmitter.WriteLine(line); - line = reader.ReadLine(); - } - transmitter.WriteLine("END_CONSTANT"); - source = _source; - return true; - } - source = null!; - return false; - } - - private bool TryReadEntity(string firstLine, ExpFileSource reader, out IExpElementSource source) - { - Match match = _entityDefineBegin.Match(firstLine); - if (match.Success) - { - ScriptSourceTransmitter transmitter = new ScriptSourceTransmitter( - "END_ENTITY", reader.Location); - ExpEntitySource _source = new ExpEntitySource( - match.Groups["TypeName"].ToString(), transmitter); - string line = reader.ReadLine(); - match = _entityDefineEnd.Match(line); - while (!match.Success) - { - transmitter.WriteLine(line); - line = reader.ReadLine(); - match = _entityDefineEnd.Match(line); - } - string endedName = match.Groups["TypeName"].ToString(); - if (!string.Equals(endedName, _source.Name)) { - throw new ExpInvalidElementDeclareEndingExceptions(_source.Name, endedName); - } - transmitter.WriteLine("END_ENTITY"); - source = _source; - return true; - } - source = null!; - return false; - } - - private bool TryReadFunction(string firstLine, ExpFileSource reader, out IExpElementSource source) - { - Match match = _functionDefineBegin.Match(firstLine); - if (match.Success) - { - ScriptSourceTransmitter transmitter = new ScriptSourceTransmitter( - "END_FUNCTION", reader.Location); - ExpFunctionSource _source = new ExpFunctionSource( - match.Groups["FunctionName"].ToString(), transmitter); - transmitter.WriteLine(match.Groups["Remaining"].ToString()); - string line = reader.ReadLine(); - match = _functionDefineEnd.Match(line); - while (!match.Success) - { - transmitter.WriteLine(line); - line = reader.ReadLine(); - match = _functionDefineEnd.Match(line); - } - string endedName = match.Groups["FunctionName"].ToString(); - if (!string.Equals(endedName, _source.Name)) { - throw new ExpInvalidElementDeclareEndingExceptions(_source.Name, endedName); - } - transmitter.WriteLine("END_FUNCTION"); - source = _source; - return true; - } - source = null!; - return false; - } - - private bool TryReadRule(string firstLine, ExpFileSource reader, out IExpElementSource source) - { - Match match = _ruleDefineBegin.Match(firstLine); - if (match.Success) - { - ScriptSourceTransmitter transmitter = new ScriptSourceTransmitter( - "END_RULE", reader.Location); - ExpRuleSource _source = new ExpRuleSource( - match.Groups["RuleName"].ToString(), transmitter); - string target = match.Groups["Target"].ToString(); - if (!string.IsNullOrEmpty(target)) { - transmitter.WriteLine(target); - } - string line = reader.ReadLine(); - match = _ruleDefineEnd.Match(line); - while (!match.Success) - { - transmitter.WriteLine(line); - line = reader.ReadLine(); - match = _ruleDefineEnd.Match(line); - } - string endedName = match.Groups["RuleName"].ToString(); - if (!string.Equals(endedName, _source.Name)) { - throw new ExpInvalidElementDeclareEndingExceptions(_source.Name, endedName); - } - transmitter.WriteLine("END_RULE"); - source = _source; - return true; - } - source = null!; - return false; - } - - private bool TryReadType(string firstLine, ExpFileSource reader, out IExpElementSource source) - { - Match match = _typeDefineBegin.Match(firstLine); - if (match.Success) - { - ScriptSourceTransmitter transmitter = new ScriptSourceTransmitter( - "END_ENTITY", reader.Location); - ExpTypeSource _source = new ExpTypeSource( - match.Groups["TypeName"].ToString(), transmitter); - transmitter.WriteLine(match.Groups["Remaining"].ToString()); - string line = reader.ReadLine(); - match = _typeDefineEnd.Match(line); - while (!match.Success) - { - transmitter.WriteLine(line); - line = reader.ReadLine(); - match = _typeDefineEnd.Match(line); - } - string endedName = match.Groups["TypeName"].ToString(); - if (!string.Equals(endedName, _source.Name)) { - throw new ExpInvalidElementDeclareEndingExceptions(_source.Name, endedName); - } - transmitter.WriteLine("END_ENTITY"); - source = _source; - return true; - } - source = null!; - return false; - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpSchemaSource" +// 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.Collections; +using StgSharp.Graphics.OpenGL; + +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Diagnostics; +using System.Diagnostics.Tracing; +using System.Text; +using System.Text.RegularExpressions; + +namespace StgSharp.Script.Express +{ + public partial class ExpSchemaSource + { + + private static Regex + _constDefineBegin = GetConstDefineBegin(), + _constDefineEnd = GetConstDefineEnd(), + _schemaBegin = GetSchemaBegin(), + _schemaEnd = GetSchemaEnd(), + _entityDefineBegin = GetEntityDefineBegin(), + _entityDefineEnd = GetEntityDefineEnd(), + _typeDefineBegin = GetTypeDefineBegin(), + _typeDefineEnd = GetTypeDefineEnd(), + _functionDefineBegin = GetFunctionDefineBegin(), + _functionDefineEnd = GetFunctionDefineEnd(), + _ruleDefineBegin = GetRuleDefineBegin(), + _ruleDefineEnd = GetRuleDefineEnd(); + + private readonly GeneratedExpSchema _compileResult = new GeneratedExpSchema(); + + private List _sourceCache = []; + + private string name; + + public ExpSchemaSource() { } + + public List Cache + { + get => _sourceCache; + } + + public string Name + { + get => _compileResult.Name; + internal set => _compileResult.Name = value; + } + + public ExpSchema Organize() + { + _compileResult.LoadFromSource(this); + return _compileResult; + } + + public void ReadSchema(ExpFileSource reader) + { + string line = reader.ReadLine(); + while (!_schemaBegin.IsMatch(line)) { + line = reader.ReadLine(); + } + name = _schemaBegin.Match(line).Groups["namespace"].Value; + + while (!_schemaEnd.IsMatch(line)) + { + if (TryReadConst(line, reader, out IExpElementSource source)) + { + _sourceCache.Add(source); + } else if (TryReadType(line, reader, out source)) + { + _sourceCache.Add(source); + } else if (TryReadEntity(line, reader, out source)) + { + _sourceCache.Add(source); + } else if (TryReadRule(line, reader, out source)) + { + _sourceCache.Add(source); + } else if (TryReadFunction(line, reader, out source)) { + _sourceCache.Add(source); + } + line = reader.ReadLine(); + } + } + + public static bool TryReadSchema(string firstLine, ExpFileSource reader, out ExpSchemaSource source) + { + if (!_schemaBegin.IsMatch(firstLine)) + { + source = null!; + return false; + } + ExpSchemaSource _source = new ExpSchemaSource(); + _source.name = _schemaBegin.Match(firstLine).Groups["namespace"].Value; + + while (!_schemaEnd.IsMatch(firstLine)) + { + if (_source.TryReadConst(firstLine, reader, + out IExpElementSource _elementSource)) + { + _source._sourceCache.Add(_elementSource); + } else if (_source.TryReadType(firstLine, reader, out _elementSource)) + { + _source._sourceCache.Add(_elementSource); + } else if (_source.TryReadEntity(firstLine, reader, out _elementSource)) + { + _source._sourceCache.Add(_elementSource); + } else if (_source.TryReadRule(firstLine, reader, out _elementSource)) + { + _source._sourceCache.Add(_elementSource); + } else if (_source.TryReadFunction(firstLine, reader, out _elementSource)) { + _source._sourceCache.Add(_elementSource); + } + firstLine = reader.ReadLine(); + } + source = _source; + return true; + } + + [GeneratedRegex(@"\s*CONSTANT")] + private static partial Regex GetConstDefineBegin(); + + [GeneratedRegex(@"\s*END_CONSTANT;")] + private static partial Regex GetConstDefineEnd(); + + [GeneratedRegex(@"\s*ENTITY\s*(?[A-Za-z0-9_]+)\s*", RegexOptions.Compiled)] + private static partial Regex GetEntityDefineBegin(); + + [GeneratedRegex(@"\s*END_ENTITY;\s*--\s*(?[A-Za-z0-9_]+)\s*", RegexOptions.Compiled)] + private static partial Regex GetEntityDefineEnd(); + + [GeneratedRegex(@"\s*FUNCTION\s*\s*(?[a-zA-Z0-9_]+)\s*(?.*)", RegexOptions.Compiled)] + private static partial Regex GetFunctionDefineBegin(); + + [GeneratedRegex(@"\s*END_FUNCTION\s*;\s*--\s*(?[a-zA-Z0-9_]+)", RegexOptions.Compiled)] + private static partial Regex GetFunctionDefineEnd(); + + [GeneratedRegex( + @"\s*RULE\s*(?[a-zA-Z0-9_]+)\s*FOR\s*\((?[a-zA-Z0-9_]*(?:\s*\)\s*;)?)", + RegexOptions.Compiled)] + private static partial Regex GetRuleDefineBegin(); + + [GeneratedRegex(@"\s*END_RULE\s*;\s*--\s*(?[A-Za-z0-9_]+)", RegexOptions.Compiled)] + private static partial Regex GetRuleDefineEnd(); + + [GeneratedRegex(@"\s*SCHEMA\s*(?[A-Za-z0-9_]+)\s?;")] + private static partial Regex GetSchemaBegin(); + + [GeneratedRegex(@"END_SCHEMA;\s*--\s*(?[A-Za-z0-9_]+)", RegexOptions.Compiled)] + private static partial Regex GetSchemaEnd(); + + [GeneratedRegex(@"\s*TYPE\s+(?[A-Za-z0-9_]+)\s*=\s*(?[A-Z]+)", RegexOptions.Compiled)] + private static partial Regex GetTypeDefineBegin(); + + [GeneratedRegex(@"\s*END_TYPE\s*;\s*--\s*(?[a-zA-Z0-9_]+)", RegexOptions.Compiled)] + private static partial Regex GetTypeDefineEnd(); + + private bool TryReadConst(string firstLine, ExpFileSource reader, out IExpElementSource source) + { + Match match = _constDefineBegin.Match(firstLine); + if (match.Success) + { + ScriptSourceTransmitter transmitter = new ScriptSourceTransmitter( + "END_CONSTANT", reader.Location); + ExpConstantCollectionSource _source = new ExpConstantCollectionSource(transmitter); + string line = reader.ReadLine(); + while (!_constDefineEnd.IsMatch(line)) + { + transmitter.WriteLine(line); + line = reader.ReadLine(); + } + transmitter.WriteLine("END_CONSTANT"); + source = _source; + return true; + } + source = null!; + return false; + } + + private bool TryReadEntity(string firstLine, ExpFileSource reader, out IExpElementSource source) + { + Match match = _entityDefineBegin.Match(firstLine); + if (match.Success) + { + ScriptSourceTransmitter transmitter = new ScriptSourceTransmitter( + "END_ENTITY", reader.Location); + ExpEntitySource _source = new ExpEntitySource( + match.Groups["TypeName"].ToString(), transmitter); + string line = reader.ReadLine(); + match = _entityDefineEnd.Match(line); + while (!match.Success) + { + transmitter.WriteLine(line); + line = reader.ReadLine(); + match = _entityDefineEnd.Match(line); + } + string endedName = match.Groups["TypeName"].ToString(); + if (!string.Equals(endedName, _source.Name)) { + throw new ExpInvalidElementDeclareEndingExceptions(_source.Name, endedName); + } + transmitter.WriteLine("END_ENTITY"); + source = _source; + return true; + } + source = null!; + return false; + } + + private bool TryReadFunction(string firstLine, ExpFileSource reader, out IExpElementSource source) + { + Match match = _functionDefineBegin.Match(firstLine); + if (match.Success) + { + ScriptSourceTransmitter transmitter = new ScriptSourceTransmitter( + "END_FUNCTION", reader.Location); + ExpFunctionSource _source = new ExpFunctionSource( + match.Groups["FunctionName"].ToString(), transmitter); + transmitter.WriteLine(match.Groups["Remaining"].ToString()); + string line = reader.ReadLine(); + match = _functionDefineEnd.Match(line); + while (!match.Success) + { + transmitter.WriteLine(line); + line = reader.ReadLine(); + match = _functionDefineEnd.Match(line); + } + string endedName = match.Groups["FunctionName"].ToString(); + if (!string.Equals(endedName, _source.Name)) { + throw new ExpInvalidElementDeclareEndingExceptions(_source.Name, endedName); + } + transmitter.WriteLine("END_FUNCTION"); + source = _source; + return true; + } + source = null!; + return false; + } + + private bool TryReadRule(string firstLine, ExpFileSource reader, out IExpElementSource source) + { + Match match = _ruleDefineBegin.Match(firstLine); + if (match.Success) + { + ScriptSourceTransmitter transmitter = new ScriptSourceTransmitter( + "END_RULE", reader.Location); + ExpRuleSource _source = new ExpRuleSource( + match.Groups["RuleName"].ToString(), transmitter); + string target = match.Groups["Target"].ToString(); + if (!string.IsNullOrEmpty(target)) { + transmitter.WriteLine(target); + } + string line = reader.ReadLine(); + match = _ruleDefineEnd.Match(line); + while (!match.Success) + { + transmitter.WriteLine(line); + line = reader.ReadLine(); + match = _ruleDefineEnd.Match(line); + } + string endedName = match.Groups["RuleName"].ToString(); + if (!string.Equals(endedName, _source.Name)) { + throw new ExpInvalidElementDeclareEndingExceptions(_source.Name, endedName); + } + transmitter.WriteLine("END_RULE"); + source = _source; + return true; + } + source = null!; + return false; + } + + private bool TryReadType(string firstLine, ExpFileSource reader, out IExpElementSource source) + { + Match match = _typeDefineBegin.Match(firstLine); + if (match.Success) + { + ScriptSourceTransmitter transmitter = new ScriptSourceTransmitter( + "END_ENTITY", reader.Location); + ExpTypeSource _source = new ExpTypeSource( + match.Groups["TypeName"].ToString(), transmitter); + transmitter.WriteLine(match.Groups["Remaining"].ToString()); + string line = reader.ReadLine(); + match = _typeDefineEnd.Match(line); + while (!match.Success) + { + transmitter.WriteLine(line); + line = reader.ReadLine(); + match = _typeDefineEnd.Match(line); + } + string endedName = match.Groups["TypeName"].ToString(); + if (!string.Equals(endedName, _source.Name)) { + throw new ExpInvalidElementDeclareEndingExceptions(_source.Name, endedName); + } + transmitter.WriteLine("END_ENTITY"); + source = _source; + return true; + } + source = null!; + return false; + } + + } +} diff --git a/StgSharp.Script/Express/ExpSource.cs b/StgSharp.Script/Express/ExpSource.cs index 6a1ef4b4..313a8296 100644 --- a/StgSharp.Script/Express/ExpSource.cs +++ b/StgSharp.Script/Express/ExpSource.cs @@ -1,122 +1,122 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpSource" -// 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 System; -using System.Collections.Generic; -using System.IO; -using System.IO.MemoryMappedFiles; -using System.Text; -using System.Threading; - -namespace StgSharp.Script.Express -{ - public class ExpFileSource : IDisposable, IScriptSourceProvider - { - - private bool disposedValue; - private FileStream _expFileStream; - private int _location; - private MemoryMappedFile _expMemoryMappedFile; - private MemoryMappedViewStream _expMemoryMappedStream; - - private SemaphoreSlim readLineSemaphore = new SemaphoreSlim(1, 1); - private StreamReader _memoryReader; - - public ExpFileSource(string path) - { - if (!File.Exists(path)) { - throw new FileNotFoundException(); - } - _expFileStream = new FileStream(path, FileMode.Open, FileAccess.Read); - _expMemoryMappedFile = MemoryMappedFile.CreateFromFile( - _expFileStream, null, 0, MemoryMappedFileAccess.Read, HandleInheritability.None, true); - _expMemoryMappedStream = _expMemoryMappedFile.CreateViewStream( - offset:0, size:0, access:MemoryMappedFileAccess.Read); - _memoryReader = new StreamReader(_expMemoryMappedStream); - } - - public bool IsEmpty => _memoryReader.EndOfStream; - - public int Location => _location; - - // ~ExpFileSource() - // { - // Dispose(disposing: false); - // } - - public void Dispose() - { - Dispose(disposing:true); - GC.SuppressFinalize(this); - } - - public void EndWriting() { } - - public string ReadLine() - { - readLineSemaphore.Wait(); - string line = _memoryReader.ReadLine()!; - _location++; - readLineSemaphore.Release(); - return line; - } - - public string ReadLine(out int position) - { - throw new NotImplementedException(); - } - - public void ResetToBegin() - { - readLineSemaphore.Wait(); - _expMemoryMappedStream.Seek(0, SeekOrigin.Begin); - _location = 0; - readLineSemaphore.Release(); - } - - protected virtual void Dispose(bool disposing) - { - if (!disposedValue) - { - if (disposing) - { - _expFileStream.Dispose(); - _expMemoryMappedFile.Dispose(); - _expMemoryMappedStream.Dispose(); - _memoryReader.Dispose(); - } - disposedValue = true; - } - } - - IScriptSourceProvider IScriptSourceProvider.Slice(int location, int count) - { - throw new NotSupportedException(); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpSource" +// 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 System; +using System.Collections.Generic; +using System.IO; +using System.IO.MemoryMappedFiles; +using System.Text; +using System.Threading; + +namespace StgSharp.Script.Express +{ + public class ExpFileSource : IDisposable, IScriptSourceProvider + { + + private bool disposedValue; + private FileStream _expFileStream; + private int _location; + private MemoryMappedFile _expMemoryMappedFile; + private MemoryMappedViewStream _expMemoryMappedStream; + + private SemaphoreSlim readLineSemaphore = new SemaphoreSlim(1, 1); + private StreamReader _memoryReader; + + public ExpFileSource(string path) + { + if (!File.Exists(path)) { + throw new FileNotFoundException(); + } + _expFileStream = new FileStream(path, FileMode.Open, FileAccess.Read); + _expMemoryMappedFile = MemoryMappedFile.CreateFromFile( + _expFileStream, null, 0, MemoryMappedFileAccess.Read, HandleInheritability.None, true); + _expMemoryMappedStream = _expMemoryMappedFile.CreateViewStream( + offset:0, size:0, access:MemoryMappedFileAccess.Read); + _memoryReader = new StreamReader(_expMemoryMappedStream); + } + + public bool IsEmpty => _memoryReader.EndOfStream; + + public int Location => _location; + + // ~ExpFileSource() + // { + // Dispose(disposing: false); + // } + + public void Dispose() + { + Dispose(disposing:true); + GC.SuppressFinalize(this); + } + + public void EndWriting() { } + + public string ReadLine() + { + readLineSemaphore.Wait(); + string line = _memoryReader.ReadLine()!; + _location++; + readLineSemaphore.Release(); + return line; + } + + public string ReadLine(out int position) + { + throw new NotImplementedException(); + } + + public void ResetToBegin() + { + readLineSemaphore.Wait(); + _expMemoryMappedStream.Seek(0, SeekOrigin.Begin); + _location = 0; + readLineSemaphore.Release(); + } + + protected virtual void Dispose(bool disposing) + { + if (!disposedValue) + { + if (disposing) + { + _expFileStream.Dispose(); + _expMemoryMappedFile.Dispose(); + _expMemoryMappedStream.Dispose(); + _memoryReader.Dispose(); + } + disposedValue = true; + } + } + + IScriptSourceProvider IScriptSourceProvider.Slice(int location, int count) + { + throw new NotSupportedException(); + } + + } +} diff --git a/StgSharp.Script/Express/ExpSyntaxAnalyzer.CaseOf.cs b/StgSharp.Script/Express/ExpSyntaxAnalyzer.CaseOf.cs index 462cb8ea..e26d9c78 100644 --- a/StgSharp.Script/Express/ExpSyntaxAnalyzer.CaseOf.cs +++ b/StgSharp.Script/Express/ExpSyntaxAnalyzer.CaseOf.cs @@ -1,128 +1,128 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpSyntaxAnalyzer.CaseOf" -// 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 System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword; - -namespace StgSharp.Script.Express -{ - public partial class ExpSyntaxAnalyzer - { - - private bool AppendToken_CaseOf(Token t) - { - Token op; - ExpSyntaxNode root; - switch (t.Value) - { - case ExpKeyword.Case: - CaseOfStateCache state = new CaseOfStateCache(t); - _cache.CurrentDepthMark.StateCache = state; - state.CurrentState = t.Value; - return true; - case ExpKeyword.Of: - state = _cache.StateOfCurrentDepth(); - while (_cache.TryPopOperator(out op)) { - ConvertAndPushOneOperator(op); - } - _cache.PopOperand(out _, out root); - state.CaseExpression = root; - state.CurrentState = t.Value; - return true; - case ":": - state = _cache.StateOfCurrentDepth(); - if (state.CurrentState != ExpKeyword.Of && state.CurrentState != ExpKeyword.Otherwise) - { - root = _cache.PackAllStatements(); - state.CloseCurrentCase(root); - } - while (_cache.TryPopOperator(out op)) { - ConvertAndPushOneOperator(op); - } - if (!_cache.PopOperand(out _, out root)) - { - // sth wrong, case expression cannot generate; - } - state.CurrentCase = root; - return true; - case ExpKeyword.Otherwise: - state = _cache.StateOfCurrentDepth(); - root = _cache.PackAllStatements(); - state.CloseCurrentCase(root); - state.CurrentState = t.Value; - return true; - case ExpKeyword.EndCase: - state = _cache.StateOfCurrentDepth(); - root = _cache.PackAllStatements(); - state.CloseCurrentCase(root); - root = new ExpSwitchNode( - state.Begin, state.CaseExpression, state.DefaultCase, state.Cases); - _cache.DecreaseDepth(); - _cache.StatementsInDepth.Push(root); - return true; - default: - AppendToken_Common(t); - return true; - } - } - - private class CaseOfStateCache : ICompileDepthState - { - - public CaseOfStateCache(Token t) - { - Begin = t; - } - - public Dictionary Cases { get; } = new Dictionary( - ); - - public ExpSyntaxNode CaseExpression { get; set; } - - public ExpSyntaxNode DefaultCase { get; set; } - - public ExpSyntaxNode CurrentCase { get; set; } - - public string CurrentState { get; set; } - - public Token Begin { get; init; } - - public void CloseCurrentCase(ExpSyntaxNode root) - { - Cases.Add(CurrentCase, root); - } - - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpSyntaxAnalyzer.CaseOf" +// 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 System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword; + +namespace StgSharp.Script.Express +{ + public partial class ExpSyntaxAnalyzer + { + + private bool AppendToken_CaseOf(Token t) + { + Token op; + ExpSyntaxNode root; + switch (t.Value) + { + case ExpKeyword.Case: + CaseOfStateCache state = new CaseOfStateCache(t); + _cache.CurrentDepthMark.StateCache = state; + state.CurrentState = t.Value; + return true; + case ExpKeyword.Of: + state = _cache.StateOfCurrentDepth(); + while (_cache.TryPopOperator(out op)) { + ConvertAndPushOneOperator(op); + } + _cache.PopOperand(out _, out root); + state.CaseExpression = root; + state.CurrentState = t.Value; + return true; + case ":": + state = _cache.StateOfCurrentDepth(); + if (state.CurrentState != ExpKeyword.Of && state.CurrentState != ExpKeyword.Otherwise) + { + root = _cache.PackAllStatements(); + state.CloseCurrentCase(root); + } + while (_cache.TryPopOperator(out op)) { + ConvertAndPushOneOperator(op); + } + if (!_cache.PopOperand(out _, out root)) + { + // sth wrong, case expression cannot generate; + } + state.CurrentCase = root; + return true; + case ExpKeyword.Otherwise: + state = _cache.StateOfCurrentDepth(); + root = _cache.PackAllStatements(); + state.CloseCurrentCase(root); + state.CurrentState = t.Value; + return true; + case ExpKeyword.EndCase: + state = _cache.StateOfCurrentDepth(); + root = _cache.PackAllStatements(); + state.CloseCurrentCase(root); + root = new ExpSwitchNode( + state.Begin, state.CaseExpression, state.DefaultCase, state.Cases); + _cache.DecreaseDepth(); + _cache.StatementsInDepth.Push(root); + return true; + default: + AppendToken_Common(t); + return true; + } + } + + private class CaseOfStateCache : ICompileDepthState + { + + public CaseOfStateCache(Token t) + { + Begin = t; + } + + public Dictionary Cases { get; } = new Dictionary( + ); + + public ExpSyntaxNode CaseExpression { get; set; } + + public ExpSyntaxNode DefaultCase { get; set; } + + public ExpSyntaxNode CurrentCase { get; set; } + + public string CurrentState { get; set; } + + public Token Begin { get; init; } + + public void CloseCurrentCase(ExpSyntaxNode root) + { + Cases.Add(CurrentCase, root); + } + + } + + } +} diff --git a/StgSharp.Script/Express/ExpSyntaxAnalyzer.Common.cs b/StgSharp.Script/Express/ExpSyntaxAnalyzer.Common.cs index 8c1c5fdf..34590a56 100644 --- a/StgSharp.Script/Express/ExpSyntaxAnalyzer.Common.cs +++ b/StgSharp.Script/Express/ExpSyntaxAnalyzer.Common.cs @@ -1,290 +1,290 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpSyntaxAnalyzer.Common" -// 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 Microsoft.CodeAnalysis.CSharp.Syntax; - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; -using System.Xml.Schema; - -using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword; - -namespace StgSharp.Script.Express -{ - public partial class ExpSyntaxAnalyzer - { - - private bool IsSeparatorMatch(Token leftSperator, Token rightSeparator) - { - return leftSperator.Value switch - { - ExpKeyword.LeftBrace => rightSeparator.Value == ExpKeyword.RightBrace, - ExpKeyword.LeftParen => rightSeparator.Value == ExpKeyword.RightParen, - ExpKeyword.Comma => rightSeparator.Value == ExpKeyword.Comma, - ExpKeyword.Semicolon => rightSeparator.Value == ExpKeyword.Semicolon, - _ => false - }; - } - - private bool TryAppendIndexLeft(Token t) - { - if (t.Flag != TokenFlag.Index_Left) { - return false; - } - if (_cache.TryPeekOperand(out bool isNode, out _, out ExpSyntaxNode? node)) - { - if (node.EqualityTypeConvert is not ExpCollectionBase) { - ExpInvalidSyntaxException.ThrowNonCollectionIndex(t); - } - } - _cache.PushOperator(t); - _cache.IncreaseDepth((int)ExpCompileStateCode.CollectionIndex); - return true; - } - - private bool TryAppendIndexRight(Token t) - { - if (t.Flag != TokenFlag.Index_Right) { - return false; - } - - // reverse building - ClosePrefixReverse(t); - - // make index node - _cache.PopOperand(out _, out ExpSyntaxNode? expNode); - if (!_cache.PopOperand(out Token colleToken, out ExpSyntaxNode? colleNode)) { } - _cache.PushOperand( - ExpCollectionIndexNode.Create( - t, (colleNode as ExpCollectionInstanceBase)!, expNode)); - return true; - } - - private bool TryAppendMember(Token t) - { - if (t.Flag != TokenFlag.Member) { - return false; - } - if (TryParseConstant(t)) { - return true; - } - if (TryParseFunction(t)) { - return true; - } - if (TryParseInstance(t)) { - return true; - } - if (TryParseKeyword(t)) { - return true; - } - if (TryParseElementName(t)) { - return true; - } - - // Many thing miss here - _cache.PushOperand(ExpElementMemberNameNode.Create(t)); - - return true; - } - - private bool TryAppendMiddleSeparator(Token t) - { - if (t.Flag != TokenFlag.Separator_Middle) { - return false; - } - while (_cache.OperatorAheadOfDepth > 0) - { - _cache.TryPopOperator(out Token op); - ExpSyntaxNode node = ConvertAndPushOneOperator(op); - } - switch (_cache.OperandAheadOfDepth) - { - case 0: - if (t.Value == ";") { - return true; - } - _cache.StatementsInDepth.Push(ExpSyntaxNode.Empty); - goto case 1; - case 1: - _cache.PopOperand(out _, out ExpSyntaxNode? statement); - _cache.StatementsInDepth.Push(statement); - return true; - default: - ExpInvalidSyntaxException.ThrowNoOperator(t); - break; - } - return true; - } - - private bool TryAppendNumAndStrLiteral(Token t) - { - if ((t.Flag & (TokenFlag.String | TokenFlag.Number)) == 0) { - return false; - } - _cache.PushOperand(ExpElementInstance.CreateLiteral(t)); - return true; - } - - private bool TryAppendPrefixSeparator(Token t) - { - if (t.Flag != TokenFlag.Separator_Left) { - return false; - } - _cache.PushOperator(t); - _cache.IncreaseDepth((int)ExpCompileStateCode.Common); - return true; - } - - private bool TryAppendPrefixSeparatorEnd(Token t) - { - if (t.Flag != TokenFlag.Separator_Right) { - return false; - } - ClosePrefixReverse(t); - return true; - } - - private bool TryAppendSymbol(Token t) - { - if ((t.Flag & (TokenFlag.Symbol_Unary | TokenFlag.Symbol_Binary)) == 0) { - return false; - } - - int cmp = -1; - processPrecedence: - if (_cache.TryPeekOperator(out Token tmp)) - { - cmp = CompareOperatorPrecedence(t, tmp); - if (cmp >= 0) - { - _cache.PopOperator(); - ExpSyntaxNode node = ConvertAndPushOneOperator(tmp); - goto processPrecedence; - } - } - _cache.PushOperator(t); - return true; - } - - private bool TryParseConstant(Token t) - { - switch (t.Value) - { - case ExpKeyword.E: - _cache.PushOperand(new ExpRealNumberNode(t, MathF.E, true)); - return true; - case ExpKeyword.Pi: - _cache.PushOperand(new ExpRealNumberNode(t, MathF.PI, true)); - return true; - default: - if (ExpElementInstance.TryCreateLiteral(t, out ExpElementInstance? node)) - { - _cache.PushOperand(node); - return true; - } - return false; - } - } - - private bool TryParseElementName(Token t) - { - if (_context.TryGetType(t.Value, out ExpTypeSource? type)) - { - _cache.PushOperand(ExpMetaRefNode.RefType(t, type)); - return true; - } - if (_context.TryGetEntity(t.Value, out ExpEntitySource? entity)) - { - _cache.PushOperand(ExpMetaRefNode.RefEntity(t, entity)); - return true; - } - return false; - } - - private bool TryParseFunction(Token t) - { - if (ExpKeyword.BuiltinFunctions.Contains(t.Value)) - { - _cache.PushOperator(t); - return true; - } else if (_context.TryGetFunction(t.Value, out ExpFunctionSource? f)) - { - _cache.PushOperand(t); - return true; - } - return false; - } - - private bool TryParseInstance(Token t) - { - if (_local.TryGetMember(t.Value, - out ExpSyntaxNode? node) && - node is ExpElementInstance instance) - { - _cache.PushOperand(ExpInstanceReferenceNode.MakeReferenceFrom(t, instance)); - return true; - } else if (_tempVariableInLoops.TryGetValue(t.Value, out instance!)) - { - _cache.PushOperand(ExpInstanceReferenceNode.MakeReferenceFrom(t, instance)); - return true; - } else if (_cache.IsLastAddedOperator) - { - if (_cache.PeekOperand(out _, - out ExpSyntaxNode? typenode) && - typenode is ExpMetaRefNode typeRef) - { - _cache.PopOperand(out _, out _); - _local.AddMember(t.Value, typeRef.SourceRef.CreateInstanceNode(t)); - } else - { - return false; - } - } - return false; - } - - private bool TryParseKeyword(Token t) - { - switch (t.Value) - { - case ExpKeyword.Return: - _cache.PushOperator(t); - return true; - case ExpKeyword.Skip: - _cache.PushOperand(ExpProcedureControlNode.Skip(t)); - return true; - default: - return false; - } - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpSyntaxAnalyzer.Common" +// 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 Microsoft.CodeAnalysis.CSharp.Syntax; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Schema; + +using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword; + +namespace StgSharp.Script.Express +{ + public partial class ExpSyntaxAnalyzer + { + + private bool IsSeparatorMatch(Token leftSperator, Token rightSeparator) + { + return leftSperator.Value switch + { + ExpKeyword.LeftBrace => rightSeparator.Value == ExpKeyword.RightBrace, + ExpKeyword.LeftParen => rightSeparator.Value == ExpKeyword.RightParen, + ExpKeyword.Comma => rightSeparator.Value == ExpKeyword.Comma, + ExpKeyword.Semicolon => rightSeparator.Value == ExpKeyword.Semicolon, + _ => false + }; + } + + private bool TryAppendIndexLeft(Token t) + { + if (t.Flag != TokenFlag.Index_Left) { + return false; + } + if (_cache.TryPeekOperand(out bool isNode, out _, out ExpSyntaxNode? node)) + { + if (node.EqualityTypeConvert is not ExpCollectionBase) { + ExpInvalidSyntaxException.ThrowNonCollectionIndex(t); + } + } + _cache.PushOperator(t); + _cache.IncreaseDepth((int)ExpCompileStateCode.CollectionIndex); + return true; + } + + private bool TryAppendIndexRight(Token t) + { + if (t.Flag != TokenFlag.Index_Right) { + return false; + } + + // reverse building + ClosePrefixReverse(t); + + // make index node + _cache.PopOperand(out _, out ExpSyntaxNode? expNode); + if (!_cache.PopOperand(out Token colleToken, out ExpSyntaxNode? colleNode)) { } + _cache.PushOperand( + ExpCollectionIndexNode.Create( + t, (colleNode as ExpCollectionInstanceBase)!, expNode)); + return true; + } + + private bool TryAppendMember(Token t) + { + if (t.Flag != TokenFlag.Member) { + return false; + } + if (TryParseConstant(t)) { + return true; + } + if (TryParseFunction(t)) { + return true; + } + if (TryParseInstance(t)) { + return true; + } + if (TryParseKeyword(t)) { + return true; + } + if (TryParseElementName(t)) { + return true; + } + + // Many thing miss here + _cache.PushOperand(ExpElementMemberNameNode.Create(t)); + + return true; + } + + private bool TryAppendMiddleSeparator(Token t) + { + if (t.Flag != TokenFlag.Separator_Middle) { + return false; + } + while (_cache.OperatorAheadOfDepth > 0) + { + _cache.TryPopOperator(out Token op); + ExpSyntaxNode node = ConvertAndPushOneOperator(op); + } + switch (_cache.OperandAheadOfDepth) + { + case 0: + if (t.Value == ";") { + return true; + } + _cache.StatementsInDepth.Push(ExpSyntaxNode.Empty); + goto case 1; + case 1: + _cache.PopOperand(out _, out ExpSyntaxNode? statement); + _cache.StatementsInDepth.Push(statement); + return true; + default: + ExpInvalidSyntaxException.ThrowNoOperator(t); + break; + } + return true; + } + + private bool TryAppendNumAndStrLiteral(Token t) + { + if ((t.Flag & (TokenFlag.String | TokenFlag.Number)) == 0) { + return false; + } + _cache.PushOperand(ExpElementInstance.CreateLiteral(t)); + return true; + } + + private bool TryAppendPrefixSeparator(Token t) + { + if (t.Flag != TokenFlag.Separator_Left) { + return false; + } + _cache.PushOperator(t); + _cache.IncreaseDepth((int)ExpCompileStateCode.Common); + return true; + } + + private bool TryAppendPrefixSeparatorEnd(Token t) + { + if (t.Flag != TokenFlag.Separator_Right) { + return false; + } + ClosePrefixReverse(t); + return true; + } + + private bool TryAppendSymbol(Token t) + { + if ((t.Flag & (TokenFlag.Symbol_Unary | TokenFlag.Symbol_Binary)) == 0) { + return false; + } + + int cmp = -1; + processPrecedence: + if (_cache.TryPeekOperator(out Token tmp)) + { + cmp = CompareOperatorPrecedence(t, tmp); + if (cmp >= 0) + { + _cache.PopOperator(); + ExpSyntaxNode node = ConvertAndPushOneOperator(tmp); + goto processPrecedence; + } + } + _cache.PushOperator(t); + return true; + } + + private bool TryParseConstant(Token t) + { + switch (t.Value) + { + case ExpKeyword.E: + _cache.PushOperand(new ExpRealNumberNode(t, MathF.E, true)); + return true; + case ExpKeyword.Pi: + _cache.PushOperand(new ExpRealNumberNode(t, MathF.PI, true)); + return true; + default: + if (ExpElementInstance.TryCreateLiteral(t, out ExpElementInstance? node)) + { + _cache.PushOperand(node); + return true; + } + return false; + } + } + + private bool TryParseElementName(Token t) + { + if (_context.TryGetType(t.Value, out ExpTypeSource? type)) + { + _cache.PushOperand(ExpMetaRefNode.RefType(t, type)); + return true; + } + if (_context.TryGetEntity(t.Value, out ExpEntitySource? entity)) + { + _cache.PushOperand(ExpMetaRefNode.RefEntity(t, entity)); + return true; + } + return false; + } + + private bool TryParseFunction(Token t) + { + if (ExpKeyword.BuiltinFunctions.Contains(t.Value)) + { + _cache.PushOperator(t); + return true; + } else if (_context.TryGetFunction(t.Value, out ExpFunctionSource? f)) + { + _cache.PushOperand(t); + return true; + } + return false; + } + + private bool TryParseInstance(Token t) + { + if (_local.TryGetMember(t.Value, + out ExpSyntaxNode? node) && + node is ExpElementInstance instance) + { + _cache.PushOperand(ExpInstanceReferenceNode.MakeReferenceFrom(t, instance)); + return true; + } else if (_tempVariableInLoops.TryGetValue(t.Value, out instance!)) + { + _cache.PushOperand(ExpInstanceReferenceNode.MakeReferenceFrom(t, instance)); + return true; + } else if (_cache.IsLastAddedOperator) + { + if (_cache.PeekOperand(out _, + out ExpSyntaxNode? typenode) && + typenode is ExpMetaRefNode typeRef) + { + _cache.PopOperand(out _, out _); + _local.AddMember(t.Value, typeRef.SourceRef.CreateInstanceNode(t)); + } else + { + return false; + } + } + return false; + } + + private bool TryParseKeyword(Token t) + { + switch (t.Value) + { + case ExpKeyword.Return: + _cache.PushOperator(t); + return true; + case ExpKeyword.Skip: + _cache.PushOperand(ExpProcedureControlNode.Skip(t)); + return true; + default: + return false; + } + } + + } +} diff --git a/StgSharp.Script/Express/ExpSyntaxAnalyzer.DepthEnter.cs b/StgSharp.Script/Express/ExpSyntaxAnalyzer.DepthEnter.cs index dafd6207..88e06bae 100644 --- a/StgSharp.Script/Express/ExpSyntaxAnalyzer.DepthEnter.cs +++ b/StgSharp.Script/Express/ExpSyntaxAnalyzer.DepthEnter.cs @@ -1,66 +1,66 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpSyntaxAnalyzer.DepthEnter" -// 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 Microsoft.CodeAnalysis.Diagnostics; - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword; - -namespace StgSharp.Script.Express -{ - public partial class ExpSyntaxAnalyzer - { - - internal void AttemptEnterNewDepth(Token t) - { - switch (t.Value) - { - case ExpKeyword.If: - _cache.IncreaseDepth((int)ExpCompileStateCode.IfBranch); - return; - case ExpKeyword.Case: - _cache.IncreaseDepth((int)ExpCompileStateCode.CaseBranch); - return; - case ExpKeyword.Repeat: - _cache.IncreaseDepth((int)ExpCompileStateCode.RepeatLoop); - return; - case ExpKeyword.While: - _cache.IncreaseDepth((int)ExpCompileStateCode.UntilLoop); - return; - - default: - break; - } - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpSyntaxAnalyzer.DepthEnter" +// 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 Microsoft.CodeAnalysis.Diagnostics; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword; + +namespace StgSharp.Script.Express +{ + public partial class ExpSyntaxAnalyzer + { + + internal void AttemptEnterNewDepth(Token t) + { + switch (t.Value) + { + case ExpKeyword.If: + _cache.IncreaseDepth((int)ExpCompileStateCode.IfBranch); + return; + case ExpKeyword.Case: + _cache.IncreaseDepth((int)ExpCompileStateCode.CaseBranch); + return; + case ExpKeyword.Repeat: + _cache.IncreaseDepth((int)ExpCompileStateCode.RepeatLoop); + return; + case ExpKeyword.While: + _cache.IncreaseDepth((int)ExpCompileStateCode.UntilLoop); + return; + + default: + break; + } + } + + } +} diff --git a/StgSharp.Script/Express/ExpSyntaxAnalyzer.ErrorProcess.cs b/StgSharp.Script/Express/ExpSyntaxAnalyzer.ErrorProcess.cs index cdb53846..46872bf3 100644 --- a/StgSharp.Script/Express/ExpSyntaxAnalyzer.ErrorProcess.cs +++ b/StgSharp.Script/Express/ExpSyntaxAnalyzer.ErrorProcess.cs @@ -1,53 +1,53 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpSyntaxAnalyzer.ErrorProcess" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Script.Express -{ - public partial class ExpSyntaxAnalyzer - { - - public void ThrowCompileException(int errorCode) - { - switch (errorCode) - { - case 0 or 1: - return; - case TokenTypeNotMatch: - throw new Exception(); - default: - break; - } - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpSyntaxAnalyzer.ErrorProcess" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Script.Express +{ + public partial class ExpSyntaxAnalyzer + { + + public void ThrowCompileException(int errorCode) + { + switch (errorCode) + { + case 0 or 1: + return; + case TokenTypeNotMatch: + throw new Exception(); + default: + break; + } + } + + } +} diff --git a/StgSharp.Script/Express/ExpSyntaxAnalyzer.If.cs b/StgSharp.Script/Express/ExpSyntaxAnalyzer.If.cs index 1597805a..3e94db85 100644 --- a/StgSharp.Script/Express/ExpSyntaxAnalyzer.If.cs +++ b/StgSharp.Script/Express/ExpSyntaxAnalyzer.If.cs @@ -1,128 +1,128 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpSyntaxAnalyzer.If" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Xml.Linq; - -using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword; - -namespace StgSharp.Script.Express -{ - public partial class ExpSyntaxAnalyzer - { - - private bool AppendToken_IfBranch(Token t) - { - switch (t.Value) - { - case ExpKeyword.If: - IfBranchStateCache state = new IfBranchStateCache(); - _cache.CurrentDepthMark.StateCache = state; - state.CurrentState = t.Value; - return true; - case ExpKeyword.Then: - state = _cache.StateOfCurrentDepth(); - if (state.CurrentState == ExpKeyword.If) - { - while (_cache.TryPopOperator(out Token op)) { - ConvertAndPushOneOperator(op); - } - _cache.PopOperand(out _, out ExpSyntaxNode? node); - state.CurrentState = t.Value; - state.BoolExpression = node; - } else - { - throw new ExpCompileException( - t, $"Keyword {t.Value} should be after keyword {ExpKeyword.Then}"); - } - return true; - case ExpKeyword.Else: - state = _cache.StateOfCurrentDepth(); - if (state.CurrentState == ExpKeyword.Then) - { - ExpSyntaxNode node = _cache.PackAllStatements(); - state.CurrentState = t.Value; - state.ExpressionIfTrue = node; - } else - { - throw new ExpCompileException( - t, $"Keyword {t.Value} should be after keyword {ExpKeyword.Then}"); - } - return true; - - case ExpKeyword.EndIf: - state = _cache.StateOfCurrentDepth(); - if (state.CurrentState == ExpKeyword.Then) - { - ExpSyntaxNode trueNode = _cache.PackAllStatements(); - state.CurrentState = t.Value; - state.ExpressionIfTrue = trueNode; - state.ExpressionIfFalse = ExpSyntaxNode.Empty; - } else if (state.CurrentState == ExpKeyword.Else) - { - ExpSyntaxNode falseNode = _cache.PackAllStatements(); - state.CurrentState = t.Value; - state.ExpressionIfFalse = falseNode; - } else - { - throw new ExpCompileException( - t, - $"Keyword {t.Value} should be after keyword {ExpKeyword.Then} or {ExpKeyword.Else}"); - } - ExpIfNode ifNode = new ExpIfNode( - state.Begin, state.BoolExpression, state.ExpressionIfTrue, - state.ExpressionIfFalse); - _cache.DecreaseDepth(); - _cache.StatementsInDepth.Push(ifNode); - return true; - default: - AppendToken_Common(t); - return true; - } - } - - private class IfBranchStateCache : ICompileDepthState - { - - public ExpSyntaxNode BoolExpression { get; set; } - - public ExpSyntaxNode ExpressionIfTrue { get; set; } - - public ExpSyntaxNode ExpressionIfFalse { get; set; } - - public string CurrentState { get; set; } - - public Token Begin { get; set; } - - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpSyntaxAnalyzer.If" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Linq; + +using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword; + +namespace StgSharp.Script.Express +{ + public partial class ExpSyntaxAnalyzer + { + + private bool AppendToken_IfBranch(Token t) + { + switch (t.Value) + { + case ExpKeyword.If: + IfBranchStateCache state = new IfBranchStateCache(); + _cache.CurrentDepthMark.StateCache = state; + state.CurrentState = t.Value; + return true; + case ExpKeyword.Then: + state = _cache.StateOfCurrentDepth(); + if (state.CurrentState == ExpKeyword.If) + { + while (_cache.TryPopOperator(out Token op)) { + ConvertAndPushOneOperator(op); + } + _cache.PopOperand(out _, out ExpSyntaxNode? node); + state.CurrentState = t.Value; + state.BoolExpression = node; + } else + { + throw new ExpCompileException( + t, $"Keyword {t.Value} should be after keyword {ExpKeyword.Then}"); + } + return true; + case ExpKeyword.Else: + state = _cache.StateOfCurrentDepth(); + if (state.CurrentState == ExpKeyword.Then) + { + ExpSyntaxNode node = _cache.PackAllStatements(); + state.CurrentState = t.Value; + state.ExpressionIfTrue = node; + } else + { + throw new ExpCompileException( + t, $"Keyword {t.Value} should be after keyword {ExpKeyword.Then}"); + } + return true; + + case ExpKeyword.EndIf: + state = _cache.StateOfCurrentDepth(); + if (state.CurrentState == ExpKeyword.Then) + { + ExpSyntaxNode trueNode = _cache.PackAllStatements(); + state.CurrentState = t.Value; + state.ExpressionIfTrue = trueNode; + state.ExpressionIfFalse = ExpSyntaxNode.Empty; + } else if (state.CurrentState == ExpKeyword.Else) + { + ExpSyntaxNode falseNode = _cache.PackAllStatements(); + state.CurrentState = t.Value; + state.ExpressionIfFalse = falseNode; + } else + { + throw new ExpCompileException( + t, + $"Keyword {t.Value} should be after keyword {ExpKeyword.Then} or {ExpKeyword.Else}"); + } + ExpIfNode ifNode = new ExpIfNode( + state.Begin, state.BoolExpression, state.ExpressionIfTrue, + state.ExpressionIfFalse); + _cache.DecreaseDepth(); + _cache.StatementsInDepth.Push(ifNode); + return true; + default: + AppendToken_Common(t); + return true; + } + } + + private class IfBranchStateCache : ICompileDepthState + { + + public ExpSyntaxNode BoolExpression { get; set; } + + public ExpSyntaxNode ExpressionIfTrue { get; set; } + + public ExpSyntaxNode ExpressionIfFalse { get; set; } + + public string CurrentState { get; set; } + + public Token Begin { get; set; } + + } + + } +} diff --git a/StgSharp.Script/Express/ExpSyntaxAnalyzer.OperatorParser.cs b/StgSharp.Script/Express/ExpSyntaxAnalyzer.OperatorParser.cs index d946dba4..8e31530f 100644 --- a/StgSharp.Script/Express/ExpSyntaxAnalyzer.OperatorParser.cs +++ b/StgSharp.Script/Express/ExpSyntaxAnalyzer.OperatorParser.cs @@ -1,178 +1,178 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpSyntaxAnalyzer.OperatorParser" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword; - -namespace StgSharp.Script.Express -{ - public partial class ExpSyntaxAnalyzer - { - - public int CompareOperatorPrecedence(Token left, Token right) - { - ExpressCompile.TryGetOperatorPrecedence(left.Value, out int leftPrecedence); - ExpressCompile.TryGetOperatorPrecedence(right.Value, out int rightPrecedence); - return leftPrecedence - rightPrecedence; - } - - public bool TryGenerateUnaryNode(Token t, out ExpSyntaxNode node) - { - ExpSyntaxNode operand = GetNextOperandCache(); - switch (t.Value) - { - case ExpKeyword.UnaryPlus: - node = ExpUnaryOperatorNode.UnaryPlus(t, operand); - return true; - case ExpKeyword.UnaryMinus: - node = ExpUnaryOperatorNode.UnaryMinus(t, operand); - return true; - case ExpKeyword.Not: - node = ExpUnaryOperatorNode.UnaryNot(t, operand); - return true; - default: - node = ExpSyntaxNode.Empty; - return false; - } - } - - /// - /// WARNING: This method cannot process INDEXOF, FUNCTION CALLING, LOOP and any ENDING - /// SYMBOLS. - /// - private ExpSyntaxNode ConvertAndPushOneOperator(Token op) - { - switch (op.Flag) - { - case TokenFlag.Symbol_Unary: - TryGenerateUnaryNode(op, out ExpSyntaxNode? node); - _cache.PushOperand(node); - return node; - case TokenFlag.Symbol_Binary: - TryGenerateBinaryNode(op, out node); - _cache.PushOperand(node); - return node; - case TokenFlag.Member: - if (_context.TryGetFunction(op.Value, out ExpFunctionSource? f)) - { - if (!_cache.PopOperand(out Token t, out ExpSyntaxNode? p)) - { - node = ExpFunctionCallingNode.CallFunction(op, f, p); - return node; - } else - { - throw new ExpCompileException( - t, - "An ExpNode for function calling is needed, but a token was popped"); - } - } else if (_context.TryGetProcedure(op.Value, out ExpProcedureSource? p)) - { - if (!_cache.PopOperand(out Token t, out ExpSyntaxNode? param)) - { - node = ExpProcedureCallingNode.CallProcedure(op, p, param); - return node; - } else - { - throw new ExpCompileException( - t, - "An ExpNode for function calling is needed, but a token was popped"); - } - } else if (ExpSchema.BuiltinSchema.TryGetFunction(op.Value, out f)) - { - if (!_cache.PopOperand(out Token t, out ExpSyntaxNode? param)) - { - node = ExpFunctionCallingNode.CallFunction(op, f, param); - return node; - } else - { - throw new ExpCompileException( - t, - "An ExpNode for function calling is needed, but a token was popped"); - } - } else - { - throw new NotImplementedException(); - - // uncertain case here - } - default: - throw new NotImplementedException(); - } - } - - private bool TryGenerateBinaryNode(Token t, out ExpSyntaxNode node) - { - ExpSyntaxNode right = GetNextOperandCache(); - ExpSyntaxNode left = GetNextOperandCache(); - switch (t.Value) - { - case ExpKeyword.Add: - node = ExpBinaryOperatorNode.Add(t, left, right); - return true; - case ExpKeyword.Sub: - node = ExpBinaryOperatorNode.Sub(t, left, right); - return true; - case ExpKeyword.Mul: - node = ExpBinaryOperatorNode.Mul(t, left, right); - return true; - case ExpKeyword.Div: - node = ExpBinaryOperatorNode.Div(t, left, right); - return true; - case ExpKeyword.Equal: - node = ExpBinaryOperatorNode.EqualTo(t, left, right); - return true; - case ExpKeyword.NotEqual: - node = ExpBinaryOperatorNode.NotEqualTo(t, left, right); - return true; - case ExpKeyword.GreaterThan: - node = ExpBinaryOperatorNode.GreaterThan(t, left, right); - return true; - case ExpKeyword.LessThan: - node = ExpBinaryOperatorNode.LessThan(t, left, right); - return true; - case ExpKeyword.Assignment: - node = ExpBinaryOperatorNode.Assign(t, left, right); - return true; - case ExpKeyword.InstanceEqual: - node = ExpBinaryOperatorNode.CompareInstanceEqual(t, left, right); - return true; - case ExpKeyword.InstanceNotEqual: - node = ExpBinaryOperatorNode.CompareInstanceNotEqual(t, left, right); - return true; - default: - node = ExpSyntaxNode.Empty; - return false; - } - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpSyntaxAnalyzer.OperatorParser" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword; + +namespace StgSharp.Script.Express +{ + public partial class ExpSyntaxAnalyzer + { + + public int CompareOperatorPrecedence(Token left, Token right) + { + ExpressCompile.TryGetOperatorPrecedence(left.Value, out int leftPrecedence); + ExpressCompile.TryGetOperatorPrecedence(right.Value, out int rightPrecedence); + return leftPrecedence - rightPrecedence; + } + + public bool TryGenerateUnaryNode(Token t, out ExpSyntaxNode node) + { + ExpSyntaxNode operand = GetNextOperandCache(); + switch (t.Value) + { + case ExpKeyword.UnaryPlus: + node = ExpUnaryOperatorNode.UnaryPlus(t, operand); + return true; + case ExpKeyword.UnaryMinus: + node = ExpUnaryOperatorNode.UnaryMinus(t, operand); + return true; + case ExpKeyword.Not: + node = ExpUnaryOperatorNode.UnaryNot(t, operand); + return true; + default: + node = ExpSyntaxNode.Empty; + return false; + } + } + + /// + /// WARNING: This method cannot process INDEXOF, FUNCTION CALLING, LOOP and any ENDING + /// SYMBOLS. + /// + private ExpSyntaxNode ConvertAndPushOneOperator(Token op) + { + switch (op.Flag) + { + case TokenFlag.Symbol_Unary: + TryGenerateUnaryNode(op, out ExpSyntaxNode? node); + _cache.PushOperand(node); + return node; + case TokenFlag.Symbol_Binary: + TryGenerateBinaryNode(op, out node); + _cache.PushOperand(node); + return node; + case TokenFlag.Member: + if (_context.TryGetFunction(op.Value, out ExpFunctionSource? f)) + { + if (!_cache.PopOperand(out Token t, out ExpSyntaxNode? p)) + { + node = ExpFunctionCallingNode.CallFunction(op, f, p); + return node; + } else + { + throw new ExpCompileException( + t, + "An ExpNode for function calling is needed, but a token was popped"); + } + } else if (_context.TryGetProcedure(op.Value, out ExpProcedureSource? p)) + { + if (!_cache.PopOperand(out Token t, out ExpSyntaxNode? param)) + { + node = ExpProcedureCallingNode.CallProcedure(op, p, param); + return node; + } else + { + throw new ExpCompileException( + t, + "An ExpNode for function calling is needed, but a token was popped"); + } + } else if (ExpSchema.BuiltinSchema.TryGetFunction(op.Value, out f)) + { + if (!_cache.PopOperand(out Token t, out ExpSyntaxNode? param)) + { + node = ExpFunctionCallingNode.CallFunction(op, f, param); + return node; + } else + { + throw new ExpCompileException( + t, + "An ExpNode for function calling is needed, but a token was popped"); + } + } else + { + throw new NotImplementedException(); + + // uncertain case here + } + default: + throw new NotImplementedException(); + } + } + + private bool TryGenerateBinaryNode(Token t, out ExpSyntaxNode node) + { + ExpSyntaxNode right = GetNextOperandCache(); + ExpSyntaxNode left = GetNextOperandCache(); + switch (t.Value) + { + case ExpKeyword.Add: + node = ExpBinaryOperatorNode.Add(t, left, right); + return true; + case ExpKeyword.Sub: + node = ExpBinaryOperatorNode.Sub(t, left, right); + return true; + case ExpKeyword.Mul: + node = ExpBinaryOperatorNode.Mul(t, left, right); + return true; + case ExpKeyword.Div: + node = ExpBinaryOperatorNode.Div(t, left, right); + return true; + case ExpKeyword.Equal: + node = ExpBinaryOperatorNode.EqualTo(t, left, right); + return true; + case ExpKeyword.NotEqual: + node = ExpBinaryOperatorNode.NotEqualTo(t, left, right); + return true; + case ExpKeyword.GreaterThan: + node = ExpBinaryOperatorNode.GreaterThan(t, left, right); + return true; + case ExpKeyword.LessThan: + node = ExpBinaryOperatorNode.LessThan(t, left, right); + return true; + case ExpKeyword.Assignment: + node = ExpBinaryOperatorNode.Assign(t, left, right); + return true; + case ExpKeyword.InstanceEqual: + node = ExpBinaryOperatorNode.CompareInstanceEqual(t, left, right); + return true; + case ExpKeyword.InstanceNotEqual: + node = ExpBinaryOperatorNode.CompareInstanceNotEqual(t, left, right); + return true; + default: + node = ExpSyntaxNode.Empty; + return false; + } + } + + } +} diff --git a/StgSharp.Script/Express/ExpSyntaxAnalyzer.RangeAndIndex.cs b/StgSharp.Script/Express/ExpSyntaxAnalyzer.RangeAndIndex.cs index 0c85f781..4342594d 100644 --- a/StgSharp.Script/Express/ExpSyntaxAnalyzer.RangeAndIndex.cs +++ b/StgSharp.Script/Express/ExpSyntaxAnalyzer.RangeAndIndex.cs @@ -1,120 +1,120 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpSyntaxAnalyzer.RangeAndIndex" -// 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 Microsoft.CodeAnalysis.Operations; - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword; - -namespace StgSharp.Script.Express -{ - public partial class ExpSyntaxAnalyzer - { - - private void AppendToken_RangeAndIndex(Token t) - { - ExpSyntaxNode root; - switch (t.Value) - { - case "[": - RangeAndIndexState state = new RangeAndIndexState(); - state.CurrentState = t.Value; - _cache.CurrentDepthMark.StateCache = state; - break; - case "]": - state = _cache.StateOfCurrentDepth(); - - // Generate range or index object - if (_cache.StatementsInDepth.Count != 0) - { - throw new ExpInvalidSyntaxException( - "Range and index syntax error: expected one statement to define range beginning."); - } - ReverseAnalyzeStatement(); - root = _cache.StatementsInDepth.Pop(); - if (ExpNodeFlag.BuiltinType_Int.IsNotInFlag(root.NodeFlag)) { - throw new ExpInvalidTypeException( - root, "integer", root.EqualityTypeConvert?.Name ?? string.Empty); - } - if (state.CurrentState == "[") { } else { } - break; - case ":": - state = _cache.StateOfCurrentDepth(); - if (state.CurrentState != "[") { - throw new ExpInvalidSyntaxException( - "Range and index syntax error: wrong position of :"); - } - if (_cache.StatementsInDepth.Count != 0) { - throw new ExpInvalidSyntaxException( - "Range and index syntax error: expected one statement to define range beginning."); - } - ReverseAnalyzeStatement(); - root = _cache.StatementsInDepth.Pop(); - if (ExpNodeFlag.BuiltinType_Int.IsNotInFlag(root.NodeFlag)) { - throw new ExpInvalidTypeException( - root, "integer", root.EqualityTypeConvert?.Name ?? string.Empty); - } - state.RangeStart = root; - break; - default: - state = _cache.StateOfCurrentDepth(); - if (t.Value == "?") - { - switch (state.CurrentState) - { - case ":": - _cache.PushOperand(new ExpIntNode(t, int.MaxValue, true)); - break; - case "[": - _cache.PushOperand(new ExpIntNode(t, int.MaxValue, true)); - break; - default: - throw new ExpInvalidSyntaxException( - "Range and index syntax error: \"?\" can only be used in range or index"); - } - } - AppendToken_Common(t); - break; - } - } - - private class RangeAndIndexState : ICompileDepthState - { - - public ExpSyntaxNode RangeStart { get; set; } - - public string CurrentState { get; set; } = string.Empty; - - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpSyntaxAnalyzer.RangeAndIndex" +// 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 Microsoft.CodeAnalysis.Operations; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword; + +namespace StgSharp.Script.Express +{ + public partial class ExpSyntaxAnalyzer + { + + private void AppendToken_RangeAndIndex(Token t) + { + ExpSyntaxNode root; + switch (t.Value) + { + case "[": + RangeAndIndexState state = new RangeAndIndexState(); + state.CurrentState = t.Value; + _cache.CurrentDepthMark.StateCache = state; + break; + case "]": + state = _cache.StateOfCurrentDepth(); + + // Generate range or index object + if (_cache.StatementsInDepth.Count != 0) + { + throw new ExpInvalidSyntaxException( + "Range and index syntax error: expected one statement to define range beginning."); + } + ReverseAnalyzeStatement(); + root = _cache.StatementsInDepth.Pop(); + if (ExpNodeFlag.BuiltinType_Int.IsNotInFlag(root.NodeFlag)) { + throw new ExpInvalidTypeException( + root, "integer", root.EqualityTypeConvert?.Name ?? string.Empty); + } + if (state.CurrentState == "[") { } else { } + break; + case ":": + state = _cache.StateOfCurrentDepth(); + if (state.CurrentState != "[") { + throw new ExpInvalidSyntaxException( + "Range and index syntax error: wrong position of :"); + } + if (_cache.StatementsInDepth.Count != 0) { + throw new ExpInvalidSyntaxException( + "Range and index syntax error: expected one statement to define range beginning."); + } + ReverseAnalyzeStatement(); + root = _cache.StatementsInDepth.Pop(); + if (ExpNodeFlag.BuiltinType_Int.IsNotInFlag(root.NodeFlag)) { + throw new ExpInvalidTypeException( + root, "integer", root.EqualityTypeConvert?.Name ?? string.Empty); + } + state.RangeStart = root; + break; + default: + state = _cache.StateOfCurrentDepth(); + if (t.Value == "?") + { + switch (state.CurrentState) + { + case ":": + _cache.PushOperand(new ExpIntNode(t, int.MaxValue, true)); + break; + case "[": + _cache.PushOperand(new ExpIntNode(t, int.MaxValue, true)); + break; + default: + throw new ExpInvalidSyntaxException( + "Range and index syntax error: \"?\" can only be used in range or index"); + } + } + AppendToken_Common(t); + break; + } + } + + private class RangeAndIndexState : ICompileDepthState + { + + public ExpSyntaxNode RangeStart { get; set; } + + public string CurrentState { get; set; } = string.Empty; + + } + + } +} diff --git a/StgSharp.Script/Express/ExpSyntaxAnalyzer.RepeatLoop.cs b/StgSharp.Script/Express/ExpSyntaxAnalyzer.RepeatLoop.cs index ae7f4570..e3b314ab 100644 --- a/StgSharp.Script/Express/ExpSyntaxAnalyzer.RepeatLoop.cs +++ b/StgSharp.Script/Express/ExpSyntaxAnalyzer.RepeatLoop.cs @@ -1,283 +1,283 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpSyntaxAnalyzer.RepeatLoop" -// 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 Microsoft.CodeAnalysis.CSharp.Syntax; - -using System; -using System.Collections.Generic; -using System.ComponentModel.Design.Serialization; -using System.Linq; -using System.Resources; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - -using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword; - -namespace StgSharp.Script.Express -{ - public partial class ExpSyntaxAnalyzer - { - - private Dictionary _tempVariableInLoops { get; } - = new Dictionary(); - - private bool AppendToken_RepeatLoop(Token t) - { - RepeatLoopState state = _cache.StateOfCurrentDepth(); - if (state == null) - { - state = new RepeatLoopState(t); - _cache.CurrentDepthMark.StateCache = state; - state.CurrentState = t.Value; - return true; - } - switch (state.CurrentState) - { - case ExpKeyword.Repeat: - return TryParseRepeatVariable(state, t); - case ExpKeyword.To: - return TryParseRepeatEnding(state, t); - case ExpKeyword.By: - return TryParseRepeatVariable(state, t); - case ExpKeyword.Until: - return TryParseRepeatUntilRegulation(state, t); - case ExpKeyword.Assignment: - return TryParseRepeatBeginning(state, t); - case ExpKeyword.While: - return TryParseRepeatWhileRegulation(state, t); - case ExpKeyword.Semicolon: - if (t.Value != ExpKeyword.EndRepeat) - { - AppendToken_Common(t); - return true; - } - break; - default: - AppendToken_Common(t); - return false; - } - ExpSyntaxNode root = _cache.PackAllStatements(); - state.Body = root; - _cache.DecreaseDepth(); - if (ExpTypeSource.IsNullOrVoid(state.IncrementVariableType)) - { - root = ExpRepeatNode.Create( - state.Position, state.IncrementVariable, state.Begin, state.End, state.IncrementVariable, - state.Body, state.UntilExpression, state.WhileExpression); - } else - { - root = ExpRepeatNode.Create( - state.Position, state.IncrementVariable.OriginObject, state.Begin, state.End, - state.IncrementVariable, state.Body, state.UntilExpression, state.WhileExpression); - } - _cache.StatementsInDepth.Push(root); - _tempVariableInLoops.Remove(state.IncrementVariable.CodeConvertTemplate); - return true; - } - - private bool TryParseRepeatBeginning(RepeatLoopState state, Token t) - { - switch (t.Value) - { - case ExpKeyword.To: - state.CurrentState = ExpKeyword.To; - while (_cache.TryPopOperator(out Token op)) { - ConvertAndPushOneOperator(op); - } - _cache.PopOperand(out _, out ExpSyntaxNode? root); - state.Begin = root; - return true; - default: - AppendToken_Common(t); - return true; - } - } - - private bool TryParseRepeatEnding(RepeatLoopState state, Token t) - { - switch (t.Value) - { - case ExpKeyword.By: - state.CurrentState = ExpKeyword.By; - break; - case ExpKeyword.Until: - state.CurrentState = ExpKeyword.Until; - break; - case ExpKeyword.While: - state.CurrentState = ExpKeyword.While; - break; - default: - AppendToken_Common(t); - return true; - } - while (_cache.TryPopOperator(out Token op)) { - ConvertAndPushOneOperator(op); - } - _cache.PopOperand(out _, out ExpSyntaxNode? root); - state.End = root; - return true; - } - - private bool TryParseRepeatIncrement(RepeatLoopState state, Token t) - { - switch (t.Value) - { - case ExpKeyword.Semicolon: - state.CurrentState = ExpKeyword.Semicolon; - break; - case ExpKeyword.Until: - state.CurrentState = ExpKeyword.Until; - break; - case ExpKeyword.While: - state.CurrentState = ExpKeyword.While; - break; - default: - AppendToken_Common(t); - return true; - } - while (_cache.TryPopOperator(out Token op)) { - ConvertAndPushOneOperator(op); - } - _cache.PopOperand(out _, out ExpSyntaxNode? root); - state.StepIncrement = root; - return true; - } - - private bool TryParseRepeatUntilRegulation(RepeatLoopState state, Token t) - { - switch (t.Value) - { - case ExpKeyword.Semicolon: - state.CurrentState = ExpKeyword.Semicolon; - break; - default: - AppendToken_Common(t); - return true; - } - while (_cache.TryPopOperator(out Token op)) { - ConvertAndPushOneOperator(op); - } - _cache.PopOperand(out _, out ExpSyntaxNode? root); - state.UntilExpression = root; - return true; - } - - private bool TryParseRepeatVariable(RepeatLoopState state, Token t) - { - switch (t.Value) - { - case ExpKeyword.Integer: - state.IncrementVariableType = ExpressCompile.ExpInt; - return true; - case - ExpKeyword.Real: - state.IncrementVariableType = ExpressCompile.ExpReal; - return true; - case ExpKeyword.Assignment: - state.CurrentState = ExpKeyword.Assignment; - return true; - default: - if (ExpTypeSource.IsNullOrVoid(state.IncrementVariableType)) - { - if ((_local.TryGetMember(t.Value, - out ExpSyntaxNode? node) && - node is ExpElementInstance instance) || - _tempVariableInLoops.TryGetValue(t.Value, out instance)) - { - state.IncrementVariable = ExpInstanceReferenceNode.MakeReferenceFrom( - t, instance); - return true; - } else - { - throw new ExpInvalidSyntaxException( - $"Variable {t.Value} is not declared or initialized."); - } - } else - { - ExpElementInstance variable = state.IncrementVariableType.CreateInstanceNode(t); - _tempVariableInLoops.Add(t.Value, variable); - state.IncrementVariable = ExpInstanceReferenceNode.MakeReferenceFrom( - t, variable); - return true; - } - } - } - - private bool TryParseRepeatWhileRegulation(RepeatLoopState state, Token t) - { - switch (t.Value) - { - case ExpKeyword.Until: - state.CurrentState = ExpKeyword.Until; - break; - default: - AppendToken_Common(t); - return true; - } - while (_cache.TryPopOperator(out Token op)) { - ConvertAndPushOneOperator(op); - } - _cache.PopOperand(out _, out ExpSyntaxNode? root); - state.WhileExpression = root; - return true; - } - - private class RepeatLoopState : ICompileDepthState - { - - public RepeatLoopState(Token t) - { - Position = t; - UntilExpression = ExpSyntaxNode.Empty; - WhileExpression = ExpSyntaxNode.Empty; - } - - public ExpInstanceReferenceNode IncrementVariable { get; set; } - - public ExpSyntaxNode StepIncrement { get; set; } - - public ExpSyntaxNode Begin { get; set; } - - public ExpSyntaxNode End { get; set; } - - public ExpSyntaxNode UntilExpression { get; set; } - - public ExpSyntaxNode WhileExpression { get; set; } - - public ExpSyntaxNode Body { get; set; } - - public ExpTypeSource IncrementVariableType { get; set; } - - public string CurrentState { get; set; } - - public Token Position { get; set; } - - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpSyntaxAnalyzer.RepeatLoop" +// 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 Microsoft.CodeAnalysis.CSharp.Syntax; + +using System; +using System.Collections.Generic; +using System.ComponentModel.Design.Serialization; +using System.Linq; +using System.Resources; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword; + +namespace StgSharp.Script.Express +{ + public partial class ExpSyntaxAnalyzer + { + + private Dictionary _tempVariableInLoops { get; } + = new Dictionary(); + + private bool AppendToken_RepeatLoop(Token t) + { + RepeatLoopState state = _cache.StateOfCurrentDepth(); + if (state == null) + { + state = new RepeatLoopState(t); + _cache.CurrentDepthMark.StateCache = state; + state.CurrentState = t.Value; + return true; + } + switch (state.CurrentState) + { + case ExpKeyword.Repeat: + return TryParseRepeatVariable(state, t); + case ExpKeyword.To: + return TryParseRepeatEnding(state, t); + case ExpKeyword.By: + return TryParseRepeatVariable(state, t); + case ExpKeyword.Until: + return TryParseRepeatUntilRegulation(state, t); + case ExpKeyword.Assignment: + return TryParseRepeatBeginning(state, t); + case ExpKeyword.While: + return TryParseRepeatWhileRegulation(state, t); + case ExpKeyword.Semicolon: + if (t.Value != ExpKeyword.EndRepeat) + { + AppendToken_Common(t); + return true; + } + break; + default: + AppendToken_Common(t); + return false; + } + ExpSyntaxNode root = _cache.PackAllStatements(); + state.Body = root; + _cache.DecreaseDepth(); + if (ExpTypeSource.IsNullOrVoid(state.IncrementVariableType)) + { + root = ExpRepeatNode.Create( + state.Position, state.IncrementVariable, state.Begin, state.End, state.IncrementVariable, + state.Body, state.UntilExpression, state.WhileExpression); + } else + { + root = ExpRepeatNode.Create( + state.Position, state.IncrementVariable.OriginObject, state.Begin, state.End, + state.IncrementVariable, state.Body, state.UntilExpression, state.WhileExpression); + } + _cache.StatementsInDepth.Push(root); + _tempVariableInLoops.Remove(state.IncrementVariable.CodeConvertTemplate); + return true; + } + + private bool TryParseRepeatBeginning(RepeatLoopState state, Token t) + { + switch (t.Value) + { + case ExpKeyword.To: + state.CurrentState = ExpKeyword.To; + while (_cache.TryPopOperator(out Token op)) { + ConvertAndPushOneOperator(op); + } + _cache.PopOperand(out _, out ExpSyntaxNode? root); + state.Begin = root; + return true; + default: + AppendToken_Common(t); + return true; + } + } + + private bool TryParseRepeatEnding(RepeatLoopState state, Token t) + { + switch (t.Value) + { + case ExpKeyword.By: + state.CurrentState = ExpKeyword.By; + break; + case ExpKeyword.Until: + state.CurrentState = ExpKeyword.Until; + break; + case ExpKeyword.While: + state.CurrentState = ExpKeyword.While; + break; + default: + AppendToken_Common(t); + return true; + } + while (_cache.TryPopOperator(out Token op)) { + ConvertAndPushOneOperator(op); + } + _cache.PopOperand(out _, out ExpSyntaxNode? root); + state.End = root; + return true; + } + + private bool TryParseRepeatIncrement(RepeatLoopState state, Token t) + { + switch (t.Value) + { + case ExpKeyword.Semicolon: + state.CurrentState = ExpKeyword.Semicolon; + break; + case ExpKeyword.Until: + state.CurrentState = ExpKeyword.Until; + break; + case ExpKeyword.While: + state.CurrentState = ExpKeyword.While; + break; + default: + AppendToken_Common(t); + return true; + } + while (_cache.TryPopOperator(out Token op)) { + ConvertAndPushOneOperator(op); + } + _cache.PopOperand(out _, out ExpSyntaxNode? root); + state.StepIncrement = root; + return true; + } + + private bool TryParseRepeatUntilRegulation(RepeatLoopState state, Token t) + { + switch (t.Value) + { + case ExpKeyword.Semicolon: + state.CurrentState = ExpKeyword.Semicolon; + break; + default: + AppendToken_Common(t); + return true; + } + while (_cache.TryPopOperator(out Token op)) { + ConvertAndPushOneOperator(op); + } + _cache.PopOperand(out _, out ExpSyntaxNode? root); + state.UntilExpression = root; + return true; + } + + private bool TryParseRepeatVariable(RepeatLoopState state, Token t) + { + switch (t.Value) + { + case ExpKeyword.Integer: + state.IncrementVariableType = ExpressCompile.ExpInt; + return true; + case + ExpKeyword.Real: + state.IncrementVariableType = ExpressCompile.ExpReal; + return true; + case ExpKeyword.Assignment: + state.CurrentState = ExpKeyword.Assignment; + return true; + default: + if (ExpTypeSource.IsNullOrVoid(state.IncrementVariableType)) + { + if ((_local.TryGetMember(t.Value, + out ExpSyntaxNode? node) && + node is ExpElementInstance instance) || + _tempVariableInLoops.TryGetValue(t.Value, out instance)) + { + state.IncrementVariable = ExpInstanceReferenceNode.MakeReferenceFrom( + t, instance); + return true; + } else + { + throw new ExpInvalidSyntaxException( + $"Variable {t.Value} is not declared or initialized."); + } + } else + { + ExpElementInstance variable = state.IncrementVariableType.CreateInstanceNode(t); + _tempVariableInLoops.Add(t.Value, variable); + state.IncrementVariable = ExpInstanceReferenceNode.MakeReferenceFrom( + t, variable); + return true; + } + } + } + + private bool TryParseRepeatWhileRegulation(RepeatLoopState state, Token t) + { + switch (t.Value) + { + case ExpKeyword.Until: + state.CurrentState = ExpKeyword.Until; + break; + default: + AppendToken_Common(t); + return true; + } + while (_cache.TryPopOperator(out Token op)) { + ConvertAndPushOneOperator(op); + } + _cache.PopOperand(out _, out ExpSyntaxNode? root); + state.WhileExpression = root; + return true; + } + + private class RepeatLoopState : ICompileDepthState + { + + public RepeatLoopState(Token t) + { + Position = t; + UntilExpression = ExpSyntaxNode.Empty; + WhileExpression = ExpSyntaxNode.Empty; + } + + public ExpInstanceReferenceNode IncrementVariable { get; set; } + + public ExpSyntaxNode StepIncrement { get; set; } + + public ExpSyntaxNode Begin { get; set; } + + public ExpSyntaxNode End { get; set; } + + public ExpSyntaxNode UntilExpression { get; set; } + + public ExpSyntaxNode WhileExpression { get; set; } + + public ExpSyntaxNode Body { get; set; } + + public ExpTypeSource IncrementVariableType { get; set; } + + public string CurrentState { get; set; } + + public Token Position { get; set; } + + } + + } +} diff --git a/StgSharp.Script/Express/ExpSyntaxAnalyzer.ReverseAnalysing.cs b/StgSharp.Script/Express/ExpSyntaxAnalyzer.ReverseAnalysing.cs index ff179e3a..5482ab21 100644 --- a/StgSharp.Script/Express/ExpSyntaxAnalyzer.ReverseAnalysing.cs +++ b/StgSharp.Script/Express/ExpSyntaxAnalyzer.ReverseAnalysing.cs @@ -1,91 +1,91 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpSyntaxAnalyzer.ReverseAnalysing" -// 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 System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword; - -namespace StgSharp.Script.Express -{ - public partial class ExpSyntaxAnalyzer - { - - private void ClosePrefixReverse(Token rightSeparator) - { - ExpSyntaxNode root; - ReverseAnalyzeStatement(); - root = _cache.PackAllStatements(); - if (rightSeparator.Value == ")") { - root = ExpTupleNode.Pack(root); - } - _cache.DecreaseDepth(); - if (IsSeparatorMatch(_cache.PeekOperator(), rightSeparator)) - { - _cache.PopOperator(); - _cache.PushOperand(root); - } else - { - throw new ExpCompileException( - rightSeparator, "Ending of block does not match its begging"); - } - } - - private void ReverseAnalyzeStatement() - { - ExpSyntaxNode root; - if (_cache.OperatorAheadOfDepth == 0) - { - switch (_cache.OperandAheadOfDepth) - { - case 1: - _cache.PopOperand(out _, out ExpSyntaxNode? statement); - _cache.StatementsInDepth.Push(statement); - break; - case 0: - _cache.StatementsInDepth.Push(ExpSyntaxNode.Empty); - break; - default: - throw new ExpInvalidSyntaxException( - "More than one operand but no operator provided."); - } - } else - { - while (_cache.TryPopOperator(out Token op)) { - ConvertAndPushOneOperator(op); - } - _cache.PopOperand(out _, out root); - _cache.StatementsInDepth.Push(root); - } - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpSyntaxAnalyzer.ReverseAnalysing" +// 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 System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword; + +namespace StgSharp.Script.Express +{ + public partial class ExpSyntaxAnalyzer + { + + private void ClosePrefixReverse(Token rightSeparator) + { + ExpSyntaxNode root; + ReverseAnalyzeStatement(); + root = _cache.PackAllStatements(); + if (rightSeparator.Value == ")") { + root = ExpTupleNode.Pack(root); + } + _cache.DecreaseDepth(); + if (IsSeparatorMatch(_cache.PeekOperator(), rightSeparator)) + { + _cache.PopOperator(); + _cache.PushOperand(root); + } else + { + throw new ExpCompileException( + rightSeparator, "Ending of block does not match its begging"); + } + } + + private void ReverseAnalyzeStatement() + { + ExpSyntaxNode root; + if (_cache.OperatorAheadOfDepth == 0) + { + switch (_cache.OperandAheadOfDepth) + { + case 1: + _cache.PopOperand(out _, out ExpSyntaxNode? statement); + _cache.StatementsInDepth.Push(statement); + break; + case 0: + _cache.StatementsInDepth.Push(ExpSyntaxNode.Empty); + break; + default: + throw new ExpInvalidSyntaxException( + "More than one operand but no operator provided."); + } + } else + { + while (_cache.TryPopOperator(out Token op)) { + ConvertAndPushOneOperator(op); + } + _cache.PopOperand(out _, out root); + _cache.StatementsInDepth.Push(root); + } + } + + } +} diff --git a/StgSharp.Script/Express/ExpSyntaxAnalyzer.cs b/StgSharp.Script/Express/ExpSyntaxAnalyzer.cs index c5e82bbe..3cee7cfa 100644 --- a/StgSharp.Script/Express/ExpSyntaxAnalyzer.cs +++ b/StgSharp.Script/Express/ExpSyntaxAnalyzer.cs @@ -1,180 +1,180 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpSyntaxAnalyzer" -// 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 Microsoft.CodeAnalysis.CSharp.Syntax; - -using StgSharp.Threading; - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO.Pipes; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword; - -namespace StgSharp.Script.Express -{ - public partial class ExpSyntaxAnalyzer : ISyntaxAnalyzer - { - - private const int EndLine = 1; - private const int TokenGenerated = 0; - private const int TokenTypeNotMatch = -1; - - private CompileStack _cache; - private ExpSchema _context; - private ExpSyntaxNode _lastStatement; - private IExpElementSource _local; - - public ExpSyntaxAnalyzer() - { - _cache = new CompileStack(); - } - - public ExpSyntaxAnalyzer(ExpSchema context, IExpElementSource local) - { - _cache = new CompileStack(); - ArgumentNullException.ThrowIfNull(context); - if (context is not ExpSchema_Builtin) - { - _context = context; - } else - { - throw new InvalidCastException("Not a valid Schema type"); - } - _local = local; - } - - /**/ - public void AppendToken(Token expToken) - { - switch ((ExpCompileStateCode)TryEnterBranch(expToken).Usage) - { - case ExpCompileStateCode.IfBranch: - AppendToken_IfBranch(expToken); - break; - case ExpCompileStateCode.CaseBranch: - AppendToken_CaseOf(expToken); - break; - case ExpCompileStateCode.RepeatLoop: - AppendToken_RepeatLoop(expToken); - break; - default: - AppendToken_Common(expToken); - break; - } - } - - public ExpSyntaxNode GetNextOperandCache() - { - if (_cache.PopOperand(out Token t, out ExpSyntaxNode? n)) - { - return n; - } else - { - // process some rare case here - } - - throw new NotImplementedException(); - } - - /// - /// Append a token to top of cache. This method will automatically convert token to node - /// if meets separators or operators. - /// - private void AppendToken_Common(Token expToken) - { - switch (expToken.Flag) - { - case TokenFlag.Symbol_Unary or TokenFlag.Symbol_Binary: - TryAppendSymbol(expToken); - break; - case TokenFlag.Number or TokenFlag.String: - ExpElementInstance node = ExpElementInstance.CreateLiteral(expToken); - _cache.PushOperand(node); - break; - case TokenFlag.Separator_Left: - TryAppendPrefixSeparator(expToken); - break; - case TokenFlag.Separator_Right: - TryAppendPrefixSeparatorEnd(expToken); - break; - case TokenFlag.Separator_Middle: - TryAppendMiddleSeparator(expToken); - break; - case TokenFlag.Index_Left: - TryAppendIndexLeft(expToken); - break; - case TokenFlag.Index_Right: - TryAppendIndexRight(expToken); - break; - case TokenFlag.Member: - TryAppendMember(expToken); - break; - default: - break; - } - } - - private CompileDepthMark TryEnterBranch(Token t) - { - if (t.Flag == TokenFlag.String) { - return _cache.CurrentDepthMark; - } - switch (t.Value) - { - case ExpKeyword.Case: - return _cache.IncreaseDepth((int)ExpCompileStateCode.CaseBranch); - case ExpKeyword.If: - return _cache.IncreaseDepth((int)ExpCompileStateCode.IfBranch); - case ExpKeyword.Repeat: - return _cache.IncreaseDepth((int)ExpCompileStateCode.RepeatLoop); - default: - return _cache.CurrentDepthMark; - } - } - - /**/ - - public enum ExpCompileStateCode - { - - Common, - ForLoop, - RepeatLoop, - UntilLoop, - IfBranch, - CaseBranch, - CollectionIndex, - - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpSyntaxAnalyzer" +// 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 Microsoft.CodeAnalysis.CSharp.Syntax; + +using StgSharp.Threading; + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO.Pipes; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword; + +namespace StgSharp.Script.Express +{ + public partial class ExpSyntaxAnalyzer : ISyntaxAnalyzer + { + + private const int EndLine = 1; + private const int TokenGenerated = 0; + private const int TokenTypeNotMatch = -1; + + private CompileStack _cache; + private ExpSchema _context; + private ExpSyntaxNode _lastStatement; + private IExpElementSource _local; + + public ExpSyntaxAnalyzer() + { + _cache = new CompileStack(); + } + + public ExpSyntaxAnalyzer(ExpSchema context, IExpElementSource local) + { + _cache = new CompileStack(); + ArgumentNullException.ThrowIfNull(context); + if (context is not ExpSchema_Builtin) + { + _context = context; + } else + { + throw new InvalidCastException("Not a valid Schema type"); + } + _local = local; + } + + /**/ + public void AppendToken(Token expToken) + { + switch ((ExpCompileStateCode)TryEnterBranch(expToken).Usage) + { + case ExpCompileStateCode.IfBranch: + AppendToken_IfBranch(expToken); + break; + case ExpCompileStateCode.CaseBranch: + AppendToken_CaseOf(expToken); + break; + case ExpCompileStateCode.RepeatLoop: + AppendToken_RepeatLoop(expToken); + break; + default: + AppendToken_Common(expToken); + break; + } + } + + public ExpSyntaxNode GetNextOperandCache() + { + if (_cache.PopOperand(out Token t, out ExpSyntaxNode? n)) + { + return n; + } else + { + // process some rare case here + } + + throw new NotImplementedException(); + } + + /// + /// Append a token to top of cache. This method will automatically convert token to node + /// if meets separators or operators. + /// + private void AppendToken_Common(Token expToken) + { + switch (expToken.Flag) + { + case TokenFlag.Symbol_Unary or TokenFlag.Symbol_Binary: + TryAppendSymbol(expToken); + break; + case TokenFlag.Number or TokenFlag.String: + ExpElementInstance node = ExpElementInstance.CreateLiteral(expToken); + _cache.PushOperand(node); + break; + case TokenFlag.Separator_Left: + TryAppendPrefixSeparator(expToken); + break; + case TokenFlag.Separator_Right: + TryAppendPrefixSeparatorEnd(expToken); + break; + case TokenFlag.Separator_Middle: + TryAppendMiddleSeparator(expToken); + break; + case TokenFlag.Index_Left: + TryAppendIndexLeft(expToken); + break; + case TokenFlag.Index_Right: + TryAppendIndexRight(expToken); + break; + case TokenFlag.Member: + TryAppendMember(expToken); + break; + default: + break; + } + } + + private CompileDepthMark TryEnterBranch(Token t) + { + if (t.Flag == TokenFlag.String) { + return _cache.CurrentDepthMark; + } + switch (t.Value) + { + case ExpKeyword.Case: + return _cache.IncreaseDepth((int)ExpCompileStateCode.CaseBranch); + case ExpKeyword.If: + return _cache.IncreaseDepth((int)ExpCompileStateCode.IfBranch); + case ExpKeyword.Repeat: + return _cache.IncreaseDepth((int)ExpCompileStateCode.RepeatLoop); + default: + return _cache.CurrentDepthMark; + } + } + + /**/ + + public enum ExpCompileStateCode + { + + Common, + ForLoop, + RepeatLoop, + UntilLoop, + IfBranch, + CaseBranch, + CollectionIndex, + + } + + } +} diff --git a/StgSharp.Script/Express/ExpTokenReader.cs b/StgSharp.Script/Express/ExpTokenReader.cs index 1e622e35..5d7afd29 100644 --- a/StgSharp.Script/Express/ExpTokenReader.cs +++ b/StgSharp.Script/Express/ExpTokenReader.cs @@ -1,411 +1,411 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="ExpTokenReader" -// 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 CommunityToolkit.HighPerformance; - -using StgSharp.HighPerformance; - -using System; -using System.Linq; -using System.Text.RegularExpressions; - -namespace StgSharp.Script.Express -{ - public abstract class ExpTokenReaderPreProcessor - { - - public static ExpTokenReaderPreProcessor Default { get; } = new DefaultProcessor(); - - public abstract bool Process(string codeLine, int line, ref int current, out Token t); - - private class DefaultProcessor : ExpTokenReaderPreProcessor - { - - public override bool Process(string codeLine, int line, ref int current, out Token t) - { - t = Token.Empty; - return false; - } - - } - - } - - public partial class ExpTokenReader : IScriptTokenReader - { - - private const int - MultiLineEnd = 0x0029002A; // *) - - private const string TokenMark = "token", EndMark = "end", RestMark = "rest"; - - private bool _isReadingMultiLineComment; - private int _current, _lineNum; - private IScriptSourceProvider _provider; - - private Regex - _nextWordTokenPattern = GetNextWordTokenPattern(), - _nextStringLiteralPattern = GetStringLiteralPattern(), - _nextNumberLiteralPattern = GetNumberLiteralPattern(), - _nextStringLiteralPatternWithSingle = GetStringLiteralPatternWithSingle(), - _skipBlankPattern = GetSkipBlankPattern(), - _nextSymbolPattern = GetSymbolPattern(); - private string _lineCache; - private Token _last; - - public ExpTokenReader(IScriptSourceProvider provider) - { - _provider = provider; - _current = 0; - _lineCache = string.Empty; - _isReadingMultiLineComment = false; - } - - public bool IsEmpty - { - get => ((string.IsNullOrEmpty(_lineCache) || _current >= _lineCache.Length)) && _provider.IsEmpty; - } - - public ExpTokenReaderPreProcessor TokenReaderPreProcessor { get; set; } = ExpTokenReaderPreProcessor.Default; - - public int LineNumber - { - get => _provider.Location; - } - - public unsafe ReadOnlySpan ReadLine() - { - bool lineOver = string.IsNullOrEmpty(_lineCache) || _current >= _lineCache.Length; - while (lineOver || _isReadingMultiLineComment) - { - if (IsEmpty) { - return ReadOnlySpan.Empty; - } - if (lineOver) - { - do - { - _lineCache = _provider.ReadLine(out _lineNum); - } while (string.IsNullOrEmpty(_lineCache) && !_provider.IsEmpty); - _current = 0; - } - if (_isReadingMultiLineComment) - { - int index; - fixed (char* cPtr = _lineCache.AsSpan(_current)) { - index = UnsafeCompute.IndexOfCharPair( - cPtr, MultiLineEnd, _lineCache.Length); - } - if (index == -1) - { - _lineCache = string.Empty; - } else - { - _isReadingMultiLineComment = false; - _current += index + 2; - } - } - lineOver = string.IsNullOrEmpty(_lineCache) || _current >= _lineCache.Length; - } - return _lineCache.AsSpan().Slice(_current); - } - - public unsafe Token ReadToken() - { - int begin, end, rest; - readLine: - ReadOnlySpan source; - if (!TryReadLine(out source)) { - return Token.Empty; - } - if (TokenReaderPreProcessor.Process(_lineCache, LineNumber, ref _current, - out Token t)) { - return t; - } - char c = source[0]; - if (char.IsLetter(c)) - { - Match match = _nextWordTokenPattern.Match(_lineCache, _current); - if (match.Success) - { - begin = match.Groups[TokenMark].Index; - end = match.Groups[EndMark].Index; - rest = match.Groups[RestMark].Index; - _current = rest; - _last = new( - ExpressCompile.PoolString(source[..(end - begin)]), _lineNum, begin, - TokenFlag.Member); - return _last; - } else - { - throw new ExpInvalidCharException(_current); - } - } else if (char.IsPunctuation(c) || char.IsSymbol(c)) - { - Match match; - switch (c) - { - case '\'': - char cNext = source[1]; - if (cNext == '\'') //empty string - { - begin = _current; - _current += 2; - return new(string.Empty, _lineNum, begin, TokenFlag.String); - } - match = _nextStringLiteralPatternWithSingle.Match(_lineCache, _current); - if (match.Success) - { - begin = match.Groups["token"].Index; - end = match.Groups["end"].Index; - rest = match.Groups["rest"].Index; - _current = rest; - _last = new( - ExpressCompile.PoolString(source[1..(end - begin)]), _lineNum, - begin, TokenFlag.String); - return _last; - } else - { - throw new ExpInvalidCharException('\"'); - } - case '"': - cNext = source[1]; - if (cNext == '\"') //empty string - { - begin = _current; - _current += 2; - return new(string.Empty, _lineNum, begin, TokenFlag.String); - } - match = _nextStringLiteralPattern.Match(_lineCache, _current); - if (match.Success) - { - begin = match.Groups["token"].Index; - end = match.Groups["end"].Index; - rest = match.Groups["rest"].Index; - _current = rest; - _last = new( - ExpressCompile.PoolString(source[1..(end - begin)]), _lineNum, - begin, TokenFlag.String); - return _last; - } else - { - throw new ExpInvalidCharException('\"'); - } - case '(': - begin = _current; - _current++; - _last = new( - ExpressCompile.PoolString(source[..1]), _lineNum, begin, - TokenFlag.Separator_Left); - return _last; - case ')' or '}': - begin = _current; - _current++; - _last = new Token( - ExpressCompile.PoolString(source[..1]), _lineNum, begin, - TokenFlag.Separator_Right); - return _last; - case '-': - - // 1. - number - // 2. -- comment - // 3. - number type param(UNARY) - // 4. param - param(BINARY) - cNext = source[1]; - if (char.IsNumber(cNext)) - { - match = _nextNumberLiteralPattern.Match(_lineCache, _current); - if (match.Success) - { - begin = match.Groups[TokenMark].Index; - end = match.Groups[EndMark].Index; - rest = match.Groups[RestMark].Index; - _current = rest; - return new( - ExpressCompile.PoolString(source[..(end - begin)]), - _lineNum, begin, TokenFlag.Number); - } else - { - throw new ExpInvalidCharException(_current); - } - } else if (cNext == '-') - { - _lineCache = string.Empty; - _current = 0; - goto readLine; - } else - { - begin = _current; - _current++; - if (_last.Flag == TokenFlag.Member || - _last.Flag == TokenFlag.Index_Right || - _last.Flag == TokenFlag.Separator_Right) - { - _last = new( - ExpressCompile.PoolString(source[..1]), _lineNum, begin, - TokenFlag.Symbol_Binary); - } else - { - _last = new( - ExpressCompile.PoolString(source[..1]), _lineNum, begin, - TokenFlag.Symbol_Unary); - } - return _last; - } - case '{': - begin = _current; - _current++; - _last = new Token( - ExpressCompile.PoolString("{"), _lineNum, begin, - TokenFlag.Separator_Left); - return _last; - case '[': - begin = _current; - _current++; - _last = new Token( - ExpressCompile.PoolString("["), _lineNum, begin, - TokenFlag.Index_Left); - return _last; - case ']': - begin = _current; - _current++; - _last = new Token( - ExpressCompile.PoolString("]"), _lineNum, begin, - TokenFlag.Index_Right); - return _last; - case ';' or ',': - begin = _current; - _current++; - _last = new Token( - ExpressCompile.PoolString(source[..1]), _lineNum, begin, - TokenFlag.Separator_Middle); - return _last; - case ':': - match = _nextSymbolPattern.Match(_lineCache, _current); - begin = match.Groups[TokenMark].Index; - end = match.Groups[EndMark].Index; - rest = match.Groups[RestMark].Index; - _current = rest; - if (end - begin == 1) - { - _last = new Token( - ExpressCompile.Keyword.Colon, _lineNum, begin, - TokenFlag.Separator_Middle); - } else - { - _last = new Token( - ExpressCompile.PoolString(source[..(end - begin)]), _lineNum, - begin, TokenFlag.Symbol_Binary); - } - return _last; - case '+' or '/' or '\\' or '*' or '.': - match = _nextSymbolPattern.Match(_lineCache, _current); - begin = match.Groups[TokenMark].Index; - end = match.Groups[EndMark].Index; - rest = match.Groups[RestMark].Index; - _current = rest; - _last = new Token( - ExpressCompile.PoolString(source[..(end - begin)]), _lineNum, - begin, TokenFlag.Symbol_Binary); - return _last; - case '=': - begin = _current; - _current++; - _last = new Token( - ExpressCompile.Keyword.Equal, _lineNum, begin, - TokenFlag.Symbol_Binary); - return _last; - default: - throw new ExpInvalidCharException(c); - } - } else if (char.IsNumber(c)) - { - Match match = _nextNumberLiteralPattern.Match(_lineCache, _current); - if (match.Success) - { - begin = match.Groups[TokenMark].Index; - end = match.Groups[EndMark].Index; - rest = match.Groups[RestMark].Index; - _current = rest; - string str = ExpressCompile.PoolString(source[..(end - begin)]); - return new(str, _lineNum, begin, TokenFlag.Number); - } else - { - throw new ExpInvalidCharException(_current); - } - } else if (char.IsWhiteSpace(c)) - { - Match match = _skipBlankPattern.Match(_lineCache, _current); - if (match.Success) - { - rest = match.Groups[RestMark].Index; - _current = rest; - goto readLine; - } else - { - throw new ExpInvalidCharException(_current); - } - } else - { - throw new ExpInvalidCharException(c); - } - } - - public bool TryReadLine(out ReadOnlySpan line) - { - line = ReadLine(); - return line != ReadOnlySpan.Empty; - } - - public bool TryReadToken(out Token t) - { - t = ReadToken(); - return !IsEmpty; - } - - [GeneratedRegex(@"(?[a-zA-Z][a-zA-Z0-9_]*)(?\s*?)(?\S|$)", RegexOptions.Singleline)] - private static partial Regex GetNextWordTokenPattern(); - - [GeneratedRegex( - @"(?-?\s*?[0-9]+(?:\.[0-9]*)?E?(?:[+-]?[0-9]+)?)(?\s*?)(?\S|$)", - RegexOptions.Singleline)] - private static partial Regex GetNumberLiteralPattern(); - - [GeneratedRegex(@"(?:\s+?)(?\S|$)", RegexOptions.Singleline)] - private static partial Regex GetSkipBlankPattern(); - - [GeneratedRegex(@"(?"")(?>\\\\|\\""|(?!')[^""])*(?""|$)\s*?(?\S|$)", RegexOptions.Singleline)] - private static partial Regex GetStringLiteralPattern(); - - [GeneratedRegex(@"(?')(?>\\\\|\\'|''|(?!')[^'])*(?')\s*?(?\S|$)", RegexOptions.Singleline)] - private static partial Regex GetStringLiteralPatternWithSingle(); - - [GeneratedRegex(@"(?[:<>=+\-*\/\.]+)(?\s?)\s*?(?\S|$)", RegexOptions.Singleline)] - private static partial Regex GetSymbolPattern(); - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="ExpTokenReader" +// 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 CommunityToolkit.HighPerformance; + +using StgSharp.HighPerformance; + +using System; +using System.Linq; +using System.Text.RegularExpressions; + +namespace StgSharp.Script.Express +{ + public abstract class ExpTokenReaderPreProcessor + { + + public static ExpTokenReaderPreProcessor Default { get; } = new DefaultProcessor(); + + public abstract bool Process(string codeLine, int line, ref int current, out Token t); + + private class DefaultProcessor : ExpTokenReaderPreProcessor + { + + public override bool Process(string codeLine, int line, ref int current, out Token t) + { + t = Token.Empty; + return false; + } + + } + + } + + public partial class ExpTokenReader : IScriptTokenReader + { + + private const int + MultiLineEnd = 0x0029002A; // *) + + private const string TokenMark = "token", EndMark = "end", RestMark = "rest"; + + private bool _isReadingMultiLineComment; + private int _current, _lineNum; + private IScriptSourceProvider _provider; + + private Regex + _nextWordTokenPattern = GetNextWordTokenPattern(), + _nextStringLiteralPattern = GetStringLiteralPattern(), + _nextNumberLiteralPattern = GetNumberLiteralPattern(), + _nextStringLiteralPatternWithSingle = GetStringLiteralPatternWithSingle(), + _skipBlankPattern = GetSkipBlankPattern(), + _nextSymbolPattern = GetSymbolPattern(); + private string _lineCache; + private Token _last; + + public ExpTokenReader(IScriptSourceProvider provider) + { + _provider = provider; + _current = 0; + _lineCache = string.Empty; + _isReadingMultiLineComment = false; + } + + public bool IsEmpty + { + get => ((string.IsNullOrEmpty(_lineCache) || _current >= _lineCache.Length)) && _provider.IsEmpty; + } + + public ExpTokenReaderPreProcessor TokenReaderPreProcessor { get; set; } = ExpTokenReaderPreProcessor.Default; + + public int LineNumber + { + get => _provider.Location; + } + + public unsafe ReadOnlySpan ReadLine() + { + bool lineOver = string.IsNullOrEmpty(_lineCache) || _current >= _lineCache.Length; + while (lineOver || _isReadingMultiLineComment) + { + if (IsEmpty) { + return ReadOnlySpan.Empty; + } + if (lineOver) + { + do + { + _lineCache = _provider.ReadLine(out _lineNum); + } while (string.IsNullOrEmpty(_lineCache) && !_provider.IsEmpty); + _current = 0; + } + if (_isReadingMultiLineComment) + { + int index; + fixed (char* cPtr = _lineCache.AsSpan(_current)) { + index = UnsafeCompute.IndexOfCharPair( + cPtr, MultiLineEnd, _lineCache.Length); + } + if (index == -1) + { + _lineCache = string.Empty; + } else + { + _isReadingMultiLineComment = false; + _current += index + 2; + } + } + lineOver = string.IsNullOrEmpty(_lineCache) || _current >= _lineCache.Length; + } + return _lineCache.AsSpan().Slice(_current); + } + + public unsafe Token ReadToken() + { + int begin, end, rest; + readLine: + ReadOnlySpan source; + if (!TryReadLine(out source)) { + return Token.Empty; + } + if (TokenReaderPreProcessor.Process(_lineCache, LineNumber, ref _current, + out Token t)) { + return t; + } + char c = source[0]; + if (char.IsLetter(c)) + { + Match match = _nextWordTokenPattern.Match(_lineCache, _current); + if (match.Success) + { + begin = match.Groups[TokenMark].Index; + end = match.Groups[EndMark].Index; + rest = match.Groups[RestMark].Index; + _current = rest; + _last = new( + ExpressCompile.PoolString(source[..(end - begin)]), _lineNum, begin, + TokenFlag.Member); + return _last; + } else + { + throw new ExpInvalidCharException(_current); + } + } else if (char.IsPunctuation(c) || char.IsSymbol(c)) + { + Match match; + switch (c) + { + case '\'': + char cNext = source[1]; + if (cNext == '\'') //empty string + { + begin = _current; + _current += 2; + return new(string.Empty, _lineNum, begin, TokenFlag.String); + } + match = _nextStringLiteralPatternWithSingle.Match(_lineCache, _current); + if (match.Success) + { + begin = match.Groups["token"].Index; + end = match.Groups["end"].Index; + rest = match.Groups["rest"].Index; + _current = rest; + _last = new( + ExpressCompile.PoolString(source[1..(end - begin)]), _lineNum, + begin, TokenFlag.String); + return _last; + } else + { + throw new ExpInvalidCharException('\"'); + } + case '"': + cNext = source[1]; + if (cNext == '\"') //empty string + { + begin = _current; + _current += 2; + return new(string.Empty, _lineNum, begin, TokenFlag.String); + } + match = _nextStringLiteralPattern.Match(_lineCache, _current); + if (match.Success) + { + begin = match.Groups["token"].Index; + end = match.Groups["end"].Index; + rest = match.Groups["rest"].Index; + _current = rest; + _last = new( + ExpressCompile.PoolString(source[1..(end - begin)]), _lineNum, + begin, TokenFlag.String); + return _last; + } else + { + throw new ExpInvalidCharException('\"'); + } + case '(': + begin = _current; + _current++; + _last = new( + ExpressCompile.PoolString(source[..1]), _lineNum, begin, + TokenFlag.Separator_Left); + return _last; + case ')' or '}': + begin = _current; + _current++; + _last = new Token( + ExpressCompile.PoolString(source[..1]), _lineNum, begin, + TokenFlag.Separator_Right); + return _last; + case '-': + + // 1. - number + // 2. -- comment + // 3. - number type param(UNARY) + // 4. param - param(BINARY) + cNext = source[1]; + if (char.IsNumber(cNext)) + { + match = _nextNumberLiteralPattern.Match(_lineCache, _current); + if (match.Success) + { + begin = match.Groups[TokenMark].Index; + end = match.Groups[EndMark].Index; + rest = match.Groups[RestMark].Index; + _current = rest; + return new( + ExpressCompile.PoolString(source[..(end - begin)]), + _lineNum, begin, TokenFlag.Number); + } else + { + throw new ExpInvalidCharException(_current); + } + } else if (cNext == '-') + { + _lineCache = string.Empty; + _current = 0; + goto readLine; + } else + { + begin = _current; + _current++; + if (_last.Flag == TokenFlag.Member || + _last.Flag == TokenFlag.Index_Right || + _last.Flag == TokenFlag.Separator_Right) + { + _last = new( + ExpressCompile.PoolString(source[..1]), _lineNum, begin, + TokenFlag.Symbol_Binary); + } else + { + _last = new( + ExpressCompile.PoolString(source[..1]), _lineNum, begin, + TokenFlag.Symbol_Unary); + } + return _last; + } + case '{': + begin = _current; + _current++; + _last = new Token( + ExpressCompile.PoolString("{"), _lineNum, begin, + TokenFlag.Separator_Left); + return _last; + case '[': + begin = _current; + _current++; + _last = new Token( + ExpressCompile.PoolString("["), _lineNum, begin, + TokenFlag.Index_Left); + return _last; + case ']': + begin = _current; + _current++; + _last = new Token( + ExpressCompile.PoolString("]"), _lineNum, begin, + TokenFlag.Index_Right); + return _last; + case ';' or ',': + begin = _current; + _current++; + _last = new Token( + ExpressCompile.PoolString(source[..1]), _lineNum, begin, + TokenFlag.Separator_Middle); + return _last; + case ':': + match = _nextSymbolPattern.Match(_lineCache, _current); + begin = match.Groups[TokenMark].Index; + end = match.Groups[EndMark].Index; + rest = match.Groups[RestMark].Index; + _current = rest; + if (end - begin == 1) + { + _last = new Token( + ExpressCompile.Keyword.Colon, _lineNum, begin, + TokenFlag.Separator_Middle); + } else + { + _last = new Token( + ExpressCompile.PoolString(source[..(end - begin)]), _lineNum, + begin, TokenFlag.Symbol_Binary); + } + return _last; + case '+' or '/' or '\\' or '*' or '.': + match = _nextSymbolPattern.Match(_lineCache, _current); + begin = match.Groups[TokenMark].Index; + end = match.Groups[EndMark].Index; + rest = match.Groups[RestMark].Index; + _current = rest; + _last = new Token( + ExpressCompile.PoolString(source[..(end - begin)]), _lineNum, + begin, TokenFlag.Symbol_Binary); + return _last; + case '=': + begin = _current; + _current++; + _last = new Token( + ExpressCompile.Keyword.Equal, _lineNum, begin, + TokenFlag.Symbol_Binary); + return _last; + default: + throw new ExpInvalidCharException(c); + } + } else if (char.IsNumber(c)) + { + Match match = _nextNumberLiteralPattern.Match(_lineCache, _current); + if (match.Success) + { + begin = match.Groups[TokenMark].Index; + end = match.Groups[EndMark].Index; + rest = match.Groups[RestMark].Index; + _current = rest; + string str = ExpressCompile.PoolString(source[..(end - begin)]); + return new(str, _lineNum, begin, TokenFlag.Number); + } else + { + throw new ExpInvalidCharException(_current); + } + } else if (char.IsWhiteSpace(c)) + { + Match match = _skipBlankPattern.Match(_lineCache, _current); + if (match.Success) + { + rest = match.Groups[RestMark].Index; + _current = rest; + goto readLine; + } else + { + throw new ExpInvalidCharException(_current); + } + } else + { + throw new ExpInvalidCharException(c); + } + } + + public bool TryReadLine(out ReadOnlySpan line) + { + line = ReadLine(); + return line != ReadOnlySpan.Empty; + } + + public bool TryReadToken(out Token t) + { + t = ReadToken(); + return !IsEmpty; + } + + [GeneratedRegex(@"(?[a-zA-Z][a-zA-Z0-9_]*)(?\s*?)(?\S|$)", RegexOptions.Singleline)] + private static partial Regex GetNextWordTokenPattern(); + + [GeneratedRegex( + @"(?-?\s*?[0-9]+(?:\.[0-9]*)?E?(?:[+-]?[0-9]+)?)(?\s*?)(?\S|$)", + RegexOptions.Singleline)] + private static partial Regex GetNumberLiteralPattern(); + + [GeneratedRegex(@"(?:\s+?)(?\S|$)", RegexOptions.Singleline)] + private static partial Regex GetSkipBlankPattern(); + + [GeneratedRegex(@"(?"")(?>\\\\|\\""|(?!')[^""])*(?""|$)\s*?(?\S|$)", RegexOptions.Singleline)] + private static partial Regex GetStringLiteralPattern(); + + [GeneratedRegex(@"(?')(?>\\\\|\\'|''|(?!')[^'])*(?')\s*?(?\S|$)", RegexOptions.Singleline)] + private static partial Regex GetStringLiteralPatternWithSingle(); + + [GeneratedRegex(@"(?[:<>=+\-*\/\.]+)(?\s?)\s*?(?\S|$)", RegexOptions.Singleline)] + private static partial Regex GetSymbolPattern(); + + } +} diff --git a/StgSharp.Script/Express/GeneratedExpSchema.cs b/StgSharp.Script/Express/GeneratedExpSchema.cs index 1c84486d..e700616d 100644 --- a/StgSharp.Script/Express/GeneratedExpSchema.cs +++ b/StgSharp.Script/Express/GeneratedExpSchema.cs @@ -1,112 +1,112 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="GeneratedExpSchema" -// 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 CommunityToolkit.HighPerformance.Helpers; - -using StgSharp.Collections; - -using System; -using System.Collections.Frozen; -using System.Collections.Generic; -using System.Text; - -namespace StgSharp.Script.Express -{ - internal class GeneratedExpSchema : ExpSchema - { - - public GeneratedExpSchema() { } - - public static ExpSchema DefaultSchema - { - get => ExpSchema_Builtin.Only; - } - - public ExpTypeSource GetExpType(string typeName) - { - if (BuiltinSchema.TryGetType(typeName, out ExpTypeSource? ret)) { - return ret; - } - if (TypeDict.TryGetValue(typeName, out ret)) { - return ret; - } - foreach (GeneratedExpSchema item in SchemaInclude.Values) - { - if (item.TypeDict.TryGetValue(typeName, out ret)) { - return ret; - } - } - throw new ExpElementLoadException(typeName, this); - } - - public bool HasSchemaInclude(GeneratedExpSchema schema) - { - return SchemaInclude.ContainsKey(schema.Name); - } - - public override void LoadFromSource(ExpSchemaSource source) - { - throw new NotImplementedException(); - } - - public override bool TryGetConst(string name, out ExpElementInstance c) - { - return ConstDict.TryGetValue(name, out c!); - } - - public override bool TryGetEntity(string name, out ExpEntitySource e) - { - return EntityDict.TryGetValue(name, out e!); - } - - public override bool TryGetFunction(string name, out ExpFunctionSource f) - { - return FunctionDict.TryGetValue(name, out f!); - } - - public override bool TryGetProcedure(string name, out ExpProcedureSource p) - { - throw new NotImplementedException(); - } - - public override bool TryGetRule(string name, out ExpRuleSource r) - { - throw new NotImplementedException(); - } - - public override bool TryGetSchemaInclude(string name, out ExpSchema include) - { - throw new NotImplementedException(); - } - - public override bool TryGetType(string name, out ExpTypeSource element) - { - throw new NotImplementedException(); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="GeneratedExpSchema" +// 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 CommunityToolkit.HighPerformance.Helpers; + +using StgSharp.Collections; + +using System; +using System.Collections.Frozen; +using System.Collections.Generic; +using System.Text; + +namespace StgSharp.Script.Express +{ + internal class GeneratedExpSchema : ExpSchema + { + + public GeneratedExpSchema() { } + + public static ExpSchema DefaultSchema + { + get => ExpSchema_Builtin.Only; + } + + public ExpTypeSource GetExpType(string typeName) + { + if (BuiltinSchema.TryGetType(typeName, out ExpTypeSource? ret)) { + return ret; + } + if (TypeDict.TryGetValue(typeName, out ret)) { + return ret; + } + foreach (GeneratedExpSchema item in SchemaInclude.Values) + { + if (item.TypeDict.TryGetValue(typeName, out ret)) { + return ret; + } + } + throw new ExpElementLoadException(typeName, this); + } + + public bool HasSchemaInclude(GeneratedExpSchema schema) + { + return SchemaInclude.ContainsKey(schema.Name); + } + + public override void LoadFromSource(ExpSchemaSource source) + { + throw new NotImplementedException(); + } + + public override bool TryGetConst(string name, out ExpElementInstance c) + { + return ConstDict.TryGetValue(name, out c!); + } + + public override bool TryGetEntity(string name, out ExpEntitySource e) + { + return EntityDict.TryGetValue(name, out e!); + } + + public override bool TryGetFunction(string name, out ExpFunctionSource f) + { + return FunctionDict.TryGetValue(name, out f!); + } + + public override bool TryGetProcedure(string name, out ExpProcedureSource p) + { + throw new NotImplementedException(); + } + + public override bool TryGetRule(string name, out ExpRuleSource r) + { + throw new NotImplementedException(); + } + + public override bool TryGetSchemaInclude(string name, out ExpSchema include) + { + throw new NotImplementedException(); + } + + public override bool TryGetType(string name, out ExpTypeSource element) + { + throw new NotImplementedException(); + } + + } +} diff --git a/StgSharp.Script/Express/IExpConvertableFrom.cs b/StgSharp.Script/Express/IExpConvertableFrom.cs index 11f5e516..decb755b 100644 --- a/StgSharp.Script/Express/IExpConvertableFrom.cs +++ b/StgSharp.Script/Express/IExpConvertableFrom.cs @@ -1,298 +1,298 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="IExpConvertableFrom" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Script.Express -{ - // Base interface with one generic parameter renamed to T0 - public interface IExpConvertableFrom where T0: IExpConvertableFrom - { - - void FromInstance(T0 entity); - - bool IsConvertableTo(string entityTypeName); - - } - - // 2 generic parameters - public interface IExpConvertableFrom : IExpConvertableFrom where T0: IExpConvertableFrom - where T1: IExpConvertableFrom - { - - void FromInstance(T1 entity); - - } - - // 3 generic parameters - public interface IExpConvertableFrom : IExpConvertableFrom where T0: IExpConvertableFrom - where T1: IExpConvertableFrom - where T2: IExpConvertableFrom - { - - void FromInstance(T2 entity); - - } - - // 4 generic parameters - public interface IExpConvertableFrom : IExpConvertableFrom - where T0: IExpConvertableFrom - where T1: IExpConvertableFrom - where T2: IExpConvertableFrom - where T3: IExpConvertableFrom - { - - void FromInstance(T3 entity); - - } - - // 5 generic parameters - public interface IExpConvertableFrom : IExpConvertableFrom - where T0: IExpConvertableFrom - where T1: IExpConvertableFrom - where T2: IExpConvertableFrom - where T3: IExpConvertableFrom - where T4: IExpConvertableFrom - { - - void FromInstance(T4 entity); - - } - - // 6 generic parameters - public interface IExpConvertableFrom : IExpConvertableFrom - where T0: IExpConvertableFrom - where T1: IExpConvertableFrom - where T2: IExpConvertableFrom - where T3: IExpConvertableFrom - where T4: IExpConvertableFrom - where T5: IExpConvertableFrom - { - - void FromInstance(T5 entity); - - } - - // 7 generic parameters - public interface IExpConvertableFrom : IExpConvertableFrom - where T0: IExpConvertableFrom - where T1: IExpConvertableFrom - where T2: IExpConvertableFrom - where T3: IExpConvertableFrom - where T4: IExpConvertableFrom - where T5: IExpConvertableFrom - where T6: IExpConvertableFrom - { - - void FromInstance(T6 entity); - - } - - // 8 generic parameters - public interface IExpConvertableFrom : IExpConvertableFrom - where T0: IExpConvertableFrom - where T1: IExpConvertableFrom - where T2: IExpConvertableFrom - where T3: IExpConvertableFrom - where T4: IExpConvertableFrom - where T5: IExpConvertableFrom - where T6: IExpConvertableFrom - where T7: IExpConvertableFrom - { - - void FromInstance(T7 entity); - - } - - // 9 generic parameters - public interface IExpConvertableFrom : IExpConvertableFrom - where T0: IExpConvertableFrom - where T1: IExpConvertableFrom - where T2: IExpConvertableFrom - where T3: IExpConvertableFrom - where T4: IExpConvertableFrom - where T5: IExpConvertableFrom - where T6: IExpConvertableFrom - where T7: IExpConvertableFrom - where T8: IExpConvertableFrom - { - - void FromInstance(T8 entity); - - } - - // 10 generic parameters - public interface IExpConvertableFrom : IExpConvertableFrom - where T0: IExpConvertableFrom - where T1: IExpConvertableFrom - where T2: IExpConvertableFrom - where T3: IExpConvertableFrom - where T4: IExpConvertableFrom - where T5: IExpConvertableFrom - where T6: IExpConvertableFrom - where T7: IExpConvertableFrom - where T8: IExpConvertableFrom - where T9: IExpConvertableFrom - { - - void FromInstance(T9 entity); - - } - - // 11 generic parameters - public interface IExpConvertableFrom : IExpConvertableFrom - where T0: IExpConvertableFrom - where T1: IExpConvertableFrom - where T2: IExpConvertableFrom - where T3: IExpConvertableFrom - where T4: IExpConvertableFrom - where T5: IExpConvertableFrom - where T6: IExpConvertableFrom - where T7: IExpConvertableFrom - where T8: IExpConvertableFrom - where T9: IExpConvertableFrom - where T10: IExpConvertableFrom - { - - void FromInstance(T10 entity); - - } - - // 12 generic parameters - public interface IExpConvertableFrom : IExpConvertableFrom - where T0: IExpConvertableFrom - where T1: IExpConvertableFrom - where T2: IExpConvertableFrom - where T3: IExpConvertableFrom - where T4: IExpConvertableFrom - where T5: IExpConvertableFrom - where T6: IExpConvertableFrom - where T7: IExpConvertableFrom - where T8: IExpConvertableFrom - where T9: IExpConvertableFrom - where T10: IExpConvertableFrom - where T11: IExpConvertableFrom - { - - void FromInstance(T11 entity); - - } - - // 13 generic parameters - public interface IExpConvertableFrom : IExpConvertableFrom - where T0: IExpConvertableFrom - where T1: IExpConvertableFrom - where T2: IExpConvertableFrom - where T3: IExpConvertableFrom - where T4: IExpConvertableFrom - where T5: IExpConvertableFrom - where T6: IExpConvertableFrom - where T7: IExpConvertableFrom - where T8: IExpConvertableFrom - where T9: IExpConvertableFrom - where T10: IExpConvertableFrom - where T11: IExpConvertableFrom - where T12: IExpConvertableFrom - { - - void FromInstance(T12 entity); - - } - - // 14 generic parameters - public interface IExpConvertableFrom : IExpConvertableFrom - where T0: IExpConvertableFrom - where T1: IExpConvertableFrom - where T2: IExpConvertableFrom - where T3: IExpConvertableFrom - where T4: IExpConvertableFrom - where T5: IExpConvertableFrom - where T6: IExpConvertableFrom - where T7: IExpConvertableFrom - where T8: IExpConvertableFrom - where T9: IExpConvertableFrom - where T10: IExpConvertableFrom - where T11: IExpConvertableFrom - where T12: IExpConvertableFrom - where T13: IExpConvertableFrom - { - - void FromInstance(T13 entity); - - } - - // 15 generic parameters - public interface IExpConvertableFrom : IExpConvertableFrom - where T0: IExpConvertableFrom - where T1: IExpConvertableFrom - where T2: IExpConvertableFrom - where T3: IExpConvertableFrom - where T4: IExpConvertableFrom - where T5: IExpConvertableFrom - where T6: IExpConvertableFrom - where T7: IExpConvertableFrom - where T8: IExpConvertableFrom - where T9: IExpConvertableFrom - where T10: IExpConvertableFrom - where T11: IExpConvertableFrom - where T12: IExpConvertableFrom - where T13: IExpConvertableFrom - where T14: IExpConvertableFrom - { - - void FromInstance(T14 entity); - - } - - // 16 generic parameters - public interface IExpConvertableFrom : IExpConvertableFrom - where T0: IExpConvertableFrom - where T1: IExpConvertableFrom - where T2: IExpConvertableFrom - where T3: IExpConvertableFrom - where T4: IExpConvertableFrom - where T5: IExpConvertableFrom - where T6: IExpConvertableFrom - where T7: IExpConvertableFrom - where T8: IExpConvertableFrom - where T9: IExpConvertableFrom - where T10: IExpConvertableFrom - where T11: IExpConvertableFrom - where T12: IExpConvertableFrom - where T13: IExpConvertableFrom - where T14: IExpConvertableFrom - where T15: IExpConvertableFrom - { - - void FromInstance(T15 entity); - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="IExpConvertableFrom" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Script.Express +{ + // Base interface with one generic parameter renamed to T0 + public interface IExpConvertableFrom where T0: IExpConvertableFrom + { + + void FromInstance(T0 entity); + + bool IsConvertableTo(string entityTypeName); + + } + + // 2 generic parameters + public interface IExpConvertableFrom : IExpConvertableFrom where T0: IExpConvertableFrom + where T1: IExpConvertableFrom + { + + void FromInstance(T1 entity); + + } + + // 3 generic parameters + public interface IExpConvertableFrom : IExpConvertableFrom where T0: IExpConvertableFrom + where T1: IExpConvertableFrom + where T2: IExpConvertableFrom + { + + void FromInstance(T2 entity); + + } + + // 4 generic parameters + public interface IExpConvertableFrom : IExpConvertableFrom + where T0: IExpConvertableFrom + where T1: IExpConvertableFrom + where T2: IExpConvertableFrom + where T3: IExpConvertableFrom + { + + void FromInstance(T3 entity); + + } + + // 5 generic parameters + public interface IExpConvertableFrom : IExpConvertableFrom + where T0: IExpConvertableFrom + where T1: IExpConvertableFrom + where T2: IExpConvertableFrom + where T3: IExpConvertableFrom + where T4: IExpConvertableFrom + { + + void FromInstance(T4 entity); + + } + + // 6 generic parameters + public interface IExpConvertableFrom : IExpConvertableFrom + where T0: IExpConvertableFrom + where T1: IExpConvertableFrom + where T2: IExpConvertableFrom + where T3: IExpConvertableFrom + where T4: IExpConvertableFrom + where T5: IExpConvertableFrom + { + + void FromInstance(T5 entity); + + } + + // 7 generic parameters + public interface IExpConvertableFrom : IExpConvertableFrom + where T0: IExpConvertableFrom + where T1: IExpConvertableFrom + where T2: IExpConvertableFrom + where T3: IExpConvertableFrom + where T4: IExpConvertableFrom + where T5: IExpConvertableFrom + where T6: IExpConvertableFrom + { + + void FromInstance(T6 entity); + + } + + // 8 generic parameters + public interface IExpConvertableFrom : IExpConvertableFrom + where T0: IExpConvertableFrom + where T1: IExpConvertableFrom + where T2: IExpConvertableFrom + where T3: IExpConvertableFrom + where T4: IExpConvertableFrom + where T5: IExpConvertableFrom + where T6: IExpConvertableFrom + where T7: IExpConvertableFrom + { + + void FromInstance(T7 entity); + + } + + // 9 generic parameters + public interface IExpConvertableFrom : IExpConvertableFrom + where T0: IExpConvertableFrom + where T1: IExpConvertableFrom + where T2: IExpConvertableFrom + where T3: IExpConvertableFrom + where T4: IExpConvertableFrom + where T5: IExpConvertableFrom + where T6: IExpConvertableFrom + where T7: IExpConvertableFrom + where T8: IExpConvertableFrom + { + + void FromInstance(T8 entity); + + } + + // 10 generic parameters + public interface IExpConvertableFrom : IExpConvertableFrom + where T0: IExpConvertableFrom + where T1: IExpConvertableFrom + where T2: IExpConvertableFrom + where T3: IExpConvertableFrom + where T4: IExpConvertableFrom + where T5: IExpConvertableFrom + where T6: IExpConvertableFrom + where T7: IExpConvertableFrom + where T8: IExpConvertableFrom + where T9: IExpConvertableFrom + { + + void FromInstance(T9 entity); + + } + + // 11 generic parameters + public interface IExpConvertableFrom : IExpConvertableFrom + where T0: IExpConvertableFrom + where T1: IExpConvertableFrom + where T2: IExpConvertableFrom + where T3: IExpConvertableFrom + where T4: IExpConvertableFrom + where T5: IExpConvertableFrom + where T6: IExpConvertableFrom + where T7: IExpConvertableFrom + where T8: IExpConvertableFrom + where T9: IExpConvertableFrom + where T10: IExpConvertableFrom + { + + void FromInstance(T10 entity); + + } + + // 12 generic parameters + public interface IExpConvertableFrom : IExpConvertableFrom + where T0: IExpConvertableFrom + where T1: IExpConvertableFrom + where T2: IExpConvertableFrom + where T3: IExpConvertableFrom + where T4: IExpConvertableFrom + where T5: IExpConvertableFrom + where T6: IExpConvertableFrom + where T7: IExpConvertableFrom + where T8: IExpConvertableFrom + where T9: IExpConvertableFrom + where T10: IExpConvertableFrom + where T11: IExpConvertableFrom + { + + void FromInstance(T11 entity); + + } + + // 13 generic parameters + public interface IExpConvertableFrom : IExpConvertableFrom + where T0: IExpConvertableFrom + where T1: IExpConvertableFrom + where T2: IExpConvertableFrom + where T3: IExpConvertableFrom + where T4: IExpConvertableFrom + where T5: IExpConvertableFrom + where T6: IExpConvertableFrom + where T7: IExpConvertableFrom + where T8: IExpConvertableFrom + where T9: IExpConvertableFrom + where T10: IExpConvertableFrom + where T11: IExpConvertableFrom + where T12: IExpConvertableFrom + { + + void FromInstance(T12 entity); + + } + + // 14 generic parameters + public interface IExpConvertableFrom : IExpConvertableFrom + where T0: IExpConvertableFrom + where T1: IExpConvertableFrom + where T2: IExpConvertableFrom + where T3: IExpConvertableFrom + where T4: IExpConvertableFrom + where T5: IExpConvertableFrom + where T6: IExpConvertableFrom + where T7: IExpConvertableFrom + where T8: IExpConvertableFrom + where T9: IExpConvertableFrom + where T10: IExpConvertableFrom + where T11: IExpConvertableFrom + where T12: IExpConvertableFrom + where T13: IExpConvertableFrom + { + + void FromInstance(T13 entity); + + } + + // 15 generic parameters + public interface IExpConvertableFrom : IExpConvertableFrom + where T0: IExpConvertableFrom + where T1: IExpConvertableFrom + where T2: IExpConvertableFrom + where T3: IExpConvertableFrom + where T4: IExpConvertableFrom + where T5: IExpConvertableFrom + where T6: IExpConvertableFrom + where T7: IExpConvertableFrom + where T8: IExpConvertableFrom + where T9: IExpConvertableFrom + where T10: IExpConvertableFrom + where T11: IExpConvertableFrom + where T12: IExpConvertableFrom + where T13: IExpConvertableFrom + where T14: IExpConvertableFrom + { + + void FromInstance(T14 entity); + + } + + // 16 generic parameters + public interface IExpConvertableFrom : IExpConvertableFrom + where T0: IExpConvertableFrom + where T1: IExpConvertableFrom + where T2: IExpConvertableFrom + where T3: IExpConvertableFrom + where T4: IExpConvertableFrom + where T5: IExpConvertableFrom + where T6: IExpConvertableFrom + where T7: IExpConvertableFrom + where T8: IExpConvertableFrom + where T9: IExpConvertableFrom + where T10: IExpConvertableFrom + where T11: IExpConvertableFrom + where T12: IExpConvertableFrom + where T13: IExpConvertableFrom + where T14: IExpConvertableFrom + where T15: IExpConvertableFrom + { + + void FromInstance(T15 entity); + + } +} diff --git a/StgSharp.Script/StgSharp.Script.csproj b/StgSharp.Script/StgSharp.Script.csproj index 613c032a..677dfff7 100644 --- a/StgSharp.Script/StgSharp.Script.csproj +++ b/StgSharp.Script/StgSharp.Script.csproj @@ -1,14 +1,14 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/StgSharp.TerminalDialogue/DialogueView.cs b/StgSharp.TerminalDialogue/DialogueView.cs index 58f7b1f5..5843aa3c 100644 --- a/StgSharp.TerminalDialogue/DialogueView.cs +++ b/StgSharp.TerminalDialogue/DialogueView.cs @@ -1,105 +1,105 @@ - - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -using Terminal.Gui; - -namespace StgSharpTerminalDialogue -{ - internal class DialogueView:Window - { - TextView tittle = new TextView() - { - Text = """" - - ███████╗████████╗ ██████╗ ███████╗██╗ ██╗ █████╗ ██████╗ ██████╗ - ██╔════╝╚══██╔══╝██╔════╝ ██╔════╝██║ ██║██╔══██╗██╔══██╗██╔══██╗ - ███████╗ ██║ ██║ ███╗███████╗███████║███████║██████╔╝██████╔╝ - ╚════██║ ██║ ██║ ██║╚════██║██╔══██║██╔══██║██╔══██╗██╔═══╝ - ███████║ ██║ ╚██████╔╝███████║██║ ██║██║ ██║██║ ██║██║ - ╚══════╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ - - """", - //generate from site: https://www.asciiart.eu/text-to-ascii-art - //font: ANSI shadow - TextAlignment = Alignment.Start, - Width = 8 * 9, - Height = 1 * 8, - X = 0, - Y = 0, - ColorScheme = common - }; - - static readonly Terminal.Gui.Attribute - commonColor = Application.Driver!.MakeColor( - new Color(92, 180, 225), Color.Cyan), - errorColor = Application.Driver!.MakeColor( - Color.White, Color.BrightRed); - - static ColorScheme common = new ColorScheme(){ - Focus = commonColor, - Normal = commonColor - }, - error = new ColorScheme() - { - Focus = errorColor, - Normal = errorColor - }; - - public static DialogueView Single - { - get => new DialogueView(); - } - - private DialogueView() - { - Init(); - } - - private void Init() - { - ColorScheme = common; - - this.Width = Dim.Fill(0); - this.Height = Dim.Fill(0); - this.X = 0; - this.Y = 0; - this.Title = "StgSharp Framework Dialogue"; - this.Add(this.tittle); - } - - public void ShowError(string message) - { - this.Remove(this.tittle); - this.ColorScheme = error; - this.Text = - """ - - ██╗ ███████╗██████╗ ██████╗ ██████╗ ██████╗ - ██╗ ██╔╝ ██╔════╝██╔══██╗██╔══██╗██╔═══██╗██╔══██╗ - ╚═╝ ██║ █████╗ ██████╔╝██████╔╝██║ ██║██████╔╝ - ██╗ ██║ ██╔══╝ ██╔══██╗██╔══██╗██║ ██║██╔══██╗ - ╚═╝ ╚██╗ ███████╗██║ ██║██║ ██║╚██████╔╝██║ ██║ - ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ - - """ + "\n"+ - message; - - Button button = new Button() - { - Text = "Click to quit." - }; - button.Accept += (sender,e) => { - Application.RequestStop(); - }; - - this.Add(button); - this.SetNeedsDisplay(); - } - - } -} + + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using Terminal.Gui; + +namespace StgSharpTerminalDialogue +{ + internal class DialogueView:Window + { + TextView tittle = new TextView() + { + Text = """" + + ███████╗████████╗ ██████╗ ███████╗██╗ ██╗ █████╗ ██████╗ ██████╗ + ██╔════╝╚══██╔══╝██╔════╝ ██╔════╝██║ ██║██╔══██╗██╔══██╗██╔══██╗ + ███████╗ ██║ ██║ ███╗███████╗███████║███████║██████╔╝██████╔╝ + ╚════██║ ██║ ██║ ██║╚════██║██╔══██║██╔══██║██╔══██╗██╔═══╝ + ███████║ ██║ ╚██████╔╝███████║██║ ██║██║ ██║██║ ██║██║ + ╚══════╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ + + """", + //generate from site: https://www.asciiart.eu/text-to-ascii-art + //font: ANSI shadow + TextAlignment = Alignment.Start, + Width = 8 * 9, + Height = 1 * 8, + X = 0, + Y = 0, + ColorScheme = common + }; + + static readonly Terminal.Gui.Attribute + commonColor = Application.Driver!.MakeColor( + new Color(92, 180, 225), Color.Cyan), + errorColor = Application.Driver!.MakeColor( + Color.White, Color.BrightRed); + + static ColorScheme common = new ColorScheme(){ + Focus = commonColor, + Normal = commonColor + }, + error = new ColorScheme() + { + Focus = errorColor, + Normal = errorColor + }; + + public static DialogueView Single + { + get => new DialogueView(); + } + + private DialogueView() + { + Init(); + } + + private void Init() + { + ColorScheme = common; + + this.Width = Dim.Fill(0); + this.Height = Dim.Fill(0); + this.X = 0; + this.Y = 0; + this.Title = "StgSharp Framework Dialogue"; + this.Add(this.tittle); + } + + public void ShowError(string message) + { + this.Remove(this.tittle); + this.ColorScheme = error; + this.Text = + """ + + ██╗ ███████╗██████╗ ██████╗ ██████╗ ██████╗ + ██╗ ██╔╝ ██╔════╝██╔══██╗██╔══██╗██╔═══██╗██╔══██╗ + ╚═╝ ██║ █████╗ ██████╔╝██████╔╝██║ ██║██████╔╝ + ██╗ ██║ ██╔══╝ ██╔══██╗██╔══██╗██║ ██║██╔══██╗ + ╚═╝ ╚██╗ ███████╗██║ ██║██║ ██║╚██████╔╝██║ ██║ + ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ + + """ + "\n"+ + message; + + Button button = new Button() + { + Text = "Click to quit." + }; + button.Accept += (sender,e) => { + Application.RequestStop(); + }; + + this.Add(button); + this.SetNeedsDisplay(); + } + + } +} diff --git a/StgSharp.TerminalDialogue/PostOpration.cs b/StgSharp.TerminalDialogue/PostOpration.cs index aac4b7ea..8465602b 100644 --- a/StgSharp.TerminalDialogue/PostOpration.cs +++ b/StgSharp.TerminalDialogue/PostOpration.cs @@ -1,57 +1,57 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="PostOpration" -// 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.IO; - -namespace StgSharpTerminalDialogue -{ - internal static partial class Program - { - - private static DialogueView _dv; - - internal static void PostOperation( - string instruction, - string operand - ) - { - switch (instruction) - { - case "posterror": - _dv.ShowError(operand); - using (StreamWriter sw = new StreamWriter( - _callerServerPipe)) { - sw.WriteLine("ERRORGET"); - } - break; - default: - break; - } - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="PostOpration" +// 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.IO; + +namespace StgSharpTerminalDialogue +{ + internal static partial class Program + { + + private static DialogueView _dv; + + internal static void PostOperation( + string instruction, + string operand + ) + { + switch (instruction) + { + case "posterror": + _dv.ShowError(operand); + using (StreamWriter sw = new StreamWriter( + _callerServerPipe)) { + sw.WriteLine("ERRORGET"); + } + break; + default: + break; + } + } + + } +} diff --git a/StgSharp.TerminalDialogue/Program.cs b/StgSharp.TerminalDialogue/Program.cs index ff0c8703..f8ba6acb 100644 --- a/StgSharp.TerminalDialogue/Program.cs +++ b/StgSharp.TerminalDialogue/Program.cs @@ -1,112 +1,112 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="Program" -// 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.Globalization; -using System.IO; -using System.IO.Pipes; -using System.Threading; -using System.Threading.Tasks; -using Terminal.Gui; - -namespace StgSharpTerminalDialogue -{ - internal static partial class Program - { - - private static AnonymousPipeClientStream _callerClientPipe, _callerServerPipe; - - private static void Main( - string[] args - ) - { - Application.Init(); - - Console.CancelKeyPress += ( - sender, - e - ) => { - e.Cancel = true; - Application.RequestStop(); - }; - - Task renderTask = Task.Factory - .StartNew(( - ) => { - _dv = DialogueView.Single; - Application.Run(view:_dv); - }, CancellationToken.None, TaskCreationOptions.None, - TaskScheduler.Default); - - /**/ - if (args.Length != 2) - { - Console.ReadLine(); - Application.RequestStop(); - } - /**/ - - _callerClientPipe = new AnonymousPipeClientStream( - PipeDirection.In, args[0]); - _callerServerPipe = new AnonymousPipeClientStream( - PipeDirection.Out, args[1]); - - - using (StreamReader clientReader = new StreamReader( - _callerClientPipe)) - { - using (StreamWriter clientSender = new StreamWriter( - _callerServerPipe)) - { - clientSender.AutoFlush = true; - string temp = string.Empty; - while (!temp!.Contains("exit ") && !renderTask.IsCompleted) - { - temp = clientReader.ReadLine()!; - temp = temp ?? string.Empty; - if (string.IsNullOrEmpty(temp)) - { - continue; - } - - int index = temp.IndexOf(' '); - if (index == -1) - { - continue; - } - - string command = temp[..index]; - string operand = temp[(index + 1)..]; - - PostOperation(command, operand); - } - } - } - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="Program" +// 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.Globalization; +using System.IO; +using System.IO.Pipes; +using System.Threading; +using System.Threading.Tasks; +using Terminal.Gui; + +namespace StgSharpTerminalDialogue +{ + internal static partial class Program + { + + private static AnonymousPipeClientStream _callerClientPipe, _callerServerPipe; + + private static void Main( + string[] args + ) + { + Application.Init(); + + Console.CancelKeyPress += ( + sender, + e + ) => { + e.Cancel = true; + Application.RequestStop(); + }; + + Task renderTask = Task.Factory + .StartNew(( + ) => { + _dv = DialogueView.Single; + Application.Run(view:_dv); + }, CancellationToken.None, TaskCreationOptions.None, + TaskScheduler.Default); + + /**/ + if (args.Length != 2) + { + Console.ReadLine(); + Application.RequestStop(); + } + /**/ + + _callerClientPipe = new AnonymousPipeClientStream( + PipeDirection.In, args[0]); + _callerServerPipe = new AnonymousPipeClientStream( + PipeDirection.Out, args[1]); + + + using (StreamReader clientReader = new StreamReader( + _callerClientPipe)) + { + using (StreamWriter clientSender = new StreamWriter( + _callerServerPipe)) + { + clientSender.AutoFlush = true; + string temp = string.Empty; + while (!temp!.Contains("exit ") && !renderTask.IsCompleted) + { + temp = clientReader.ReadLine()!; + temp = temp ?? string.Empty; + if (string.IsNullOrEmpty(temp)) + { + continue; + } + + int index = temp.IndexOf(' '); + if (index == -1) + { + continue; + } + + string command = temp[..index]; + string operand = temp[(index + 1)..]; + + PostOperation(command, operand); + } + } + } + } + + } +} diff --git a/StgSharp.TerminalDialogue/StgSharp.TerminalDialogue.csproj b/StgSharp.TerminalDialogue/StgSharp.TerminalDialogue.csproj index 380f030d..92daaa60 100644 --- a/StgSharp.TerminalDialogue/StgSharp.TerminalDialogue.csproj +++ b/StgSharp.TerminalDialogue/StgSharp.TerminalDialogue.csproj @@ -1,8 +1,8 @@ - - - - - - - - + + + + + + + + diff --git a/StgSharp.Tools/c.txt b/StgSharp.Tools/c.txt index 9a28092b..49e6ab62 100644 --- a/StgSharp.Tools/c.txt +++ b/StgSharp.Tools/c.txt @@ -1,658 +1,658 @@ - PFNGLACTIVESHADERPROGRAMPROC ActiveShaderProgram; - PFNGLACTIVETEXTUREPROC ActiveTexture; - PFNGLATTACHSHADERPROC AttachShader; - PFNGLBEGINCONDITIONALRENDERPROC BeginConditionalRender; - PFNGLBEGINQUERYPROC BeginQuery; - PFNGLBEGINQUERYINDEXEDPROC BeginQueryIndexed; - PFNGLBEGINTRANSFORMFEEDBACKPROC BeginTransformFeedback; - PFNGLBINDATTRIBLOCATIONPROC BindAttribLocation; - PFNGLBINDBUFFERPROC BindBuffer; - PFNGLBINDBUFFERBASEPROC BindBufferBase; - PFNGLBINDBUFFERRANGEPROC BindBufferRange; - PFNGLBINDBUFFERSBASEPROC BindBuffersBase; - PFNGLBINDBUFFERSRANGEPROC BindBuffersRange; - PFNGLBINDFRAGDATALOCATIONPROC BindFragDataLocation; - PFNGLBINDFRAGDATALOCATIONINDEXEDPROC BindFragDataLocationIndexed; - PFNGLBINDFRAMEBUFFERPROC BindFramebuffer; - PFNGLBINDIMAGETEXTUREPROC BindImageTexture; - PFNGLBINDIMAGETEXTURESPROC BindImageTextures; - PFNGLBINDPROGRAMPIPELINEPROC BindProgramPipeline; - PFNGLBINDRENDERBUFFERPROC BindRenderbuffer; - PFNGLBINDSAMPLERPROC BindSampler; - PFNGLBINDSAMPLERSPROC BindSamplers; - PFNGLBINDTEXTUREPROC BindTexture; - PFNGLBINDTEXTUREUNITPROC BindTextureUnit; - PFNGLBINDTEXTURESPROC BindTextures; - PFNGLBINDTRANSFORMFEEDBACKPROC BindTransformFeedback; - PFNGLBINDVERTEXARRAYPROC BindVertexArray; - PFNGLBINDVERTEXBUFFERPROC BindVertexBuffer; - PFNGLBINDVERTEXBUFFERSPROC BindVertexBuffers; - PFNGLBLENDCOLORPROC BlendColor; - PFNGLBLENDEQUATIONPROC BlendEquation; - PFNGLBLENDEQUATIONSEPARATEPROC BlendEquationSeparate; - PFNGLBLENDEQUATIONSEPARATEIPROC BlendEquationSeparatei; - PFNGLBLENDEQUATIONIPROC BlendEquationi; - PFNGLBLENDFUNCPROC BlendFunc; - PFNGLBLENDFUNCSEPARATEPROC BlendFuncSeparate; - PFNGLBLENDFUNCSEPARATEIPROC BlendFuncSeparatei; - PFNGLBLENDFUNCIPROC BlendFunci; - PFNGLBLITFRAMEBUFFERPROC BlitFramebuffer; - PFNGLBLITNAMEDFRAMEBUFFERPROC BlitNamedFramebuffer; - PFNGLBUFFERDATAPROC BufferData; - PFNGLBUFFERSTORAGEPROC BufferStorage; - PFNGLBUFFERSUBDATAPROC BufferSubData; - PFNGLCHECKFRAMEBUFFERSTATUSPROC CheckFramebufferStatus; - PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC CheckNamedFramebufferStatus; - PFNGLCLAMPCOLORPROC ClampColor; - PFNGLCLEARPROC Clear; - PFNGLCLEARBUFFERDATAPROC ClearBufferData; - PFNGLCLEARBUFFERSUBDATAPROC ClearBufferSubData; - PFNGLCLEARBUFFERFIPROC ClearBufferfi; - PFNGLCLEARBUFFERFVPROC ClearBufferfv; - PFNGLCLEARBUFFERIVPROC ClearBufferiv; - PFNGLCLEARBUFFERUIVPROC ClearBufferuiv; - PFNGLCLEARCOLORPROC ClearColor; - PFNGLCLEARDEPTHPROC ClearDepth; - PFNGLCLEARDEPTHFPROC ClearDepthf; - PFNGLCLEARNAMEDBUFFERDATAPROC ClearNamedBufferData; - PFNGLCLEARNAMEDBUFFERSUBDATAPROC ClearNamedBufferSubData; - PFNGLCLEARNAMEDFRAMEBUFFERFIPROC ClearNamedFramebufferfi; - PFNGLCLEARNAMEDFRAMEBUFFERFVPROC ClearNamedFramebufferfv; - PFNGLCLEARNAMEDFRAMEBUFFERIVPROC ClearNamedFramebufferiv; - PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC ClearNamedFramebufferuiv; - PFNGLCLEARSTENCILPROC ClearStencil; - PFNGLCLEARTEXIMAGEPROC ClearTexImage; - PFNGLCLEARTEXSUBIMAGEPROC ClearTexSubImage; - PFNGLCLIENTWAITSYNCPROC ClientWaitSync; - PFNGLCLIPCONTROLPROC ClipControl; - PFNGLCOLORMASKPROC ColorMask; - PFNGLCOLORMASKIPROC ColorMaski; - PFNGLCOMPILESHADERPROC CompileShader; - PFNGLCOMPRESSEDTEXIMAGE1DPROC CompressedTexImage1D; - PFNGLCOMPRESSEDTEXIMAGE2DPROC CompressedTexImage2D; - PFNGLCOMPRESSEDTEXIMAGE3DPROC CompressedTexImage3D; - PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC CompressedTexSubImage1D; - PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC CompressedTexSubImage2D; - PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC CompressedTexSubImage3D; - PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC CompressedTextureSubImage1D; - PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC CompressedTextureSubImage2D; - PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC CompressedTextureSubImage3D; - PFNGLCOPYBUFFERSUBDATAPROC CopyBufferSubData; - PFNGLCOPYIMAGESUBDATAPROC CopyImageSubData; - PFNGLCOPYNAMEDBUFFERSUBDATAPROC CopyNamedBufferSubData; - PFNGLCOPYTEXIMAGE1DPROC CopyTexImage1D; - PFNGLCOPYTEXIMAGE2DPROC CopyTexImage2D; - PFNGLCOPYTEXSUBIMAGE1DPROC CopyTexSubImage1D; - PFNGLCOPYTEXSUBIMAGE2DPROC CopyTexSubImage2D; - PFNGLCOPYTEXSUBIMAGE3DPROC CopyTexSubImage3D; - PFNGLCOPYTEXTURESUBIMAGE1DPROC CopyTextureSubImage1D; - PFNGLCOPYTEXTURESUBIMAGE2DPROC CopyTextureSubImage2D; - PFNGLCOPYTEXTURESUBIMAGE3DPROC CopyTextureSubImage3D; - PFNGLCREATEBUFFERSPROC CreateBuffers; - PFNGLCREATEFRAMEBUFFERSPROC CreateFramebuffers; - PFNGLCREATEPROGRAMPROC CreateProgram; - PFNGLCREATEPROGRAMPIPELINESPROC CreateProgramPipelines; - PFNGLCREATEQUERIESPROC CreateQueries; - PFNGLCREATERENDERBUFFERSPROC CreateRenderbuffers; - PFNGLCREATESAMPLERSPROC CreateSamplers; - PFNGLCREATESHADERPROC CreateShader; - PFNGLCREATESHADERPROGRAMVPROC CreateShaderProgramv; - PFNGLCREATETEXTURESPROC CreateTextures; - PFNGLCREATETRANSFORMFEEDBACKSPROC CreateTransformFeedbacks; - PFNGLCREATEVERTEXARRAYSPROC CreateVertexArrays; - PFNGLCULLFACEPROC CullFace; - PFNGLDEBUGMESSAGECALLBACKPROC DebugMessageCallback; - PFNGLDEBUGMESSAGECONTROLPROC DebugMessageControl; - PFNGLDEBUGMESSAGEINSERTPROC DebugMessageInsert; - PFNGLDELETEBUFFERSPROC DeleteBuffers; - PFNGLDELETEFRAMEBUFFERSPROC DeleteFramebuffers; - PFNGLDELETEPROGRAMPROC DeleteProgram; - PFNGLDELETEPROGRAMPIPELINESPROC DeleteProgramPipelines; - PFNGLDELETEQUERIESPROC DeleteQueries; - PFNGLDELETERENDERBUFFERSPROC DeleteRenderbuffers; - PFNGLDELETESAMPLERSPROC DeleteSamplers; - PFNGLDELETESHADERPROC DeleteShader; - PFNGLDELETESYNCPROC DeleteSync; - PFNGLDELETETEXTURESPROC DeleteTextures; - PFNGLDELETETRANSFORMFEEDBACKSPROC DeleteTransformFeedbacks; - PFNGLDELETEVERTEXARRAYSPROC DeleteVertexArrays; - PFNGLDEPTHFUNCPROC DepthFunc; - PFNGLDEPTHMASKPROC DepthMask; - PFNGLDEPTHRANGEPROC DepthRange; - PFNGLDEPTHRANGEARRAYVPROC DepthRangeArrayv; - PFNGLDEPTHRANGEINDEXEDPROC DepthRangeIndexed; - PFNGLDEPTHRANGEFPROC DepthRangef; - PFNGLDETACHSHADERPROC DetachShader; - PFNGLDISABLEPROC Disable; - PFNGLDISABLEVERTEXARRAYATTRIBPROC DisableVertexArrayAttrib; - PFNGLDISABLEVERTEXATTRIBARRAYPROC DisableVertexAttribArray; - PFNGLDISABLEIPROC Disablei; - PFNGLDISPATCHCOMPUTEPROC DispatchCompute; - PFNGLDISPATCHCOMPUTEINDIRECTPROC DispatchComputeIndirect; - PFNGLDRAWARRAYSPROC DrawArrays; - PFNGLDRAWARRAYSINDIRECTPROC DrawArraysIndirect; - PFNGLDRAWARRAYSINSTANCEDPROC DrawArraysInstanced; - PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC DrawArraysInstancedBaseInstance; - PFNGLDRAWBUFFERPROC DrawBuffer; - PFNGLDRAWBUFFERSPROC DrawBuffers; - PFNGLDRAWELEMENTSPROC DrawElements; - PFNGLDRAWELEMENTSBASEVERTEXPROC DrawElementsBaseVertex; - PFNGLDRAWELEMENTSINDIRECTPROC DrawElementsIndirect; - PFNGLDRAWELEMENTSINSTANCEDPROC DrawElementsInstanced; - PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC DrawElementsInstancedBaseInstance; - PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC DrawElementsInstancedBaseVertex; - PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC - DrawElementsInstancedBaseVertexBaseInstance; - PFNGLDRAWRANGEELEMENTSPROC DrawRangeElements; - PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC DrawRangeElementsBaseVertex; - PFNGLDRAWTRANSFORMFEEDBACKPROC DrawTransformFeedback; - PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC DrawTransformFeedbackInstanced; - PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC DrawTransformFeedbackStream; - PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC DrawTransformFeedbackStreamInstanced; - PFNGLENABLEPROC Enable; - PFNGLENABLEVERTEXARRAYATTRIBPROC EnableVertexArrayAttrib; - PFNGLENABLEVERTEXATTRIBARRAYPROC EnableVertexAttribArray; - PFNGLENABLEIPROC Enablei; - PFNGLENDCONDITIONALRENDERPROC EndConditionalRender; - PFNGLENDQUERYPROC EndQuery; - PFNGLENDQUERYINDEXEDPROC EndQueryIndexed; - PFNGLENDTRANSFORMFEEDBACKPROC EndTransformFeedback; - PFNGLFENCESYNCPROC FenceSync; - PFNGLFINISHPROC Finish; - PFNGLFLUSHPROC Flush; - PFNGLFLUSHMAPPEDBUFFERRANGEPROC FlushMappedBufferRange; - PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC FlushMappedNamedBufferRange; - PFNGLFRAMEBUFFERPARAMETERIPROC FramebufferParameteri; - PFNGLFRAMEBUFFERRENDERBUFFERPROC FramebufferRenderbuffer; - PFNGLFRAMEBUFFERTEXTUREPROC FramebufferTexture; - PFNGLFRAMEBUFFERTEXTURE1DPROC FramebufferTexture1D; - PFNGLFRAMEBUFFERTEXTURE2DPROC FramebufferTexture2D; - PFNGLFRAMEBUFFERTEXTURE3DPROC FramebufferTexture3D; - PFNGLFRAMEBUFFERTEXTURELAYERPROC FramebufferTextureLayer; - PFNGLFRONTFACEPROC FrontFace; - PFNGLGENBUFFERSPROC GenBuffers; - PFNGLGENFRAMEBUFFERSPROC GenFramebuffers; - PFNGLGENPROGRAMPIPELINESPROC GenProgramPipelines; - PFNGLGENQUERIESPROC GenQueries; - PFNGLGENRENDERBUFFERSPROC GenRenderbuffers; - PFNGLGENSAMPLERSPROC GenSamplers; - PFNGLGENTEXTURESPROC GenTextures; - PFNGLGENTRANSFORMFEEDBACKSPROC GenTransformFeedbacks; - PFNGLGENVERTEXARRAYSPROC GenVertexArrays; - PFNGLGENERATEMIPMAPPROC GenerateMipmap; - PFNGLGENERATETEXTUREMIPMAPPROC GenerateTextureMipmap; - PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC GetActiveAtomicCounterBufferiv; - PFNGLGETACTIVEATTRIBPROC GetActiveAttrib; - PFNGLGETACTIVESUBROUTINENAMEPROC GetActiveSubroutineName; - PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC GetActiveSubroutineUniformName; - PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC GetActiveSubroutineUniformiv; - PFNGLGETACTIVEUNIFORMPROC GetActiveUniform; - PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC GetActiveUniformBlockName; - PFNGLGETACTIVEUNIFORMBLOCKIVPROC GetActiveUniformBlockiv; - PFNGLGETACTIVEUNIFORMNAMEPROC GetActiveUniformName; - PFNGLGETACTIVEUNIFORMSIVPROC GetActiveUniformsiv; - PFNGLGETATTACHEDSHADERSPROC GetAttachedShaders; - PFNGLGETATTRIBLOCATIONPROC GetAttribLocation; - PFNGLGETBOOLEANI_VPROC GetBooleani_v; - PFNGLGETBOOLEANVPROC GetBooleanv; - PFNGLGETBUFFERPARAMETERI64VPROC GetBufferParameteri64v; - PFNGLGETBUFFERPARAMETERIVPROC GetBufferParameteriv; - PFNGLGETBUFFERPOINTERVPROC GetBufferPointerv; - PFNGLGETBUFFERSUBDATAPROC GetBufferSubData; - PFNGLGETCOMPRESSEDTEXIMAGEPROC GetCompressedTexImage; - PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC GetCompressedTextureImage; - PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC GetCompressedTextureSubImage; - PFNGLGETDEBUGMESSAGELOGPROC GetDebugMessageLog; - PFNGLGETDOUBLEI_VPROC GetDoublei_v; - PFNGLGETDOUBLEVPROC GetDoublev; - PFNGLGETERRORPROC GetError; - PFNGLGETFLOATI_VPROC GetFloati_v; - PFNGLGETFLOATVPROC GetFloatv; - PFNGLGETFRAGDATAINDEXPROC GetFragDataIndex; - PFNGLGETFRAGDATALOCATIONPROC GetFragDataLocation; - PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC GetFramebufferAttachmentParameteriv; - PFNGLGETFRAMEBUFFERPARAMETERIVPROC GetFramebufferParameteriv; - PFNGLGETGRAPHICSRESETSTATUSPROC GetGraphicsResetStatus; - PFNGLGETINTEGER64I_VPROC GetInteger64i_v; - PFNGLGETINTEGER64VPROC GetInteger64v; - PFNGLGETINTEGERI_VPROC GetIntegeri_v; - PFNGLGETINTEGERVPROC GetIntegerv; - PFNGLGETINTERNALFORMATI64VPROC GetInternalformati64v; - PFNGLGETINTERNALFORMATIVPROC GetInternalformativ; - PFNGLGETMULTISAMPLEFVPROC GetMultisamplefv; - PFNGLGETNAMEDBUFFERPARAMETERI64VPROC GetNamedBufferParameteri64v; - PFNGLGETNAMEDBUFFERPARAMETERIVPROC GetNamedBufferParameteriv; - PFNGLGETNAMEDBUFFERPOINTERVPROC GetNamedBufferPointerv; - PFNGLGETNAMEDBUFFERSUBDATAPROC GetNamedBufferSubData; - PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC GetNamedFramebufferAttachmentParameteriv; - PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC GetNamedFramebufferParameteriv; - PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC GetNamedRenderbufferParameteriv; - PFNGLGETOBJECTLABELPROC GetObjectLabel; - PFNGLGETOBJECTPTRLABELPROC GetObjectPtrLabel; - PFNGLGETPOINTERVPROC GetPointerv; - PFNGLGETPROGRAMBINARYPROC GetProgramBinary; - PFNGLGETPROGRAMINFOLOGPROC GetProgramInfoLog; - PFNGLGETPROGRAMINTERFACEIVPROC GetProgramInterfaceiv; - PFNGLGETPROGRAMPIPELINEINFOLOGPROC GetProgramPipelineInfoLog; - PFNGLGETPROGRAMPIPELINEIVPROC GetProgramPipelineiv; - PFNGLGETPROGRAMRESOURCEINDEXPROC GetProgramResourceIndex; - PFNGLGETPROGRAMRESOURCELOCATIONPROC GetProgramResourceLocation; - PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC GetProgramResourceLocationIndex; - PFNGLGETPROGRAMRESOURCENAMEPROC GetProgramResourceName; - PFNGLGETPROGRAMRESOURCEIVPROC GetProgramResourceiv; - PFNGLGETPROGRAMSTAGEIVPROC GetProgramStageiv; - PFNGLGETPROGRAMIVPROC GetProgramiv; - PFNGLGETQUERYBUFFEROBJECTI64VPROC GetQueryBufferObjecti64v; - PFNGLGETQUERYBUFFEROBJECTIVPROC GetQueryBufferObjectiv; - PFNGLGETQUERYBUFFEROBJECTUI64VPROC GetQueryBufferObjectui64v; - PFNGLGETQUERYBUFFEROBJECTUIVPROC GetQueryBufferObjectuiv; - PFNGLGETQUERYINDEXEDIVPROC GetQueryIndexediv; - PFNGLGETQUERYOBJECTI64VPROC GetQueryObjecti64v; - PFNGLGETQUERYOBJECTIVPROC GetQueryObjectiv; - PFNGLGETQUERYOBJECTUI64VPROC GetQueryObjectui64v; - PFNGLGETQUERYOBJECTUIVPROC GetQueryObjectuiv; - PFNGLGETQUERYIVPROC GetQueryiv; - PFNGLGETRENDERBUFFERPARAMETERIVPROC GetRenderbufferParameteriv; - PFNGLGETSAMPLERPARAMETERIIVPROC GetSamplerParameterIiv; - PFNGLGETSAMPLERPARAMETERIUIVPROC GetSamplerParameterIuiv; - PFNGLGETSAMPLERPARAMETERFVPROC GetSamplerParameterfv; - PFNGLGETSAMPLERPARAMETERIVPROC GetSamplerParameteriv; - PFNGLGETSHADERINFOLOGPROC GetShaderInfoLog; - PFNGLGETSHADERPRECISIONFORMATPROC GetShaderPrecisionFormat; - PFNGLGETSHADERSOURCEPROC GetShaderSource; - PFNGLGETSHADERIVPROC GetShaderiv; - PFNGLGETSTRINGPROC GetString; - PFNGLGETSTRINGIPROC GetStringi; - PFNGLGETSUBROUTINEINDEXPROC GetSubroutineIndex; - PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC GetSubroutineUniformLocation; - PFNGLGETSYNCIVPROC GetSynciv; - PFNGLGETTEXIMAGEPROC GetTexImage; - PFNGLGETTEXLEVELPARAMETERFVPROC GetTexLevelParameterfv; - PFNGLGETTEXLEVELPARAMETERIVPROC GetTexLevelParameteriv; - PFNGLGETTEXPARAMETERIIVPROC GetTexParameterIiv; - PFNGLGETTEXPARAMETERIUIVPROC GetTexParameterIuiv; - PFNGLGETTEXPARAMETERFVPROC GetTexParameterfv; - PFNGLGETTEXPARAMETERIVPROC GetTexParameteriv; - PFNGLGETTEXTUREIMAGEPROC GetTextureImage; - PFNGLGETTEXTURELEVELPARAMETERFVPROC GetTextureLevelParameterfv; - PFNGLGETTEXTURELEVELPARAMETERIVPROC GetTextureLevelParameteriv; - PFNGLGETTEXTUREPARAMETERIIVPROC GetTextureParameterIiv; - PFNGLGETTEXTUREPARAMETERIUIVPROC GetTextureParameterIuiv; - PFNGLGETTEXTUREPARAMETERFVPROC GetTextureParameterfv; - PFNGLGETTEXTUREPARAMETERIVPROC GetTextureParameteriv; - PFNGLGETTEXTURESUBIMAGEPROC GetTextureSubImage; - PFNGLGETTRANSFORMFEEDBACKVARYINGPROC GetTransformFeedbackVarying; - PFNGLGETTRANSFORMFEEDBACKI64_VPROC GetTransformFeedbacki64_v; - PFNGLGETTRANSFORMFEEDBACKI_VPROC GetTransformFeedbacki_v; - PFNGLGETTRANSFORMFEEDBACKIVPROC GetTransformFeedbackiv; - PFNGLGETUNIFORMBLOCKINDEXPROC GetUniformBlockIndex; - PFNGLGETUNIFORMINDICESPROC GetUniformIndices; - PFNGLGETUNIFORMLOCATIONPROC GetUniformLocation; - PFNGLGETUNIFORMSUBROUTINEUIVPROC GetUniformSubroutineuiv; - PFNGLGETUNIFORMDVPROC GetUniformdv; - PFNGLGETUNIFORMFVPROC GetUniformfv; - PFNGLGETUNIFORMIVPROC GetUniformiv; - PFNGLGETUNIFORMUIVPROC GetUniformuiv; - PFNGLGETVERTEXARRAYINDEXED64IVPROC GetVertexArrayIndexed64iv; - PFNGLGETVERTEXARRAYINDEXEDIVPROC GetVertexArrayIndexediv; - PFNGLGETVERTEXARRAYIVPROC GetVertexArrayiv; - PFNGLGETVERTEXATTRIBIIVPROC GetVertexAttribIiv; - PFNGLGETVERTEXATTRIBIUIVPROC GetVertexAttribIuiv; - PFNGLGETVERTEXATTRIBLDVPROC GetVertexAttribLdv; - PFNGLGETVERTEXATTRIBPOINTERVPROC GetVertexAttribPointerv; - PFNGLGETVERTEXATTRIBDVPROC GetVertexAttribdv; - PFNGLGETVERTEXATTRIBFVPROC GetVertexAttribfv; - PFNGLGETVERTEXATTRIBIVPROC GetVertexAttribiv; - PFNGLGETNCOMPRESSEDTEXIMAGEPROC GetnCompressedTexImage; - PFNGLGETNTEXIMAGEPROC GetnTexImage; - PFNGLGETNUNIFORMDVPROC GetnUniformdv; - PFNGLGETNUNIFORMFVPROC GetnUniformfv; - PFNGLGETNUNIFORMIVPROC GetnUniformiv; - PFNGLGETNUNIFORMUIVPROC GetnUniformuiv; - PFNGLHINTPROC Hint; - PFNGLINVALIDATEBUFFERDATAPROC InvalidateBufferData; - PFNGLINVALIDATEBUFFERSUBDATAPROC InvalidateBufferSubData; - PFNGLINVALIDATEFRAMEBUFFERPROC InvalidateFramebuffer; - PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC InvalidateNamedFramebufferData; - PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC InvalidateNamedFramebufferSubData; - PFNGLINVALIDATESUBFRAMEBUFFERPROC InvalidateSubFramebuffer; - PFNGLINVALIDATETEXIMAGEPROC InvalidateTexImage; - PFNGLINVALIDATETEXSUBIMAGEPROC InvalidateTexSubImage; - PFNGLISBUFFERPROC IsBuffer; - PFNGLISENABLEDPROC IsEnabled; - PFNGLISENABLEDIPROC IsEnabledi; - PFNGLISFRAMEBUFFERPROC IsFramebuffer; - PFNGLISPROGRAMPROC IsProgram; - PFNGLISPROGRAMPIPELINEPROC IsProgramPipeline; - PFNGLISQUERYPROC IsQuery; - PFNGLISRENDERBUFFERPROC IsRenderbuffer; - PFNGLISSAMPLERPROC IsSampler; - PFNGLISSHADERPROC IsShader; - PFNGLISSYNCPROC IsSync; - PFNGLISTEXTUREPROC IsTexture; - PFNGLISTRANSFORMFEEDBACKPROC IsTransformFeedback; - PFNGLISVERTEXARRAYPROC IsVertexArray; - PFNGLLINEWIDTHPROC LineWidth; - PFNGLLINKPROGRAMPROC LinkProgram; - PFNGLLOGICOPPROC LogicOp; - PFNGLMAPBUFFERPROC MapBuffer; - PFNGLMAPBUFFERRANGEPROC MapBufferRange; - PFNGLMAPNAMEDBUFFERPROC MapNamedBuffer; - PFNGLMAPNAMEDBUFFERRANGEPROC MapNamedBufferRange; - PFNGLMEMORYBARRIERPROC MemoryBarrier; - PFNGLMEMORYBARRIERBYREGIONPROC MemoryBarrierByRegion; - PFNGLMINSAMPLESHADINGPROC MinSampleShading; - PFNGLMULTIDRAWARRAYSPROC MultiDrawArrays; - PFNGLMULTIDRAWARRAYSINDIRECTPROC MultiDrawArraysIndirect; - PFNGLMULTIDRAWARRAYSINDIRECTCOUNTPROC MultiDrawArraysIndirectCount; - PFNGLMULTIDRAWELEMENTSPROC MultiDrawElements; - PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC MultiDrawElementsBaseVertex; - PFNGLMULTIDRAWELEMENTSINDIRECTPROC MultiDrawElementsIndirect; - PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTPROC MultiDrawElementsIndirectCount; - PFNGLNAMEDBUFFERDATAPROC NamedBufferData; - PFNGLNAMEDBUFFERSTORAGEPROC NamedBufferStorage; - PFNGLNAMEDBUFFERSUBDATAPROC NamedBufferSubData; - PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC NamedFramebufferDrawBuffer; - PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC NamedFramebufferDrawBuffers; - PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC NamedFramebufferParameteri; - PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC NamedFramebufferReadBuffer; - PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC NamedFramebufferRenderbuffer; - PFNGLNAMEDFRAMEBUFFERTEXTUREPROC NamedFramebufferTexture; - PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC NamedFramebufferTextureLayer; - PFNGLNAMEDRENDERBUFFERSTORAGEPROC NamedRenderbufferStorage; - PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC NamedRenderbufferStorageMultisample; - PFNGLOBJECTLABELPROC ObjectLabel; - PFNGLOBJECTPTRLABELPROC ObjectPtrLabel; - PFNGLPATCHPARAMETERFVPROC PatchParameterfv; - PFNGLPATCHPARAMETERIPROC PatchParameteri; - PFNGLPAUSETRANSFORMFEEDBACKPROC PauseTransformFeedback; - PFNGLPIXELSTOREFPROC PixelStoref; - PFNGLPIXELSTOREIPROC PixelStorei; - PFNGLPOINTPARAMETERFPROC PointParameterf; - PFNGLPOINTPARAMETERFVPROC PointParameterfv; - PFNGLPOINTPARAMETERIPROC PointParameteri; - PFNGLPOINTPARAMETERIVPROC PointParameteriv; - PFNGLPOINTSIZEPROC PointSize; - PFNGLPOLYGONMODEPROC PolygonMode; - PFNGLPOLYGONOFFSETPROC PolygonOffset; - PFNGLPOLYGONOFFSETCLAMPPROC PolygonOffsetClamp; - PFNGLPOPDEBUGGROUPPROC PopDebugGroup; - PFNGLPRIMITIVERESTARTINDEXPROC PrimitiveRestartIndex; - PFNGLPROGRAMBINARYPROC ProgramBinary; - PFNGLPROGRAMPARAMETERIPROC ProgramParameteri; - PFNGLPROGRAMUNIFORM1DPROC ProgramUniform1d; - PFNGLPROGRAMUNIFORM1DVPROC ProgramUniform1dv; - PFNGLPROGRAMUNIFORM1FPROC ProgramUniform1f; - PFNGLPROGRAMUNIFORM1FVPROC ProgramUniform1fv; - PFNGLPROGRAMUNIFORM1IPROC ProgramUniform1i; - PFNGLPROGRAMUNIFORM1IVPROC ProgramUniform1iv; - PFNGLPROGRAMUNIFORM1UIPROC ProgramUniform1ui; - PFNGLPROGRAMUNIFORM1UIVPROC ProgramUniform1uiv; - PFNGLPROGRAMUNIFORM2DPROC ProgramUniform2d; - PFNGLPROGRAMUNIFORM2DVPROC ProgramUniform2dv; - PFNGLPROGRAMUNIFORM2FPROC ProgramUniform2f; - PFNGLPROGRAMUNIFORM2FVPROC ProgramUniform2fv; - PFNGLPROGRAMUNIFORM2IPROC ProgramUniform2i; - PFNGLPROGRAMUNIFORM2IVPROC ProgramUniform2iv; - PFNGLPROGRAMUNIFORM2UIPROC ProgramUniform2ui; - PFNGLPROGRAMUNIFORM2UIVPROC ProgramUniform2uiv; - PFNGLPROGRAMUNIFORM3DPROC ProgramUniform3d; - PFNGLPROGRAMUNIFORM3DVPROC ProgramUniform3dv; - PFNGLPROGRAMUNIFORM3FPROC ProgramUniform3f; - PFNGLPROGRAMUNIFORM3FVPROC ProgramUniform3fv; - PFNGLPROGRAMUNIFORM3IPROC ProgramUniform3i; - PFNGLPROGRAMUNIFORM3IVPROC ProgramUniform3iv; - PFNGLPROGRAMUNIFORM3UIPROC ProgramUniform3ui; - PFNGLPROGRAMUNIFORM3UIVPROC ProgramUniform3uiv; - PFNGLPROGRAMUNIFORM4DPROC ProgramUniform4d; - PFNGLPROGRAMUNIFORM4DVPROC ProgramUniform4dv; - PFNGLPROGRAMUNIFORM4FPROC ProgramUniform4f; - PFNGLPROGRAMUNIFORM4FVPROC ProgramUniform4fv; - PFNGLPROGRAMUNIFORM4IPROC ProgramUniform4i; - PFNGLPROGRAMUNIFORM4IVPROC ProgramUniform4iv; - PFNGLPROGRAMUNIFORM4UIPROC ProgramUniform4ui; - PFNGLPROGRAMUNIFORM4UIVPROC ProgramUniform4uiv; - PFNGLPROGRAMUNIFORMMATRIX2DVPROC ProgramUniformMatrix2dv; - PFNGLPROGRAMUNIFORMMATRIX2FVPROC ProgramUniformMatrix2fv; - PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC ProgramUniformMatrix2x3dv; - PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC ProgramUniformMatrix2x3fv; - PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC ProgramUniformMatrix2x4dv; - PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC ProgramUniformMatrix2x4fv; - PFNGLPROGRAMUNIFORMMATRIX3DVPROC ProgramUniformMatrix3dv; - PFNGLPROGRAMUNIFORMMATRIX3FVPROC ProgramUniformMatrix3fv; - PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC ProgramUniformMatrix3x2dv; - PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC ProgramUniformMatrix3x2fv; - PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC ProgramUniformMatrix3x4dv; - PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC ProgramUniformMatrix3x4fv; - PFNGLPROGRAMUNIFORMMATRIX4DVPROC ProgramUniformMatrix4dv; - PFNGLPROGRAMUNIFORMMATRIX4FVPROC ProgramUniformMatrix4fv; - PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC ProgramUniformMatrix4x2dv; - PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC ProgramUniformMatrix4x2fv; - PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC ProgramUniformMatrix4x3dv; - PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC ProgramUniformMatrix4x3fv; - PFNGLPROVOKINGVERTEXPROC ProvokingVertex; - PFNGLPUSHDEBUGGROUPPROC PushDebugGroup; - PFNGLQUERYCOUNTERPROC QueryCounter; - PFNGLREADBUFFERPROC ReadBuffer; - PFNGLREADPIXELSPROC ReadPixels; - PFNGLREADNPIXELSPROC ReadnPixels; - PFNGLRELEASESHADERCOMPILERPROC ReleaseShaderCompiler; - PFNGLRENDERBUFFERSTORAGEPROC RenderbufferStorage; - PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC RenderbufferStorageMultisample; - PFNGLRESUMETRANSFORMFEEDBACKPROC ResumeTransformFeedback; - PFNGLSAMPLECOVERAGEPROC SampleCoverage; - PFNGLSAMPLEMASKIPROC SampleMaski; - PFNGLSAMPLERPARAMETERIIVPROC SamplerParameterIiv; - PFNGLSAMPLERPARAMETERIUIVPROC SamplerParameterIuiv; - PFNGLSAMPLERPARAMETERFPROC SamplerParameterf; - PFNGLSAMPLERPARAMETERFVPROC SamplerParameterfv; - PFNGLSAMPLERPARAMETERIPROC SamplerParameteri; - PFNGLSAMPLERPARAMETERIVPROC SamplerParameteriv; - PFNGLSCISSORPROC Scissor; - PFNGLSCISSORARRAYVPROC ScissorArrayv; - PFNGLSCISSORINDEXEDPROC ScissorIndexed; - PFNGLSCISSORINDEXEDVPROC ScissorIndexedv; - PFNGLSHADERBINARYPROC ShaderBinary; - PFNGLSHADERSOURCEPROC ShaderSource; - PFNGLSHADERSTORAGEBLOCKBINDINGPROC ShaderStorageBlockBinding; - PFNGLSPECIALIZESHADERPROC SpecializeShader; - PFNGLSTENCILFUNCPROC StencilFunc; - PFNGLSTENCILFUNCSEPARATEPROC StencilFuncSeparate; - PFNGLSTENCILMASKPROC StencilMask; - PFNGLSTENCILMASKSEPARATEPROC StencilMaskSeparate; - PFNGLSTENCILOPPROC StencilOp; - PFNGLSTENCILOPSEPARATEPROC StencilOpSeparate; - PFNGLTEXBUFFERPROC TexBuffer; - PFNGLTEXBUFFERRANGEPROC TexBufferRange; - PFNGLTEXIMAGE1DPROC TexImage1D; - PFNGLTEXIMAGE2DPROC TexImage2D; - PFNGLTEXIMAGE2DMULTISAMPLEPROC TexImage2DMultisample; - PFNGLTEXIMAGE3DPROC TexImage3D; - PFNGLTEXIMAGE3DMULTISAMPLEPROC TexImage3DMultisample; - PFNGLTEXPARAMETERIIVPROC TexParameterIiv; - PFNGLTEXPARAMETERIUIVPROC TexParameterIuiv; - PFNGLTEXPARAMETERFPROC TexParameterf; - PFNGLTEXPARAMETERFVPROC TexParameterfv; - PFNGLTEXPARAMETERIPROC TexParameteri; - PFNGLTEXPARAMETERIVPROC TexParameteriv; - PFNGLTEXSTORAGE1DPROC TexStorage1D; - PFNGLTEXSTORAGE2DPROC TexStorage2D; - PFNGLTEXSTORAGE2DMULTISAMPLEPROC TexStorage2DMultisample; - PFNGLTEXSTORAGE3DPROC TexStorage3D; - PFNGLTEXSTORAGE3DMULTISAMPLEPROC TexStorage3DMultisample; - PFNGLTEXSUBIMAGE1DPROC TexSubImage1D; - PFNGLTEXSUBIMAGE2DPROC TexSubImage2D; - PFNGLTEXSUBIMAGE3DPROC TexSubImage3D; - PFNGLTEXTUREBARRIERPROC TextureBarrier; - PFNGLTEXTUREBUFFERPROC TextureBuffer; - PFNGLTEXTUREBUFFERRANGEPROC TextureBufferRange; - PFNGLTEXTUREPARAMETERIIVPROC TextureParameterIiv; - PFNGLTEXTUREPARAMETERIUIVPROC TextureParameterIuiv; - PFNGLTEXTUREPARAMETERFPROC TextureParameterf; - PFNGLTEXTUREPARAMETERFVPROC TextureParameterfv; - PFNGLTEXTUREPARAMETERIPROC TextureParameteri; - PFNGLTEXTUREPARAMETERIVPROC TextureParameteriv; - PFNGLTEXTURESTORAGE1DPROC TextureStorage1D; - PFNGLTEXTURESTORAGE2DPROC TextureStorage2D; - PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC TextureStorage2DMultisample; - PFNGLTEXTURESTORAGE3DPROC TextureStorage3D; - PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC TextureStorage3DMultisample; - PFNGLTEXTURESUBIMAGE1DPROC TextureSubImage1D; - PFNGLTEXTURESUBIMAGE2DPROC TextureSubImage2D; - PFNGLTEXTURESUBIMAGE3DPROC TextureSubImage3D; - PFNGLTEXTUREVIEWPROC TextureView; - PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC TransformFeedbackBufferBase; - PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC TransformFeedbackBufferRange; - PFNGLTRANSFORMFEEDBACKVARYINGSPROC TransformFeedbackVaryings; - PFNGLUNIFORM1DPROC Uniform1d; - PFNGLUNIFORM1DVPROC Uniform1dv; - PFNGLUNIFORM1FPROC Uniform1f; - PFNGLUNIFORM1FVPROC Uniform1fv; - PFNGLUNIFORM1IPROC Uniform1i; - PFNGLUNIFORM1IVPROC Uniform1iv; - PFNGLUNIFORM1UIPROC Uniform1ui; - PFNGLUNIFORM1UIVPROC Uniform1uiv; - PFNGLUNIFORM2DPROC Uniform2d; - PFNGLUNIFORM2DVPROC Uniform2dv; - PFNGLUNIFORM2FPROC Uniform2f; - PFNGLUNIFORM2FVPROC Uniform2fv; - PFNGLUNIFORM2IPROC Uniform2i; - PFNGLUNIFORM2IVPROC Uniform2iv; - PFNGLUNIFORM2UIPROC Uniform2ui; - PFNGLUNIFORM2UIVPROC Uniform2uiv; - PFNGLUNIFORM3DPROC Uniform3d; - PFNGLUNIFORM3DVPROC Uniform3dv; - PFNGLUNIFORM3FPROC Uniform3f; - PFNGLUNIFORM3FVPROC Uniform3fv; - PFNGLUNIFORM3IPROC Uniform3i; - PFNGLUNIFORM3IVPROC Uniform3iv; - PFNGLUNIFORM3UIPROC Uniform3ui; - PFNGLUNIFORM3UIVPROC Uniform3uiv; - PFNGLUNIFORM4DPROC Uniform4d; - PFNGLUNIFORM4DVPROC Uniform4dv; - PFNGLUNIFORM4FPROC Uniform4f; - PFNGLUNIFORM4FVPROC Uniform4fv; - PFNGLUNIFORM4IPROC Uniform4i; - PFNGLUNIFORM4IVPROC Uniform4iv; - PFNGLUNIFORM4UIPROC Uniform4ui; - PFNGLUNIFORM4UIVPROC Uniform4uiv; - PFNGLUNIFORMBLOCKBINDINGPROC UniformBlockBinding; - PFNGLUNIFORMMATRIX2DVPROC UniformMatrix2dv; - PFNGLUNIFORMMATRIX2FVPROC UniformMatrix2fv; - PFNGLUNIFORMMATRIX2X3DVPROC UniformMatrix2x3dv; - PFNGLUNIFORMMATRIX2X3FVPROC UniformMatrix2x3fv; - PFNGLUNIFORMMATRIX2X4DVPROC UniformMatrix2x4dv; - PFNGLUNIFORMMATRIX2X4FVPROC UniformMatrix2x4fv; - PFNGLUNIFORMMATRIX3DVPROC UniformMatrix3dv; - PFNGLUNIFORMMATRIX3FVPROC UniformMatrix3fv; - PFNGLUNIFORMMATRIX3X2DVPROC UniformMatrix3x2dv; - PFNGLUNIFORMMATRIX3X2FVPROC UniformMatrix3x2fv; - PFNGLUNIFORMMATRIX3X4DVPROC UniformMatrix3x4dv; - PFNGLUNIFORMMATRIX3X4FVPROC UniformMatrix3x4fv; - PFNGLUNIFORMMATRIX4DVPROC UniformMatrix4dv; - PFNGLUNIFORMMATRIX4FVPROC UniformMatrix4fv; - PFNGLUNIFORMMATRIX4X2DVPROC UniformMatrix4x2dv; - PFNGLUNIFORMMATRIX4X2FVPROC UniformMatrix4x2fv; - PFNGLUNIFORMMATRIX4X3DVPROC UniformMatrix4x3dv; - PFNGLUNIFORMMATRIX4X3FVPROC UniformMatrix4x3fv; - PFNGLUNIFORMSUBROUTINESUIVPROC UniformSubroutinesuiv; - PFNGLUNMAPBUFFERPROC UnmapBuffer; - PFNGLUNMAPNAMEDBUFFERPROC UnmapNamedBuffer; - PFNGLUSEPROGRAMPROC UseProgram; - PFNGLUSEPROGRAMSTAGESPROC UseProgramStages; - PFNGLVALIDATEPROGRAMPROC ValidateProgram; - PFNGLVALIDATEPROGRAMPIPELINEPROC ValidateProgramPipeline; - PFNGLVERTEXARRAYATTRIBBINDINGPROC VertexArrayAttribBinding; - PFNGLVERTEXARRAYATTRIBFORMATPROC VertexArrayAttribFormat; - PFNGLVERTEXARRAYATTRIBIFORMATPROC VertexArrayAttribIFormat; - PFNGLVERTEXARRAYATTRIBLFORMATPROC VertexArrayAttribLFormat; - PFNGLVERTEXARRAYBINDINGDIVISORPROC VertexArrayBindingDivisor; - PFNGLVERTEXARRAYELEMENTBUFFERPROC VertexArrayElementBuffer; - PFNGLVERTEXARRAYVERTEXBUFFERPROC VertexArrayVertexBuffer; - PFNGLVERTEXARRAYVERTEXBUFFERSPROC VertexArrayVertexBuffers; - PFNGLVERTEXATTRIB1DPROC VertexAttrib1d; - PFNGLVERTEXATTRIB1DVPROC VertexAttrib1dv; - PFNGLVERTEXATTRIB1FPROC VertexAttrib1f; - PFNGLVERTEXATTRIB1FVPROC VertexAttrib1fv; - PFNGLVERTEXATTRIB1SPROC VertexAttrib1s; - PFNGLVERTEXATTRIB1SVPROC VertexAttrib1sv; - PFNGLVERTEXATTRIB2DPROC VertexAttrib2d; - PFNGLVERTEXATTRIB2DVPROC VertexAttrib2dv; - PFNGLVERTEXATTRIB2FPROC VertexAttrib2f; - PFNGLVERTEXATTRIB2FVPROC VertexAttrib2fv; - PFNGLVERTEXATTRIB2SPROC VertexAttrib2s; - PFNGLVERTEXATTRIB2SVPROC VertexAttrib2sv; - PFNGLVERTEXATTRIB3DPROC VertexAttrib3d; - PFNGLVERTEXATTRIB3DVPROC VertexAttrib3dv; - PFNGLVERTEXATTRIB3FPROC VertexAttrib3f; - PFNGLVERTEXATTRIB3FVPROC VertexAttrib3fv; - PFNGLVERTEXATTRIB3SPROC VertexAttrib3s; - PFNGLVERTEXATTRIB3SVPROC VertexAttrib3sv; - PFNGLVERTEXATTRIB4NBVPROC VertexAttrib4Nbv; - PFNGLVERTEXATTRIB4NIVPROC VertexAttrib4Niv; - PFNGLVERTEXATTRIB4NSVPROC VertexAttrib4Nsv; - PFNGLVERTEXATTRIB4NUBPROC VertexAttrib4Nub; - PFNGLVERTEXATTRIB4NUBVPROC VertexAttrib4Nubv; - PFNGLVERTEXATTRIB4NUIVPROC VertexAttrib4Nuiv; - PFNGLVERTEXATTRIB4NUSVPROC VertexAttrib4Nusv; - PFNGLVERTEXATTRIB4BVPROC VertexAttrib4bv; - PFNGLVERTEXATTRIB4DPROC VertexAttrib4d; - PFNGLVERTEXATTRIB4DVPROC VertexAttrib4dv; - PFNGLVERTEXATTRIB4FPROC VertexAttrib4f; - PFNGLVERTEXATTRIB4FVPROC VertexAttrib4fv; - PFNGLVERTEXATTRIB4IVPROC VertexAttrib4iv; - PFNGLVERTEXATTRIB4SPROC VertexAttrib4s; - PFNGLVERTEXATTRIB4SVPROC VertexAttrib4sv; - PFNGLVERTEXATTRIB4UBVPROC VertexAttrib4ubv; - PFNGLVERTEXATTRIB4UIVPROC VertexAttrib4uiv; - PFNGLVERTEXATTRIB4USVPROC VertexAttrib4usv; - PFNGLVERTEXATTRIBBINDINGPROC VertexAttribBinding; - PFNGLVERTEXATTRIBDIVISORPROC VertexAttribDivisor; - PFNGLVERTEXATTRIBFORMATPROC VertexAttribFormat; - PFNGLVERTEXATTRIBI1IPROC VertexAttribI1i; - PFNGLVERTEXATTRIBI1IVPROC VertexAttribI1iv; - PFNGLVERTEXATTRIBI1UIPROC VertexAttribI1ui; - PFNGLVERTEXATTRIBI1UIVPROC VertexAttribI1uiv; - PFNGLVERTEXATTRIBI2IPROC VertexAttribI2i; - PFNGLVERTEXATTRIBI2IVPROC VertexAttribI2iv; - PFNGLVERTEXATTRIBI2UIPROC VertexAttribI2ui; - PFNGLVERTEXATTRIBI2UIVPROC VertexAttribI2uiv; - PFNGLVERTEXATTRIBI3IPROC VertexAttribI3i; - PFNGLVERTEXATTRIBI3IVPROC VertexAttribI3iv; - PFNGLVERTEXATTRIBI3UIPROC VertexAttribI3ui; - PFNGLVERTEXATTRIBI3UIVPROC VertexAttribI3uiv; - PFNGLVERTEXATTRIBI4BVPROC VertexAttribI4bv; - PFNGLVERTEXATTRIBI4IPROC VertexAttribI4i; - PFNGLVERTEXATTRIBI4IVPROC VertexAttribI4iv; - PFNGLVERTEXATTRIBI4SVPROC VertexAttribI4sv; - PFNGLVERTEXATTRIBI4UBVPROC VertexAttribI4ubv; - PFNGLVERTEXATTRIBI4UIPROC VertexAttribI4ui; - PFNGLVERTEXATTRIBI4UIVPROC VertexAttribI4uiv; - PFNGLVERTEXATTRIBI4USVPROC VertexAttribI4usv; - PFNGLVERTEXATTRIBIFORMATPROC VertexAttribIFormat; - PFNGLVERTEXATTRIBIPOINTERPROC VertexAttribIPointer; - PFNGLVERTEXATTRIBL1DPROC VertexAttribL1d; - PFNGLVERTEXATTRIBL1DVPROC VertexAttribL1dv; - PFNGLVERTEXATTRIBL2DPROC VertexAttribL2d; - PFNGLVERTEXATTRIBL2DVPROC VertexAttribL2dv; - PFNGLVERTEXATTRIBL3DPROC VertexAttribL3d; - PFNGLVERTEXATTRIBL3DVPROC VertexAttribL3dv; - PFNGLVERTEXATTRIBL4DPROC VertexAttribL4d; - PFNGLVERTEXATTRIBL4DVPROC VertexAttribL4dv; - PFNGLVERTEXATTRIBLFORMATPROC VertexAttribLFormat; - PFNGLVERTEXATTRIBLPOINTERPROC VertexAttribLPointer; - PFNGLVERTEXATTRIBP1UIPROC VertexAttribP1ui; - PFNGLVERTEXATTRIBP1UIVPROC VertexAttribP1uiv; - PFNGLVERTEXATTRIBP2UIPROC VertexAttribP2ui; - PFNGLVERTEXATTRIBP2UIVPROC VertexAttribP2uiv; - PFNGLVERTEXATTRIBP3UIPROC VertexAttribP3ui; - PFNGLVERTEXATTRIBP3UIVPROC VertexAttribP3uiv; - PFNGLVERTEXATTRIBP4UIPROC VertexAttribP4ui; - PFNGLVERTEXATTRIBP4UIVPROC VertexAttribP4uiv; - PFNGLVERTEXATTRIBPOINTERPROC VertexAttribPointer; - PFNGLVERTEXBINDINGDIVISORPROC VertexBindingDivisor; - PFNGLVIEWPORTPROC Viewport; - PFNGLVIEWPORTARRAYVPROC ViewportArrayv; - PFNGLVIEWPORTINDEXEDFPROC ViewportIndexedf; - PFNGLVIEWPORTINDEXEDFVPROC ViewportIndexedfv; + PFNGLACTIVESHADERPROGRAMPROC ActiveShaderProgram; + PFNGLACTIVETEXTUREPROC ActiveTexture; + PFNGLATTACHSHADERPROC AttachShader; + PFNGLBEGINCONDITIONALRENDERPROC BeginConditionalRender; + PFNGLBEGINQUERYPROC BeginQuery; + PFNGLBEGINQUERYINDEXEDPROC BeginQueryIndexed; + PFNGLBEGINTRANSFORMFEEDBACKPROC BeginTransformFeedback; + PFNGLBINDATTRIBLOCATIONPROC BindAttribLocation; + PFNGLBINDBUFFERPROC BindBuffer; + PFNGLBINDBUFFERBASEPROC BindBufferBase; + PFNGLBINDBUFFERRANGEPROC BindBufferRange; + PFNGLBINDBUFFERSBASEPROC BindBuffersBase; + PFNGLBINDBUFFERSRANGEPROC BindBuffersRange; + PFNGLBINDFRAGDATALOCATIONPROC BindFragDataLocation; + PFNGLBINDFRAGDATALOCATIONINDEXEDPROC BindFragDataLocationIndexed; + PFNGLBINDFRAMEBUFFERPROC BindFramebuffer; + PFNGLBINDIMAGETEXTUREPROC BindImageTexture; + PFNGLBINDIMAGETEXTURESPROC BindImageTextures; + PFNGLBINDPROGRAMPIPELINEPROC BindProgramPipeline; + PFNGLBINDRENDERBUFFERPROC BindRenderbuffer; + PFNGLBINDSAMPLERPROC BindSampler; + PFNGLBINDSAMPLERSPROC BindSamplers; + PFNGLBINDTEXTUREPROC BindTexture; + PFNGLBINDTEXTUREUNITPROC BindTextureUnit; + PFNGLBINDTEXTURESPROC BindTextures; + PFNGLBINDTRANSFORMFEEDBACKPROC BindTransformFeedback; + PFNGLBINDVERTEXARRAYPROC BindVertexArray; + PFNGLBINDVERTEXBUFFERPROC BindVertexBuffer; + PFNGLBINDVERTEXBUFFERSPROC BindVertexBuffers; + PFNGLBLENDCOLORPROC BlendColor; + PFNGLBLENDEQUATIONPROC BlendEquation; + PFNGLBLENDEQUATIONSEPARATEPROC BlendEquationSeparate; + PFNGLBLENDEQUATIONSEPARATEIPROC BlendEquationSeparatei; + PFNGLBLENDEQUATIONIPROC BlendEquationi; + PFNGLBLENDFUNCPROC BlendFunc; + PFNGLBLENDFUNCSEPARATEPROC BlendFuncSeparate; + PFNGLBLENDFUNCSEPARATEIPROC BlendFuncSeparatei; + PFNGLBLENDFUNCIPROC BlendFunci; + PFNGLBLITFRAMEBUFFERPROC BlitFramebuffer; + PFNGLBLITNAMEDFRAMEBUFFERPROC BlitNamedFramebuffer; + PFNGLBUFFERDATAPROC BufferData; + PFNGLBUFFERSTORAGEPROC BufferStorage; + PFNGLBUFFERSUBDATAPROC BufferSubData; + PFNGLCHECKFRAMEBUFFERSTATUSPROC CheckFramebufferStatus; + PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC CheckNamedFramebufferStatus; + PFNGLCLAMPCOLORPROC ClampColor; + PFNGLCLEARPROC Clear; + PFNGLCLEARBUFFERDATAPROC ClearBufferData; + PFNGLCLEARBUFFERSUBDATAPROC ClearBufferSubData; + PFNGLCLEARBUFFERFIPROC ClearBufferfi; + PFNGLCLEARBUFFERFVPROC ClearBufferfv; + PFNGLCLEARBUFFERIVPROC ClearBufferiv; + PFNGLCLEARBUFFERUIVPROC ClearBufferuiv; + PFNGLCLEARCOLORPROC ClearColor; + PFNGLCLEARDEPTHPROC ClearDepth; + PFNGLCLEARDEPTHFPROC ClearDepthf; + PFNGLCLEARNAMEDBUFFERDATAPROC ClearNamedBufferData; + PFNGLCLEARNAMEDBUFFERSUBDATAPROC ClearNamedBufferSubData; + PFNGLCLEARNAMEDFRAMEBUFFERFIPROC ClearNamedFramebufferfi; + PFNGLCLEARNAMEDFRAMEBUFFERFVPROC ClearNamedFramebufferfv; + PFNGLCLEARNAMEDFRAMEBUFFERIVPROC ClearNamedFramebufferiv; + PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC ClearNamedFramebufferuiv; + PFNGLCLEARSTENCILPROC ClearStencil; + PFNGLCLEARTEXIMAGEPROC ClearTexImage; + PFNGLCLEARTEXSUBIMAGEPROC ClearTexSubImage; + PFNGLCLIENTWAITSYNCPROC ClientWaitSync; + PFNGLCLIPCONTROLPROC ClipControl; + PFNGLCOLORMASKPROC ColorMask; + PFNGLCOLORMASKIPROC ColorMaski; + PFNGLCOMPILESHADERPROC CompileShader; + PFNGLCOMPRESSEDTEXIMAGE1DPROC CompressedTexImage1D; + PFNGLCOMPRESSEDTEXIMAGE2DPROC CompressedTexImage2D; + PFNGLCOMPRESSEDTEXIMAGE3DPROC CompressedTexImage3D; + PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC CompressedTexSubImage1D; + PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC CompressedTexSubImage2D; + PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC CompressedTexSubImage3D; + PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC CompressedTextureSubImage1D; + PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC CompressedTextureSubImage2D; + PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC CompressedTextureSubImage3D; + PFNGLCOPYBUFFERSUBDATAPROC CopyBufferSubData; + PFNGLCOPYIMAGESUBDATAPROC CopyImageSubData; + PFNGLCOPYNAMEDBUFFERSUBDATAPROC CopyNamedBufferSubData; + PFNGLCOPYTEXIMAGE1DPROC CopyTexImage1D; + PFNGLCOPYTEXIMAGE2DPROC CopyTexImage2D; + PFNGLCOPYTEXSUBIMAGE1DPROC CopyTexSubImage1D; + PFNGLCOPYTEXSUBIMAGE2DPROC CopyTexSubImage2D; + PFNGLCOPYTEXSUBIMAGE3DPROC CopyTexSubImage3D; + PFNGLCOPYTEXTURESUBIMAGE1DPROC CopyTextureSubImage1D; + PFNGLCOPYTEXTURESUBIMAGE2DPROC CopyTextureSubImage2D; + PFNGLCOPYTEXTURESUBIMAGE3DPROC CopyTextureSubImage3D; + PFNGLCREATEBUFFERSPROC CreateBuffers; + PFNGLCREATEFRAMEBUFFERSPROC CreateFramebuffers; + PFNGLCREATEPROGRAMPROC CreateProgram; + PFNGLCREATEPROGRAMPIPELINESPROC CreateProgramPipelines; + PFNGLCREATEQUERIESPROC CreateQueries; + PFNGLCREATERENDERBUFFERSPROC CreateRenderbuffers; + PFNGLCREATESAMPLERSPROC CreateSamplers; + PFNGLCREATESHADERPROC CreateShader; + PFNGLCREATESHADERPROGRAMVPROC CreateShaderProgramv; + PFNGLCREATETEXTURESPROC CreateTextures; + PFNGLCREATETRANSFORMFEEDBACKSPROC CreateTransformFeedbacks; + PFNGLCREATEVERTEXARRAYSPROC CreateVertexArrays; + PFNGLCULLFACEPROC CullFace; + PFNGLDEBUGMESSAGECALLBACKPROC DebugMessageCallback; + PFNGLDEBUGMESSAGECONTROLPROC DebugMessageControl; + PFNGLDEBUGMESSAGEINSERTPROC DebugMessageInsert; + PFNGLDELETEBUFFERSPROC DeleteBuffers; + PFNGLDELETEFRAMEBUFFERSPROC DeleteFramebuffers; + PFNGLDELETEPROGRAMPROC DeleteProgram; + PFNGLDELETEPROGRAMPIPELINESPROC DeleteProgramPipelines; + PFNGLDELETEQUERIESPROC DeleteQueries; + PFNGLDELETERENDERBUFFERSPROC DeleteRenderbuffers; + PFNGLDELETESAMPLERSPROC DeleteSamplers; + PFNGLDELETESHADERPROC DeleteShader; + PFNGLDELETESYNCPROC DeleteSync; + PFNGLDELETETEXTURESPROC DeleteTextures; + PFNGLDELETETRANSFORMFEEDBACKSPROC DeleteTransformFeedbacks; + PFNGLDELETEVERTEXARRAYSPROC DeleteVertexArrays; + PFNGLDEPTHFUNCPROC DepthFunc; + PFNGLDEPTHMASKPROC DepthMask; + PFNGLDEPTHRANGEPROC DepthRange; + PFNGLDEPTHRANGEARRAYVPROC DepthRangeArrayv; + PFNGLDEPTHRANGEINDEXEDPROC DepthRangeIndexed; + PFNGLDEPTHRANGEFPROC DepthRangef; + PFNGLDETACHSHADERPROC DetachShader; + PFNGLDISABLEPROC Disable; + PFNGLDISABLEVERTEXARRAYATTRIBPROC DisableVertexArrayAttrib; + PFNGLDISABLEVERTEXATTRIBARRAYPROC DisableVertexAttribArray; + PFNGLDISABLEIPROC Disablei; + PFNGLDISPATCHCOMPUTEPROC DispatchCompute; + PFNGLDISPATCHCOMPUTEINDIRECTPROC DispatchComputeIndirect; + PFNGLDRAWARRAYSPROC DrawArrays; + PFNGLDRAWARRAYSINDIRECTPROC DrawArraysIndirect; + PFNGLDRAWARRAYSINSTANCEDPROC DrawArraysInstanced; + PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC DrawArraysInstancedBaseInstance; + PFNGLDRAWBUFFERPROC DrawBuffer; + PFNGLDRAWBUFFERSPROC DrawBuffers; + PFNGLDRAWELEMENTSPROC DrawElements; + PFNGLDRAWELEMENTSBASEVERTEXPROC DrawElementsBaseVertex; + PFNGLDRAWELEMENTSINDIRECTPROC DrawElementsIndirect; + PFNGLDRAWELEMENTSINSTANCEDPROC DrawElementsInstanced; + PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC DrawElementsInstancedBaseInstance; + PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC DrawElementsInstancedBaseVertex; + PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC + DrawElementsInstancedBaseVertexBaseInstance; + PFNGLDRAWRANGEELEMENTSPROC DrawRangeElements; + PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC DrawRangeElementsBaseVertex; + PFNGLDRAWTRANSFORMFEEDBACKPROC DrawTransformFeedback; + PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC DrawTransformFeedbackInstanced; + PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC DrawTransformFeedbackStream; + PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC DrawTransformFeedbackStreamInstanced; + PFNGLENABLEPROC Enable; + PFNGLENABLEVERTEXARRAYATTRIBPROC EnableVertexArrayAttrib; + PFNGLENABLEVERTEXATTRIBARRAYPROC EnableVertexAttribArray; + PFNGLENABLEIPROC Enablei; + PFNGLENDCONDITIONALRENDERPROC EndConditionalRender; + PFNGLENDQUERYPROC EndQuery; + PFNGLENDQUERYINDEXEDPROC EndQueryIndexed; + PFNGLENDTRANSFORMFEEDBACKPROC EndTransformFeedback; + PFNGLFENCESYNCPROC FenceSync; + PFNGLFINISHPROC Finish; + PFNGLFLUSHPROC Flush; + PFNGLFLUSHMAPPEDBUFFERRANGEPROC FlushMappedBufferRange; + PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC FlushMappedNamedBufferRange; + PFNGLFRAMEBUFFERPARAMETERIPROC FramebufferParameteri; + PFNGLFRAMEBUFFERRENDERBUFFERPROC FramebufferRenderbuffer; + PFNGLFRAMEBUFFERTEXTUREPROC FramebufferTexture; + PFNGLFRAMEBUFFERTEXTURE1DPROC FramebufferTexture1D; + PFNGLFRAMEBUFFERTEXTURE2DPROC FramebufferTexture2D; + PFNGLFRAMEBUFFERTEXTURE3DPROC FramebufferTexture3D; + PFNGLFRAMEBUFFERTEXTURELAYERPROC FramebufferTextureLayer; + PFNGLFRONTFACEPROC FrontFace; + PFNGLGENBUFFERSPROC GenBuffers; + PFNGLGENFRAMEBUFFERSPROC GenFramebuffers; + PFNGLGENPROGRAMPIPELINESPROC GenProgramPipelines; + PFNGLGENQUERIESPROC GenQueries; + PFNGLGENRENDERBUFFERSPROC GenRenderbuffers; + PFNGLGENSAMPLERSPROC GenSamplers; + PFNGLGENTEXTURESPROC GenTextures; + PFNGLGENTRANSFORMFEEDBACKSPROC GenTransformFeedbacks; + PFNGLGENVERTEXARRAYSPROC GenVertexArrays; + PFNGLGENERATEMIPMAPPROC GenerateMipmap; + PFNGLGENERATETEXTUREMIPMAPPROC GenerateTextureMipmap; + PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC GetActiveAtomicCounterBufferiv; + PFNGLGETACTIVEATTRIBPROC GetActiveAttrib; + PFNGLGETACTIVESUBROUTINENAMEPROC GetActiveSubroutineName; + PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC GetActiveSubroutineUniformName; + PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC GetActiveSubroutineUniformiv; + PFNGLGETACTIVEUNIFORMPROC GetActiveUniform; + PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC GetActiveUniformBlockName; + PFNGLGETACTIVEUNIFORMBLOCKIVPROC GetActiveUniformBlockiv; + PFNGLGETACTIVEUNIFORMNAMEPROC GetActiveUniformName; + PFNGLGETACTIVEUNIFORMSIVPROC GetActiveUniformsiv; + PFNGLGETATTACHEDSHADERSPROC GetAttachedShaders; + PFNGLGETATTRIBLOCATIONPROC GetAttribLocation; + PFNGLGETBOOLEANI_VPROC GetBooleani_v; + PFNGLGETBOOLEANVPROC GetBooleanv; + PFNGLGETBUFFERPARAMETERI64VPROC GetBufferParameteri64v; + PFNGLGETBUFFERPARAMETERIVPROC GetBufferParameteriv; + PFNGLGETBUFFERPOINTERVPROC GetBufferPointerv; + PFNGLGETBUFFERSUBDATAPROC GetBufferSubData; + PFNGLGETCOMPRESSEDTEXIMAGEPROC GetCompressedTexImage; + PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC GetCompressedTextureImage; + PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC GetCompressedTextureSubImage; + PFNGLGETDEBUGMESSAGELOGPROC GetDebugMessageLog; + PFNGLGETDOUBLEI_VPROC GetDoublei_v; + PFNGLGETDOUBLEVPROC GetDoublev; + PFNGLGETERRORPROC GetError; + PFNGLGETFLOATI_VPROC GetFloati_v; + PFNGLGETFLOATVPROC GetFloatv; + PFNGLGETFRAGDATAINDEXPROC GetFragDataIndex; + PFNGLGETFRAGDATALOCATIONPROC GetFragDataLocation; + PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC GetFramebufferAttachmentParameteriv; + PFNGLGETFRAMEBUFFERPARAMETERIVPROC GetFramebufferParameteriv; + PFNGLGETGRAPHICSRESETSTATUSPROC GetGraphicsResetStatus; + PFNGLGETINTEGER64I_VPROC GetInteger64i_v; + PFNGLGETINTEGER64VPROC GetInteger64v; + PFNGLGETINTEGERI_VPROC GetIntegeri_v; + PFNGLGETINTEGERVPROC GetIntegerv; + PFNGLGETINTERNALFORMATI64VPROC GetInternalformati64v; + PFNGLGETINTERNALFORMATIVPROC GetInternalformativ; + PFNGLGETMULTISAMPLEFVPROC GetMultisamplefv; + PFNGLGETNAMEDBUFFERPARAMETERI64VPROC GetNamedBufferParameteri64v; + PFNGLGETNAMEDBUFFERPARAMETERIVPROC GetNamedBufferParameteriv; + PFNGLGETNAMEDBUFFERPOINTERVPROC GetNamedBufferPointerv; + PFNGLGETNAMEDBUFFERSUBDATAPROC GetNamedBufferSubData; + PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC GetNamedFramebufferAttachmentParameteriv; + PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC GetNamedFramebufferParameteriv; + PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC GetNamedRenderbufferParameteriv; + PFNGLGETOBJECTLABELPROC GetObjectLabel; + PFNGLGETOBJECTPTRLABELPROC GetObjectPtrLabel; + PFNGLGETPOINTERVPROC GetPointerv; + PFNGLGETPROGRAMBINARYPROC GetProgramBinary; + PFNGLGETPROGRAMINFOLOGPROC GetProgramInfoLog; + PFNGLGETPROGRAMINTERFACEIVPROC GetProgramInterfaceiv; + PFNGLGETPROGRAMPIPELINEINFOLOGPROC GetProgramPipelineInfoLog; + PFNGLGETPROGRAMPIPELINEIVPROC GetProgramPipelineiv; + PFNGLGETPROGRAMRESOURCEINDEXPROC GetProgramResourceIndex; + PFNGLGETPROGRAMRESOURCELOCATIONPROC GetProgramResourceLocation; + PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC GetProgramResourceLocationIndex; + PFNGLGETPROGRAMRESOURCENAMEPROC GetProgramResourceName; + PFNGLGETPROGRAMRESOURCEIVPROC GetProgramResourceiv; + PFNGLGETPROGRAMSTAGEIVPROC GetProgramStageiv; + PFNGLGETPROGRAMIVPROC GetProgramiv; + PFNGLGETQUERYBUFFEROBJECTI64VPROC GetQueryBufferObjecti64v; + PFNGLGETQUERYBUFFEROBJECTIVPROC GetQueryBufferObjectiv; + PFNGLGETQUERYBUFFEROBJECTUI64VPROC GetQueryBufferObjectui64v; + PFNGLGETQUERYBUFFEROBJECTUIVPROC GetQueryBufferObjectuiv; + PFNGLGETQUERYINDEXEDIVPROC GetQueryIndexediv; + PFNGLGETQUERYOBJECTI64VPROC GetQueryObjecti64v; + PFNGLGETQUERYOBJECTIVPROC GetQueryObjectiv; + PFNGLGETQUERYOBJECTUI64VPROC GetQueryObjectui64v; + PFNGLGETQUERYOBJECTUIVPROC GetQueryObjectuiv; + PFNGLGETQUERYIVPROC GetQueryiv; + PFNGLGETRENDERBUFFERPARAMETERIVPROC GetRenderbufferParameteriv; + PFNGLGETSAMPLERPARAMETERIIVPROC GetSamplerParameterIiv; + PFNGLGETSAMPLERPARAMETERIUIVPROC GetSamplerParameterIuiv; + PFNGLGETSAMPLERPARAMETERFVPROC GetSamplerParameterfv; + PFNGLGETSAMPLERPARAMETERIVPROC GetSamplerParameteriv; + PFNGLGETSHADERINFOLOGPROC GetShaderInfoLog; + PFNGLGETSHADERPRECISIONFORMATPROC GetShaderPrecisionFormat; + PFNGLGETSHADERSOURCEPROC GetShaderSource; + PFNGLGETSHADERIVPROC GetShaderiv; + PFNGLGETSTRINGPROC GetString; + PFNGLGETSTRINGIPROC GetStringi; + PFNGLGETSUBROUTINEINDEXPROC GetSubroutineIndex; + PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC GetSubroutineUniformLocation; + PFNGLGETSYNCIVPROC GetSynciv; + PFNGLGETTEXIMAGEPROC GetTexImage; + PFNGLGETTEXLEVELPARAMETERFVPROC GetTexLevelParameterfv; + PFNGLGETTEXLEVELPARAMETERIVPROC GetTexLevelParameteriv; + PFNGLGETTEXPARAMETERIIVPROC GetTexParameterIiv; + PFNGLGETTEXPARAMETERIUIVPROC GetTexParameterIuiv; + PFNGLGETTEXPARAMETERFVPROC GetTexParameterfv; + PFNGLGETTEXPARAMETERIVPROC GetTexParameteriv; + PFNGLGETTEXTUREIMAGEPROC GetTextureImage; + PFNGLGETTEXTURELEVELPARAMETERFVPROC GetTextureLevelParameterfv; + PFNGLGETTEXTURELEVELPARAMETERIVPROC GetTextureLevelParameteriv; + PFNGLGETTEXTUREPARAMETERIIVPROC GetTextureParameterIiv; + PFNGLGETTEXTUREPARAMETERIUIVPROC GetTextureParameterIuiv; + PFNGLGETTEXTUREPARAMETERFVPROC GetTextureParameterfv; + PFNGLGETTEXTUREPARAMETERIVPROC GetTextureParameteriv; + PFNGLGETTEXTURESUBIMAGEPROC GetTextureSubImage; + PFNGLGETTRANSFORMFEEDBACKVARYINGPROC GetTransformFeedbackVarying; + PFNGLGETTRANSFORMFEEDBACKI64_VPROC GetTransformFeedbacki64_v; + PFNGLGETTRANSFORMFEEDBACKI_VPROC GetTransformFeedbacki_v; + PFNGLGETTRANSFORMFEEDBACKIVPROC GetTransformFeedbackiv; + PFNGLGETUNIFORMBLOCKINDEXPROC GetUniformBlockIndex; + PFNGLGETUNIFORMINDICESPROC GetUniformIndices; + PFNGLGETUNIFORMLOCATIONPROC GetUniformLocation; + PFNGLGETUNIFORMSUBROUTINEUIVPROC GetUniformSubroutineuiv; + PFNGLGETUNIFORMDVPROC GetUniformdv; + PFNGLGETUNIFORMFVPROC GetUniformfv; + PFNGLGETUNIFORMIVPROC GetUniformiv; + PFNGLGETUNIFORMUIVPROC GetUniformuiv; + PFNGLGETVERTEXARRAYINDEXED64IVPROC GetVertexArrayIndexed64iv; + PFNGLGETVERTEXARRAYINDEXEDIVPROC GetVertexArrayIndexediv; + PFNGLGETVERTEXARRAYIVPROC GetVertexArrayiv; + PFNGLGETVERTEXATTRIBIIVPROC GetVertexAttribIiv; + PFNGLGETVERTEXATTRIBIUIVPROC GetVertexAttribIuiv; + PFNGLGETVERTEXATTRIBLDVPROC GetVertexAttribLdv; + PFNGLGETVERTEXATTRIBPOINTERVPROC GetVertexAttribPointerv; + PFNGLGETVERTEXATTRIBDVPROC GetVertexAttribdv; + PFNGLGETVERTEXATTRIBFVPROC GetVertexAttribfv; + PFNGLGETVERTEXATTRIBIVPROC GetVertexAttribiv; + PFNGLGETNCOMPRESSEDTEXIMAGEPROC GetnCompressedTexImage; + PFNGLGETNTEXIMAGEPROC GetnTexImage; + PFNGLGETNUNIFORMDVPROC GetnUniformdv; + PFNGLGETNUNIFORMFVPROC GetnUniformfv; + PFNGLGETNUNIFORMIVPROC GetnUniformiv; + PFNGLGETNUNIFORMUIVPROC GetnUniformuiv; + PFNGLHINTPROC Hint; + PFNGLINVALIDATEBUFFERDATAPROC InvalidateBufferData; + PFNGLINVALIDATEBUFFERSUBDATAPROC InvalidateBufferSubData; + PFNGLINVALIDATEFRAMEBUFFERPROC InvalidateFramebuffer; + PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC InvalidateNamedFramebufferData; + PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC InvalidateNamedFramebufferSubData; + PFNGLINVALIDATESUBFRAMEBUFFERPROC InvalidateSubFramebuffer; + PFNGLINVALIDATETEXIMAGEPROC InvalidateTexImage; + PFNGLINVALIDATETEXSUBIMAGEPROC InvalidateTexSubImage; + PFNGLISBUFFERPROC IsBuffer; + PFNGLISENABLEDPROC IsEnabled; + PFNGLISENABLEDIPROC IsEnabledi; + PFNGLISFRAMEBUFFERPROC IsFramebuffer; + PFNGLISPROGRAMPROC IsProgram; + PFNGLISPROGRAMPIPELINEPROC IsProgramPipeline; + PFNGLISQUERYPROC IsQuery; + PFNGLISRENDERBUFFERPROC IsRenderbuffer; + PFNGLISSAMPLERPROC IsSampler; + PFNGLISSHADERPROC IsShader; + PFNGLISSYNCPROC IsSync; + PFNGLISTEXTUREPROC IsTexture; + PFNGLISTRANSFORMFEEDBACKPROC IsTransformFeedback; + PFNGLISVERTEXARRAYPROC IsVertexArray; + PFNGLLINEWIDTHPROC LineWidth; + PFNGLLINKPROGRAMPROC LinkProgram; + PFNGLLOGICOPPROC LogicOp; + PFNGLMAPBUFFERPROC MapBuffer; + PFNGLMAPBUFFERRANGEPROC MapBufferRange; + PFNGLMAPNAMEDBUFFERPROC MapNamedBuffer; + PFNGLMAPNAMEDBUFFERRANGEPROC MapNamedBufferRange; + PFNGLMEMORYBARRIERPROC MemoryBarrier; + PFNGLMEMORYBARRIERBYREGIONPROC MemoryBarrierByRegion; + PFNGLMINSAMPLESHADINGPROC MinSampleShading; + PFNGLMULTIDRAWARRAYSPROC MultiDrawArrays; + PFNGLMULTIDRAWARRAYSINDIRECTPROC MultiDrawArraysIndirect; + PFNGLMULTIDRAWARRAYSINDIRECTCOUNTPROC MultiDrawArraysIndirectCount; + PFNGLMULTIDRAWELEMENTSPROC MultiDrawElements; + PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC MultiDrawElementsBaseVertex; + PFNGLMULTIDRAWELEMENTSINDIRECTPROC MultiDrawElementsIndirect; + PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTPROC MultiDrawElementsIndirectCount; + PFNGLNAMEDBUFFERDATAPROC NamedBufferData; + PFNGLNAMEDBUFFERSTORAGEPROC NamedBufferStorage; + PFNGLNAMEDBUFFERSUBDATAPROC NamedBufferSubData; + PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC NamedFramebufferDrawBuffer; + PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC NamedFramebufferDrawBuffers; + PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC NamedFramebufferParameteri; + PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC NamedFramebufferReadBuffer; + PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC NamedFramebufferRenderbuffer; + PFNGLNAMEDFRAMEBUFFERTEXTUREPROC NamedFramebufferTexture; + PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC NamedFramebufferTextureLayer; + PFNGLNAMEDRENDERBUFFERSTORAGEPROC NamedRenderbufferStorage; + PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC NamedRenderbufferStorageMultisample; + PFNGLOBJECTLABELPROC ObjectLabel; + PFNGLOBJECTPTRLABELPROC ObjectPtrLabel; + PFNGLPATCHPARAMETERFVPROC PatchParameterfv; + PFNGLPATCHPARAMETERIPROC PatchParameteri; + PFNGLPAUSETRANSFORMFEEDBACKPROC PauseTransformFeedback; + PFNGLPIXELSTOREFPROC PixelStoref; + PFNGLPIXELSTOREIPROC PixelStorei; + PFNGLPOINTPARAMETERFPROC PointParameterf; + PFNGLPOINTPARAMETERFVPROC PointParameterfv; + PFNGLPOINTPARAMETERIPROC PointParameteri; + PFNGLPOINTPARAMETERIVPROC PointParameteriv; + PFNGLPOINTSIZEPROC PointSize; + PFNGLPOLYGONMODEPROC PolygonMode; + PFNGLPOLYGONOFFSETPROC PolygonOffset; + PFNGLPOLYGONOFFSETCLAMPPROC PolygonOffsetClamp; + PFNGLPOPDEBUGGROUPPROC PopDebugGroup; + PFNGLPRIMITIVERESTARTINDEXPROC PrimitiveRestartIndex; + PFNGLPROGRAMBINARYPROC ProgramBinary; + PFNGLPROGRAMPARAMETERIPROC ProgramParameteri; + PFNGLPROGRAMUNIFORM1DPROC ProgramUniform1d; + PFNGLPROGRAMUNIFORM1DVPROC ProgramUniform1dv; + PFNGLPROGRAMUNIFORM1FPROC ProgramUniform1f; + PFNGLPROGRAMUNIFORM1FVPROC ProgramUniform1fv; + PFNGLPROGRAMUNIFORM1IPROC ProgramUniform1i; + PFNGLPROGRAMUNIFORM1IVPROC ProgramUniform1iv; + PFNGLPROGRAMUNIFORM1UIPROC ProgramUniform1ui; + PFNGLPROGRAMUNIFORM1UIVPROC ProgramUniform1uiv; + PFNGLPROGRAMUNIFORM2DPROC ProgramUniform2d; + PFNGLPROGRAMUNIFORM2DVPROC ProgramUniform2dv; + PFNGLPROGRAMUNIFORM2FPROC ProgramUniform2f; + PFNGLPROGRAMUNIFORM2FVPROC ProgramUniform2fv; + PFNGLPROGRAMUNIFORM2IPROC ProgramUniform2i; + PFNGLPROGRAMUNIFORM2IVPROC ProgramUniform2iv; + PFNGLPROGRAMUNIFORM2UIPROC ProgramUniform2ui; + PFNGLPROGRAMUNIFORM2UIVPROC ProgramUniform2uiv; + PFNGLPROGRAMUNIFORM3DPROC ProgramUniform3d; + PFNGLPROGRAMUNIFORM3DVPROC ProgramUniform3dv; + PFNGLPROGRAMUNIFORM3FPROC ProgramUniform3f; + PFNGLPROGRAMUNIFORM3FVPROC ProgramUniform3fv; + PFNGLPROGRAMUNIFORM3IPROC ProgramUniform3i; + PFNGLPROGRAMUNIFORM3IVPROC ProgramUniform3iv; + PFNGLPROGRAMUNIFORM3UIPROC ProgramUniform3ui; + PFNGLPROGRAMUNIFORM3UIVPROC ProgramUniform3uiv; + PFNGLPROGRAMUNIFORM4DPROC ProgramUniform4d; + PFNGLPROGRAMUNIFORM4DVPROC ProgramUniform4dv; + PFNGLPROGRAMUNIFORM4FPROC ProgramUniform4f; + PFNGLPROGRAMUNIFORM4FVPROC ProgramUniform4fv; + PFNGLPROGRAMUNIFORM4IPROC ProgramUniform4i; + PFNGLPROGRAMUNIFORM4IVPROC ProgramUniform4iv; + PFNGLPROGRAMUNIFORM4UIPROC ProgramUniform4ui; + PFNGLPROGRAMUNIFORM4UIVPROC ProgramUniform4uiv; + PFNGLPROGRAMUNIFORMMATRIX2DVPROC ProgramUniformMatrix2dv; + PFNGLPROGRAMUNIFORMMATRIX2FVPROC ProgramUniformMatrix2fv; + PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC ProgramUniformMatrix2x3dv; + PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC ProgramUniformMatrix2x3fv; + PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC ProgramUniformMatrix2x4dv; + PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC ProgramUniformMatrix2x4fv; + PFNGLPROGRAMUNIFORMMATRIX3DVPROC ProgramUniformMatrix3dv; + PFNGLPROGRAMUNIFORMMATRIX3FVPROC ProgramUniformMatrix3fv; + PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC ProgramUniformMatrix3x2dv; + PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC ProgramUniformMatrix3x2fv; + PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC ProgramUniformMatrix3x4dv; + PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC ProgramUniformMatrix3x4fv; + PFNGLPROGRAMUNIFORMMATRIX4DVPROC ProgramUniformMatrix4dv; + PFNGLPROGRAMUNIFORMMATRIX4FVPROC ProgramUniformMatrix4fv; + PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC ProgramUniformMatrix4x2dv; + PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC ProgramUniformMatrix4x2fv; + PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC ProgramUniformMatrix4x3dv; + PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC ProgramUniformMatrix4x3fv; + PFNGLPROVOKINGVERTEXPROC ProvokingVertex; + PFNGLPUSHDEBUGGROUPPROC PushDebugGroup; + PFNGLQUERYCOUNTERPROC QueryCounter; + PFNGLREADBUFFERPROC ReadBuffer; + PFNGLREADPIXELSPROC ReadPixels; + PFNGLREADNPIXELSPROC ReadnPixels; + PFNGLRELEASESHADERCOMPILERPROC ReleaseShaderCompiler; + PFNGLRENDERBUFFERSTORAGEPROC RenderbufferStorage; + PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC RenderbufferStorageMultisample; + PFNGLRESUMETRANSFORMFEEDBACKPROC ResumeTransformFeedback; + PFNGLSAMPLECOVERAGEPROC SampleCoverage; + PFNGLSAMPLEMASKIPROC SampleMaski; + PFNGLSAMPLERPARAMETERIIVPROC SamplerParameterIiv; + PFNGLSAMPLERPARAMETERIUIVPROC SamplerParameterIuiv; + PFNGLSAMPLERPARAMETERFPROC SamplerParameterf; + PFNGLSAMPLERPARAMETERFVPROC SamplerParameterfv; + PFNGLSAMPLERPARAMETERIPROC SamplerParameteri; + PFNGLSAMPLERPARAMETERIVPROC SamplerParameteriv; + PFNGLSCISSORPROC Scissor; + PFNGLSCISSORARRAYVPROC ScissorArrayv; + PFNGLSCISSORINDEXEDPROC ScissorIndexed; + PFNGLSCISSORINDEXEDVPROC ScissorIndexedv; + PFNGLSHADERBINARYPROC ShaderBinary; + PFNGLSHADERSOURCEPROC ShaderSource; + PFNGLSHADERSTORAGEBLOCKBINDINGPROC ShaderStorageBlockBinding; + PFNGLSPECIALIZESHADERPROC SpecializeShader; + PFNGLSTENCILFUNCPROC StencilFunc; + PFNGLSTENCILFUNCSEPARATEPROC StencilFuncSeparate; + PFNGLSTENCILMASKPROC StencilMask; + PFNGLSTENCILMASKSEPARATEPROC StencilMaskSeparate; + PFNGLSTENCILOPPROC StencilOp; + PFNGLSTENCILOPSEPARATEPROC StencilOpSeparate; + PFNGLTEXBUFFERPROC TexBuffer; + PFNGLTEXBUFFERRANGEPROC TexBufferRange; + PFNGLTEXIMAGE1DPROC TexImage1D; + PFNGLTEXIMAGE2DPROC TexImage2D; + PFNGLTEXIMAGE2DMULTISAMPLEPROC TexImage2DMultisample; + PFNGLTEXIMAGE3DPROC TexImage3D; + PFNGLTEXIMAGE3DMULTISAMPLEPROC TexImage3DMultisample; + PFNGLTEXPARAMETERIIVPROC TexParameterIiv; + PFNGLTEXPARAMETERIUIVPROC TexParameterIuiv; + PFNGLTEXPARAMETERFPROC TexParameterf; + PFNGLTEXPARAMETERFVPROC TexParameterfv; + PFNGLTEXPARAMETERIPROC TexParameteri; + PFNGLTEXPARAMETERIVPROC TexParameteriv; + PFNGLTEXSTORAGE1DPROC TexStorage1D; + PFNGLTEXSTORAGE2DPROC TexStorage2D; + PFNGLTEXSTORAGE2DMULTISAMPLEPROC TexStorage2DMultisample; + PFNGLTEXSTORAGE3DPROC TexStorage3D; + PFNGLTEXSTORAGE3DMULTISAMPLEPROC TexStorage3DMultisample; + PFNGLTEXSUBIMAGE1DPROC TexSubImage1D; + PFNGLTEXSUBIMAGE2DPROC TexSubImage2D; + PFNGLTEXSUBIMAGE3DPROC TexSubImage3D; + PFNGLTEXTUREBARRIERPROC TextureBarrier; + PFNGLTEXTUREBUFFERPROC TextureBuffer; + PFNGLTEXTUREBUFFERRANGEPROC TextureBufferRange; + PFNGLTEXTUREPARAMETERIIVPROC TextureParameterIiv; + PFNGLTEXTUREPARAMETERIUIVPROC TextureParameterIuiv; + PFNGLTEXTUREPARAMETERFPROC TextureParameterf; + PFNGLTEXTUREPARAMETERFVPROC TextureParameterfv; + PFNGLTEXTUREPARAMETERIPROC TextureParameteri; + PFNGLTEXTUREPARAMETERIVPROC TextureParameteriv; + PFNGLTEXTURESTORAGE1DPROC TextureStorage1D; + PFNGLTEXTURESTORAGE2DPROC TextureStorage2D; + PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC TextureStorage2DMultisample; + PFNGLTEXTURESTORAGE3DPROC TextureStorage3D; + PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC TextureStorage3DMultisample; + PFNGLTEXTURESUBIMAGE1DPROC TextureSubImage1D; + PFNGLTEXTURESUBIMAGE2DPROC TextureSubImage2D; + PFNGLTEXTURESUBIMAGE3DPROC TextureSubImage3D; + PFNGLTEXTUREVIEWPROC TextureView; + PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC TransformFeedbackBufferBase; + PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC TransformFeedbackBufferRange; + PFNGLTRANSFORMFEEDBACKVARYINGSPROC TransformFeedbackVaryings; + PFNGLUNIFORM1DPROC Uniform1d; + PFNGLUNIFORM1DVPROC Uniform1dv; + PFNGLUNIFORM1FPROC Uniform1f; + PFNGLUNIFORM1FVPROC Uniform1fv; + PFNGLUNIFORM1IPROC Uniform1i; + PFNGLUNIFORM1IVPROC Uniform1iv; + PFNGLUNIFORM1UIPROC Uniform1ui; + PFNGLUNIFORM1UIVPROC Uniform1uiv; + PFNGLUNIFORM2DPROC Uniform2d; + PFNGLUNIFORM2DVPROC Uniform2dv; + PFNGLUNIFORM2FPROC Uniform2f; + PFNGLUNIFORM2FVPROC Uniform2fv; + PFNGLUNIFORM2IPROC Uniform2i; + PFNGLUNIFORM2IVPROC Uniform2iv; + PFNGLUNIFORM2UIPROC Uniform2ui; + PFNGLUNIFORM2UIVPROC Uniform2uiv; + PFNGLUNIFORM3DPROC Uniform3d; + PFNGLUNIFORM3DVPROC Uniform3dv; + PFNGLUNIFORM3FPROC Uniform3f; + PFNGLUNIFORM3FVPROC Uniform3fv; + PFNGLUNIFORM3IPROC Uniform3i; + PFNGLUNIFORM3IVPROC Uniform3iv; + PFNGLUNIFORM3UIPROC Uniform3ui; + PFNGLUNIFORM3UIVPROC Uniform3uiv; + PFNGLUNIFORM4DPROC Uniform4d; + PFNGLUNIFORM4DVPROC Uniform4dv; + PFNGLUNIFORM4FPROC Uniform4f; + PFNGLUNIFORM4FVPROC Uniform4fv; + PFNGLUNIFORM4IPROC Uniform4i; + PFNGLUNIFORM4IVPROC Uniform4iv; + PFNGLUNIFORM4UIPROC Uniform4ui; + PFNGLUNIFORM4UIVPROC Uniform4uiv; + PFNGLUNIFORMBLOCKBINDINGPROC UniformBlockBinding; + PFNGLUNIFORMMATRIX2DVPROC UniformMatrix2dv; + PFNGLUNIFORMMATRIX2FVPROC UniformMatrix2fv; + PFNGLUNIFORMMATRIX2X3DVPROC UniformMatrix2x3dv; + PFNGLUNIFORMMATRIX2X3FVPROC UniformMatrix2x3fv; + PFNGLUNIFORMMATRIX2X4DVPROC UniformMatrix2x4dv; + PFNGLUNIFORMMATRIX2X4FVPROC UniformMatrix2x4fv; + PFNGLUNIFORMMATRIX3DVPROC UniformMatrix3dv; + PFNGLUNIFORMMATRIX3FVPROC UniformMatrix3fv; + PFNGLUNIFORMMATRIX3X2DVPROC UniformMatrix3x2dv; + PFNGLUNIFORMMATRIX3X2FVPROC UniformMatrix3x2fv; + PFNGLUNIFORMMATRIX3X4DVPROC UniformMatrix3x4dv; + PFNGLUNIFORMMATRIX3X4FVPROC UniformMatrix3x4fv; + PFNGLUNIFORMMATRIX4DVPROC UniformMatrix4dv; + PFNGLUNIFORMMATRIX4FVPROC UniformMatrix4fv; + PFNGLUNIFORMMATRIX4X2DVPROC UniformMatrix4x2dv; + PFNGLUNIFORMMATRIX4X2FVPROC UniformMatrix4x2fv; + PFNGLUNIFORMMATRIX4X3DVPROC UniformMatrix4x3dv; + PFNGLUNIFORMMATRIX4X3FVPROC UniformMatrix4x3fv; + PFNGLUNIFORMSUBROUTINESUIVPROC UniformSubroutinesuiv; + PFNGLUNMAPBUFFERPROC UnmapBuffer; + PFNGLUNMAPNAMEDBUFFERPROC UnmapNamedBuffer; + PFNGLUSEPROGRAMPROC UseProgram; + PFNGLUSEPROGRAMSTAGESPROC UseProgramStages; + PFNGLVALIDATEPROGRAMPROC ValidateProgram; + PFNGLVALIDATEPROGRAMPIPELINEPROC ValidateProgramPipeline; + PFNGLVERTEXARRAYATTRIBBINDINGPROC VertexArrayAttribBinding; + PFNGLVERTEXARRAYATTRIBFORMATPROC VertexArrayAttribFormat; + PFNGLVERTEXARRAYATTRIBIFORMATPROC VertexArrayAttribIFormat; + PFNGLVERTEXARRAYATTRIBLFORMATPROC VertexArrayAttribLFormat; + PFNGLVERTEXARRAYBINDINGDIVISORPROC VertexArrayBindingDivisor; + PFNGLVERTEXARRAYELEMENTBUFFERPROC VertexArrayElementBuffer; + PFNGLVERTEXARRAYVERTEXBUFFERPROC VertexArrayVertexBuffer; + PFNGLVERTEXARRAYVERTEXBUFFERSPROC VertexArrayVertexBuffers; + PFNGLVERTEXATTRIB1DPROC VertexAttrib1d; + PFNGLVERTEXATTRIB1DVPROC VertexAttrib1dv; + PFNGLVERTEXATTRIB1FPROC VertexAttrib1f; + PFNGLVERTEXATTRIB1FVPROC VertexAttrib1fv; + PFNGLVERTEXATTRIB1SPROC VertexAttrib1s; + PFNGLVERTEXATTRIB1SVPROC VertexAttrib1sv; + PFNGLVERTEXATTRIB2DPROC VertexAttrib2d; + PFNGLVERTEXATTRIB2DVPROC VertexAttrib2dv; + PFNGLVERTEXATTRIB2FPROC VertexAttrib2f; + PFNGLVERTEXATTRIB2FVPROC VertexAttrib2fv; + PFNGLVERTEXATTRIB2SPROC VertexAttrib2s; + PFNGLVERTEXATTRIB2SVPROC VertexAttrib2sv; + PFNGLVERTEXATTRIB3DPROC VertexAttrib3d; + PFNGLVERTEXATTRIB3DVPROC VertexAttrib3dv; + PFNGLVERTEXATTRIB3FPROC VertexAttrib3f; + PFNGLVERTEXATTRIB3FVPROC VertexAttrib3fv; + PFNGLVERTEXATTRIB3SPROC VertexAttrib3s; + PFNGLVERTEXATTRIB3SVPROC VertexAttrib3sv; + PFNGLVERTEXATTRIB4NBVPROC VertexAttrib4Nbv; + PFNGLVERTEXATTRIB4NIVPROC VertexAttrib4Niv; + PFNGLVERTEXATTRIB4NSVPROC VertexAttrib4Nsv; + PFNGLVERTEXATTRIB4NUBPROC VertexAttrib4Nub; + PFNGLVERTEXATTRIB4NUBVPROC VertexAttrib4Nubv; + PFNGLVERTEXATTRIB4NUIVPROC VertexAttrib4Nuiv; + PFNGLVERTEXATTRIB4NUSVPROC VertexAttrib4Nusv; + PFNGLVERTEXATTRIB4BVPROC VertexAttrib4bv; + PFNGLVERTEXATTRIB4DPROC VertexAttrib4d; + PFNGLVERTEXATTRIB4DVPROC VertexAttrib4dv; + PFNGLVERTEXATTRIB4FPROC VertexAttrib4f; + PFNGLVERTEXATTRIB4FVPROC VertexAttrib4fv; + PFNGLVERTEXATTRIB4IVPROC VertexAttrib4iv; + PFNGLVERTEXATTRIB4SPROC VertexAttrib4s; + PFNGLVERTEXATTRIB4SVPROC VertexAttrib4sv; + PFNGLVERTEXATTRIB4UBVPROC VertexAttrib4ubv; + PFNGLVERTEXATTRIB4UIVPROC VertexAttrib4uiv; + PFNGLVERTEXATTRIB4USVPROC VertexAttrib4usv; + PFNGLVERTEXATTRIBBINDINGPROC VertexAttribBinding; + PFNGLVERTEXATTRIBDIVISORPROC VertexAttribDivisor; + PFNGLVERTEXATTRIBFORMATPROC VertexAttribFormat; + PFNGLVERTEXATTRIBI1IPROC VertexAttribI1i; + PFNGLVERTEXATTRIBI1IVPROC VertexAttribI1iv; + PFNGLVERTEXATTRIBI1UIPROC VertexAttribI1ui; + PFNGLVERTEXATTRIBI1UIVPROC VertexAttribI1uiv; + PFNGLVERTEXATTRIBI2IPROC VertexAttribI2i; + PFNGLVERTEXATTRIBI2IVPROC VertexAttribI2iv; + PFNGLVERTEXATTRIBI2UIPROC VertexAttribI2ui; + PFNGLVERTEXATTRIBI2UIVPROC VertexAttribI2uiv; + PFNGLVERTEXATTRIBI3IPROC VertexAttribI3i; + PFNGLVERTEXATTRIBI3IVPROC VertexAttribI3iv; + PFNGLVERTEXATTRIBI3UIPROC VertexAttribI3ui; + PFNGLVERTEXATTRIBI3UIVPROC VertexAttribI3uiv; + PFNGLVERTEXATTRIBI4BVPROC VertexAttribI4bv; + PFNGLVERTEXATTRIBI4IPROC VertexAttribI4i; + PFNGLVERTEXATTRIBI4IVPROC VertexAttribI4iv; + PFNGLVERTEXATTRIBI4SVPROC VertexAttribI4sv; + PFNGLVERTEXATTRIBI4UBVPROC VertexAttribI4ubv; + PFNGLVERTEXATTRIBI4UIPROC VertexAttribI4ui; + PFNGLVERTEXATTRIBI4UIVPROC VertexAttribI4uiv; + PFNGLVERTEXATTRIBI4USVPROC VertexAttribI4usv; + PFNGLVERTEXATTRIBIFORMATPROC VertexAttribIFormat; + PFNGLVERTEXATTRIBIPOINTERPROC VertexAttribIPointer; + PFNGLVERTEXATTRIBL1DPROC VertexAttribL1d; + PFNGLVERTEXATTRIBL1DVPROC VertexAttribL1dv; + PFNGLVERTEXATTRIBL2DPROC VertexAttribL2d; + PFNGLVERTEXATTRIBL2DVPROC VertexAttribL2dv; + PFNGLVERTEXATTRIBL3DPROC VertexAttribL3d; + PFNGLVERTEXATTRIBL3DVPROC VertexAttribL3dv; + PFNGLVERTEXATTRIBL4DPROC VertexAttribL4d; + PFNGLVERTEXATTRIBL4DVPROC VertexAttribL4dv; + PFNGLVERTEXATTRIBLFORMATPROC VertexAttribLFormat; + PFNGLVERTEXATTRIBLPOINTERPROC VertexAttribLPointer; + PFNGLVERTEXATTRIBP1UIPROC VertexAttribP1ui; + PFNGLVERTEXATTRIBP1UIVPROC VertexAttribP1uiv; + PFNGLVERTEXATTRIBP2UIPROC VertexAttribP2ui; + PFNGLVERTEXATTRIBP2UIVPROC VertexAttribP2uiv; + PFNGLVERTEXATTRIBP3UIPROC VertexAttribP3ui; + PFNGLVERTEXATTRIBP3UIVPROC VertexAttribP3uiv; + PFNGLVERTEXATTRIBP4UIPROC VertexAttribP4ui; + PFNGLVERTEXATTRIBP4UIVPROC VertexAttribP4uiv; + PFNGLVERTEXATTRIBPOINTERPROC VertexAttribPointer; + PFNGLVERTEXBINDINGDIVISORPROC VertexBindingDivisor; + PFNGLVIEWPORTPROC Viewport; + PFNGLVIEWPORTARRAYVPROC ViewportArrayv; + PFNGLVIEWPORTINDEXEDFPROC ViewportIndexedf; + PFNGLVIEWPORTINDEXEDFVPROC ViewportIndexedfv; PFNGLWAITSYNCPROC WaitSync; \ No newline at end of file diff --git a/StgSharp.Tools/cs.txt b/StgSharp.Tools/cs.txt index bb8051a0..91408e8c 100644 --- a/StgSharp.Tools/cs.txt +++ b/StgSharp.Tools/cs.txt @@ -1,657 +1,657 @@ - internal unsafe delegate* glActiveShaderProgram; - internal unsafe delegate* glActiveTexture; - internal unsafe delegate* glAttachShader; - internal unsafe delegate* glBeginConditionalRender; - internal unsafe delegate* glBeginQuery; - internal unsafe delegate* glBeginQueryIndexed; - internal unsafe delegate* glBeginTransformFeedback; - internal unsafe delegate* glBindAttribLocation; - internal unsafe delegate* glBindBuffer; - internal unsafe delegate* glBindBufferBase; - internal unsafe delegate* glBindBufferRange; - internal unsafe delegate* glBindBuffersBase; - internal unsafe delegate* glBindBuffersRange; - internal unsafe delegate* glBindFragDataLocation; - internal unsafe delegate* glBindFragDataLocationIndexed; - internal unsafe delegate* glBindFramebuffer; - internal unsafe delegate* glBindImageTexture; - internal unsafe delegate* glBindImageTextures; - internal unsafe delegate* glBindProgramPipeline; - internal unsafe delegate* glBindRenderbuffer; - internal unsafe delegate* glBindSampler; - internal unsafe delegate* glBindSamplers; - internal unsafe delegate* glBindTexture; - internal unsafe delegate* glBindTextureUnit; - internal unsafe delegate* glBindTextures; - internal unsafe delegate* glBindTransformFeedback; - internal unsafe delegate* glBindVertexArray; - internal unsafe delegate* glBindVertexBuffer; - internal unsafe delegate* glBindVertexBuffers; - internal unsafe delegate* glBlendColor; - internal unsafe delegate* glBlendEquation; - internal unsafe delegate* glBlendEquationSeparate; - internal unsafe delegate* glBlendEquationSeparatei; - internal unsafe delegate* glBlendEquationi; - internal unsafe delegate* glBlendFunc; - internal unsafe delegate* glBlendFuncSeparate; - internal unsafe delegate* glBlendFuncSeparatei; - internal unsafe delegate* glBlendFunci; - internal unsafe delegate* glBlitFramebuffer; - internal unsafe delegate* glBlitNamedFramebuffer; - internal unsafe delegate* glBufferData; - internal unsafe delegate* glBufferStorage; - internal unsafe delegate* glBufferSubData; - internal unsafe delegate* glCheckFramebufferStatus; - internal unsafe delegate* glCheckNamedFramebufferStatus; - internal unsafe delegate* glClampColor; - internal unsafe delegate* glClear; - internal unsafe delegate* glClearBufferData; - internal unsafe delegate* glClearBufferSubData; - internal unsafe delegate* glClearBufferfi; - internal unsafe delegate* glClearBufferfv; - internal unsafe delegate* glClearBufferiv; - internal unsafe delegate* glClearBufferuiv; - internal unsafe delegate* glClearColor; - internal unsafe delegate* glClearDepth; - internal unsafe delegate* glClearDepthf; - internal unsafe delegate* glClearNamedBufferData; - internal unsafe delegate* glClearNamedBufferSubData; - internal unsafe delegate* glClearNamedFramebufferfi; - internal unsafe delegate* glClearNamedFramebufferfv; - internal unsafe delegate* glClearNamedFramebufferiv; - internal unsafe delegate* glClearNamedFramebufferuiv; - internal unsafe delegate* glClearStencil; - internal unsafe delegate* glClearTexImage; - internal unsafe delegate* glClearTexSubImage; - internal unsafe delegate* glClientWaitSync; - internal unsafe delegate* glClipControl; - internal unsafe delegate* glColorMask; - internal unsafe delegate* glColorMaski; - internal unsafe delegate* glCompileShader; - internal unsafe delegate* glCompressedTexImage1D; - internal unsafe delegate* glCompressedTexImage2D; - internal unsafe delegate* glCompressedTexImage3D; - internal unsafe delegate* glCompressedTexSubImage1D; - internal unsafe delegate* glCompressedTexSubImage2D; - internal unsafe delegate* glCompressedTexSubImage3D; - internal unsafe delegate* glCompressedTextureSubImage1D; - internal unsafe delegate* glCompressedTextureSubImage2D; - internal unsafe delegate* glCompressedTextureSubImage3D; - internal unsafe delegate* glCopyBufferSubData; - internal unsafe delegate* glCopyImageSubData; - internal unsafe delegate* glCopyNamedBufferSubData; - internal unsafe delegate* glCopyTexImage1D; - internal unsafe delegate* glCopyTexImage2D; - internal unsafe delegate* glCopyTexSubImage1D; - internal unsafe delegate* glCopyTexSubImage2D; - internal unsafe delegate* glCopyTexSubImage3D; - internal unsafe delegate* glCopyTextureSubImage1D; - internal unsafe delegate* glCopyTextureSubImage2D; - internal unsafe delegate* glCopyTextureSubImage3D; - internal unsafe delegate* glCreateBuffers; - internal unsafe delegate* glCreateFramebuffers; - internal unsafe delegate* glCreateProgram; - internal unsafe delegate* glCreateProgramPipelines; - internal unsafe delegate* glCreateQueries; - internal unsafe delegate* glCreateRenderbuffers; - internal unsafe delegate* glCreateSamplers; - internal unsafe delegate* glCreateShader; - internal unsafe delegate* glCreateShaderProgramv; - internal unsafe delegate* glCreateTextures; - internal unsafe delegate* glCreateTransformFeedbacks; - internal unsafe delegate* glCreateVertexArrays; - internal unsafe delegate* glCullFace; - internal unsafe delegate* glDebugMessageCallback; - internal unsafe delegate* glDebugMessageControl; - internal unsafe delegate* glDebugMessageInsert; - internal unsafe delegate* glDeleteBuffers; - internal unsafe delegate* glDeleteFramebuffers; - internal unsafe delegate* glDeleteProgram; - internal unsafe delegate* glDeleteProgramPipelines; - internal unsafe delegate* glDeleteQueries; - internal unsafe delegate* glDeleteRenderbuffers; - internal unsafe delegate* glDeleteSamplers; - internal unsafe delegate* glDeleteShader; - internal unsafe delegate* glDeleteSync; - internal unsafe delegate* glDeleteTextures; - internal unsafe delegate* glDeleteTransformFeedbacks; - internal unsafe delegate* glDeleteVertexArrays; - internal unsafe delegate* glDepthFunc; - internal unsafe delegate* glDepthMask; - internal unsafe delegate* glDepthRange; - internal unsafe delegate* glDepthRangeArrayv; - internal unsafe delegate* glDepthRangeIndexed; - internal unsafe delegate* glDepthRangef; - internal unsafe delegate* glDetachShader; - internal unsafe delegate* glDisable; - internal unsafe delegate* glDisableVertexArrayAttrib; - internal unsafe delegate* glDisableVertexAttribArray; - internal unsafe delegate* glDisablei; - internal unsafe delegate* glDispatchCompute; - internal unsafe delegate* glDispatchComputeIndirect; - internal unsafe delegate* glDrawArrays; - internal unsafe delegate* glDrawArraysIndirect; - internal unsafe delegate* glDrawArraysInstanced; - internal unsafe delegate* glDrawArraysInstancedBaseInstance; - internal unsafe delegate* glDrawBuffer; - internal unsafe delegate* glDrawBuffers; - internal unsafe delegate* glDrawElements; - internal unsafe delegate* glDrawElementsBaseVertex; - internal unsafe delegate* glDrawElementsIndirect; - internal unsafe delegate* glDrawElementsInstanced; - internal unsafe delegate* glDrawElementsInstancedBaseInstance; - internal unsafe delegate* glDrawElementsInstancedBaseVertex; - internal unsafe delegate* glDrawElementsInstancedBaseVertexBaseInstance; - internal unsafe delegate* glDrawRangeElements; - internal unsafe delegate* glDrawRangeElementsBaseVertex; - internal unsafe delegate* glDrawTransformFeedback; - internal unsafe delegate* glDrawTransformFeedbackInstanced; - internal unsafe delegate* glDrawTransformFeedbackStream; - internal unsafe delegate* glDrawTransformFeedbackStreamInstanced; - internal unsafe delegate* glEnable; - internal unsafe delegate* glEnableVertexArrayAttrib; - internal unsafe delegate* glEnableVertexAttribArray; - internal unsafe delegate* glEnablei; - internal unsafe delegate* glEndConditionalRender; - internal unsafe delegate* glEndQuery; - internal unsafe delegate* glEndQueryIndexed; - internal unsafe delegate* glEndTransformFeedback; - internal unsafe delegate* glFenceSync; - internal unsafe delegate* glFinish; - internal unsafe delegate* glFlush; - internal unsafe delegate* glFlushMappedBufferRange; - internal unsafe delegate* glFlushMappedNamedBufferRange; - internal unsafe delegate* glFramebufferParameteri; - internal unsafe delegate* glFramebufferRenderbuffer; - internal unsafe delegate* glFramebufferTexture; - internal unsafe delegate* glFramebufferTexture1D; - internal unsafe delegate* glFramebufferTexture2D; - internal unsafe delegate* glFramebufferTexture3D; - internal unsafe delegate* glFramebufferTextureLayer; - internal unsafe delegate* glFrontFace; - internal unsafe delegate* glGenBuffers; - internal unsafe delegate* glGenFramebuffers; - internal unsafe delegate* glGenProgramPipelines; - internal unsafe delegate* glGenQueries; - internal unsafe delegate* glGenRenderbuffers; - internal unsafe delegate* glGenSamplers; - internal unsafe delegate* glGenTextures; - internal unsafe delegate* glGenTransformFeedbacks; - internal unsafe delegate* glGenVertexArrays; - internal unsafe delegate* glGenerateMipmap; - internal unsafe delegate* glGenerateTextureMipmap; - internal unsafe delegate* glGetActiveAtomicCounterBufferiv; - internal unsafe delegate* glGetActiveAttrib; - internal unsafe delegate* glGetActiveSubroutineName; - internal unsafe delegate* glGetActiveSubroutineUniformName; - internal unsafe delegate* glGetActiveSubroutineUniformiv; - internal unsafe delegate* glGetActiveUniform; - internal unsafe delegate* glGetActiveUniformBlockName; - internal unsafe delegate* glGetActiveUniformBlockiv; - internal unsafe delegate* glGetActiveUniformName; - internal unsafe delegate* glGetActiveUniformsiv; - internal unsafe delegate* glGetAttachedShaders; - internal unsafe delegate* glGetAttribLocation; - internal unsafe delegate* glGetBooleani_v; - internal unsafe delegate* glGetBooleanv; - internal unsafe delegate* glGetBufferParameteri64v; - internal unsafe delegate* glGetBufferParameteriv; - internal unsafe delegate* glGetBufferPointerv; - internal unsafe delegate* glGetBufferSubData; - internal unsafe delegate* glGetCompressedTexImage; - internal unsafe delegate* glGetCompressedTextureImage; - internal unsafe delegate* glGetCompressedTextureSubImage; - internal unsafe delegate* glGetDebugMessageLog; - internal unsafe delegate* glGetDoublei_v; - internal unsafe delegate* glGetDoublev; - internal unsafe delegate* glGetError; - internal unsafe delegate* glGetFloati_v; - internal unsafe delegate* glGetFloatv; - internal unsafe delegate* glGetFragDataIndex; - internal unsafe delegate* glGetFragDataLocation; - internal unsafe delegate* glGetFramebufferAttachmentParameteriv; - internal unsafe delegate* glGetFramebufferParameteriv; - internal unsafe delegate* glGetGraphicsResetStatus; - internal unsafe delegate* glGetInteger64i_v; - internal unsafe delegate* glGetInteger64v; - internal unsafe delegate* glGetIntegeri_v; - internal unsafe delegate* glGetIntegerv; - internal unsafe delegate* glGetInternalformati64v; - internal unsafe delegate* glGetInternalformativ; - internal unsafe delegate* glGetMultisamplefv; - internal unsafe delegate* glGetNamedBufferParameteri64v; - internal unsafe delegate* glGetNamedBufferParameteriv; - internal unsafe delegate* glGetNamedBufferPointerv; - internal unsafe delegate* glGetNamedBufferSubData; - internal unsafe delegate* glGetNamedFramebufferAttachmentParameteriv; - internal unsafe delegate* glGetNamedFramebufferParameteriv; - internal unsafe delegate* glGetNamedRenderbufferParameteriv; - internal unsafe delegate* glGetObjectLabel; - internal unsafe delegate* glGetObjectPtrLabel; - internal unsafe delegate* glGetPointerv; - internal unsafe delegate* glGetProgramBinary; - internal unsafe delegate* glGetProgramInfoLog; - internal unsafe delegate* glGetProgramInterfaceiv; - internal unsafe delegate* glGetProgramPipelineInfoLog; - internal unsafe delegate* glGetProgramPipelineiv; - internal unsafe delegate* glGetProgramResourceIndex; - internal unsafe delegate* glGetProgramResourceLocation; - internal unsafe delegate* glGetProgramResourceLocationIndex; - internal unsafe delegate* glGetProgramResourceName; - internal unsafe delegate* glGetProgramResourceiv; - internal unsafe delegate* glGetProgramStageiv; - internal unsafe delegate* glGetProgramiv; - internal unsafe delegate* glGetQueryBufferObjecti64v; - internal unsafe delegate* glGetQueryBufferObjectiv; - internal unsafe delegate* glGetQueryBufferObjectui64v; - internal unsafe delegate* glGetQueryBufferObjectuiv; - internal unsafe delegate* glGetQueryIndexediv; - internal unsafe delegate* glGetQueryObjecti64v; - internal unsafe delegate* glGetQueryObjectiv; - internal unsafe delegate* glGetQueryObjectui64v; - internal unsafe delegate* glGetQueryObjectuiv; - internal unsafe delegate* glGetQueryiv; - internal unsafe delegate* glGetRenderbufferParameteriv; - internal unsafe delegate* glGetSamplerParameterIiv; - internal unsafe delegate* glGetSamplerParameterIuiv; - internal unsafe delegate* glGetSamplerParameterfv; - internal unsafe delegate* glGetSamplerParameteriv; - internal unsafe delegate* glGetShaderInfoLog; - internal unsafe delegate* glGetShaderPrecisionFormat; - internal unsafe delegate* glGetShaderSource; - internal unsafe delegate* glGetShaderiv; - internal unsafe delegate* glGetString; - internal unsafe delegate* glGetStringi; - internal unsafe delegate* glGetSubroutineIndex; - internal unsafe delegate* glGetSubroutineUniformLocation; - internal unsafe delegate* glGetSynciv; - internal unsafe delegate* glGetTexImage; - internal unsafe delegate* glGetTexLevelParameterfv; - internal unsafe delegate* glGetTexLevelParameteriv; - internal unsafe delegate* glGetTexParameterIiv; - internal unsafe delegate* glGetTexParameterIuiv; - internal unsafe delegate* glGetTexParameterfv; - internal unsafe delegate* glGetTexParameteriv; - internal unsafe delegate* glGetTextureImage; - internal unsafe delegate* glGetTextureLevelParameterfv; - internal unsafe delegate* glGetTextureLevelParameteriv; - internal unsafe delegate* glGetTextureParameterIiv; - internal unsafe delegate* glGetTextureParameterIuiv; - internal unsafe delegate* glGetTextureParameterfv; - internal unsafe delegate* glGetTextureParameteriv; - internal unsafe delegate* glGetTextureSubImage; - internal unsafe delegate* glGetTransformFeedbackVarying; - internal unsafe delegate* glGetTransformFeedbacki64_v; - internal unsafe delegate* glGetTransformFeedbacki_v; - internal unsafe delegate* glGetTransformFeedbackiv; - internal unsafe delegate* glGetUniformBlockIndex; - internal unsafe delegate* glGetUniformIndices; - internal unsafe delegate* glGetUniformLocation; - internal unsafe delegate* glGetUniformSubroutineuiv; - internal unsafe delegate* glGetUniformdv; - internal unsafe delegate* glGetUniformfv; - internal unsafe delegate* glGetUniformiv; - internal unsafe delegate* glGetUniformuiv; - internal unsafe delegate* glGetVertexArrayIndexed64iv; - internal unsafe delegate* glGetVertexArrayIndexediv; - internal unsafe delegate* glGetVertexArrayiv; - internal unsafe delegate* glGetVertexAttribIiv; - internal unsafe delegate* glGetVertexAttribIuiv; - internal unsafe delegate* glGetVertexAttribLdv; - internal unsafe delegate* glGetVertexAttribPointerv; - internal unsafe delegate* glGetVertexAttribdv; - internal unsafe delegate* glGetVertexAttribfv; - internal unsafe delegate* glGetVertexAttribiv; - internal unsafe delegate* glGetnCompressedTexImage; - internal unsafe delegate* glGetnTexImage; - internal unsafe delegate* glGetnUniformdv; - internal unsafe delegate* glGetnUniformfv; - internal unsafe delegate* glGetnUniformiv; - internal unsafe delegate* glGetnUniformuiv; - internal unsafe delegate* glHint; - internal unsafe delegate* glInvalidateBufferData; - internal unsafe delegate* glInvalidateBufferSubData; - internal unsafe delegate* glInvalidateFramebuffer; - internal unsafe delegate* glInvalidateNamedFramebufferData; - internal unsafe delegate* glInvalidateNamedFramebufferSubData; - internal unsafe delegate* glInvalidateSubFramebuffer; - internal unsafe delegate* glInvalidateTexImage; - internal unsafe delegate* glInvalidateTexSubImage; - internal unsafe delegate* glIsBuffer; - internal unsafe delegate* glIsEnabled; - internal unsafe delegate* glIsEnabledi; - internal unsafe delegate* glIsFramebuffer; - internal unsafe delegate* glIsProgram; - internal unsafe delegate* glIsProgramPipeline; - internal unsafe delegate* glIsQuery; - internal unsafe delegate* glIsRenderbuffer; - internal unsafe delegate* glIsSampler; - internal unsafe delegate* glIsShader; - internal unsafe delegate* glIsSync; - internal unsafe delegate* glIsTexture; - internal unsafe delegate* glIsTransformFeedback; - internal unsafe delegate* glIsVertexArray; - internal unsafe delegate* glLineWidth; - internal unsafe delegate* glLinkProgram; - internal unsafe delegate* glLogicOp; - internal unsafe delegate* glMapBuffer; - internal unsafe delegate* glMapBufferRange; - internal unsafe delegate* glMapNamedBuffer; - internal unsafe delegate* glMapNamedBufferRange; - internal unsafe delegate* glMemoryBarrier; - internal unsafe delegate* glMemoryBarrierByRegion; - internal unsafe delegate* glMinSampleShading; - internal unsafe delegate* glMultiDrawArrays; - internal unsafe delegate* glMultiDrawArraysIndirect; - internal unsafe delegate* glMultiDrawArraysIndirectCount; - internal unsafe delegate* glMultiDrawElements; - internal unsafe delegate* glMultiDrawElementsBaseVertex; - internal unsafe delegate* glMultiDrawElementsIndirect; - internal unsafe delegate* glMultiDrawElementsIndirectCount; - internal unsafe delegate* glNamedBufferData; - internal unsafe delegate* glNamedBufferStorage; - internal unsafe delegate* glNamedBufferSubData; - internal unsafe delegate* glNamedFramebufferDrawBuffer; - internal unsafe delegate* glNamedFramebufferDrawBuffers; - internal unsafe delegate* glNamedFramebufferParameteri; - internal unsafe delegate* glNamedFramebufferReadBuffer; - internal unsafe delegate* glNamedFramebufferRenderbuffer; - internal unsafe delegate* glNamedFramebufferTexture; - internal unsafe delegate* glNamedFramebufferTextureLayer; - internal unsafe delegate* glNamedRenderbufferStorage; - internal unsafe delegate* glNamedRenderbufferStorageMultisample; - internal unsafe delegate* glObjectLabel; - internal unsafe delegate* glObjectPtrLabel; - internal unsafe delegate* glPatchParameterfv; - internal unsafe delegate* glPatchParameteri; - internal unsafe delegate* glPauseTransformFeedback; - internal unsafe delegate* glPixelStoref; - internal unsafe delegate* glPixelStorei; - internal unsafe delegate* glPointParameterf; - internal unsafe delegate* glPointParameterfv; - internal unsafe delegate* glPointParameteri; - internal unsafe delegate* glPointParameteriv; - internal unsafe delegate* glPointSize; - internal unsafe delegate* glPolygonMode; - internal unsafe delegate* glPolygonOffset; - internal unsafe delegate* glPolygonOffsetClamp; - internal unsafe delegate* glPopDebugGroup; - internal unsafe delegate* glPrimitiveRestartIndex; - internal unsafe delegate* glProgramBinary; - internal unsafe delegate* glProgramParameteri; - internal unsafe delegate* glProgramUniform1d; - internal unsafe delegate* glProgramUniform1dv; - internal unsafe delegate* glProgramUniform1f; - internal unsafe delegate* glProgramUniform1fv; - internal unsafe delegate* glProgramUniform1i; - internal unsafe delegate* glProgramUniform1iv; - internal unsafe delegate* glProgramUniform1ui; - internal unsafe delegate* glProgramUniform1uiv; - internal unsafe delegate* glProgramUniform2d; - internal unsafe delegate* glProgramUniform2dv; - internal unsafe delegate* glProgramUniform2f; - internal unsafe delegate* glProgramUniform2fv; - internal unsafe delegate* glProgramUniform2i; - internal unsafe delegate* glProgramUniform2iv; - internal unsafe delegate* glProgramUniform2ui; - internal unsafe delegate* glProgramUniform2uiv; - internal unsafe delegate* glProgramUniform3d; - internal unsafe delegate* glProgramUniform3dv; - internal unsafe delegate* glProgramUniform3f; - internal unsafe delegate* glProgramUniform3fv; - internal unsafe delegate* glProgramUniform3i; - internal unsafe delegate* glProgramUniform3iv; - internal unsafe delegate* glProgramUniform3ui; - internal unsafe delegate* glProgramUniform3uiv; - internal unsafe delegate* glProgramUniform4d; - internal unsafe delegate* glProgramUniform4dv; - internal unsafe delegate* glProgramUniform4f; - internal unsafe delegate* glProgramUniform4fv; - internal unsafe delegate* glProgramUniform4i; - internal unsafe delegate* glProgramUniform4iv; - internal unsafe delegate* glProgramUniform4ui; - internal unsafe delegate* glProgramUniform4uiv; - internal unsafe delegate* glProgramUniformMatrix2dv; - internal unsafe delegate* glProgramUniformMatrix2fv; - internal unsafe delegate* glProgramUniformMatrix2x3dv; - internal unsafe delegate* glProgramUniformMatrix2x3fv; - internal unsafe delegate* glProgramUniformMatrix2x4dv; - internal unsafe delegate* glProgramUniformMatrix2x4fv; - internal unsafe delegate* glProgramUniformMatrix3dv; - internal unsafe delegate* glProgramUniformMatrix3fv; - internal unsafe delegate* glProgramUniformMatrix3x2dv; - internal unsafe delegate* glProgramUniformMatrix3x2fv; - internal unsafe delegate* glProgramUniformMatrix3x4dv; - internal unsafe delegate* glProgramUniformMatrix3x4fv; - internal unsafe delegate* glProgramUniformMatrix4dv; - internal unsafe delegate* glProgramUniformMatrix4fv; - internal unsafe delegate* glProgramUniformMatrix4x2dv; - internal unsafe delegate* glProgramUniformMatrix4x2fv; - internal unsafe delegate* glProgramUniformMatrix4x3dv; - internal unsafe delegate* glProgramUniformMatrix4x3fv; - internal unsafe delegate* glProvokingVertex; - internal unsafe delegate* glPushDebugGroup; - internal unsafe delegate* glQueryCounter; - internal unsafe delegate* glReadBuffer; - internal unsafe delegate* glReadPixels; - internal unsafe delegate* glReadnPixels; - internal unsafe delegate* glReleaseShaderCompiler; - internal unsafe delegate* glRenderbufferStorage; - internal unsafe delegate* glRenderbufferStorageMultisample; - internal unsafe delegate* glResumeTransformFeedback; - internal unsafe delegate* glSampleCoverage; - internal unsafe delegate* glSampleMaski; - internal unsafe delegate* glSamplerParameterIiv; - internal unsafe delegate* glSamplerParameterIuiv; - internal unsafe delegate* glSamplerParameterf; - internal unsafe delegate* glSamplerParameterfv; - internal unsafe delegate* glSamplerParameteri; - internal unsafe delegate* glSamplerParameteriv; - internal unsafe delegate* glScissor; - internal unsafe delegate* glScissorArrayv; - internal unsafe delegate* glScissorIndexed; - internal unsafe delegate* glScissorIndexedv; - internal unsafe delegate* glShaderBinary; - internal unsafe delegate* glShaderSource; - internal unsafe delegate* glShaderStorageBlockBinding; - internal unsafe delegate* glSpecializeShader; - internal unsafe delegate* glStencilFunc; - internal unsafe delegate* glStencilFuncSeparate; - internal unsafe delegate* glStencilMask; - internal unsafe delegate* glStencilMaskSeparate; - internal unsafe delegate* glStencilOp; - internal unsafe delegate* glStencilOpSeparate; - internal unsafe delegate* glTexBuffer; - internal unsafe delegate* glTexBufferRange; - internal unsafe delegate* glTexImage1D; - internal unsafe delegate* glTexImage2D; - internal unsafe delegate* glTexImage2DMultisample; - internal unsafe delegate* glTexImage3D; - internal unsafe delegate* glTexImage3DMultisample; - internal unsafe delegate* glTexParameterIiv; - internal unsafe delegate* glTexParameterIuiv; - internal unsafe delegate* glTexParameterf; - internal unsafe delegate* glTexParameterfv; - internal unsafe delegate* glTexParameteri; - internal unsafe delegate* glTexParameteriv; - internal unsafe delegate* glTexStorage1D; - internal unsafe delegate* glTexStorage2D; - internal unsafe delegate* glTexStorage2DMultisample; - internal unsafe delegate* glTexStorage3D; - internal unsafe delegate* glTexStorage3DMultisample; - internal unsafe delegate* glTexSubImage1D; - internal unsafe delegate* glTexSubImage2D; - internal unsafe delegate* glTexSubImage3D; - internal unsafe delegate* glTextureBarrier; - internal unsafe delegate* glTextureBuffer; - internal unsafe delegate* glTextureBufferRange; - internal unsafe delegate* glTextureParameterIiv; - internal unsafe delegate* glTextureParameterIuiv; - internal unsafe delegate* glTextureParameterf; - internal unsafe delegate* glTextureParameterfv; - internal unsafe delegate* glTextureParameteri; - internal unsafe delegate* glTextureParameteriv; - internal unsafe delegate* glTextureStorage1D; - internal unsafe delegate* glTextureStorage2D; - internal unsafe delegate* glTextureStorage2DMultisample; - internal unsafe delegate* glTextureStorage3D; - internal unsafe delegate* glTextureStorage3DMultisample; - internal unsafe delegate* glTextureSubImage1D; - internal unsafe delegate* glTextureSubImage2D; - internal unsafe delegate* glTextureSubImage3D; - internal unsafe delegate* glTextureView; - internal unsafe delegate* glTransformFeedbackBufferBase; - internal unsafe delegate* glTransformFeedbackBufferRange; - internal unsafe delegate* glTransformFeedbackVaryings; - internal unsafe delegate* glUniform1d; - internal unsafe delegate* glUniform1dv; - internal unsafe delegate* glUniform1f; - internal unsafe delegate* glUniform1fv; - internal unsafe delegate* glUniform1i; - internal unsafe delegate* glUniform1iv; - internal unsafe delegate* glUniform1ui; - internal unsafe delegate* glUniform1uiv; - internal unsafe delegate* glUniform2d; - internal unsafe delegate* glUniform2dv; - internal unsafe delegate* glUniform2f; - internal unsafe delegate* glUniform2fv; - internal unsafe delegate* glUniform2i; - internal unsafe delegate* glUniform2iv; - internal unsafe delegate* glUniform2ui; - internal unsafe delegate* glUniform2uiv; - internal unsafe delegate* glUniform3d; - internal unsafe delegate* glUniform3dv; - internal unsafe delegate* glUniform3f; - internal unsafe delegate* glUniform3fv; - internal unsafe delegate* glUniform3i; - internal unsafe delegate* glUniform3iv; - internal unsafe delegate* glUniform3ui; - internal unsafe delegate* glUniform3uiv; - internal unsafe delegate* glUniform4d; - internal unsafe delegate* glUniform4dv; - internal unsafe delegate* glUniform4f; - internal unsafe delegate* glUniform4fv; - internal unsafe delegate* glUniform4i; - internal unsafe delegate* glUniform4iv; - internal unsafe delegate* glUniform4ui; - internal unsafe delegate* glUniform4uiv; - internal unsafe delegate* glUniformBlockBinding; - internal unsafe delegate* glUniformMatrix2dv; - internal unsafe delegate* glUniformMatrix2fv; - internal unsafe delegate* glUniformMatrix2x3dv; - internal unsafe delegate* glUniformMatrix2x3fv; - internal unsafe delegate* glUniformMatrix2x4dv; - internal unsafe delegate* glUniformMatrix2x4fv; - internal unsafe delegate* glUniformMatrix3dv; - internal unsafe delegate* glUniformMatrix3fv; - internal unsafe delegate* glUniformMatrix3x2dv; - internal unsafe delegate* glUniformMatrix3x2fv; - internal unsafe delegate* glUniformMatrix3x4dv; - internal unsafe delegate* glUniformMatrix3x4fv; - internal unsafe delegate* glUniformMatrix4dv; - internal unsafe delegate* glUniformMatrix4fv; - internal unsafe delegate* glUniformMatrix4x2dv; - internal unsafe delegate* glUniformMatrix4x2fv; - internal unsafe delegate* glUniformMatrix4x3dv; - internal unsafe delegate* glUniformMatrix4x3fv; - internal unsafe delegate* glUniformSubroutinesuiv; - internal unsafe delegate* glUnmapBuffer; - internal unsafe delegate* glUnmapNamedBuffer; - internal unsafe delegate* glUseProgram; - internal unsafe delegate* glUseProgramStages; - internal unsafe delegate* glValidateProgram; - internal unsafe delegate* glValidateProgramPipeline; - internal unsafe delegate* glVertexArrayAttribBinding; - internal unsafe delegate* glVertexArrayAttribFormat; - internal unsafe delegate* glVertexArrayAttribIFormat; - internal unsafe delegate* glVertexArrayAttribLFormat; - internal unsafe delegate* glVertexArrayBindingDivisor; - internal unsafe delegate* glVertexArrayElementBuffer; - internal unsafe delegate* glVertexArrayVertexBuffer; - internal unsafe delegate* glVertexArrayVertexBuffers; - internal unsafe delegate* glVertexAttrib1d; - internal unsafe delegate* glVertexAttrib1dv; - internal unsafe delegate* glVertexAttrib1f; - internal unsafe delegate* glVertexAttrib1fv; - internal unsafe delegate* glVertexAttrib1s; - internal unsafe delegate* glVertexAttrib1sv; - internal unsafe delegate* glVertexAttrib2d; - internal unsafe delegate* glVertexAttrib2dv; - internal unsafe delegate* glVertexAttrib2f; - internal unsafe delegate* glVertexAttrib2fv; - internal unsafe delegate* glVertexAttrib2s; - internal unsafe delegate* glVertexAttrib2sv; - internal unsafe delegate* glVertexAttrib3d; - internal unsafe delegate* glVertexAttrib3dv; - internal unsafe delegate* glVertexAttrib3f; - internal unsafe delegate* glVertexAttrib3fv; - internal unsafe delegate* glVertexAttrib3s; - internal unsafe delegate* glVertexAttrib3sv; - internal unsafe delegate* glVertexAttrib4Nbv; - internal unsafe delegate* glVertexAttrib4Niv; - internal unsafe delegate* glVertexAttrib4Nsv; - internal unsafe delegate* glVertexAttrib4Nub; - internal unsafe delegate* glVertexAttrib4Nubv; - internal unsafe delegate* glVertexAttrib4Nuiv; - internal unsafe delegate* glVertexAttrib4Nusv; - internal unsafe delegate* glVertexAttrib4bv; - internal unsafe delegate* glVertexAttrib4d; - internal unsafe delegate* glVertexAttrib4dv; - internal unsafe delegate* glVertexAttrib4f; - internal unsafe delegate* glVertexAttrib4fv; - internal unsafe delegate* glVertexAttrib4iv; - internal unsafe delegate* glVertexAttrib4s; - internal unsafe delegate* glVertexAttrib4sv; - internal unsafe delegate* glVertexAttrib4ubv; - internal unsafe delegate* glVertexAttrib4uiv; - internal unsafe delegate* glVertexAttrib4usv; - internal unsafe delegate* glVertexAttribBinding; - internal unsafe delegate* glVertexAttribDivisor; - internal unsafe delegate* glVertexAttribFormat; - internal unsafe delegate* glVertexAttribI1i; - internal unsafe delegate* glVertexAttribI1iv; - internal unsafe delegate* glVertexAttribI1ui; - internal unsafe delegate* glVertexAttribI1uiv; - internal unsafe delegate* glVertexAttribI2i; - internal unsafe delegate* glVertexAttribI2iv; - internal unsafe delegate* glVertexAttribI2ui; - internal unsafe delegate* glVertexAttribI2uiv; - internal unsafe delegate* glVertexAttribI3i; - internal unsafe delegate* glVertexAttribI3iv; - internal unsafe delegate* glVertexAttribI3ui; - internal unsafe delegate* glVertexAttribI3uiv; - internal unsafe delegate* glVertexAttribI4bv; - internal unsafe delegate* glVertexAttribI4i; - internal unsafe delegate* glVertexAttribI4iv; - internal unsafe delegate* glVertexAttribI4sv; - internal unsafe delegate* glVertexAttribI4ubv; - internal unsafe delegate* glVertexAttribI4ui; - internal unsafe delegate* glVertexAttribI4uiv; - internal unsafe delegate* glVertexAttribI4usv; - internal unsafe delegate* glVertexAttribIFormat; - internal unsafe delegate* glVertexAttribIPointer; - internal unsafe delegate* glVertexAttribL1d; - internal unsafe delegate* glVertexAttribL1dv; - internal unsafe delegate* glVertexAttribL2d; - internal unsafe delegate* glVertexAttribL2dv; - internal unsafe delegate* glVertexAttribL3d; - internal unsafe delegate* glVertexAttribL3dv; - internal unsafe delegate* glVertexAttribL4d; - internal unsafe delegate* glVertexAttribL4dv; - internal unsafe delegate* glVertexAttribLFormat; - internal unsafe delegate* glVertexAttribLPointer; - internal unsafe delegate* glVertexAttribP1ui; - internal unsafe delegate* glVertexAttribP1uiv; - internal unsafe delegate* glVertexAttribP2ui; - internal unsafe delegate* glVertexAttribP2uiv; - internal unsafe delegate* glVertexAttribP3ui; - internal unsafe delegate* glVertexAttribP3uiv; - internal unsafe delegate* glVertexAttribP4ui; - internal unsafe delegate* glVertexAttribP4uiv; - internal unsafe delegate* glVertexAttribPointer; - internal unsafe delegate* glVertexBindingDivisor; - internal unsafe delegate* glViewport; - internal unsafe delegate* glViewportArrayv; - internal unsafe delegate* glViewportIndexedf; - internal unsafe delegate* glViewportIndexedfv; + internal unsafe delegate* glActiveShaderProgram; + internal unsafe delegate* glActiveTexture; + internal unsafe delegate* glAttachShader; + internal unsafe delegate* glBeginConditionalRender; + internal unsafe delegate* glBeginQuery; + internal unsafe delegate* glBeginQueryIndexed; + internal unsafe delegate* glBeginTransformFeedback; + internal unsafe delegate* glBindAttribLocation; + internal unsafe delegate* glBindBuffer; + internal unsafe delegate* glBindBufferBase; + internal unsafe delegate* glBindBufferRange; + internal unsafe delegate* glBindBuffersBase; + internal unsafe delegate* glBindBuffersRange; + internal unsafe delegate* glBindFragDataLocation; + internal unsafe delegate* glBindFragDataLocationIndexed; + internal unsafe delegate* glBindFramebuffer; + internal unsafe delegate* glBindImageTexture; + internal unsafe delegate* glBindImageTextures; + internal unsafe delegate* glBindProgramPipeline; + internal unsafe delegate* glBindRenderbuffer; + internal unsafe delegate* glBindSampler; + internal unsafe delegate* glBindSamplers; + internal unsafe delegate* glBindTexture; + internal unsafe delegate* glBindTextureUnit; + internal unsafe delegate* glBindTextures; + internal unsafe delegate* glBindTransformFeedback; + internal unsafe delegate* glBindVertexArray; + internal unsafe delegate* glBindVertexBuffer; + internal unsafe delegate* glBindVertexBuffers; + internal unsafe delegate* glBlendColor; + internal unsafe delegate* glBlendEquation; + internal unsafe delegate* glBlendEquationSeparate; + internal unsafe delegate* glBlendEquationSeparatei; + internal unsafe delegate* glBlendEquationi; + internal unsafe delegate* glBlendFunc; + internal unsafe delegate* glBlendFuncSeparate; + internal unsafe delegate* glBlendFuncSeparatei; + internal unsafe delegate* glBlendFunci; + internal unsafe delegate* glBlitFramebuffer; + internal unsafe delegate* glBlitNamedFramebuffer; + internal unsafe delegate* glBufferData; + internal unsafe delegate* glBufferStorage; + internal unsafe delegate* glBufferSubData; + internal unsafe delegate* glCheckFramebufferStatus; + internal unsafe delegate* glCheckNamedFramebufferStatus; + internal unsafe delegate* glClampColor; + internal unsafe delegate* glClear; + internal unsafe delegate* glClearBufferData; + internal unsafe delegate* glClearBufferSubData; + internal unsafe delegate* glClearBufferfi; + internal unsafe delegate* glClearBufferfv; + internal unsafe delegate* glClearBufferiv; + internal unsafe delegate* glClearBufferuiv; + internal unsafe delegate* glClearColor; + internal unsafe delegate* glClearDepth; + internal unsafe delegate* glClearDepthf; + internal unsafe delegate* glClearNamedBufferData; + internal unsafe delegate* glClearNamedBufferSubData; + internal unsafe delegate* glClearNamedFramebufferfi; + internal unsafe delegate* glClearNamedFramebufferfv; + internal unsafe delegate* glClearNamedFramebufferiv; + internal unsafe delegate* glClearNamedFramebufferuiv; + internal unsafe delegate* glClearStencil; + internal unsafe delegate* glClearTexImage; + internal unsafe delegate* glClearTexSubImage; + internal unsafe delegate* glClientWaitSync; + internal unsafe delegate* glClipControl; + internal unsafe delegate* glColorMask; + internal unsafe delegate* glColorMaski; + internal unsafe delegate* glCompileShader; + internal unsafe delegate* glCompressedTexImage1D; + internal unsafe delegate* glCompressedTexImage2D; + internal unsafe delegate* glCompressedTexImage3D; + internal unsafe delegate* glCompressedTexSubImage1D; + internal unsafe delegate* glCompressedTexSubImage2D; + internal unsafe delegate* glCompressedTexSubImage3D; + internal unsafe delegate* glCompressedTextureSubImage1D; + internal unsafe delegate* glCompressedTextureSubImage2D; + internal unsafe delegate* glCompressedTextureSubImage3D; + internal unsafe delegate* glCopyBufferSubData; + internal unsafe delegate* glCopyImageSubData; + internal unsafe delegate* glCopyNamedBufferSubData; + internal unsafe delegate* glCopyTexImage1D; + internal unsafe delegate* glCopyTexImage2D; + internal unsafe delegate* glCopyTexSubImage1D; + internal unsafe delegate* glCopyTexSubImage2D; + internal unsafe delegate* glCopyTexSubImage3D; + internal unsafe delegate* glCopyTextureSubImage1D; + internal unsafe delegate* glCopyTextureSubImage2D; + internal unsafe delegate* glCopyTextureSubImage3D; + internal unsafe delegate* glCreateBuffers; + internal unsafe delegate* glCreateFramebuffers; + internal unsafe delegate* glCreateProgram; + internal unsafe delegate* glCreateProgramPipelines; + internal unsafe delegate* glCreateQueries; + internal unsafe delegate* glCreateRenderbuffers; + internal unsafe delegate* glCreateSamplers; + internal unsafe delegate* glCreateShader; + internal unsafe delegate* glCreateShaderProgramv; + internal unsafe delegate* glCreateTextures; + internal unsafe delegate* glCreateTransformFeedbacks; + internal unsafe delegate* glCreateVertexArrays; + internal unsafe delegate* glCullFace; + internal unsafe delegate* glDebugMessageCallback; + internal unsafe delegate* glDebugMessageControl; + internal unsafe delegate* glDebugMessageInsert; + internal unsafe delegate* glDeleteBuffers; + internal unsafe delegate* glDeleteFramebuffers; + internal unsafe delegate* glDeleteProgram; + internal unsafe delegate* glDeleteProgramPipelines; + internal unsafe delegate* glDeleteQueries; + internal unsafe delegate* glDeleteRenderbuffers; + internal unsafe delegate* glDeleteSamplers; + internal unsafe delegate* glDeleteShader; + internal unsafe delegate* glDeleteSync; + internal unsafe delegate* glDeleteTextures; + internal unsafe delegate* glDeleteTransformFeedbacks; + internal unsafe delegate* glDeleteVertexArrays; + internal unsafe delegate* glDepthFunc; + internal unsafe delegate* glDepthMask; + internal unsafe delegate* glDepthRange; + internal unsafe delegate* glDepthRangeArrayv; + internal unsafe delegate* glDepthRangeIndexed; + internal unsafe delegate* glDepthRangef; + internal unsafe delegate* glDetachShader; + internal unsafe delegate* glDisable; + internal unsafe delegate* glDisableVertexArrayAttrib; + internal unsafe delegate* glDisableVertexAttribArray; + internal unsafe delegate* glDisablei; + internal unsafe delegate* glDispatchCompute; + internal unsafe delegate* glDispatchComputeIndirect; + internal unsafe delegate* glDrawArrays; + internal unsafe delegate* glDrawArraysIndirect; + internal unsafe delegate* glDrawArraysInstanced; + internal unsafe delegate* glDrawArraysInstancedBaseInstance; + internal unsafe delegate* glDrawBuffer; + internal unsafe delegate* glDrawBuffers; + internal unsafe delegate* glDrawElements; + internal unsafe delegate* glDrawElementsBaseVertex; + internal unsafe delegate* glDrawElementsIndirect; + internal unsafe delegate* glDrawElementsInstanced; + internal unsafe delegate* glDrawElementsInstancedBaseInstance; + internal unsafe delegate* glDrawElementsInstancedBaseVertex; + internal unsafe delegate* glDrawElementsInstancedBaseVertexBaseInstance; + internal unsafe delegate* glDrawRangeElements; + internal unsafe delegate* glDrawRangeElementsBaseVertex; + internal unsafe delegate* glDrawTransformFeedback; + internal unsafe delegate* glDrawTransformFeedbackInstanced; + internal unsafe delegate* glDrawTransformFeedbackStream; + internal unsafe delegate* glDrawTransformFeedbackStreamInstanced; + internal unsafe delegate* glEnable; + internal unsafe delegate* glEnableVertexArrayAttrib; + internal unsafe delegate* glEnableVertexAttribArray; + internal unsafe delegate* glEnablei; + internal unsafe delegate* glEndConditionalRender; + internal unsafe delegate* glEndQuery; + internal unsafe delegate* glEndQueryIndexed; + internal unsafe delegate* glEndTransformFeedback; + internal unsafe delegate* glFenceSync; + internal unsafe delegate* glFinish; + internal unsafe delegate* glFlush; + internal unsafe delegate* glFlushMappedBufferRange; + internal unsafe delegate* glFlushMappedNamedBufferRange; + internal unsafe delegate* glFramebufferParameteri; + internal unsafe delegate* glFramebufferRenderbuffer; + internal unsafe delegate* glFramebufferTexture; + internal unsafe delegate* glFramebufferTexture1D; + internal unsafe delegate* glFramebufferTexture2D; + internal unsafe delegate* glFramebufferTexture3D; + internal unsafe delegate* glFramebufferTextureLayer; + internal unsafe delegate* glFrontFace; + internal unsafe delegate* glGenBuffers; + internal unsafe delegate* glGenFramebuffers; + internal unsafe delegate* glGenProgramPipelines; + internal unsafe delegate* glGenQueries; + internal unsafe delegate* glGenRenderbuffers; + internal unsafe delegate* glGenSamplers; + internal unsafe delegate* glGenTextures; + internal unsafe delegate* glGenTransformFeedbacks; + internal unsafe delegate* glGenVertexArrays; + internal unsafe delegate* glGenerateMipmap; + internal unsafe delegate* glGenerateTextureMipmap; + internal unsafe delegate* glGetActiveAtomicCounterBufferiv; + internal unsafe delegate* glGetActiveAttrib; + internal unsafe delegate* glGetActiveSubroutineName; + internal unsafe delegate* glGetActiveSubroutineUniformName; + internal unsafe delegate* glGetActiveSubroutineUniformiv; + internal unsafe delegate* glGetActiveUniform; + internal unsafe delegate* glGetActiveUniformBlockName; + internal unsafe delegate* glGetActiveUniformBlockiv; + internal unsafe delegate* glGetActiveUniformName; + internal unsafe delegate* glGetActiveUniformsiv; + internal unsafe delegate* glGetAttachedShaders; + internal unsafe delegate* glGetAttribLocation; + internal unsafe delegate* glGetBooleani_v; + internal unsafe delegate* glGetBooleanv; + internal unsafe delegate* glGetBufferParameteri64v; + internal unsafe delegate* glGetBufferParameteriv; + internal unsafe delegate* glGetBufferPointerv; + internal unsafe delegate* glGetBufferSubData; + internal unsafe delegate* glGetCompressedTexImage; + internal unsafe delegate* glGetCompressedTextureImage; + internal unsafe delegate* glGetCompressedTextureSubImage; + internal unsafe delegate* glGetDebugMessageLog; + internal unsafe delegate* glGetDoublei_v; + internal unsafe delegate* glGetDoublev; + internal unsafe delegate* glGetError; + internal unsafe delegate* glGetFloati_v; + internal unsafe delegate* glGetFloatv; + internal unsafe delegate* glGetFragDataIndex; + internal unsafe delegate* glGetFragDataLocation; + internal unsafe delegate* glGetFramebufferAttachmentParameteriv; + internal unsafe delegate* glGetFramebufferParameteriv; + internal unsafe delegate* glGetGraphicsResetStatus; + internal unsafe delegate* glGetInteger64i_v; + internal unsafe delegate* glGetInteger64v; + internal unsafe delegate* glGetIntegeri_v; + internal unsafe delegate* glGetIntegerv; + internal unsafe delegate* glGetInternalformati64v; + internal unsafe delegate* glGetInternalformativ; + internal unsafe delegate* glGetMultisamplefv; + internal unsafe delegate* glGetNamedBufferParameteri64v; + internal unsafe delegate* glGetNamedBufferParameteriv; + internal unsafe delegate* glGetNamedBufferPointerv; + internal unsafe delegate* glGetNamedBufferSubData; + internal unsafe delegate* glGetNamedFramebufferAttachmentParameteriv; + internal unsafe delegate* glGetNamedFramebufferParameteriv; + internal unsafe delegate* glGetNamedRenderbufferParameteriv; + internal unsafe delegate* glGetObjectLabel; + internal unsafe delegate* glGetObjectPtrLabel; + internal unsafe delegate* glGetPointerv; + internal unsafe delegate* glGetProgramBinary; + internal unsafe delegate* glGetProgramInfoLog; + internal unsafe delegate* glGetProgramInterfaceiv; + internal unsafe delegate* glGetProgramPipelineInfoLog; + internal unsafe delegate* glGetProgramPipelineiv; + internal unsafe delegate* glGetProgramResourceIndex; + internal unsafe delegate* glGetProgramResourceLocation; + internal unsafe delegate* glGetProgramResourceLocationIndex; + internal unsafe delegate* glGetProgramResourceName; + internal unsafe delegate* glGetProgramResourceiv; + internal unsafe delegate* glGetProgramStageiv; + internal unsafe delegate* glGetProgramiv; + internal unsafe delegate* glGetQueryBufferObjecti64v; + internal unsafe delegate* glGetQueryBufferObjectiv; + internal unsafe delegate* glGetQueryBufferObjectui64v; + internal unsafe delegate* glGetQueryBufferObjectuiv; + internal unsafe delegate* glGetQueryIndexediv; + internal unsafe delegate* glGetQueryObjecti64v; + internal unsafe delegate* glGetQueryObjectiv; + internal unsafe delegate* glGetQueryObjectui64v; + internal unsafe delegate* glGetQueryObjectuiv; + internal unsafe delegate* glGetQueryiv; + internal unsafe delegate* glGetRenderbufferParameteriv; + internal unsafe delegate* glGetSamplerParameterIiv; + internal unsafe delegate* glGetSamplerParameterIuiv; + internal unsafe delegate* glGetSamplerParameterfv; + internal unsafe delegate* glGetSamplerParameteriv; + internal unsafe delegate* glGetShaderInfoLog; + internal unsafe delegate* glGetShaderPrecisionFormat; + internal unsafe delegate* glGetShaderSource; + internal unsafe delegate* glGetShaderiv; + internal unsafe delegate* glGetString; + internal unsafe delegate* glGetStringi; + internal unsafe delegate* glGetSubroutineIndex; + internal unsafe delegate* glGetSubroutineUniformLocation; + internal unsafe delegate* glGetSynciv; + internal unsafe delegate* glGetTexImage; + internal unsafe delegate* glGetTexLevelParameterfv; + internal unsafe delegate* glGetTexLevelParameteriv; + internal unsafe delegate* glGetTexParameterIiv; + internal unsafe delegate* glGetTexParameterIuiv; + internal unsafe delegate* glGetTexParameterfv; + internal unsafe delegate* glGetTexParameteriv; + internal unsafe delegate* glGetTextureImage; + internal unsafe delegate* glGetTextureLevelParameterfv; + internal unsafe delegate* glGetTextureLevelParameteriv; + internal unsafe delegate* glGetTextureParameterIiv; + internal unsafe delegate* glGetTextureParameterIuiv; + internal unsafe delegate* glGetTextureParameterfv; + internal unsafe delegate* glGetTextureParameteriv; + internal unsafe delegate* glGetTextureSubImage; + internal unsafe delegate* glGetTransformFeedbackVarying; + internal unsafe delegate* glGetTransformFeedbacki64_v; + internal unsafe delegate* glGetTransformFeedbacki_v; + internal unsafe delegate* glGetTransformFeedbackiv; + internal unsafe delegate* glGetUniformBlockIndex; + internal unsafe delegate* glGetUniformIndices; + internal unsafe delegate* glGetUniformLocation; + internal unsafe delegate* glGetUniformSubroutineuiv; + internal unsafe delegate* glGetUniformdv; + internal unsafe delegate* glGetUniformfv; + internal unsafe delegate* glGetUniformiv; + internal unsafe delegate* glGetUniformuiv; + internal unsafe delegate* glGetVertexArrayIndexed64iv; + internal unsafe delegate* glGetVertexArrayIndexediv; + internal unsafe delegate* glGetVertexArrayiv; + internal unsafe delegate* glGetVertexAttribIiv; + internal unsafe delegate* glGetVertexAttribIuiv; + internal unsafe delegate* glGetVertexAttribLdv; + internal unsafe delegate* glGetVertexAttribPointerv; + internal unsafe delegate* glGetVertexAttribdv; + internal unsafe delegate* glGetVertexAttribfv; + internal unsafe delegate* glGetVertexAttribiv; + internal unsafe delegate* glGetnCompressedTexImage; + internal unsafe delegate* glGetnTexImage; + internal unsafe delegate* glGetnUniformdv; + internal unsafe delegate* glGetnUniformfv; + internal unsafe delegate* glGetnUniformiv; + internal unsafe delegate* glGetnUniformuiv; + internal unsafe delegate* glHint; + internal unsafe delegate* glInvalidateBufferData; + internal unsafe delegate* glInvalidateBufferSubData; + internal unsafe delegate* glInvalidateFramebuffer; + internal unsafe delegate* glInvalidateNamedFramebufferData; + internal unsafe delegate* glInvalidateNamedFramebufferSubData; + internal unsafe delegate* glInvalidateSubFramebuffer; + internal unsafe delegate* glInvalidateTexImage; + internal unsafe delegate* glInvalidateTexSubImage; + internal unsafe delegate* glIsBuffer; + internal unsafe delegate* glIsEnabled; + internal unsafe delegate* glIsEnabledi; + internal unsafe delegate* glIsFramebuffer; + internal unsafe delegate* glIsProgram; + internal unsafe delegate* glIsProgramPipeline; + internal unsafe delegate* glIsQuery; + internal unsafe delegate* glIsRenderbuffer; + internal unsafe delegate* glIsSampler; + internal unsafe delegate* glIsShader; + internal unsafe delegate* glIsSync; + internal unsafe delegate* glIsTexture; + internal unsafe delegate* glIsTransformFeedback; + internal unsafe delegate* glIsVertexArray; + internal unsafe delegate* glLineWidth; + internal unsafe delegate* glLinkProgram; + internal unsafe delegate* glLogicOp; + internal unsafe delegate* glMapBuffer; + internal unsafe delegate* glMapBufferRange; + internal unsafe delegate* glMapNamedBuffer; + internal unsafe delegate* glMapNamedBufferRange; + internal unsafe delegate* glMemoryBarrier; + internal unsafe delegate* glMemoryBarrierByRegion; + internal unsafe delegate* glMinSampleShading; + internal unsafe delegate* glMultiDrawArrays; + internal unsafe delegate* glMultiDrawArraysIndirect; + internal unsafe delegate* glMultiDrawArraysIndirectCount; + internal unsafe delegate* glMultiDrawElements; + internal unsafe delegate* glMultiDrawElementsBaseVertex; + internal unsafe delegate* glMultiDrawElementsIndirect; + internal unsafe delegate* glMultiDrawElementsIndirectCount; + internal unsafe delegate* glNamedBufferData; + internal unsafe delegate* glNamedBufferStorage; + internal unsafe delegate* glNamedBufferSubData; + internal unsafe delegate* glNamedFramebufferDrawBuffer; + internal unsafe delegate* glNamedFramebufferDrawBuffers; + internal unsafe delegate* glNamedFramebufferParameteri; + internal unsafe delegate* glNamedFramebufferReadBuffer; + internal unsafe delegate* glNamedFramebufferRenderbuffer; + internal unsafe delegate* glNamedFramebufferTexture; + internal unsafe delegate* glNamedFramebufferTextureLayer; + internal unsafe delegate* glNamedRenderbufferStorage; + internal unsafe delegate* glNamedRenderbufferStorageMultisample; + internal unsafe delegate* glObjectLabel; + internal unsafe delegate* glObjectPtrLabel; + internal unsafe delegate* glPatchParameterfv; + internal unsafe delegate* glPatchParameteri; + internal unsafe delegate* glPauseTransformFeedback; + internal unsafe delegate* glPixelStoref; + internal unsafe delegate* glPixelStorei; + internal unsafe delegate* glPointParameterf; + internal unsafe delegate* glPointParameterfv; + internal unsafe delegate* glPointParameteri; + internal unsafe delegate* glPointParameteriv; + internal unsafe delegate* glPointSize; + internal unsafe delegate* glPolygonMode; + internal unsafe delegate* glPolygonOffset; + internal unsafe delegate* glPolygonOffsetClamp; + internal unsafe delegate* glPopDebugGroup; + internal unsafe delegate* glPrimitiveRestartIndex; + internal unsafe delegate* glProgramBinary; + internal unsafe delegate* glProgramParameteri; + internal unsafe delegate* glProgramUniform1d; + internal unsafe delegate* glProgramUniform1dv; + internal unsafe delegate* glProgramUniform1f; + internal unsafe delegate* glProgramUniform1fv; + internal unsafe delegate* glProgramUniform1i; + internal unsafe delegate* glProgramUniform1iv; + internal unsafe delegate* glProgramUniform1ui; + internal unsafe delegate* glProgramUniform1uiv; + internal unsafe delegate* glProgramUniform2d; + internal unsafe delegate* glProgramUniform2dv; + internal unsafe delegate* glProgramUniform2f; + internal unsafe delegate* glProgramUniform2fv; + internal unsafe delegate* glProgramUniform2i; + internal unsafe delegate* glProgramUniform2iv; + internal unsafe delegate* glProgramUniform2ui; + internal unsafe delegate* glProgramUniform2uiv; + internal unsafe delegate* glProgramUniform3d; + internal unsafe delegate* glProgramUniform3dv; + internal unsafe delegate* glProgramUniform3f; + internal unsafe delegate* glProgramUniform3fv; + internal unsafe delegate* glProgramUniform3i; + internal unsafe delegate* glProgramUniform3iv; + internal unsafe delegate* glProgramUniform3ui; + internal unsafe delegate* glProgramUniform3uiv; + internal unsafe delegate* glProgramUniform4d; + internal unsafe delegate* glProgramUniform4dv; + internal unsafe delegate* glProgramUniform4f; + internal unsafe delegate* glProgramUniform4fv; + internal unsafe delegate* glProgramUniform4i; + internal unsafe delegate* glProgramUniform4iv; + internal unsafe delegate* glProgramUniform4ui; + internal unsafe delegate* glProgramUniform4uiv; + internal unsafe delegate* glProgramUniformMatrix2dv; + internal unsafe delegate* glProgramUniformMatrix2fv; + internal unsafe delegate* glProgramUniformMatrix2x3dv; + internal unsafe delegate* glProgramUniformMatrix2x3fv; + internal unsafe delegate* glProgramUniformMatrix2x4dv; + internal unsafe delegate* glProgramUniformMatrix2x4fv; + internal unsafe delegate* glProgramUniformMatrix3dv; + internal unsafe delegate* glProgramUniformMatrix3fv; + internal unsafe delegate* glProgramUniformMatrix3x2dv; + internal unsafe delegate* glProgramUniformMatrix3x2fv; + internal unsafe delegate* glProgramUniformMatrix3x4dv; + internal unsafe delegate* glProgramUniformMatrix3x4fv; + internal unsafe delegate* glProgramUniformMatrix4dv; + internal unsafe delegate* glProgramUniformMatrix4fv; + internal unsafe delegate* glProgramUniformMatrix4x2dv; + internal unsafe delegate* glProgramUniformMatrix4x2fv; + internal unsafe delegate* glProgramUniformMatrix4x3dv; + internal unsafe delegate* glProgramUniformMatrix4x3fv; + internal unsafe delegate* glProvokingVertex; + internal unsafe delegate* glPushDebugGroup; + internal unsafe delegate* glQueryCounter; + internal unsafe delegate* glReadBuffer; + internal unsafe delegate* glReadPixels; + internal unsafe delegate* glReadnPixels; + internal unsafe delegate* glReleaseShaderCompiler; + internal unsafe delegate* glRenderbufferStorage; + internal unsafe delegate* glRenderbufferStorageMultisample; + internal unsafe delegate* glResumeTransformFeedback; + internal unsafe delegate* glSampleCoverage; + internal unsafe delegate* glSampleMaski; + internal unsafe delegate* glSamplerParameterIiv; + internal unsafe delegate* glSamplerParameterIuiv; + internal unsafe delegate* glSamplerParameterf; + internal unsafe delegate* glSamplerParameterfv; + internal unsafe delegate* glSamplerParameteri; + internal unsafe delegate* glSamplerParameteriv; + internal unsafe delegate* glScissor; + internal unsafe delegate* glScissorArrayv; + internal unsafe delegate* glScissorIndexed; + internal unsafe delegate* glScissorIndexedv; + internal unsafe delegate* glShaderBinary; + internal unsafe delegate* glShaderSource; + internal unsafe delegate* glShaderStorageBlockBinding; + internal unsafe delegate* glSpecializeShader; + internal unsafe delegate* glStencilFunc; + internal unsafe delegate* glStencilFuncSeparate; + internal unsafe delegate* glStencilMask; + internal unsafe delegate* glStencilMaskSeparate; + internal unsafe delegate* glStencilOp; + internal unsafe delegate* glStencilOpSeparate; + internal unsafe delegate* glTexBuffer; + internal unsafe delegate* glTexBufferRange; + internal unsafe delegate* glTexImage1D; + internal unsafe delegate* glTexImage2D; + internal unsafe delegate* glTexImage2DMultisample; + internal unsafe delegate* glTexImage3D; + internal unsafe delegate* glTexImage3DMultisample; + internal unsafe delegate* glTexParameterIiv; + internal unsafe delegate* glTexParameterIuiv; + internal unsafe delegate* glTexParameterf; + internal unsafe delegate* glTexParameterfv; + internal unsafe delegate* glTexParameteri; + internal unsafe delegate* glTexParameteriv; + internal unsafe delegate* glTexStorage1D; + internal unsafe delegate* glTexStorage2D; + internal unsafe delegate* glTexStorage2DMultisample; + internal unsafe delegate* glTexStorage3D; + internal unsafe delegate* glTexStorage3DMultisample; + internal unsafe delegate* glTexSubImage1D; + internal unsafe delegate* glTexSubImage2D; + internal unsafe delegate* glTexSubImage3D; + internal unsafe delegate* glTextureBarrier; + internal unsafe delegate* glTextureBuffer; + internal unsafe delegate* glTextureBufferRange; + internal unsafe delegate* glTextureParameterIiv; + internal unsafe delegate* glTextureParameterIuiv; + internal unsafe delegate* glTextureParameterf; + internal unsafe delegate* glTextureParameterfv; + internal unsafe delegate* glTextureParameteri; + internal unsafe delegate* glTextureParameteriv; + internal unsafe delegate* glTextureStorage1D; + internal unsafe delegate* glTextureStorage2D; + internal unsafe delegate* glTextureStorage2DMultisample; + internal unsafe delegate* glTextureStorage3D; + internal unsafe delegate* glTextureStorage3DMultisample; + internal unsafe delegate* glTextureSubImage1D; + internal unsafe delegate* glTextureSubImage2D; + internal unsafe delegate* glTextureSubImage3D; + internal unsafe delegate* glTextureView; + internal unsafe delegate* glTransformFeedbackBufferBase; + internal unsafe delegate* glTransformFeedbackBufferRange; + internal unsafe delegate* glTransformFeedbackVaryings; + internal unsafe delegate* glUniform1d; + internal unsafe delegate* glUniform1dv; + internal unsafe delegate* glUniform1f; + internal unsafe delegate* glUniform1fv; + internal unsafe delegate* glUniform1i; + internal unsafe delegate* glUniform1iv; + internal unsafe delegate* glUniform1ui; + internal unsafe delegate* glUniform1uiv; + internal unsafe delegate* glUniform2d; + internal unsafe delegate* glUniform2dv; + internal unsafe delegate* glUniform2f; + internal unsafe delegate* glUniform2fv; + internal unsafe delegate* glUniform2i; + internal unsafe delegate* glUniform2iv; + internal unsafe delegate* glUniform2ui; + internal unsafe delegate* glUniform2uiv; + internal unsafe delegate* glUniform3d; + internal unsafe delegate* glUniform3dv; + internal unsafe delegate* glUniform3f; + internal unsafe delegate* glUniform3fv; + internal unsafe delegate* glUniform3i; + internal unsafe delegate* glUniform3iv; + internal unsafe delegate* glUniform3ui; + internal unsafe delegate* glUniform3uiv; + internal unsafe delegate* glUniform4d; + internal unsafe delegate* glUniform4dv; + internal unsafe delegate* glUniform4f; + internal unsafe delegate* glUniform4fv; + internal unsafe delegate* glUniform4i; + internal unsafe delegate* glUniform4iv; + internal unsafe delegate* glUniform4ui; + internal unsafe delegate* glUniform4uiv; + internal unsafe delegate* glUniformBlockBinding; + internal unsafe delegate* glUniformMatrix2dv; + internal unsafe delegate* glUniformMatrix2fv; + internal unsafe delegate* glUniformMatrix2x3dv; + internal unsafe delegate* glUniformMatrix2x3fv; + internal unsafe delegate* glUniformMatrix2x4dv; + internal unsafe delegate* glUniformMatrix2x4fv; + internal unsafe delegate* glUniformMatrix3dv; + internal unsafe delegate* glUniformMatrix3fv; + internal unsafe delegate* glUniformMatrix3x2dv; + internal unsafe delegate* glUniformMatrix3x2fv; + internal unsafe delegate* glUniformMatrix3x4dv; + internal unsafe delegate* glUniformMatrix3x4fv; + internal unsafe delegate* glUniformMatrix4dv; + internal unsafe delegate* glUniformMatrix4fv; + internal unsafe delegate* glUniformMatrix4x2dv; + internal unsafe delegate* glUniformMatrix4x2fv; + internal unsafe delegate* glUniformMatrix4x3dv; + internal unsafe delegate* glUniformMatrix4x3fv; + internal unsafe delegate* glUniformSubroutinesuiv; + internal unsafe delegate* glUnmapBuffer; + internal unsafe delegate* glUnmapNamedBuffer; + internal unsafe delegate* glUseProgram; + internal unsafe delegate* glUseProgramStages; + internal unsafe delegate* glValidateProgram; + internal unsafe delegate* glValidateProgramPipeline; + internal unsafe delegate* glVertexArrayAttribBinding; + internal unsafe delegate* glVertexArrayAttribFormat; + internal unsafe delegate* glVertexArrayAttribIFormat; + internal unsafe delegate* glVertexArrayAttribLFormat; + internal unsafe delegate* glVertexArrayBindingDivisor; + internal unsafe delegate* glVertexArrayElementBuffer; + internal unsafe delegate* glVertexArrayVertexBuffer; + internal unsafe delegate* glVertexArrayVertexBuffers; + internal unsafe delegate* glVertexAttrib1d; + internal unsafe delegate* glVertexAttrib1dv; + internal unsafe delegate* glVertexAttrib1f; + internal unsafe delegate* glVertexAttrib1fv; + internal unsafe delegate* glVertexAttrib1s; + internal unsafe delegate* glVertexAttrib1sv; + internal unsafe delegate* glVertexAttrib2d; + internal unsafe delegate* glVertexAttrib2dv; + internal unsafe delegate* glVertexAttrib2f; + internal unsafe delegate* glVertexAttrib2fv; + internal unsafe delegate* glVertexAttrib2s; + internal unsafe delegate* glVertexAttrib2sv; + internal unsafe delegate* glVertexAttrib3d; + internal unsafe delegate* glVertexAttrib3dv; + internal unsafe delegate* glVertexAttrib3f; + internal unsafe delegate* glVertexAttrib3fv; + internal unsafe delegate* glVertexAttrib3s; + internal unsafe delegate* glVertexAttrib3sv; + internal unsafe delegate* glVertexAttrib4Nbv; + internal unsafe delegate* glVertexAttrib4Niv; + internal unsafe delegate* glVertexAttrib4Nsv; + internal unsafe delegate* glVertexAttrib4Nub; + internal unsafe delegate* glVertexAttrib4Nubv; + internal unsafe delegate* glVertexAttrib4Nuiv; + internal unsafe delegate* glVertexAttrib4Nusv; + internal unsafe delegate* glVertexAttrib4bv; + internal unsafe delegate* glVertexAttrib4d; + internal unsafe delegate* glVertexAttrib4dv; + internal unsafe delegate* glVertexAttrib4f; + internal unsafe delegate* glVertexAttrib4fv; + internal unsafe delegate* glVertexAttrib4iv; + internal unsafe delegate* glVertexAttrib4s; + internal unsafe delegate* glVertexAttrib4sv; + internal unsafe delegate* glVertexAttrib4ubv; + internal unsafe delegate* glVertexAttrib4uiv; + internal unsafe delegate* glVertexAttrib4usv; + internal unsafe delegate* glVertexAttribBinding; + internal unsafe delegate* glVertexAttribDivisor; + internal unsafe delegate* glVertexAttribFormat; + internal unsafe delegate* glVertexAttribI1i; + internal unsafe delegate* glVertexAttribI1iv; + internal unsafe delegate* glVertexAttribI1ui; + internal unsafe delegate* glVertexAttribI1uiv; + internal unsafe delegate* glVertexAttribI2i; + internal unsafe delegate* glVertexAttribI2iv; + internal unsafe delegate* glVertexAttribI2ui; + internal unsafe delegate* glVertexAttribI2uiv; + internal unsafe delegate* glVertexAttribI3i; + internal unsafe delegate* glVertexAttribI3iv; + internal unsafe delegate* glVertexAttribI3ui; + internal unsafe delegate* glVertexAttribI3uiv; + internal unsafe delegate* glVertexAttribI4bv; + internal unsafe delegate* glVertexAttribI4i; + internal unsafe delegate* glVertexAttribI4iv; + internal unsafe delegate* glVertexAttribI4sv; + internal unsafe delegate* glVertexAttribI4ubv; + internal unsafe delegate* glVertexAttribI4ui; + internal unsafe delegate* glVertexAttribI4uiv; + internal unsafe delegate* glVertexAttribI4usv; + internal unsafe delegate* glVertexAttribIFormat; + internal unsafe delegate* glVertexAttribIPointer; + internal unsafe delegate* glVertexAttribL1d; + internal unsafe delegate* glVertexAttribL1dv; + internal unsafe delegate* glVertexAttribL2d; + internal unsafe delegate* glVertexAttribL2dv; + internal unsafe delegate* glVertexAttribL3d; + internal unsafe delegate* glVertexAttribL3dv; + internal unsafe delegate* glVertexAttribL4d; + internal unsafe delegate* glVertexAttribL4dv; + internal unsafe delegate* glVertexAttribLFormat; + internal unsafe delegate* glVertexAttribLPointer; + internal unsafe delegate* glVertexAttribP1ui; + internal unsafe delegate* glVertexAttribP1uiv; + internal unsafe delegate* glVertexAttribP2ui; + internal unsafe delegate* glVertexAttribP2uiv; + internal unsafe delegate* glVertexAttribP3ui; + internal unsafe delegate* glVertexAttribP3uiv; + internal unsafe delegate* glVertexAttribP4ui; + internal unsafe delegate* glVertexAttribP4uiv; + internal unsafe delegate* glVertexAttribPointer; + internal unsafe delegate* glVertexBindingDivisor; + internal unsafe delegate* glViewport; + internal unsafe delegate* glViewportArrayv; + internal unsafe delegate* glViewportIndexedf; + internal unsafe delegate* glViewportIndexedfv; internal unsafe delegate* glWaitSync; \ No newline at end of file diff --git a/StgSharp.Tools/gl_diff.cs b/StgSharp.Tools/gl_diff.cs index 9986ff3d..3ab711b8 100644 --- a/StgSharp.Tools/gl_diff.cs +++ b/StgSharp.Tools/gl_diff.cs @@ -1,74 +1,74 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text.RegularExpressions; - -partial class Program -{ - private static readonly string csharpFieldsFile = @"d:\platform-dev\StgSharp.Tools\cs.txt"; - private static readonly string cStructFieldsFile = @"d:\platform-dev\StgSharp.Tools\c.txt"; - - static void Main() - { - var csharpFields = ParseFieldNames(File.ReadAllText(csharpFieldsFile), stripGlPrefix: true); - var cStructFields = ParseFieldNames(File.ReadAllText(cStructFieldsFile), stripGlPrefix: false); - - var missingInCStruct = new HashSet(csharpFields).Except(cStructFields).ToList(); - var missingInCSharp = new HashSet(cStructFields).Except(csharpFields).ToList(); - - - Console.WriteLine("Fields only in C# file:"); - missingInCStruct.ForEach(f => Console.WriteLine($" {f}")); - - Console.WriteLine("Fields only in C struct file:"); - missingInCSharp.ForEach(f => Console.WriteLine($" {f}")); - } - - private static HashSet ParseFieldNames(string content, bool stripGlPrefix) - { - content = StripComments(content); - - var matches = stripGlPrefix - ? CSharpFieldRegex().Matches(content) - : CStructFieldRegex().Matches(content); - - var fields = new HashSet(); - foreach (Match match in matches) - { - var nameGroup = match.Groups["name"]; - if (nameGroup.Success) - { - fields.Add(nameGroup.Value); - } - else if (match.Groups.Count > 1) - { - fields.Add(match.Groups[1].Value); - } - } - return fields; - } - - private static string StripComments(string text) - { - // Remove // comments - text = LineCommentRegex().Replace(text, string.Empty); - // Remove /* */ comments - text = BlockCommentRegex().Replace(text, string.Empty); - return text; - } - - // C#: internal delegate*<...> glName; capture Name without the gl prefix - [GeneratedRegex(@"^\s*internal\s+(?:unsafe\s+)?delegate\*<[^>]+?>\s+gl(?[A-Za-z0-9_]+)\s*;", RegexOptions.Multiline)] - private static partial Regex CSharpFieldRegex(); - - // C: PFNGLXYZPROC Name; capture the Name - [GeneratedRegex(@"^\s*PFNGL[A-Z0-9_]+PROC\s+(?[A-Za-z0-9_]+)\s*;", RegexOptions.Multiline)] - private static partial Regex CStructFieldRegex(); - - [GeneratedRegex("//.*", RegexOptions.None)] - private static partial Regex LineCommentRegex(); - - [GeneratedRegex("/\\*.*?\\*/", RegexOptions.Singleline)] - private static partial Regex BlockCommentRegex(); +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text.RegularExpressions; + +partial class Program +{ + private static readonly string csharpFieldsFile = @"d:\platform-dev\StgSharp.Tools\cs.txt"; + private static readonly string cStructFieldsFile = @"d:\platform-dev\StgSharp.Tools\c.txt"; + + static void Main() + { + var csharpFields = ParseFieldNames(File.ReadAllText(csharpFieldsFile), stripGlPrefix: true); + var cStructFields = ParseFieldNames(File.ReadAllText(cStructFieldsFile), stripGlPrefix: false); + + var missingInCStruct = new HashSet(csharpFields).Except(cStructFields).ToList(); + var missingInCSharp = new HashSet(cStructFields).Except(csharpFields).ToList(); + + + Console.WriteLine("Fields only in C# file:"); + missingInCStruct.ForEach(f => Console.WriteLine($" {f}")); + + Console.WriteLine("Fields only in C struct file:"); + missingInCSharp.ForEach(f => Console.WriteLine($" {f}")); + } + + private static HashSet ParseFieldNames(string content, bool stripGlPrefix) + { + content = StripComments(content); + + var matches = stripGlPrefix + ? CSharpFieldRegex().Matches(content) + : CStructFieldRegex().Matches(content); + + var fields = new HashSet(); + foreach (Match match in matches) + { + var nameGroup = match.Groups["name"]; + if (nameGroup.Success) + { + fields.Add(nameGroup.Value); + } + else if (match.Groups.Count > 1) + { + fields.Add(match.Groups[1].Value); + } + } + return fields; + } + + private static string StripComments(string text) + { + // Remove // comments + text = LineCommentRegex().Replace(text, string.Empty); + // Remove /* */ comments + text = BlockCommentRegex().Replace(text, string.Empty); + return text; + } + + // C#: internal delegate*<...> glName; capture Name without the gl prefix + [GeneratedRegex(@"^\s*internal\s+(?:unsafe\s+)?delegate\*<[^>]+?>\s+gl(?[A-Za-z0-9_]+)\s*;", RegexOptions.Multiline)] + private static partial Regex CSharpFieldRegex(); + + // C: PFNGLXYZPROC Name; capture the Name + [GeneratedRegex(@"^\s*PFNGL[A-Z0-9_]+PROC\s+(?[A-Za-z0-9_]+)\s*;", RegexOptions.Multiline)] + private static partial Regex CStructFieldRegex(); + + [GeneratedRegex("//.*", RegexOptions.None)] + private static partial Regex LineCommentRegex(); + + [GeneratedRegex("/\\*.*?\\*/", RegexOptions.Singleline)] + private static partial Regex BlockCommentRegex(); } \ No newline at end of file diff --git a/StgSharp.nuspec b/StgSharp.nuspec index 2851b072..6e923b1a 100644 --- a/StgSharp.nuspec +++ b/StgSharp.nuspec @@ -1,22 +1,22 @@ - - - - StgSharp - 1.0.0 - StgSharp - Nitload - false - MIT - - https://github.com/Nitload-NSI/StgSharp - No des right now - Summary of changes made in this release of the package. - Nitload reserve - OpenGL C# - - - - - - + + + + StgSharp + 1.0.0 + StgSharp + Nitload + false + MIT + + https://github.com/Nitload-NSI/StgSharp + No des right now + Summary of changes made in this release of the package. + Nitload reserve + OpenGL C# + + + + + + \ No newline at end of file diff --git a/StgSharpDebug/HlsfStressTest.cs b/StgSharpDebug/HlsfStressTest.cs index aa297268..92adc2ea 100644 --- a/StgSharpDebug/HlsfStressTest.cs +++ b/StgSharpDebug/HlsfStressTest.cs @@ -1,306 +1,306 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="HlsfStressTest" -// 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.Mathematics.Memory; -using System; -using System.Collections.Generic; -using System.Diagnostics; - -namespace StgSharp -{ - internal static class HlsfStressTest - { - - private const uint MaxAllocSize = 32 * 1024 * 1024; // 32MB documented cap - - // Allow overriding arena size via env HLSF_ARENA_MB (must be >=64MB) - private static readonly ulong ArenaBytes = Environment.GetEnvironmentVariable("HLSF_ARENA_MB") is string mbStr && - int.TryParse(mbStr, out int mb) && - mb >= 64 ? - (ulong)mb * 1024UL * 1024UL : - 3UL * 1024UL * 1024UL * 1024UL; // lower default to 512MB - - private static readonly uint[] SizeSweep = { - 64, - 128, - 192, - 256, - 512, - 768, - 1024, - 2048, - 3072, - 4096, - 8192, - 12288, - 16384, - 32768, - 49152, - 65536, - 131072, - 196608, - 262144, - 524288, - 786432, - 1_048_576, - 2_097_152, - 3_145_728, - 4_194_304, - 8_388_608, - 12_582_912, - 16_777_216, - 25_165_824, - 33_554_432 }; - - public static unsafe void Run() - { - Console.WriteLine("=== HLSF Allocator Single-Thread Performance Benchmark ==="); - Console.WriteLine($"Arena size: {ArenaBytes / (1024 * 1024)} MiB (env override: HLSF_ARENA_MB)"); - - - Console.WriteLine(); - Console.WriteLine("[1] Allocation throughput (no touch)"); - using (HybridLayerSegregatedFitAllocator allocator = new HybridLayerSegregatedFitAllocator((nuint)ArenaBytes)) - { - Warmup(allocator); - - foreach (uint sz in SizeSweep) - { - uint size = sz > MaxAllocSize ? MaxAllocSize : sz; - BenchAllocThroughput(allocator, size, touch:false); - allocator.Collect(); - GC.Collect(); - GC.WaitForPendingFinalizers(); - } - } - - Console.WriteLine(); - Console.WriteLine("[2] Allocation throughput (touch first byte)"); - using (HybridLayerSegregatedFitAllocator allocator = new HybridLayerSegregatedFitAllocator((nuint)ArenaBytes)) - { - Warmup(allocator); - - foreach (uint sz in SizeSweep) - { - uint size = sz > MaxAllocSize ? MaxAllocSize : sz; - BenchAllocThroughput(allocator, size, touch:true); - allocator.Collect(); - GC.Collect(); - GC.WaitForPendingFinalizers(); - } - } - Console.WriteLine(); - using (HybridLayerSegregatedFitAllocator allocator = new HybridLayerSegregatedFitAllocator((nuint)ArenaBytes)) - { - Warmup(allocator); - - Console.WriteLine("[3] Free throughput after pre-allocation (256k blocks of 1KB)"); - BenchFreeThroughput(allocator, 256 * 1024, 1024); - allocator.Collect(); - } - Console.WriteLine(); - Console.WriteLine("[4] Alloc+Immediate Free pairs (5,000,000 x 256B)"); - using (HybridLayerSegregatedFitAllocator allocator = new HybridLayerSegregatedFitAllocator((nuint)ArenaBytes)) - { - Warmup(allocator); - - BenchAllocFreePairs(allocator, 5_000_000, 256); - allocator.Collect(); - } - Console.WriteLine(); - Console.WriteLine("[5] Fragmentation cycle (allocate ~1024MB random, free half, reallocate)"); - using (HybridLayerSegregatedFitAllocator allocator = new HybridLayerSegregatedFitAllocator((nuint)ArenaBytes)) - { - Warmup(allocator); - - BenchFragmentationCycle(allocator, 512); // target within 500MB arena - allocator.Collect(); - } - Console.WriteLine(); - Console.WriteLine("=== Benchmark Complete ==="); - } - - private static void BenchAllocFreePairs(HybridLayerSegregatedFitAllocator allocator, int pairs, uint blockSize) - { - Stopwatch sw = Stopwatch.StartNew(); - for (int i = 0; i < pairs; i++) - { - HybridLayerSegregatedFitAllocationHandle h = allocator.Alloc(blockSize); - allocator.Free(h); - } - sw.Stop(); - double opsPerSec = pairs / sw.Elapsed.TotalSeconds; - - // Left align and widen columns - Console.WriteLine($" size={Fmt(blockSize),-12} pairs={pairs,-12} alloc+free/s={opsPerSec,-16:0.0}"); - } - - private static void BenchAllocThroughput( - HybridLayerSegregatedFitAllocator allocator, - uint blockSize, - bool touch) - { - ulong budget = ArenaBytes / 2; // use half arena for test - if (blockSize == 0) { - return; - } - - long ops = (long)(budget / blockSize); - ops = Math.Min(ops, blockSize >= (4 * 1024 * 1024) ? 2048 : 2_000_000); - if (ops <= 0) { - return; - } - - List list = new List((int)ops); - Stopwatch sw = Stopwatch.StartNew(); - for (long i = 0; i < ops; i++) - { - HybridLayerSegregatedFitAllocationHandle h = allocator.Alloc(blockSize); - if (touch) - { - Span span = h.BufferHandle; - if (!span.IsEmpty) { - span[0] = (byte)(i & 0xFF); - } - } - list.Add(h); - - // Console.WriteLine(i); - } - sw.Stop(); - double allocOpsPerSec = ops / sw.Elapsed.TotalSeconds; - foreach (HybridLayerSegregatedFitAllocationHandle h in list) { - allocator.Free(h); - } - - // Left align and widen columns - Console.WriteLine($" size={Fmt(blockSize),-12} ops={ops,-12} alloc/s={allocOpsPerSec,-16:0.0} touch={touch,-5}"); - } - - private static void BenchFragmentationCycle(HybridLayerSegregatedFitAllocator allocator, int targetMiB) - { - int targetBytes = targetMiB * 1024 * 1024; - Random rng = new Random(123); - List live = new List(128 * 1024); - long allocated = 0; - Stopwatch swA = Stopwatch.StartNew(); - while (allocated < targetBytes) - { - uint sz = PickSize(rng); - HybridLayerSegregatedFitAllocationHandle h = allocator.Alloc(sz); - live.Add(h); - allocated += sz; - } - swA.Stop(); - Console.WriteLine($" phaseA alloc {targetMiB}MB in {swA.Elapsed.TotalSeconds:0.00}s blocks={live.Count}"); - - Stopwatch swB = Stopwatch.StartNew(); - int freed = 0; - for (int i = live.Count - 1; i >= 0; i -= 2) - { - allocator.Free(live[i]); - live.RemoveAt(i); - freed++; - } - swB.Stop(); - Console.WriteLine($" phaseB freed {freed} in {swB.Elapsed.TotalSeconds:0.00}s remain={live.Count}"); - - allocated = 0; - int reCount = 0; - Stopwatch swC = Stopwatch.StartNew(); - while (allocated < targetBytes / 2) - { - uint sz = PickSize(rng); - HybridLayerSegregatedFitAllocationHandle h = allocator.Alloc(sz); - live.Add(h); - allocated += sz; - reCount++; - } - swC.Stop(); - Console.WriteLine($" phaseC re-alloc {reCount} in {swC.Elapsed.TotalSeconds:0.00}s ~{allocated / (1024.0 * 1024.0):0}MB"); - - Stopwatch swD = Stopwatch.StartNew(); - foreach (HybridLayerSegregatedFitAllocationHandle h in live) { - allocator.Free(h); - } - - swD.Stop(); - Console.WriteLine($" cleanup freed {live.Count} in {swD.Elapsed.TotalSeconds:0.00}s"); - } - - private static void BenchFreeThroughput(HybridLayerSegregatedFitAllocator allocator, int count, uint blockSize) - { - List list = new List(count); - for (int i = 0; i < count; i++) { - list.Add(allocator.Alloc(blockSize)); - } - - Stopwatch sw = Stopwatch.StartNew(); - for (int i = 0; i < count; i++) { - allocator.Free(list[i]); - } - - sw.Stop(); - double freesPerSec = count / sw.Elapsed.TotalSeconds; - - // Left align and widen columns - Console.WriteLine($" size={Fmt(blockSize),-12} count={count,-12} free/s={freesPerSec,-16:0.0}"); - } - - private static string Fmt(uint bytes) - { - if (bytes >= 1024 * 1024) { - return $"{bytes / (1024 * 1024)}MB"; - } - - if (bytes >= 1024) { - return $"{bytes / 1024}KB"; - } - - return $"{bytes}B"; - } - - private static uint PickSize(Random rng) - { - uint raw = SizeSweep[rng.Next(SizeSweep.Length)]; - return raw > MaxAllocSize ? MaxAllocSize : raw; - } - - private static void Warmup(HybridLayerSegregatedFitAllocator allocator) - { - List tmp = new List(4096); - for (int i = 0; i < 4096; i++) { - tmp.Add(allocator.Alloc(256)); - } - - foreach (HybridLayerSegregatedFitAllocationHandle h in tmp) { - allocator.Free(h); - } - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="HlsfStressTest" +// 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.Mathematics.Memory; +using System; +using System.Collections.Generic; +using System.Diagnostics; + +namespace StgSharp +{ + internal static class HlsfStressTest + { + + private const uint MaxAllocSize = 32 * 1024 * 1024; // 32MB documented cap + + // Allow overriding arena size via env HLSF_ARENA_MB (must be >=64MB) + private static readonly ulong ArenaBytes = Environment.GetEnvironmentVariable("HLSF_ARENA_MB") is string mbStr && + int.TryParse(mbStr, out int mb) && + mb >= 64 ? + (ulong)mb * 1024UL * 1024UL : + 3UL * 1024UL * 1024UL * 1024UL; // lower default to 512MB + + private static readonly uint[] SizeSweep = { + 64, + 128, + 192, + 256, + 512, + 768, + 1024, + 2048, + 3072, + 4096, + 8192, + 12288, + 16384, + 32768, + 49152, + 65536, + 131072, + 196608, + 262144, + 524288, + 786432, + 1_048_576, + 2_097_152, + 3_145_728, + 4_194_304, + 8_388_608, + 12_582_912, + 16_777_216, + 25_165_824, + 33_554_432 }; + + public static unsafe void Run() + { + Console.WriteLine("=== HLSF Allocator Single-Thread Performance Benchmark ==="); + Console.WriteLine($"Arena size: {ArenaBytes / (1024 * 1024)} MiB (env override: HLSF_ARENA_MB)"); + + + Console.WriteLine(); + Console.WriteLine("[1] Allocation throughput (no touch)"); + using (HybridLayerSegregatedFitAllocator allocator = new HybridLayerSegregatedFitAllocator((nuint)ArenaBytes)) + { + Warmup(allocator); + + foreach (uint sz in SizeSweep) + { + uint size = sz > MaxAllocSize ? MaxAllocSize : sz; + BenchAllocThroughput(allocator, size, touch:false); + allocator.Collect(); + GC.Collect(); + GC.WaitForPendingFinalizers(); + } + } + + Console.WriteLine(); + Console.WriteLine("[2] Allocation throughput (touch first byte)"); + using (HybridLayerSegregatedFitAllocator allocator = new HybridLayerSegregatedFitAllocator((nuint)ArenaBytes)) + { + Warmup(allocator); + + foreach (uint sz in SizeSweep) + { + uint size = sz > MaxAllocSize ? MaxAllocSize : sz; + BenchAllocThroughput(allocator, size, touch:true); + allocator.Collect(); + GC.Collect(); + GC.WaitForPendingFinalizers(); + } + } + Console.WriteLine(); + using (HybridLayerSegregatedFitAllocator allocator = new HybridLayerSegregatedFitAllocator((nuint)ArenaBytes)) + { + Warmup(allocator); + + Console.WriteLine("[3] Free throughput after pre-allocation (256k blocks of 1KB)"); + BenchFreeThroughput(allocator, 256 * 1024, 1024); + allocator.Collect(); + } + Console.WriteLine(); + Console.WriteLine("[4] Alloc+Immediate Free pairs (5,000,000 x 256B)"); + using (HybridLayerSegregatedFitAllocator allocator = new HybridLayerSegregatedFitAllocator((nuint)ArenaBytes)) + { + Warmup(allocator); + + BenchAllocFreePairs(allocator, 5_000_000, 256); + allocator.Collect(); + } + Console.WriteLine(); + Console.WriteLine("[5] Fragmentation cycle (allocate ~1024MB random, free half, reallocate)"); + using (HybridLayerSegregatedFitAllocator allocator = new HybridLayerSegregatedFitAllocator((nuint)ArenaBytes)) + { + Warmup(allocator); + + BenchFragmentationCycle(allocator, 512); // target within 500MB arena + allocator.Collect(); + } + Console.WriteLine(); + Console.WriteLine("=== Benchmark Complete ==="); + } + + private static void BenchAllocFreePairs(HybridLayerSegregatedFitAllocator allocator, int pairs, uint blockSize) + { + Stopwatch sw = Stopwatch.StartNew(); + for (int i = 0; i < pairs; i++) + { + HybridLayerSegregatedFitAllocationHandle h = allocator.Alloc(blockSize); + allocator.Free(h); + } + sw.Stop(); + double opsPerSec = pairs / sw.Elapsed.TotalSeconds; + + // Left align and widen columns + Console.WriteLine($" size={Fmt(blockSize),-12} pairs={pairs,-12} alloc+free/s={opsPerSec,-16:0.0}"); + } + + private static void BenchAllocThroughput( + HybridLayerSegregatedFitAllocator allocator, + uint blockSize, + bool touch) + { + ulong budget = ArenaBytes / 2; // use half arena for test + if (blockSize == 0) { + return; + } + + long ops = (long)(budget / blockSize); + ops = Math.Min(ops, blockSize >= (4 * 1024 * 1024) ? 2048 : 2_000_000); + if (ops <= 0) { + return; + } + + List list = new List((int)ops); + Stopwatch sw = Stopwatch.StartNew(); + for (long i = 0; i < ops; i++) + { + HybridLayerSegregatedFitAllocationHandle h = allocator.Alloc(blockSize); + if (touch) + { + Span span = h.BufferHandle; + if (!span.IsEmpty) { + span[0] = (byte)(i & 0xFF); + } + } + list.Add(h); + + // Console.WriteLine(i); + } + sw.Stop(); + double allocOpsPerSec = ops / sw.Elapsed.TotalSeconds; + foreach (HybridLayerSegregatedFitAllocationHandle h in list) { + allocator.Free(h); + } + + // Left align and widen columns + Console.WriteLine($" size={Fmt(blockSize),-12} ops={ops,-12} alloc/s={allocOpsPerSec,-16:0.0} touch={touch,-5}"); + } + + private static void BenchFragmentationCycle(HybridLayerSegregatedFitAllocator allocator, int targetMiB) + { + int targetBytes = targetMiB * 1024 * 1024; + Random rng = new Random(123); + List live = new List(128 * 1024); + long allocated = 0; + Stopwatch swA = Stopwatch.StartNew(); + while (allocated < targetBytes) + { + uint sz = PickSize(rng); + HybridLayerSegregatedFitAllocationHandle h = allocator.Alloc(sz); + live.Add(h); + allocated += sz; + } + swA.Stop(); + Console.WriteLine($" phaseA alloc {targetMiB}MB in {swA.Elapsed.TotalSeconds:0.00}s blocks={live.Count}"); + + Stopwatch swB = Stopwatch.StartNew(); + int freed = 0; + for (int i = live.Count - 1; i >= 0; i -= 2) + { + allocator.Free(live[i]); + live.RemoveAt(i); + freed++; + } + swB.Stop(); + Console.WriteLine($" phaseB freed {freed} in {swB.Elapsed.TotalSeconds:0.00}s remain={live.Count}"); + + allocated = 0; + int reCount = 0; + Stopwatch swC = Stopwatch.StartNew(); + while (allocated < targetBytes / 2) + { + uint sz = PickSize(rng); + HybridLayerSegregatedFitAllocationHandle h = allocator.Alloc(sz); + live.Add(h); + allocated += sz; + reCount++; + } + swC.Stop(); + Console.WriteLine($" phaseC re-alloc {reCount} in {swC.Elapsed.TotalSeconds:0.00}s ~{allocated / (1024.0 * 1024.0):0}MB"); + + Stopwatch swD = Stopwatch.StartNew(); + foreach (HybridLayerSegregatedFitAllocationHandle h in live) { + allocator.Free(h); + } + + swD.Stop(); + Console.WriteLine($" cleanup freed {live.Count} in {swD.Elapsed.TotalSeconds:0.00}s"); + } + + private static void BenchFreeThroughput(HybridLayerSegregatedFitAllocator allocator, int count, uint blockSize) + { + List list = new List(count); + for (int i = 0; i < count; i++) { + list.Add(allocator.Alloc(blockSize)); + } + + Stopwatch sw = Stopwatch.StartNew(); + for (int i = 0; i < count; i++) { + allocator.Free(list[i]); + } + + sw.Stop(); + double freesPerSec = count / sw.Elapsed.TotalSeconds; + + // Left align and widen columns + Console.WriteLine($" size={Fmt(blockSize),-12} count={count,-12} free/s={freesPerSec,-16:0.0}"); + } + + private static string Fmt(uint bytes) + { + if (bytes >= 1024 * 1024) { + return $"{bytes / (1024 * 1024)}MB"; + } + + if (bytes >= 1024) { + return $"{bytes / 1024}KB"; + } + + return $"{bytes}B"; + } + + private static uint PickSize(Random rng) + { + uint raw = SizeSweep[rng.Next(SizeSweep.Length)]; + return raw > MaxAllocSize ? MaxAllocSize : raw; + } + + private static void Warmup(HybridLayerSegregatedFitAllocator allocator) + { + List tmp = new List(4096); + for (int i = 0; i < 4096; i++) { + tmp.Add(allocator.Alloc(256)); + } + + foreach (HybridLayerSegregatedFitAllocationHandle h in tmp) { + allocator.Free(h); + } + } + + } +} diff --git a/StgSharpDebug/MatrixTest.cs b/StgSharpDebug/MatrixTest.cs index dc5ca60c..231666d0 100644 --- a/StgSharpDebug/MatrixTest.cs +++ b/StgSharpDebug/MatrixTest.cs @@ -1,108 +1,108 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="MatrixTest" -// 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.Memory; -using StgSharp.Mathematics.Numeric; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Numerics; -using System.Text; -using System.Threading.Tasks; - -using T = float; - -namespace StgSharp -{ - internal static partial class Program - { - - private const long size = 1024L * 1024L * 1024L * 4L; - - private static int sideLength = 1000; - - internal static unsafe void TestMatrix( - ) - { - // TestRender(); - /**/ - HybridLayerSegregatedFitAllocator hlsf; - unchecked { - hlsf = new((nuint)size, 32, size); - } - Matrix m = Matrix.Create(sideLength, sideLength, MatrixLayout.DenseRectangle, - hlsf); - - // MatrixCompute.Fill(m, 1.0f); - Matrix n = Matrix.Create(sideLength, sideLength, MatrixLayout.DenseRectangle, - hlsf); - - // MatrixCompute.Fill(n, 1.0f); - Matrix p = Matrix.Create(sideLength, sideLength, MatrixLayout.DenseRectangle, - hlsf); - - // MatrixCompute.Fill(p, 0.0f); - - /* - for (int j = 0; j < 20; j++) - { - for (int k = 0; k < 10; k++) { - Console.Write($"{m[j, k]:0.0E+00}\t"); - } - Console.WriteLine(); - } - - /**/ - Console.WriteLine("==================================================="); - - // MatrixCompute.Mul(n, m, p); - /**/ - for (int i = 0; i < 20; i++) - { - if (i % 4 == 0) { - Console.WriteLine(); - } - for (int j = 0; j < 20; j++) - { - string extra = j % 4 == 3 ? " " : ","; - T value = p[j, i]; - - // value = T.Abs(value) < 1e-6 ? 0 : value; - - // Console.Write($"{p.GetElementOffset(j,i)}{extra}"); - - Console.Write($"{value:000}{extra}"); - } - Console.WriteLine(); - } - Console.WriteLine("==================================================="); - - /**/ - } - - } +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="MatrixTest" +// 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.Memory; +using StgSharp.Mathematics.Numeric; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; + +using T = float; + +namespace StgSharp +{ + internal static partial class Program + { + + private const long size = 1024L * 1024L * 1024L * 4L; + + private static int sideLength = 1000; + + internal static unsafe void TestMatrix( + ) + { + // TestRender(); + /**/ + HybridLayerSegregatedFitAllocator hlsf; + unchecked { + hlsf = new((nuint)size, 32, size); + } + Matrix m = Matrix.Create(sideLength, sideLength, MatrixLayout.DenseRectangle, + hlsf); + + // MatrixCompute.Fill(m, 1.0f); + Matrix n = Matrix.Create(sideLength, sideLength, MatrixLayout.DenseRectangle, + hlsf); + + // MatrixCompute.Fill(n, 1.0f); + Matrix p = Matrix.Create(sideLength, sideLength, MatrixLayout.DenseRectangle, + hlsf); + + // MatrixCompute.Fill(p, 0.0f); + + /* + for (int j = 0; j < 20; j++) + { + for (int k = 0; k < 10; k++) { + Console.Write($"{m[j, k]:0.0E+00}\t"); + } + Console.WriteLine(); + } + + /**/ + Console.WriteLine("==================================================="); + + // MatrixCompute.Mul(n, m, p); + /**/ + for (int i = 0; i < 20; i++) + { + if (i % 4 == 0) { + Console.WriteLine(); + } + for (int j = 0; j < 20; j++) + { + string extra = j % 4 == 3 ? " " : ","; + T value = p[j, i]; + + // value = T.Abs(value) < 1e-6 ? 0 : value; + + // Console.Write($"{p.GetElementOffset(j,i)}{extra}"); + + Console.Write($"{value:000}{extra}"); + } + Console.WriteLine(); + } + Console.WriteLine("==================================================="); + + /**/ + } + + } } \ No newline at end of file diff --git a/StgSharpDebug/Program.cs b/StgSharpDebug/Program.cs index e7dd8528..01ef6adb 100644 --- a/StgSharpDebug/Program.cs +++ b/StgSharpDebug/Program.cs @@ -1,79 +1,79 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="Program" -// 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.Common.Timing; -using StgSharp.Graphics; -using StgSharp.Internal; -using StgSharp.Mathematics; -using StgSharp.Mathematics.Memory; -using StgSharp.Mathematics.Numeric; -using StgSharp.Timing; - -namespace StgSharp -{ - internal static partial class Program - { - - private static string testExpPath = @"D:\Programmer\stepcode\data\ap203\ap203.exp"; - - internal static unsafe void Main(string[] args) - { - try - { - World.Initialize().UseModule().UseModule().InitializeModule(); - - // TestRegexAnalyse.Run(); - - // HlsfStressTest.Run(); - TestSwiss(); - - // TestMatrix(); - - - /* - } - catch (Exception ex) - { - Console.WriteLine(ex); - Console.ReadLine(); - /* - World.WriteLog($"{ex}", LogType.Error); - Dialogue.PostError(ex); - /**/ - - // World.Terminate(-1); - /**/ - } - finally - { - World.Terminate(0); - } - /**/ - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="Program" +// 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.Common.Timing; +using StgSharp.Graphics; +using StgSharp.Internal; +using StgSharp.Mathematics; +using StgSharp.Mathematics.Memory; +using StgSharp.Mathematics.Numeric; +using StgSharp.Timing; + +namespace StgSharp +{ + internal static partial class Program + { + + private static string testExpPath = @"D:\Programmer\stepcode\data\ap203\ap203.exp"; + + internal static unsafe void Main(string[] args) + { + try + { + World.Initialize().UseModule().UseModule().InitializeModule(); + + // TestRegexAnalyse.Run(); + + // HlsfStressTest.Run(); + TestSwiss(); + + // TestMatrix(); + + + /* + } + catch (Exception ex) + { + Console.WriteLine(ex); + Console.ReadLine(); + /* + World.WriteLog($"{ex}", LogType.Error); + Dialogue.PostError(ex); + /**/ + + // World.Terminate(-1); + /**/ + } + finally + { + World.Terminate(0); + } + /**/ + } + + } +} diff --git a/StgSharpDebug/Properties/launchSettings.json b/StgSharpDebug/Properties/launchSettings.json index a86a0436..e5f4064d 100644 --- a/StgSharpDebug/Properties/launchSettings.json +++ b/StgSharpDebug/Properties/launchSettings.json @@ -1,9 +1,9 @@ -{ - "profiles": { - "StgSharpDebug": { - "commandName": "Project", - "nativeDebugging": true, - "hotReloadEnabled": false - } - } +{ + "profiles": { + "StgSharpDebug": { + "commandName": "Project", + "nativeDebugging": true, + "hotReloadEnabled": false + } + } } \ No newline at end of file diff --git a/StgSharpDebug/RenderStream/Partical.cs b/StgSharpDebug/RenderStream/Partical.cs index 1d791f3a..8091aeb6 100644 --- a/StgSharpDebug/RenderStream/Partical.cs +++ b/StgSharpDebug/RenderStream/Partical.cs @@ -1,411 +1,411 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="Partical" -// 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.Graphics.OpenGL; -using StgSharp.Mathematics; -using StgSharp.Mathematics.Graphics; -using StgSharp.Timing; - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp -{ - public class ParticleRenderStream : glRender - { - - private AutoTextureGL autoT; - - private ElementBuffer ebo; - private ElementBuffer f_ebo; - private FrameBuffer fbo; - private Image i; - - private int temp = 0; - private PlainInstancingBuffer buffer; - private RenderBuffer rbo; - private ShaderProgram frameMainShader; - private ShaderProgram s; - private TextureGL f_t; - private TextureGL t; - private Uniform texUniform; - private Uniform time; - private VertexArray f_vao; - private VertexArray vao; - - private VertexBuffer f_vbo; - private VertexBuffer vbo; - - public ParticleRenderStream() { } - - public override bool IsContextSharable => true; - - public Rectangle ButtonBounding { get; private set; } - - public TextureProvider ButtonTextureProvider { get; private set; } - - // render a controlling item - public void ButtonMain( - IEnumerable items - ) - { - // Console.WriteLine("Render Button Itself"); - - GL.BindFrameBuffer(FrameBufferTarget.All, GlHandle.Zero); /*GL.Assert(true);/**/ - GL.ClearColor(0.4f, TimePassed % 1.0f, 0f, 1.0f); /*GL.Assert(true);/**/ - GL.Clear(MaskBufferBit.COLOR /**/ | MaskBufferBit.DEPTH/**/); /*GL.Assert(true);/**/ - - f_vao.Bind(0); //GL.Assert(true); - - foreach (PlainGeometryMesh mesh in items) - { - // autoT.SelectTextureAndBind(mesh.TextureImage); - f_t.LoadTexture(0, mesh.TextureImage); - - // GL.Assert(true); - - frameMainShader.Use(); //GL.Assert(true); - - GL.DrawElements(GeometryType.TRIANGLES, 6, TypeCode.UInt32, IntPtr.Zero); - } - - // GL.ClearError(); - // GL.Assert(true); - } - - public void Main() - { - temp++; - - // GL.ClearError(); - GL.Viewport(0, 0, Width, Height); - - // Console.Clear(); - buffer.UpdateAllParticles(); - - // Console.WriteLine(GL.CheckFrameBufferStatus(FrameBufferTarget.All)); - - fbo.Bind(0); //GL.Assert(true); - vao.Bind(0); //GL.Assert(true); - t.Bind2D(0); //GL.Assert(false); - - GL.Viewport(0, 0, Width, Height); - - /**/ - - GL.TextureImage2d(Texture2DTarget.Texture2D, 0, ImageChannel.WithAlphaChannel, - Width, Height, ImageChannel.WithAlphaChannel, - PixelChannelLayout.Byte, null); - /**/ - - // GL.Assert(false); - // Console.WriteLine(GL.CheckFrameBufferStatus(FrameBufferTarget.All)); - - GL.ClearColor((0.6f + TimePassed) % 1.0f, 0.1f, 0.3f, 1); - - // GL.Assert( false ); - - // Console.WriteLine(GL.CheckFrameBufferStatus(FrameBufferTarget.All)); - GL.Clear(MaskBufferBit.COLOR /**/ | MaskBufferBit.DEPTH/**/); - - - // GL.Assert(false); - - vbo.Bind(1); - vbo.WriteVectorData(1, buffer.CoordAndRotationSpan, BufferUsage.StreamDraw); - - - s.Use(); - NativeCamera.SetAllUniforms(); - GL.SetUniformValue(time, TimePassed); - - GL.DrawElementsInstanced(GeometryType.TRIANGLES, 6, TypeCode.UInt32, IntPtr.Zero, 100); - - // Console.WriteLine(TimePassed); - // GL.Assert(true); - - GL.WaitAccomplishment(); - GL.BindVertexArray(GlHandle.Zero); - /**/ - - // GL.Assert(true); - - ImageHelper.Resize(i, Width, Height, ImageMovement.Discard); - - // GL.ClearError(); - // Console.Write($"Size set to {Height},{Width}"); - // Console.WriteLine($"Image resized to {i.Height} {i.Width}"); - GL.GetTextureImage(Texture2DTarget.Texture2D, 0, ImageChannel.WithAlphaChannel, - PixelChannelLayout.Byte, i.PixelBuffer); - /* - for (int num = 0; num < i.PixelBuffer.Length; num+=10000) - { - Console.Write($"{i.PixelBuffer[num]}\t"); - } - /**/ - - // GL.Assert(true); - // Array.Fill(i.PixelBuffer, 24); - - GL.BindFrameBuffer(FrameBufferTarget.All, GlHandle.Zero); - - // GL.Assert(true); - /**/ - } - - public void NothingMain() - { - GL.ClearError(); - - // GL.BindFrameBuffer(FrameBufferTarget.All, GlHandle.Zero); - GL.ClearColor(0.5f, 0.2f, 0.3f, 1.0f); - GL.Assert(false); - } - - /* - public void RenderButton( - ButtonStatus status, - float statusBegin, - in TextureProvider provider - ) - { - provider.UpdateFromImage(i); - } - /**/ - internal static Vec3 DefaultRotation( - TimeSpanProvider provider, - out float rotation - ) - { - rotation = 1.0f / 60; - float angle = (float)provider.CurrentSecond * 2; - return (new Vec3(MathF.Cos(angle), MathF.Sin(angle), - 0)) * rotation; - } - - protected override void CustomizeDeinit() { } - - protected override void CustomizeInit() - { - // GL.ClearError(); - // GL.Assert(true); - - buffer = new PlainInstancingBuffer(); - for (int i = 0; i < 10; i++) - { - float ai = MathF.Abs(i - 5.0f); - for (int t = 0; t < 10; t++) - { - float at = MathF.Abs(t - 5.0f); - - ParticleOnPlain p = new ParticleOnPlain(buffer); - ((IInstancing)p).Coord = new Vec3( - (((-5) + i) * 0.2f) + 0.1f, (((-5) + t) * 0.2f) + 0.1f, 0); - ((IInstancing)p).Scale = - float.Min(i, t) * 0.15f; - ((IInstancing)p).Motion = new GeometryMotion( - true, TimeProvider, DefaultRotation); - } - } - - // GL.Assert(true); - - // SetSizeLimit(800, 800, 800, 800); - - s = CreateShaderProgram(); - frameMainShader = CreateShaderProgram(); - Shader pvs = CreateShaderSegment(ShaderType.Vertex, 2); - Shader pfs = CreateShaderSegment(ShaderType.Fragment, 2); - - // GL.Assert(true); - pvs.Compile(0, Shader.FromCodeFile("Shader\\particle.vert")); - - // GL.Assert(true); - pvs.AttachTo(0, s); - - // GL.Assert(true); - pfs.Compile(0, Shader.FromCodeFile("Shader\\particle.frag")); - pfs.AttachTo(0, s); - s.Link(); - - // GL.Assert(true); - - pvs.Compile(1, Shader.FromCodeFile("Shader\\fbo.vert")); - pvs.AttachTo(1, frameMainShader); - pfs.Compile(1, Shader.FromCodeFile("Shader\\fbo.frag")); - pfs.AttachTo(1, frameMainShader); - frameMainShader.Link(); - - // GL.Assert(true); - vbo = CreateVertexBuffer(3); - vao = CreateVertexArray(1); - ebo = CreateElementBuffer(1); - vbo.Bind(0); - - Rectangle rec = new Rectangle(0.05f, 0.05f, 0.05f, -0.05f, -0.05f, -0.05f, -0.05f, - 0.05f); - - // GL.Assert(true); - vao.Bind(0); - vbo.WriteVectorData(0, rec.VertexStream, BufferUsage.StaticDraw); - ebo.SetValue(0, rec.VertexIndices, BufferUsage.StaticDraw); - vao.SetVertexAttribute(0, 3, TypeCode.Single, false, 4 * sizeof(float), 0); - - vbo.WriteVectorData(1, buffer.CoordAndRotationSpan, BufferUsage.StreamDraw); - vao.SetVertexAttribute(1, 3, TypeCode.Single, false, 4 * sizeof(float), 0); - vao.SetVertexAttribute(2, 1, TypeCode.Single, false, 4 * sizeof(float), - 3 * sizeof(float)); - - GL.VertexAttributeDivisor(1, 1); - GL.VertexAttributeDivisor(2, 1); - - vbo.WriteScalerData(2, buffer.ScalingSpan, BufferUsage.StaticDraw); - vao.SetVertexAttribute(3, 1, TypeCode.Single, false, sizeof(float), 0); - - GL.VertexAttributeDivisor(3, 1); - - vbo.Unbind(); - GL.BindVertexArray(GlHandle.Zero); - - NativeCameraViewTarget([ - 0f, - 0f, - -100f - ], [ - 0f, - 0f, - 0f - ], [ - 0f, - 1f, - 0f - ]); - NativeCameraViewRange(new Degree(1.5f), Vec2.Zero, (50, 50)); - NativeCameraUniform(s, "Camera"); - - s.Use(); - - fbo = CreateFrameBuffer(1); - rbo = CreateRenderBuffer(1); - fbo.Bind(0); - rbo.Bind(0); - - // GL.Assert(true); - t = CreateTexture(1); - t.Bind2D(0); - GL.TextureImage2d(Texture2DTarget.Texture2D, 0, ImageChannel.WithAlphaChannel, - Width, Height, ImageChannel.WithAlphaChannel, - PixelChannelLayout.Byte, null!); - t.Set2dWrapProperty(0, TextureWrap.Repeat, TextureWrap.Repeat); - t.Set2dFilterProperty(0, TextureFilter.Linear, TextureFilter.Linear); - - // GL.Assert(true); - GL.FrameBufferTexture2d(FrameBufferTarget.All, glAttachment.Color(0), - Texture2DTarget.Texture2D, t[0], 0); - - GL.SetRenderBufferStorage(RenderBufferInternalFormat.Depth24_Stencil8, this.Size); - GL.CombineFrameBufferRenderBuffer(FrameBufferAttachment.DepthAndStencil, rbo[0]); - - Console.WriteLine(GL.CheckFrameBufferStatus(FrameBufferTarget.All)); - - FrameBuffer.BindNull(); - - // GL.Assert(true); - int streamLength = this.Width * this.Height * 4; - byte[] imageStream = new byte[streamLength]; - i = Image.FromMemory(this.Size, ImageChannel.WithAlphaChannel, imageStream); - - - time = s.GetUniform("time"); - - Vec2[] buttonTextureCoordArray = { - (0f, 1f), - (1f, 1f), - (1f, 0f), - (0f, 0f) - }; - ButtonBounding = new Rectangle(-0.9f, 0.9f, 0.9f, 0.9f, 0.9f, -0.9f, -0.9f, -0.9f); - - // GL.Assert(true); - ButtonTextureProvider = new TextureProvider(i, buttonTextureCoordArray); - - f_vao = CreateVertexArray(1); - f_vbo = CreateVertexBuffer(2); - f_ebo = CreateElementBuffer(1); - - // GL.Assert(true); - f_vao.Bind(0); - - f_ebo.Bind(0); - f_ebo.SetValue(0, ButtonBounding.VertexIndices, BufferUsage.StaticDraw); - - // GL.Assert(true); - f_vbo.Bind(0); - f_vbo.WriteVectorData(0, ButtonBounding.VertexStream, BufferUsage.StaticDraw); - f_vao.SetVertexAttribute(0, 3, TypeCode.Single, false, 4 * sizeof(float), 0); - - // GL.Assert(true); - f_vbo.Bind(1); - f_vbo.WriteVectorData(1, buttonTextureCoordArray, BufferUsage.StaticDraw); - f_vao.SetVertexAttribute(1, 3, TypeCode.Single, false, 4 * sizeof(float), 0); - - // GL.Assert(true); - - autoT = CreateAutoTexture(4); - autoT.DefaultTextureProperty = new TextureProperty(TextureFilter.Nearest, - TextureFilter.Nearest, - TextureWrap.Repeat, - TextureWrap.Repeat); - - f_t = CreateTexture(1); - f_t.Bind2D(0); - f_t.Set2dWrapProperty(0, TextureWrap.Repeat, TextureWrap.Repeat); - f_t.Set2dFilterProperty(0, TextureFilter.Nearest, TextureFilter.Nearest); - - // GL.Assert(true); - f_t.ActivateAs(TextureUnit.Unit1); - - // GL.Assert(true); - frameMainShader.Use(); - texUniform = frameMainShader.GetUniform("tex"); - - // GL.Assert(true); - GL.SetUniformValue(texUniform, 1); - - // GL.Assert(true); - - GL.ClearError(); - GL.Assert(true); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="Partical" +// 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.Graphics.OpenGL; +using StgSharp.Mathematics; +using StgSharp.Mathematics.Graphics; +using StgSharp.Timing; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp +{ + public class ParticleRenderStream : glRender + { + + private AutoTextureGL autoT; + + private ElementBuffer ebo; + private ElementBuffer f_ebo; + private FrameBuffer fbo; + private Image i; + + private int temp = 0; + private PlainInstancingBuffer buffer; + private RenderBuffer rbo; + private ShaderProgram frameMainShader; + private ShaderProgram s; + private TextureGL f_t; + private TextureGL t; + private Uniform texUniform; + private Uniform time; + private VertexArray f_vao; + private VertexArray vao; + + private VertexBuffer f_vbo; + private VertexBuffer vbo; + + public ParticleRenderStream() { } + + public override bool IsContextSharable => true; + + public Rectangle ButtonBounding { get; private set; } + + public TextureProvider ButtonTextureProvider { get; private set; } + + // render a controlling item + public void ButtonMain( + IEnumerable items + ) + { + // Console.WriteLine("Render Button Itself"); + + GL.BindFrameBuffer(FrameBufferTarget.All, GlHandle.Zero); /*GL.Assert(true);/**/ + GL.ClearColor(0.4f, TimePassed % 1.0f, 0f, 1.0f); /*GL.Assert(true);/**/ + GL.Clear(MaskBufferBit.COLOR /**/ | MaskBufferBit.DEPTH/**/); /*GL.Assert(true);/**/ + + f_vao.Bind(0); //GL.Assert(true); + + foreach (PlainGeometryMesh mesh in items) + { + // autoT.SelectTextureAndBind(mesh.TextureImage); + f_t.LoadTexture(0, mesh.TextureImage); + + // GL.Assert(true); + + frameMainShader.Use(); //GL.Assert(true); + + GL.DrawElements(GeometryType.TRIANGLES, 6, TypeCode.UInt32, IntPtr.Zero); + } + + // GL.ClearError(); + // GL.Assert(true); + } + + public void Main() + { + temp++; + + // GL.ClearError(); + GL.Viewport(0, 0, Width, Height); + + // Console.Clear(); + buffer.UpdateAllParticles(); + + // Console.WriteLine(GL.CheckFrameBufferStatus(FrameBufferTarget.All)); + + fbo.Bind(0); //GL.Assert(true); + vao.Bind(0); //GL.Assert(true); + t.Bind2D(0); //GL.Assert(false); + + GL.Viewport(0, 0, Width, Height); + + /**/ + + GL.TextureImage2d(Texture2DTarget.Texture2D, 0, ImageChannel.WithAlphaChannel, + Width, Height, ImageChannel.WithAlphaChannel, + PixelChannelLayout.Byte, null); + /**/ + + // GL.Assert(false); + // Console.WriteLine(GL.CheckFrameBufferStatus(FrameBufferTarget.All)); + + GL.ClearColor((0.6f + TimePassed) % 1.0f, 0.1f, 0.3f, 1); + + // GL.Assert( false ); + + // Console.WriteLine(GL.CheckFrameBufferStatus(FrameBufferTarget.All)); + GL.Clear(MaskBufferBit.COLOR /**/ | MaskBufferBit.DEPTH/**/); + + + // GL.Assert(false); + + vbo.Bind(1); + vbo.WriteVectorData(1, buffer.CoordAndRotationSpan, BufferUsage.StreamDraw); + + + s.Use(); + NativeCamera.SetAllUniforms(); + GL.SetUniformValue(time, TimePassed); + + GL.DrawElementsInstanced(GeometryType.TRIANGLES, 6, TypeCode.UInt32, IntPtr.Zero, 100); + + // Console.WriteLine(TimePassed); + // GL.Assert(true); + + GL.WaitAccomplishment(); + GL.BindVertexArray(GlHandle.Zero); + /**/ + + // GL.Assert(true); + + ImageHelper.Resize(i, Width, Height, ImageMovement.Discard); + + // GL.ClearError(); + // Console.Write($"Size set to {Height},{Width}"); + // Console.WriteLine($"Image resized to {i.Height} {i.Width}"); + GL.GetTextureImage(Texture2DTarget.Texture2D, 0, ImageChannel.WithAlphaChannel, + PixelChannelLayout.Byte, i.PixelBuffer); + /* + for (int num = 0; num < i.PixelBuffer.Length; num+=10000) + { + Console.Write($"{i.PixelBuffer[num]}\t"); + } + /**/ + + // GL.Assert(true); + // Array.Fill(i.PixelBuffer, 24); + + GL.BindFrameBuffer(FrameBufferTarget.All, GlHandle.Zero); + + // GL.Assert(true); + /**/ + } + + public void NothingMain() + { + GL.ClearError(); + + // GL.BindFrameBuffer(FrameBufferTarget.All, GlHandle.Zero); + GL.ClearColor(0.5f, 0.2f, 0.3f, 1.0f); + GL.Assert(false); + } + + /* + public void RenderButton( + ButtonStatus status, + float statusBegin, + in TextureProvider provider + ) + { + provider.UpdateFromImage(i); + } + /**/ + internal static Vec3 DefaultRotation( + TimeSpanProvider provider, + out float rotation + ) + { + rotation = 1.0f / 60; + float angle = (float)provider.CurrentSecond * 2; + return (new Vec3(MathF.Cos(angle), MathF.Sin(angle), + 0)) * rotation; + } + + protected override void CustomizeDeinit() { } + + protected override void CustomizeInit() + { + // GL.ClearError(); + // GL.Assert(true); + + buffer = new PlainInstancingBuffer(); + for (int i = 0; i < 10; i++) + { + float ai = MathF.Abs(i - 5.0f); + for (int t = 0; t < 10; t++) + { + float at = MathF.Abs(t - 5.0f); + + ParticleOnPlain p = new ParticleOnPlain(buffer); + ((IInstancing)p).Coord = new Vec3( + (((-5) + i) * 0.2f) + 0.1f, (((-5) + t) * 0.2f) + 0.1f, 0); + ((IInstancing)p).Scale = + float.Min(i, t) * 0.15f; + ((IInstancing)p).Motion = new GeometryMotion( + true, TimeProvider, DefaultRotation); + } + } + + // GL.Assert(true); + + // SetSizeLimit(800, 800, 800, 800); + + s = CreateShaderProgram(); + frameMainShader = CreateShaderProgram(); + Shader pvs = CreateShaderSegment(ShaderType.Vertex, 2); + Shader pfs = CreateShaderSegment(ShaderType.Fragment, 2); + + // GL.Assert(true); + pvs.Compile(0, Shader.FromCodeFile("Shader\\particle.vert")); + + // GL.Assert(true); + pvs.AttachTo(0, s); + + // GL.Assert(true); + pfs.Compile(0, Shader.FromCodeFile("Shader\\particle.frag")); + pfs.AttachTo(0, s); + s.Link(); + + // GL.Assert(true); + + pvs.Compile(1, Shader.FromCodeFile("Shader\\fbo.vert")); + pvs.AttachTo(1, frameMainShader); + pfs.Compile(1, Shader.FromCodeFile("Shader\\fbo.frag")); + pfs.AttachTo(1, frameMainShader); + frameMainShader.Link(); + + // GL.Assert(true); + vbo = CreateVertexBuffer(3); + vao = CreateVertexArray(1); + ebo = CreateElementBuffer(1); + vbo.Bind(0); + + Rectangle rec = new Rectangle(0.05f, 0.05f, 0.05f, -0.05f, -0.05f, -0.05f, -0.05f, + 0.05f); + + // GL.Assert(true); + vao.Bind(0); + vbo.WriteVectorData(0, rec.VertexStream, BufferUsage.StaticDraw); + ebo.SetValue(0, rec.VertexIndices, BufferUsage.StaticDraw); + vao.SetVertexAttribute(0, 3, TypeCode.Single, false, 4 * sizeof(float), 0); + + vbo.WriteVectorData(1, buffer.CoordAndRotationSpan, BufferUsage.StreamDraw); + vao.SetVertexAttribute(1, 3, TypeCode.Single, false, 4 * sizeof(float), 0); + vao.SetVertexAttribute(2, 1, TypeCode.Single, false, 4 * sizeof(float), + 3 * sizeof(float)); + + GL.VertexAttributeDivisor(1, 1); + GL.VertexAttributeDivisor(2, 1); + + vbo.WriteScalerData(2, buffer.ScalingSpan, BufferUsage.StaticDraw); + vao.SetVertexAttribute(3, 1, TypeCode.Single, false, sizeof(float), 0); + + GL.VertexAttributeDivisor(3, 1); + + vbo.Unbind(); + GL.BindVertexArray(GlHandle.Zero); + + NativeCameraViewTarget([ + 0f, + 0f, + -100f + ], [ + 0f, + 0f, + 0f + ], [ + 0f, + 1f, + 0f + ]); + NativeCameraViewRange(new Degree(1.5f), Vec2.Zero, (50, 50)); + NativeCameraUniform(s, "Camera"); + + s.Use(); + + fbo = CreateFrameBuffer(1); + rbo = CreateRenderBuffer(1); + fbo.Bind(0); + rbo.Bind(0); + + // GL.Assert(true); + t = CreateTexture(1); + t.Bind2D(0); + GL.TextureImage2d(Texture2DTarget.Texture2D, 0, ImageChannel.WithAlphaChannel, + Width, Height, ImageChannel.WithAlphaChannel, + PixelChannelLayout.Byte, null!); + t.Set2dWrapProperty(0, TextureWrap.Repeat, TextureWrap.Repeat); + t.Set2dFilterProperty(0, TextureFilter.Linear, TextureFilter.Linear); + + // GL.Assert(true); + GL.FrameBufferTexture2d(FrameBufferTarget.All, glAttachment.Color(0), + Texture2DTarget.Texture2D, t[0], 0); + + GL.SetRenderBufferStorage(RenderBufferInternalFormat.Depth24_Stencil8, this.Size); + GL.CombineFrameBufferRenderBuffer(FrameBufferAttachment.DepthAndStencil, rbo[0]); + + Console.WriteLine(GL.CheckFrameBufferStatus(FrameBufferTarget.All)); + + FrameBuffer.BindNull(); + + // GL.Assert(true); + int streamLength = this.Width * this.Height * 4; + byte[] imageStream = new byte[streamLength]; + i = Image.FromMemory(this.Size, ImageChannel.WithAlphaChannel, imageStream); + + + time = s.GetUniform("time"); + + Vec2[] buttonTextureCoordArray = { + (0f, 1f), + (1f, 1f), + (1f, 0f), + (0f, 0f) + }; + ButtonBounding = new Rectangle(-0.9f, 0.9f, 0.9f, 0.9f, 0.9f, -0.9f, -0.9f, -0.9f); + + // GL.Assert(true); + ButtonTextureProvider = new TextureProvider(i, buttonTextureCoordArray); + + f_vao = CreateVertexArray(1); + f_vbo = CreateVertexBuffer(2); + f_ebo = CreateElementBuffer(1); + + // GL.Assert(true); + f_vao.Bind(0); + + f_ebo.Bind(0); + f_ebo.SetValue(0, ButtonBounding.VertexIndices, BufferUsage.StaticDraw); + + // GL.Assert(true); + f_vbo.Bind(0); + f_vbo.WriteVectorData(0, ButtonBounding.VertexStream, BufferUsage.StaticDraw); + f_vao.SetVertexAttribute(0, 3, TypeCode.Single, false, 4 * sizeof(float), 0); + + // GL.Assert(true); + f_vbo.Bind(1); + f_vbo.WriteVectorData(1, buttonTextureCoordArray, BufferUsage.StaticDraw); + f_vao.SetVertexAttribute(1, 3, TypeCode.Single, false, 4 * sizeof(float), 0); + + // GL.Assert(true); + + autoT = CreateAutoTexture(4); + autoT.DefaultTextureProperty = new TextureProperty(TextureFilter.Nearest, + TextureFilter.Nearest, + TextureWrap.Repeat, + TextureWrap.Repeat); + + f_t = CreateTexture(1); + f_t.Bind2D(0); + f_t.Set2dWrapProperty(0, TextureWrap.Repeat, TextureWrap.Repeat); + f_t.Set2dFilterProperty(0, TextureFilter.Nearest, TextureFilter.Nearest); + + // GL.Assert(true); + f_t.ActivateAs(TextureUnit.Unit1); + + // GL.Assert(true); + frameMainShader.Use(); + texUniform = frameMainShader.GetUniform("tex"); + + // GL.Assert(true); + GL.SetUniformValue(texUniform, 1); + + // GL.Assert(true); + + GL.ClearError(); + GL.Assert(true); + } + + } +} diff --git a/StgSharpDebug/SlabStressTest.cs b/StgSharpDebug/SlabStressTest.cs index 39af0c55..ff4f3303 100644 --- a/StgSharpDebug/SlabStressTest.cs +++ b/StgSharpDebug/SlabStressTest.cs @@ -1,82 +1,82 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="SlabStressTest" -// 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.Mathematics.Memory; -using System; -using System.Diagnostics; - -namespace StgSharp -{ - internal static class SlabStressTest - { - - // Exercise the Nonconcurrent Chunked SLAB used by HLSF (allocation/free only) - public static unsafe void Run() - { - Console.WriteLine("=== SLAB Allocator (Chunked) Single-Thread Stress Test ==="); - - // Use SLAB with element size of pointer (nuint) to simulate Entry handles - SlabAllocator slab = SlabAllocator.Create(64, SlabBufferLayout.Chunked, false); - - int cycles = 10; - int allocsPerCycle = 200_000; // large enough to force internal growth - - Stopwatch sw = new Stopwatch(); - - for (int c = 0; c < cycles; c++) - { - Console.WriteLine($"--- Cycle {c+1} ---"); - nuint[] ptrs = new nuint[allocsPerCycle]; - - sw.Restart(); - for (int i = 0; i < allocsPerCycle; i++) { - ptrs[i] = slab.Allocate(); - } - sw.Stop(); - Console.WriteLine($"Allocate: {allocsPerCycle} in {sw.Elapsed.TotalSeconds:0.00}s"); - - sw.Restart(); - for (int i = 0; i < allocsPerCycle; i++) { - slab.Free(ptrs[i]); - } - sw.Stop(); - Console.WriteLine($"Free: {allocsPerCycle} in {sw.Elapsed.TotalSeconds:0.00}s"); - } - - slab.Dispose(); - Console.WriteLine("=== SLAB Stress Complete ==="); - } - - internal unsafe struct BunchOfBytes - { - - public fixed byte Data[128]; - - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="SlabStressTest" +// 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.Mathematics.Memory; +using System; +using System.Diagnostics; + +namespace StgSharp +{ + internal static class SlabStressTest + { + + // Exercise the Nonconcurrent Chunked SLAB used by HLSF (allocation/free only) + public static unsafe void Run() + { + Console.WriteLine("=== SLAB Allocator (Chunked) Single-Thread Stress Test ==="); + + // Use SLAB with element size of pointer (nuint) to simulate Entry handles + SlabAllocator slab = SlabAllocator.Create(64, SlabBufferLayout.Chunked, false); + + int cycles = 10; + int allocsPerCycle = 200_000; // large enough to force internal growth + + Stopwatch sw = new Stopwatch(); + + for (int c = 0; c < cycles; c++) + { + Console.WriteLine($"--- Cycle {c+1} ---"); + nuint[] ptrs = new nuint[allocsPerCycle]; + + sw.Restart(); + for (int i = 0; i < allocsPerCycle; i++) { + ptrs[i] = slab.Allocate(); + } + sw.Stop(); + Console.WriteLine($"Allocate: {allocsPerCycle} in {sw.Elapsed.TotalSeconds:0.00}s"); + + sw.Restart(); + for (int i = 0; i < allocsPerCycle; i++) { + slab.Free(ptrs[i]); + } + sw.Stop(); + Console.WriteLine($"Free: {allocsPerCycle} in {sw.Elapsed.TotalSeconds:0.00}s"); + } + + slab.Dispose(); + Console.WriteLine("=== SLAB Stress Complete ==="); + } + + internal unsafe struct BunchOfBytes + { + + public fixed byte Data[128]; + + } + + } +} diff --git a/StgSharpDebug/StgSharpDebug.csproj b/StgSharpDebug/StgSharpDebug.csproj index 7ad41b90..2d246d0d 100644 --- a/StgSharpDebug/StgSharpDebug.csproj +++ b/StgSharpDebug/StgSharpDebug.csproj @@ -1,21 +1,21 @@ - - - - Exe - - - - - - - - - - - - - - - - - + + + + Exe + + + + + + + + + + + + + + + + + diff --git a/StgSharpDebug/TestRender.cs b/StgSharpDebug/TestRender.cs index 3f8ad4ee..32e8694d 100644 --- a/StgSharpDebug/TestRender.cs +++ b/StgSharpDebug/TestRender.cs @@ -1,62 +1,62 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="TestRender.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.Collections; -using StgSharp.Graphics; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp -{ - internal static partial class Program - { - - public static void TestRender() - { - // World.InitGL(4, 6); - World.GlobalSetting.VSyncActivated = false; - - ViewPort vp = new ViewPort(800, 600, "Hello StgSharp!", IntPtr.Zero); - - // throw new NotImplementedException(); - /* - ViewModelBase mainModel = new ViewModelMain(vp); - mainModel.CreateAndBindView("MainView", (1, 1, 1)); - - mainModel.UseViewModel("MainView"); - /**/ - World.Terminate(0); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="TestRender.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.Collections; +using StgSharp.Graphics; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp +{ + internal static partial class Program + { + + public static void TestRender() + { + // World.InitGL(4, 6); + World.GlobalSetting.VSyncActivated = false; + + ViewPort vp = new ViewPort(800, 600, "Hello StgSharp!", IntPtr.Zero); + + // throw new NotImplementedException(); + /* + ViewModelBase mainModel = new ViewModelMain(vp); + mainModel.CreateAndBindView("MainView", (1, 1, 1)); + + mainModel.UseViewModel("MainView"); + /**/ + World.Terminate(0); + } + + } +} diff --git a/StgSharpDebug/TestSwiss.cs b/StgSharpDebug/TestSwiss.cs index 2d0df795..97321077 100644 --- a/StgSharpDebug/TestSwiss.cs +++ b/StgSharpDebug/TestSwiss.cs @@ -1,66 +1,66 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="TestSwiss" -// 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Security.Cryptography.X509Certificates; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp -{ - internal static partial class Program - { - - public static void TestSwiss() - { - SwissTable swiss = SwissTable.Create(); - for (int i = 0; i < 5000; i++) - { - Console.Write($"Set {i}: "); - _ = swiss.TryAddOrSet(i, i * 2, out _); - Console.WriteLine($"Set a kvp of ({i},{i * 2})"); - } - Random rand = new Random(); - for (int i = 0; i < 100; i++) - { - Console.Write($"Get {i}: "); - int key = rand.Next(4000, 5000); - if (swiss.TryGet(key, out nint value)) - { - Console.WriteLine($"Success in get a kvp of ({key},{value})"); - } else - { - Console.WriteLine($"Failed to get a kvp of ({key},?)"); - } - } - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="TestSwiss" +// 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 System; +using System.Collections.Generic; +using System.Linq; +using System.Security.Cryptography.X509Certificates; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp +{ + internal static partial class Program + { + + public static void TestSwiss() + { + SwissTable swiss = SwissTable.Create(); + for (int i = 0; i < 5000; i++) + { + Console.Write($"Set {i}: "); + _ = swiss.TryAddOrSet(i, i * 2, out _); + Console.WriteLine($"Set a kvp of ({i},{i * 2})"); + } + Random rand = new Random(); + for (int i = 0; i < 100; i++) + { + Console.Write($"Get {i}: "); + int key = rand.Next(4000, 5000); + if (swiss.TryGet(key, out nint value)) + { + Console.WriteLine($"Success in get a kvp of ({key},{value})"); + } else + { + Console.WriteLine($"Failed to get a kvp of ({key},?)"); + } + } + } + + } +} diff --git a/StgSharpDebug/hlsf-test.cs b/StgSharpDebug/hlsf-test.cs index 88785b00..528c1097 100644 --- a/StgSharpDebug/hlsf-test.cs +++ b/StgSharpDebug/hlsf-test.cs @@ -1,84 +1,84 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="hlsf-test" -// 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.Mathematics.Memory; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp -{ - internal partial class Program - { - - public static void TestHlsf() - { - // HLSF test arena - Console.WriteLine( - "=== HLSF (Hybrid Layer Segregated Fit Allocator) Single-threaded Stress Test ===\n"); - HybridLayerSegregatedFitAllocator hlsfAllocator = new HybridLayerSegregatedFitAllocator(1024 * 1024 * 1024); - - // === 简洁交替测试:100次alloc与100次free交替进行,直到触发异常或达到最大循环 === - Console.WriteLine("\n=== 简洁交替测试:100次alloc + 100次free 交替 ==="); - - int maxRounds = 10000; // 可调整 - uint[] sizes = { - 64u, - 128u, - 256u, - 512u, - 1024u }; - Random rnd = new Random(42); - for (int round = 1; round <= maxRounds; round++) - { - // 100 次分配 - List batch = new List(100); - for (int i = 0; i < 100; i++) - { - uint sz = sizes[rnd.Next(sizes.Length)]; - batch.Add(hlsfAllocator.Alloc(sz)); - Console.WriteLine($"alloced:{i}"); - } - - // 100 次释放(逆序) - for (int i = batch.Count - 1; i >= 0; i--) - { - hlsfAllocator.Free(batch[i]); - Console.WriteLine($"freed:{i}"); - } - if (round % 100 == 0) { - Console.WriteLine($"[交替测试] 已完成 {round} 轮 100alloc+100free"); - } - } - Console.WriteLine("[交替测试] 正常结束,无异常触发"); - } - - } -} +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="hlsf-test" +// 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.Mathematics.Memory; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp +{ + internal partial class Program + { + + public static void TestHlsf() + { + // HLSF test arena + Console.WriteLine( + "=== HLSF (Hybrid Layer Segregated Fit Allocator) Single-threaded Stress Test ===\n"); + HybridLayerSegregatedFitAllocator hlsfAllocator = new HybridLayerSegregatedFitAllocator(1024 * 1024 * 1024); + + // === 简洁交替测试:100次alloc与100次free交替进行,直到触发异常或达到最大循环 === + Console.WriteLine("\n=== 简洁交替测试:100次alloc + 100次free 交替 ==="); + + int maxRounds = 10000; // 可调整 + uint[] sizes = { + 64u, + 128u, + 256u, + 512u, + 1024u }; + Random rnd = new Random(42); + for (int round = 1; round <= maxRounds; round++) + { + // 100 次分配 + List batch = new List(100); + for (int i = 0; i < 100; i++) + { + uint sz = sizes[rnd.Next(sizes.Length)]; + batch.Add(hlsfAllocator.Alloc(sz)); + Console.WriteLine($"alloced:{i}"); + } + + // 100 次释放(逆序) + for (int i = batch.Count - 1; i >= 0; i--) + { + hlsfAllocator.Free(batch[i]); + Console.WriteLine($"freed:{i}"); + } + if (round % 100 == 0) { + Console.WriteLine($"[交替测试] 已完成 {round} 轮 100alloc+100free"); + } + } + Console.WriteLine("[交替测试] 正常结束,无异常触发"); + } + + } +} diff --git a/StgSharpDevelop.sln b/StgSharpDevelop.sln index f31b20af..941862be 100644 --- a/StgSharpDevelop.sln +++ b/StgSharpDevelop.sln @@ -1,162 +1,162 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 18 -VisualStudioVersion = 18.3.11520.95 d18.3 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StgSharp.Common", "StgSharp.Common\StgSharp.Common.csproj", "{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}" - ProjectSection(ProjectDependencies) = postProject - {20CBFF26-6746-402E-992C-7B643E9423EB} = {20CBFF26-6746-402E-992C-7B643E9423EB} - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StgSharpDebug", "StgSharpDebug\StgSharpDebug.csproj", "{610B992B-BB34-49C3-9993-676C595FC12E}" - ProjectSection(ProjectDependencies) = postProject - {10B5819F-2A62-41B6-980A-EB9E76A0E95C} = {10B5819F-2A62-41B6-980A-EB9E76A0E95C} - {20CBFF26-6746-402E-992C-7B643E9423EB} = {20CBFF26-6746-402E-992C-7B643E9423EB} - {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF} = {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF} - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StgSharp.Benchmark", "StgSharp.Benchmark\StgSharp.Benchmark.csproj", "{0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StgSharp.Native", "StgSharp.Native\StgSharp.Native.vcxproj", "{20CBFF26-6746-402E-992C-7B643E9423EB}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{0961B2BE-415C-45EA-8607-5B83623B2EF7}" - ProjectSection(SolutionItems) = preProject - .editorconfig = .editorconfig - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StgSharp.TerminalDialogue", "StgSharp.TerminalDialogue\StgSharp.TerminalDialogue.csproj", "{10B5819F-2A62-41B6-980A-EB9E76A0E95C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StgSharp.Model", "StgSharp.Model\StgSharp.Model.csproj", "{D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StgSharp.Mathematics", "StgSharp.Mathematics\StgSharp.Mathematics.csproj", "{9946599F-4D34-440F-840D-F9443D5AEFAA}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StgSharp.RegularAnalysis", "StgSharp.RegularAnalysis\StgSharp.RegularAnalysis.csproj", "{46339874-C6B8-4361-997E-2E30387E51F9}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StgSharp.Graphics", "StgSharp.Graphics\StgSharp.Graphics.csproj", "{80CD3DDE-0642-451D-82DF-0DE422FC6E34}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|ARM64 = Debug|ARM64 - Debug|x64 = Debug|x64 - PerformanceDebug|ARM64 = PerformanceDebug|ARM64 - PerformanceDebug|x64 = PerformanceDebug|x64 - Release|ARM64 = Release|ARM64 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Debug|ARM64.Build.0 = Debug|ARM64 - {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Debug|x64.ActiveCfg = Debug|x64 - {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Debug|x64.Build.0 = Debug|x64 - {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64 - {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64 - {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64 - {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64 - {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Release|ARM64.ActiveCfg = Release|ARM64 - {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Release|ARM64.Build.0 = Release|ARM64 - {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Release|x64.ActiveCfg = Release|x64 - {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Release|x64.Build.0 = Release|x64 - {610B992B-BB34-49C3-9993-676C595FC12E}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {610B992B-BB34-49C3-9993-676C595FC12E}.Debug|ARM64.Build.0 = Debug|ARM64 - {610B992B-BB34-49C3-9993-676C595FC12E}.Debug|x64.ActiveCfg = Debug|x64 - {610B992B-BB34-49C3-9993-676C595FC12E}.Debug|x64.Build.0 = Debug|x64 - {610B992B-BB34-49C3-9993-676C595FC12E}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64 - {610B992B-BB34-49C3-9993-676C595FC12E}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64 - {610B992B-BB34-49C3-9993-676C595FC12E}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64 - {610B992B-BB34-49C3-9993-676C595FC12E}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64 - {610B992B-BB34-49C3-9993-676C595FC12E}.Release|ARM64.ActiveCfg = Release|ARM64 - {610B992B-BB34-49C3-9993-676C595FC12E}.Release|ARM64.Build.0 = Release|ARM64 - {610B992B-BB34-49C3-9993-676C595FC12E}.Release|x64.ActiveCfg = Release|x64 - {610B992B-BB34-49C3-9993-676C595FC12E}.Release|x64.Build.0 = Release|x64 - {0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.Debug|ARM64.Build.0 = Debug|ARM64 - {0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.Debug|x64.ActiveCfg = Debug|x64 - {0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.Debug|x64.Build.0 = Debug|x64 - {0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64 - {0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64 - {0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64 - {0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64 - {0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.Release|ARM64.ActiveCfg = Release|ARM64 - {0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.Release|ARM64.Build.0 = Release|ARM64 - {0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.Release|x64.ActiveCfg = Release|x64 - {0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.Release|x64.Build.0 = Release|x64 - {20CBFF26-6746-402E-992C-7B643E9423EB}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {20CBFF26-6746-402E-992C-7B643E9423EB}.Debug|ARM64.Build.0 = Debug|ARM64 - {20CBFF26-6746-402E-992C-7B643E9423EB}.Debug|x64.ActiveCfg = Debug|x64 - {20CBFF26-6746-402E-992C-7B643E9423EB}.Debug|x64.Build.0 = Debug|x64 - {20CBFF26-6746-402E-992C-7B643E9423EB}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64 - {20CBFF26-6746-402E-992C-7B643E9423EB}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64 - {20CBFF26-6746-402E-992C-7B643E9423EB}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64 - {20CBFF26-6746-402E-992C-7B643E9423EB}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64 - {20CBFF26-6746-402E-992C-7B643E9423EB}.Release|ARM64.ActiveCfg = Release|ARM64 - {20CBFF26-6746-402E-992C-7B643E9423EB}.Release|ARM64.Build.0 = Release|ARM64 - {20CBFF26-6746-402E-992C-7B643E9423EB}.Release|x64.ActiveCfg = Release|x64 - {20CBFF26-6746-402E-992C-7B643E9423EB}.Release|x64.Build.0 = Release|x64 - {10B5819F-2A62-41B6-980A-EB9E76A0E95C}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {10B5819F-2A62-41B6-980A-EB9E76A0E95C}.Debug|ARM64.Build.0 = Debug|ARM64 - {10B5819F-2A62-41B6-980A-EB9E76A0E95C}.Debug|x64.ActiveCfg = Debug|x64 - {10B5819F-2A62-41B6-980A-EB9E76A0E95C}.Debug|x64.Build.0 = Debug|x64 - {10B5819F-2A62-41B6-980A-EB9E76A0E95C}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64 - {10B5819F-2A62-41B6-980A-EB9E76A0E95C}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64 - {10B5819F-2A62-41B6-980A-EB9E76A0E95C}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64 - {10B5819F-2A62-41B6-980A-EB9E76A0E95C}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64 - {10B5819F-2A62-41B6-980A-EB9E76A0E95C}.Release|ARM64.ActiveCfg = Release|ARM64 - {10B5819F-2A62-41B6-980A-EB9E76A0E95C}.Release|ARM64.Build.0 = Release|ARM64 - {10B5819F-2A62-41B6-980A-EB9E76A0E95C}.Release|x64.ActiveCfg = Release|x64 - {10B5819F-2A62-41B6-980A-EB9E76A0E95C}.Release|x64.Build.0 = Release|x64 - {D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.Debug|ARM64.Build.0 = Debug|ARM64 - {D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.Debug|x64.ActiveCfg = Debug|x64 - {D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.Debug|x64.Build.0 = Debug|x64 - {D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64 - {D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64 - {D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64 - {D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64 - {D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.Release|ARM64.ActiveCfg = Release|ARM64 - {D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.Release|ARM64.Build.0 = Release|ARM64 - {D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.Release|x64.ActiveCfg = Release|x64 - {D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.Release|x64.Build.0 = Release|x64 - {9946599F-4D34-440F-840D-F9443D5AEFAA}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {9946599F-4D34-440F-840D-F9443D5AEFAA}.Debug|ARM64.Build.0 = Debug|ARM64 - {9946599F-4D34-440F-840D-F9443D5AEFAA}.Debug|x64.ActiveCfg = Debug|x64 - {9946599F-4D34-440F-840D-F9443D5AEFAA}.Debug|x64.Build.0 = Debug|x64 - {9946599F-4D34-440F-840D-F9443D5AEFAA}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64 - {9946599F-4D34-440F-840D-F9443D5AEFAA}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64 - {9946599F-4D34-440F-840D-F9443D5AEFAA}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64 - {9946599F-4D34-440F-840D-F9443D5AEFAA}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64 - {9946599F-4D34-440F-840D-F9443D5AEFAA}.Release|ARM64.ActiveCfg = Release|ARM64 - {9946599F-4D34-440F-840D-F9443D5AEFAA}.Release|ARM64.Build.0 = Release|ARM64 - {9946599F-4D34-440F-840D-F9443D5AEFAA}.Release|x64.ActiveCfg = Release|x64 - {9946599F-4D34-440F-840D-F9443D5AEFAA}.Release|x64.Build.0 = Release|x64 - {46339874-C6B8-4361-997E-2E30387E51F9}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {46339874-C6B8-4361-997E-2E30387E51F9}.Debug|ARM64.Build.0 = Debug|ARM64 - {46339874-C6B8-4361-997E-2E30387E51F9}.Debug|x64.ActiveCfg = Debug|x64 - {46339874-C6B8-4361-997E-2E30387E51F9}.Debug|x64.Build.0 = Debug|x64 - {46339874-C6B8-4361-997E-2E30387E51F9}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64 - {46339874-C6B8-4361-997E-2E30387E51F9}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64 - {46339874-C6B8-4361-997E-2E30387E51F9}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64 - {46339874-C6B8-4361-997E-2E30387E51F9}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64 - {46339874-C6B8-4361-997E-2E30387E51F9}.Release|ARM64.ActiveCfg = Release|ARM64 - {46339874-C6B8-4361-997E-2E30387E51F9}.Release|ARM64.Build.0 = Release|ARM64 - {46339874-C6B8-4361-997E-2E30387E51F9}.Release|x64.ActiveCfg = Release|x64 - {46339874-C6B8-4361-997E-2E30387E51F9}.Release|x64.Build.0 = Release|x64 - {80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Debug|ARM64.Build.0 = Debug|ARM64 - {80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Debug|x64.ActiveCfg = Debug|x64 - {80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Debug|x64.Build.0 = Debug|x64 - {80CD3DDE-0642-451D-82DF-0DE422FC6E34}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64 - {80CD3DDE-0642-451D-82DF-0DE422FC6E34}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64 - {80CD3DDE-0642-451D-82DF-0DE422FC6E34}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64 - {80CD3DDE-0642-451D-82DF-0DE422FC6E34}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64 - {80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Release|ARM64.ActiveCfg = Release|ARM64 - {80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Release|ARM64.Build.0 = Release|ARM64 - {80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Release|x64.ActiveCfg = Release|x64 - {80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {E13615C2-4C8D-4072-95A1-124440983818} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 18 +VisualStudioVersion = 18.3.11520.95 d18.3 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StgSharp.Common", "StgSharp.Common\StgSharp.Common.csproj", "{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}" + ProjectSection(ProjectDependencies) = postProject + {20CBFF26-6746-402E-992C-7B643E9423EB} = {20CBFF26-6746-402E-992C-7B643E9423EB} + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StgSharpDebug", "StgSharpDebug\StgSharpDebug.csproj", "{610B992B-BB34-49C3-9993-676C595FC12E}" + ProjectSection(ProjectDependencies) = postProject + {10B5819F-2A62-41B6-980A-EB9E76A0E95C} = {10B5819F-2A62-41B6-980A-EB9E76A0E95C} + {20CBFF26-6746-402E-992C-7B643E9423EB} = {20CBFF26-6746-402E-992C-7B643E9423EB} + {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF} = {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF} + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StgSharp.Benchmark", "StgSharp.Benchmark\StgSharp.Benchmark.csproj", "{0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StgSharp.Native", "StgSharp.Native\StgSharp.Native.vcxproj", "{20CBFF26-6746-402E-992C-7B643E9423EB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{0961B2BE-415C-45EA-8607-5B83623B2EF7}" + ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StgSharp.TerminalDialogue", "StgSharp.TerminalDialogue\StgSharp.TerminalDialogue.csproj", "{10B5819F-2A62-41B6-980A-EB9E76A0E95C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StgSharp.Model", "StgSharp.Model\StgSharp.Model.csproj", "{D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StgSharp.Mathematics", "StgSharp.Mathematics\StgSharp.Mathematics.csproj", "{9946599F-4D34-440F-840D-F9443D5AEFAA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StgSharp.RegularAnalysis", "StgSharp.RegularAnalysis\StgSharp.RegularAnalysis.csproj", "{46339874-C6B8-4361-997E-2E30387E51F9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StgSharp.Graphics", "StgSharp.Graphics\StgSharp.Graphics.csproj", "{80CD3DDE-0642-451D-82DF-0DE422FC6E34}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM64 = Debug|ARM64 + Debug|x64 = Debug|x64 + PerformanceDebug|ARM64 = PerformanceDebug|ARM64 + PerformanceDebug|x64 = PerformanceDebug|x64 + Release|ARM64 = Release|ARM64 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Debug|ARM64.Build.0 = Debug|ARM64 + {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Debug|x64.ActiveCfg = Debug|x64 + {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Debug|x64.Build.0 = Debug|x64 + {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64 + {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64 + {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64 + {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64 + {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Release|ARM64.ActiveCfg = Release|ARM64 + {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Release|ARM64.Build.0 = Release|ARM64 + {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Release|x64.ActiveCfg = Release|x64 + {3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Release|x64.Build.0 = Release|x64 + {610B992B-BB34-49C3-9993-676C595FC12E}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {610B992B-BB34-49C3-9993-676C595FC12E}.Debug|ARM64.Build.0 = Debug|ARM64 + {610B992B-BB34-49C3-9993-676C595FC12E}.Debug|x64.ActiveCfg = Debug|x64 + {610B992B-BB34-49C3-9993-676C595FC12E}.Debug|x64.Build.0 = Debug|x64 + {610B992B-BB34-49C3-9993-676C595FC12E}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64 + {610B992B-BB34-49C3-9993-676C595FC12E}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64 + {610B992B-BB34-49C3-9993-676C595FC12E}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64 + {610B992B-BB34-49C3-9993-676C595FC12E}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64 + {610B992B-BB34-49C3-9993-676C595FC12E}.Release|ARM64.ActiveCfg = Release|ARM64 + {610B992B-BB34-49C3-9993-676C595FC12E}.Release|ARM64.Build.0 = Release|ARM64 + {610B992B-BB34-49C3-9993-676C595FC12E}.Release|x64.ActiveCfg = Release|x64 + {610B992B-BB34-49C3-9993-676C595FC12E}.Release|x64.Build.0 = Release|x64 + {0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.Debug|ARM64.Build.0 = Debug|ARM64 + {0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.Debug|x64.ActiveCfg = Debug|x64 + {0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.Debug|x64.Build.0 = Debug|x64 + {0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64 + {0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64 + {0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64 + {0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64 + {0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.Release|ARM64.ActiveCfg = Release|ARM64 + {0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.Release|ARM64.Build.0 = Release|ARM64 + {0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.Release|x64.ActiveCfg = Release|x64 + {0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.Release|x64.Build.0 = Release|x64 + {20CBFF26-6746-402E-992C-7B643E9423EB}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {20CBFF26-6746-402E-992C-7B643E9423EB}.Debug|ARM64.Build.0 = Debug|ARM64 + {20CBFF26-6746-402E-992C-7B643E9423EB}.Debug|x64.ActiveCfg = Debug|x64 + {20CBFF26-6746-402E-992C-7B643E9423EB}.Debug|x64.Build.0 = Debug|x64 + {20CBFF26-6746-402E-992C-7B643E9423EB}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64 + {20CBFF26-6746-402E-992C-7B643E9423EB}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64 + {20CBFF26-6746-402E-992C-7B643E9423EB}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64 + {20CBFF26-6746-402E-992C-7B643E9423EB}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64 + {20CBFF26-6746-402E-992C-7B643E9423EB}.Release|ARM64.ActiveCfg = Release|ARM64 + {20CBFF26-6746-402E-992C-7B643E9423EB}.Release|ARM64.Build.0 = Release|ARM64 + {20CBFF26-6746-402E-992C-7B643E9423EB}.Release|x64.ActiveCfg = Release|x64 + {20CBFF26-6746-402E-992C-7B643E9423EB}.Release|x64.Build.0 = Release|x64 + {10B5819F-2A62-41B6-980A-EB9E76A0E95C}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {10B5819F-2A62-41B6-980A-EB9E76A0E95C}.Debug|ARM64.Build.0 = Debug|ARM64 + {10B5819F-2A62-41B6-980A-EB9E76A0E95C}.Debug|x64.ActiveCfg = Debug|x64 + {10B5819F-2A62-41B6-980A-EB9E76A0E95C}.Debug|x64.Build.0 = Debug|x64 + {10B5819F-2A62-41B6-980A-EB9E76A0E95C}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64 + {10B5819F-2A62-41B6-980A-EB9E76A0E95C}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64 + {10B5819F-2A62-41B6-980A-EB9E76A0E95C}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64 + {10B5819F-2A62-41B6-980A-EB9E76A0E95C}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64 + {10B5819F-2A62-41B6-980A-EB9E76A0E95C}.Release|ARM64.ActiveCfg = Release|ARM64 + {10B5819F-2A62-41B6-980A-EB9E76A0E95C}.Release|ARM64.Build.0 = Release|ARM64 + {10B5819F-2A62-41B6-980A-EB9E76A0E95C}.Release|x64.ActiveCfg = Release|x64 + {10B5819F-2A62-41B6-980A-EB9E76A0E95C}.Release|x64.Build.0 = Release|x64 + {D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.Debug|ARM64.Build.0 = Debug|ARM64 + {D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.Debug|x64.ActiveCfg = Debug|x64 + {D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.Debug|x64.Build.0 = Debug|x64 + {D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64 + {D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64 + {D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64 + {D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64 + {D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.Release|ARM64.ActiveCfg = Release|ARM64 + {D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.Release|ARM64.Build.0 = Release|ARM64 + {D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.Release|x64.ActiveCfg = Release|x64 + {D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.Release|x64.Build.0 = Release|x64 + {9946599F-4D34-440F-840D-F9443D5AEFAA}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {9946599F-4D34-440F-840D-F9443D5AEFAA}.Debug|ARM64.Build.0 = Debug|ARM64 + {9946599F-4D34-440F-840D-F9443D5AEFAA}.Debug|x64.ActiveCfg = Debug|x64 + {9946599F-4D34-440F-840D-F9443D5AEFAA}.Debug|x64.Build.0 = Debug|x64 + {9946599F-4D34-440F-840D-F9443D5AEFAA}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64 + {9946599F-4D34-440F-840D-F9443D5AEFAA}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64 + {9946599F-4D34-440F-840D-F9443D5AEFAA}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64 + {9946599F-4D34-440F-840D-F9443D5AEFAA}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64 + {9946599F-4D34-440F-840D-F9443D5AEFAA}.Release|ARM64.ActiveCfg = Release|ARM64 + {9946599F-4D34-440F-840D-F9443D5AEFAA}.Release|ARM64.Build.0 = Release|ARM64 + {9946599F-4D34-440F-840D-F9443D5AEFAA}.Release|x64.ActiveCfg = Release|x64 + {9946599F-4D34-440F-840D-F9443D5AEFAA}.Release|x64.Build.0 = Release|x64 + {46339874-C6B8-4361-997E-2E30387E51F9}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {46339874-C6B8-4361-997E-2E30387E51F9}.Debug|ARM64.Build.0 = Debug|ARM64 + {46339874-C6B8-4361-997E-2E30387E51F9}.Debug|x64.ActiveCfg = Debug|x64 + {46339874-C6B8-4361-997E-2E30387E51F9}.Debug|x64.Build.0 = Debug|x64 + {46339874-C6B8-4361-997E-2E30387E51F9}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64 + {46339874-C6B8-4361-997E-2E30387E51F9}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64 + {46339874-C6B8-4361-997E-2E30387E51F9}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64 + {46339874-C6B8-4361-997E-2E30387E51F9}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64 + {46339874-C6B8-4361-997E-2E30387E51F9}.Release|ARM64.ActiveCfg = Release|ARM64 + {46339874-C6B8-4361-997E-2E30387E51F9}.Release|ARM64.Build.0 = Release|ARM64 + {46339874-C6B8-4361-997E-2E30387E51F9}.Release|x64.ActiveCfg = Release|x64 + {46339874-C6B8-4361-997E-2E30387E51F9}.Release|x64.Build.0 = Release|x64 + {80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Debug|ARM64.Build.0 = Debug|ARM64 + {80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Debug|x64.ActiveCfg = Debug|x64 + {80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Debug|x64.Build.0 = Debug|x64 + {80CD3DDE-0642-451D-82DF-0DE422FC6E34}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64 + {80CD3DDE-0642-451D-82DF-0DE422FC6E34}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64 + {80CD3DDE-0642-451D-82DF-0DE422FC6E34}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64 + {80CD3DDE-0642-451D-82DF-0DE422FC6E34}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64 + {80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Release|ARM64.ActiveCfg = Release|ARM64 + {80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Release|ARM64.Build.0 = Release|ARM64 + {80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Release|x64.ActiveCfg = Release|x64 + {80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {E13615C2-4C8D-4072-95A1-124440983818} + EndGlobalSection +EndGlobal diff --git a/future/nc_il.md b/future/nc_il.md index 735781e4..c51e21cc 100644 --- a/future/nc_il.md +++ b/future/nc_il.md @@ -1,369 +1,369 @@ -# 时序控制专用 IL 规范(草案 v0.1) - -## 1. 概述 - -本 IL(Intermediate Language)设计用于 i 线曝光机的实时运动控制与时序协调系统。它是一个**无分支、无跳转、无堆内存**的直线执行字节码,适用于确定性实时控制场景。 - -### 1.1 设计原则 -- **极简性**:无分支/跳转/循环,所有指令直线执行 -- **确定性**:固定长度指令(32-bit),WCET 可精确计算 -- **时间驱动**:所有动作通过时间戳对齐,而非依赖/分支控制 -- **安全性**:静态验证,无动态内存分配 - -### 1.2 适用场景 -- 多坐标系时序协调 -- 运动控制序列生成 -- IO 触发与数据采集 -- 轻量级数学运算(定点/简单序列生成) - ---- - -## 2. Bundle 结构 - -一个完整的传输单元称为 **Bundle**,包含三部分: - -``` -+----------------+ -| Header | 固定大小(建议 32 字节) -+----------------+ -| .data 段 | 可变长度,4B 对齐 -+----------------+ -| .instruction 段| 可变长度,每条指令 4B -+----------------+ -``` - -### 2.1 Header(32 字节) - -| 偏移 | 大小 | 字段名 | 说明 | -|------|------|---------------------|-------------------------------------------| -| 0 | 4 | `magic` | 魔数,建议 `0x58494C31` ("XIL1") | -| 4 | 2 | `proto_ver` | 协议版本,例如 `0x0001` | -| 6 | 2 | `bundle_type` | 包类型(运动/IO/通用) | -| 8 | 8 | `execute_at_tick` | 绝对执行时刻(64-bit tick) | -| 16 | 2 | `data_slot_count` | `.data` 段 slot 数量 | -| 18 | 2 | `instruction_count` | `.instruction` 段指令条数 | -| 20 | 4 | `flags` | 预留标志位 | -| 24 | 4 | `data_crc` | `.data` 段 CRC32 | -| 28 | 4 | `bundle_crc` | 整个 bundle CRC32(不含此字段本身) | - ---- - -## 3. .data 段 - -### 3.1 Slot 模型 -- **最小粒度**:4 字节(32-bit slot) -- **寻址方式**:所有指令通过 `slotIndex`(u8 或 u16)引用 -- **对齐规则**: - - 所有对象起始地址必须是 4B 的倍数(slot 对齐) - - 大对象可跨越多个 slot - - 如需更高对齐(8/16B),由 assembler 插入 padding slot - -### 3.2 支持的类型 - -| 类型名 | 大小(slot) | 对齐(slot) | 说明 | -|------------------|--------------|--------------|-----------------------------------| -| `INT32` / `U32` | 1 | 1 | 有符号/无符号 32 位整数 | -| `INT64` / `U64` | 2 | 2 | 64 位整数(占 2 个 slot) | -| `FLOAT32` | 1 | 1 | IEEE 754 单精度浮点(可选支持) | -| `MOTION_PROFILE` | N | 1 | 运动参数结构体(可扩展) | -| `VEC2` | 2 | 1 | 二维向量(2×i32 或 2×f32) | -| `ARRAY[N]` | N | 1 | 定长数组(每个元素 1 slot) | - -### 3.3 示例 - -```asm -.data -MOTION_PROFILE profile { - steps = 10, - direction = 0, - mode = 0 -} ; slot 0 ~ slot N-1 -INT32 tick 100 ; slot N -INT32 end 0 ; slot N+1 -``` - ---- - -## 4. Instruction 段 - -### 4.1 指令格式(固定 32-bit) - -``` -+-------+-------+-------+-------+ -| set | op | a | b | -| byte0 | byte1 | byte2 | byte3 | -+-------+-------+-------+-------+ -``` - -#### 字段说明 -- `set`(byte0):指令集/域(Instruction Set) -- `op`(byte1):域内操作码(Operation) -- `a`(byte2):参数 A(8-bit) -- `b`(byte3):参数 B(8-bit) - -#### 参数解释规则 -每条指令的 `(a, b)` 解释方式由 `(set, op)` 唯一确定: -- **双参数模式**:`a` 和 `b` 分别作为两个 u8 参数 -- **单参数模式**:`imm16 = a | (b << 8)`(小端序) - -**禁止同一 opcode 混用两种解释方式。** - ---- - -### 4.2 指令集分类(set 域) - -| set 值 | 域名 | 说明 | -|--------|--------|------------------------| -| `0x00` | TIME | 时间控制与同步 | -| `0x10` | MOTION | 运动控制 | -| `0x20` | SYS | 系统参数读写 | -| `0x30` | IO | IO 控制与数据上报 | -| `0xF0` | META | 元指令(END/NOP/FAULT)| - ---- - -### 4.3 指令表(最小集合示例) - -#### TIME 域(0x00) - -| op | 助记符 | 参数 | 说明 | -|------|--------------|--------------|---------------------------------------| -| 0x00 | `AT_TICK` | `imm16` | 等待直到绝对 tick,`imm16=slotIndex` | -| 0x01 | `WAIT_DT` | `imm16` | 相对等待 dt tick | - -**编码示例**: -```asm -AT_TICK tick ; 编码:0x00 0x00 [tick_slot_lo] [tick_slot_hi] -``` - ---- - -#### MOTION 域(0x10) - -| op | 助记符 | 参数 | 说明 | -|------|----------------|-----------|----------------------------------------| -| 0x00 | `AXIS_MOVE` | `a` | 执行运动,参数 `a=profile_slotIndex` | -| 0x01 | `AXIS_STOP` | `a` | 停止轴,参数 `a=axis_id` | -| 0x02 | `AXIS_START` | `a` | 启动轴队列 | - -**编码示例**: -```asm -AXIS_MOVE profile ; 编码:0x10 0x00 [profile_slot] 0x00 -``` - ---- - -#### SYS 域(0x20) - -| op | 助记符 | 参数 | 说明 | -|------|--------------|-----------|----------------------------------------------| -| 0x00 | `READ_SYS` | `a, b` | 读取系统参数,`a=dst_slot`, `b=sys_id` | -| 0x01 | `WRITE_SYS` | `a, b` | 写入系统参数 | - -**系统参数 ID(b)**: -- `0x00`:`SYS_TICK`(当前 tick) -- `0x01`:`SYS_STATUS`(设备状态) -- ...(可扩展) - -**编码示例**: -```asm -READ_SYS end SYS_TICK ; 编码:0x20 0x00 [end_slot] 0x00 -``` - ---- - -#### IO 域(0x30) - -| op | 助记符 | 参数 | 说明 | -|------|--------------|-----------|-------------------------------------------| -| 0x00 | `IO_SET` | `a, b` | 设置 IO,`a=pin`, `b=value` | -| 0x01 | `REPORT` | `a` | 上报数据,`a=src_slot` | -| 0x02 | `SAMPLE` | `a, b` | 采样,`a=chan`, `b=dst_slot` | - -**编码示例**: -```asm -REPORT end ; 编码:0x30 0x01 [end_slot] 0x00 -``` - ---- - -#### META 域(0xF0) - -| op | 助记符 | 参数 | 说明 | -|------|----------|------|------------------| -| 0x00 | `END` | 无 | 指令流结束 | -| 0x01 | `NOP` | 无 | 空操作 | - -**编码示例**: -```asm -END ; 编码:0xF0 0x00 0x00 0x00 -``` - ---- - -## 5. 完整示例 - -### 5.1 汇编源码 - -```asm -; 等待到指定 tick,执行一次运动,记录结束时刻并上报 - -.bundle t=123456 type=MOTION - -.data -MOTION_PROFILE profile { - steps = 10, - direction = 0, - mode = OPEN_LOOP -} ; slot 0 -INT32 tick 100 ; slot 1 -INT32 end 0 ; slot 2 - -.instruction -AT_TICK tick ; 等待到 tick=100 -AXIS_MOVE profile ; 执行运动 -READ_SYS end SYS_TICK ; 读取当前 tick 到 end -REPORT end ; 上报 end -END ; 结束 -``` - ---- - -### 5.2 二进制布局(示意) - -#### Header(32 字节) -``` -58 49 4C 31 00 01 00 01 00 01 E2 40 00 00 00 00 -03 00 05 00 00 00 00 00 XX XX XX XX YY YY YY YY -``` -- magic: `XIL1` -- proto_ver: `0x0001` -- bundle_type: `0x0001`(MOTION) -- execute_at_tick: `123456` -- data_slot_count: `3` -- instruction_count: `5` -- CRC 略 - -#### .data 段(3 slots × 4 bytes = 12 bytes) -``` -; slot 0: MOTION_PROFILE(示意,实际结构依实现) -0A 00 00 00 ; steps=10 -00 00 00 00 ; direction=0, mode=0 - -; slot 1: tick=100 -64 00 00 00 - -; slot 2: end=0 -00 00 00 00 -``` - -#### .instruction 段(5 条 × 4 bytes = 20 bytes) -``` -00 00 01 00 ; AT_TICK slot[1] -10 00 00 00 ; AXIS_MOVE slot[0] -20 00 02 00 ; READ_SYS slot[2], SYS_TICK -30 01 02 00 ; REPORT slot[2] -F0 00 00 00 ; END -``` - ---- - -## 6. 校验与安全 - -### 6.1 静态验证(加载阶段) -- Header CRC 校验 -- `data_slot_count` 与实际长度一致性 -- `instruction_count` 与实际条数一致性 -- 所有 slotIndex 不越界(`< data_slot_count`) -- 所有 `(set, op)` 在白名单内 - -### 6.2 运行时保护 -- 执行时间上限(timeout) -- 状态机约束(例如未 Homed 禁止 MOTION) -- 参数范围校验(速度/加速度/行程边界) -- 看门狗与硬件急停链路 - -### 6.3 错误处理 -- 验证失败:拒绝加载,返回错误码 -- 执行超时:触发 FAULT,进入安全态 -- 非法 opcode:触发 FAULT - ---- - -## 7. 工具链 - -### 7.1 Assembler(文本 → 二进制) -- 输入:`.asm` 汇编文本 -- 输出:`.bin` bundle 二进制 -- 功能: - - 符号表管理(slotIndex 分配) - - CRC 自动计算 - - 对齐与 padding 插入 - -### 7.2 Disassembler(二进制 → 文本) -- 输入:`.bin` bundle 或抓包数据 -- 输出:可读汇编文本 -- 功能: - - 指令解码 - - slotIndex 显示(可选符号名) - - CRC 验证 - -### 7.3 Debugger / Simulator(可选) -- 离线模拟执行 -- 单步调试 -- 时间轴可视化 - ---- - -## 8. 扩展与版本化 - -### 8.1 版本控制 -- 每个 bundle 携带 `proto_ver` -- 节点启动时上报支持的版本列表 -- 主控拒绝不兼容版本的 bundle - -### 8.2 向后兼容策略 -- 新增 opcode 分配到未使用的 `(set, op)` -- 已有 opcode 语义不变 -- 大版本变更时允许不兼容 - -### 8.3 未来扩展点 -- 子过程/宏指令(`CALL_MACRO`) -- 条件执行(predication,非跳转) -- 多轴并行编排(multi-axis bundle) - ---- - -## 9. 附录 - -### 9.1 字节序 -- 所有多字节字段使用**小端序(Little-Endian)** - -### 9.2 Tick 分辨率 -- 建议:1 tick = 1 µs 或 10 µs -- 由系统配置决定,在文档中明确 - -### 9.3 MOTION_PROFILE 结构(示例) -```c -struct MotionProfile { - int32_t steps; // 步数 - uint8_t direction; // 方向:0=负,1=正 - uint8_t mode; // 模式:0=开环,1=闭环 - uint16_t reserved; // 预留 - int32_t velocity; // 速度(可选) - int32_t acceleration; // 加速度(可选) -}; -``` - ---- - -## 10. 参考文献与致谢 -- VLIW 架构设计原则 -- PLC 微编程语言 -- 实时系统可验证字节码设计 - ---- - -**文档版本**:v0.1 -**最后更新**:2026-01-25 +# 时序控制专用 IL 规范(草案 v0.1) + +## 1. 概述 + +本 IL(Intermediate Language)设计用于 i 线曝光机的实时运动控制与时序协调系统。它是一个**无分支、无跳转、无堆内存**的直线执行字节码,适用于确定性实时控制场景。 + +### 1.1 设计原则 +- **极简性**:无分支/跳转/循环,所有指令直线执行 +- **确定性**:固定长度指令(32-bit),WCET 可精确计算 +- **时间驱动**:所有动作通过时间戳对齐,而非依赖/分支控制 +- **安全性**:静态验证,无动态内存分配 + +### 1.2 适用场景 +- 多坐标系时序协调 +- 运动控制序列生成 +- IO 触发与数据采集 +- 轻量级数学运算(定点/简单序列生成) + +--- + +## 2. Bundle 结构 + +一个完整的传输单元称为 **Bundle**,包含三部分: + +``` ++----------------+ +| Header | 固定大小(建议 32 字节) ++----------------+ +| .data 段 | 可变长度,4B 对齐 ++----------------+ +| .instruction 段| 可变长度,每条指令 4B ++----------------+ +``` + +### 2.1 Header(32 字节) + +| 偏移 | 大小 | 字段名 | 说明 | +|------|------|---------------------|-------------------------------------------| +| 0 | 4 | `magic` | 魔数,建议 `0x58494C31` ("XIL1") | +| 4 | 2 | `proto_ver` | 协议版本,例如 `0x0001` | +| 6 | 2 | `bundle_type` | 包类型(运动/IO/通用) | +| 8 | 8 | `execute_at_tick` | 绝对执行时刻(64-bit tick) | +| 16 | 2 | `data_slot_count` | `.data` 段 slot 数量 | +| 18 | 2 | `instruction_count` | `.instruction` 段指令条数 | +| 20 | 4 | `flags` | 预留标志位 | +| 24 | 4 | `data_crc` | `.data` 段 CRC32 | +| 28 | 4 | `bundle_crc` | 整个 bundle CRC32(不含此字段本身) | + +--- + +## 3. .data 段 + +### 3.1 Slot 模型 +- **最小粒度**:4 字节(32-bit slot) +- **寻址方式**:所有指令通过 `slotIndex`(u8 或 u16)引用 +- **对齐规则**: + - 所有对象起始地址必须是 4B 的倍数(slot 对齐) + - 大对象可跨越多个 slot + - 如需更高对齐(8/16B),由 assembler 插入 padding slot + +### 3.2 支持的类型 + +| 类型名 | 大小(slot) | 对齐(slot) | 说明 | +|------------------|--------------|--------------|-----------------------------------| +| `INT32` / `U32` | 1 | 1 | 有符号/无符号 32 位整数 | +| `INT64` / `U64` | 2 | 2 | 64 位整数(占 2 个 slot) | +| `FLOAT32` | 1 | 1 | IEEE 754 单精度浮点(可选支持) | +| `MOTION_PROFILE` | N | 1 | 运动参数结构体(可扩展) | +| `VEC2` | 2 | 1 | 二维向量(2×i32 或 2×f32) | +| `ARRAY[N]` | N | 1 | 定长数组(每个元素 1 slot) | + +### 3.3 示例 + +```asm +.data +MOTION_PROFILE profile { + steps = 10, + direction = 0, + mode = 0 +} ; slot 0 ~ slot N-1 +INT32 tick 100 ; slot N +INT32 end 0 ; slot N+1 +``` + +--- + +## 4. Instruction 段 + +### 4.1 指令格式(固定 32-bit) + +``` ++-------+-------+-------+-------+ +| set | op | a | b | +| byte0 | byte1 | byte2 | byte3 | ++-------+-------+-------+-------+ +``` + +#### 字段说明 +- `set`(byte0):指令集/域(Instruction Set) +- `op`(byte1):域内操作码(Operation) +- `a`(byte2):参数 A(8-bit) +- `b`(byte3):参数 B(8-bit) + +#### 参数解释规则 +每条指令的 `(a, b)` 解释方式由 `(set, op)` 唯一确定: +- **双参数模式**:`a` 和 `b` 分别作为两个 u8 参数 +- **单参数模式**:`imm16 = a | (b << 8)`(小端序) + +**禁止同一 opcode 混用两种解释方式。** + +--- + +### 4.2 指令集分类(set 域) + +| set 值 | 域名 | 说明 | +|--------|--------|------------------------| +| `0x00` | TIME | 时间控制与同步 | +| `0x10` | MOTION | 运动控制 | +| `0x20` | SYS | 系统参数读写 | +| `0x30` | IO | IO 控制与数据上报 | +| `0xF0` | META | 元指令(END/NOP/FAULT)| + +--- + +### 4.3 指令表(最小集合示例) + +#### TIME 域(0x00) + +| op | 助记符 | 参数 | 说明 | +|------|--------------|--------------|---------------------------------------| +| 0x00 | `AT_TICK` | `imm16` | 等待直到绝对 tick,`imm16=slotIndex` | +| 0x01 | `WAIT_DT` | `imm16` | 相对等待 dt tick | + +**编码示例**: +```asm +AT_TICK tick ; 编码:0x00 0x00 [tick_slot_lo] [tick_slot_hi] +``` + +--- + +#### MOTION 域(0x10) + +| op | 助记符 | 参数 | 说明 | +|------|----------------|-----------|----------------------------------------| +| 0x00 | `AXIS_MOVE` | `a` | 执行运动,参数 `a=profile_slotIndex` | +| 0x01 | `AXIS_STOP` | `a` | 停止轴,参数 `a=axis_id` | +| 0x02 | `AXIS_START` | `a` | 启动轴队列 | + +**编码示例**: +```asm +AXIS_MOVE profile ; 编码:0x10 0x00 [profile_slot] 0x00 +``` + +--- + +#### SYS 域(0x20) + +| op | 助记符 | 参数 | 说明 | +|------|--------------|-----------|----------------------------------------------| +| 0x00 | `READ_SYS` | `a, b` | 读取系统参数,`a=dst_slot`, `b=sys_id` | +| 0x01 | `WRITE_SYS` | `a, b` | 写入系统参数 | + +**系统参数 ID(b)**: +- `0x00`:`SYS_TICK`(当前 tick) +- `0x01`:`SYS_STATUS`(设备状态) +- ...(可扩展) + +**编码示例**: +```asm +READ_SYS end SYS_TICK ; 编码:0x20 0x00 [end_slot] 0x00 +``` + +--- + +#### IO 域(0x30) + +| op | 助记符 | 参数 | 说明 | +|------|--------------|-----------|-------------------------------------------| +| 0x00 | `IO_SET` | `a, b` | 设置 IO,`a=pin`, `b=value` | +| 0x01 | `REPORT` | `a` | 上报数据,`a=src_slot` | +| 0x02 | `SAMPLE` | `a, b` | 采样,`a=chan`, `b=dst_slot` | + +**编码示例**: +```asm +REPORT end ; 编码:0x30 0x01 [end_slot] 0x00 +``` + +--- + +#### META 域(0xF0) + +| op | 助记符 | 参数 | 说明 | +|------|----------|------|------------------| +| 0x00 | `END` | 无 | 指令流结束 | +| 0x01 | `NOP` | 无 | 空操作 | + +**编码示例**: +```asm +END ; 编码:0xF0 0x00 0x00 0x00 +``` + +--- + +## 5. 完整示例 + +### 5.1 汇编源码 + +```asm +; 等待到指定 tick,执行一次运动,记录结束时刻并上报 + +.bundle t=123456 type=MOTION + +.data +MOTION_PROFILE profile { + steps = 10, + direction = 0, + mode = OPEN_LOOP +} ; slot 0 +INT32 tick 100 ; slot 1 +INT32 end 0 ; slot 2 + +.instruction +AT_TICK tick ; 等待到 tick=100 +AXIS_MOVE profile ; 执行运动 +READ_SYS end SYS_TICK ; 读取当前 tick 到 end +REPORT end ; 上报 end +END ; 结束 +``` + +--- + +### 5.2 二进制布局(示意) + +#### Header(32 字节) +``` +58 49 4C 31 00 01 00 01 00 01 E2 40 00 00 00 00 +03 00 05 00 00 00 00 00 XX XX XX XX YY YY YY YY +``` +- magic: `XIL1` +- proto_ver: `0x0001` +- bundle_type: `0x0001`(MOTION) +- execute_at_tick: `123456` +- data_slot_count: `3` +- instruction_count: `5` +- CRC 略 + +#### .data 段(3 slots × 4 bytes = 12 bytes) +``` +; slot 0: MOTION_PROFILE(示意,实际结构依实现) +0A 00 00 00 ; steps=10 +00 00 00 00 ; direction=0, mode=0 + +; slot 1: tick=100 +64 00 00 00 + +; slot 2: end=0 +00 00 00 00 +``` + +#### .instruction 段(5 条 × 4 bytes = 20 bytes) +``` +00 00 01 00 ; AT_TICK slot[1] +10 00 00 00 ; AXIS_MOVE slot[0] +20 00 02 00 ; READ_SYS slot[2], SYS_TICK +30 01 02 00 ; REPORT slot[2] +F0 00 00 00 ; END +``` + +--- + +## 6. 校验与安全 + +### 6.1 静态验证(加载阶段) +- Header CRC 校验 +- `data_slot_count` 与实际长度一致性 +- `instruction_count` 与实际条数一致性 +- 所有 slotIndex 不越界(`< data_slot_count`) +- 所有 `(set, op)` 在白名单内 + +### 6.2 运行时保护 +- 执行时间上限(timeout) +- 状态机约束(例如未 Homed 禁止 MOTION) +- 参数范围校验(速度/加速度/行程边界) +- 看门狗与硬件急停链路 + +### 6.3 错误处理 +- 验证失败:拒绝加载,返回错误码 +- 执行超时:触发 FAULT,进入安全态 +- 非法 opcode:触发 FAULT + +--- + +## 7. 工具链 + +### 7.1 Assembler(文本 → 二进制) +- 输入:`.asm` 汇编文本 +- 输出:`.bin` bundle 二进制 +- 功能: + - 符号表管理(slotIndex 分配) + - CRC 自动计算 + - 对齐与 padding 插入 + +### 7.2 Disassembler(二进制 → 文本) +- 输入:`.bin` bundle 或抓包数据 +- 输出:可读汇编文本 +- 功能: + - 指令解码 + - slotIndex 显示(可选符号名) + - CRC 验证 + +### 7.3 Debugger / Simulator(可选) +- 离线模拟执行 +- 单步调试 +- 时间轴可视化 + +--- + +## 8. 扩展与版本化 + +### 8.1 版本控制 +- 每个 bundle 携带 `proto_ver` +- 节点启动时上报支持的版本列表 +- 主控拒绝不兼容版本的 bundle + +### 8.2 向后兼容策略 +- 新增 opcode 分配到未使用的 `(set, op)` +- 已有 opcode 语义不变 +- 大版本变更时允许不兼容 + +### 8.3 未来扩展点 +- 子过程/宏指令(`CALL_MACRO`) +- 条件执行(predication,非跳转) +- 多轴并行编排(multi-axis bundle) + +--- + +## 9. 附录 + +### 9.1 字节序 +- 所有多字节字段使用**小端序(Little-Endian)** + +### 9.2 Tick 分辨率 +- 建议:1 tick = 1 µs 或 10 µs +- 由系统配置决定,在文档中明确 + +### 9.3 MOTION_PROFILE 结构(示例) +```c +struct MotionProfile { + int32_t steps; // 步数 + uint8_t direction; // 方向:0=负,1=正 + uint8_t mode; // 模式:0=开环,1=闭环 + uint16_t reserved; // 预留 + int32_t velocity; // 速度(可选) + int32_t acceleration; // 加速度(可选) +}; +``` + +--- + +## 10. 参考文献与致谢 +- VLIW 架构设计原则 +- PLC 微编程语言 +- 实时系统可验证字节码设计 + +--- + +**文档版本**:v0.1 +**最后更新**:2026-01-25 **维护者**:[你的团队名称] \ No newline at end of file diff --git a/future/ngra.md b/future/ngra.md index e9efa6b7..f01df72c 100644 --- a/future/ngra.md +++ b/future/ngra.md @@ -1,111 +1,111 @@ -# ngra 技术构想与里程碑路线图(草案) - -> 当前阶段:项目尚在早期准备期(正则状态机 + CPU 线代库同步开发), -> ngra 核心尚未正式开工,因此本文仅作为整体方向与路线规划。 - ---- - -## 1. ngra 的核心定位 - -ngra 是一个以 **“语法岛划分 + token 序列驱动”** 为核心的结构化前端系统, -目标是支持多语言解析、可扩展语义分析,并最终作为跨语言编译链的一部分。 - -核心原则: - -- 强制内置 token 集,避免不受控的字符正则扩展 -- 规则描述以 **token 序列 + 结构规则** 为主 -- 优先工程可行性与可维护性,而非极端语法自由度 - ---- - -## 2. 解析策略 - -### 2.1 语法岛 + 并行语义模型 -- **第一阶段:语法岛划分** - - 得到最外层符号结构(schema / entity / function / block 等) -- **第二阶段:并行语义分析** - - 岛屿之间并行解析与语义分析 - - 外层上下文以只读快照共享 - -### 2.2 宏处理策略 -- 宏视为结构级符号 -- 进行“替换 → 局部重解析” -- 避免在完整语法解析中引入宏的动态不确定性 - ---- - -## 3. 输出形式 - -ngra 的输出形态计划分为两级: - -- **High AST**:语义节点 -- **Low-level C# AST**:可降级、可转译的中间表示 - -后续可进一步扩展为 LLVM-like IR 或面向 GLSL 的特化 IR。 - ---- - -## 4. 里程碑路线图(先 EXPRESS 后 Lua) - -### 里程碑 1:EXPRESS 前端(ISO 10303-11) -**目标**:解决 STEP 文件解析的关键技术依赖 -**原因**:EXPRESS 是 STEP 模型解释的核心语言,必须优先完成 - -交付内容: -- EXPRESS 的 token 规则集 -- 语法岛划分策略(schema / entity / type / rule) -- EXPRESS AST + 语义检查(最小闭环) -- STEP 文件解析所需的语义映射基础 - ---- - -### 里程碑 2:Lua 前端(通用前端验证) -**目标**:验证 ngra 可作为图灵完备语言前端 -**理由**:Lua 语法稳定、结构清晰,适合验证通用性 - -交付内容: -- Lua 最小子集语法 -- Lua AST → Low-level C# AST -- 最小执行闭环(不依赖外部解释器) - ---- - -### 里程碑 3:内部脚本系统 -**目标**:将 ngra 发展为可扩展脚本前端 - -交付内容: -- 统一 AST/IR 接口 -- Low-level C# 执行/编译通道 -- 标准化 token / 规则机制 - ---- - -### 里程碑 4:C# → GLSL(GPGPU 编译链) -**目标**:将符合约束的 C# 子集转译为着色器语言 - -交付内容: -- C# 可转译子集规范 -- Low-level C# → GLSL 编译器 -- GPGPU 运行时绑定支持 - ---- - -## 5. 当前阶段说明 - -当前阶段尚处于准备期: - -- 正则状态机仍在开发 -- 同时进行 CPU 线性代数库开发 -- ngra 核心尚未正式启动 - -因此本文仅作为 **方向与路线规划**,具体实现细节将在核心启动后展开。 - ---- - -## 6. 后续可展开内容(待定) - -- EXPRESS 最小语法子集 -- Lua 最小可运行语法集 -- Low-level C# AST 草图 -- C# → GLSL 子集约束清单 +# ngra 技术构想与里程碑路线图(草案) + +> 当前阶段:项目尚在早期准备期(正则状态机 + CPU 线代库同步开发), +> ngra 核心尚未正式开工,因此本文仅作为整体方向与路线规划。 + +--- + +## 1. ngra 的核心定位 + +ngra 是一个以 **“语法岛划分 + token 序列驱动”** 为核心的结构化前端系统, +目标是支持多语言解析、可扩展语义分析,并最终作为跨语言编译链的一部分。 + +核心原则: + +- 强制内置 token 集,避免不受控的字符正则扩展 +- 规则描述以 **token 序列 + 结构规则** 为主 +- 优先工程可行性与可维护性,而非极端语法自由度 + +--- + +## 2. 解析策略 + +### 2.1 语法岛 + 并行语义模型 +- **第一阶段:语法岛划分** + - 得到最外层符号结构(schema / entity / function / block 等) +- **第二阶段:并行语义分析** + - 岛屿之间并行解析与语义分析 + - 外层上下文以只读快照共享 + +### 2.2 宏处理策略 +- 宏视为结构级符号 +- 进行“替换 → 局部重解析” +- 避免在完整语法解析中引入宏的动态不确定性 + +--- + +## 3. 输出形式 + +ngra 的输出形态计划分为两级: + +- **High AST**:语义节点 +- **Low-level C# AST**:可降级、可转译的中间表示 + +后续可进一步扩展为 LLVM-like IR 或面向 GLSL 的特化 IR。 + +--- + +## 4. 里程碑路线图(先 EXPRESS 后 Lua) + +### 里程碑 1:EXPRESS 前端(ISO 10303-11) +**目标**:解决 STEP 文件解析的关键技术依赖 +**原因**:EXPRESS 是 STEP 模型解释的核心语言,必须优先完成 + +交付内容: +- EXPRESS 的 token 规则集 +- 语法岛划分策略(schema / entity / type / rule) +- EXPRESS AST + 语义检查(最小闭环) +- STEP 文件解析所需的语义映射基础 + +--- + +### 里程碑 2:Lua 前端(通用前端验证) +**目标**:验证 ngra 可作为图灵完备语言前端 +**理由**:Lua 语法稳定、结构清晰,适合验证通用性 + +交付内容: +- Lua 最小子集语法 +- Lua AST → Low-level C# AST +- 最小执行闭环(不依赖外部解释器) + +--- + +### 里程碑 3:内部脚本系统 +**目标**:将 ngra 发展为可扩展脚本前端 + +交付内容: +- 统一 AST/IR 接口 +- Low-level C# 执行/编译通道 +- 标准化 token / 规则机制 + +--- + +### 里程碑 4:C# → GLSL(GPGPU 编译链) +**目标**:将符合约束的 C# 子集转译为着色器语言 + +交付内容: +- C# 可转译子集规范 +- Low-level C# → GLSL 编译器 +- GPGPU 运行时绑定支持 + +--- + +## 5. 当前阶段说明 + +当前阶段尚处于准备期: + +- 正则状态机仍在开发 +- 同时进行 CPU 线性代数库开发 +- ngra 核心尚未正式启动 + +因此本文仅作为 **方向与路线规划**,具体实现细节将在核心启动后展开。 + +--- + +## 6. 后续可展开内容(待定) + +- EXPRESS 最小语法子集 +- Lua 最小可运行语法集 +- Low-level C# AST 草图 +- C# → GLSL 子集约束清单 - 规则 DSL 草案 \ No newline at end of file