├── .editorconfig ├── .github └── workflows │ └── continuous-integration.yml ├── .gitignore ├── LICENSE ├── README.md ├── WebGL.Sample.sln └── src └── WebGL.Sample ├── Assets ├── Frag.glsl └── Vert.glsl ├── EGL.cs ├── Emscripten.cs ├── Interop.cs ├── MeshData.cs ├── MeshDemo.cs ├── Native ├── emscripten.c ├── libEGL.c └── openal32.c ├── Program.cs ├── Properties └── launchSettings.json ├── TrampolineFuncs.cs ├── WebGL.Sample.csproj ├── index.html ├── main.js └── runtimeconfig.template.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # Ashleigh: 2 | # Aditional changes from this document's source: 3 | # - Disable this/Me with an error 4 | # - Use tabs instead of spaces 5 | # - Bash uses crlf as git normalizes these 6 | # - Allow top level namespaces 7 | # - Group namespaces 8 | # - Only use var when the type is apparent 9 | # - Expression bodied ctors not prefered 10 | # - Expression bodied methods made silent 11 | # - Lax the parentheses clarity requirement. 12 | # - XML files use 2 width tabs. 13 | # - Allow Flag/Flags suffix 14 | 15 | # Version: 1.5.0 (Using https://semver.org/) 16 | # Updated: 2020-03-09 17 | # See https://github.com/RehanSaeed/EditorConfig/releases for release notes. 18 | # See https://github.com/RehanSaeed/EditorConfig for updates to this file. 19 | # See http://EditorConfig.org for more information about .editorconfig files. 20 | 21 | ########################################## 22 | # Common Settings 23 | ########################################## 24 | 25 | # This file is the top-most EditorConfig file 26 | root = true 27 | 28 | # All Files 29 | [*] 30 | charset = utf-8 31 | indent_style = tab 32 | indent_size = 4 33 | insert_final_newline = true 34 | trim_trailing_whitespace = true 35 | 36 | ########################################## 37 | # File Extension Settings 38 | ########################################## 39 | 40 | # Visual Studio Solution Files 41 | [*.sln] 42 | indent_style = tab 43 | 44 | # Visual Studio XML Project Files 45 | [*.{csproj,vbproj,vcxproj.filters,proj,projitems,shproj}] 46 | indent_size = 2 47 | indent_style = space 48 | 49 | # XML Configuration Files 50 | [*.{config,props,targets,nuspec,resx,ruleset,vsixmanifest,vsct}] 51 | indent_size = 2 52 | indent_style = space 53 | 54 | # XML Files 55 | [*.{xml,xsd}] 56 | indent_size = 2 57 | indent_style = tab 58 | 59 | # JSON Files 60 | [*.{json,json5,webmanifest}] 61 | indent_size = 2 62 | 63 | # YAML Files 64 | [*.{yml,yaml}] 65 | indent_size = 2 66 | 67 | # Markdown Files 68 | [*.md] 69 | trim_trailing_whitespace = false 70 | 71 | # Web Files 72 | [*.{htm,html,js,jsm,ts,tsx,css,sass,scss,less,svg,vue}] 73 | indent_size = 2 74 | 75 | # Batch Files 76 | [*.{cmd,bat}] 77 | end_of_line = crlf 78 | 79 | # Bash Files 80 | [*.sh] 81 | end_of_line = crlf 82 | 83 | # Makefiles 84 | [Makefile] 85 | indent_style = tab 86 | 87 | ########################################## 88 | # .NET Language Conventions 89 | # https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions 90 | ########################################## 91 | 92 | # .NET Code Style Settings 93 | # https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#net-code-style-settings 94 | [*.{cs,csx,cake,vb,vbx}] 95 | # "this." and "Me." qualifiers 96 | # https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#this-and-me 97 | dotnet_style_qualification_for_field = false:error 98 | dotnet_style_qualification_for_property = false:error 99 | dotnet_style_qualification_for_method = false:error 100 | dotnet_style_qualification_for_event = false:error 101 | # Language keywords instead of framework type names for type references 102 | # https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#language-keywords 103 | dotnet_style_predefined_type_for_locals_parameters_members = true:warning 104 | dotnet_style_predefined_type_for_member_access = true:warning 105 | # Modifier preferences 106 | # https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#normalize-modifiers 107 | dotnet_style_require_accessibility_modifiers = always:warning 108 | csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async 109 | visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async 110 | dotnet_style_readonly_field = true:warning 111 | # Parentheses preferences 112 | # https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#parentheses-preferences 113 | dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent 114 | dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent 115 | dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent 116 | dotnet_style_parentheses_in_other_operators = always_for_clarity:silent 117 | # Expression-level preferences 118 | # https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#expression-level-preferences 119 | dotnet_style_object_initializer = true:warning 120 | dotnet_style_collection_initializer = true:warning 121 | dotnet_style_explicit_tuple_names = true:warning 122 | dotnet_style_prefer_inferred_tuple_names = true:warning 123 | dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning 124 | dotnet_style_prefer_auto_properties = true:warning 125 | dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning 126 | dotnet_style_prefer_conditional_expression_over_assignment = false:suggestion 127 | dotnet_style_prefer_conditional_expression_over_return = false:suggestion 128 | dotnet_style_prefer_compound_assignment = true:warning 129 | # Null-checking preferences 130 | # https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#null-checking-preferences 131 | dotnet_style_coalesce_expression = true:warning 132 | dotnet_style_null_propagation = true:warning 133 | # Parameter preferences 134 | # https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#parameter-preferences 135 | dotnet_code_quality_unused_parameters = all:silent 136 | # More style options (Undocumented) 137 | # https://github.com/MicrosoftDocs/visualstudio-docs/issues/3641 138 | dotnet_style_operator_placement_when_wrapping = end_of_line 139 | # https://github.com/dotnet/roslyn/pull/40070 140 | dotnet_style_prefer_simplified_interpolation = true:warning 141 | 142 | # C# Code Style Settings 143 | # https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#c-code-style-settings 144 | [*.{cs,csx,cake}] 145 | # Implicit and explicit types 146 | # https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#implicit-and-explicit-types 147 | csharp_style_var_elsewhere = false:silent 148 | csharp_style_var_for_built_in_types = false:silent 149 | csharp_style_var_when_type_is_apparent = true:suggestion 150 | # Expression-bodied members 151 | # https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#expression-bodied-members 152 | csharp_style_expression_bodied_methods = false:none 153 | csharp_style_expression_bodied_constructors = false:warning 154 | csharp_style_expression_bodied_operators = true:warning 155 | csharp_style_expression_bodied_properties = true:warning 156 | csharp_style_expression_bodied_indexers = true:warning 157 | csharp_style_expression_bodied_accessors = true:warning 158 | csharp_style_expression_bodied_lambdas = true:warning 159 | csharp_style_expression_bodied_local_functions = true:warning 160 | # Pattern matching 161 | # https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#pattern-matching 162 | csharp_style_pattern_matching_over_is_with_cast_check = true:warning 163 | csharp_style_pattern_matching_over_as_with_null_check = true:warning 164 | # Inlined variable declarations 165 | # https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#inlined-variable-declarations 166 | csharp_style_inlined_variable_declaration = true:warning 167 | # Expression-level preferences 168 | # https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#expression-level-preferences 169 | csharp_prefer_simple_default_expression = true:warning 170 | # "Null" checking preferences 171 | # https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#c-null-checking-preferences 172 | csharp_style_throw_expression = true:warning 173 | csharp_style_conditional_delegate_call = true:warning 174 | # Code block preferences 175 | # https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#code-block-preferences 176 | csharp_prefer_braces = true:silent 177 | # Unused value preferences 178 | # https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#unused-value-preferences 179 | csharp_style_unused_value_expression_statement_preference = discard_variable:silent 180 | csharp_style_unused_value_assignment_preference = discard_variable:suggestion 181 | # Index and range preferences 182 | # https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#index-and-range-preferences 183 | csharp_style_prefer_index_operator = true:warning 184 | csharp_style_prefer_range_operator = true:warning 185 | # Miscellaneous preferences 186 | # https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#miscellaneous-preferences 187 | csharp_style_deconstructed_variable_declaration = true:warning 188 | csharp_style_pattern_local_over_anonymous_function = true:warning 189 | csharp_using_directive_placement = outside_namespace:silent 190 | csharp_prefer_static_local_function = true:warning 191 | csharp_prefer_simple_using_statement = true:suggestion 192 | 193 | ########################################## 194 | # .NET Formatting Conventions 195 | # https://docs.microsoft.com/visualstudio/ide/editorconfig-code-style-settings-reference#formatting-conventions 196 | ########################################## 197 | 198 | # Organize usings 199 | # https://docs.microsoft.com/visualstudio/ide/editorconfig-formatting-conventions#organize-using-directives 200 | dotnet_sort_system_directives_first = true 201 | dotnet_separate_import_directive_groups = true 202 | # Newline options 203 | # https://docs.microsoft.com/visualstudio/ide/editorconfig-formatting-conventions#new-line-options 204 | csharp_new_line_before_open_brace = all 205 | csharp_new_line_before_else = true 206 | csharp_new_line_before_catch = true 207 | csharp_new_line_before_finally = true 208 | csharp_new_line_before_members_in_object_initializers = true 209 | csharp_new_line_before_members_in_anonymous_types = true 210 | csharp_new_line_between_query_expression_clauses = true 211 | # Indentation options 212 | # https://docs.microsoft.com/visualstudio/ide/editorconfig-formatting-conventions#indentation-options 213 | csharp_indent_case_contents = true 214 | csharp_indent_switch_labels = true 215 | csharp_indent_labels = no_change 216 | csharp_indent_block_contents = true 217 | csharp_indent_braces = false 218 | csharp_indent_case_contents_when_block = false 219 | # Spacing options 220 | # https://docs.microsoft.com/visualstudio/ide/editorconfig-formatting-conventions#spacing-options 221 | csharp_space_after_cast = false 222 | csharp_space_after_keywords_in_control_flow_statements = true 223 | csharp_space_between_parentheses = false 224 | csharp_space_before_colon_in_inheritance_clause = true 225 | csharp_space_after_colon_in_inheritance_clause = true 226 | csharp_space_around_binary_operators = before_and_after 227 | csharp_space_between_method_declaration_parameter_list_parentheses = false 228 | csharp_space_between_method_declaration_empty_parameter_list_parentheses = false 229 | csharp_space_between_method_declaration_name_and_open_parenthesis = false 230 | csharp_space_between_method_call_parameter_list_parentheses = false 231 | csharp_space_between_method_call_empty_parameter_list_parentheses = false 232 | csharp_space_between_method_call_name_and_opening_parenthesis = false 233 | csharp_space_after_comma = true 234 | csharp_space_before_comma = false 235 | csharp_space_after_dot = false 236 | csharp_space_before_dot = false 237 | csharp_space_after_semicolon_in_for_statement = true 238 | csharp_space_before_semicolon_in_for_statement = false 239 | csharp_space_around_declaration_statements = false 240 | csharp_space_before_open_square_brackets = false 241 | csharp_space_between_empty_square_brackets = false 242 | csharp_space_between_square_brackets = false 243 | # Wrapping options 244 | # https://docs.microsoft.com/visualstudio/ide/editorconfig-formatting-conventions#wrap-options 245 | csharp_preserve_single_line_statements = false 246 | csharp_preserve_single_line_blocks = true 247 | 248 | ########################################## 249 | # .NET Naming Conventions 250 | # https://docs.microsoft.com/visualstudio/ide/editorconfig-naming-conventions 251 | ########################################## 252 | 253 | [*.{cs,csx,cake,vb,vbx}] 254 | 255 | ########################################## 256 | # Styles 257 | ########################################## 258 | 259 | # camel_case_style - Define the camelCase style 260 | dotnet_naming_style.camel_case_style.capitalization = camel_case 261 | # pascal_case_style - Define the PascalCase style 262 | dotnet_naming_style.pascal_case_style.capitalization = pascal_case 263 | # first_upper_style - The first character must start with an upper-case character 264 | dotnet_naming_style.first_upper_style.capitalization = first_word_upper 265 | # prefix_interface_with_i_style - Interfaces must be PascalCase and the first character of an interface must be an 'I' 266 | dotnet_naming_style.prefix_interface_with_i_style.capitalization = pascal_case 267 | dotnet_naming_style.prefix_interface_with_i_style.required_prefix = I 268 | # prefix_type_parameters_with_t_style - Generic Type Parameters must be PascalCase and the first character must be a 'T' 269 | dotnet_naming_style.prefix_type_parameters_with_t_style.capitalization = pascal_case 270 | dotnet_naming_style.prefix_type_parameters_with_t_style.required_prefix = T 271 | # disallowed_style - Anything that has this style applied is marked as disallowed 272 | dotnet_naming_style.disallowed_style.capitalization = pascal_case 273 | dotnet_naming_style.disallowed_style.required_prefix = ____RULE_VIOLATION____ 274 | dotnet_naming_style.disallowed_style.required_suffix = ____RULE_VIOLATION____ 275 | # internal_error_style - This style should never occur... if it does, it indicates a bug in file or in the parser using the file 276 | dotnet_naming_style.internal_error_style.capitalization = pascal_case 277 | dotnet_naming_style.internal_error_style.required_prefix = ____INTERNAL_ERROR____ 278 | dotnet_naming_style.internal_error_style.required_suffix = ____INTERNAL_ERROR____ 279 | 280 | ########################################## 281 | # .NET Design Guideline Field Naming Rules 282 | # Naming rules for fields follow the .NET Framework design guidelines 283 | # https://docs.microsoft.com/dotnet/standard/design-guidelines/index 284 | ########################################## 285 | 286 | # All public/protected/protected_internal constant fields must be PascalCase 287 | # https://docs.microsoft.com/dotnet/standard/design-guidelines/field 288 | dotnet_naming_symbols.public_protected_constant_fields_group.applicable_accessibilities = public, protected, protected_internal 289 | dotnet_naming_symbols.public_protected_constant_fields_group.required_modifiers = const 290 | dotnet_naming_symbols.public_protected_constant_fields_group.applicable_kinds = field 291 | dotnet_naming_rule.public_protected_constant_fields_must_be_pascal_case_rule.symbols = public_protected_constant_fields_group 292 | dotnet_naming_rule.public_protected_constant_fields_must_be_pascal_case_rule.style = pascal_case_style 293 | dotnet_naming_rule.public_protected_constant_fields_must_be_pascal_case_rule.severity = warning 294 | 295 | # All public/protected/protected_internal static readonly fields must be PascalCase 296 | # https://docs.microsoft.com/dotnet/standard/design-guidelines/field 297 | dotnet_naming_symbols.public_protected_static_readonly_fields_group.applicable_accessibilities = public, protected, protected_internal 298 | dotnet_naming_symbols.public_protected_static_readonly_fields_group.required_modifiers = static, readonly 299 | dotnet_naming_symbols.public_protected_static_readonly_fields_group.applicable_kinds = field 300 | dotnet_naming_rule.public_protected_static_readonly_fields_must_be_pascal_case_rule.symbols = public_protected_static_readonly_fields_group 301 | dotnet_naming_rule.public_protected_static_readonly_fields_must_be_pascal_case_rule.style = pascal_case_style 302 | dotnet_naming_rule.public_protected_static_readonly_fields_must_be_pascal_case_rule.severity = warning 303 | 304 | # No other public/protected/protected_internal fields are allowed 305 | # https://docs.microsoft.com/dotnet/standard/design-guidelines/field 306 | dotnet_naming_symbols.other_public_protected_fields_group.applicable_accessibilities = public, protected, protected_internal 307 | dotnet_naming_symbols.other_public_protected_fields_group.applicable_kinds = field 308 | dotnet_naming_rule.other_public_protected_fields_disallowed_rule.symbols = other_public_protected_fields_group 309 | dotnet_naming_rule.other_public_protected_fields_disallowed_rule.style = disallowed_style 310 | dotnet_naming_rule.other_public_protected_fields_disallowed_rule.severity = error 311 | 312 | ########################################## 313 | # StyleCop Field Naming Rules 314 | # Naming rules for fields follow the StyleCop analyzers 315 | # This does not override any rules using disallowed_style above 316 | # https://github.com/DotNetAnalyzers/StyleCopAnalyzers 317 | ########################################## 318 | 319 | # All constant fields must be PascalCase 320 | # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1303.md 321 | dotnet_naming_symbols.stylecop_constant_fields_group.applicable_accessibilities = public, internal, protected_internal, protected, private_protected, private 322 | dotnet_naming_symbols.stylecop_constant_fields_group.required_modifiers = const 323 | dotnet_naming_symbols.stylecop_constant_fields_group.applicable_kinds = field 324 | dotnet_naming_rule.stylecop_constant_fields_must_be_pascal_case_rule.symbols = stylecop_constant_fields_group 325 | dotnet_naming_rule.stylecop_constant_fields_must_be_pascal_case_rule.style = pascal_case_style 326 | dotnet_naming_rule.stylecop_constant_fields_must_be_pascal_case_rule.severity = warning 327 | 328 | # All static readonly fields must be PascalCase 329 | # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1311.md 330 | dotnet_naming_symbols.stylecop_static_readonly_fields_group.applicable_accessibilities = public, internal, protected_internal, protected, private_protected, private 331 | dotnet_naming_symbols.stylecop_static_readonly_fields_group.required_modifiers = static, readonly 332 | dotnet_naming_symbols.stylecop_static_readonly_fields_group.applicable_kinds = field 333 | dotnet_naming_rule.stylecop_static_readonly_fields_must_be_pascal_case_rule.symbols = stylecop_static_readonly_fields_group 334 | dotnet_naming_rule.stylecop_static_readonly_fields_must_be_pascal_case_rule.style = pascal_case_style 335 | dotnet_naming_rule.stylecop_static_readonly_fields_must_be_pascal_case_rule.severity = warning 336 | 337 | # No non-private instance fields are allowed 338 | # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1401.md 339 | dotnet_naming_symbols.stylecop_fields_must_be_private_group.applicable_accessibilities = public, internal, protected_internal, protected, private_protected 340 | dotnet_naming_symbols.stylecop_fields_must_be_private_group.applicable_kinds = field 341 | dotnet_naming_rule.stylecop_instance_fields_must_be_private_rule.symbols = stylecop_fields_must_be_private_group 342 | dotnet_naming_rule.stylecop_instance_fields_must_be_private_rule.style = disallowed_style 343 | dotnet_naming_rule.stylecop_instance_fields_must_be_private_rule.severity = error 344 | 345 | # Private fields must be camelCase 346 | # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1306.md 347 | dotnet_naming_symbols.stylecop_private_fields_group.applicable_accessibilities = private 348 | dotnet_naming_symbols.stylecop_private_fields_group.applicable_kinds = field 349 | dotnet_naming_rule.stylecop_private_fields_must_be_camel_case_rule.symbols = stylecop_private_fields_group 350 | dotnet_naming_rule.stylecop_private_fields_must_be_camel_case_rule.style = camel_case_style 351 | dotnet_naming_rule.stylecop_private_fields_must_be_camel_case_rule.severity = error 352 | 353 | # Local variables must be camelCase 354 | # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1312.md 355 | dotnet_naming_symbols.stylecop_local_fields_group.applicable_accessibilities = local 356 | dotnet_naming_symbols.stylecop_local_fields_group.applicable_kinds = local 357 | dotnet_naming_rule.stylecop_local_fields_must_be_camel_case_rule.symbols = stylecop_local_fields_group 358 | dotnet_naming_rule.stylecop_local_fields_must_be_camel_case_rule.style = camel_case_style 359 | dotnet_naming_rule.stylecop_local_fields_must_be_camel_case_rule.severity = error 360 | 361 | # This rule should never fire. However, it's included for at least two purposes: 362 | # First, it helps to understand, reason about, and root-case certain types of issues, such as bugs in .editorconfig parsers. 363 | # Second, it helps to raise immediate awareness if a new field type is added (as occurred recently in C#). 364 | dotnet_naming_symbols.sanity_check_uncovered_field_case_group.applicable_accessibilities = * 365 | dotnet_naming_symbols.sanity_check_uncovered_field_case_group.applicable_kinds = field 366 | dotnet_naming_rule.sanity_check_uncovered_field_case_rule.symbols = sanity_check_uncovered_field_case_group 367 | dotnet_naming_rule.sanity_check_uncovered_field_case_rule.style = internal_error_style 368 | dotnet_naming_rule.sanity_check_uncovered_field_case_rule.severity = error 369 | 370 | 371 | ########################################## 372 | # Other Naming Rules 373 | ########################################## 374 | 375 | # All of the following must be PascalCase: 376 | # - Namespaces 377 | # https://docs.microsoft.com/dotnet/standard/design-guidelines/names-of-namespaces 378 | # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1300.md 379 | # - Classes and Enumerations 380 | # https://docs.microsoft.com/dotnet/standard/design-guidelines/names-of-classes-structs-and-interfaces 381 | # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1300.md 382 | # - Delegates 383 | # https://docs.microsoft.com/dotnet/standard/design-guidelines/names-of-classes-structs-and-interfaces#names-of-common-types 384 | # - Constructors, Properties, Events, Methods 385 | # https://docs.microsoft.com/dotnet/standard/design-guidelines/names-of-type-members 386 | dotnet_naming_symbols.element_group.applicable_kinds = namespace, class, enum, struct, delegate, event, method, property 387 | dotnet_naming_rule.element_rule.symbols = element_group 388 | dotnet_naming_rule.element_rule.style = pascal_case_style 389 | dotnet_naming_rule.element_rule.severity = warning 390 | 391 | # Interfaces use PascalCase and are prefixed with uppercase 'I' 392 | # https://docs.microsoft.com/dotnet/standard/design-guidelines/names-of-classes-structs-and-interfaces 393 | dotnet_naming_symbols.interface_group.applicable_kinds = interface 394 | dotnet_naming_rule.interface_rule.symbols = interface_group 395 | dotnet_naming_rule.interface_rule.style = prefix_interface_with_i_style 396 | dotnet_naming_rule.interface_rule.severity = warning 397 | 398 | # Generics Type Parameters use PascalCase and are prefixed with uppercase 'T' 399 | # https://docs.microsoft.com/dotnet/standard/design-guidelines/names-of-classes-structs-and-interfaces 400 | dotnet_naming_symbols.type_parameter_group.applicable_kinds = type_parameter 401 | dotnet_naming_rule.type_parameter_rule.symbols = type_parameter_group 402 | dotnet_naming_rule.type_parameter_rule.style = prefix_type_parameters_with_t_style 403 | dotnet_naming_rule.type_parameter_rule.severity = warning 404 | 405 | # Function parameters use camelCase 406 | # https://docs.microsoft.com/dotnet/standard/design-guidelines/naming-parameters 407 | dotnet_naming_symbols.parameters_group.applicable_kinds = parameter 408 | dotnet_naming_rule.parameters_rule.symbols = parameters_group 409 | dotnet_naming_rule.parameters_rule.style = camel_case_style 410 | dotnet_naming_rule.parameters_rule.severity = error 411 | 412 | # Allow flags suffix. 413 | dotnet_code_quality.ca1711.allowed_suffixes = Flag|Flags 414 | 415 | ########################################## 416 | # License 417 | ########################################## 418 | # The following applies as to the .editorconfig file ONLY, and is 419 | # included below for reference, per the requirements of the license 420 | # corresponding to this .editorconfig file. 421 | # See: https://github.com/RehanSaeed/EditorConfig 422 | # 423 | # MIT License 424 | # 425 | # Copyright (c) 2017-2019 Muhammad Rehan Saeed 426 | # Copyright (c) 2019 Henry Gabryjelski 427 | # 428 | # Permission is hereby granted, free of charge, to any 429 | # person obtaining a copy of this software and associated 430 | # documentation files (the "Software"), to deal in the 431 | # Software without restriction, including without limitation 432 | # the rights to use, copy, modify, merge, publish, distribute, 433 | # sublicense, and/or sell copies of the Software, and to permit 434 | # persons to whom the Software is furnished to do so, subject 435 | # to the following conditions: 436 | # 437 | # The above copyright notice and this permission notice shall be 438 | # included in all copies or substantial portions of the Software. 439 | # 440 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 441 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 442 | # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 443 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 444 | # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 445 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 446 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 447 | # OTHER DEALINGS IN THE SOFTWARE. 448 | ########################################## 449 | -------------------------------------------------------------------------------- /.github/workflows/continuous-integration.yml: -------------------------------------------------------------------------------- 1 | name: Continious Integration 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | pull_request: 8 | branches: 9 | - master 10 | 11 | defaults: 12 | run: 13 | shell: bash 14 | 15 | # Set permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages 16 | permissions: 17 | contents: read 18 | pages: write 19 | id-token: write 20 | 21 | # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. 22 | # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. 23 | concurrency: 24 | group: "pages" 25 | cancel-in-progress: false 26 | 27 | jobs: 28 | build: 29 | name: "Build" 30 | runs-on: ubuntu-latest 31 | steps: 32 | 33 | - uses: actions/checkout@v4 34 | with: 35 | fetch-depth: '0' 36 | - name: Setup Pages 37 | if: github.ref == 'refs/heads/master' 38 | uses: actions/configure-pages@v3 39 | 40 | - name: Setup .NET SDK 41 | uses: actions/setup-dotnet@v4 42 | with: 43 | dotnet-version: 9.0.x 44 | dotnet-quality: preview 45 | 46 | - name: Install wasm-tools workload 47 | run: | 48 | dotnet workload install wasm-tools 49 | 50 | - name: Setup Verlite 51 | run: | 52 | verlite_version="$(grep '"Verlite\.MsBuild"' src/WebGL.Sample/WebGL.Sample.csproj | LC_ALL=en_US.utf8 grep -Po 'Version="\K[^"]+')" 53 | dotnet tool install --global Verlite.CLI --version "$verlite_version" 54 | verlite . --auto-fetch --verbosity verbatim 55 | 56 | - name: Publish 57 | run: | 58 | dotnet publish --configuration Release -p:OutputPath="$(pwd)/build" 59 | mv build/AppBundle artifacts 60 | 61 | - name: Fix permissions 62 | run: | 63 | chmod -c -R +rX "artifacts/" | while read line; do 64 | echo "::warning title=Invalid file permissions automatically fixed::$line" 65 | done 66 | 67 | - name: Upload Artifacts 68 | uses: actions/upload-artifact@v4 69 | with: 70 | name: artifacts 71 | path: | 72 | artifacts/* 73 | 74 | - name: Upload Pages Artifacts 75 | uses: actions/upload-pages-artifact@v2 76 | if: github.ref == 'refs/heads/master' 77 | with: 78 | path: "artifacts" 79 | 80 | # Deployment job 81 | deploy: 82 | name: "Deploy" 83 | if: github.ref == 'refs/heads/master' 84 | runs-on: ubuntu-latest 85 | environment: 86 | name: github-pages 87 | url: ${{ steps.deployment.outputs.page_url }} 88 | needs: build 89 | steps: 90 | - name: Deploy to GitHub Pages 91 | id: deployment 92 | uses: actions/deploy-pages@v2 93 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | obj/ 2 | *.user 3 | .vs/ 4 | bin 5 | artifacts 6 | .vscode 7 | artifactspublish 8 | build 9 | buildpublish 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Javi Carnero 4 | Copyright (c) 2021 Ashleigh Adams 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # .NET WebGL sample 2 | 3 | This is a minimum viable product for running WebGL, using dotnet's WebAssembly and Silk's OpenGLES bindings with emscripten. 4 | 5 | Thanks to WaveEngine/@emepetres's wasm sample projects for help and original samples and references. 6 | -------------------------------------------------------------------------------- /WebGL.Sample.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.0.31815.197 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebGL.Sample", "src\WebGL.Sample\WebGL.Sample.csproj", "{B766EB2D-1B1A-476C-886F-18C68F9A90CD}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {B766EB2D-1B1A-476C-886F-18C68F9A90CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {B766EB2D-1B1A-476C-886F-18C68F9A90CD}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {B766EB2D-1B1A-476C-886F-18C68F9A90CD}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {B766EB2D-1B1A-476C-886F-18C68F9A90CD}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {B6EBF2C3-C9C6-46D2-8AC4-D5691E91AEEF} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /src/WebGL.Sample/Assets/Frag.glsl: -------------------------------------------------------------------------------- 1 | #version 300 es 2 | 3 | in highp vec3 color; 4 | 5 | layout(location = 0) out highp vec4 diffuse; 6 | 7 | void main() 8 | { 9 | diffuse = vec4(color, 1.0); 10 | } 11 | -------------------------------------------------------------------------------- /src/WebGL.Sample/Assets/Vert.glsl: -------------------------------------------------------------------------------- 1 | #version 300 es 2 | 3 | layout(location = 0) in highp vec2 in_xy; 4 | layout(location = 1) in highp vec3 in_rgb; 5 | 6 | out highp vec3 color; 7 | 8 | // GLSL uses the reverse order to a System.Numerics.Matrix3x2 9 | uniform mat2x3 viewprojection; 10 | 11 | void main() 12 | { 13 | gl_Position = vec4(vec3(in_xy, 1.0) * viewprojection, 0.0, 1.0); 14 | color = in_rgb; 15 | } 16 | -------------------------------------------------------------------------------- /src/WebGL.Sample/EGL.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace WebGL.Sample; 5 | 6 | internal static class EGL 7 | { 8 | public const string LibEgl = "libEGL"; 9 | public const int EGL_NONE = 0x3038; 10 | public const int EGL_RED_SIZE = 0x3024; 11 | public const int EGL_GREEN_SIZE = 0x3023; 12 | public const int EGL_BLUE_SIZE = 0x3022; 13 | public const int EGL_DEPTH_SIZE = 0x3025; 14 | public const int EGL_STENCIL_SIZE = 0x3026; 15 | public const int EGL_SURFACE_TYPE = 0x3033; 16 | public const int EGL_RENDERABLE_TYPE = 0x3040; 17 | public const int EGL_SAMPLES = 0x3031; 18 | public const int EGL_WINDOW_BIT = 0x0004; 19 | public const int EGL_OPENGL_ES2_BIT = 0x0004; 20 | public const int EGL_OPENGL_ES3_BIT = 0x00000040; 21 | public const int EGL_CONTEXT_CLIENT_VERSION = 0x3098; 22 | public const int EGL_NO_CONTEXT = 0x0; 23 | public const int EGL_NATIVE_VISUAL_ID = 0x302E; 24 | public const int EGL_OPENGL_ES_API = 0x30A0; 25 | 26 | [DllImport(LibEgl, EntryPoint = "eglGetProcAddress", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] 27 | [DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)] 28 | public static extern IntPtr GetProcAddress(string proc); 29 | 30 | [DllImport(LibEgl, EntryPoint = "eglGetDisplay", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] 31 | [DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)] 32 | public static extern IntPtr GetDisplay(IntPtr displayId); 33 | 34 | [DllImport(LibEgl, EntryPoint = "eglInitialize", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] 35 | [DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)] 36 | [return: MarshalAs(UnmanagedType.Bool)] 37 | public static extern bool Initialize(IntPtr display, out int major, out int minor); 38 | 39 | 40 | [DllImport(LibEgl, EntryPoint = "eglChooseConfig", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] 41 | [DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)] 42 | [return: MarshalAs(UnmanagedType.Bool)] 43 | public static extern bool ChooseConfig(IntPtr dpy, int[] attribList, ref IntPtr configs, IntPtr configSize/*fixed to 1*/, ref IntPtr numConfig); 44 | 45 | [DllImport(LibEgl, EntryPoint = "eglBindAPI", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] 46 | [DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)] 47 | [return: MarshalAs(UnmanagedType.Bool)] 48 | public static extern bool BindApi(int api); 49 | 50 | [DllImport(LibEgl, EntryPoint = "eglCreateContext", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] 51 | [DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)] 52 | public static extern IntPtr CreateContext(IntPtr/*EGLDisplay*/ display, IntPtr/*EGLConfig*/ config, IntPtr shareContext, int[] attribList); 53 | 54 | [DllImport(LibEgl, EntryPoint = "eglGetConfigAttrib", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] 55 | [DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)] 56 | [return: MarshalAs(UnmanagedType.Bool)] 57 | public static extern bool GetConfigAttrib(IntPtr/*EGLDisplay*/ display, IntPtr/*EGLConfig*/ config, IntPtr attribute, ref IntPtr value); 58 | 59 | [DllImport(LibEgl, EntryPoint = "eglCreateWindowSurface", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] 60 | [DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)] 61 | public static extern IntPtr CreateWindowSurface(IntPtr display, IntPtr config, IntPtr win, IntPtr attribList/*fixed to NULL*/); 62 | 63 | [DllImport(LibEgl, EntryPoint = "eglDestroySurface", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] 64 | [DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)] 65 | public static extern int DestroySurface(IntPtr display, IntPtr surface); 66 | 67 | [DllImport(LibEgl, EntryPoint = "eglDestroyContext", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] 68 | [DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)] 69 | public static extern int DestroyContext(IntPtr display, IntPtr ctx); 70 | 71 | [DllImport(LibEgl, EntryPoint = "eglMakeCurrent", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] 72 | [DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)] 73 | [return: MarshalAs(UnmanagedType.Bool)] 74 | public static extern bool MakeCurrent(IntPtr display, IntPtr draw, IntPtr read, IntPtr ctx); 75 | 76 | [DllImport(LibEgl, EntryPoint = "eglTerminate", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] 77 | [DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)] 78 | public static extern int Terminate(IntPtr display); 79 | 80 | [DllImport(LibEgl, EntryPoint = "eglSwapBuffers", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] 81 | [DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)] 82 | public static extern int SwapBuffers(IntPtr display, IntPtr surface); 83 | 84 | [DllImport(LibEgl, EntryPoint = "eglSwapInterval", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] 85 | [DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)] 86 | public static extern int SwapInterval(IntPtr display, int interval); 87 | } 88 | -------------------------------------------------------------------------------- /src/WebGL.Sample/Emscripten.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace WebGL.Sample; 4 | 5 | internal static class Emscripten 6 | { 7 | [DllImport("emscripten", EntryPoint = "emscripten_request_animation_frame_loop")] 8 | [DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)] 9 | internal static extern unsafe void RequestAnimationFrameLoop(void* f, nint userDataPtr); 10 | } 11 | -------------------------------------------------------------------------------- /src/WebGL.Sample/Interop.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices.JavaScript; 3 | 4 | using Silk.NET.OpenGLES; 5 | 6 | namespace WebGL.Sample; 7 | 8 | internal static partial class Interop 9 | { 10 | [JSImport("initialize", "main.js")] 11 | public static partial void Initialize(); 12 | 13 | [JSExport] 14 | public static void OnKeyDown(bool shift, bool ctrl, bool alt, bool repeat, int code) 15 | { 16 | } 17 | 18 | [JSExport] 19 | public static void OnKeyUp(bool shift, bool ctrl, bool alt, int code) 20 | { 21 | } 22 | 23 | [JSExport] 24 | public static void OnMouseMove(float x, float y) 25 | { 26 | } 27 | 28 | [JSExport] 29 | public static void OnMouseDown(bool shift, bool ctrl, bool alt, int button) 30 | { 31 | } 32 | 33 | [JSExport] 34 | public static void OnMouseUp(bool shift, bool ctrl, bool alt, int button) 35 | { 36 | } 37 | 38 | [JSExport] 39 | public static void OnCanvasResize(float width, float height, float devicePixelRatio) 40 | { 41 | Test.CanvasResized((int)width, (int)height); 42 | } 43 | 44 | [JSExport] 45 | public static void SetRootUri(string uri) 46 | { 47 | Test.BaseAddress = new Uri(uri); 48 | } 49 | 50 | [JSExport] 51 | public static void AddLocale(string locale) 52 | { 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/WebGL.Sample/MeshData.cs: -------------------------------------------------------------------------------- 1 | namespace WebGL.Sample; 2 | 3 | public static class MeshData 4 | { 5 | public static VertexShaderInput[] TriangleVerts { get; } = new VertexShaderInput[] 6 | { 7 | new() { Vertex = new(-0.000000f, +0.000000f), Color = new(0f, 0f, 0f) }, 8 | new() { Vertex = new(-0.499997f, +0.499891f), Color = new(0.318f, 0.169f, 0.831f) }, 9 | new() { Vertex = new(+0.499997f, +0.499891f), Color = new(0.318f, 0.169f, 0.831f) }, 10 | new() { Vertex = new(+0.499997f, -0.499891f), Color = new(0.318f, 0.169f, 0.831f) }, 11 | new() { Vertex = new(-0.499997f, -0.499891f), Color = new(0.318f, 0.169f, 0.831f) }, 12 | new() { Vertex = new(-0.321766f, -0.138858f), Color = new(1f, 1f, 1f) }, 13 | new() { Vertex = new(-0.323511f, -0.138809f), Color = new(1f, 1f, 1f) }, 14 | new() { Vertex = new(-0.325213f, -0.138662f), Color = new(1f, 1f, 1f) }, 15 | new() { Vertex = new(-0.326870f, -0.138416f), Color = new(1f, 1f, 1f) }, 16 | new() { Vertex = new(-0.328483f, -0.138073f), Color = new(1f, 1f, 1f) }, 17 | new() { Vertex = new(-0.330052f, -0.137631f), Color = new(1f, 1f, 1f) }, 18 | new() { Vertex = new(-0.331576f, -0.137092f), Color = new(1f, 1f, 1f) }, 19 | new() { Vertex = new(-0.333057f, -0.136454f), Color = new(1f, 1f, 1f) }, 20 | new() { Vertex = new(-0.334493f, -0.135718f), Color = new(1f, 1f, 1f) }, 21 | new() { Vertex = new(-0.335885f, -0.134883f), Color = new(1f, 1f, 1f) }, 22 | new() { Vertex = new(-0.337233f, -0.133951f), Color = new(1f, 1f, 1f) }, 23 | new() { Vertex = new(-0.338537f, -0.132920f), Color = new(1f, 1f, 1f) }, 24 | new() { Vertex = new(-0.339796f, -0.131791f), Color = new(1f, 1f, 1f) }, 25 | new() { Vertex = new(-0.340982f, -0.130565f), Color = new(1f, 1f, 1f) }, 26 | new() { Vertex = new(-0.342065f, -0.129300f), Color = new(1f, 1f, 1f) }, 27 | new() { Vertex = new(-0.343044f, -0.127997f), Color = new(1f, 1f, 1f) }, 28 | new() { Vertex = new(-0.343921f, -0.126657f), Color = new(1f, 1f, 1f) }, 29 | new() { Vertex = new(-0.344694f, -0.125280f), Color = new(1f, 1f, 1f) }, 30 | new() { Vertex = new(-0.345364f, -0.123864f), Color = new(1f, 1f, 1f) }, 31 | new() { Vertex = new(-0.345931f, -0.122411f), Color = new(1f, 1f, 1f) }, 32 | new() { Vertex = new(-0.346395f, -0.120920f), Color = new(1f, 1f, 1f) }, 33 | new() { Vertex = new(-0.346756f, -0.119391f), Color = new(1f, 1f, 1f) }, 34 | new() { Vertex = new(-0.347014f, -0.117824f), Color = new(1f, 1f, 1f) }, 35 | new() { Vertex = new(-0.347169f, -0.116220f), Color = new(1f, 1f, 1f) }, 36 | new() { Vertex = new(-0.347220f, -0.114578f), Color = new(1f, 1f, 1f) }, 37 | new() { Vertex = new(-0.347169f, -0.112907f), Color = new(1f, 1f, 1f) }, 38 | new() { Vertex = new(-0.347014f, -0.111276f), Color = new(1f, 1f, 1f) }, 39 | new() { Vertex = new(-0.346756f, -0.109685f), Color = new(1f, 1f, 1f) }, 40 | new() { Vertex = new(-0.346395f, -0.108135f), Color = new(1f, 1f, 1f) }, 41 | new() { Vertex = new(-0.345931f, -0.106625f), Color = new(1f, 1f, 1f) }, 42 | new() { Vertex = new(-0.345364f, -0.105155f), Color = new(1f, 1f, 1f) }, 43 | new() { Vertex = new(-0.344694f, -0.103726f), Color = new(1f, 1f, 1f) }, 44 | new() { Vertex = new(-0.343921f, -0.102337f), Color = new(1f, 1f, 1f) }, 45 | new() { Vertex = new(-0.343044f, -0.100988f), Color = new(1f, 1f, 1f) }, 46 | new() { Vertex = new(-0.342065f, -0.099679f), Color = new(1f, 1f, 1f) }, 47 | new() { Vertex = new(-0.340982f, -0.098411f), Color = new(1f, 1f, 1f) }, 48 | new() { Vertex = new(-0.339796f, -0.097183f), Color = new(1f, 1f, 1f) }, 49 | new() { Vertex = new(-0.338537f, -0.096025f), Color = new(1f, 1f, 1f) }, 50 | new() { Vertex = new(-0.337233f, -0.094968f), Color = new(1f, 1f, 1f) }, 51 | new() { Vertex = new(-0.335885f, -0.094012f), Color = new(1f, 1f, 1f) }, 52 | new() { Vertex = new(-0.334493f, -0.093156f), Color = new(1f, 1f, 1f) }, 53 | new() { Vertex = new(-0.333057f, -0.092401f), Color = new(1f, 1f, 1f) }, 54 | new() { Vertex = new(-0.331576f, -0.091747f), Color = new(1f, 1f, 1f) }, 55 | new() { Vertex = new(-0.330052f, -0.091193f), Color = new(1f, 1f, 1f) }, 56 | new() { Vertex = new(-0.328483f, -0.090740f), Color = new(1f, 1f, 1f) }, 57 | new() { Vertex = new(-0.326870f, -0.090387f), Color = new(1f, 1f, 1f) }, 58 | new() { Vertex = new(-0.325213f, -0.090136f), Color = new(1f, 1f, 1f) }, 59 | new() { Vertex = new(-0.323511f, -0.089985f), Color = new(1f, 1f, 1f) }, 60 | new() { Vertex = new(-0.321766f, -0.089934f), Color = new(1f, 1f, 1f) }, 61 | new() { Vertex = new(-0.319992f, -0.089985f), Color = new(1f, 1f, 1f) }, 62 | new() { Vertex = new(-0.318265f, -0.090136f), Color = new(1f, 1f, 1f) }, 63 | new() { Vertex = new(-0.316584f, -0.090387f), Color = new(1f, 1f, 1f) }, 64 | new() { Vertex = new(-0.314950f, -0.090740f), Color = new(1f, 1f, 1f) }, 65 | new() { Vertex = new(-0.313363f, -0.091193f), Color = new(1f, 1f, 1f) }, 66 | new() { Vertex = new(-0.311823f, -0.091747f), Color = new(1f, 1f, 1f) }, 67 | new() { Vertex = new(-0.310329f, -0.092401f), Color = new(1f, 1f, 1f) }, 68 | new() { Vertex = new(-0.308881f, -0.093156f), Color = new(1f, 1f, 1f) }, 69 | new() { Vertex = new(-0.307481f, -0.094012f), Color = new(1f, 1f, 1f) }, 70 | new() { Vertex = new(-0.306127f, -0.094968f), Color = new(1f, 1f, 1f) }, 71 | new() { Vertex = new(-0.304819f, -0.096025f), Color = new(1f, 1f, 1f) }, 72 | new() { Vertex = new(-0.303559f, -0.097183f), Color = new(1f, 1f, 1f) }, 73 | new() { Vertex = new(-0.302345f, -0.098411f), Color = new(1f, 1f, 1f) }, 74 | new() { Vertex = new(-0.301236f, -0.099679f), Color = new(1f, 1f, 1f) }, 75 | new() { Vertex = new(-0.300233f, -0.100988f), Color = new(1f, 1f, 1f) }, 76 | new() { Vertex = new(-0.299336f, -0.102337f), Color = new(1f, 1f, 1f) }, 77 | new() { Vertex = new(-0.298544f, -0.103726f), Color = new(1f, 1f, 1f) }, 78 | new() { Vertex = new(-0.297858f, -0.105155f), Color = new(1f, 1f, 1f) }, 79 | new() { Vertex = new(-0.297277f, -0.106625f), Color = new(1f, 1f, 1f) }, 80 | new() { Vertex = new(-0.296802f, -0.108135f), Color = new(1f, 1f, 1f) }, 81 | new() { Vertex = new(-0.296433f, -0.109685f), Color = new(1f, 1f, 1f) }, 82 | new() { Vertex = new(-0.296169f, -0.111276f), Color = new(1f, 1f, 1f) }, 83 | new() { Vertex = new(-0.296010f, -0.112907f), Color = new(1f, 1f, 1f) }, 84 | new() { Vertex = new(-0.295958f, -0.114578f), Color = new(1f, 1f, 1f) }, 85 | new() { Vertex = new(-0.296010f, -0.116220f), Color = new(1f, 1f, 1f) }, 86 | new() { Vertex = new(-0.296169f, -0.117824f), Color = new(1f, 1f, 1f) }, 87 | new() { Vertex = new(-0.296433f, -0.119391f), Color = new(1f, 1f, 1f) }, 88 | new() { Vertex = new(-0.296802f, -0.120920f), Color = new(1f, 1f, 1f) }, 89 | new() { Vertex = new(-0.297277f, -0.122411f), Color = new(1f, 1f, 1f) }, 90 | new() { Vertex = new(-0.297858f, -0.123864f), Color = new(1f, 1f, 1f) }, 91 | new() { Vertex = new(-0.298544f, -0.125280f), Color = new(1f, 1f, 1f) }, 92 | new() { Vertex = new(-0.299336f, -0.126657f), Color = new(1f, 1f, 1f) }, 93 | new() { Vertex = new(-0.300233f, -0.127997f), Color = new(1f, 1f, 1f) }, 94 | new() { Vertex = new(-0.301236f, -0.129300f), Color = new(1f, 1f, 1f) }, 95 | new() { Vertex = new(-0.302345f, -0.130565f), Color = new(1f, 1f, 1f) }, 96 | new() { Vertex = new(-0.303559f, -0.131791f), Color = new(1f, 1f, 1f) }, 97 | new() { Vertex = new(-0.304819f, -0.132920f), Color = new(1f, 1f, 1f) }, 98 | new() { Vertex = new(-0.306127f, -0.133951f), Color = new(1f, 1f, 1f) }, 99 | new() { Vertex = new(-0.307481f, -0.134883f), Color = new(1f, 1f, 1f) }, 100 | new() { Vertex = new(-0.308881f, -0.135718f), Color = new(1f, 1f, 1f) }, 101 | new() { Vertex = new(-0.310329f, -0.136454f), Color = new(1f, 1f, 1f) }, 102 | new() { Vertex = new(-0.311823f, -0.137092f), Color = new(1f, 1f, 1f) }, 103 | new() { Vertex = new(-0.313363f, -0.137631f), Color = new(1f, 1f, 1f) }, 104 | new() { Vertex = new(-0.314950f, -0.138073f), Color = new(1f, 1f, 1f) }, 105 | new() { Vertex = new(-0.316584f, -0.138416f), Color = new(1f, 1f, 1f) }, 106 | new() { Vertex = new(-0.318265f, -0.138662f), Color = new(1f, 1f, 1f) }, 107 | new() { Vertex = new(-0.319992f, -0.138809f), Color = new(1f, 1f, 1f) }, 108 | new() { Vertex = new(-0.039107f, -0.134872f), Color = new(1f, 1f, 1f) }, 109 | new() { Vertex = new(-0.085067f, -0.134872f), Color = new(1f, 1f, 1f) }, 110 | new() { Vertex = new(-0.206152f, +0.056115f), Color = new(1f, 1f, 1f) }, 111 | new() { Vertex = new(-0.206907f, +0.057327f), Color = new(1f, 1f, 1f) }, 112 | new() { Vertex = new(-0.207640f, +0.058546f), Color = new(1f, 1f, 1f) }, 113 | new() { Vertex = new(-0.208351f, +0.059773f), Color = new(1f, 1f, 1f) }, 114 | new() { Vertex = new(-0.209039f, +0.061008f), Color = new(1f, 1f, 1f) }, 115 | new() { Vertex = new(-0.209706f, +0.062250f), Color = new(1f, 1f, 1f) }, 116 | new() { Vertex = new(-0.210351f, +0.063500f), Color = new(1f, 1f, 1f) }, 117 | new() { Vertex = new(-0.210973f, +0.064757f), Color = new(1f, 1f, 1f) }, 118 | new() { Vertex = new(-0.211573f, +0.066022f), Color = new(1f, 1f, 1f) }, 119 | new() { Vertex = new(-0.212152f, +0.067294f), Color = new(1f, 1f, 1f) }, 120 | new() { Vertex = new(-0.212708f, +0.068574f), Color = new(1f, 1f, 1f) }, 121 | new() { Vertex = new(-0.213241f, +0.069861f), Color = new(1f, 1f, 1f) }, 122 | new() { Vertex = new(-0.213753f, +0.071155f), Color = new(1f, 1f, 1f) }, 123 | new() { Vertex = new(-0.213774f, +0.071155f), Color = new(1f, 1f, 1f) }, 124 | new() { Vertex = new(-0.213832f, +0.071155f), Color = new(1f, 1f, 1f) }, 125 | new() { Vertex = new(-0.213919f, +0.071155f), Color = new(1f, 1f, 1f) }, 126 | new() { Vertex = new(-0.214028f, +0.071155f), Color = new(1f, 1f, 1f) }, 127 | new() { Vertex = new(-0.214152f, +0.071155f), Color = new(1f, 1f, 1f) }, 128 | new() { Vertex = new(-0.214284f, +0.071155f), Color = new(1f, 1f, 1f) }, 129 | new() { Vertex = new(-0.214415f, +0.071155f), Color = new(1f, 1f, 1f) }, 130 | new() { Vertex = new(-0.214539f, +0.071155f), Color = new(1f, 1f, 1f) }, 131 | new() { Vertex = new(-0.214649f, +0.071155f), Color = new(1f, 1f, 1f) }, 132 | new() { Vertex = new(-0.214736f, +0.071155f), Color = new(1f, 1f, 1f) }, 133 | new() { Vertex = new(-0.214793f, +0.071155f), Color = new(1f, 1f, 1f) }, 134 | new() { Vertex = new(-0.214814f, +0.071155f), Color = new(1f, 1f, 1f) }, 135 | new() { Vertex = new(-0.214588f, +0.069634f), Color = new(1f, 1f, 1f) }, 136 | new() { Vertex = new(-0.214382f, +0.067848f), Color = new(1f, 1f, 1f) }, 137 | new() { Vertex = new(-0.214196f, +0.065798f), Color = new(1f, 1f, 1f) }, 138 | new() { Vertex = new(-0.214029f, +0.063484f), Color = new(1f, 1f, 1f) }, 139 | new() { Vertex = new(-0.213881f, +0.060906f), Color = new(1f, 1f, 1f) }, 140 | new() { Vertex = new(-0.213754f, +0.058063f), Color = new(1f, 1f, 1f) }, 141 | new() { Vertex = new(-0.213645f, +0.054956f), Color = new(1f, 1f, 1f) }, 142 | new() { Vertex = new(-0.213557f, +0.051585f), Color = new(1f, 1f, 1f) }, 143 | new() { Vertex = new(-0.213488f, +0.047950f), Color = new(1f, 1f, 1f) }, 144 | new() { Vertex = new(-0.213439f, +0.044051f), Color = new(1f, 1f, 1f) }, 145 | new() { Vertex = new(-0.213410f, +0.039887f), Color = new(1f, 1f, 1f) }, 146 | new() { Vertex = new(-0.213400f, +0.035459f), Color = new(1f, 1f, 1f) }, 147 | new() { Vertex = new(-0.213400f, +0.032108f), Color = new(1f, 1f, 1f) }, 148 | new() { Vertex = new(-0.213400f, +0.022842f), Color = new(1f, 1f, 1f) }, 149 | new() { Vertex = new(-0.213400f, +0.008845f), Color = new(1f, 1f, 1f) }, 150 | new() { Vertex = new(-0.213400f, -0.008701f), Color = new(1f, 1f, 1f) }, 151 | new() { Vertex = new(-0.213400f, -0.028612f), Color = new(1f, 1f, 1f) }, 152 | new() { Vertex = new(-0.213400f, -0.049706f), Color = new(1f, 1f, 1f) }, 153 | new() { Vertex = new(-0.213400f, -0.070801f), Color = new(1f, 1f, 1f) }, 154 | new() { Vertex = new(-0.213400f, -0.090712f), Color = new(1f, 1f, 1f) }, 155 | new() { Vertex = new(-0.213400f, -0.108258f), Color = new(1f, 1f, 1f) }, 156 | new() { Vertex = new(-0.213400f, -0.122255f), Color = new(1f, 1f, 1f) }, 157 | new() { Vertex = new(-0.213400f, -0.131521f), Color = new(1f, 1f, 1f) }, 158 | new() { Vertex = new(-0.213400f, -0.134872f), Color = new(1f, 1f, 1f) }, 159 | new() { Vertex = new(-0.254058f, -0.134872f), Color = new(1f, 1f, 1f) }, 160 | new() { Vertex = new(-0.254058f, +0.124973f), Color = new(1f, 1f, 1f) }, 161 | new() { Vertex = new(-0.205093f, +0.124973f), Color = new(1f, 1f, 1f) }, 162 | new() { Vertex = new(-0.088072f, -0.061484f), Color = new(1f, 1f, 1f) }, 163 | new() { Vertex = new(-0.086871f, -0.063367f), Color = new(1f, 1f, 1f) }, 164 | new() { Vertex = new(-0.085744f, -0.065149f), Color = new(1f, 1f, 1f) }, 165 | new() { Vertex = new(-0.084691f, -0.066831f), Color = new(1f, 1f, 1f) }, 166 | new() { Vertex = new(-0.083711f, -0.068411f), Color = new(1f, 1f, 1f) }, 167 | new() { Vertex = new(-0.082806f, -0.069891f), Color = new(1f, 1f, 1f) }, 168 | new() { Vertex = new(-0.081973f, -0.071270f), Color = new(1f, 1f, 1f) }, 169 | new() { Vertex = new(-0.081215f, -0.072549f), Color = new(1f, 1f, 1f) }, 170 | new() { Vertex = new(-0.080529f, -0.073727f), Color = new(1f, 1f, 1f) }, 171 | new() { Vertex = new(-0.079918f, -0.074804f), Color = new(1f, 1f, 1f) }, 172 | new() { Vertex = new(-0.079380f, -0.075780f), Color = new(1f, 1f, 1f) }, 173 | new() { Vertex = new(-0.078916f, -0.076656f), Color = new(1f, 1f, 1f) }, 174 | new() { Vertex = new(-0.078526f, -0.077431f), Color = new(1f, 1f, 1f) }, 175 | new() { Vertex = new(-0.078512f, -0.077431f), Color = new(1f, 1f, 1f) }, 176 | new() { Vertex = new(-0.078474f, -0.077431f), Color = new(1f, 1f, 1f) }, 177 | new() { Vertex = new(-0.078415f, -0.077431f), Color = new(1f, 1f, 1f) }, 178 | new() { Vertex = new(-0.078343f, -0.077431f), Color = new(1f, 1f, 1f) }, 179 | new() { Vertex = new(-0.078260f, -0.077431f), Color = new(1f, 1f, 1f) }, 180 | new() { Vertex = new(-0.078173f, -0.077431f), Color = new(1f, 1f, 1f) }, 181 | new() { Vertex = new(-0.078085f, -0.077431f), Color = new(1f, 1f, 1f) }, 182 | new() { Vertex = new(-0.078003f, -0.077431f), Color = new(1f, 1f, 1f) }, 183 | new() { Vertex = new(-0.077930f, -0.077431f), Color = new(1f, 1f, 1f) }, 184 | new() { Vertex = new(-0.077872f, -0.077431f), Color = new(1f, 1f, 1f) }, 185 | new() { Vertex = new(-0.077834f, -0.077431f), Color = new(1f, 1f, 1f) }, 186 | new() { Vertex = new(-0.077820f, -0.077431f), Color = new(1f, 1f, 1f) }, 187 | new() { Vertex = new(-0.078102f, -0.075610f), Color = new(1f, 1f, 1f) }, 188 | new() { Vertex = new(-0.078359f, -0.073591f), Color = new(1f, 1f, 1f) }, 189 | new() { Vertex = new(-0.078593f, -0.071372f), Color = new(1f, 1f, 1f) }, 190 | new() { Vertex = new(-0.078801f, -0.068955f), Color = new(1f, 1f, 1f) }, 191 | new() { Vertex = new(-0.078985f, -0.066339f), Color = new(1f, 1f, 1f) }, 192 | new() { Vertex = new(-0.079145f, -0.063524f), Color = new(1f, 1f, 1f) }, 193 | new() { Vertex = new(-0.079280f, -0.060510f), Color = new(1f, 1f, 1f) }, 194 | new() { Vertex = new(-0.079391f, -0.057297f), Color = new(1f, 1f, 1f) }, 195 | new() { Vertex = new(-0.079477f, -0.053886f), Color = new(1f, 1f, 1f) }, 196 | new() { Vertex = new(-0.079538f, -0.050275f), Color = new(1f, 1f, 1f) }, 197 | new() { Vertex = new(-0.079575f, -0.046466f), Color = new(1f, 1f, 1f) }, 198 | new() { Vertex = new(-0.079587f, -0.042458f), Color = new(1f, 1f, 1f) }, 199 | new() { Vertex = new(-0.079587f, -0.039164f), Color = new(1f, 1f, 1f) }, 200 | new() { Vertex = new(-0.079587f, -0.030056f), Color = new(1f, 1f, 1f) }, 201 | new() { Vertex = new(-0.079587f, -0.016297f), Color = new(1f, 1f, 1f) }, 202 | new() { Vertex = new(-0.079587f, +0.000950f), Color = new(1f, 1f, 1f) }, 203 | new() { Vertex = new(-0.079587f, +0.020522f), Color = new(1f, 1f, 1f) }, 204 | new() { Vertex = new(-0.079587f, +0.041257f), Color = new(1f, 1f, 1f) }, 205 | new() { Vertex = new(-0.079587f, +0.061992f), Color = new(1f, 1f, 1f) }, 206 | new() { Vertex = new(-0.079587f, +0.081565f), Color = new(1f, 1f, 1f) }, 207 | new() { Vertex = new(-0.079587f, +0.098812f), Color = new(1f, 1f, 1f) }, 208 | new() { Vertex = new(-0.079587f, +0.112571f), Color = new(1f, 1f, 1f) }, 209 | new() { Vertex = new(-0.079587f, +0.121679f), Color = new(1f, 1f, 1f) }, 210 | new() { Vertex = new(-0.079587f, +0.124973f), Color = new(1f, 1f, 1f) }, 211 | new() { Vertex = new(-0.039107f, +0.124973f), Color = new(1f, 1f, 1f) }, 212 | new() { Vertex = new(+0.158878f, -0.134872f), Color = new(1f, 1f, 1f) }, 213 | new() { Vertex = new(+0.016581f, -0.134872f), Color = new(1f, 1f, 1f) }, 214 | new() { Vertex = new(+0.016581f, +0.124973f), Color = new(1f, 1f, 1f) }, 215 | new() { Vertex = new(+0.153223f, +0.124973f), Color = new(1f, 1f, 1f) }, 216 | new() { Vertex = new(+0.153223f, +0.088369f), Color = new(1f, 1f, 1f) }, 217 | new() { Vertex = new(+0.058653f, +0.088369f), Color = new(1f, 1f, 1f) }, 218 | new() { Vertex = new(+0.058653f, +0.014802f), Color = new(1f, 1f, 1f) }, 219 | new() { Vertex = new(+0.145799f, +0.014802f), Color = new(1f, 1f, 1f) }, 220 | new() { Vertex = new(+0.145799f, -0.021620f), Color = new(1f, 1f, 1f) }, 221 | new() { Vertex = new(+0.058653f, -0.021620f), Color = new(1f, 1f, 1f) }, 222 | new() { Vertex = new(+0.058653f, -0.098450f), Color = new(1f, 1f, 1f) }, 223 | new() { Vertex = new(+0.158878f, -0.098450f), Color = new(1f, 1f, 1f) }, 224 | new() { Vertex = new(+0.361109f, +0.088369f), Color = new(1f, 1f, 1f) }, 225 | new() { Vertex = new(+0.288281f, +0.088369f), Color = new(1f, 1f, 1f) }, 226 | new() { Vertex = new(+0.288281f, -0.134872f), Color = new(1f, 1f, 1f) }, 227 | new() { Vertex = new(+0.246209f, -0.134872f), Color = new(1f, 1f, 1f) }, 228 | new() { Vertex = new(+0.246209f, +0.088369f), Color = new(1f, 1f, 1f) }, 229 | new() { Vertex = new(+0.173558f, +0.088369f), Color = new(1f, 1f, 1f) }, 230 | new() { Vertex = new(+0.173558f, +0.124973f), Color = new(1f, 1f, 1f) }, 231 | new() { Vertex = new(+0.361109f, +0.124973f), Color = new(1f, 1f, 1f) }, 232 | }; 233 | public static ushort[] TriangleIndices { get; } = new ushort[] 234 | { 235 | 4, 2, 1, 236 | 4, 3, 2, 237 | 52, 54, 53, 238 | 51, 54, 52, 239 | 51, 55, 54, 240 | 50, 55, 51, 241 | 50, 56, 55, 242 | 49, 56, 50, 243 | 49, 57, 56, 244 | 48, 57, 49, 245 | 48, 58, 57, 246 | 47, 58, 48, 247 | 47, 59, 58, 248 | 46, 59, 47, 249 | 46, 60, 59, 250 | 45, 60, 46, 251 | 45, 61, 60, 252 | 44, 61, 45, 253 | 44, 62, 61, 254 | 43, 62, 44, 255 | 43, 63, 62, 256 | 42, 63, 43, 257 | 42, 64, 63, 258 | 41, 64, 42, 259 | 41, 65, 64, 260 | 40, 65, 41, 261 | 40, 66, 65, 262 | 40, 67, 66, 263 | 39, 67, 40, 264 | 39, 68, 67, 265 | 38, 68, 39, 266 | 38, 69, 68, 267 | 37, 69, 38, 268 | 37, 70, 69, 269 | 36, 70, 37, 270 | 36, 71, 70, 271 | 35, 71, 36, 272 | 35, 72, 71, 273 | 34, 72, 35, 274 | 34, 73, 72, 275 | 33, 73, 34, 276 | 33, 74, 73, 277 | 32, 74, 33, 278 | 32, 75, 74, 279 | 31, 75, 32, 280 | 31, 76, 75, 281 | 30, 76, 31, 282 | 30, 77, 76, 283 | 29, 77, 30, 284 | 28, 77, 29, 285 | 28, 78, 77, 286 | 27, 78, 28, 287 | 27, 79, 78, 288 | 26, 79, 27, 289 | 26, 80, 79, 290 | 25, 80, 26, 291 | 25, 81, 80, 292 | 24, 81, 25, 293 | 24, 82, 81, 294 | 23, 82, 24, 295 | 23, 83, 82, 296 | 22, 83, 23, 297 | 22, 84, 83, 298 | 21, 84, 22, 299 | 21, 85, 84, 300 | 20, 85, 21, 301 | 20, 86, 85, 302 | 19, 86, 20, 303 | 19, 87, 86, 304 | 18, 87, 19, 305 | 18, 88, 87, 306 | 17, 88, 18, 307 | 17, 89, 88, 308 | 16, 89, 17, 309 | 16, 90, 89, 310 | 15, 90, 16, 311 | 15, 91, 90, 312 | 14, 91, 15, 313 | 14, 92, 91, 314 | 13, 92, 14, 315 | 13, 93, 92, 316 | 12, 93, 13, 317 | 12, 94, 93, 318 | 11, 94, 12, 319 | 11, 95, 94, 320 | 10, 95, 11, 321 | 10, 96, 95, 322 | 9, 96, 10, 323 | 9, 97, 96, 324 | 8, 97, 9, 325 | 8, 98, 97, 326 | 7, 98, 8, 327 | 7, 99, 98, 328 | 6, 99, 7, 329 | 6, 100, 99, 330 | 5, 100, 6, 331 | 152, 154, 153, 332 | 152, 127, 154, 333 | 127, 126, 154, 334 | 126, 125, 154, 335 | 125, 124, 154, 336 | 124, 123, 154, 337 | 123, 122, 154, 338 | 122, 121, 154, 339 | 121, 120, 154, 340 | 120, 119, 154, 341 | 119, 118, 154, 342 | 118, 117, 154, 343 | 117, 116, 154, 344 | 116, 115, 154, 345 | 115, 155, 154, 346 | 202, 204, 203, 347 | 202, 101, 204, 348 | 201, 101, 202, 349 | 200, 101, 201, 350 | 199, 101, 200, 351 | 198, 101, 199, 352 | 152, 128, 127, 353 | 114, 155, 115, 354 | 113, 155, 114, 355 | 152, 129, 128, 356 | 112, 155, 113, 357 | 152, 130, 129, 358 | 111, 155, 112, 359 | 110, 155, 111, 360 | 152, 131, 130, 361 | 109, 155, 110, 362 | 108, 155, 109, 363 | 152, 132, 131, 364 | 107, 155, 108, 365 | 197, 101, 198, 366 | 106, 155, 107, 367 | 152, 133, 132, 368 | 105, 155, 106, 369 | 104, 155, 105, 370 | 152, 134, 133, 371 | 103, 155, 104, 372 | 102, 155, 103, 373 | 152, 135, 134, 374 | 152, 136, 135, 375 | 152, 137, 136, 376 | 152, 138, 137, 377 | 196, 101, 197, 378 | 152, 139, 138, 379 | 152, 140, 139, 380 | 152, 141, 140, 381 | 152, 142, 141, 382 | 195, 101, 196, 383 | 152, 143, 142, 384 | 194, 101, 195, 385 | 152, 144, 143, 386 | 193, 101, 194, 387 | 152, 145, 144, 388 | 192, 101, 193, 389 | 191, 101, 192, 390 | 190, 101, 191, 391 | 189, 101, 190, 392 | 152, 146, 145, 393 | 188, 101, 189, 394 | 187, 101, 188, 395 | 186, 101, 187, 396 | 185, 101, 186, 397 | 102, 156, 155, 398 | 102, 157, 156, 399 | 184, 101, 185, 400 | 102, 158, 157, 401 | 183, 101, 184, 402 | 102, 159, 158, 403 | 102, 160, 159, 404 | 182, 101, 183, 405 | 102, 161, 160, 406 | 152, 147, 146, 407 | 102, 162, 161, 408 | 181, 101, 182, 409 | 102, 163, 162, 410 | 180, 101, 181, 411 | 102, 164, 163, 412 | 102, 165, 164, 413 | 179, 101, 180, 414 | 102, 166, 165, 415 | 102, 167, 166, 416 | 102, 168, 167, 417 | 102, 169, 168, 418 | 102, 170, 169, 419 | 102, 171, 170, 420 | 102, 172, 171, 421 | 102, 173, 172, 422 | 102, 174, 173, 423 | 102, 175, 174, 424 | 102, 176, 175, 425 | 102, 177, 176, 426 | 102, 178, 177, 427 | 102, 179, 178, 428 | 102, 101, 179, 429 | 152, 148, 147, 430 | 152, 149, 148, 431 | 152, 150, 149, 432 | 152, 151, 150, 433 | 206, 210, 207, 434 | 210, 208, 207, 435 | 210, 209, 208, 436 | 206, 211, 210, 437 | 206, 214, 211, 438 | 214, 212, 211, 439 | 214, 213, 212, 440 | 206, 215, 214, 441 | 206, 216, 215, 442 | 206, 205, 216, 443 | 222, 224, 223, 444 | 222, 217, 224, 445 | 221, 217, 222, 446 | 220, 218, 221, 447 | 218, 217, 221, 448 | 220, 219, 218, 449 | }; 450 | } 451 | -------------------------------------------------------------------------------- /src/WebGL.Sample/MeshDemo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using System.Net.Http; 4 | using System.Numerics; 5 | using System.Runtime.InteropServices; 6 | using System.Threading.Tasks; 7 | 8 | using CoroutineScheduler; 9 | 10 | using Silk.NET.OpenGLES; 11 | 12 | namespace WebGL.Sample; 13 | 14 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "POD")] 15 | [StructLayout(LayoutKind.Sequential, Pack = 1)] 16 | public struct VertexShaderInput 17 | { 18 | public Vector2 Vertex; 19 | public Vector3 Color; 20 | }; 21 | 22 | public class MeshDemo 23 | { 24 | private GL Gl { get; } 25 | private Scheduler Scheduler { get; } 26 | 27 | private static async Task DownloadFile( 28 | HttpClient client, 29 | string path) 30 | { 31 | var response = await client.GetAsync(new Uri(path, UriKind.Relative)); 32 | if (!response.IsSuccessStatusCode) 33 | throw new Exception(); 34 | return await response.Content.ReadAsStringAsync(); 35 | } 36 | 37 | public static async Task LoadAsync(GL gl, Uri baseAddress) 38 | { 39 | var client = new HttpClient() 40 | { 41 | BaseAddress = baseAddress, 42 | }; 43 | 44 | var vertResponseTask = DownloadFile(client, "Assets/Vert.glsl"); 45 | var fragResponseTask = DownloadFile(client, "Assets/Frag.glsl"); 46 | 47 | await Task.WhenAll(vertResponseTask, fragResponseTask); 48 | 49 | var vertSource = await vertResponseTask; 50 | var fragSource = await fragResponseTask; 51 | 52 | return new MeshDemo(gl, vertSource, fragSource); 53 | } 54 | 55 | // shader ids 56 | private uint ShaderProgram { get; } 57 | private uint VertexShader { get; } 58 | private uint FragmentShader { get; } 59 | private int ViewProjectionLocation { get; } 60 | // vao ids 61 | private uint VAO { get; set; } 62 | private uint VBO { get; set; } 63 | private uint VBI { get; set; } 64 | private VertexShaderInput[] VertexBuffer { get; } 65 | private ushort[] IndexBuffer { get; } 66 | 67 | unsafe private MeshDemo( 68 | GL gl, 69 | string vertexSource, 70 | string fragmentSource) 71 | { 72 | Gl = gl; 73 | Scheduler = new(); 74 | _ = Scheduler.SpawnTask(LogicThread); 75 | 76 | // setup the vertex buffer to draw 77 | VertexBuffer = new VertexShaderInput[MeshData.TriangleVerts.Length]; 78 | IndexBuffer = new ushort[MeshData.TriangleIndices.Length]; 79 | 80 | // create the shader 81 | ShaderProgram = gl.CreateProgram(); 82 | 83 | VertexShader = gl.CreateShader(ShaderType.VertexShader); 84 | gl.ShaderSource(VertexShader, vertexSource); 85 | gl.CompileShader(VertexShader); 86 | gl.GetShader(VertexShader, ShaderParameterName.CompileStatus, out int res); 87 | //gl.GetShaderInfoLog(VertexShader, out string log); 88 | Debug.Assert(res != 0); 89 | 90 | FragmentShader = gl.CreateShader(ShaderType.FragmentShader); 91 | gl.ShaderSource(FragmentShader, fragmentSource); 92 | gl.CompileShader(FragmentShader); 93 | gl.GetShader(FragmentShader, ShaderParameterName.CompileStatus, out res); 94 | //gl.GetShaderInfoLog(FragmentShader, out log); 95 | Debug.Assert(res != 0); 96 | 97 | gl.AttachShader(ShaderProgram, VertexShader); 98 | gl.AttachShader(ShaderProgram, FragmentShader); 99 | gl.LinkProgram(ShaderProgram); 100 | 101 | gl.GetProgram(ShaderProgram, ProgramPropertyARB.LinkStatus, out res); 102 | //gl.GetProgramInfoLog(ShaderProgram, out log); 103 | Debug.Assert(res != 0); 104 | 105 | ViewProjectionLocation = gl.GetUniformLocation(ShaderProgram, "viewprojection"u8); 106 | Debug.Assert(gl.GetError() == GLEnum.NoError, "GetUniformLocation()"); 107 | 108 | // use and configure the shader 109 | gl.UseProgram(ShaderProgram); 110 | var vp = Matrix3x2.Identity; 111 | Span matrix = stackalloc float[] 112 | { 113 | vp.M11, vp.M21, vp.M31, 114 | vp.M12, vp.M22, vp.M32 115 | }; 116 | gl.UniformMatrix2x3(ViewProjectionLocation, false, matrix); 117 | var err = gl.GetError(); 118 | 119 | // create the VAO 120 | VAO = gl.GenVertexArray(); 121 | gl.BindVertexArray(VAO); 122 | 123 | Span vbos = stackalloc uint[2]; 124 | gl.GenBuffers(vbos); 125 | VBO = vbos[0]; 126 | VBI = vbos[1]; 127 | 128 | int vert_size = Marshal.SizeOf(); 129 | int colr_size = Marshal.SizeOf(); 130 | int stride = Marshal.SizeOf(); 131 | 132 | gl.BindBuffer(BufferTargetARB.ArrayBuffer, VBO); 133 | gl.BufferData( 134 | BufferTargetARB.ArrayBuffer, 135 | (nuint)(stride * VertexBuffer.Length), 136 | in nint.Zero, 137 | BufferUsageARB.StreamDraw); 138 | 139 | gl.EnableVertexAttribArray(0); // vertex 140 | gl.EnableVertexAttribArray(1); // color 141 | 142 | gl.VertexAttribPointer(0, vert_size / sizeof(float), VertexAttribPointerType.Float, false, (uint)stride, (void*)(0)); 143 | gl.VertexAttribPointer(1, colr_size / sizeof(float), VertexAttribPointerType.Float, false, (uint)stride, (void*)(vert_size)); 144 | 145 | gl.BindBuffer(BufferTargetARB.ElementArrayBuffer, VBI); 146 | gl.BufferData(BufferTargetARB.ElementArrayBuffer, (nuint)(sizeof(ushort) * IndexBuffer.Length), null, BufferUsageARB.StreamDraw); 147 | 148 | gl.BindVertexArray(0); 149 | Debug.Assert(gl.GetError() == GLEnum.NoError); 150 | } 151 | 152 | public void BindVAO() 153 | { 154 | Gl.BindVertexArray(VAO); 155 | Gl.BindBuffer(BufferTargetARB.ArrayBuffer, VBO); 156 | Gl.BindBuffer(BufferTargetARB.ElementArrayBuffer, VBI); 157 | Debug.Assert(Gl.GetError() == GLEnum.NoError); 158 | } 159 | 160 | public void UnbindVAO() 161 | { 162 | Gl.BindVertexArray(0); 163 | Gl.BindBuffer(BufferTargetARB.ArrayBuffer, 0); 164 | Gl.BindBuffer(BufferTargetARB.ElementArrayBuffer, 0); 165 | Debug.Assert(Gl.GetError() == GLEnum.NoError); 166 | } 167 | 168 | private Vector2 LogoTranslation { get; set; } 169 | private Vector2 LogoScale { get; set; } = Vector2.One; 170 | private float LogoRotation { get; set; } 171 | public unsafe void Render() 172 | { 173 | // iterate our logic thread 174 | Scheduler.Resume(); 175 | 176 | // update the vertex buffer 177 | var modelMatrix = 178 | Matrix3x2.CreateScale(LogoScale) * 179 | Matrix3x2.CreateRotation(LogoRotation) * 180 | Matrix3x2.CreateTranslation(LogoTranslation); 181 | for (int i = 0; i < MeshData.TriangleVerts.Length; i++) 182 | { 183 | ref var dstVert = ref VertexBuffer[i]; 184 | ref var srcVert = ref MeshData.TriangleVerts[i]; 185 | dstVert.Vertex = Vector2.Transform(srcVert.Vertex, modelMatrix); 186 | dstVert.Color = srcVert.Color; 187 | } 188 | for (int i = 0; i < MeshData.TriangleIndices.Length; i++) 189 | IndexBuffer[i] = MeshData.TriangleIndices[i]; 190 | 191 | // dispatch GL commands 192 | Gl.ClearColor(0.392f, 0.584f, 0.929f, 1.0f); 193 | Gl.Clear(ClearBufferMask.ColorBufferBit); 194 | 195 | BindVAO(); 196 | Gl.BufferData(BufferTargetARB.ArrayBuffer, VertexBuffer, BufferUsageARB.StreamDraw); 197 | Gl.BufferData(BufferTargetARB.ElementArrayBuffer, IndexBuffer, BufferUsageARB.StreamDraw); 198 | Gl.DrawElements(PrimitiveType.Triangles, (uint)IndexBuffer.Length, DrawElementsType.UnsignedShort, (void*)0); 199 | UnbindVAO(); 200 | } 201 | 202 | internal void CanvasResized(int width, int height) 203 | { 204 | Gl.Viewport(0, 0, (uint)width, (uint)height); 205 | 206 | // note: in a rea lgame, aspect ratio corrections should be applies 207 | // to your projection transform, not your model transform 208 | LogoScale = new Vector2(height / (float)width, 1.0f); 209 | } 210 | 211 | public async Task MoveTo(Vector2 position, float speed) 212 | { 213 | var delta = position - LogoTranslation; 214 | var deltaPerFrame = delta / delta.Length() * speed; 215 | 216 | int count = (int)(delta.Length() / deltaPerFrame.Length()); 217 | for (int i = 0; i < count; i++) 218 | { 219 | LogoTranslation += deltaPerFrame; 220 | await Scheduler.Yield(); 221 | } 222 | LogoTranslation = position; 223 | } 224 | 225 | private async Task LogicThread() 226 | { 227 | const float speed = 0.005f; 228 | while (true) 229 | { 230 | await MoveTo(new Vector2(-0.7f, +0.0f), speed); 231 | await MoveTo(new Vector2(+0.0f, +0.5f), speed); 232 | await MoveTo(new Vector2(+0.7f, +0.0f), speed); 233 | await MoveTo(new Vector2(+0.0f, -0.5f), speed); 234 | } 235 | } 236 | } 237 | -------------------------------------------------------------------------------- /src/WebGL.Sample/Native/emscripten.c: -------------------------------------------------------------------------------- 1 | #include "emscripten.h" -------------------------------------------------------------------------------- /src/WebGL.Sample/Native/libEGL.c: -------------------------------------------------------------------------------- 1 | #include -------------------------------------------------------------------------------- /src/WebGL.Sample/Native/openal32.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include -------------------------------------------------------------------------------- /src/WebGL.Sample/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | using System.Runtime.Versioning; 4 | using System.Threading.Tasks; 5 | 6 | using Silk.NET.OpenGLES; 7 | 8 | [assembly: SupportedOSPlatform("browser")] 9 | 10 | namespace WebGL.Sample; 11 | 12 | public static class Test 13 | { 14 | public static Uri? BaseAddress { get; internal set; } 15 | private static MeshDemo? Demo { get; set; } 16 | [UnmanagedCallersOnly] 17 | public static int Frame(double time, nint userData) 18 | { 19 | ArgumentNullException.ThrowIfNull(Demo); 20 | 21 | Demo.Render(); 22 | 23 | return 1; 24 | } 25 | 26 | private static int CanvasWidth { get; set; } 27 | private static int CanvasHeight { get; set; } 28 | public static void CanvasResized(int width, int height) 29 | { 30 | CanvasWidth = width; 31 | CanvasHeight = height; 32 | Demo?.CanvasResized(CanvasWidth, CanvasHeight); 33 | } 34 | 35 | public async static Task Main(string[] args) 36 | { 37 | Console.WriteLine($"Hello from dotnet!"); 38 | 39 | var display = EGL.GetDisplay(IntPtr.Zero); 40 | if (display == IntPtr.Zero) 41 | throw new Exception("Display was null"); 42 | 43 | if (!EGL.Initialize(display, out int major, out int minor)) 44 | throw new Exception("Initialize() returned false."); 45 | 46 | int[] attributeList = new int[] 47 | { 48 | EGL.EGL_RED_SIZE , 8, 49 | EGL.EGL_GREEN_SIZE, 8, 50 | EGL.EGL_BLUE_SIZE , 8, 51 | EGL.EGL_DEPTH_SIZE, 24, 52 | EGL.EGL_STENCIL_SIZE, 8, 53 | EGL.EGL_SURFACE_TYPE, EGL.EGL_WINDOW_BIT, 54 | EGL.EGL_RENDERABLE_TYPE, EGL.EGL_OPENGL_ES3_BIT, 55 | EGL.EGL_SAMPLES, 16, //MSAA, 16 samples 56 | EGL.EGL_NONE 57 | }; 58 | 59 | var config = IntPtr.Zero; 60 | var numConfig = IntPtr.Zero; 61 | if (!EGL.ChooseConfig(display, attributeList, ref config, (IntPtr)1, ref numConfig)) 62 | throw new Exception("ChoseConfig() failed"); 63 | if (numConfig == IntPtr.Zero) 64 | throw new Exception("ChoseConfig() returned no configs"); 65 | 66 | if (!EGL.BindApi(EGL.EGL_OPENGL_ES_API)) 67 | throw new Exception("BindApi() failed"); 68 | 69 | int[] ctxAttribs = new int[] { EGL.EGL_CONTEXT_CLIENT_VERSION, 3, EGL.EGL_NONE }; 70 | var context = EGL.CreateContext(display, config, (IntPtr)EGL.EGL_NO_CONTEXT, ctxAttribs); 71 | if (context == IntPtr.Zero) 72 | throw new Exception("CreateContext() failed"); 73 | 74 | // now create the surface 75 | var surface = EGL.CreateWindowSurface(display, config, IntPtr.Zero, IntPtr.Zero); 76 | if (surface == IntPtr.Zero) 77 | throw new Exception("CreateWindowSurface() failed"); 78 | 79 | if (!EGL.MakeCurrent(display, surface, surface, context)) 80 | throw new Exception("MakeCurrent() failed"); 81 | 82 | //_ = EGL.DestroyContext(display, context); 83 | //_ = EGL.DestroySurface(display, surface); 84 | //_ = EGL.Terminate(display); 85 | 86 | TrampolineFuncs.ApplyWorkaroundFixingInvocations(); 87 | 88 | var gl = GL.GetApi(EGL.GetProcAddress); 89 | 90 | Interop.Initialize(); 91 | ArgumentNullException.ThrowIfNull(BaseAddress); 92 | 93 | Demo = await MeshDemo.LoadAsync(gl, BaseAddress); 94 | Demo?.CanvasResized(CanvasWidth, CanvasHeight); 95 | 96 | unsafe 97 | { 98 | Emscripten.RequestAnimationFrameLoop((delegate* unmanaged)&Frame, nint.Zero); 99 | } 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /src/WebGL.Sample/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "WebGL.Sample": { 4 | "commandName": "Project", 5 | "launchBrowser": true, 6 | "environmentVariables": { 7 | "ASPNETCORE_ENVIRONMENT": "Development" 8 | }, 9 | "applicationUrl": "https://localhost:7010;http://localhost:5076", 10 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/debug?browser={browserInspectUri}" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/WebGL.Sample/TrampolineFuncs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics.CodeAnalysis; 3 | using System.Runtime.InteropServices; 4 | 5 | 6 | using Silk.NET.OpenGLES; 7 | 8 | namespace WebGL.Sample; 9 | 10 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "OpenGL names")] 11 | internal unsafe static class TrampolineFuncs 12 | { 13 | [DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(TrampolineFuncs))] 14 | public static void ApplyWorkaroundFixingInvocations() 15 | { 16 | // this function needs to be here, else the trampolines below get trimmed 17 | } 18 | 19 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 20 | private delegate void glCullFace_t(TriangleFace mode); 21 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 22 | private delegate void glFrontFace_t(FrontFaceDirection mode); 23 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 24 | private delegate void glHint_t(HintTarget target, HintMode mode); 25 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 26 | private delegate void glLineWidth_t(float width); 27 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 28 | private delegate void glPointSize_t(float size); 29 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 30 | private delegate void glPolygonMode_t(GLEnum face, PolygonMode mode); 31 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 32 | private delegate void glScissor_t(int x, int y, int width, int height); 33 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 34 | private delegate void glTexParameterf_t(TextureTarget target, TextureParameterName pname, float param); 35 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 36 | private delegate void glTexParameterfv_t(TextureTarget target, TextureParameterName pname, float* @params); 37 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 38 | private delegate void glTexParameteri_t(TextureTarget target, TextureParameterName pname, int param); 39 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 40 | private delegate void glTexParameteriv_t(TextureTarget target, TextureParameterName pname, int* @params); 41 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 42 | private delegate void glTexImage1D_t(TextureTarget target, int level, int internalformat, int width, int border, PixelFormat format, PixelType type, void* pixels); 43 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 44 | private delegate void glTexImage2D_t(TextureTarget target, int level, int internalformat, int width, int height, int border, PixelFormat format, PixelType type, void* pixels); 45 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 46 | private delegate void glDrawBuffer_t(DrawBufferMode buf); 47 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 48 | private delegate void glClear_t(uint mask); 49 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 50 | private delegate void glClearColor_t(float red, float green, float blue, float alpha); 51 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 52 | private delegate void glClearStencil_t(int s); 53 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 54 | private delegate void glClearDepth_t(double depth); 55 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 56 | private delegate void glStencilMask_t(uint mask); 57 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 58 | private delegate void glColorMask_t(bool red, bool green, bool blue, bool alpha); 59 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 60 | private delegate void glDepthMask_t(bool flag); 61 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 62 | private delegate void glDisable_t(EnableCap cap); 63 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 64 | private delegate void glEnable_t(EnableCap cap); 65 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 66 | private delegate void glFinish_t(); 67 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 68 | private delegate void glFlush_t(); 69 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 70 | private delegate void glBlendFunc_t(BlendingFactor sfactor, BlendingFactor dfactor); 71 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 72 | private delegate void glLogicOp_t(LogicOp opcode); 73 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 74 | private delegate void glStencilFunc_t(StencilFunction func, int @ref, uint mask); 75 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 76 | private delegate void glStencilOp_t(StencilOp fail, StencilOp zfail, StencilOp zpass); 77 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 78 | private delegate void glDepthFunc_t(DepthFunction func); 79 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 80 | private delegate void glPixelStoref_t(PixelStoreParameter pname, float param); 81 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 82 | private delegate void glPixelStorei_t(PixelStoreParameter pname, int param); 83 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 84 | private delegate void glReadBuffer_t(ReadBufferMode src); 85 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 86 | private delegate void glReadPixels_t(int x, int y, int width, int height, PixelFormat format, PixelType type, void* pixels); 87 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 88 | private delegate void glGetBooleanv_t(GetPName pname, bool* data); 89 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 90 | private delegate void glGetDoublev_t(GetPName pname, double* data); 91 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 92 | private delegate ErrorCode glGetError_t(); 93 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 94 | private delegate void glGetFloatv_t(GetPName pname, float* data); 95 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 96 | private delegate void glGetIntegerv_t(GetPName pname, int* data); 97 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 98 | private delegate byte* glGetString_t(StringName name); 99 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 100 | private delegate void glGetTexImage_t(TextureTarget target, int level, PixelFormat format, PixelType type, void* pixels); 101 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 102 | private delegate void glGetTexParameterfv_t(TextureTarget target, GetTextureParameter pname, float* @params); 103 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 104 | private delegate void glGetTexParameteriv_t(TextureTarget target, GetTextureParameter pname, int* @params); 105 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 106 | private delegate void glGetTexLevelParameterfv_t(TextureTarget target, int level, GetTextureParameter pname, float* @params); 107 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 108 | private delegate void glGetTexLevelParameteriv_t(TextureTarget target, int level, GetTextureParameter pname, int* @params); 109 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 110 | private delegate bool glIsEnabled_t(EnableCap cap); 111 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 112 | private delegate void glDepthRange_t(double n, double f); 113 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 114 | private delegate void glViewport_t(int x, int y, int width, int height); 115 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 116 | private delegate void glDrawArrays_t(PrimitiveType mode, int first, int count); 117 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 118 | private delegate void glDrawElements_t(PrimitiveType mode, int count, DrawElementsType type, void* indices); 119 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 120 | private delegate void glPolygonOffset_t(float factor, float units); 121 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 122 | private delegate void glCopyTexImage1D_t(TextureTarget target, int level, InternalFormat internalformat, int x, int y, int width, int border); 123 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 124 | private delegate void glCopyTexImage2D_t(TextureTarget target, int level, InternalFormat internalformat, int x, int y, int width, int height, int border); 125 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 126 | private delegate void glCopyTexSubImage1D_t(TextureTarget target, int level, int xoffset, int x, int y, int width); 127 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 128 | private delegate void glCopyTexSubImage2D_t(TextureTarget target, int level, int xoffset, int yoffset, int x, int y, int width, int height); 129 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 130 | private delegate void glTexSubImage1D_t(TextureTarget target, int level, int xoffset, int width, PixelFormat format, PixelType type, void* pixels); 131 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 132 | private delegate void glTexSubImage2D_t(TextureTarget target, int level, int xoffset, int yoffset, int width, int height, PixelFormat format, PixelType type, void* pixels); 133 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 134 | private delegate void glBindTexture_t(TextureTarget target, uint texture); 135 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 136 | private delegate void glDeleteTextures_t(int n, uint* textures); 137 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 138 | private delegate void glGenTextures_t(int n, uint* textures); 139 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 140 | private delegate bool glIsTexture_t(uint texture); 141 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 142 | private delegate void glDrawRangeElements_t(PrimitiveType mode, uint start, uint end, int count, DrawElementsType type, void* indices); 143 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 144 | private delegate void glTexImage3D_t(TextureTarget target, int level, int internalformat, int width, int height, int depth, int border, PixelFormat format, PixelType type, void* pixels); 145 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 146 | private delegate void glTexSubImage3D_t(TextureTarget target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, PixelFormat format, PixelType type, void* pixels); 147 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 148 | private delegate void glCopyTexSubImage3D_t(TextureTarget target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height); 149 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 150 | private delegate void glActiveTexture_t(TextureUnit texture); 151 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 152 | private delegate void glSampleCoverage_t(float value, bool invert); 153 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 154 | private delegate void glCompressedTexImage3D_t(TextureTarget target, int level, InternalFormat internalformat, int width, int height, int depth, int border, int imageSize, void* data); 155 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 156 | private delegate void glCompressedTexImage2D_t(TextureTarget target, int level, InternalFormat internalformat, int width, int height, int border, int imageSize, void* data); 157 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 158 | private delegate void glCompressedTexImage1D_t(TextureTarget target, int level, InternalFormat internalformat, int width, int border, int imageSize, void* data); 159 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 160 | private delegate void glCompressedTexSubImage3D_t(TextureTarget target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, PixelFormat format, int imageSize, void* data); 161 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 162 | private delegate void glCompressedTexSubImage2D_t(TextureTarget target, int level, int xoffset, int yoffset, int width, int height, PixelFormat format, int imageSize, void* data); 163 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 164 | private delegate void glCompressedTexSubImage1D_t(TextureTarget target, int level, int xoffset, int width, PixelFormat format, int imageSize, void* data); 165 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 166 | private delegate void glGetCompressedTexImage_t(TextureTarget target, int level, void* img); 167 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 168 | private delegate void glBlendFuncSeparate_t(BlendingFactor sfactorRGB, BlendingFactor dfactorRGB, BlendingFactor sfactorAlpha, BlendingFactor dfactorAlpha); 169 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 170 | private delegate void glMultiDrawArrays_t(PrimitiveType mode, int* first, int* count, int drawcount); 171 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 172 | private delegate void glMultiDrawElements_t(PrimitiveType mode, int* count, DrawElementsType type, IntPtr indices, int drawcount); 173 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 174 | private delegate void glPointParameterf_t(uint pname, float param); 175 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 176 | private delegate void glPointParameterfv_t(uint pname, float* @params); 177 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 178 | private delegate void glPointParameteri_t(uint pname, int param); 179 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 180 | private delegate void glPointParameteriv_t(uint pname, int* @params); 181 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 182 | private delegate void glBlendColor_t(float red, float green, float blue, float alpha); 183 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 184 | private delegate void glBlendEquation_t(BlendEquationModeEXT mode); 185 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 186 | private delegate void glGenQueries_t(int n, uint* ids); 187 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 188 | private delegate void glDeleteQueries_t(int n, uint* ids); 189 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 190 | private delegate bool glIsQuery_t(uint id); 191 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 192 | private delegate void glBeginQuery_t(QueryTarget target, uint id); 193 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 194 | private delegate void glEndQuery_t(QueryTarget target); 195 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 196 | private delegate void glGetQueryiv_t(QueryTarget target, QueryParameterName pname, int* @params); 197 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 198 | private delegate void glGetQueryObjectiv_t(uint id, QueryObjectParameterName pname, int* @params); 199 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 200 | private delegate void glGetQueryObjectuiv_t(uint id, QueryObjectParameterName pname, uint* @params); 201 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 202 | private delegate void glBindBuffer_t(BufferTargetARB target, uint buffer); 203 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 204 | private delegate void glDeleteBuffers_t(int n, uint* buffers); 205 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 206 | private delegate void glGenBuffers_t(int n, uint* buffers); 207 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 208 | private delegate bool glIsBuffer_t(uint buffer); 209 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 210 | private delegate void glBufferData_t(BufferTargetARB target, int size, void* data, BufferUsageARB usage); 211 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 212 | private delegate void glBufferSubData_t(BufferTargetARB target, IntPtr offset, int size, void* data); 213 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 214 | private delegate void glGetBufferSubData_t(BufferTargetARB target, IntPtr offset, int size, void* data); 215 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 216 | private delegate void* glMapBuffer_t(BufferTargetARB target, BufferAccessARB access); 217 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 218 | private delegate bool glUnmapBuffer_t(BufferTargetARB target); 219 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 220 | private delegate void glGetBufferParameteriv_t(BufferTargetARB target, uint pname, int* @params); 221 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 222 | private delegate void glGetBufferPointerv_t(BufferTargetARB target, uint pname, void** @params); 223 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 224 | private delegate void glBlendEquationSeparate_t(BlendEquationModeEXT modeRGB, BlendEquationModeEXT modeAlpha); 225 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 226 | private delegate void glDrawBuffers_t(int n, uint* bufs); 227 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 228 | private delegate void glStencilOpSeparate_t(GLEnum face, StencilOp sfail, StencilOp dpfail, StencilOp dppass); 229 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 230 | private delegate void glStencilFuncSeparate_t(GLEnum face, StencilFunction func, int @ref, uint mask); 231 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 232 | private delegate void glStencilMaskSeparate_t(GLEnum face, uint mask); 233 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 234 | private delegate void glAttachShader_t(uint program, uint shader); 235 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 236 | private delegate void glBindAttribLocation_t(uint program, uint index, char* name); 237 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 238 | private delegate void glCompileShader_t(uint shader); 239 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 240 | private delegate uint glCreateProgram_t(); 241 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 242 | private delegate uint glCreateShader_t(ShaderType type); 243 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 244 | private delegate void glDeleteProgram_t(uint program); 245 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 246 | private delegate void glDeleteShader_t(uint shader); 247 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 248 | private delegate void glDetachShader_t(uint program, uint shader); 249 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 250 | private delegate void glDisableVertexAttribArray_t(uint index); 251 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 252 | private delegate void glEnableVertexAttribArray_t(uint index); 253 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 254 | private delegate void glGetActiveAttrib_t(uint program, uint index, int bufSize, int* length, int* size, uint* type, char* name); 255 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 256 | private delegate void glGetActiveUniform_t(uint program, uint index, int bufSize, int* length, int* size, uint* type, char* name); 257 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 258 | private delegate void glGetAttachedShaders_t(uint program, int maxCount, int* count, uint* shaders); 259 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 260 | private delegate int glGetAttribLocation_t(uint program, char* name); 261 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 262 | private delegate void glGetProgramiv_t(uint program, ProgramPropertyARB pname, int* @params); 263 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 264 | private delegate void glGetProgramInfoLog_t(uint program, int bufSize, int* length, char* infoLog); 265 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 266 | private delegate void glGetShaderiv_t(uint shader, ShaderParameterName pname, int* @params); 267 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 268 | private delegate void glGetShaderInfoLog_t(uint shader, int bufSize, int* length, char* infoLog); 269 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 270 | private delegate void glGetShaderSource_t(uint shader, int bufSize, int* length, char* source); 271 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 272 | private delegate int glGetUniformLocation_t(uint program, char* name); 273 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 274 | private delegate void glGetUniformfv_t(uint program, int location, float* @params); 275 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 276 | private delegate void glGetUniformiv_t(uint program, int location, int* @params); 277 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 278 | private delegate void glGetVertexAttribdv_t(uint index, uint pname, double* @params); 279 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 280 | private delegate void glGetVertexAttribfv_t(uint index, uint pname, float* @params); 281 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 282 | private delegate void glGetVertexAttribiv_t(uint index, uint pname, int* @params); 283 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 284 | private delegate void glGetVertexAttribPointerv_t(uint index, uint pname, void** pointer); 285 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 286 | private delegate bool glIsProgram_t(uint program); 287 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 288 | private delegate bool glIsShader_t(uint shader); 289 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 290 | private delegate void glLinkProgram_t(uint program); 291 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 292 | private delegate void glShaderSource_t(uint shader, int count, IntPtr @string, int* length); 293 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 294 | private delegate void glUseProgram_t(uint program); 295 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 296 | private delegate void glUniform1f_t(int location, float v0); 297 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 298 | private delegate void glUniform2f_t(int location, float v0, float v1); 299 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 300 | private delegate void glUniform3f_t(int location, float v0, float v1, float v2); 301 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 302 | private delegate void glUniform4f_t(int location, float v0, float v1, float v2, float v3); 303 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 304 | private delegate void glUniform1i_t(int location, int v0); 305 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 306 | private delegate void glUniform2i_t(int location, int v0, int v1); 307 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 308 | private delegate void glUniform3i_t(int location, int v0, int v1, int v2); 309 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 310 | private delegate void glUniform4i_t(int location, int v0, int v1, int v2, int v3); 311 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 312 | private delegate void glUniform1fv_t(int location, int count, float* value); 313 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 314 | private delegate void glUniform2fv_t(int location, int count, float* value); 315 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 316 | private delegate void glUniform3fv_t(int location, int count, float* value); 317 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 318 | private delegate void glUniform4fv_t(int location, int count, float* value); 319 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 320 | private delegate void glUniform1iv_t(int location, int count, int* value); 321 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 322 | private delegate void glUniform2iv_t(int location, int count, int* value); 323 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 324 | private delegate void glUniform3iv_t(int location, int count, int* value); 325 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 326 | private delegate void glUniform4iv_t(int location, int count, int* value); 327 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 328 | private delegate void glUniformMatrix2fv_t(int location, int count, bool transpose, float* value); 329 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 330 | private delegate void glUniformMatrix3fv_t(int location, int count, bool transpose, float* value); 331 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 332 | private delegate void glUniformMatrix4fv_t(int location, int count, bool transpose, float* value); 333 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 334 | private delegate void glValidateProgram_t(uint program); 335 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 336 | private delegate void glVertexAttrib1d_t(uint index, double x); 337 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 338 | private delegate void glVertexAttrib1dv_t(uint index, double* v); 339 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 340 | private delegate void glVertexAttrib1f_t(uint index, float x); 341 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 342 | private delegate void glVertexAttrib1fv_t(uint index, float* v); 343 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 344 | private delegate void glVertexAttrib1s_t(uint index, short x); 345 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 346 | private delegate void glVertexAttrib1sv_t(uint index, short* v); 347 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 348 | private delegate void glVertexAttrib2d_t(uint index, double x, double y); 349 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 350 | private delegate void glVertexAttrib2dv_t(uint index, double* v); 351 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 352 | private delegate void glVertexAttrib2f_t(uint index, float x, float y); 353 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 354 | private delegate void glVertexAttrib2fv_t(uint index, float* v); 355 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 356 | private delegate void glVertexAttrib2s_t(uint index, short x, short y); 357 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 358 | private delegate void glVertexAttrib2sv_t(uint index, short* v); 359 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 360 | private delegate void glVertexAttrib3d_t(uint index, double x, double y, double z); 361 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 362 | private delegate void glVertexAttrib3dv_t(uint index, double* v); 363 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 364 | private delegate void glVertexAttrib3f_t(uint index, float x, float y, float z); 365 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 366 | private delegate void glVertexAttrib3fv_t(uint index, float* v); 367 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 368 | private delegate void glVertexAttrib3s_t(uint index, short x, short y, short z); 369 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 370 | private delegate void glVertexAttrib3sv_t(uint index, short* v); 371 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 372 | private delegate void glVertexAttrib4Nbv_t(uint index, byte* v); 373 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 374 | private delegate void glVertexAttrib4Niv_t(uint index, int* v); 375 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 376 | private delegate void glVertexAttrib4Nsv_t(uint index, short* v); 377 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 378 | private delegate void glVertexAttrib4Nub_t(uint index, byte x, byte y, byte z, byte w); 379 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 380 | private delegate void glVertexAttrib4Nubv_t(uint index, byte* v); 381 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 382 | private delegate void glVertexAttrib4Nuiv_t(uint index, uint* v); 383 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 384 | private delegate void glVertexAttrib4Nusv_t(uint index, short* v); 385 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 386 | private delegate void glVertexAttrib4bv_t(uint index, byte* v); 387 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 388 | private delegate void glVertexAttrib4d_t(uint index, double x, double y, double z, double w); 389 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 390 | private delegate void glVertexAttrib4dv_t(uint index, double* v); 391 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 392 | private delegate void glVertexAttrib4f_t(uint index, float x, float y, float z, float w); 393 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 394 | private delegate void glVertexAttrib4fv_t(uint index, float* v); 395 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 396 | private delegate void glVertexAttrib4iv_t(uint index, int* v); 397 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 398 | private delegate void glVertexAttrib4s_t(uint index, short x, short y, short z, short w); 399 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 400 | private delegate void glVertexAttrib4sv_t(uint index, short* v); 401 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 402 | private delegate void glVertexAttrib4ubv_t(uint index, byte* v); 403 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 404 | private delegate void glVertexAttrib4uiv_t(uint index, uint* v); 405 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 406 | private delegate void glVertexAttrib4usv_t(uint index, short* v); 407 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 408 | private delegate void glVertexAttribPointer_t(uint index, int size, VertexAttribPointerType type, bool normalized, int stride, void* pointer); 409 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 410 | private delegate void glUniformMatrix2x3fv_t(int location, int count, bool transpose, float* value); 411 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 412 | private delegate void glUniformMatrix3x2fv_t(int location, int count, bool transpose, float* value); 413 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 414 | private delegate void glUniformMatrix2x4fv_t(int location, int count, bool transpose, float* value); 415 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 416 | private delegate void glUniformMatrix4x2fv_t(int location, int count, bool transpose, float* value); 417 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 418 | private delegate void glUniformMatrix3x4fv_t(int location, int count, bool transpose, float* value); 419 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 420 | private delegate void glUniformMatrix4x3fv_t(int location, int count, bool transpose, float* value); 421 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 422 | private delegate void glColorMaski_t(uint index, bool r, bool g, bool b, bool a); 423 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 424 | private delegate void glGetBooleani_v_t(BufferTargetARB target, uint index, bool* data); 425 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 426 | private delegate void glGetIntegeri_v_t(GLEnum target, uint index, int* data); 427 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 428 | private delegate void glEnablei_t(EnableCap target, uint index); 429 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 430 | private delegate void glDisablei_t(EnableCap target, uint index); 431 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 432 | private delegate bool glIsEnabledi_t(EnableCap target, uint index); 433 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 434 | private delegate void glBeginTransformFeedback_t(PrimitiveType primitiveMode); 435 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 436 | private delegate void glEndTransformFeedback_t(); 437 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 438 | private delegate void glBindBufferRange_t(BufferTargetARB target, uint index, uint buffer, IntPtr offset, int size); 439 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 440 | private delegate void glBindBufferBase_t(BufferTargetARB target, uint index, uint buffer); 441 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 442 | private delegate void glTransformFeedbackVaryings_t(uint program, int count, IntPtr varyings, uint bufferMode); 443 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 444 | private delegate void glGetTransformFeedbackVarying_t(uint program, uint index, int bufSize, int* length, int* size, uint* type, char* name); 445 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 446 | private delegate void glClampColor_t(uint target, uint clamp); 447 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 448 | private delegate void glBeginConditionalRender_t(uint id, GLEnum mode); 449 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 450 | private delegate void glEndConditionalRender_t(); 451 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 452 | private delegate void glVertexAttribIPointer_t(uint index, int size, VertexAttribPointerType type, int stride, void* pointer); 453 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 454 | private delegate void glGetVertexAttribIiv_t(uint index, VertexAttribEnum pname, int* @params); 455 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 456 | private delegate void glGetVertexAttribIuiv_t(uint index, VertexAttribEnum pname, uint* @params); 457 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 458 | private delegate void glVertexAttribI1i_t(uint index, int x); 459 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 460 | private delegate void glVertexAttribI2i_t(uint index, int x, int y); 461 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 462 | private delegate void glVertexAttribI3i_t(uint index, int x, int y, int z); 463 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 464 | private delegate void glVertexAttribI4i_t(uint index, int x, int y, int z, int w); 465 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 466 | private delegate void glVertexAttribI1ui_t(uint index, uint x); 467 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 468 | private delegate void glVertexAttribI2ui_t(uint index, uint x, uint y); 469 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 470 | private delegate void glVertexAttribI3ui_t(uint index, uint x, uint y, uint z); 471 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 472 | private delegate void glVertexAttribI4ui_t(uint index, uint x, uint y, uint z, uint w); 473 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 474 | private delegate void glVertexAttribI1iv_t(uint index, int* v); 475 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 476 | private delegate void glVertexAttribI2iv_t(uint index, int* v); 477 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 478 | private delegate void glVertexAttribI3iv_t(uint index, int* v); 479 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 480 | private delegate void glVertexAttribI4iv_t(uint index, int* v); 481 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 482 | private delegate void glVertexAttribI1uiv_t(uint index, uint* v); 483 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 484 | private delegate void glVertexAttribI2uiv_t(uint index, uint* v); 485 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 486 | private delegate void glVertexAttribI3uiv_t(uint index, uint* v); 487 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 488 | private delegate void glVertexAttribI4uiv_t(uint index, uint* v); 489 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 490 | private delegate void glVertexAttribI4bv_t(uint index, byte* v); 491 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 492 | private delegate void glVertexAttribI4sv_t(uint index, short* v); 493 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 494 | private delegate void glVertexAttribI4ubv_t(uint index, byte* v); 495 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 496 | private delegate void glVertexAttribI4usv_t(uint index, short* v); 497 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 498 | private delegate void glGetUniformuiv_t(uint program, int location, uint* @params); 499 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 500 | private delegate void glBindFragDataLocation_t(uint program, uint color, char* name); 501 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 502 | private delegate int glGetFragDataLocation_t(uint program, char* name); 503 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 504 | private delegate void glUniform1ui_t(int location, uint v0); 505 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 506 | private delegate void glUniform2ui_t(int location, uint v0, uint v1); 507 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 508 | private delegate void glUniform3ui_t(int location, uint v0, uint v1, uint v2); 509 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 510 | private delegate void glUniform4ui_t(int location, uint v0, uint v1, uint v2, uint v3); 511 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 512 | private delegate void glUniform1uiv_t(int location, int count, uint* value); 513 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 514 | private delegate void glUniform2uiv_t(int location, int count, uint* value); 515 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 516 | private delegate void glUniform3uiv_t(int location, int count, uint* value); 517 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 518 | private delegate void glUniform4uiv_t(int location, int count, uint* value); 519 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 520 | private delegate void glTexParameterIiv_t(TextureTarget target, TextureParameterName pname, int* @params); 521 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 522 | private delegate void glTexParameterIuiv_t(TextureTarget target, TextureParameterName pname, uint* @params); 523 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 524 | private delegate void glGetTexParameterIiv_t(TextureTarget target, GetTextureParameter pname, int* @params); 525 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 526 | private delegate void glGetTexParameterIuiv_t(TextureTarget target, GetTextureParameter pname, uint* @params); 527 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 528 | private delegate void glClearBufferiv_t(GLEnum buffer, int drawbuffer, int* value); 529 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 530 | private delegate void glClearBufferuiv_t(GLEnum buffer, int drawbuffer, uint* value); 531 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 532 | private delegate void glClearBufferfv_t(GLEnum buffer, int drawbuffer, float* value); 533 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 534 | private delegate void glClearBufferfi_t(GLEnum buffer, int drawbuffer, float depth, int stencil); 535 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 536 | private delegate byte* glGetStringi_t(StringName name, uint index); 537 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 538 | private delegate bool glIsRenderbuffer_t(uint renderbuffer); 539 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 540 | private delegate void glBindRenderbuffer_t(RenderbufferTarget target, uint renderbuffer); 541 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 542 | private delegate void glDeleteRenderbuffers_t(int n, uint* renderbuffers); 543 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 544 | private delegate void glGenRenderbuffers_t(int n, uint* renderbuffers); 545 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 546 | private delegate void glRenderbufferStorage_t(RenderbufferTarget target, InternalFormat internalformat, int width, int height); 547 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 548 | private delegate void glGetRenderbufferParameteriv_t(RenderbufferTarget target, RenderbufferParameterName pname, int* @params); 549 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 550 | private delegate bool glIsFramebuffer_t(uint framebuffer); 551 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 552 | private delegate void glBindFramebuffer_t(FramebufferTarget target, uint framebuffer); 553 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 554 | private delegate void glDeleteFramebuffers_t(int n, uint* framebuffers); 555 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 556 | private delegate void glGenFramebuffers_t(int n, uint* framebuffers); 557 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 558 | private delegate FramebufferStatus glCheckFramebufferStatus_t(FramebufferTarget target); 559 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 560 | private delegate void glFramebufferTexture1D_t(FramebufferTarget target, FramebufferAttachment attachment, TextureTarget textarget, uint texture, int level); 561 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 562 | private delegate void glFramebufferTexture2D_t(FramebufferTarget target, FramebufferAttachment attachment, TextureTarget textarget, uint texture, int level); 563 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 564 | private delegate void glFramebufferTexture3D_t(FramebufferTarget target, FramebufferAttachment attachment, TextureTarget textarget, uint texture, int level, int zoffset); 565 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 566 | private delegate void glFramebufferRenderbuffer_t(FramebufferTarget target, FramebufferAttachment attachment, RenderbufferTarget renderbuffertarget, uint renderbuffer); 567 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 568 | private delegate void glGetFramebufferAttachmentParameteriv_t(FramebufferTarget target, FramebufferAttachment attachment, FramebufferAttachmentParameterName pname, int* @params); 569 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 570 | private delegate void glGenerateMipmap_t(TextureTarget target); 571 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 572 | private delegate void glBlitFramebuffer_t(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, uint mask, BlitFramebufferFilter filter); 573 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 574 | private delegate void glRenderbufferStorageMultisample_t(RenderbufferTarget target, int samples, InternalFormat internalformat, int width, int height); 575 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 576 | private delegate void glFramebufferTextureLayer_t(FramebufferTarget target, FramebufferAttachment attachment, uint texture, int level, int layer); 577 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 578 | private delegate void* glMapBufferRange_t(BufferTargetARB target, IntPtr offset, int length, uint access); 579 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 580 | private delegate void glFlushMappedBufferRange_t(BufferTargetARB target, IntPtr offset, int length); 581 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 582 | private delegate void glBindVertexArray_t(uint array); 583 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 584 | private delegate void glDeleteVertexArrays_t(int n, uint* arrays); 585 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 586 | private delegate void glGenVertexArrays_t(int n, uint* arrays); 587 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 588 | private delegate bool glIsVertexArray_t(uint array); 589 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 590 | private delegate void glDrawArraysInstanced_t(PrimitiveType mode, int first, int count, int instancecount); 591 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 592 | private delegate void glDrawElementsInstanced_t(PrimitiveType mode, int count, DrawElementsType type, void* indices, int instancecount); 593 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 594 | private delegate void glTexBuffer_t(TextureTarget target, InternalFormat internalformat, uint buffer); 595 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 596 | private delegate void glPrimitiveRestartIndex_t(uint index); 597 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 598 | private delegate void glCopyBufferSubData_t(CopyBufferSubDataTarget readTarget, CopyBufferSubDataTarget writeTarget, IntPtr readOffset, IntPtr writeOffset, int size); 599 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 600 | private delegate void glGetUniformIndices_t(uint program, int uniformCount, IntPtr uniformNames, uint* uniformIndices); 601 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 602 | private delegate void glGetActiveUniformsiv_t(uint program, int uniformCount, uint* uniformIndices, UniformPName pname, int* @params); 603 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 604 | private delegate void glGetActiveUniformName_t(uint program, uint uniformIndex, int bufSize, int* length, char* uniformName); 605 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 606 | private delegate uint glGetUniformBlockIndex_t(uint program, char* uniformBlockName); 607 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 608 | private delegate void glGetActiveUniformBlockiv_t(uint program, uint uniformBlockIndex, UniformBlockPName pname, int* @params); 609 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 610 | private delegate void glGetActiveUniformBlockName_t(uint program, uint uniformBlockIndex, int bufSize, int* length, char* uniformBlockName); 611 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 612 | private delegate void glUniformBlockBinding_t(uint program, uint uniformBlockIndex, uint uniformBlockBinding); 613 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 614 | private delegate void glDrawElementsBaseVertex_t(PrimitiveType mode, int count, DrawElementsType type, void* indices, int basevertex); 615 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 616 | private delegate void glDrawRangeElementsBaseVertex_t(PrimitiveType mode, uint start, uint end, int count, DrawElementsType type, void* indices, int basevertex); 617 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 618 | private delegate void glDrawElementsInstancedBaseVertex_t(PrimitiveType mode, int count, DrawElementsType type, void* indices, int instancecount, int basevertex); 619 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 620 | private delegate void glMultiDrawElementsBaseVertex_t(PrimitiveType mode, int* count, DrawElementsType type, IntPtr indices, int drawcount, int* basevertex); 621 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 622 | private delegate void glProvokingVertex_t(VertexProvokingMode mode); 623 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 624 | private delegate IntPtr glFenceSync_t(SyncCondition condition, uint flags); 625 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 626 | private delegate bool glIsSync_t(IntPtr sync); 627 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 628 | private delegate void glDeleteSync_t(IntPtr sync); 629 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 630 | private delegate SyncStatus glClientWaitSync_t(IntPtr sync, uint flags, ulong timeout); 631 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 632 | private delegate void glWaitSync_t(IntPtr sync, uint flags, ulong timeout); 633 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 634 | private delegate void glGetInteger64v_t(GetPName pname, long* data); 635 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 636 | private delegate void glGetSynciv_t(IntPtr sync, SyncParameterName pname, int bufSize, int* length, int* values); 637 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 638 | private delegate void glGetInteger64i_v_t(GLEnum target, uint index, long* data); 639 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 640 | private delegate void glGetBufferParameteri64v_t(BufferTargetARB target, uint pname, long* @params); 641 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 642 | private delegate void glFramebufferTexture_t(FramebufferTarget target, FramebufferAttachment attachment, uint texture, int level); 643 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 644 | private delegate void glTexImage2DMultisample_t(TextureTarget target, int samples, InternalFormat internalformat, int width, int height, bool fixedsamplelocations); 645 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 646 | private delegate void glTexImage3DMultisample_t(TextureTarget target, int samples, InternalFormat internalformat, int width, int height, int depth, bool fixedsamplelocations); 647 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 648 | private delegate void glGetMultisamplefv_t(uint pname, uint index, float* val); 649 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 650 | private delegate void glSampleMaski_t(uint maskNumber, uint mask); 651 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 652 | private delegate void glBindFragDataLocationIndexed_t(uint program, uint colorNumber, uint index, char* name); 653 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 654 | private delegate int glGetFragDataIndex_t(uint program, char* name); 655 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 656 | private delegate void glGenSamplers_t(int count, uint* samplers); 657 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 658 | private delegate void glDeleteSamplers_t(int count, uint* samplers); 659 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 660 | private delegate bool glIsSampler_t(uint sampler); 661 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 662 | private delegate void glBindSampler_t(uint unit, uint sampler); 663 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 664 | private delegate void glSamplerParameteri_t(uint sampler, GLEnum pname, int param); 665 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 666 | private delegate void glSamplerParameteriv_t(uint sampler, GLEnum pname, int* param); 667 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 668 | private delegate void glSamplerParameterf_t(uint sampler, GLEnum pname, float param); 669 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 670 | private delegate void glSamplerParameterfv_t(uint sampler, GLEnum pname, float* param); 671 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 672 | private delegate void glSamplerParameterIiv_t(uint sampler, GLEnum pname, int* param); 673 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 674 | private delegate void glSamplerParameterIuiv_t(uint sampler, GLEnum pname, uint* param); 675 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 676 | private delegate void glGetSamplerParameteriv_t(uint sampler, GLEnum pname, int* @params); 677 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 678 | private delegate void glGetSamplerParameterIiv_t(uint sampler, GLEnum pname, int* @params); 679 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 680 | private delegate void glGetSamplerParameterfv_t(uint sampler, GLEnum pname, float* @params); 681 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 682 | private delegate void glGetSamplerParameterIuiv_t(uint sampler, GLEnum pname, uint* @params); 683 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 684 | private delegate void glQueryCounter_t(uint id, QueryCounterTarget target); 685 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 686 | private delegate void glGetQueryObjecti64v_t(uint id, QueryObjectParameterName pname, long* @params); 687 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 688 | private delegate void glGetQueryObjectui64v_t(uint id, QueryObjectParameterName pname, ulong* @params); 689 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 690 | private delegate void glVertexAttribDivisor_t(uint index, uint divisor); 691 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 692 | private delegate void glVertexAttribP1ui_t(uint index, VertexAttribPointerType type, bool normalized, uint value); 693 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 694 | private delegate void glVertexAttribP1uiv_t(uint index, VertexAttribPointerType type, bool normalized, uint* value); 695 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 696 | private delegate void glVertexAttribP2ui_t(uint index, VertexAttribPointerType type, bool normalized, uint value); 697 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 698 | private delegate void glVertexAttribP2uiv_t(uint index, VertexAttribPointerType type, bool normalized, uint* value); 699 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 700 | private delegate void glVertexAttribP3ui_t(uint index, VertexAttribPointerType type, bool normalized, uint value); 701 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 702 | private delegate void glVertexAttribP3uiv_t(uint index, VertexAttribPointerType type, bool normalized, uint* value); 703 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 704 | private delegate void glVertexAttribP4ui_t(uint index, VertexAttribPointerType type, bool normalized, uint value); 705 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 706 | private delegate void glVertexAttribP4uiv_t(uint index, VertexAttribPointerType type, bool normalized, uint* value); 707 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 708 | private delegate void glVertexP2ui_t(VertexPointerType type, uint value); 709 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 710 | private delegate void glVertexP2uiv_t(VertexPointerType type, uint* value); 711 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 712 | private delegate void glVertexP3ui_t(VertexPointerType type, uint value); 713 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 714 | private delegate void glVertexP3uiv_t(VertexPointerType type, uint* value); 715 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 716 | private delegate void glVertexP4ui_t(VertexPointerType type, uint value); 717 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 718 | private delegate void glVertexP4uiv_t(VertexPointerType type, uint* value); 719 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 720 | private delegate void glTexCoordP1ui_t(TexCoordPointerType type, uint coords); 721 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 722 | private delegate void glTexCoordP1uiv_t(TexCoordPointerType type, uint* coords); 723 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 724 | private delegate void glTexCoordP2ui_t(TexCoordPointerType type, uint coords); 725 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 726 | private delegate void glTexCoordP2uiv_t(TexCoordPointerType type, uint* coords); 727 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 728 | private delegate void glTexCoordP3ui_t(TexCoordPointerType type, uint coords); 729 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 730 | private delegate void glTexCoordP3uiv_t(TexCoordPointerType type, uint* coords); 731 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 732 | private delegate void glTexCoordP4ui_t(TexCoordPointerType type, uint coords); 733 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 734 | private delegate void glTexCoordP4uiv_t(TexCoordPointerType type, uint* coords); 735 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 736 | private delegate void glMultiTexCoordP1ui_t(TextureUnit texture, TexCoordPointerType type, uint coords); 737 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 738 | private delegate void glMultiTexCoordP1uiv_t(TextureUnit texture, TexCoordPointerType type, uint* coords); 739 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 740 | private delegate void glMultiTexCoordP2ui_t(TextureUnit texture, TexCoordPointerType type, uint coords); 741 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 742 | private delegate void glMultiTexCoordP2uiv_t(TextureUnit texture, TexCoordPointerType type, uint* coords); 743 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 744 | private delegate void glMultiTexCoordP3ui_t(TextureUnit texture, TexCoordPointerType type, uint coords); 745 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 746 | private delegate void glMultiTexCoordP3uiv_t(TextureUnit texture, TexCoordPointerType type, uint* coords); 747 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 748 | private delegate void glMultiTexCoordP4ui_t(TextureUnit texture, TexCoordPointerType type, uint coords); 749 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 750 | private delegate void glMultiTexCoordP4uiv_t(TextureUnit texture, TexCoordPointerType type, uint* coords); 751 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 752 | private delegate void glNormalP3ui_t(NormalPointerType type, uint coords); 753 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 754 | private delegate void glNormalP3uiv_t(NormalPointerType type, uint* coords); 755 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 756 | private delegate void glColorP3ui_t(ColorPointerType type, uint color); 757 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 758 | private delegate void glColorP3uiv_t(ColorPointerType type, uint* color); 759 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 760 | private delegate void glColorP4ui_t(ColorPointerType type, uint color); 761 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 762 | private delegate void glColorP4uiv_t(ColorPointerType type, uint* color); 763 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 764 | private delegate void glSecondaryColorP3ui_t(ColorPointerType type, uint color); 765 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 766 | private delegate void glSecondaryColorP3uiv_t(ColorPointerType type, uint* color); 767 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 768 | private delegate void glMinSampleShading_t(float value); 769 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 770 | private delegate void glBlendEquationi_t(uint buf, BlendEquationModeEXT mode); 771 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 772 | private delegate void glBlendEquationSeparatei_t(uint buf, BlendEquationModeEXT modeRGB, BlendEquationModeEXT modeAlpha); 773 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 774 | private delegate void glBlendFunci_t(uint buf, BlendingFactor src, BlendingFactor dst); 775 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 776 | private delegate void glBlendFuncSeparatei_t(uint buf, BlendingFactor srcRGB, BlendingFactor dstRGB, BlendingFactor srcAlpha, BlendingFactor dstAlpha); 777 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 778 | private delegate void glDrawArraysIndirect_t(PrimitiveType mode, void* indirect); 779 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 780 | private delegate void glDrawElementsIndirect_t(PrimitiveType mode, DrawElementsType type, void* indirect); 781 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 782 | private delegate void glUniform1d_t(int location, double x); 783 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 784 | private delegate void glUniform2d_t(int location, double x, double y); 785 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 786 | private delegate void glUniform3d_t(int location, double x, double y, double z); 787 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 788 | private delegate void glUniform4d_t(int location, double x, double y, double z, double w); 789 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 790 | private delegate void glUniform1dv_t(int location, int count, double* value); 791 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 792 | private delegate void glUniform2dv_t(int location, int count, double* value); 793 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 794 | private delegate void glUniform3dv_t(int location, int count, double* value); 795 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 796 | private delegate void glUniform4dv_t(int location, int count, double* value); 797 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 798 | private delegate void glUniformMatrix2dv_t(int location, int count, bool transpose, double* value); 799 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 800 | private delegate void glUniformMatrix3dv_t(int location, int count, bool transpose, double* value); 801 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 802 | private delegate void glUniformMatrix4dv_t(int location, int count, bool transpose, double* value); 803 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 804 | private delegate void glUniformMatrix2x3dv_t(int location, int count, bool transpose, double* value); 805 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 806 | private delegate void glUniformMatrix2x4dv_t(int location, int count, bool transpose, double* value); 807 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 808 | private delegate void glUniformMatrix3x2dv_t(int location, int count, bool transpose, double* value); 809 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 810 | private delegate void glUniformMatrix3x4dv_t(int location, int count, bool transpose, double* value); 811 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 812 | private delegate void glUniformMatrix4x2dv_t(int location, int count, bool transpose, double* value); 813 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 814 | private delegate void glUniformMatrix4x3dv_t(int location, int count, bool transpose, double* value); 815 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 816 | private delegate void glGetUniformdv_t(uint program, int location, double* @params); 817 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 818 | private delegate int glGetSubroutineUniformLocation_t(uint program, ShaderType shadertype, char* name); 819 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 820 | private delegate uint glGetSubroutineIndex_t(uint program, ShaderType shadertype, char* name); 821 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 822 | private delegate void glGetActiveSubroutineUniformiv_t(uint program, ShaderType shadertype, uint index, SubroutineParameterName pname, int* values); 823 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 824 | private delegate void glGetActiveSubroutineUniformName_t(uint program, ShaderType shadertype, uint index, int bufsize, int* length, char* name); 825 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 826 | private delegate void glGetActiveSubroutineName_t(uint program, ShaderType shadertype, uint index, int bufsize, int* length, char* name); 827 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 828 | private delegate void glUniformSubroutinesuiv_t(ShaderType shadertype, int count, uint* indices); 829 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 830 | private delegate void glGetUniformSubroutineuiv_t(ShaderType shadertype, int location, uint* @params); 831 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 832 | private delegate void glGetProgramStageiv_t(uint program, ShaderType shadertype, ProgramStagePName pname, int* values); 833 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 834 | private delegate void glPatchParameteri_t(PatchParameterName pname, int value); 835 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 836 | private delegate void glPatchParameterfv_t(PatchParameterName pname, float* values); 837 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 838 | private delegate void glBindTransformFeedback_t(BindTransformFeedbackTarget target, uint id); 839 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 840 | private delegate void glDeleteTransformFeedbacks_t(int n, uint* ids); 841 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 842 | private delegate void glGenTransformFeedbacks_t(int n, uint* ids); 843 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 844 | private delegate bool glIsTransformFeedback_t(uint id); 845 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 846 | private delegate void glPauseTransformFeedback_t(); 847 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 848 | private delegate void glResumeTransformFeedback_t(); 849 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 850 | private delegate void glDrawTransformFeedback_t(PrimitiveType mode, uint id); 851 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 852 | private delegate void glDrawTransformFeedbackStream_t(PrimitiveType mode, uint id, uint stream); 853 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 854 | private delegate void glBeginQueryIndexed_t(QueryTarget target, uint index, uint id); 855 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 856 | private delegate void glEndQueryIndexed_t(QueryTarget target, uint index); 857 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 858 | private delegate void glGetQueryIndexediv_t(uint target, uint index, QueryParameterName pname, int* @params); 859 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 860 | private delegate void glReleaseShaderCompiler_t(); 861 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 862 | private delegate void glShaderBinary_t(int count, uint* shaders, uint binaryformat, void* binary, int length); 863 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 864 | private delegate void glGetShaderPrecisionFormat_t(ShaderType shadertype, PrecisionType precisiontype, int* range, int* precision); 865 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 866 | private delegate void glDepthRangef_t(float n, float f); 867 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 868 | private delegate void glClearDepthf_t(float d); 869 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 870 | private delegate void glGetProgramBinary_t(uint program, int bufSize, int* length, uint* binaryFormat, void* binary); 871 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 872 | private delegate void glProgramBinary_t(uint program, uint binaryFormat, void* binary, int length); 873 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 874 | private delegate void glProgramParameteri_t(uint program, ProgramParameterPName pname, int value); 875 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 876 | private delegate void glUseProgramStages_t(uint pipeline, uint stages, uint program); 877 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 878 | private delegate void glActiveShaderProgram_t(uint pipeline, uint program); 879 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 880 | private delegate uint glCreateShaderProgramv_t(ShaderType type, int count, IntPtr strings); 881 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 882 | private delegate void glBindProgramPipeline_t(uint pipeline); 883 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 884 | private delegate void glDeleteProgramPipelines_t(int n, uint* pipelines); 885 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 886 | private delegate void glGenProgramPipelines_t(int n, uint* pipelines); 887 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 888 | private delegate bool glIsProgramPipeline_t(uint pipeline); 889 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 890 | private delegate void glGetProgramPipelineiv_t(uint pipeline, PipelineParameterName pname, int* @params); 891 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 892 | private delegate void glProgramUniform1i_t(uint program, int location, int v0); 893 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 894 | private delegate void glProgramUniform1iv_t(uint program, int location, int count, int* value); 895 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 896 | private delegate void glProgramUniform1f_t(uint program, int location, float v0); 897 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 898 | private delegate void glProgramUniform1fv_t(uint program, int location, int count, float* value); 899 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 900 | private delegate void glProgramUniform1d_t(uint program, int location, double v0); 901 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 902 | private delegate void glProgramUniform1dv_t(uint program, int location, int count, double* value); 903 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 904 | private delegate void glProgramUniform1ui_t(uint program, int location, uint v0); 905 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 906 | private delegate void glProgramUniform1uiv_t(uint program, int location, int count, uint* value); 907 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 908 | private delegate void glProgramUniform2i_t(uint program, int location, int v0, int v1); 909 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 910 | private delegate void glProgramUniform2iv_t(uint program, int location, int count, int* value); 911 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 912 | private delegate void glProgramUniform2f_t(uint program, int location, float v0, float v1); 913 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 914 | private delegate void glProgramUniform2fv_t(uint program, int location, int count, float* value); 915 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 916 | private delegate void glProgramUniform2d_t(uint program, int location, double v0, double v1); 917 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 918 | private delegate void glProgramUniform2dv_t(uint program, int location, int count, double* value); 919 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 920 | private delegate void glProgramUniform2ui_t(uint program, int location, uint v0, uint v1); 921 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 922 | private delegate void glProgramUniform2uiv_t(uint program, int location, int count, uint* value); 923 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 924 | private delegate void glProgramUniform3i_t(uint program, int location, int v0, int v1, int v2); 925 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 926 | private delegate void glProgramUniform3iv_t(uint program, int location, int count, int* value); 927 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 928 | private delegate void glProgramUniform3f_t(uint program, int location, float v0, float v1, float v2); 929 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 930 | private delegate void glProgramUniform3fv_t(uint program, int location, int count, float* value); 931 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 932 | private delegate void glProgramUniform3d_t(uint program, int location, double v0, double v1, double v2); 933 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 934 | private delegate void glProgramUniform3dv_t(uint program, int location, int count, double* value); 935 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 936 | private delegate void glProgramUniform3ui_t(uint program, int location, uint v0, uint v1, uint v2); 937 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 938 | private delegate void glProgramUniform3uiv_t(uint program, int location, int count, uint* value); 939 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 940 | private delegate void glProgramUniform4i_t(uint program, int location, int v0, int v1, int v2, int v3); 941 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 942 | private delegate void glProgramUniform4iv_t(uint program, int location, int count, int* value); 943 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 944 | private delegate void glProgramUniform4f_t(uint program, int location, float v0, float v1, float v2, float v3); 945 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 946 | private delegate void glProgramUniform4fv_t(uint program, int location, int count, float* value); 947 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 948 | private delegate void glProgramUniform4d_t(uint program, int location, double v0, double v1, double v2, double v3); 949 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 950 | private delegate void glProgramUniform4dv_t(uint program, int location, int count, double* value); 951 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 952 | private delegate void glProgramUniform4ui_t(uint program, int location, uint v0, uint v1, uint v2, uint v3); 953 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 954 | private delegate void glProgramUniform4uiv_t(uint program, int location, int count, uint* value); 955 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 956 | private delegate void glProgramUniformMatrix2fv_t(uint program, int location, int count, bool transpose, float* value); 957 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 958 | private delegate void glProgramUniformMatrix3fv_t(uint program, int location, int count, bool transpose, float* value); 959 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 960 | private delegate void glProgramUniformMatrix4fv_t(uint program, int location, int count, bool transpose, float* value); 961 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 962 | private delegate void glProgramUniformMatrix2dv_t(uint program, int location, int count, bool transpose, double* value); 963 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 964 | private delegate void glProgramUniformMatrix3dv_t(uint program, int location, int count, bool transpose, double* value); 965 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 966 | private delegate void glProgramUniformMatrix4dv_t(uint program, int location, int count, bool transpose, double* value); 967 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 968 | private delegate void glProgramUniformMatrix2x3fv_t(uint program, int location, int count, bool transpose, float* value); 969 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 970 | private delegate void glProgramUniformMatrix3x2fv_t(uint program, int location, int count, bool transpose, float* value); 971 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 972 | private delegate void glProgramUniformMatrix2x4fv_t(uint program, int location, int count, bool transpose, float* value); 973 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 974 | private delegate void glProgramUniformMatrix4x2fv_t(uint program, int location, int count, bool transpose, float* value); 975 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 976 | private delegate void glProgramUniformMatrix3x4fv_t(uint program, int location, int count, bool transpose, float* value); 977 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 978 | private delegate void glProgramUniformMatrix4x3fv_t(uint program, int location, int count, bool transpose, float* value); 979 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 980 | private delegate void glProgramUniformMatrix2x3dv_t(uint program, int location, int count, bool transpose, double* value); 981 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 982 | private delegate void glProgramUniformMatrix3x2dv_t(uint program, int location, int count, bool transpose, double* value); 983 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 984 | private delegate void glProgramUniformMatrix2x4dv_t(uint program, int location, int count, bool transpose, double* value); 985 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 986 | private delegate void glProgramUniformMatrix4x2dv_t(uint program, int location, int count, bool transpose, double* value); 987 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 988 | private delegate void glProgramUniformMatrix3x4dv_t(uint program, int location, int count, bool transpose, double* value); 989 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 990 | private delegate void glProgramUniformMatrix4x3dv_t(uint program, int location, int count, bool transpose, double* value); 991 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 992 | private delegate void glValidateProgramPipeline_t(uint pipeline); 993 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 994 | private delegate void glGetProgramPipelineInfoLog_t(uint pipeline, int bufSize, int* length, char* infoLog); 995 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 996 | private delegate void glVertexAttribL1d_t(uint index, double x); 997 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 998 | private delegate void glVertexAttribL2d_t(uint index, double x, double y); 999 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1000 | private delegate void glVertexAttribL3d_t(uint index, double x, double y, double z); 1001 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1002 | private delegate void glVertexAttribL4d_t(uint index, double x, double y, double z, double w); 1003 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1004 | private delegate void glVertexAttribL1dv_t(uint index, double* v); 1005 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1006 | private delegate void glVertexAttribL2dv_t(uint index, double* v); 1007 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1008 | private delegate void glVertexAttribL3dv_t(uint index, double* v); 1009 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1010 | private delegate void glVertexAttribL4dv_t(uint index, double* v); 1011 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1012 | private delegate void glVertexAttribLPointer_t(uint index, int size, VertexAttribPointerType type, int stride, void* pointer); 1013 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1014 | private delegate void glGetVertexAttribLdv_t(uint index, VertexAttribEnum pname, double* @params); 1015 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1016 | private delegate void glViewportArrayv_t(uint first, int count, float* v); 1017 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1018 | private delegate void glViewportIndexedf_t(uint index, float x, float y, float w, float h); 1019 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1020 | private delegate void glViewportIndexedfv_t(uint index, float* v); 1021 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1022 | private delegate void glScissorArrayv_t(uint first, int count, int* v); 1023 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1024 | private delegate void glScissorIndexed_t(uint index, int left, int bottom, int width, int height); 1025 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1026 | private delegate void glScissorIndexedv_t(uint index, int* v); 1027 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1028 | private delegate void glDepthRangeArrayv_t(uint first, int count, double* v); 1029 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1030 | private delegate void glDepthRangeIndexed_t(uint index, double n, double f); 1031 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1032 | private delegate void glGetFloati_v_t(GLEnum target, uint index, float* data); 1033 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1034 | private delegate void glGetDoublei_v_t(GLEnum target, uint index, double* data); 1035 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1036 | private delegate void glDrawArraysInstancedBaseInstance_t(PrimitiveType mode, int first, int count, int instancecount, uint baseinstance); 1037 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1038 | private delegate void glDrawElementsInstancedBaseInstance_t(PrimitiveType mode, int count, PrimitiveType type, void* indices, int instancecount, uint baseinstance); 1039 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1040 | private delegate void glDrawElementsInstancedBaseVertexBaseInstance_t(PrimitiveType mode, int count, DrawElementsType type, void* indices, int instancecount, int basevertex, uint baseinstance); 1041 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1042 | private delegate void glGetInternalformativ_t(TextureTarget target, InternalFormat internalformat, InternalFormatPName pname, int bufSize, int* @params); 1043 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1044 | private delegate void glGetActiveAtomicCounterBufferiv_t(uint program, uint bufferIndex, AtomicCounterBufferPName pname, int* @params); 1045 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1046 | private delegate void glBindImageTexture_t(uint unit, uint texture, int level, bool layered, int layer, BufferAccessARB access, InternalFormat format); 1047 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1048 | private delegate void glMemoryBarrier_t(uint barriers); 1049 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1050 | private delegate void glTexStorage1D_t(TextureTarget target, int levels, InternalFormat internalformat, int width); 1051 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1052 | private delegate void glTexStorage2D_t(TextureTarget target, int levels, InternalFormat internalformat, int width, int height); 1053 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1054 | private delegate void glTexStorage3D_t(TextureTarget target, int levels, InternalFormat internalformat, int width, int height, int depth); 1055 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1056 | private delegate void glDrawTransformFeedbackInstanced_t(PrimitiveType mode, uint id, int instancecount); 1057 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1058 | private delegate void glDrawTransformFeedbackStreamInstanced_t(PrimitiveType mode, uint id, uint stream, int instancecount); 1059 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1060 | private delegate void glClearBufferData_t(BufferStorageTarget target, InternalFormat internalformat, PixelFormat format, PixelType type, void* data); 1061 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1062 | private delegate void glClearBufferSubData_t(uint target, InternalFormat internalformat, IntPtr offset, int size, PixelFormat format, PixelType type, void* data); 1063 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1064 | private delegate void glDispatchCompute_t(uint num_groups_x, uint num_groups_y, uint num_groups_z); 1065 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1066 | private delegate void glDispatchComputeIndirect_t(IntPtr indirect); 1067 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1068 | private delegate void glCopyImageSubData_t(uint srcName, CopyBufferSubDataTarget srcTarget, int srcLevel, int srcX, int srcY, int srcZ, uint dstName, CopyBufferSubDataTarget dstTarget, int dstLevel, int dstX, int dstY, int dstZ, int srcWidth, int srcHeight, int srcDepth); 1069 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1070 | private delegate void glFramebufferParameteri_t(FramebufferTarget target, FramebufferParameterName pname, int param); 1071 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1072 | private delegate void glGetFramebufferParameteriv_t(FramebufferTarget target, FramebufferAttachmentParameterName pname, int* @params); 1073 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1074 | private delegate void glGetInternalformati64v_t(TextureTarget target, InternalFormat internalformat, InternalFormatPName pname, int bufSize, long* @params); 1075 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1076 | private delegate void glInvalidateTexSubImage_t(uint texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth); 1077 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1078 | private delegate void glInvalidateTexImage_t(uint texture, int level); 1079 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1080 | private delegate void glInvalidateBufferSubData_t(uint buffer, IntPtr offset, int length); 1081 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1082 | private delegate void glInvalidateBufferData_t(uint buffer); 1083 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1084 | private delegate void glInvalidateFramebuffer_t(FramebufferTarget target, int numAttachments, uint* attachments); 1085 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1086 | private delegate void glInvalidateSubFramebuffer_t(uint target, int numAttachments, uint* attachments, int x, int y, int width, int height); 1087 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1088 | private delegate void glMultiDrawArraysIndirect_t(PrimitiveType mode, void* indirect, int drawcount, int stride); 1089 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1090 | private delegate void glMultiDrawElementsIndirect_t(PrimitiveType mode, DrawElementsType type, void* indirect, int drawcount, int stride); 1091 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1092 | private delegate void glGetProgramInterfaceiv_t(uint program, ProgramInterface programInterface, ProgramInterfacePName pname, int* @params); 1093 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1094 | private delegate uint glGetProgramResourceIndex_t(uint program, ProgramInterface programInterface, char* name); 1095 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1096 | private delegate void glGetProgramResourceName_t(uint program, ProgramInterface programInterface, uint index, int bufSize, int* length, char* name); 1097 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1098 | private delegate void glGetProgramResourceiv_t(uint program, ProgramInterface programInterface, uint index, int propCount, uint* props, int bufSize, int* length, int* @params); 1099 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1100 | private delegate int glGetProgramResourceLocation_t(uint program, ProgramInterface programInterface, char* name); 1101 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1102 | private delegate int glGetProgramResourceLocationIndex_t(uint program, ProgramInterface programInterface, char* name); 1103 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1104 | private delegate void glShaderStorageBlockBinding_t(uint program, uint storageBlockIndex, uint storageBlockBinding); 1105 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1106 | private delegate void glTexBufferRange_t(TextureTarget target, InternalFormat internalformat, uint buffer, IntPtr offset, int size); 1107 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1108 | private delegate void glTexStorage2DMultisample_t(TextureTarget target, int samples, InternalFormat internalformat, int width, int height, bool fixedsamplelocations); 1109 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1110 | private delegate void glTexStorage3DMultisample_t(TextureTarget target, int samples, InternalFormat internalformat, int width, int height, int depth, bool fixedsamplelocations); 1111 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1112 | private delegate void glTextureView_t(uint texture, TextureTarget target, uint origtexture, InternalFormat internalformat, uint minlevel, uint numlevels, uint minlayer, uint numlayers); 1113 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1114 | private delegate void glBindVertexBuffer_t(uint bindingindex, uint buffer, IntPtr offset, int stride); 1115 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1116 | private delegate void glVertexAttribFormat_t(uint attribindex, int size, uint type, bool normalized, uint relativeoffset); 1117 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1118 | private delegate void glVertexAttribIFormat_t(uint attribindex, int size, uint type, uint relativeoffset); 1119 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1120 | private delegate void glVertexAttribLFormat_t(uint attribindex, int size, VertexAttribType type, uint relativeoffset); 1121 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1122 | private delegate void glVertexAttribBinding_t(uint attribindex, uint bindingindex); 1123 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1124 | private delegate void glVertexBindingDivisor_t(uint bindingindex, uint divisor); 1125 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1126 | private delegate void glDebugMessageControl_t(DebugSource source, DebugType type, DebugSeverity severity, int count, uint* ids, bool enabled); 1127 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1128 | private delegate void glDebugMessageInsert_t(DebugSource source, DebugType type, uint id, DebugSeverity severity, int length, char* buf); 1129 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1130 | private delegate void glDebugMessageCallback_t(IntPtr callback, void* userParam); 1131 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1132 | private delegate uint glGetDebugMessageLog_t(uint count, int bufSize, uint* sources, uint* types, uint* ids, uint* severities, int* lengths, char* messageLog); 1133 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1134 | private delegate void glPushDebugGroup_t(DebugSource source, uint id, int length, char* message); 1135 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1136 | private delegate void glPopDebugGroup_t(); 1137 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1138 | private delegate void glObjectLabel_t(ObjectIdentifier identifier, uint name, int length, char* label); 1139 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1140 | private delegate void glGetObjectLabel_t(uint identifier, uint name, int bufSize, int* length, char* label); 1141 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1142 | private delegate void glObjectPtrLabel_t(void* ptr, int length, char* label); 1143 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1144 | private delegate void glGetObjectPtrLabel_t(void* ptr, int bufSize, int* length, char* label); 1145 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1146 | private delegate void glGetPointerv_t(GetPointervPName pname, void** @params); 1147 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1148 | private delegate void glBufferStorage_t(BufferStorageTarget target, int size, void* data, uint flags); 1149 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1150 | private delegate void glClearTexImage_t(uint texture, int level, PixelFormat format, PixelType type, void* data); 1151 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1152 | private delegate void glClearTexSubImage_t(uint texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, PixelFormat format, PixelType type, void* data); 1153 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1154 | private delegate void glBindBuffersBase_t(BufferTargetARB target, uint first, int count, uint* buffers); 1155 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1156 | private delegate void glBindBuffersRange_t(BufferTargetARB target, uint first, int count, uint* buffers, IntPtr offsets, int* sizes); 1157 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1158 | private delegate void glBindTextures_t(uint first, int count, uint* textures); 1159 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1160 | private delegate void glBindSamplers_t(uint first, int count, uint* samplers); 1161 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1162 | private delegate void glBindImageTextures_t(uint first, int count, uint* textures); 1163 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1164 | private delegate void glBindVertexBuffers_t(uint first, int count, uint* buffers, IntPtr offsets, int* strides); 1165 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1166 | private delegate void glClipControl_t(ClipControlOrigin origin, ClipControlDepth depth); 1167 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1168 | private delegate void glCreateTransformFeedbacks_t(int n, uint* ids); 1169 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1170 | private delegate void glTransformFeedbackBufferBase_t(uint xfb, uint index, uint buffer); 1171 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1172 | private delegate void glTransformFeedbackBufferRange_t(uint xfb, uint index, uint buffer, IntPtr offset, int size); 1173 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1174 | private delegate void glGetTransformFeedbackiv_t(uint xfb, TransformFeedbackPName pname, int* param); 1175 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1176 | private delegate void glGetTransformFeedbacki_v_t(uint xfb, TransformFeedbackPName pname, uint index, int* param); 1177 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1178 | private delegate void glGetTransformFeedbacki64_v_t(uint xfb, TransformFeedbackPName pname, uint index, long* param); 1179 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1180 | private delegate void glCreateBuffers_t(int n, uint* buffers); 1181 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1182 | private delegate void glNamedBufferStorage_t(uint buffer, int size, void* data, uint flags); 1183 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1184 | private delegate void glNamedBufferData_t(uint buffer, int size, void* data, VertexBufferObjectUsage usage); 1185 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1186 | private delegate void glNamedBufferSubData_t(uint buffer, IntPtr offset, int size, void* data); 1187 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1188 | private delegate void glCopyNamedBufferSubData_t(uint readBuffer, uint writeBuffer, IntPtr readOffset, IntPtr writeOffset, int size); 1189 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1190 | private delegate void glClearNamedBufferData_t(uint buffer, InternalFormat internalformat, PixelFormat format, PixelType type, void* data); 1191 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1192 | private delegate void glClearNamedBufferSubData_t(uint buffer, InternalFormat internalformat, IntPtr offset, int size, PixelFormat format, PixelType type, void* data); 1193 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1194 | private delegate void* glMapNamedBuffer_t(uint buffer, BufferAccessARB access); 1195 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1196 | private delegate void* glMapNamedBufferRange_t(uint buffer, IntPtr offset, int length, uint access); 1197 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1198 | private delegate bool glUnmapNamedBuffer_t(uint buffer); 1199 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1200 | private delegate void glFlushMappedNamedBufferRange_t(uint buffer, IntPtr offset, int length); 1201 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1202 | private delegate void glGetNamedBufferParameteriv_t(uint buffer, GLEnum pname, int* @params); 1203 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1204 | private delegate void glGetNamedBufferParameteri64v_t(uint buffer, GLEnum pname, long* @params); 1205 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1206 | private delegate void glGetNamedBufferPointerv_t(uint buffer, GLEnum pname, void** @params); 1207 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1208 | private delegate void glGetNamedBufferSubData_t(uint buffer, IntPtr offset, int size, void* data); 1209 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1210 | private delegate void glCreateFramebuffers_t(int n, uint* framebuffers); 1211 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1212 | private delegate void glNamedFramebufferRenderbuffer_t(uint framebuffer, FramebufferAttachment attachment, RenderbufferTarget renderbuffertarget, uint renderbuffer); 1213 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1214 | private delegate void glNamedFramebufferParameteri_t(uint framebuffer, FramebufferParameterName pname, int param); 1215 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1216 | private delegate void glNamedFramebufferTexture_t(uint framebuffer, FramebufferAttachment attachment, uint texture, int level); 1217 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1218 | private delegate void glNamedFramebufferTextureLayer_t(uint framebuffer, FramebufferAttachment attachment, uint texture, int level, int layer); 1219 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1220 | private delegate void glNamedFramebufferDrawBuffer_t(uint framebuffer, ColorBuffer buf); 1221 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1222 | private delegate void glNamedFramebufferDrawBuffers_t(uint framebuffer, int n, uint* bufs); 1223 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1224 | private delegate void glNamedFramebufferReadBuffer_t(uint framebuffer, ColorBuffer src); 1225 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1226 | private delegate void glInvalidateNamedFramebufferData_t(uint framebuffer, int numAttachments, uint* attachments); 1227 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1228 | private delegate void glInvalidateNamedFramebufferSubData_t(uint framebuffer, int numAttachments, uint* attachments, int x, int y, int width, int height); 1229 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1230 | private delegate void glClearNamedFramebufferiv_t(uint framebuffer, GLEnum buffer, int drawbuffer, int* value); 1231 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1232 | private delegate void glClearNamedFramebufferuiv_t(uint framebuffer, GLEnum buffer, int drawbuffer, uint* value); 1233 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1234 | private delegate void glClearNamedFramebufferfv_t(uint framebuffer, GLEnum buffer, int drawbuffer, float* value); 1235 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1236 | private delegate void glClearNamedFramebufferfi_t(uint framebuffer, GLEnum buffer, int drawbuffer, float depth, int stencil); 1237 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1238 | private delegate void glBlitNamedFramebuffer_t(uint readFramebuffer, uint drawFramebuffer, int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, uint mask, BlitFramebufferFilter filter); 1239 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1240 | private delegate FramebufferStatus glCheckNamedFramebufferStatus_t(uint framebuffer, FramebufferTarget target); 1241 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1242 | private delegate void glGetNamedFramebufferParameteriv_t(uint framebuffer, GetFramebufferParameter pname, int* param); 1243 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1244 | private delegate void glGetNamedFramebufferAttachmentParameteriv_t(uint framebuffer, FramebufferAttachment attachment, FramebufferAttachmentParameterName pname, int* @params); 1245 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1246 | private delegate void glCreateRenderbuffers_t(int n, uint* renderbuffers); 1247 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1248 | private delegate void glNamedRenderbufferStorage_t(uint renderbuffer, InternalFormat internalformat, int width, int height); 1249 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1250 | private delegate void glNamedRenderbufferStorageMultisample_t(uint renderbuffer, int samples, InternalFormat internalformat, int width, int height); 1251 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1252 | private delegate void glGetNamedRenderbufferParameteriv_t(uint renderbuffer, RenderbufferParameterName pname, int* @params); 1253 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1254 | private delegate void glCreateTextures_t(TextureTarget target, int n, uint* textures); 1255 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1256 | private delegate void glTextureBuffer_t(uint texture, InternalFormat internalformat, uint buffer); 1257 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1258 | private delegate void glTextureBufferRange_t(uint texture, InternalFormat internalformat, uint buffer, IntPtr offset, int size); 1259 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1260 | private delegate void glTextureStorage1D_t(uint texture, int levels, InternalFormat internalformat, int width); 1261 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1262 | private delegate void glTextureStorage2D_t(uint texture, int levels, InternalFormat internalformat, int width, int height); 1263 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1264 | private delegate void glTextureStorage3D_t(uint texture, int levels, InternalFormat internalformat, int width, int height, int depth); 1265 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1266 | private delegate void glTextureStorage2DMultisample_t(uint texture, int samples, InternalFormat internalformat, int width, int height, bool fixedsamplelocations); 1267 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1268 | private delegate void glTextureStorage3DMultisample_t(uint texture, int samples, InternalFormat internalformat, int width, int height, int depth, bool fixedsamplelocations); 1269 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1270 | private delegate void glTextureSubImage1D_t(uint texture, int level, int xoffset, int width, PixelFormat format, PixelType type, void* pixels); 1271 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1272 | private delegate void glTextureSubImage2D_t(uint texture, int level, int xoffset, int yoffset, int width, int height, PixelFormat format, PixelType type, void* pixels); 1273 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1274 | private delegate void glTextureSubImage3D_t(uint texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, PixelFormat format, PixelType type, void* pixels); 1275 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1276 | private delegate void glCompressedTextureSubImage1D_t(uint texture, int level, int xoffset, int width, PixelFormat format, int imageSize, void* data); 1277 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1278 | private delegate void glCompressedTextureSubImage2D_t(uint texture, int level, int xoffset, int yoffset, int width, int height, PixelFormat format, int imageSize, void* data); 1279 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1280 | private delegate void glCompressedTextureSubImage3D_t(uint texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, PixelFormat format, int imageSize, void* data); 1281 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1282 | private delegate void glCopyTextureSubImage1D_t(uint texture, int level, int xoffset, int x, int y, int width); 1283 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1284 | private delegate void glCopyTextureSubImage2D_t(uint texture, int level, int xoffset, int yoffset, int x, int y, int width, int height); 1285 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1286 | private delegate void glCopyTextureSubImage3D_t(uint texture, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height); 1287 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1288 | private delegate void glTextureParameterf_t(uint texture, TextureParameterName pname, float param); 1289 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1290 | private delegate void glTextureParameterfv_t(uint texture, TextureParameterName pname, float* param); 1291 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1292 | private delegate void glTextureParameteri_t(uint texture, TextureParameterName pname, int param); 1293 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1294 | private delegate void glTextureParameterIiv_t(uint texture, TextureParameterName pname, int* @params); 1295 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1296 | private delegate void glTextureParameterIuiv_t(uint texture, TextureParameterName pname, uint* @params); 1297 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1298 | private delegate void glTextureParameteriv_t(uint texture, TextureParameterName pname, int* param); 1299 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1300 | private delegate void glGenerateTextureMipmap_t(uint texture); 1301 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1302 | private delegate void glBindTextureUnit_t(uint unit, uint texture); 1303 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1304 | private delegate void glGetTextureImage_t(uint texture, int level, PixelFormat format, PixelType type, int bufSize, void* pixels); 1305 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1306 | private delegate void glGetCompressedTextureImage_t(uint texture, int level, int bufSize, void* pixels); 1307 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1308 | private delegate void glGetTextureLevelParameterfv_t(uint texture, int level, GetTextureParameter pname, float* @params); 1309 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1310 | private delegate void glGetTextureLevelParameteriv_t(uint texture, int level, GetTextureParameter pname, int* @params); 1311 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1312 | private delegate void glGetTextureParameterfv_t(uint texture, GetTextureParameter pname, float* @params); 1313 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1314 | private delegate void glGetTextureParameterIiv_t(uint texture, GetTextureParameter pname, int* @params); 1315 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1316 | private delegate void glGetTextureParameterIuiv_t(uint texture, GetTextureParameter pname, uint* @params); 1317 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1318 | private delegate void glGetTextureParameteriv_t(uint texture, GetTextureParameter pname, int* @params); 1319 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1320 | private delegate void glCreateVertexArrays_t(int n, uint* arrays); 1321 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1322 | private delegate void glDisableVertexArrayAttrib_t(uint vaobj, uint index); 1323 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1324 | private delegate void glEnableVertexArrayAttrib_t(uint vaobj, uint index); 1325 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1326 | private delegate void glVertexArrayElementBuffer_t(uint vaobj, uint buffer); 1327 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1328 | private delegate void glVertexArrayVertexBuffer_t(uint vaobj, uint bindingindex, uint buffer, IntPtr offset, int stride); 1329 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1330 | private delegate void glVertexArrayVertexBuffers_t(uint vaobj, uint first, int count, uint* buffers, IntPtr offsets, int* strides); 1331 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1332 | private delegate void glVertexArrayAttribBinding_t(uint vaobj, uint attribindex, uint bindingindex); 1333 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1334 | private delegate void glVertexArrayAttribFormat_t(uint vaobj, uint attribindex, int size, VertexAttribType type, bool normalized, uint relativeoffset); 1335 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1336 | private delegate void glVertexArrayAttribIFormat_t(uint vaobj, uint attribindex, int size, VertexAttribType type, uint relativeoffset); 1337 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1338 | private delegate void glVertexArrayAttribLFormat_t(uint vaobj, uint attribindex, int size, VertexAttribType type, uint relativeoffset); 1339 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1340 | private delegate void glVertexArrayBindingDivisor_t(uint vaobj, uint bindingindex, uint divisor); 1341 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1342 | private delegate void glGetVertexArrayiv_t(uint vaobj, VertexArrayPName pname, int* param); 1343 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1344 | private delegate void glGetVertexArrayIndexediv_t(uint vaobj, uint index, VertexArrayPName pname, int* param); 1345 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1346 | private delegate void glGetVertexArrayIndexed64iv_t(uint vaobj, uint index, VertexArrayPName pname, long* param); 1347 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1348 | private delegate void glCreateSamplers_t(int n, uint* samplers); 1349 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1350 | private delegate void glCreateProgramPipelines_t(int n, uint* pipelines); 1351 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1352 | private delegate void glCreateQueries_t(QueryTarget target, int n, uint* ids); 1353 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1354 | private delegate void glGetQueryBufferObjecti64v_t(uint id, uint buffer, QueryObjectParameterName pname, IntPtr offset); 1355 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1356 | private delegate void glGetQueryBufferObjectiv_t(uint id, uint buffer, QueryObjectParameterName pname, IntPtr offset); 1357 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1358 | private delegate void glGetQueryBufferObjectui64v_t(uint id, uint buffer, QueryObjectParameterName pname, IntPtr offset); 1359 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1360 | private delegate void glGetQueryBufferObjectuiv_t(uint id, uint buffer, QueryObjectParameterName pname, IntPtr offset); 1361 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1362 | private delegate void glMemoryBarrierByRegion_t(uint barriers); 1363 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1364 | private delegate void glGetTextureSubImage_t(uint texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, PixelFormat format, PixelType type, int bufSize, void* pixels); 1365 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1366 | private delegate void glGetCompressedTextureSubImage_t(uint texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int bufSize, void* pixels); 1367 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1368 | private delegate GraphicsResetStatus glGetGraphicsResetStatus_t(); 1369 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1370 | private delegate void glGetnCompressedTexImage_t(TextureTarget target, int lod, int bufSize, void* pixels); 1371 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1372 | private delegate void glGetnTexImage_t(TextureTarget target, int level, PixelFormat format, PixelType type, int bufSize, void* pixels); 1373 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1374 | private delegate void glGetnUniformdv_t(uint program, int location, int bufSize, double* @params); 1375 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1376 | private delegate void glGetnUniformfv_t(uint program, int location, int bufSize, float* @params); 1377 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1378 | private delegate void glGetnUniformiv_t(uint program, int location, int bufSize, int* @params); 1379 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1380 | private delegate void glGetnUniformuiv_t(uint program, int location, int bufSize, uint* @params); 1381 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1382 | private delegate void glReadnPixels_t(int x, int y, int width, int height, PixelFormat format, PixelType type, int bufSize, void* data); 1383 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1384 | private delegate void glGetnMapdv_t(MapTarget target, MapQuery query, int bufSize, double* v); 1385 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1386 | private delegate void glGetnMapfv_t(MapTarget target, MapQuery query, int bufSize, float* v); 1387 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1388 | private delegate void glGetnMapiv_t(MapTarget target, MapQuery query, int bufSize, int* v); 1389 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1390 | private delegate void glGetnPixelMapfv_t(PixelMap map, int bufSize, float* values); 1391 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1392 | private delegate void glGetnPixelMapuiv_t(PixelMap map, int bufSize, uint* values); 1393 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1394 | private delegate void glGetnPixelMapusv_t(PixelMap map, int bufSize, short* values); 1395 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1396 | private delegate void glGetnPolygonStipple_t(int bufSize, byte* pattern); 1397 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1398 | private delegate void glGetnColorTable_t(ColorTableTarget target, PixelFormat format, PixelType type, int bufSize, void* table); 1399 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1400 | private delegate void glGetnConvolutionFilter_t(ConvolutionTarget target, PixelFormat format, PixelType type, int bufSize, void* image); 1401 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1402 | private delegate void glGetnSeparableFilter_t(SeparableTargetEXT target, PixelFormat format, PixelType type, int rowBufSize, void* row, int columnBufSize, void* column, void* span); 1403 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1404 | private delegate void glGetnHistogram_t(HistogramTargetEXT target, bool reset, PixelFormat format, PixelType type, int bufSize, void* values); 1405 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1406 | private delegate void glGetnMinmax_t(MinmaxTargetEXT target, bool reset, PixelFormat format, PixelType type, int bufSize, void* values); 1407 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1408 | private delegate void glTextureBarrier_t(); 1409 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1410 | private delegate void glSpecializeShader_t(uint shader, char* pEntryPoint, uint numSpecializationConstants, uint* pConstantIndex, uint* pConstantValue); 1411 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1412 | private delegate void glMultiDrawArraysIndirectCount_t(PrimitiveType mode, void* indirect, IntPtr drawcount, int maxdrawcount, int stride); 1413 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1414 | private delegate void glMultiDrawElementsIndirectCount_t(PrimitiveType mode, uint type, void* indirect, IntPtr drawcount, int maxdrawcount, int stride); 1415 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1416 | private delegate void glPolygonOffsetClamp_t(float factor, float units, float clamp); 1417 | } 1418 | -------------------------------------------------------------------------------- /src/WebGL.Sample/WebGL.Sample.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | 12 6 | enable 7 | Exe 8 | browser-wasm 9 | true 10 | $(NoWarn);RCS1090 11 | true 12 | -s FULL_ES3=1 -lopenal -lGL -s 13 | main.js 14 | 15 | 16 | 17 | true 18 | true 19 | true 20 | true 21 | 22 | false 23 | 24 | 25 | 26 | 27 | 28 | DEBUG;TRACE 29 | 30 | 31 | 32 | none 33 | false 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /src/WebGL.Sample/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | .NET + WebGL = 💖 9 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /src/WebGL.Sample/main.js: -------------------------------------------------------------------------------- 1 | import { dotnet } from './_framework/dotnet.js' 2 | 3 | const { setModuleImports, getAssemblyExports, getConfig, runMain } = await dotnet 4 | .withDiagnosticTracing(false) 5 | .withApplicationArgumentsFromQuery() 6 | .create(); 7 | 8 | const config = getConfig(); 9 | const exports = await getAssemblyExports(config.mainAssemblyName); 10 | const interop = exports.WebGL.Sample.Interop; 11 | 12 | var canvas = globalThis.document.getElementById("canvas"); 13 | dotnet.instance.Module["canvas"] = canvas; 14 | 15 | setModuleImports("main.js", { 16 | initialize: () => { 17 | 18 | var checkCanvasResize = (dispatch) => { 19 | var devicePixelRatio = window.devicePixelRatio || 1.0; 20 | var displayWidth = canvas.clientWidth * devicePixelRatio; 21 | var displayHeight = canvas.clientHeight * devicePixelRatio; 22 | 23 | if (canvas.width != displayWidth || canvas.height != displayHeight) { 24 | canvas.width = displayWidth; 25 | canvas.height = displayHeight; 26 | dispatch = true; 27 | } 28 | 29 | if (dispatch) 30 | interop.OnCanvasResize(displayWidth, displayHeight, devicePixelRatio); 31 | } 32 | 33 | function checkCanvasResizeFrame() { 34 | checkCanvasResize(false); 35 | requestAnimationFrame(checkCanvasResizeFrame); 36 | } 37 | 38 | var keyDown = (e) => { 39 | e.stopPropagation(); 40 | var shift = e.shiftKey; 41 | var ctrl = e.ctrlKey; 42 | var alt = e.altKey; 43 | var repeat = e.repeat; 44 | var code = e.keyCode; 45 | 46 | interop.OnKeyDown(shift, ctrl, alt, repeat, code); 47 | } 48 | 49 | var keyUp = (e) => { 50 | e.stopPropagation(); 51 | var shift = e.shiftKey; 52 | var ctrl = e.ctrlKey; 53 | var alt = e.altKey; 54 | var code = e.keyCode; 55 | 56 | interop.OnKeyUp(shift, ctrl, alt, code); 57 | } 58 | 59 | var mouseMove = (e) => { 60 | var x = e.offsetX; 61 | var y = e.offsetY; 62 | interop.OnMouseMove(x, y); 63 | } 64 | 65 | var mouseDown = (e) => { 66 | var shift = e.shiftKey; 67 | var ctrl = e.ctrlKey; 68 | var alt = e.altKey; 69 | var button = e.button; 70 | 71 | interop.OnMouseDown(shift, ctrl, alt, button); 72 | } 73 | 74 | var mouseUp = (e) => { 75 | var shift = e.shiftKey; 76 | var ctrl = e.ctrlKey; 77 | var alt = e.altKey; 78 | var button = e.button; 79 | 80 | interop.OnMouseUp(shift, ctrl, alt, button); 81 | } 82 | 83 | var shouldIgnore = (e) => { 84 | e.preventDefault(); 85 | return e.touches.length > 1 || e.type == "touchend" && e.touches.length > 0; 86 | } 87 | 88 | var touchStart = (e) => { 89 | if (shouldIgnore(e)) 90 | return; 91 | 92 | var shift = e.shiftKey; 93 | var ctrl = e.ctrlKey; 94 | var alt = e.altKey; 95 | var button = 0; 96 | var touch = e.changedTouches[0]; 97 | var bcr = e.target.getBoundingClientRect(); 98 | var x = touch.clientX - bcr.x; 99 | var y = touch.clientY - bcr.y; 100 | 101 | interop.OnMouseMove(x, y); 102 | interop.OnMouseDown(shift, ctrl, alt, button); 103 | } 104 | 105 | var touchMove = (e) => { 106 | if (shouldIgnore(e)) 107 | return; 108 | 109 | var touch = e.changedTouches[0]; 110 | var bcr = e.target.getBoundingClientRect(); 111 | var x = touch.clientX - bcr.x; 112 | var y = touch.clientY - bcr.y; 113 | 114 | interop.OnMouseMove(x, y); 115 | } 116 | 117 | var touchEnd = (e) => { 118 | if (shouldIgnore(e)) 119 | return; 120 | 121 | var shift = e.shiftKey; 122 | var ctrl = e.ctrlKey; 123 | var alt = e.altKey; 124 | var button = 0; 125 | var touch = e.changedTouches[0]; 126 | var bcr = e.target.getBoundingClientRect(); 127 | var x = touch.clientX - bcr.x; 128 | var y = touch.clientY - bcr.y; 129 | 130 | interop.OnMouseMove(x, y); 131 | interop.OnMouseUp(shift, ctrl, alt, button); 132 | } 133 | 134 | //canvas.addEventListener("contextmenu", (e) => e.preventDefault(), false); 135 | canvas.addEventListener("keydown", keyDown, false); 136 | canvas.addEventListener("keyup", keyUp, false); 137 | canvas.addEventListener("mousemove", mouseMove, false); 138 | canvas.addEventListener("mousedown", mouseDown, false); 139 | canvas.addEventListener("mouseup", mouseUp, false); 140 | canvas.addEventListener("touchstart", touchStart, false); 141 | canvas.addEventListener("touchmove", touchMove, false); 142 | canvas.addEventListener("touchend", touchEnd, false); 143 | checkCanvasResize(true); 144 | checkCanvasResizeFrame(); 145 | 146 | canvas.tabIndex = 1000; 147 | 148 | interop.SetRootUri(window.location.toString()); 149 | 150 | var langs = navigator.languages || []; 151 | for (var i = 0; i < langs.length; i++) 152 | interop.AddLocale(langs[i]); 153 | interop.AddLocale(navigator.language); 154 | interop.AddLocale(navigator.userLanguage); 155 | } 156 | }); 157 | 158 | await runMain(); 159 | -------------------------------------------------------------------------------- /src/WebGL.Sample/runtimeconfig.template.json: -------------------------------------------------------------------------------- 1 | { 2 | "wasmHostProperties": { 3 | "perHostConfig": [ 4 | { 5 | "name": "browser", 6 | "html-path": "index.html", 7 | "Host": "browser" 8 | } 9 | ] 10 | } 11 | } 12 | --------------------------------------------------------------------------------