From 3f39401261bf486c39ecf6bbccd0f75da88cbf00 Mon Sep 17 00:00:00 2001 From: Dylan Perks <11160611+Perksey@users.noreply.github.com> Date: Wed, 18 Dec 2024 14:44:26 +0000 Subject: [PATCH] [3.0] Bring back some of the build infrastructure (#2386) * Bring back some of the build infrastructure * Add experimental feed to the workflow? * Revert to non-xlarge for now, we'll need this later though * Add missing scope for GitHub Packages * Central Package Management * Add metapackage, add Release job to workflow, more changes * Prepare for a release dry run * Fix bad usage of download-artifact * Fix artifact usage again and use SSH for push * Configure SSH key in checkout action instead * Fix incorrect VersionSuffix, workaround strange NUKE bug * Normalize markdown for announcement, update changelog for next release * Fix compilation error * Fix token-related errors * Update public API and changelog for next release * Revert "Update public API and changelog for next release" This reverts commit c0663f05d105550cd2dc1305e892a1cc4ffcf4f2. * Confident this is working now * Document! * Delete old SignService file --------- Co-authored-by: The Silk.NET Automaton <9011267+dotnet-bot@users.noreply.github.com> --- .github/workflows/dotnet.yml | 71 +- .gitignore | 2 +- .nuke/build.schema.json | 181 + .nuke/parameters.json | 4 + Directory.Build.props | 18 +- Directory.Build.targets | 178 +- Directory.Packages.props | 49 + Silk.NET.sln | 18 + Silk.NET.sln.DotSettings | 1 + build.cmd | 7 + build.ps1 | 74 + build.sh | 67 + docs/CHANGELOG.md | 790 + docs/CONTRIBUTING.md | 49 + docs/for-contributors/build-system.md | 199 + .../Silk.NET.Maths.Benchmarks.csproj | 2 +- eng/build/.editorconfig | 11 + eng/build/Build.CodeSigning.cs | 97 + eng/build/Build.Native.cs | 4 + eng/build/Build.PublicApi.cs | 45 + eng/build/Build.Publishing.cs | 425 + eng/build/Build.Support.cs | 85 + eng/build/Build.cs | 115 + eng/build/Configuration.cs | 16 + eng/build/Directory.Build.props | 8 + eng/build/Directory.Build.targets | 8 + eng/build/Silk.NET.NUKE.csproj | 20 + eng/build/Silk.NET.NUKE.csproj.DotSettings | 31 + eng/codesigning/.gitignore | 1 + eng/codesigning/filelist.txt | 1 + generator.json | 10 +- sources/Core/Core/Pointers/Ref2D.generic.cs | 10 + sources/Core/Core/Pointers/Ref3D.generic.cs | 10 + .../PublicAPI/net8.0/PublicAPI.Shipped.txt | 1 + .../PublicAPI/net8.0/PublicAPI.Unshipped.txt | 643 + sources/Core/Core/Silk.NET.Core.csproj | 13 +- sources/Core/Core/SilkMarshal.cs | 6 + sources/Core/Silk.NET/Silk.NET.csproj | 25 + sources/Maths/Maths/Silk.NET.Maths.csproj | 2 +- .../SilkTouch/Mods/Metadata/MetadataUtils.cs | 26 +- .../SilkTouch/Silk.NET.SilkTouch.csproj | 35 +- sources/Win32/Win32/Silk.NET.Win32.csproj | 13699 +--------------- .../Core/Core/Silk.NET.Core.UnitTests.csproj | 14 - tests/Directory.Build.props | 13 +- tests/Maths/Maths/Silk.NET.Maths.Tests.csproj | 11 +- tests/SDL/SDL/Silk.NET.SDL.UnitTests.csproj | 14 - .../SilkTouch/SilkTouch/MetadataUtilsTests.cs | 11 +- .../Silk.NET.SilkTouch.UnitTests.csproj | 9 +- 48 files changed, 3341 insertions(+), 13788 deletions(-) create mode 100644 .nuke/build.schema.json create mode 100644 .nuke/parameters.json create mode 100644 Directory.Packages.props create mode 100755 build.cmd create mode 100644 build.ps1 create mode 100755 build.sh create mode 100644 docs/CHANGELOG.md create mode 100644 docs/for-contributors/build-system.md create mode 100644 eng/build/.editorconfig create mode 100644 eng/build/Build.CodeSigning.cs create mode 100644 eng/build/Build.Native.cs create mode 100644 eng/build/Build.PublicApi.cs create mode 100644 eng/build/Build.Publishing.cs create mode 100644 eng/build/Build.Support.cs create mode 100644 eng/build/Build.cs create mode 100644 eng/build/Configuration.cs create mode 100644 eng/build/Directory.Build.props create mode 100644 eng/build/Directory.Build.targets create mode 100644 eng/build/Silk.NET.NUKE.csproj create mode 100644 eng/build/Silk.NET.NUKE.csproj.DotSettings create mode 100644 eng/codesigning/.gitignore create mode 100644 eng/codesigning/filelist.txt create mode 100644 sources/Core/Core/PublicAPI/net8.0/PublicAPI.Shipped.txt create mode 100644 sources/Core/Core/PublicAPI/net8.0/PublicAPI.Unshipped.txt create mode 100644 sources/Core/Silk.NET/Silk.NET.csproj diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 28f709e613..ada102fe57 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -3,12 +3,20 @@ on: push: pull_request: merge_group: + workflow_dispatch: + inputs: + release: + description: "Release to NuGet" + required: false + type: boolean + default: false permissions: statuses: write checks: write contents: write pull-requests: write actions: write + packages: write jobs: Build: runs-on: macos-latest @@ -17,12 +25,29 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: '8.0.x' + dotnet-version: '9.0.x' dotnet-quality: 'preview' - - name: Restore - run: dotnet restore - name: Pack - run: dotnet pack -c Release + # TODO decide whether we want experimental builds to use Debug or Release - using Release for now... + run: >- + dotnet run --project eng/build/Silk.NET.NUKE.csproj -c Release -- + Pack + --configuration Release + --msbuild-properties + ${{ github.event_name == 'workflow_dispatch' && inputs.release && 'ContinuousIntegrationBuild=true' || github.event_name != 'pull_request' && format('ContinuousIntegrationBuild=true VersionSuffix=build{0}.0', github.run_number) || format('ContinuousIntegrationBuild=true VersionSuffix=pr{0}.{1}', github.event.number, github.run_number) }} + - name: Upload Unsigned Artifacts to Actions + uses: actions/upload-artifact@v4 + with: + name: unsigned_nupkgs + path: "artifacts/**/*nupkg" + if-no-files-found: warn + retention-days: 1 + - name: Push to Experimental Feed + if: ${{ github.repository == 'dotnet/Silk.NET' }} + run: ./build.sh PushToNuGet --skip Clean Compile Pack --nuget-feed https://dotnet.github.io/Silk.NET/nuget/experimental/index.json --nuget-username ${{ secrets.EXP_NUGET_USERNAME }} --nuget-password ${{ secrets.EXP_NUGET_PASSWORD }} --nuget-api-key ${{ secrets.EXP_NUGET_PASSWORD }} + - name: Push to GitHub Packages + if: ${{ github.repository == 'dotnet/Silk.NET' }} + run: ./build.sh PushToNuGet --skip Clean Compile Pack --nuget-feed https://nuget.pkg.github.com/dotnet/index.json --nuget-api-key ${{ secrets.GITHUB_TOKEN }} Test: strategy: fail-fast: false @@ -57,18 +82,19 @@ jobs: path: ./coverage/**/*.trx reporter: dotnet-trx - name: Upload Coverage Results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-${{ matrix.name }} path: ./coverage/**/coverage.cobertura.xml Report-Coverage: + name: "Report Coverage" runs-on: ubuntu-latest needs: Test permissions: pull-requests: write checks: write steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: path: ./coverage - name: Setup .NET Core @@ -88,3 +114,36 @@ jobs: with: path: coveragereport/Cobertura.xml minimum_coverage: 0 + Release: + runs-on: windows-latest + if: ${{ github.event_name == 'workflow_dispatch' && inputs.release }} + needs: [Build, Test] + environment: Release + steps: + - uses: actions/checkout@v3 + with: + ssh-key: ${{ secrets.SILK_ACTIONS_DEPLOY_KEY }} + - uses: actions/download-artifact@v4 + with: + name: unsigned_nupkgs + path: artifacts + - name: Push to NuGet + if: ${{ github.repository == 'dotnet/Silk.NET' }} + run: >- + .\build.cmd SignPackages PushToNuGet FinishRelease --skip Clean Compile Pack + --nuget-api-key ${{ secrets.NUGET_TOKEN }} + --akv-certificate ${{ secrets.AKV_CERTIFICATE }} + --akv-client-id ${{ secrets.AKV_CLIENT_ID }} + --akv-client-secret ${{ secrets.AKV_CLIENT_SECRET }} + --akv-tenant ${{ secrets.AKV_TENANT }} + --akv-vault-url ${{ secrets.AKV_VAULT_URL }} + --discord-webhook ${{ secrets.DISCORD_ANNOUNCEMENT_WEBHOOK }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Upload Signed Artifacts to Actions + uses: actions/upload-artifact@v4 + with: + name: signed_nupkgs + path: "artifacts/**/*nupkg" + if-no-files-found: warn + retention-days: 30 diff --git a/.gitignore b/.gitignore index d7ab26d11c..a92e1faac0 100644 --- a/.gitignore +++ b/.gitignore @@ -475,7 +475,7 @@ src/**/build/ *.gen.txt # Silk.NET Website Generation Output -/docs/ +#/docs/ src/Website/Silk.NET.Statiq/temp src/Website/Silk.NET.Statiq/cache diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json new file mode 100644 index 0000000000..0e92b20a51 --- /dev/null +++ b/.nuke/build.schema.json @@ -0,0 +1,181 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "definitions": { + "Host": { + "type": "string", + "enum": [ + "AppVeyor", + "AzurePipelines", + "Bamboo", + "Bitbucket", + "Bitrise", + "GitHubActions", + "GitLab", + "Jenkins", + "Rider", + "SpaceAutomation", + "TeamCity", + "Terminal", + "TravisCI", + "VisualStudio", + "VSCode" + ] + }, + "ExecutableTarget": { + "type": "string", + "enum": [ + "Clean", + "Compile", + "DeclareApi", + "Pack", + "Prerequisites", + "PushToNuGet", + "RegenerateBindings", + "ShipApi", + "SignPackages" + ] + }, + "Verbosity": { + "type": "string", + "description": "", + "enum": [ + "Verbose", + "Normal", + "Minimal", + "Quiet" + ] + }, + "NukeBuild": { + "properties": { + "Continue": { + "type": "boolean", + "description": "Indicates to continue a previously failed build attempt" + }, + "Help": { + "type": "boolean", + "description": "Shows the help text for this build assembly" + }, + "Host": { + "description": "Host for execution. Default is 'automatic'", + "$ref": "#/definitions/Host" + }, + "NoLogo": { + "type": "boolean", + "description": "Disables displaying the NUKE logo" + }, + "Partition": { + "type": "string", + "description": "Partition to use on CI" + }, + "Plan": { + "type": "boolean", + "description": "Shows the execution plan (HTML)" + }, + "Profile": { + "type": "array", + "description": "Defines the profiles to load", + "items": { + "type": "string" + } + }, + "Root": { + "type": "string", + "description": "Root directory during build execution" + }, + "Skip": { + "type": "array", + "description": "List of targets to be skipped. Empty list skips all dependencies", + "items": { + "$ref": "#/definitions/ExecutableTarget" + } + }, + "Target": { + "type": "array", + "description": "List of targets to be invoked. Default is '{default_target}'", + "items": { + "$ref": "#/definitions/ExecutableTarget" + } + }, + "Verbosity": { + "description": "Logging verbosity during build execution. Default is 'Normal'", + "$ref": "#/definitions/Verbosity" + } + } + } + }, + "allOf": [ + { + "properties": { + "AkvCertificate": { + "type": "string", + "description": "Code-signing service Azure Key Vault certificate" + }, + "AkvClientId": { + "type": "string", + "description": "Code-signing service Azure Key Vault client ID" + }, + "AkvClientSecret": { + "type": "string", + "description": "Code-signing service Azure Key Vault client secret" + }, + "AkvTenant": { + "type": "string", + "description": "Code-signing service Azure Key Vault tenant ID" + }, + "AkvVaultUrl": { + "type": "string", + "description": "Code-signing service Azure Key Vault URL" + }, + "Configuration": { + "type": "string", + "description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)", + "enum": [ + "Debug", + "Release" + ] + }, + "MsbuildProperties": { + "type": "array", + "description": "Extra properties passed to MSBuild commands", + "items": { + "type": "string" + } + }, + "NugetApiKey": { + "type": "string", + "description": "The API key used to push packages and symbols packages to NuGet" + }, + "NugetFeed": { + "type": "string", + "description": "NuGet feed" + }, + "NugetNoServiceEndpoint": { + "type": "boolean", + "description": "NuGet -NoServiceEndpoint" + }, + "NugetPassword": { + "type": "string", + "description": "NuGet password" + }, + "NugetUsername": { + "type": "string", + "description": "NuGet username" + }, + "SilkTouchAdditionalArgs": { + "type": "array", + "description": "Additional arguments to prepend to SilkTouch invocations", + "items": { + "type": "string" + } + }, + "Solution": { + "type": "string", + "description": "Path to a solution file that is automatically loaded" + } + } + }, + { + "$ref": "#/definitions/NukeBuild" + } + ] +} diff --git a/.nuke/parameters.json b/.nuke/parameters.json new file mode 100644 index 0000000000..4533bc3268 --- /dev/null +++ b/.nuke/parameters.json @@ -0,0 +1,4 @@ +{ + "$schema": "build.schema.json", + "Solution": "Silk.NET.sln" +} diff --git a/Directory.Build.props b/Directory.Build.props index c2fc8c2ae3..422df3b3dc 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -28,6 +28,8 @@ true true true + true + true @@ -41,14 +43,12 @@ .NET Foundation $(BaseArtifactsPath)pkg/$(BaseArtifactsPathSuffix)/$(Configuration)/ Silk.NET - 3.0.0 - alpha Copyright © .NET Foundation and Contributors - An experimental rewrite of Silk.NET and by extension SilkTouch - this is by no means 3.0 and if that is no longer the case this repo shall be merged with the main Silk.NET repo. + Silk.NET is your one-stop-shop for high-speed .NET multimedia, graphics, and compute; providing bindings to popular low-level APIs such as OpenGL, OpenCL, OpenAL, OpenXR, SDL, Vulkan, Assimp, WebGPU, DirectX, and more! strict true true @@ -60,6 +60,18 @@ true git true + false + true + SilkShippingControl;$(VersionDependsOn) + SilkShippingControl;$(PackageVersionDependsOn) + + + portable + true + true + true + snupkg + diff --git a/Directory.Build.targets b/Directory.Build.targets index e2bc65acd7..807f31cb54 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,5 +1,5 @@ - + - - - - - + + + + + + + silkdotnet_v3.png + + + + + + $([System.IO.File]::ReadAllText("$(MSBuildThisFileDirectory)docs/README.md")) + $([System.String]::Copy($(SilkReadme)) + .Replace('<!-- Begin exclude from NuGet readme. -->','<!--') + .Replace('<!-- End exclude from NuGet readme. -->','-->') + .Replace('<!-- Begin include in NuGet readme.','') + .Replace('End include in NuGet readme. -->','') + .Replace('<h1 align="center">', '# ') + .Replace('<h2 align="center">', '# ') + .Replace('</h1>', '').Replace('</h2>', '') + .Replace('<br />', '%0a%0a').Replace('<br/>', '%0a%0a') + .Replace('<div>', '').Replace('</div>', '') + .Replace('<a>', '').Replace('</a>', '')) + + $(IntermediateOutputPath)$(TargetFramework)/README.md + + + $(SilkDescription) $(Description) + $(SilkDescription) $(SilkExtendedDescription)%0a%0a + $([System.String]::Copy($(SilkReadme)) + .Replace('<!-- Package description inserted here automatically. -->', + '# About This Package%0a%0a$(SilkExtendedDescription)')) + + + + + + + + + README.md + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + $([System.IO.File]::ReadAllText("$(MSBuildThisFileDirectory)docs/CHANGELOG.md")) + + + + + + + + $(SilkVersion) + $(SilkVersionSuffix) + $(SilkReleaseNotes) + $(SilkVersion) + $(SilkVersion)-$(VersionSuffix) + + + + true + true + true + true + full + + diff --git a/Directory.Packages.props b/Directory.Packages.props new file mode 100644 index 0000000000..0772cba672 --- /dev/null +++ b/Directory.Packages.props @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Silk.NET.sln b/Silk.NET.sln index ef0e481797..45994a9bfc 100644 --- a/Silk.NET.sln +++ b/Silk.NET.sln @@ -21,6 +21,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{9DB0EA3E-7 docs\CODEOWNERS = docs\CODEOWNERS docs\CONTRIBUTING.md = docs\CONTRIBUTING.md docs\README.md = docs\README.md + docs\CHANGELOG.md = docs\CHANGELOG.md EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{CFFDBEEC-B112-4844-B65B-56A1029CC130}" @@ -88,6 +89,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SDL", "SDL", "{49D426BF-A00 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SilkTouch", "SilkTouch", "{AB25C482-DA9D-4335-8E26-2F29C3700152}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Silk.NET.NUKE", "eng\build\Silk.NET.NUKE.csproj", "{3CADD95A-179F-4ECF-A49D-4B753832C63C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Silk.NET", "sources\Core\Silk.NET\Silk.NET.csproj", "{6FA628B8-9696-4847-89F9-E58F470AF4FB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Win32", "Win32", "{6E739132-EEAB-43A5-83C7-EB58C50D03A1}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -138,6 +145,14 @@ Global {D2B9C43F-A80D-4C9A-9643-BC1AC1B4E807}.Debug|Any CPU.Build.0 = Debug|Any CPU {D2B9C43F-A80D-4C9A-9643-BC1AC1B4E807}.Release|Any CPU.ActiveCfg = Release|Any CPU {D2B9C43F-A80D-4C9A-9643-BC1AC1B4E807}.Release|Any CPU.Build.0 = Release|Any CPU + {3CADD95A-179F-4ECF-A49D-4B753832C63C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3CADD95A-179F-4ECF-A49D-4B753832C63C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3CADD95A-179F-4ECF-A49D-4B753832C63C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3CADD95A-179F-4ECF-A49D-4B753832C63C}.Release|Any CPU.Build.0 = Release|Any CPU + {6FA628B8-9696-4847-89F9-E58F470AF4FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6FA628B8-9696-4847-89F9-E58F470AF4FB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6FA628B8-9696-4847-89F9-E58F470AF4FB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6FA628B8-9696-4847-89F9-E58F470AF4FB}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -164,6 +179,9 @@ Global {01683C11-4721-43AB-B53C-15EBE935B48F} = {FCD75AA5-1536-433E-BA9B-3D698C2255EB} {D2B9C43F-A80D-4C9A-9643-BC1AC1B4E807} = {49D426BF-A009-43D5-A9E2-EFAAAA7196FC} {600D712C-4ABF-44C4-96C3-B1DEE1F38298} = {AB25C482-DA9D-4335-8E26-2F29C3700152} + {3CADD95A-179F-4ECF-A49D-4B753832C63C} = {475AEF7B-0154-4989-AF82-97E3A95A96AF} + {6FA628B8-9696-4847-89F9-E58F470AF4FB} = {5CD096DB-6C44-48F1-9093-AD4C84B6B7EC} + {6E739132-EEAB-43A5-83C7-EB58C50D03A1} = {DD29EA8F-B1A6-45AA-8D2E-B38DA56D9EF6} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {78D2CF6A-60A1-43E3-837B-00B73C9DA384} diff --git a/Silk.NET.sln.DotSettings b/Silk.NET.sln.DotSettings index 3ba4299dad..4c074af525 100644 --- a/Silk.NET.sln.DotSettings +++ b/Silk.NET.sln.DotSettings @@ -1,4 +1,5 @@  + False CL True True diff --git a/build.cmd b/build.cmd new file mode 100755 index 0000000000..b08cc590f4 --- /dev/null +++ b/build.cmd @@ -0,0 +1,7 @@ +:; set -eo pipefail +:; SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd) +:; ${SCRIPT_DIR}/build.sh "$@" +:; exit $? + +@ECHO OFF +powershell -ExecutionPolicy ByPass -NoProfile -File "%~dp0build.ps1" %* diff --git a/build.ps1 b/build.ps1 new file mode 100644 index 0000000000..74b5ff2cc8 --- /dev/null +++ b/build.ps1 @@ -0,0 +1,74 @@ +[CmdletBinding()] +Param( + [Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)] + [string[]]$BuildArguments +) + +Write-Output "PowerShell $($PSVersionTable.PSEdition) version $($PSVersionTable.PSVersion)" + +Set-StrictMode -Version 2.0; $ErrorActionPreference = "Stop"; $ConfirmPreference = "None"; trap { Write-Error $_ -ErrorAction Continue; exit 1 } +$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent + +########################################################################### +# CONFIGURATION +########################################################################### + +$BuildProjectFile = "$PSScriptRoot\eng\build\Silk.NET.NUKE.csproj" +$TempDirectory = "$PSScriptRoot\\.nuke\temp" + +$DotNetGlobalFile = "$PSScriptRoot\\global.json" +$DotNetInstallUrl = "https://dot.net/v1/dotnet-install.ps1" +$DotNetChannel = "STS" + +$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1 +$env:DOTNET_NOLOGO = 1 + +########################################################################### +# EXECUTION +########################################################################### + +function ExecSafe([scriptblock] $cmd) { + & $cmd + if ($LASTEXITCODE) { exit $LASTEXITCODE } +} + +# If dotnet CLI is installed globally and it matches requested version, use for execution +if ($null -ne (Get-Command "dotnet" -ErrorAction SilentlyContinue) -and ` + $(dotnet --version) -and $LASTEXITCODE -eq 0) { + $env:DOTNET_EXE = (Get-Command "dotnet").Path +} +else { + # Download install script + $DotNetInstallFile = "$TempDirectory\dotnet-install.ps1" + New-Item -ItemType Directory -Path $TempDirectory -Force | Out-Null + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 + (New-Object System.Net.WebClient).DownloadFile($DotNetInstallUrl, $DotNetInstallFile) + + # If global.json exists, load expected version + if (Test-Path $DotNetGlobalFile) { + $DotNetGlobal = $(Get-Content $DotNetGlobalFile | Out-String | ConvertFrom-Json) + if ($DotNetGlobal.PSObject.Properties["sdk"] -and $DotNetGlobal.sdk.PSObject.Properties["version"]) { + $DotNetVersion = $DotNetGlobal.sdk.version + } + } + + # Install by channel or version + $DotNetDirectory = "$TempDirectory\dotnet-win" + if (!(Test-Path variable:DotNetVersion)) { + ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath } + } else { + ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath } + } + $env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe" + $env:PATH = "$DotNetDirectory;$env:PATH" +} + +Write-Output "Microsoft (R) .NET SDK version $(& $env:DOTNET_EXE --version)" + +if (Test-Path env:NUKE_ENTERPRISE_TOKEN) { + & $env:DOTNET_EXE nuget remove source "nuke-enterprise" > $null + & $env:DOTNET_EXE nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password $env:NUKE_ENTERPRISE_TOKEN > $null +} + +ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet } +ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile --no-build -- $BuildArguments } diff --git a/build.sh b/build.sh new file mode 100755 index 0000000000..1a870db0e4 --- /dev/null +++ b/build.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash + +bash --version 2>&1 | head -n 1 + +set -eo pipefail +SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd) + +########################################################################### +# CONFIGURATION +########################################################################### + +BUILD_PROJECT_FILE="$SCRIPT_DIR/eng/build/Silk.NET.NUKE.csproj" +TEMP_DIRECTORY="$SCRIPT_DIR//.nuke/temp" + +DOTNET_GLOBAL_FILE="$SCRIPT_DIR//global.json" +DOTNET_INSTALL_URL="https://dot.net/v1/dotnet-install.sh" +DOTNET_CHANNEL="STS" + +export DOTNET_CLI_TELEMETRY_OPTOUT=1 +export DOTNET_NOLOGO=1 + +########################################################################### +# EXECUTION +########################################################################### + +function FirstJsonValue { + perl -nle 'print $1 if m{"'"$1"'": "([^"]+)",?}' <<< "${@:2}" +} + +# If dotnet CLI is installed globally and it matches requested version, use for execution +if [ -x "$(command -v dotnet)" ] && dotnet --version &>/dev/null; then + export DOTNET_EXE="$(command -v dotnet)" +else + # Download install script + DOTNET_INSTALL_FILE="$TEMP_DIRECTORY/dotnet-install.sh" + mkdir -p "$TEMP_DIRECTORY" + curl -Lsfo "$DOTNET_INSTALL_FILE" "$DOTNET_INSTALL_URL" + chmod +x "$DOTNET_INSTALL_FILE" + + # If global.json exists, load expected version + if [[ -f "$DOTNET_GLOBAL_FILE" ]]; then + DOTNET_VERSION=$(FirstJsonValue "version" "$(cat "$DOTNET_GLOBAL_FILE")") + if [[ "$DOTNET_VERSION" == "" ]]; then + unset DOTNET_VERSION + fi + fi + + # Install by channel or version + DOTNET_DIRECTORY="$TEMP_DIRECTORY/dotnet-unix" + if [[ -z ${DOTNET_VERSION+x} ]]; then + "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --channel "$DOTNET_CHANNEL" --no-path + else + "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path + fi + export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet" + export PATH="$DOTNET_DIRECTORY:$PATH" +fi + +echo "Microsoft (R) .NET SDK version $("$DOTNET_EXE" --version)" + +if [[ ! -z ${NUKE_ENTERPRISE_TOKEN+x} && "$NUKE_ENTERPRISE_TOKEN" != "" ]]; then + "$DOTNET_EXE" nuget remove source "nuke-enterprise" &>/dev/null || true + "$DOTNET_EXE" nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password "$NUKE_ENTERPRISE_TOKEN" --store-password-in-clear-text &>/dev/null || true +fi + +"$DOTNET_EXE" build "$BUILD_PROJECT_FILE" /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet +"$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" --no-build -- "$@" diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md new file mode 100644 index 0000000000..63425757a9 --- /dev/null +++ b/docs/CHANGELOG.md @@ -0,0 +1,790 @@ +# Changelog/Version History + +The second-level headings define the version number, and the contents below that header up until the next header define +the release notes. The first heading encountered is treated as the latest version for build purposes. The headings +should be in SemVer order. + +Please read [the Contributions Guide](CONTRIBUTING.md) before writing release notes here! + +## 3.0.0-preview + +Silk.NET 3.0 Preview 1 + +- Added SDL3 bindings using the 3.0 bindings style. +- Added combined OpenGL bindings using the 3.0 bindings style. +- Improved the bindings style to be more accessible, IDE-friendly, and AOT-friendly. Learn more at **TODO ADD A LINK TO DOCUMENTATION HERE**. +- Removed SDL2 bindings. + +This is the first preview of the rewritten Silk.NET 3.0 - the latest and greatest Silk.NET, laser-focused on addressing +pain points and reimagining how C# bindings libraries can be done. Functionality not present but not listed as removed +in the changelog will likely be available in a future 3.0 preview and hasn't been rewritten yet. Further information +about 3.0, including current status of 3.0 development, can be tracked at https://github.com/dotnet/Silk.NET/issues/209 + +## 2.22.0 (04/11/2024) + +Silk.NET Mobile Update + +- Added production-ready iOS support - wrap your Program.cs/IView code with SilkMobile.RunApp and run as-is! +- Added the ability to programmatically focus a window using IWindow.Focus(). (thanks @mayatskiy/@Arugin) +- Added a helper for custom IO in Assimp. +- Added a ToString implementation for Vulkan handles to display the handle value. +- Added some missing Flags attributes to enums, reducing the number of bitwise operation warnings on enums. +- Updated to Vulkan 1.3.300. +- Updated to OpenXR 1.1.42. +- Updated to SDL 2.30.8. +- Updated to MoltenVK 1.2.11. +- Updated to DXVK 2.4.1. +- Updated to OpenAL Soft 1.23.1. +- Updated to shaderc 2024.3. +- Updated to Assimp 5.4.1. +- Updated to latest OpenGL specifications. +- Updated to latest OpenCL specifications. +- Updated to ImGui.NET 1.90.8.1. (thanks @matt-edmondson) +- Updated DirectX/Windows bindings to 10.0.26100.0. +- Updated WebGPU/wgpu/dawn bindings. +- Updated SPIR-V Reflect, Cross, Headers, and Tools to their latest Vulkan 1.3.296 version. +- Updated ANGLE binaries for macOS. (thanks @ramezgerges/Uno Platform) +- Improved native binary packaging. (thanks @joskuijpers, @alexrp) +- Fixed Android 14/API 34 RECEIVER_EXPORTED/RECEIVER_NOT_EXPORTED errors. +- Fixed WGPU binaries being out of sync with the bindings API surface and crashing as a result. +- Fixed MultiNativeContext reporting present symbols as missing, affecting WGL, OpenAL, and Vulkan in some cases. +- Fixed native packages not correctly applying when being referenced transitively on .NET Framework and .NET 6+ mobile. +- Fixed windows being stuck when minimising where a recursive call to DoEvents in callbacks is used. +- Fixed changes to the standard cursor type not being accurately reflected on the GLFW backend. +- Fixed Silk.NET.Core not checking its own directory for native binaries. +- Fixed an ImGui memory leak. (thanks @rbertels) +- Fixed being unable to obtain Wayland window pointers when GLFW is compiled with both X11 and Wayland. +- Miscellaneous bugfixes and improvements. + +Special thanks to Stride for sponsoring this 2.X update and our contributors for their contributions and continued interest in the project. +The Silk.NET team are hard at work on 3.0, with 2.X updates continuing with the support of contributors and sponsors. +Learn more at https://github.com/dotnet/Silk.NET + +## 2.21.0 (23/04/2024) + +Silk.NET April 2024 Update + +- Added nint overloads for the cases where OpenGL represents a native-sized integer as a void pointer. +- Added support for executing Windowing loops during repaint and drag events on GLFW in some cases. (thanks @otac0n) +- Added a distinction between "unset" (-1) and "default" (null) for Windowing depth/stencil buffer bits, defaulting to 24/8 on all platforms unless overridden. +- Added support for 64-bit Arm Linux for Assimp, GLFW (+ Windowing & Input), OpenAL Soft, SDL, Vkd3d, Vulkan Loader, SwiftShader, and WGPU. (thanks @alexrp) +- Added support for Apple Silicon Macs for OpenAL Soft, Vulkan Loader, and SwiftShader. (thanks @alexrp) +- Added support for 32-bit Arm Linux for Assimp, GLFW, OpenAL Soft, SDL, Shaderc, SPIR-V Cross, SPIR-V Reflect, Vkd3d, SwiftShader, and WGPU. (thanks @alexrp) +- Added support for 64-bit Windows on Arm for Assimp, OpenAL Soft, VulkanLoader, and SwiftShader. (thanks @alexrp) +- Added limited native library support (SPIR-V Tools and Shaderc) for glibc versions as old as 2.17 on Linux platforms. +- Added support for new standard cursor shapes in Input and GLFW. +- Updated to use `ref readonly` instead of `in`. +- Updated to OpenXR 1.1.36. +- Updated to DirectStorage 1.2.2. +- Updated to Vulkan 1.3.281. +- Updated to SDL 2.30.1. +- Updated to latest OpenCL specifications. +- Updated to latest SPIR-V Reflect. +- Updated to latest WebGPU/Dawn/WGPU headers. +- Updated Vkd3d native binaries. +- Fixed string marshalling occasionally resulting in memory access violations on newer .NET 8 versions. +- Fixed Windowing crashing on .NET Framework builds with prefer 32-bit set using GLFW. +- Fixed extension loading generic type usage issues with full IL trimming enabled. +- Fixed erroneous BreakneckLock acquisition logic slowing input events on mobile/SDL. (thanks @ZingBallyhoo) +- Fixed windowing losing events when using multiple windows on desktop with the mobile/SDL implementation. (thanks @ZingBallyhoo) +- Fixed some packages not referencing their native counterparts where appropriate. (thanks @alexrp) +- Fixed Input events for standalone joysticks not being tracked on GLFW. +- Fixed Input events no longer being tracked after 3-10 reopens of the same window on GLFW. +- Fixed V-Sync configuration not persisting over window state changes in Windowing. +- Fixed Circle.Contains erroneously comparing the squared vector distance from its center against its non-squared radius. (thanks @djoyahoy) + +After this update: +- Apple Silicon support is complete except for missing ANGLE binaries. +- Arm Linux support is complete except for missing DXVK, ANGLE, and Vulkan Loader (missing on 32-bit only) binaries. +- 64-bit Windows on Arm support is complete except for missing DXVK and ANGLE binaries. +- 32-bit Windows on Arm remains unsupported except for DirectStorage. + +## 2.20.0 (12/12/2023) + +Silk.NET December 2023 Update + +- Added support for UTF-8 file paths in GLFW and SDL windows (thanks @WinstonMao) +- Updated to OpenXR 1.0.32.1 +- Updated to Vulkan 1.3.273 +- Updated to latest OpenGL specifications +- Updated to latest OpenCL specifications +- Fixed Matrix2X2.GetDeterminant returning incorrect values +- Fixed ALC_SOFT_reopen_device being a non-context extension (thanks @okaniku, @doobah) + +## 2.19.0 (14/11/2023) + +Silk.NET November 2023 Update + +- Updated to OpenXR 1.0.31 +- Updated to Vulkan 1.3.270 +- Updated to latest ImGui.NET, alleviating some incompatibilities introduced by the ImGui.NET team. +- Updated to latest OpenGL specifications +- Fixed OpenCL clCreateImage not functioning as expected with ImageDesc's ABI +- Fixed OpenAL throwing when loading an extension prefixed with ALC_ instead AL_ + +## 2.18.0 (21/10/2023) + +Silk.NET October 2023 Update + +- Added SPIR-V Reflect bindings +- Added SPIR-V Cross bindings +- Added Shaderc bindings +- Added WIC/WindowsCodecs bindings (thanks @hez2010) +- Added multi-channel formats support for OpenAL (thanks @aleksrutins) +- Added EffectTarget support for OpenAL Soft (thanks @okaniku, @doobah) +- Added MoltenVK support for iOS (massive thank you to @zvasya for contributing and testing) +- Added macOS support for the CreateWebGPUSurface helper function (thanks @AsgardXIV) +- Added the ability to load MoltenVK directly as a fallback should the Vulkan Loader be unavailable on macOS +- Added trimming support with an option to enable/disable static-linking support at link time +- Added WinRT interoperability support for Direct3D 11. +- Added the ability to query extensions from specific Vulkan layers using the Silk.NET helpers +- Added extension methods on IGamepad to return Thumbstick state instead of requiring use of the indexers (thanks @jvyden) +- Added ref properties for Vulkan chain constituents (thanks @khitiara) +- Added Apple Silicon binaries for Assimp (thanks @jschieck) +- Added compatibility with Linux distributions using as early as glibc 2.16 +- Added equality operators and IEquatable to Bool32 (thanks @Syncaidius) +- Added ToSystem/ToGeneric as extension methods (rather than plain static functions) to convert to/from Silk.NET.Maths types (thanks @Wafer-EX) +- Added discriminant values to PinObjectMarshaller to tie pinned handles to state to which the pin pertains +- Updated to Vulkan 1.3.266 +- Updated to OpenXR 1.0.30 +- Updated to SDL 2.28.1 +- Updated to MoltenVK 1.2.5 +- Updated to latest WebGPU headers +- Updated to latest OpenCL specifications +- Updated to latest OpenGL specifications +- Improved allocations in the Silk.NET Loader (thanks @Youssef1313) +- Improved robustness of HLU on AOT compilations +- Fixed WGPU not loading with the correct filename on Windows +- Fixed COM V-Table indices not matching the Clang-reported V-Table index in some cases (DirectWrite/D2D1/DComp) +- Fixed OpenAL throwing when loading an extension prefixed with ALC_ instead AL_ +- Fixed WGL.GetApi throwing a NotImplementedException +- Fixed library loading failing on platforms that do not have a libdl.so symlink (we are now using libdl.so.2, thanks @CasualPokePlayer) +- Fixed a StackOverflowException when using SetWindowIcon in some cases with Silk.NET.Windowing +- Fixed GLFW crashing in some cases where multiple windows are used +- Fixed WebGPU using the incorrect size for booleans +- Fixed a memory leak with some string marshalling functions + +If you are using Silk.NET with an iOS or Android application, please enable trimming and set TrimMode to full. + +## 2.17.1 (09/04/2023) + +Fix a minor regression with some OpenGL Span overloads. Read more about the 2.17 update here: https://dotnet.github.io/Silk.NET/blog/apr-2023/silk2170.html + +## 2.17.0 (06/04/2023) + +Silk.NET Spring 2023 Update 1 + +- Added zero-cost extension methods for ComPtrs, making our DirectX bindings easier to use and higher quality than ever before. +- Added WebGPU bindings for Dawn and WGPU. +- Added Direct2D bindings. (massive thank you to @curin) +- Added DirectComposition bindings. (again, massive preesh to @curin) +- Added DirectWrite bindings. +- Added d3d11on12 bindings. +- Added WGL bindings. +- Added support for Android 12. +- Added support for OpenAL disconnect extension. (thanks @okaniku) +- Added GLFW API constants for ANGLE. (thanks @cyraid) +- Added extension functions for OpenAL BufferData to make use of AL_EXT_float32 enums. +- Added ReopenDevices extension for OpenAL Soft. (thanks @LeNitrous) +- Added BufferCallback extension for OpenAL Soft. +- Added Vulkan structure chain polymorphism. (thanks @Khitiara for the proposal) +- Added SDL/GLFW native libraries for Windows on ARM64. +- Added IsScancodePressed function in Silk.NET Input. +- Added TopMost in Silk.NET Windowing (thanks @MarioGK) +- Added EGL display and surface to INativeWindow. +- Added an explicit check against calling Reset on a window while within the render loop of said window. +- Added support for multiple native binary candidate paths for a single binding. +- Improved support for WASM and AOT in the Silk.NET loader. +- Improved support for Windows on ARM64. +- Improved Silk.NET.Maths generic specialization codegen. +- Improved support for DXVK, including a new DXHandle property in INativeWindow for getting Linux HWND equivalents. +- Improved support for Silk.NET.Windowing under reflection-free NativeAOT +- Updated to SDL 2.24. +- Updated to Vulkan 1.3.246. +- Updated to DirectStorage 1.1.1. +- Updated to OpenXR 1.0.27. +- Updated to Assimp 5.2.5. +- Updated to latest OpenCL specifications. +- Updated to latest OpenGL specifications. +- Updated to latest ImGui. +- Fixed XInput GetApi not being implemented. (thanks @skyebird189) +- Fixed TransparentBuffer not being applied correctly without specifying a PreferredBitDepth. (thanks @MarioGK) +- Fixed wide string marshalling. +- Fixed string array marshalling on systems where the max DBCS character size is insufficient for UTF8. +- Fixed Span overloads not calculating the correct length value for ommitted (implicit) length parameters. +- Fixed copying of native libraries under .NET Framework 4.6.1. (thanks @paralaxsd) +- Fixed SDL crashing on Android when the screen rotates in some cases. +- Fixed a memory leak when using GlobalMemory to marshal string arrays instead of StringArrayToPtr. (thanks @Khitiara) + +## 2.17.0-preview (19/03/2023) + +Silk.NET Spring 2023 Update 1 (EARLY PREVIEW) + +- Added zero-cost extension methods for ComPtrs, making our DirectX bindings easier to use and higher quality than ever before. +- Added WebGPU bindings for Dawn and WGPU. +- Added Direct2D bindings. (massive thank you to @curin) +- Added DirectComposition bindings. (again, massive preesh to @curin) +- Added d3d11on12 bindings. +- Added WGL bindings. +- Added support for OpenAL disconnect extension. (thanks @okaniku) +- Added extension functions for OpenAL BufferData to make use of AL_EXT_float32 enums. +- Added ReopenDevices extension for OpenAL Soft. (thanks @LeNitrous) +- Added BufferCallback extension for OpenAL Soft. +- Added Vulkan structure chain polymorphism. (thanks @Khitiara for the proposal) +- Added SDL/GLFW native libraries for Windows on ARM64. +- Added IsScancodePressed function in Silk.NET Input. +- Added TopMost in Silk.NET Windowing (thanks @MarioGK) +- Added EGL display and surface to INativeWindow. +- Added an explicit check against calling Reset on a window while within the render loop of said window. +- Improved support for WASM and AOT in the Silk.NET loader. +- Improved support for Windows on ARM64. +- Improved Silk.NET.Maths generic specialization codegen. +- Improved support for DXVK, including a new DXHandle property in INativeWindow for getting Linux HWND equivalents. +- Updated to SDL 2.24. +- Updated to Vulkan 1.3.242. +- Updated to DirectStorage 1.1.0. +- Updated to OpenXR 1.0.26. +- Updated to latest OpenCL specifications. +- Updated to latest OpenGL specifications. +- Updated to latest ImGui. +- Fixed XInput GetApi not being implemented. (thanks @ohtorobinson) +- Fixed TransparentBuffer not being applied correctly without specifying a PreferredBitDepth. (thanks @MarioGK) +- Fixed wide string marshalling. + +## 2.16.0 (02/08/2022) + +Silk.NET Summer 2022 Update 1 + +- Massive project-wide bindings overhaul, making our bindings easier to use and higher quality than before. +- Added grouped OpenCL enums. (thanks @Alexx999) +- Added support for creation of contexts with versions prior to OpenGL 3.2. (thanks @Beyley) +- Added support for multiple ImGuiControllers. (thanks @Beyley) +- Added support for single-file mode. (thanks @kant2002) +- Added shorter names in enums used in bindings. +- Added AspectRatioEstimate API to VideoMode. (thanks @ohtrobinson) +- Update to latest OpenGL specifications +- Update to OpenXR 1.0.24 +- Update to Vulkan 1.3.223 +- Improved ImGuiController disposal. (thanks @Beyley) +- Fixed incorrect OpenCL functions. This is breaking, but if you were using these functions your code didn't work anyway. (thanks @Alexx999) +- Fixed IsVisible not being respected in some cases. (thanks @paralaxsd) +- Fixed window close events not being respected on the SDL backend. (thanks @paralaxsd) + +This update may result in your projects having a lot of deprecation warnings. We believe this update contains much-needed improvements to both Silk.NET and code consuming it, but we appeciate migrating to this version may take time. + +## 2.15.0 (02/04/2022) + +Silk.NET April 2022 Update + +- Add DirectStorage bindings +- Add legacy OpenGL 2.0 support for the ImGui extension (thank you @Beyley) +- Add the ability to customize the functionality/priorities of DefaultPathResolver +- Add more auto-generated constants to Assimp, DirectX, and SDL +- Update to Vulkan 1.3.210 +- Update to latest OpenGL specifications +- Fix Assimp native package being out-of-sync with latest binding +- Fix SDL input backend producing different key mappings to the GLFW input backend +- Fix Android Activity restarts not being properly handled by Silk.NET Windowing + +## 2.14.0 (15/03/2022) + +Silk.NET March 2022 Update + +- Add a Version13 convenience property (thanks @Eeveelution) +- Add DXGI_CREATE_FACTORY_DEBUG Constant to DXGI (thanks @Eeveelution) +- Update to Vulkan 1.3.207 +- Update to latest OpenCL specifications +- Update to latest OpenGL specifications +- Fix SilkMarshal.StringToPtr throwing "buffer is too small to contain the encoded data" in some cases +- Fix Direct3D11 having its own ID3D10Blob type +- Fix Assimp using the wrong quaternion types +- Fix SDL windowing backend causing lots of allocations +- Fix GLFW windowing backend circular reference/memory leak + +This release may be breaking for users, but those users who experience breaking changes most likely had code that didn't work anyway. + +## 2.13.0 (06/02/2022) + +Silk.NET February 2022 Update + +- Add an OpenGLES version of the ImGui plugin (thanks @Beyley) +- Add an initial version of a Rider/ReSharper plugin to open Khronos specifications with one click (may not be available for install immediately) +- Update to OpenXR 1.0.22 +- Update to Vulkan 1.2.203 +- Update to latest OpenCL specifications +- Fix mouse scroll wheels state not always being up-to-date on the SDL backend (thanks @paralaxsd) + +In addition, thanks to @roeyskoe for contributing lots of behind-the-scenes changes to improve the Silk.NET native packaging experience. + +## 2.12.0 (07/01/2022) + +Silk.NET January 2022 Update + +- Add support for retrieving the clipboard text on IKeyboard (thanks @Beyley) +- Add a constructor for customizing the ImGui configuration before ImGuiController applies its configuration (thanks @sampletext32) +- Add Flags attributes to all bitmasks generated from C++ headers (i.e. DirectX), fixing warnings on usage +- Update to latest OpenCL specifications +- Update to Vulkan 1.2.203 (from 1.2.201, not 1.2.210 as the previous update indicated) +- Fix input information being one or two frames behind due to running in DoUpdate instead of DoEvents +- Fix BuildTools incorrectly defaulting to Cdecl instead of Winapi (fixes 32-bit issues) +- Fix string marshalling not allocating enough memory for multibyte UTF8 strings +- Fix a DivideByZeroException in PointToFramebuffer thrown in some circumstances +- Fix SymbolLoadingExceptions on usage of GetStringList functions in OpenAL + +## 2.11.0 (06/12/2021) + +Silk.NET December 2021 Update + +- Add a high-level C# wrapper over Vulkan Structure Chains (thanks @thargy). +- Add a WindowClass option in Windowing for setting the X11 class name (thanks @Pydacor) +- Add a IsContextControlDisabled option in Windowing to disable automatically making OpenGL contexts current +- Add support for cloning Vk objects to allow reuse of their function tables independently +- Update to latest OpenCL specifications +- Update to latest OpenGL and OpenGLES specifications +- Update to Vulkan 1.2.210 +- Fix string marshalling regression which resulted in multiple string-overloaded functions throwing +- Fix multiple input-related problems when using the SDL backend of our Windowing abstractions +- Discontinued support for Legacy Xamarin (exclusively supporting .NET 6 mobile from now on) + +## 2.10.1 (10/11/2021) + +Silk.NET .NET Conf 2021 Update + +- Fixes issues with 2.10 (compiled against .NET 6 RC1) not working correctly in projects using the .NET 6 Release SDK. + +## 2.10.0 (06/11/2021) + +Silk.NET November 2021 Update + +- Added support for BigInteger and Complex in the Silk.NET.Maths.Scalar APIs. (thanks @WhiteBlackGoose) +- Added helper constructors for maths types (Rectangle, Box2D, Box3D, etc). (thanks @nathan-alden-sr) +- Added bitwise APIs to Silk.NET.Maths.Scalar. (thanks @WhiteBlackGoose) +- Added support for configuring OpenGL multisamping. +- Updated to Vulkan 1.2.197. +- Updated to latest OpenCL specifications. +- Updated to latest OpenGL specifications. +- Updated DirectX and Win32 bindings to Windows 11 SDK. +- Removed redundant references with no DLLs (i.e. BCL/legacy packages not needed on newer platforms, thanks @nathan-alden-sr @WhiteBlackGoose) +- Removed problematic implicit-in OpenGL overloads (fixes the infamous VertexAttribPointer bug) +- Fixed incorrect character encoding of keyboard (text) input on the SDL backend. (thanks @roeyskoe) +- Fixed native libraries not being resolved despite being present in the "runtimes" folder. +- Miscellaneous documentation fixes and improvements. + +## 2.9.0 (05/10/2021) + +Silk.NET October 2021 Update + +- Add bindings for DirectX Video Acceleration (DXVA) +- Add bindings for D3D9Ex +- Add bindings for extra core Win32 APIs (as required by DXVA) +- Add a .NET 6 code path for GlobalMemory using NativeMemory +- Add more TFMs in addition to .NET Standard 2.0 for DirectX bindings +- Add enhanced anonymous struct support with ref-returning properties on .NET Standard 2.1 and up +- Update to Vulkan 1.2.194 +- Update to latest OpenCL specifications +- Fix MarshalDirectiveException when a struct containing a char passes across a native boundary +- Fix Vulkan out parameters not having their structure type set before passing across the native boundary +- Fix native libraries not being found in some cases for self-contained executables + +## 2.8.0 (04/09/2021) + +Silk.NET September 2021 Update + +- Add TryGetExtension methods to AL & ALContext +- Add support for .NET 6 Android +- Update to Vulkan 1.2.190 +- Update to OpenXR 1.0.19 +- Update to latest OpenGL specifications +- Update to latest OpenCL specifications +- Fix calling CreateInput on an uninitialized IView resulting in a AccessViolationException +- Fix calling Close on an uninitialized IView resulting in an AccessViolationException +- Fix Silk.NET (and by extension SDL) taking full control of orientation on Android +- Fix DoRender being called if Window.Close was called during DoUpdate +- Fix Scalar.Abs for double values +- Fix "Pfn" function pointer structures being marshalled with the incorrect calling convention +- Fix Scalar.IsNaN and Scalar.IsInfinity returning true for non floating point types +- Fix Box2D.Center returning bogus values +- Fix incorrect documentation in Thumbstick.Direction +- Fix incorrect documentation in WindowOptions + +## 2.7.0 (09/08/2021) + +Silk.NET August 2021 Update + +- Add code signing to all Silk.NET binaries +- Add support for platform-default calling conventions +- Update to latest OpenGL specifications +- Update to Vulkan 1.2.187 +- Update to OpenXR 1.0.18 +- Fix loading some OpenAL extensions + +## 2.6.0 (03/07/2021) + +Silk.NET July 2021 Update + +- Add support for OpenAL Soft native libraries for ALContext +- Update to Vulkan 1.2.183 +- Update to latest OpenCL specifications +- Fix struct layout issues in DirectX and OpenXR bindings +- Fix OpenCL library name resolution on Linux +- Fix NU5127, NU5128, and NU1701 native package NuGet errors on .NET Framework +- Improve FileNotFoundExceptions when native library loading fails +- Improve GlobalMemory call chains by removing unnecessary usage of Span<T> + +## 2.5.0 (08/06/2021) + +Silk.NET June 2021 Update + +- OpenXR bindings are now production-ready & no longer experimental! +- Add (optional) native binaries for OpenAL Soft +- Add support for reversed-z projection matrices in Silk.NET.Maths +- Add bindings for a number of missing Vulkan and OpenCL extensions +- Add OpenGL-OpenXR interoperability helper APIs +- Add more helper APIs in Silk.NET.Core and Silk.NET.Maths +- Update to latest OpenGL and OpenGLES specifications +- Update to OpenXR 1.0.16 +- Update to Vulkan 1.2.180 +- Fix SDL OpenGL context issues when not using OpenGL +- Fix GLFW native window issues on 32-bit Windows +- Fix OpenXR loading issues +- Fix incorrect bindings in OpenXR +- Miscellaneous windowing & input bugfixes & improvements + +## 2.4.0 (07/05/2021) + +Silk.NET May 2021 Update + +- Add As methods to all Maths types & other miscellaneous API additions +- Add support for provisional Vulkan Video encoding & decoding extensions +- Update to latest OpenGL specification +- Update to latest OpenCL specification +- Update to Vulkan 1.2.177 +- Update to OpenXR 1.0.15 +- Fix ImGui robustness +- Fix disposal and reset robustness +- Fix SDL input backend not respecting deadzones +- Fix GLFW input backend not respecting start-up state +- Fix Vulkan device function pointer loader bugs +- Fix BSTR GlobalMemory issues +- Fix Vulkan codegen issues +- Fix bitfield codegen for Vulkan & clang-generated bindings +- Miscellaneous windowing & input bugfixes + +## 2.3.0 (03/04/2021) + +Silk.NET April 2021 Update + +- Add a new Silk.NET.OpenGL.Extensions.ImGui package, a first-party ImGui integration for Silk.NET.OpenGL +- Add support for native method definitions across multiple partial classes +- Add improved SDL exception throwing, only throwing when a function indicates an error +- Updated metadata to reference .NET Foundation and dotnet following our .NET Foundation onboarding +- Update to SDL 2.0.14 +- Update to GLFW 3.3.3 +- Miscellaneous build system related fixes +- Miscellaneous SourceLink related fixes + +## 2.2.0 (06/03/2021) + +Silk.NET March 2021 Update + +- Add memory pooling for Input State Capture extensions +- Add Input State Capture stability and robustness improvements +- Update to Vulkan 1.2.171 +- Update to latest OpenGL as of 22nd February 2021 +- Update to latest OpenCL as of 2nd March 2021 +- Fix window disposal/reset bugs +- Fix a build toolchain issue where packages released in Debug mode (#416) +- Fix a string marshalling issue and OpenAL regression (#414) + +## 2.1.0 (16/02/2021) + +Silk.NET February 2021 Update + +- Add native handles for Windowing +- Add Veldrid support +- Add support for macro constants +- Add support for unnamed nested anonymous struct fields +- Add better name hinting for anonymous types +- Add support for OpenGL token reuse for tokens that had been previously deprecated and removed, fixing #400 +- Add nested anonymous struct "fusion" with their parent structs, allowing direct ref access on .NET Standard 2.1 platforms without going through the anonymous field +- Add static Guid members for structs with a COM interface ID +- Fix struct field size and type variation between 32-bit and 64-bit in generated C++ bindings +- Fix calling convention detection, and actually respect the calling convention we detect +- Fix being unable to specify calling convention using NativeApiAttribute +- Fix some type issues +- Fix accidental initialization of both platforms, resolving #407 +- Fix zero-length string allocation resulting in an IndexOutOfRangeException exception by clamping the allocation length to 1, resolving #396 +- Fix unreasonably small delta times when running a window with OpenGL V-Sync enabled +- Fix faulty addition in Silk.NET.Maths where (u)ints were produced by (s)byte and (u)short addition, resulting in an invalid cast +- Fix malformed XML in MSBuild targets included by Silk.NET.Windowing.Sdl.Android, resolving #405 + +This should be treated as an "emergency patch" and you should update as soon as reasonably practicable. Some of the bugs +in 2.0 are fatal in some workloads. + +## 2.0.0 (02/01/2021) + +Silk.NET January 2021 Update - 2.0, the largest Silk.NET update to date + +- Adds Assimp bindings +- Adds SDL bindings +- Adds a SDL windowing backend +- Adds a new, AOT-friendly interop system (SilkTouch) +- Adds Android support +- Adds a generic, flexible maths library to fill in the holes left by System.Numerics +- Adds an initial set of Microsoft DirectX bindings +- Adds improved function pointer support +- Adds more OpenGL framebuffer bit-depth options +- Adds shared OpenGL contexts +- (EXPERIMENTAL!) Adds OpenXR bindings +- (EXPERIMENTAL!) Adds iOS support +- Massive performance improvements +- GLFW fixes +- Windowing and Input fixes/refactorings +- OpenCL and OpenAL improvements +- Vulkan bug fixes +- Miscellaneous bug fixes and improvements + +This release may be breaking and will likely require some modification in updating existing code to it. Please contact +us in our Discord server if this is the case. We'll do our best to publish a migration guide shortly. + +## 2.0.0-preview5 (29/12/2020) + +Includes everything from the last previews, as well as: +- Maths packaging fixes +- Improved function pointer support +- Vulkan bug fixes +- OpenGL VSync fixes +- Miscellaneous Linux library loading improvements (#279) +- More OpenGL framebuffer bit-depth options (#286) +- Shared OpenGL contexts (#334) +- SDL windowing improvements (#350) +- Minor assembly size improvements (#374) +- Other miscellaneous fixes and improvements + +This is the last 2.0 preview before full release, and is a production-ready "go live" release. Feel free to use this in +new applications. + +## 2.0.0-preview4 (08/12/2020) + +Includes everything from the last previews, as well as: +- A generic, flexible maths library to fill in the holes left by System.Numerics +- An initial set of Microsoft DirectX bindings +- Miscellaenous fixes and improvements + +Silk.NET v1.9.0 was the last version of Silk.NET v1.X as this release (2.0 Preview 4) is a production-ready "go live" +release. Feel free to use this in new applications. + +## 2.0.0-preview3 (17/11/2020) + +Includes everything from the last previews, as well as: +- Experimental Android support +- Experimental iOS support +- Add static linking support to SilkTouch +- Surface API improvements +- SilkTouch improvements +- OpenCL and OpenAL improvements +- Other miscellaneous bug fixes and improvements + +## 2.0.0-preview2 (21/08/2020) + +Includes everything from the last previews, as well as: +- SDL bindings +- A SDL windowing backend +- A new, AOT-friendly interop system +- A new and improved overload system and bindings API surface +- Miscellaneous OpenXR and GLFW fixes +- Miscellaneous windowing and input fixes and refactorings + +## 2.0.0-preview (15/07/2020) + +Includes Assimp and experimental OpenXR bindings. + +## 1.9.0 (04/12/2020) + +Silk.NET December 2020 Update - The Final Silk.NET 1.x Update + +- Update to latest specifications. +- Miscellaneous bug fixes and improvements. + +## 1.8.0 (06/11/2020) + +Silk.NET November 2020 Update + +- Update to latest specifications. +- Miscellaneous bug fixes and improvements. + +## 1.7.0 (02/10/2020) + +Silk.NET October 2020 Update + +- Add a BorderSize property and GetFullSize extension method to IWindow for working with window borders. +- Add a Center extension method which will center the window to a monitor. +- Update to latest specifications. +- Miscellaneous bug fixes and improvements. + +## 1.6.0 (04/09/2020) + +Silk.NET September 2020 Update + +- Add a byte* overload to Glfw.GetError +- Make GlfwProvider throw if Glfw.Init fails +- Update to latest specifications +- Miscellaneous bug fixes and improvements + +## 1.5.0 (07/08/2020) + +Silk.NET August 2020 Update + +- Update to Vulkan 1.2.149 +- Update OpenCL +- Add a Time property to IView, tracking the seconds since window initialization +- Add a Run method to IView, which will invoke a delegate as fast as possible (required for 2.0 and mobile) +- Fix more first-chance exceptions + +## 1.4.0 (03/07/2020) + +Silk.NET July 2020 Update + +- Update to OpenCL v3.0.1 (Provisional Specification) +- Update to Vulkan v1.2.145 +- Update to SuperInvoke v1.1.0 +- Added an IGLContext implementation (GlfwContext) to Silk.NET.GLFW +- Added glfwSetFramebufferSizeCallback to Silk.NET.GLFW +- Fixed some cases of first-chance exceptions when loading native libraries +- Miscellaneous bug fixes and improvements + +## 1.3.0 (05/06/2020) + +Silk.NET June 2020 Update + +- FPS stabilization improvements +- Vulkan loader improvements +- Support EGL_NV_stream_consumer_eglimage + +## 1.2.1 (16/05/2020) + +Silk.NET 1.2.1 Patch Update + +- Updated to the latest OpenCL specification +- Updated to Vulkan 1.2.141 +- Added a ContinueEvents method to force an event-driven game loop to continue +- Added support for IGLContext in GL instances (this was slated for 1.2.0, but left out for some reason) +- Moved GlfwLoader out of Silk.NET.Windowing.Desktop and into Silk.NET.GLFW + +## 1.2.0 (01/05/2020) + +Silk.NET May 2020 Update + +- Update to Vulkan 1.2.139 +- Update to OpenCL 3.0 +- Add a new context abstraction +- Add extensions for using Silk.NET's Windowing API with Veldrid +- Add a new way of accessing OpenGL-specific and Vulkan-specific functions +- Add a helpful hint as to why your Vulkan functions are throwing EntryPointNotFoundExceptions. +- Add ExtensionName constants to all extension classes (useful for Vulkan) +- Add an option for waiting for events before proceeding to execute the render loop. +- Add a setter to the IsClosing property so you can cancel window closure +- Fix the incorrect DebugUtilsMessengerCallbackFunctionEXT signature +- Fix a bug where you couldn't catch GlfwExceptions on Linux and macOS +- Fix a bug where attempting to call Invoke on a window will result in a deadlock +- Fix a bug where VSync was always on regardless of the requested configuration +- Fix a bug where eventhough we fixed the previous VSync bug, we still weren't respecting initial vsync settings. +- Fix a bug where directly accessing scroll-wheel info would return bogus data +- Fix a bug where Render and Update are fired again after close +- Deprecated adaptive vsync +- Deprecated SilkManager +- Deprecated obsolete native methods that we weren't annotating as obsolete before +- Miscellaneous fixes and improvements + +## 1.1.1 (13/04/2020) + +Silk.NET 1.1.1 Hotfix + +- Fix OpenAL symbol loading bugs +- Fix a bug where gamepad button states weren't stored correctly +- Fix a bug where the Close method wouldn't trigger the Close event + +## 1.1.0 (05/04/2020) + +Silk.NET April 2020 Update + +- Add Input Capture Extensions +- Add transparent framebuffers +- Fix miscellaneous bugs in OpenAL +- Updated to Vulkan 1.2.136 +- Updated OpenCL to include 2.2's latest experimental features + +## 1.0.1 (17/03/2020) + +This is a small patch fixing some small Vulkan-specific bugs within Silk.NET. + +- Updated to Vulkan 1.2.135 (March 17, 2020) +- Fixed Vulkan extension loading +- Fixed Vulkan windowing +- Fixed some typos in autogenerated method names + +## 1.0.0 (08/03/2020) + +This is the first full release of Silk.NET. Changes since Preview 5: + +- Add window icons +- Add more in-depth OpenGL context-management methods. +- Add click events +- Add OpenGL direct state access overloads +- Add Vulkan boolean & version helpers + +## 1.0.0-preview5 (18/02/2020) + +Silk.NET 1.0 Preview 5 + +- Added cursor modes +- Added EGL bindings (no windowing backend yet) +- Rewrite the overload system, hopefully resulting in overloads that make sense. +- Miscellaenous Silk.NET.Core improvements +- Updated to SuperInvoke 1.0.3, encompassing a lot of bug fixes. +- Updated to GLFW 3.3.2, encompassing a lot of bug fixes. +- Fix an infinite loop in OpenAL's GetStringList methods +- Other bug fixes + +As a result of the new overload system, some work may be required to migrate to Preivew 5 from an earlier +preview. + +## 1.0.0-preview4 (08/02/2020) + +- Added OpenCL +- Added monitor support +- Added view/window separation (in preparation for mobile support in a later release) +- Added monitors and video modes +- Fixed vsync +- Removed AdvancedDLSupport in favour of SuperInvoke +- Removed dispatcher +- Removed other unused/unnecessary packages + +## 1.0.0-preview3 (15/11/2019) + +- Added Vulkan +- Added mouse movement +- Added gamepad rumble (though it hasn't been implemented in GLFW yet) +- Added macOS support +- Added more overloads, as well as fixed the existing ones. +- Added DoRender, DoUpdate, DoEvents, Open, Reset, and IsClosing members for custom game loops +- Added KeyChar for receiving text input (modifiers applied) +- Added strongly-typed enum groupings for OpenGL and OpenGLES +- Fixed extension loading +- Fixed a bug where strings weren't marshalled properly +- Fixed a bug where some shaders didn't compile correctly +- Fixed a bug where some programs didn't link correctly +- Fixed various OpenAL bugs +- Removed all built-in thread management, the user will have to take care of this themselves. +- Synchronised the enum of all available keys with that of GLFW + +## 1.0.0-preview2 (10/08/2019) + +- Fixed a bug where calling an unloaded OpenGL function will throw a GlfwException. +- Fixed a bug where GLFW wasn't swapping the buffers (no drawing will ever make it to the window!) +- Refactored Silk.NET.Core, unifying the platform loading logic. +- Renamed OnRender to Render + other windowing events + +## 1.0.0-preview (04/08/2019) + +- First preview release diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index d890edef62..f2e467a917 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -10,11 +10,60 @@ Please: - **DO** talk to us in #team-talk in the Discord or open a discussion issue if your contribution is sizeable. - **DO** keep the discussions around contributions focused. If you have another matter to discuss, rather than creating a massive tangent in the current discussion, open up a new one. - **DO** follow the code of conduct if discussing on GitHub and/or the Discord #rules if discussing on Discord. +- **DO** update the release notes, unless your change only affects the repository experience, examples, internals (without user-facing behavioural changes), or otherwise isn't user-facing. - **DON'T** make PRs that don't directly affect the end user, such as style changes. These are best done as part of a PR related to the area in question. Documentation is fine (and encouraged!), as this is useful to the end user. - **DON'T** commit code you didn't write without following its license and following our guidelines for doing so in the Contributor License Agreement. If you are unable to license some code, don't commit it. - **DON'T** surprise us with big pull requests or big API changes without talking to us first! - **DON'T** make PRs for legal or administrative documents, such as the license, file headers, or code of conduct. If you see something off, let us know and we'll change it. +## Updating Release Notes + +Silk.NET has excessive attention to detail when it comes to its most user-facing documentation, as these are seen as +promotional opportunities to shape user opinion of the library. For instance, a user is much more likely to favour a +library with a very clear README that clearly states what the project does, and why the user should use it. This is why +README changes are some of the most deliberated changes made to this project. We see release notes in this category too, +as release notes present an opportunity to show off and focus on all the great stuff we've been working on for our users +to paint the library in an even more positive light. This is also why we handwrite release notes rather than +autogenerate them as most libraries do these days. + +To this end, our release notes follow a very particular format. Namely: +- A headline/title. For example `Silk.NET April 2024 Update` or `Silk.NET 3.0 Preview 1`. +- A blank line. +- A bullet list of changes. + - Each list element must start with the word `Added`, `Updated`, `Improved`, `Removed`, `Deprecated` or + `Fixed` and list elements should be in that order. That is, all the `Added` elements should come first, followed by + all of the `Updated` items, etc. For example, `Added OpenGL bindings`, + `Fixed window not resizing correctly when -1 is passed`, etc. Note that beyond this first word rule, the ordering + is completely arbitrary. Maintainers will likely reorder the changelist to highlight the most impactful changes + first upon release, so don't worry about where you put your change in this list. + - The list element can be followed by `(thanks @name)` if you would like to thank an non-maintainer/external + contributor (or yourself, if you are an external contributor), where `name` is replaced with a GitHub username. + Maintainers or other contributors that have an ongoing association/relationship with the project team can also do + this but please be aware that this can seem like blowing your own trumpet. Feel free to comma-delimit multiple + names as well e.g. `(thanks @Perksey, @curin)`. +- A blank line. +- Additional information about the release if necessary, denoted by a blank line if provided. + +We encourage all contributors to add a change list element _as they're doing the change_. This is so maintainers don't +have to spend lots of time creating a conclusive changelog before releasing an update. This also means that the release +notes for next update _should_ already be started in `CHANGELOG.md` before the update is actually released. That is, a +second-level heading for the assumed next version should exist, ideally with a heading/title (or a placeholder). If this +isn't the case, please create one. This usually happens if you're working on the first thing after a release! For +example, if the latest release was `3.0.0`, you can likely assume that the next release is `3.1.0` (and we'll change +this later if it's not the case), resulting in a template like: + +``` +## 3.1.0 + +Silk.NET 3.1 Update + +- Added . + +``` + +Violations of these guidelines will be evaluated on a case-by-case basis, with maintainer approval. This is typically to +highlight overwhelmingly extravagant changes. + ## Breaking changes Contributions must maintain API signature and behavioral compatibility. Contributions that include breaking changes will be rejected. There are exceptions to this, such as if the contribution is made against a major/breaking version branch (such as `2.0` instead of `master`), however this is subject to the team's approval. At risk of sounding like a broken record, talk to us about your idea first! diff --git a/docs/for-contributors/build-system.md b/docs/for-contributors/build-system.md new file mode 100644 index 0000000000..d25f34d605 --- /dev/null +++ b/docs/for-contributors/build-system.md @@ -0,0 +1,199 @@ +# Build System + +Silk.NET strives to use vanilla `dotnet build` as much as possible, and that is the case for building Silk.NET itself. +There are a few noteworthy aspects of our usable of MSBuild though, and also some actions outside of building the +library itself that are provided by a auxiliary build system implemented using the NUKE build automation framework. + +## MSBuild Usage + +### Package READMEs + +NuGet has recently added functionality to include a "README" rendered from Markdown on the front page of a package in +the NuGet Gallery. To ease maintenance, this is derived from the main README.md file for the repository but with some +deviations to account for NuGet's extremely limited Markdown renderer. To differentiate these contents, the following +markers are added to the README file. + +| Marker Text | Replacement for NuGet | +|---------------------------------------------|-----------------------| +| `` | `` | `-->` | +| `` | (removed) | + +Obviously they markers are as-is when served on NuGet, and represent the NuGet content being commented out. + +In addition, it is encouraged that all packages set the `SilkDescription` and `SilkExtendedDescription` properties to +add more information about the package. `SilkDescription` is prepended to the `PackageDescription`. Both +`SilkDescription` and `SilkExtendedDescription` (in that order) are added to the README file beneath an +`# About This Package` header, replacing the text `` in +README.md. + +The additional text replacements made for NuGet Markdown compatibility, along with the rest of this logic, can be seen +in `Directory.Build.targets`. + +### Versioning + +We determine the Silk.NET version number automatically from the [CHANGELOG.md](../CHANGELOG.md) file, specifically +the first second-level heading in that file. In order to do that, `Directory.Build.targets` contains a +`SilkGetVersionInfoTask` inline task that outputs the `Version` and `VersionSuffix` when used in `SilkShippingControl`. +Additionally, `SilkShippingControl` is declared a dependency for the version and package version in +`Directory.Build.props`. See [CONTRIBUTING.md](../CONTRIBUTING.md) for more info on the CHANGELOG file. + +### Public API + +High Level Utilities (HLUs) must be subject to Public API tracking. This is to prevent undue breaking changes. To enable +it for a project, simply add the following to a project: + +```xml + + + + true + + + + + + +``` + +The `ItemGroup` is an unfortunate deficiency with `Directory.Build.targets`. While putting it in this file would be +sufficient for build, it does not make for a pleasant development experience as IDEs do not pick it up from those files. +The empty public API files are automatically generated on first resolve. + +### Central Package Management + +We manage all the versions for our dependencies in Directory.Packages.props. Learn more about Central Package Management +[here](https://learn.microsoft.com/en-us/nuget/consume-packages/central-package-management). + +### Metapackages + +In 2.X, we introduced the concept of "metapackages" which were facade NuGet packages that contained no libraries or +anything that tangibly influences the build process, and simply declared dependencies to other packages. This came in +handy when pulling in e.g. an abstractions package and an implementation package all from a top-level package (e.g. +`Silk.NET.Windowing` pulling in `Silk.NET.Windowing.Common` and `Silk.NET.Windowing.Glfw`). Now that the top-level +packages include both abstractions and a reference implementation (using trimming instead where the implementation is +not used), only the top-level `Silk.NET` metapackage remains. The goal of this package has been to include _every single +non-extension Silk.NET package in existence_, but we did forget to update this a little bit as we added more packages, +so it ended up just being OpenGL and Vulkan mostly. We always argued that you probably don't want this package, but it +is undeniable that it provides non-zero benefit in scenarios where a quick bring-up is desired (e.g. scratchpads, +scripting/REPL, etc). As such, we decided to make this package more robust by having it automatically reference core +packages as we add them. Today, this is every `sources/A/A/Silk.NET.A.csproj` file where `A` represents a name of a +top-level directory in `sources`. It is highly likely that we'll want to amend this in the future. Note that we exclude +SilkTouch from this as this is unlikely to be useful to an end user. This is done using cursed MSBuild patterns that I +recommend just squinting at for ages until they click. + +## NUKE + +NUKE is used to provide an easy interface into both MSBuild and our other non-C# or otherwise auxiliary build tasks. +`dotnet build` works fine for building Silk.NET itself, and it's quite rare that you'll have to interact with NUKE. +However, if you have to build native packages or do anything that involves more than just a C# MSBuild runthrough then +NUKE serves this purpose. + +All tasks can be seen in `eng/build/Build.cs`. They can be executed using the `build` scripts (in the repo root) or +using the `NUKE.GlobalTool` `dotnet tool`. If you don't specify a task, `Compile` is used, which just runs +`dotnet build`. + +### CI/CD/Release Processes + +NUKE is heavily used in the CI/CD process to automate releases to the maximum extent possible. Historically, the +Silk.NET release process has looked like the following: +1. Updating the release notes and version number +2. Create a GitHub release with the package version used as a tag prepended with the letter `v` +3. GitHub Actions then proceeded to pack and upload the project to NuGet +4. Once NuGet had updated, a maintainer would then format & paste the release notes into the Discord announcements + channel. +5. Finally, a maintainer would move the unshipped public API to the shipped file (not once have we remembered to do + this in 2.X...) + +In 3.0 we have sought to massively improve this to minimise the amount of time it takes to release an update, continuing +the theme of massively optimising Silk.NET 3.0 for maintainability. + +First, the release notes are expected to be updated as PRs happen (as explained in +[CONTRIBUTING.md](../CONTRIBUTING.md)). This already takes away a massive time sink in writing nicely-formatted release +notes, as this can be reviewed as we review the PR making the change. Secondly, the version in the changelog is +automatically updated at the end of a release workflow (a guesstimate based on the version we've just released) so we +immediately start shipping experimental packages with _a_ new version, even if that isn't the final version number we +ultimately go with. This is done in the `CommitAfterShipping` method referenced by the `FinishRelease` NUKE target. +This target will run after `SignPackages` if applicable and will always run `ShipApi` first. + +For the remainder of the release process that has not been moved to PR review time, a dedicated job as part of the +standard CI/CD workflow is used. For the avoidance of doubt, the best source of documentation for building and releasing +Silk.NET is likely going to be the [dotnet workflow](../../.github/workflows/dotnet.yml). The `Release` job only runs +if: +- The build was manually initiated and not initiated by a push, pull request, or anything else. +- The `Release to NuGet` checkbox was selected when initiating that build. + +As such, to release a new version of Silk.NET simply just go to the GitHub Actions page for the `.NET` workflow and +press the `Run workflow` button. Target the workflow at the branch containing the version you want to release. +Alternatively, this GitHub CLI command can be used: `gh workflow run .NET --ref branch-name-goes-here -f release=true`. +Note that the `Release` job runs within the `Release` environment which contains the announcement Discord webhook URL +and an SSH deploy key (the `SILK_ACTIONS_DEPLOY_KEY` secret) that will bypass the restrictions that prevent a tag from +being made or a protected branch being directly pushed to (we pass this to the checkout action which will set this up +for us). **This environment requires approval before running the `Release` job, from a maintainer other than the one who +triggered the job!** This approval is done on the build page (the one that shows the workflow job graph and the current +progress within that graph). + +**TODO**: Should we move the NuGet token to this environment eventually as well? Don't forget we also need to make it so +there's a shared account on NuGet such that we can all recreate the NuGet token - right now this is tied to @Perksey's +account which isn't good given that it expires every year and @Perksey may disappear. + +The `Release` job represents steps 2 onwards of the old process. Namely, this job calls the +`SignPackages PushToNuGet FinishRelease` tasks which will: +1. Codesign the packages previously packed as part of the standard workflow (this is great as we're reusing the + workflow, rather than having two separate workflows we need to update in tandem whenever the build process changes!). + The `sign` tool is used for this, which is the .NET Foundation's preferred code-signing mechanism at time of writing. + Note that there are murmurs of this changing to use Azure Trusted Signing in the future but this is yet to come to + fruition. This is implemented in the `SignPackages` target and the `CodesignAllPackageOutputs` method referenced by + it. +2. Push the signed packages to NuGet. This makes use of the `NUGET_TOKEN` GitHub Actions secret, and is implemented in + the `PushToNuGet` target and more notably the `GetPackagesToPublish` method it references. Note that to prevent + `nuget.config` shenanigans, we add a temporary feed for this job using `AddTemporaryFeed` called `Silk-PushPackages`. + This is mostly a relic of 2.X, but was added for good reason as wielding many different feeds - some using + traditional username/password authentication, some using API keys, and some using both - has proved problematic in + the past and not easy to automate any other way. This temporary feed is removed using `RemoveTemporaryFeeds` at the + end of the target, and in case that doesn't work (e.g. the build crashed) then every subsequent NUKE build thereafter + removes this feed in the `Prerequisites` target, which is made a dependency of every target using the `CommonTarget` + helper. +3. Create & push a tag and release for the fresh version. This, like everything else versioning related, is determined + by the [CHANGELOG.md](../CHANGELOG.md) file. The tag name is retrieved in the same way as the package version but + with a `v` prepended at the start (as is tradition/standard/expected). The tag is created on the branch the workflow + was targeted at, at the latest commit at the time the workflow started. The release is created using the top line + ("headline" as referred to by [CONTRIBUTING.md](../CONTRIBUTING.md)) of the changelog used as the title but with + `Silk.NET` removed - for no reason other than we seem to have always done this in Silk.NET's history, and why break + tradition? The release body is the same as the NuGet package release notes, which is described in + [CHANGELOG.md](../CHANGELOG.md). A GitHub Discussion in the `General` category is automatically created with the + release. All of this is done in the `FinishRelease` target and the `CreateReleaseAsync` method referenced therein. +4. Update the shipped APIs and changelog. The updating of the shipped APIs actually happens before the previous step, + but I didn't want to give off an impression that the tagged commit includes those changes - the tag is intended to + capture the state at the time the release workflow began. These API updates happen in the `ShipApi` target, which can + be executed on a local machine without invoking the rest of the release flow, and this target is denoted as a + dependency of `FinishRelease`. This is literally just a dumb "move the unshipped lines to the shipped file" + implemented in the `MoveUnshippedContentsToShipped` method referenced by the `ShipApi` target. After the `ShipApi` + target has executed, the `FinishRelease` target begins by coming up with a guesstimate of the next package version + (i.e. `3.0.0` is likely to be followed by `3.1.0`, `3.0.0-preview` is likely to be followed by `3.0.0-preview2`, + `3.0.0-preview2` is likely to be followed by `3.0.0-preview3` etc) and adding this to the top of the + [CHANGELOG.md](../CHANGELOG.md) file as described by that file. A placeholder headline is also generated to go below + the newly-added second-level heading (e.g. `Silk.NET 3.1` or `Silk.NET 3.0 Preview 2` etc). This is then expected to + be updated over time as per the standard changelog processes discussed. Next, `FinishRelease` will commit both the + updated public API files and the updated changelog to the branch the workflow was targeted at. The changelog updating + and the committing is implemented in the `CommitAfterShipping` method referenced by the `FinishRelease` target. +5. Send the Discord announcement to say that the update has been release. Note that we actually wait for up to an hour + for NuGet to publish the release publicly, to ensure the embed in the announcement reflects the new version. This + waiting is done in the `WaitForNuGetToUpdateAsync` method referenced by the `FinishRelease` target and basically just + polls the `v3-flatcontainer` index for the `Silk.NET` metapackage, waiting for the new version to pop up there. After + the update has appeared, we execute the webhook to send the announcement message. The message consists of the version + headline followed by the version number in parentheses, all in bold underline. This is followed by a mention of the + `SilkNews` role, followed by two new lines and + `Get it on NuGet: https://nuget.org/packages/Silk.NET/version-goes-here` where `version-goes-here` is replaced + with the package version. This is so the NuGet preview is added as an embed to the message, but without disrupting + the flow of the rest of the announcement (or in other words, this is also just tradition). This is again followed by + two new lines, with all lines included after the headline in the [CHANGELOG.md](../CHANGELOG.md) file included as-is, + albeit with soft line breaks removed as these are actually hard breaks when sent to Discord - we do this using + Markdig's Normalize renderer with some modifications. We also stop other links embedding as part of this processing. + Finally, two more new lines are added and we conclude the message with `**__Get headline on NuGet__**` where + `headline` is replaced with the same text as used on the first line of the announcement (modulo the role mention). + When rendered by a Discord client, this underlined text is placed directly above the link embed, so basically it's + just another traditional style choice. The webhook is executed using Discord's REST API (i.e. not a `/slack` webhook) + with the URL being included in the `Release` environment in the `DISCORD_ANNOUNCEMENT_WEBHOOK`. This is done in the + `SendWebhookAsync` method referenced by the `FinishRelease` target. diff --git a/eng/benchmarks/Silk.NET.Maths.Benchmarks/Silk.NET.Maths.Benchmarks.csproj b/eng/benchmarks/Silk.NET.Maths.Benchmarks/Silk.NET.Maths.Benchmarks.csproj index a8ba495aaf..ff1a3357e0 100644 --- a/eng/benchmarks/Silk.NET.Maths.Benchmarks/Silk.NET.Maths.Benchmarks.csproj +++ b/eng/benchmarks/Silk.NET.Maths.Benchmarks/Silk.NET.Maths.Benchmarks.csproj @@ -7,7 +7,7 @@ - + diff --git a/eng/build/.editorconfig b/eng/build/.editorconfig new file mode 100644 index 0000000000..31e43dcd8e --- /dev/null +++ b/eng/build/.editorconfig @@ -0,0 +1,11 @@ +[*.cs] +dotnet_style_qualification_for_field = false:warning +dotnet_style_qualification_for_property = false:warning +dotnet_style_qualification_for_method = false:warning +dotnet_style_qualification_for_event = false:warning +dotnet_style_require_accessibility_modifiers = never:warning + +csharp_style_expression_bodied_methods = true:silent +csharp_style_expression_bodied_properties = true:warning +csharp_style_expression_bodied_indexers = true:warning +csharp_style_expression_bodied_accessors = true:warning diff --git a/eng/build/Build.CodeSigning.cs b/eng/build/Build.CodeSigning.cs new file mode 100644 index 0000000000..09c620079e --- /dev/null +++ b/eng/build/Build.CodeSigning.cs @@ -0,0 +1,97 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Linq; +using Nuke.Common; +using Nuke.Common.IO; +using Nuke.Common.Tooling; +using Nuke.Common.Tools.DotNet; +using static Nuke.Common.Tooling.ProcessTasks; +using static Nuke.Common.Tools.DotNet.DotNetTasks; + +partial class Build +{ + [Parameter("Code-signing service Azure Key Vault certificate")] + readonly string? AkvCertificate; + + [Parameter("Code-signing service Azure Key Vault client ID")] + readonly string? AkvClientId; + + [Parameter("Code-signing service Azure Key Vault client secret")] + readonly string? AkvClientSecret; + + [Parameter("Code-signing service Azure Key Vault tenant ID")] + readonly string? AkvTenant; + + [Parameter("Code-signing service Azure Key Vault URL")] + readonly string? AkvVaultUrl; + + [MemberNotNullWhen( + true, + nameof(AkvCertificate), + nameof(AkvClientId), + nameof(AkvClientSecret), + nameof(AkvTenant), + nameof(AkvVaultUrl) + )] + bool CanCodeSign => + !string.IsNullOrWhiteSpace(AkvCertificate) + && !string.IsNullOrWhiteSpace(AkvClientId) + && !string.IsNullOrWhiteSpace(AkvClientSecret) + && !string.IsNullOrWhiteSpace(AkvTenant) + && !string.IsNullOrWhiteSpace(AkvVaultUrl); + + AbsolutePath PackageDirectory => RootDirectory / "artifacts" / "pkg"; + + IEnumerable Packages => PackageDirectory.GlobFiles("**/*.nupkg", "**/*.snupkg"); + + IEnumerable CodesignAllPackageOutputs() + { + if (!CanCodeSign) + { + Assert.Fail("SignClient username and/or password not specified."); + } + + var outputs = Enumerable.Empty(); + var basePath = RootDirectory / "eng" / "codesigning"; + var execPath = basePath / "tool" / (OperatingSystem.IsWindows() ? "sign.exe" : "sign"); + if (!File.Exists(execPath)) + { + outputs = outputs.Concat( + DotNetToolInstall(s => + s.SetToolInstallationPath(basePath / "tool") + .SetPackageName("sign") + .SetVersion("0.9.0-beta.23063.3") + ) + ); + } + + return Packages.Aggregate( + outputs, + (current, pkg) => + current.Concat( + StartProcess( + execPath, + $"sign code azure-key-vault \"{pkg}\" " + + "--timestamp-url http://timestamp.digicert.com " + + $"--base-directory \"{PackageDirectory}\" " + + $"--file-list \"{basePath / "filelist.txt"}\" " + + "--publisher-name \".NET Foundation\" " + + "--description \"Silk.NET\" " + + "--description-url \"https://github.com/dotnet/Silk.NET\" " + + $"--azure-key-vault-certificate \"{AkvCertificate}\" " + + $"--azure-key-vault-client-id \"{AkvClientId}\" " + + $"--azure-key-vault-client-secret \"{AkvClientSecret}\" " + + $"--azure-key-vault-tenant-id \"{AkvTenant}\" " + + $"--azure-key-vault-url \"{AkvVaultUrl}\" " + ) + .AssertZeroExitCode() + .Output + ) + ); + } +} diff --git a/eng/build/Build.Native.cs b/eng/build/Build.Native.cs new file mode 100644 index 0000000000..4aadd99558 --- /dev/null +++ b/eng/build/Build.Native.cs @@ -0,0 +1,4 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +partial class Build { } diff --git a/eng/build/Build.PublicApi.cs b/eng/build/Build.PublicApi.cs new file mode 100644 index 0000000000..2992bc91f5 --- /dev/null +++ b/eng/build/Build.PublicApi.cs @@ -0,0 +1,45 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.IO; +using System.Linq; +using Nuke.Common.IO; + +partial class Build +{ + private void MoveUnshippedContentsToShipped() + { + foreach (var unshippedFile in RootDirectory.GlobFiles("**/PublicAPI.Unshipped.txt")) + { + var shippedFile = unshippedFile.Parent / "PublicAPI.Shipped.txt"; + if (!File.Exists(shippedFile)) + { + // common.props should've made this file, so if it's not here then i'm guessing this isn't a + // public api after all. + continue; + } + + var shippedLines = File.ReadAllLines(shippedFile).ToList(); + var unshippedLines = File.ReadAllLines(unshippedFile).ToList(); + for (var i = 0; i < unshippedLines.Count; i++) + { + var unshippedLine = unshippedLines[i]; + if (unshippedLine.StartsWith("//") || unshippedLine.StartsWith("#")) + { + continue; + } + + if (!shippedLines.Contains(unshippedLine)) + { + shippedLines.Add(unshippedLine); + } + + unshippedLines.RemoveAt(i); + i--; // so we don't skip the next element + } + + File.WriteAllLines(unshippedFile, unshippedLines); + File.WriteAllLines(shippedFile, shippedLines); + } + } +} diff --git a/eng/build/Build.Publishing.cs b/eng/build/Build.Publishing.cs new file mode 100644 index 0000000000..ff6cd6fad4 --- /dev/null +++ b/eng/build/Build.Publishing.cs @@ -0,0 +1,425 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net.Http; +using System.Net.Http.Json; +using System.Text; +using System.Text.Json.Serialization; +using System.Threading.Tasks; +using Humanizer; +using Markdig; +using Markdig.Renderers.Normalize; +using Markdig.Renderers.Normalize.Inlines; +using Markdig.Syntax.Inlines; +using Nuke.Common; +using Nuke.Common.CI.GitHubActions; +using Nuke.Common.IO; +using Nuke.Common.Tooling; +using Nuke.Common.Tools.DotNet; +using Octokit; +using Serilog; +using static Nuke.Common.Tools.DotNet.DotNetTasks; +using static Nuke.Common.Tools.Git.GitTasks; + +partial class Build +{ + const string TemporaryNuGetFeed = "Silk-PushPackages"; + + [Parameter("The API key used to push packages and symbols packages to NuGet")] + readonly string? NugetApiKey; + + [Parameter("NuGet -NoServiceEndpoint")] + readonly bool NugetNoServiceEndpoint; + + [Parameter("NuGet feed")] + readonly string NugetFeed = "https://api.nuget.org/v3/index.json"; + + [Parameter("NuGet username")] + readonly string? NugetUsername; + + [Parameter("NuGet password")] + readonly string? NugetPassword; + + AbsolutePath OutputPackageDir => RootDirectory / "artifacts" / "pkg"; + + private void RemoveTemporaryFeeds() + { + try + { + if (DotNet("nuget list source").Any(x => x.Text.Contains(TemporaryNuGetFeed))) + { + DotNet($"nuget remove source \"{TemporaryNuGetFeed}\""); + } + } + catch + { + // probably hasn't existed yet, don't care. + } + } + + private IEnumerable AddTemporaryFeed() + { + if (NugetFeed.Contains("nuget.org")) + { + return []; + } + + var srcSettings = new DotNetNuGetAddSourceSettings() + .SetName(TemporaryNuGetFeed) + .SetSource(NugetFeed); + + if (NugetUsername is null != NugetPassword is null) + { + Assert.Fail( + "Both \"NugetUsername\" and \"NugetPassword\" must be specified if either are used." + ); + } + + if (NugetUsername is not null && NugetPassword is not null) + { + srcSettings = srcSettings + .SetUsername(NugetUsername) + .SetPassword(NugetPassword) + .SetStorePasswordInClearText(true); + } + + return DotNetNuGetAddSource(srcSettings); + } + + async IAsyncEnumerable GetPackagesToPublish() + { + const int rateLimit = 300; + var first = true; + foreach ( + var packages in Packages + .Select((x, i) => new { Index = i, Value = x }) + .GroupBy(x => x.Index / rateLimit) + .Select(x => x.Select(v => v.Value)) + ) + { + if (first) + { + first = false; + } + else + { + Log.Warning( + "We have just pushed over {} packages in quick succession, delaying for an hour to avoid rate " + + "limits. Publishing will continue at {}", + rateLimit, + DateTime.Now.AddHours(1).TimeOfDay + ); + await Task.Delay(TimeSpan.FromHours(1)); + } + + foreach (var package in packages) + { + yield return package; + } + } + } + + DotNetNuGetPushSettings NuGetPushSettings + { + get + { + var ret = new DotNetNuGetPushSettings() + .SetNoServiceEndpoint(NugetNoServiceEndpoint) + .EnableSkipDuplicate() + .SetSource(NugetFeed.Contains("nuget.org") ? "nuget.org" : TemporaryNuGetFeed); + if (NugetApiKey is not null) + { + ret = ret.SetApiKey(NugetApiKey); + } + + return ret; + } + } + + private void GetVersionInfo( + string changelog, + out string silkVersion, + out string silkVersionSuffix, + out string silkReleaseNotes + ) + { + var lines = changelog.Split(["\r\n", "\r", "\n"], StringSplitOptions.None); + + var capturing = false; + var notes = new StringBuilder(); + string? version = null; + string? versionSuffix = null; + foreach (var theLine in lines) + { + var line = theLine.Trim(); + if (!line.StartsWith("##")) + { + if (capturing) + { + notes.AppendLine(line); + } + continue; + } + + if (capturing) + { + break; + } + + version = line[2..].Trim(); + var versionStop = version.IndexOf(' '); + if (versionStop != -1) + { + version = version[..versionStop]; + } + versionSuffix = string.Empty; + var versionSuffixStart = version.IndexOf('-'); + if (versionSuffixStart != -1) + { + versionSuffix = version[(versionSuffixStart + 1)..]; + version = version[..versionSuffixStart]; + } + versionSuffix = versionSuffix.Trim(); + version = version.Trim(); + capturing = true; + } + + if (!capturing) + { + throw new Exception("Failed to determine version information."); + } + + silkVersion = version ?? "3.0.0"; + silkVersionSuffix = versionSuffix ?? "unknown"; + silkReleaseNotes = notes.ToString(); + } + + private async Task CreateReleaseAsync(string version, string versionSuffix, string releaseNotes) + { + var tag = + $"v{version}{(string.IsNullOrWhiteSpace(versionSuffix) ? string.Empty : $"-{versionSuffix}")}"; + Git($"config user.email \"9011267+dotnet-bot@users.noreply.github.com\""); + Git($"config user.name \"The Silk.NET Automaton\""); + Git($"tag {tag}"); + Git($"push origin {tag}"); + var github = new GitHubClient( + new ProductHeaderValue("Silk.NET-CI"), + new Octokit.Internal.InMemoryCredentialStore( + new Credentials(GitHubActions.Instance.Token) + ) + ); + var lines = releaseNotes + .Split(["\r\n", "\r", "\n"], StringSplitOptions.None) + .SkipWhile(string.IsNullOrWhiteSpace) + .ToList(); + await github.Repository.Release.Create( + "dotnet", + "Silk.NET", + new NewRelease(tag) + { + Prerelease = !string.IsNullOrWhiteSpace(versionSuffix), + Body = releaseNotes, + DiscussionCategoryName = "General", + Name = lines[0].Replace("Silk.NET", string.Empty).Trim(), // tradition + TargetCommitish = GitCurrentCommit(), + } + ); + } + + private void CommitAfterShipping(string version, string versionSuffix) + { + if (GitIsDetached()) + { + Git($"checkout {GitHubActions.Instance.RefName}"); + } + string nextVersion; + string nextVersionHeadline; + if (string.IsNullOrWhiteSpace(versionSuffix)) + { + var ver = Version.Parse(version); + ver = new Version(ver.Major, ver.Minor + 1, ver.Build); + nextVersion = ver.ToString(); + nextVersionHeadline = $"Silk.NET {ver.ToString(2)}"; + } + else + { + var suffixSpan = versionSuffix.AsSpan(); + var suffixNumberStart = suffixSpan.IndexOfAnyInRange('0', '9'); + if (suffixNumberStart == -1) + { + versionSuffix = $"{versionSuffix}2"; + } + else + { + var suffixNumberEnd = + suffixSpan[suffixNumberStart..].IndexOfAnyExceptInRange('0', '9') + + suffixNumberStart; + versionSuffix = + versionSuffix[..suffixNumberStart] + + ( + int.Parse( + suffixSpan[ + suffixNumberEnd == -1 + ? suffixNumberStart.. + : suffixNumberStart..suffixNumberEnd + ] + ) + 1 + ) + + (suffixNumberEnd == -1 ? string.Empty : versionSuffix[suffixNumberEnd..]); + } + + nextVersion = $"{version}-{versionSuffix}"; + nextVersionHeadline = + $"Silk.NET {Version.Parse(version).ToString(2)} {versionSuffix.Humanize(LetterCasing.Title)}"; + } + + var lines = File.ReadAllLines(RootDirectory / "docs" / "CHANGELOG.md").ToList(); + for (var i = 0; i < lines.Count; i++) + { + if (!lines[i].StartsWith("## ")) + { + continue; + } + + lines[i] = $"{lines[i]} ({DateTime.UtcNow:dd/MM/yyyy})"; + lines.InsertRange( + i, + [$"## {nextVersion}", string.Empty, nextVersionHeadline, string.Empty] + ); + break; + } + + File.WriteAllLines(RootDirectory / "docs" / "CHANGELOG.md", lines); + Git("add **/PublicAPI.*.txt docs/CHANGELOG.md"); + + // Must be an interpolated string even if we're not interpolating because NUKE specially recognises this idfk. + // The issue this caused if you omitted the $ is as follows: + // 20:14:58 [INF] > "C:\Program Files\Git\bin\git.exe" config user.email "9011267+dotnet-bot@users.noreply.github.com" + // 20:14:58 [INF] > "C:\Program Files\Git\bin\git.exe" config user.name "The Silk.NET Automaton" + // 20:14:58 [INF] > "C:\Program Files\Git\bin\git.exe" tag v3.0.0-preview + // 20:14:59 [DBG] ... + // 20:15:00 [INF] > "C:\Program Files\Git\bin\git.exe" "commit -m \"Update public API after release\"" + // 20:15:00 [DBG] git: 'commit -m "Update public API after release"' is not a git command. See 'git --help'. + // Error: Target "FinishRelease" has thrown an exception + // THE ONLY DISCERNIBLE DIFFERENCE BETWEEN THE GIT CONFIG COMMANDS AND GIT COMMIT COMMAND WAS THE LACK OF A $ + Git($"commit -m \"Update public API and changelog for next release\""); + Git("push"); + } + + private readonly record struct VersionsList( + [property: JsonPropertyName("versions")] List Versions + ); + + private async Task WaitForNuGetToUpdateAsync(string version, string versionSuffix) + { + var fullVersion = string.IsNullOrWhiteSpace(versionSuffix) + ? version + : $"{version}-{versionSuffix}"; + using var http = new HttpClient(); + for (var i = 0; i < 60; i++) + { + var versions = await ( + await http.GetAsync("https://api.nuget.org/v3-flatcontainer/silk.net/index.json") + ) + .EnsureSuccessStatusCode() + .Content.ReadFromJsonAsync(); + if (versions.Versions.Contains(fullVersion)) + { + return; + } + + await Task.Delay(TimeSpan.FromMinutes(1)); + } + + throw new Exception("NuGet didn't update after an hour."); + } + + [Parameter("Discord release announcement webhook.")] + readonly string? DiscordWebhook; + + private readonly record struct Webhook( + [property: JsonPropertyName("content")] string Content, + [property: JsonPropertyName("allowed_mentions")] + Dictionary AllowedMentions + ); + + private async Task SendWebhookAsync(string version, string versionSuffix, string releaseNotes) + { + if (DiscordWebhook is null) + { + return; + } + + var fullVersion = string.IsNullOrWhiteSpace(versionSuffix) + ? version + : $"{version}-{versionSuffix}"; + var lines = releaseNotes + .Trim() + .Split(["\r\n", "\r", "\n"], StringSplitOptions.None) + .SkipWhile(string.IsNullOrWhiteSpace) + .ToList(); + var headline = $"{lines[0].Trim()} (v{fullVersion})"; + var message = + $"**__{headline}__** <@&685572809543385140>\n\n" + + $"Get it on NuGet: TODOINSERTRELEASENUGETURLHERE\n\n" + + string.Join('\n', lines.Skip(1).SkipWhile(string.IsNullOrWhiteSpace)) + + $"\n\n**__Get {headline} on NuGet__**"; + var sw = new StringWriter(); + var normRenderer = new NormalizeRenderer(sw); + normRenderer.ObjectRenderers.Replace(new DiscordUrlEscapeRenderer()); + normRenderer.ObjectRenderers.Replace( + new DiscordSoftLineRemovalRenderer() + ); + normRenderer.Render(Markdown.Parse(message)); + message = sw.ToString() + .Replace( + "TODOINSERTRELEASENUGETURLHERE", + $"https://nuget.org/packages/Silk.NET/{fullVersion}" + ); + using var http = new HttpClient(); + ( + await http.PostAsJsonAsync( + DiscordWebhook, + new Webhook( + message, + new Dictionary { { "roles", ["685572809543385140"] } } + ) + ) + ).EnsureSuccessStatusCode(); + } + + class DiscordUrlEscapeRenderer : NormalizeObjectRenderer + { + private LinkInlineRenderer _fallback = new(); + + protected override void Write(NormalizeRenderer renderer, LinkInline obj) + { + if (obj.IsAutoLink) + { + renderer.Write($"<{obj.Url}>"); + return; + } + + _fallback.Write(renderer, obj); + } + } + + class DiscordSoftLineRemovalRenderer : NormalizeObjectRenderer + { + protected override void Write(NormalizeRenderer renderer, LineBreakInline obj) + { + if (!obj.IsHard) + { + renderer.Write(' '); + return; + } + + renderer.Write(obj.IsBackslash ? "\\" : " "); + renderer.WriteLine(); + } + } +} diff --git a/eng/build/Build.Support.cs b/eng/build/Build.Support.cs new file mode 100644 index 0000000000..4300d1cd41 --- /dev/null +++ b/eng/build/Build.Support.cs @@ -0,0 +1,85 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Linq; +using System.Text.RegularExpressions; +using Nuke.Common; +using Nuke.Common.ProjectModel; + +partial class Build +{ + /// Support plugins are available for: + /// - JetBrains ReSharper https://nuke.build/resharper + /// - JetBrains Rider https://nuke.build/rider + /// - Microsoft VisualStudio https://nuke.build/visualstudio + /// - Microsoft VSCode https://nuke.build/vscode + public static int Main() + { + Environment.SetEnvironmentVariable("NUKE_TELEMETRY_OPTOUT", "1"); + return Execute(x => x.Compile); + } + + [GeneratedRegex("refs\\/pull\\/([0-9]+).*", RegexOptions.Compiled)] + private static partial Regex PrRegex(); + + [Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")] + [SuppressMessage("ReSharper", "InconsistentNaming")] + readonly Configuration Configuration = IsLocalBuild + ? Configuration.Debug + : Configuration.Release; + + [Parameter("Extra properties passed to MSBuild commands")] + [SuppressMessage("ReSharper", "InconsistentNaming")] + readonly string[] MsbuildProperties = []; + + [Solution] + [SuppressMessage("ReSharper", "InconsistentNaming")] + readonly Solution Solution = null!; + + Dictionary? _processedMsbuildPropertiesValue; + + Dictionary ProcessedMsbuildProperties + { + get + { + return _processedMsbuildPropertiesValue ??= MsbuildProperties.ToDictionary( + x => x[..IndexOfOrThrow(x, '=')], + object (x) => + { + var idx = IndexOfOrThrow(x, '='); + return x.Substring(idx + 1, x.Length - idx - 1); + } + ); + + static int IndexOfOrThrow(string x, char y) + { + var idx = x.IndexOf(y); + if (idx == -1) + { + throw new ArgumentException(); + } + + return idx; + } + } + } + + // NOTE: this is needed so that NUKE can cross-reference dependencies later. + readonly ConcurrentDictionary _targets = new(); + + static Target GetEmptyTarget() => x => x.Executes(() => { }); + + Target CommonTarget(Target? actualTarget = null) => + _targets.GetOrAdd( + actualTarget ??= GetEmptyTarget(), + def => + { + def = def.DependsOn(Prerequisites); + return actualTarget is null ? def : actualTarget(def); + } + ); +} diff --git a/eng/build/Build.cs b/eng/build/Build.cs new file mode 100644 index 0000000000..3bea6f3031 --- /dev/null +++ b/eng/build/Build.cs @@ -0,0 +1,115 @@ +using System.IO; +using Nuke.Common; +using Nuke.Common.IO; +using Nuke.Common.Tools.DotNet; +using static Nuke.Common.Tools.DotNet.DotNetTasks; + +partial class Build : NukeBuild +{ + Target Prerequisites => x => x.Executes(RemoveTemporaryFeeds); + + Target Clean => + CommonTarget(x => + x.Before(Compile) + .Executes( + () => + DotNetClean(x => + x.SetConfiguration(Configuration) + .SetProperties(ProcessedMsbuildProperties) + ) + ) + ); + + Target Compile => + CommonTarget(x => + x.Executes( + () => + DotNetBuild(x => + x.SetConfiguration(Configuration).SetProperties(ProcessedMsbuildProperties) + ) + ) + ); + + Target Pack => + CommonTarget(x => + x.Executes(() => + { + OutputPackageDir.CreateOrCleanDirectory(); + return DotNetPack(x => + x.SetConfiguration(Configuration).SetProperties(ProcessedMsbuildProperties) + ); + }) + ); + + [Parameter("Additional arguments to prepend to SilkTouch invocations.")] + readonly string[]? SilkTouchAdditionalArgs; + + Target RegenerateBindings => + CommonTarget(x => + x.Executes( + () => + DotNetRun(x => + x.SetProjectFile(Solution.GetProject("Silk.NET.SilkTouch")) + .SetConfiguration("Release") // don't want to run this with anything else tbh + .SetApplicationArguments( + [.. SilkTouchAdditionalArgs ?? [], RootDirectory / "generator.json"] + ) + ) + ) + ); + + Target DeclareApi => + CommonTarget(x => + x.Executes( + () => + DotNet( + $"format analyzers {Solution} --diagnostics=RS0016 -v=diag --include-generated" + ) + ) + ); + + Target ShipApi => + CommonTarget(x => x.After(PushToNuGet).Executes(MoveUnshippedContentsToShipped)); + + Target SignPackages => + CommonTarget(x => x.Before(PushToNuGet).After(Pack).Executes(CodesignAllPackageOutputs)); + + Target PushToNuGet => + CommonTarget(x => + x.After(Pack, SignPackages) + .Executes(async () => + { + AddTemporaryFeed(); + try + { + await foreach (var pkg in GetPackagesToPublish()) + { + DotNetNuGetPush(NuGetPushSettings.SetTargetPath(pkg)); + } + } + finally + { + RemoveTemporaryFeeds(); + } + }) + ); + + Target FinishRelease => + CommonTarget(x => + x.After(PushToNuGet) + .DependsOn(ShipApi) + .Executes(async () => + { + GetVersionInfo( + File.ReadAllText(RootDirectory / "docs" / "CHANGELOG.md"), + out var version, + out var versionSuffix, + out var releaseNotes + ); + await CreateReleaseAsync(version, versionSuffix, releaseNotes); + CommitAfterShipping(version, versionSuffix); + await WaitForNuGetToUpdateAsync(version, versionSuffix); + await SendWebhookAsync(version, versionSuffix, releaseNotes); + }) + ); +} diff --git a/eng/build/Configuration.cs b/eng/build/Configuration.cs new file mode 100644 index 0000000000..9c08b1ae9f --- /dev/null +++ b/eng/build/Configuration.cs @@ -0,0 +1,16 @@ +using System; +using System.ComponentModel; +using System.Linq; +using Nuke.Common.Tooling; + +[TypeConverter(typeof(TypeConverter))] +public class Configuration : Enumeration +{ + public static Configuration Debug = new Configuration { Value = nameof(Debug) }; + public static Configuration Release = new Configuration { Value = nameof(Release) }; + + public static implicit operator string(Configuration configuration) + { + return configuration.Value; + } +} diff --git a/eng/build/Directory.Build.props b/eng/build/Directory.Build.props new file mode 100644 index 0000000000..e147d63528 --- /dev/null +++ b/eng/build/Directory.Build.props @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/eng/build/Directory.Build.targets b/eng/build/Directory.Build.targets new file mode 100644 index 0000000000..253260956d --- /dev/null +++ b/eng/build/Directory.Build.targets @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/eng/build/Silk.NET.NUKE.csproj b/eng/build/Silk.NET.NUKE.csproj new file mode 100644 index 0000000000..4f3908a386 --- /dev/null +++ b/eng/build/Silk.NET.NUKE.csproj @@ -0,0 +1,20 @@ + + + + Exe + net8.0 + + CS0649;CS0169;CA1050;CA1822;CA2211;IDE1006 + ..\.. + ..\.. + false + enable + + + + + + + + + diff --git a/eng/build/Silk.NET.NUKE.csproj.DotSettings b/eng/build/Silk.NET.NUKE.csproj.DotSettings new file mode 100644 index 0000000000..88a8824cd9 --- /dev/null +++ b/eng/build/Silk.NET.NUKE.csproj.DotSettings @@ -0,0 +1,31 @@ + + DO_NOT_SHOW + DO_NOT_SHOW + DO_NOT_SHOW + DO_NOT_SHOW + DO_NOT_SHOW + Implicit + Implicit + ExpressionBody + 0 + NEXT_LINE + True + False + 120 + IF_OWNER_IS_SINGLE_LINE + WRAP_IF_LONG + False + <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> + <Policy><Descriptor Staticness="Instance" AccessRightKinds="Private" Description="Instance fields (private)"><ElementKinds><Kind Name="FIELD" /><Kind Name="READONLY_FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /></Policy> + <Policy><Descriptor Staticness="Static" AccessRightKinds="Private" Description="Static fields (private)"><ElementKinds><Kind Name="FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /></Policy> + True + True + True + True + True + True + True + True + True + True diff --git a/eng/codesigning/.gitignore b/eng/codesigning/.gitignore new file mode 100644 index 0000000000..03c093451e --- /dev/null +++ b/eng/codesigning/.gitignore @@ -0,0 +1 @@ +tool/ \ No newline at end of file diff --git a/eng/codesigning/filelist.txt b/eng/codesigning/filelist.txt new file mode 100644 index 0000000000..724b8d0a94 --- /dev/null +++ b/eng/codesigning/filelist.txt @@ -0,0 +1 @@ +**/Silk.NET* diff --git a/generator.json b/generator.json index 6921658b9a..5ad04119db 100644 --- a/generator.json +++ b/generator.json @@ -21,16 +21,16 @@ "sources/Gdiplus/um/gdiplustypes/GpPathData.gen.cs": "eng/submodules/terrafx.interop.windows/sources/Interop/Windows/Gdiplus/um/gdiplustypes/GpPathData.cs" }, "InputSourceRoot": "eng/submodules/terrafx.interop.windows/sources/Interop/Windows", - "InputTestRoot": "eng/submodules/terrafx.interop.windows/tests/Interop/Windows" + "InputTestRoot": "eng/submodules/terrafx.interop.windows/tests/Interop/Windows", + "SkipScrapeIf": [ + "!win" + ] }, "ChangeNamespace": { "Mappings": { "TerraFX.Interop.(.*)": "Silk.NET.$1" } - }, - "SkipScrapeIf": [ - "!win" - ] + } }, "SDL": { "SourceProject": "sources/SDL/SDL/Silk.NET.SDL.csproj", diff --git a/sources/Core/Core/Pointers/Ref2D.generic.cs b/sources/Core/Core/Pointers/Ref2D.generic.cs index 1339b036eb..afab9b96d0 100644 --- a/sources/Core/Core/Pointers/Ref2D.generic.cs +++ b/sources/Core/Core/Pointers/Ref2D.generic.cs @@ -21,6 +21,7 @@ public unsafe readonly ref struct Ref2D /// The underlying ref. public Ref2D(ref Ref @Ref) { +#pragma warning disable IL3050 // Problematic code is removed at build time by Fody. IL.Emit.Ldarg_0(); IL.Emit.Ldarg_1(); IL.Emit.Stfld( @@ -31,6 +32,7 @@ public Ref2D(ref Ref @Ref) ); IL.Emit.Ret(); throw IL.Unreachable(); +#pragma warning restore IL3050 } /// @@ -47,6 +49,7 @@ internal Ref2D(ref byte @InteriorRef) /// public readonly ref Ref Ref { +#pragma warning disable IL3050 // Problematic code is removed at build time by Fody. [MethodImpl( MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization )] @@ -63,6 +66,7 @@ public readonly ref Ref Ref IL.Emit.Ret(); throw IL.Unreachable(); } +#pragma warning restore IL3050 } /// @@ -83,6 +87,7 @@ public ref Ref this[nuint index] )] get { +#pragma warning disable IL3050 // Problematic code is removed at build time by Fody. IL.Emit.Ldarg_0(); IL.Emit.Ldfld( FieldRef.Field( @@ -96,6 +101,7 @@ public ref Ref this[nuint index] IL.Emit.Add(); IL.Emit.Ret(); throw IL.Unreachable(); +#pragma warning restore IL3050 } } @@ -108,6 +114,7 @@ public ref Ref this[nuint index] /// public ref T* GetPinnableReference() { +#pragma warning disable IL3050 // Problematic code is removed at build time by Fody. IL.Emit.Ldarg_0(); IL.Emit.Ldfld( FieldRef.Field( @@ -117,6 +124,7 @@ public ref Ref this[nuint index] ); IL.Emit.Ret(); throw IL.Unreachable(); +#pragma warning restore IL3050 } /// @@ -236,6 +244,7 @@ public static implicit operator Ref2D(T[][] array) => /// public static implicit operator Ref2D(T*[] array) { +#pragma warning disable IL3050 // Problematic code is removed at build time by Fody. IL.Emit.Ldarg_0(); IL.Emit.Ldc_I4_0(); IL.Emit.Ldelema(TypeRef.Type(typeof(T).MakePointerType())); @@ -247,6 +256,7 @@ public static implicit operator Ref2D(T*[] array) ); IL.Emit.Ret(); throw IL.Unreachable(); +#pragma warning restore IL3050 } /// diff --git a/sources/Core/Core/Pointers/Ref3D.generic.cs b/sources/Core/Core/Pointers/Ref3D.generic.cs index 947e3c5ec9..23bbc5d090 100644 --- a/sources/Core/Core/Pointers/Ref3D.generic.cs +++ b/sources/Core/Core/Pointers/Ref3D.generic.cs @@ -21,6 +21,7 @@ public unsafe readonly ref struct Ref3D /// The underlying ref. public Ref3D(ref Ref2D @Ref) { +#pragma warning disable IL3050 // Problematic code is removed at build time by Fody. IL.Emit.Ldarg_0(); IL.Emit.Ldarg_1(); IL.Emit.Stfld( @@ -31,6 +32,7 @@ public Ref3D(ref Ref2D @Ref) ); IL.Emit.Ret(); throw IL.Unreachable(); +#pragma warning restore IL3050 } /// @@ -52,6 +54,7 @@ public readonly ref Ref2D Ref )] get { +#pragma warning disable IL3050 // Problematic code is removed at build time by Fody. // Would use the delegate* trick but this isn't optimised in JIT yet or necessarily safe IL.Emit.Ldarg_0(); IL.Emit.Ldfld( @@ -62,6 +65,7 @@ public readonly ref Ref2D Ref ); IL.Emit.Ret(); throw IL.Unreachable(); +#pragma warning restore IL3050 } } @@ -83,6 +87,7 @@ public ref Ref2D this[nuint index] )] get { +#pragma warning disable IL3050 // Problematic code is removed at build time by Fody. IL.Emit.Ldarg_0(); IL.Emit.Ldfld( FieldRef.Field( @@ -96,6 +101,7 @@ public ref Ref2D this[nuint index] IL.Emit.Add(); IL.Emit.Ret(); throw IL.Unreachable(); +#pragma warning restore IL3050 } } @@ -108,6 +114,7 @@ public ref Ref2D this[nuint index] /// public ref T** GetPinnableReference() { +#pragma warning disable IL3050 // Problematic code is removed at build time by Fody. IL.Emit.Ldarg_0(); IL.Emit.Ldfld( FieldRef.Field( @@ -117,6 +124,7 @@ public ref Ref2D this[nuint index] ); IL.Emit.Ret(); throw IL.Unreachable(); +#pragma warning restore IL3050 } /// @@ -237,6 +245,7 @@ public static implicit operator Ref3D(T[][][] array) => /// public static implicit operator Ref3D(T**[] array) { +#pragma warning disable IL3050 // Problematic code is removed at build time by Fody. IL.Emit.Ldarg_0(); IL.Emit.Ldc_I4_0(); IL.Emit.Ldelema(TypeRef.Type(typeof(T).MakePointerType())); @@ -248,6 +257,7 @@ public static implicit operator Ref3D(T**[] array) ); IL.Emit.Ret(); throw IL.Unreachable(); +#pragma warning restore IL3050 } /// diff --git a/sources/Core/Core/PublicAPI/net8.0/PublicAPI.Shipped.txt b/sources/Core/Core/PublicAPI/net8.0/PublicAPI.Shipped.txt new file mode 100644 index 0000000000..7dc5c58110 --- /dev/null +++ b/sources/Core/Core/PublicAPI/net8.0/PublicAPI.Shipped.txt @@ -0,0 +1 @@ +#nullable enable diff --git a/sources/Core/Core/PublicAPI/net8.0/PublicAPI.Unshipped.txt b/sources/Core/Core/PublicAPI/net8.0/PublicAPI.Unshipped.txt new file mode 100644 index 0000000000..1a0591f204 --- /dev/null +++ b/sources/Core/Core/PublicAPI/net8.0/PublicAPI.Unshipped.txt @@ -0,0 +1,643 @@ +#nullable enable +override Silk.NET.Core.Ptr.Equals(object? obj) -> bool +override Silk.NET.Core.Ptr.GetHashCode() -> int +override Silk.NET.Core.Ptr2D.Equals(object? obj) -> bool +override Silk.NET.Core.Ptr2D.GetHashCode() -> int +override Silk.NET.Core.Ptr2D.Equals(object? obj) -> bool +override Silk.NET.Core.Ptr2D.GetHashCode() -> int +override Silk.NET.Core.Ptr3D.Equals(object? obj) -> bool +override Silk.NET.Core.Ptr3D.GetHashCode() -> int +override Silk.NET.Core.Ptr3D.Equals(object? obj) -> bool +override Silk.NET.Core.Ptr3D.GetHashCode() -> int +override Silk.NET.Core.Ptr.Equals(object? obj) -> bool +override Silk.NET.Core.Ptr.GetHashCode() -> int +override Silk.NET.Core.Ref.Equals(object? obj) -> bool +override Silk.NET.Core.Ref.GetHashCode() -> int +override Silk.NET.Core.Ref2D.Equals(object? obj) -> bool +override Silk.NET.Core.Ref2D.GetHashCode() -> int +override Silk.NET.Core.Ref2D.Equals(object? obj) -> bool +override Silk.NET.Core.Ref2D.GetHashCode() -> int +override Silk.NET.Core.Ref3D.Equals(object? obj) -> bool +override Silk.NET.Core.Ref3D.GetHashCode() -> int +override Silk.NET.Core.Ref3D.Equals(object? obj) -> bool +override Silk.NET.Core.Ref3D.GetHashCode() -> int +override Silk.NET.Core.Ref.Equals(object? obj) -> bool +override Silk.NET.Core.Ref.GetHashCode() -> int +override Silk.NET.Core.Utf8String.ToString() -> string! +readonly Silk.NET.Core.Ptr.Native -> void* +readonly Silk.NET.Core.Ptr2D.Native -> Silk.NET.Core.Ptr* +readonly Silk.NET.Core.Ptr2D.Native -> Silk.NET.Core.Ptr* +readonly Silk.NET.Core.Ptr3D.Native -> Silk.NET.Core.Ptr2D* +readonly Silk.NET.Core.Ptr3D.Native -> Silk.NET.Core.Ptr2D* +readonly Silk.NET.Core.Ptr.Native -> T* +readonly Silk.NET.Core.Ref.Handle -> byte +readonly Silk.NET.Core.Ref.Handle -> T +Silk.NET.Core.Constant +Silk.NET.Core.Constant.Constant() -> void +Silk.NET.Core.Constant.Constant(TUnderlying Value) -> void +Silk.NET.Core.Constant.Value.get -> TUnderlying +Silk.NET.Core.Constant.Value.init -> void +Silk.NET.Core.Constant +Silk.NET.Core.Constant.Constant() -> void +Silk.NET.Core.Constant.Constant(TUnderlying Value) -> void +Silk.NET.Core.Constant.Value.get -> TUnderlying +Silk.NET.Core.Constant.Value.init -> void +Silk.NET.Core.CppAttributeListAttribute +Silk.NET.Core.CppAttributeListAttribute.AttributeList.get -> string! +Silk.NET.Core.CppAttributeListAttribute.CppAttributeListAttribute(string! attributeList) -> void +Silk.NET.Core.Default +Silk.NET.Core.Default.Default() -> void +Silk.NET.Core.DSL +Silk.NET.Core.IBoolScheme +Silk.NET.Core.IBoolScheme.False() -> T +Silk.NET.Core.IBoolScheme.IsTrue(T value) -> bool +Silk.NET.Core.IBoolScheme.True() -> T +Silk.NET.Core.IGLContext +Silk.NET.Core.IGLContext.Clear() -> void +Silk.NET.Core.IGLContext.IsCurrent.get -> bool +Silk.NET.Core.IGLContext.MakeCurrent() -> void +Silk.NET.Core.IGLContext.SwapBuffers() -> void +Silk.NET.Core.IGLContext.SwapInterval(int interval) -> void +Silk.NET.Core.Loader.DefaultNativeContext +Silk.NET.Core.Loader.DefaultNativeContext.DefaultNativeContext() -> void +Silk.NET.Core.Loader.DefaultNativeContext.Dispose() -> void +Silk.NET.Core.Loader.DefaultNativeContext.LoadFunction(string! functionName, string! libraryNameHint) -> void* +Silk.NET.Core.Loader.INativeContext +Silk.NET.Core.Loader.INativeContext.LoadFunction(string! functionName, string! libraryNameHint) -> void* +Silk.NET.Core.Loader.LambdaNativeContext +Silk.NET.Core.Loader.LambdaNativeContext.Dispose() -> void +Silk.NET.Core.Loader.LambdaNativeContext.LambdaNativeContext() -> void +Silk.NET.Core.Loader.LambdaNativeContext.LambdaNativeContext(System.Func! loader) -> void +Silk.NET.Core.Loader.LambdaNativeContext.LoadFunction(string! functionName, string! libraryNameHint) -> void* +Silk.NET.Core.Loader.LoaderInterface +Silk.NET.Core.MaybeBool +Silk.NET.Core.MaybeBool.MaybeBool() -> void +Silk.NET.Core.MaybeBool.MaybeBool(T Value) -> void +Silk.NET.Core.MaybeBool.Value.get -> T +Silk.NET.Core.MaybeBool.Value.init -> void +Silk.NET.Core.MaybeBool +Silk.NET.Core.MaybeBool.MaybeBool() -> void +Silk.NET.Core.MaybeBool.MaybeBool(T Value) -> void +Silk.NET.Core.MaybeBool.Value.get -> T +Silk.NET.Core.MaybeBool.Value.init -> void +Silk.NET.Core.NativeFunctionAttribute +Silk.NET.Core.NativeFunctionAttribute.EntryPoint -> string? +Silk.NET.Core.NativeFunctionAttribute.NativeFunctionAttribute(string! dllName) -> void +Silk.NET.Core.NativeFunctionAttribute.Value.get -> string! +Silk.NET.Core.NativeInheritanceAttribute +Silk.NET.Core.NativeInheritanceAttribute.Name.get -> string! +Silk.NET.Core.NativeInheritanceAttribute.NativeInheritanceAttribute(string! name) -> void +Silk.NET.Core.NativeTypeNameAttribute +Silk.NET.Core.NativeTypeNameAttribute.Name.get -> string! +Silk.NET.Core.NativeTypeNameAttribute.NativeTypeNameAttribute(string! name) -> void +Silk.NET.Core.NullPtr +Silk.NET.Core.NullPtr.NullPtr() -> void +Silk.NET.Core.PointerExtensions +Silk.NET.Core.Ptr +Silk.NET.Core.Ptr.AsSpan(int length) -> System.Span +Silk.NET.Core.Ptr.GetPinnableReference() -> byte +Silk.NET.Core.Ptr.Handle.get -> byte +Silk.NET.Core.Ptr.Ptr() -> void +Silk.NET.Core.Ptr.Ptr(void* ptr) -> void +Silk.NET.Core.Ptr.ReadToString() -> string! +Silk.NET.Core.Ptr.this[nuint index].get -> byte +Silk.NET.Core.Ptr.ToArray(int length) -> T[]! +Silk.NET.Core.Ptr2D +Silk.NET.Core.Ptr2D.AsSpan(int length) -> System.Span +Silk.NET.Core.Ptr2D.GetPinnableReference() -> void* +Silk.NET.Core.Ptr2D.Handle.get -> byte +Silk.NET.Core.Ptr2D.Ptr2D() -> void +Silk.NET.Core.Ptr2D.Ptr2D(Silk.NET.Core.Ptr* ptr) -> void +Silk.NET.Core.Ptr2D.Ptr2D(void** ptr) -> void +Silk.NET.Core.Ptr2D.ReadToStringArray(int length) -> string?[]? +Silk.NET.Core.Ptr2D.this[nuint index].get -> Silk.NET.Core.Ptr +Silk.NET.Core.Ptr2D.ToArray(int length) -> T[]! +Silk.NET.Core.Ptr2D.ToArray(int length, int[]! lengths) -> T[]![]! +Silk.NET.Core.Ptr2D.Value.get -> byte +Silk.NET.Core.Ptr2D +Silk.NET.Core.Ptr2D.AsSpan(int length) -> System.Span> +Silk.NET.Core.Ptr2D.GetPinnableReference() -> T* +Silk.NET.Core.Ptr2D.Handle.get -> Silk.NET.Core.Ptr +Silk.NET.Core.Ptr2D.Ptr2D() -> void +Silk.NET.Core.Ptr2D.Ptr2D(Silk.NET.Core.Ptr* ptr) -> void +Silk.NET.Core.Ptr2D.Ptr2D(T** ptr) -> void +Silk.NET.Core.Ptr2D.Ptr2D(void** ptr) -> void +Silk.NET.Core.Ptr2D.this[nuint index].get -> Silk.NET.Core.Ptr +Silk.NET.Core.Ptr2D.ToArray(int length) -> Silk.NET.Core.Ptr[]! +Silk.NET.Core.Ptr2D.ToArray(int length, int[]! lengths) -> T[]![]! +Silk.NET.Core.Ptr2D.Value.get -> T +Silk.NET.Core.Ptr3D +Silk.NET.Core.Ptr3D.AsSpan(int length) -> System.Span +Silk.NET.Core.Ptr3D.GetPinnableReference() -> void** +Silk.NET.Core.Ptr3D.Handle.get -> byte +Silk.NET.Core.Ptr3D.Ptr3D() -> void +Silk.NET.Core.Ptr3D.Ptr3D(Silk.NET.Core.Ptr2D* ptr) -> void +Silk.NET.Core.Ptr3D.Ptr3D(void*** ptr) -> void +Silk.NET.Core.Ptr3D.ReadToStringArray(int length, int[]! lengths) -> string?[]?[]? +Silk.NET.Core.Ptr3D.this[nuint index].get -> Silk.NET.Core.Ptr +Silk.NET.Core.Ptr3D.ToArray(int length) -> T[]! +Silk.NET.Core.Ptr3D.ToArray(int length, int[]! lengths) -> T[]![]! +Silk.NET.Core.Ptr3D.ToArray(int length, int[]! lengths0, int[]![]! lengths1) -> T[]![]![]! +Silk.NET.Core.Ptr3D.Value.get -> byte +Silk.NET.Core.Ptr3D +Silk.NET.Core.Ptr3D.AsSpan(int length) -> System.Span> +Silk.NET.Core.Ptr3D.GetPinnableReference() -> T** +Silk.NET.Core.Ptr3D.Handle.get -> Silk.NET.Core.Ptr +Silk.NET.Core.Ptr3D.Ptr3D() -> void +Silk.NET.Core.Ptr3D.Ptr3D(Silk.NET.Core.Ptr2D* ptr) -> void +Silk.NET.Core.Ptr3D.Ptr3D(T*** ptr) -> void +Silk.NET.Core.Ptr3D.Ptr3D(void*** ptr) -> void +Silk.NET.Core.Ptr3D.this[nuint index].get -> Silk.NET.Core.Ptr +Silk.NET.Core.Ptr3D.ToArray(int length) -> Silk.NET.Core.Ptr2D[]! +Silk.NET.Core.Ptr3D.ToArray(int length, int[]! lengths) -> Silk.NET.Core.Ptr[]![]! +Silk.NET.Core.Ptr3D.ToArray(int length, int[]! lengths0, int[]![]! lengths1) -> T[]![]![]! +Silk.NET.Core.Ptr3D.Value.get -> T +Silk.NET.Core.Ptr +Silk.NET.Core.Ptr.AsSpan(int length) -> System.Span +Silk.NET.Core.Ptr.GetPinnableReference() -> T +Silk.NET.Core.Ptr.Handle.get -> T +Silk.NET.Core.Ptr.Ptr() -> void +Silk.NET.Core.Ptr.Ptr(T* ptr) -> void +Silk.NET.Core.Ptr.this[nuint index].get -> T +Silk.NET.Core.Ptr.ToArray(int length) -> T[]! +Silk.NET.Core.Ref +Silk.NET.Core.Ref.AsSpan(int length) -> System.Span +Silk.NET.Core.Ref.GetPinnableReference() -> byte +Silk.NET.Core.Ref.ReadToString() -> string! +Silk.NET.Core.Ref.ReadToString(int length) -> string! +Silk.NET.Core.Ref.Ref() -> void +Silk.NET.Core.Ref.Ref(ref byte Ref) -> void +Silk.NET.Core.Ref.this[nuint index].get -> byte +Silk.NET.Core.Ref2D +Silk.NET.Core.Ref2D.GetInteriorRef() -> byte +Silk.NET.Core.Ref2D.GetPinnableReference() -> void* +Silk.NET.Core.Ref2D.Ref.get -> Silk.NET.Core.Ref +Silk.NET.Core.Ref2D.Ref2D() -> void +Silk.NET.Core.Ref2D.Ref2D(ref Silk.NET.Core.Ref Ref) -> void +Silk.NET.Core.Ref2D.this[nuint index].get -> Silk.NET.Core.Ref +Silk.NET.Core.Ref2D +Silk.NET.Core.Ref2D.GetInteriorRef() -> byte +Silk.NET.Core.Ref2D.GetPinnableReference() -> T* +Silk.NET.Core.Ref2D.Ref.get -> Silk.NET.Core.Ref +Silk.NET.Core.Ref2D.Ref2D() -> void +Silk.NET.Core.Ref2D.Ref2D(ref Silk.NET.Core.Ref Ref) -> void +Silk.NET.Core.Ref2D.this[nuint index].get -> Silk.NET.Core.Ref +Silk.NET.Core.Ref3D +Silk.NET.Core.Ref3D.GetInteriorRef() -> byte +Silk.NET.Core.Ref3D.GetPinnableReference() -> void** +Silk.NET.Core.Ref3D.Ref.get -> Silk.NET.Core.Ref2D +Silk.NET.Core.Ref3D.Ref3D() -> void +Silk.NET.Core.Ref3D.Ref3D(ref Silk.NET.Core.Ref2D Ref) -> void +Silk.NET.Core.Ref3D.this[nuint index].get -> Silk.NET.Core.Ref2D +Silk.NET.Core.Ref3D +Silk.NET.Core.Ref3D.GetInteriorRef() -> byte +Silk.NET.Core.Ref3D.GetPinnableReference() -> T** +Silk.NET.Core.Ref3D.Ref.get -> Silk.NET.Core.Ref2D +Silk.NET.Core.Ref3D.Ref3D() -> void +Silk.NET.Core.Ref3D.Ref3D(ref Silk.NET.Core.Ref2D Ref) -> void +Silk.NET.Core.Ref3D.this[nuint index].get -> Silk.NET.Core.Ref2D +Silk.NET.Core.Ref +Silk.NET.Core.Ref.AsSpan(int length) -> System.Span +Silk.NET.Core.Ref.GetPinnableReference() -> T +Silk.NET.Core.Ref.Ref() -> void +Silk.NET.Core.Ref.Ref(ref T Ref) -> void +Silk.NET.Core.Ref.this[nuint index].get -> T +Silk.NET.Core.Requires64BitAttribute +Silk.NET.Core.Requires64BitAttribute.Requires64BitAttribute() -> void +Silk.NET.Core.SetsLastSystemErrorAttribute +Silk.NET.Core.SetsLastSystemErrorAttribute.SetsLastSystemErrorAttribute() -> void +Silk.NET.Core.SilkMarshal +Silk.NET.Core.SupportedApiProfileAttribute +Silk.NET.Core.SupportedApiProfileAttribute.ApiSets.get -> string![]? +Silk.NET.Core.SupportedApiProfileAttribute.ApiSets.init -> void +Silk.NET.Core.SupportedApiProfileAttribute.ImpliesSets.get -> string![]? +Silk.NET.Core.SupportedApiProfileAttribute.ImpliesSets.init -> void +Silk.NET.Core.SupportedApiProfileAttribute.MaxVersion.get -> string? +Silk.NET.Core.SupportedApiProfileAttribute.MaxVersion.init -> void +Silk.NET.Core.SupportedApiProfileAttribute.MinVersion.get -> string? +Silk.NET.Core.SupportedApiProfileAttribute.MinVersion.init -> void +Silk.NET.Core.SupportedApiProfileAttribute.Profile.get -> string! +Silk.NET.Core.SupportedApiProfileAttribute.Profile.init -> void +Silk.NET.Core.SupportedApiProfileAttribute.RequireAll.get -> bool +Silk.NET.Core.SupportedApiProfileAttribute.RequireAll.init -> void +Silk.NET.Core.SupportedApiProfileAttribute.SupportedApiProfileAttribute(string! profile, string![]? apiSets = null) -> void +Silk.NET.Core.TransformedAttribute +Silk.NET.Core.TransformedAttribute.IsTransformed.get -> bool +Silk.NET.Core.TransformedAttribute.TransformedAttribute(bool isTransformed = true) -> void +Silk.NET.Core.Utf8String +Silk.NET.Core.Utf8String.Bytes.get -> System.ReadOnlySpan +Silk.NET.Core.Utf8String.Utf8String() -> void +Silk.NET.Core.Utf8String.Utf8String(System.ReadOnlySpan bytes) -> void +Silk.NET.Core.VariantBool +Silk.NET.Core.VariantBool.VariantBool() -> void +Silk.NET.Core.VtblIndexAttribute +Silk.NET.Core.VtblIndexAttribute.Index.get -> uint +Silk.NET.Core.VtblIndexAttribute.VtblIndexAttribute(uint index) -> void +static Silk.NET.Core.Constant.implicit operator Silk.NET.Core.Constant(TEnum1 value) -> Silk.NET.Core.Constant +static Silk.NET.Core.Constant.implicit operator Silk.NET.Core.Constant(TEnum2 value) -> Silk.NET.Core.Constant +static Silk.NET.Core.Constant.implicit operator Silk.NET.Core.Constant(TUnderlying value) -> Silk.NET.Core.Constant +static Silk.NET.Core.Constant.implicit operator TEnum1(Silk.NET.Core.Constant value) -> TEnum1 +static Silk.NET.Core.Constant.implicit operator TEnum2(Silk.NET.Core.Constant value) -> TEnum2 +static Silk.NET.Core.Constant.implicit operator TUnderlying(Silk.NET.Core.Constant value) -> TUnderlying +static Silk.NET.Core.Constant.implicit operator Silk.NET.Core.Constant(TEnum1 value) -> Silk.NET.Core.Constant +static Silk.NET.Core.Constant.implicit operator Silk.NET.Core.Constant(TUnderlying value) -> Silk.NET.Core.Constant +static Silk.NET.Core.Constant.implicit operator TEnum1(Silk.NET.Core.Constant value) -> TEnum1 +static Silk.NET.Core.Constant.implicit operator TUnderlying(Silk.NET.Core.Constant value) -> TUnderlying +static Silk.NET.Core.Default.True() -> T +static Silk.NET.Core.DSL.nullptr.get -> Silk.NET.Core.NullPtr +static Silk.NET.Core.Loader.LoaderInterface.LoadLibrary(string! name, System.Reflection.Assembly! asm) -> nint +static Silk.NET.Core.Loader.LoaderInterface.RegisterAlternativeName(string! libraryName, string! altName) -> void +static Silk.NET.Core.Loader.LoaderInterface.RegisterHook(System.Reflection.Assembly? asm) -> void +static Silk.NET.Core.Loader.LoaderInterface.ResolvingLibrary -> System.Runtime.InteropServices.DllImportResolver? +static Silk.NET.Core.MaybeBool.implicit operator bool(Silk.NET.Core.MaybeBool value) -> bool +static Silk.NET.Core.MaybeBool.implicit operator Silk.NET.Core.MaybeBool(bool value) -> Silk.NET.Core.MaybeBool +static Silk.NET.Core.MaybeBool.implicit operator Silk.NET.Core.MaybeBool(T Value) -> Silk.NET.Core.MaybeBool +static Silk.NET.Core.MaybeBool.implicit operator T(Silk.NET.Core.MaybeBool value) -> T +static Silk.NET.Core.MaybeBool.implicit operator bool(Silk.NET.Core.MaybeBool value) -> bool +static Silk.NET.Core.MaybeBool.implicit operator Silk.NET.Core.MaybeBool(bool value) -> Silk.NET.Core.MaybeBool +static Silk.NET.Core.MaybeBool.implicit operator Silk.NET.Core.MaybeBool(T Value) -> Silk.NET.Core.MaybeBool +static Silk.NET.Core.MaybeBool.implicit operator T(Silk.NET.Core.MaybeBool value) -> T +static Silk.NET.Core.NullPtr.implicit operator void*(Silk.NET.Core.NullPtr _) -> void* +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ptr this) -> string! +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ptr this, int length) -> string! +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ptr this) -> string! +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ptr this, int length) -> string! +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ptr this) -> string! +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ptr this, int length) -> string! +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ptr this) -> string! +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ptr this, int length) -> string! +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ptr this) -> string! +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ptr this, int length) -> string! +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ptr this) -> string! +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ptr this, int length) -> string! +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ptr this) -> string! +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ptr this, int length) -> string! +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ref this) -> string! +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ref this, int length) -> string! +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ref this) -> string! +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ref this, int length) -> string! +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ref this) -> string! +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ref this, int length) -> string! +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ref this) -> string! +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ref this, int length) -> string! +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ref this) -> string! +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ref this, int length) -> string! +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ref this) -> string! +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ref this, int length) -> string! +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ref this) -> string! +static Silk.NET.Core.PointerExtensions.ReadToString(this Silk.NET.Core.Ref this, int length) -> string! +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ptr2D this, int length) -> string?[]? +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ptr2D this, int length) -> string?[]? +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ptr2D this, int length) -> string?[]? +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ptr2D this, int length) -> string?[]? +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ptr2D this, int length) -> string?[]? +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ptr2D this, int length) -> string?[]? +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ptr2D this, int length) -> string?[]? +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ptr3D this, int length, int[]! lengths) -> string?[]?[]? +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ptr3D this, int length, int[]! lengths) -> string?[]?[]? +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ptr3D this, int length, int[]! lengths) -> string?[]?[]? +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ptr3D this, int length, int[]! lengths) -> string?[]?[]? +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ptr3D this, int length, int[]! lengths) -> string?[]?[]? +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ptr3D this, int length, int[]! lengths) -> string?[]?[]? +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ptr3D this, int length, int[]! lengths) -> string?[]?[]? +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ref2D this, int length) -> string?[]? +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ref2D this, int length) -> string?[]? +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ref2D this, int length) -> string?[]? +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ref2D this, int length) -> string?[]? +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ref2D this, int length) -> string?[]? +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ref2D this, int length) -> string?[]? +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ref2D this, int length) -> string?[]? +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ref3D this, int length, int[]! lengths) -> string?[]?[]? +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ref3D this, int length, int[]! lengths) -> string?[]?[]? +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ref3D this, int length, int[]! lengths) -> string?[]?[]? +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ref3D this, int length, int[]! lengths) -> string?[]?[]? +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ref3D this, int length, int[]! lengths) -> string?[]?[]? +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ref3D this, int length, int[]! lengths) -> string?[]?[]? +static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ref3D this, int length, int[]! lengths) -> string?[]?[]? +static Silk.NET.Core.Ptr.explicit operator Silk.NET.Core.Ptr(Silk.NET.Core.Ref ptr) -> Silk.NET.Core.Ptr +static Silk.NET.Core.Ptr.explicit operator string!(Silk.NET.Core.Ptr ptr) -> string! +static Silk.NET.Core.Ptr.implicit operator Silk.NET.Core.Ptr(Silk.NET.Core.NullPtr ptr) -> Silk.NET.Core.Ptr +static Silk.NET.Core.Ptr.implicit operator Silk.NET.Core.Ptr(void* ptr) -> Silk.NET.Core.Ptr +static Silk.NET.Core.Ptr.implicit operator Silk.NET.Core.Ref(Silk.NET.Core.Ptr ptr) -> Silk.NET.Core.Ref +static Silk.NET.Core.Ptr.implicit operator void*(Silk.NET.Core.Ptr ptr) -> void* +static Silk.NET.Core.Ptr.operator !=(Silk.NET.Core.NullPtr lh, Silk.NET.Core.Ptr rh) -> bool +static Silk.NET.Core.Ptr.operator !=(Silk.NET.Core.Ptr lh, Silk.NET.Core.NullPtr rh) -> bool +static Silk.NET.Core.Ptr.operator !=(Silk.NET.Core.Ptr lh, Silk.NET.Core.Ptr rh) -> bool +static Silk.NET.Core.Ptr.operator !=(Silk.NET.Core.Ptr lh, Silk.NET.Core.Ref rh) -> bool +static Silk.NET.Core.Ptr.operator !=(Silk.NET.Core.Ptr lh, void* rh) -> bool +static Silk.NET.Core.Ptr.operator !=(Silk.NET.Core.Ref lh, Silk.NET.Core.Ptr rh) -> bool +static Silk.NET.Core.Ptr.operator !=(void* lh, Silk.NET.Core.Ptr rh) -> bool +static Silk.NET.Core.Ptr.operator ==(Silk.NET.Core.NullPtr lh, Silk.NET.Core.Ptr rh) -> bool +static Silk.NET.Core.Ptr.operator ==(Silk.NET.Core.Ptr lh, Silk.NET.Core.NullPtr rh) -> bool +static Silk.NET.Core.Ptr.operator ==(Silk.NET.Core.Ptr lh, Silk.NET.Core.Ptr rh) -> bool +static Silk.NET.Core.Ptr.operator ==(Silk.NET.Core.Ptr lh, Silk.NET.Core.Ref rh) -> bool +static Silk.NET.Core.Ptr.operator ==(Silk.NET.Core.Ptr lh, void* rh) -> bool +static Silk.NET.Core.Ptr.operator ==(Silk.NET.Core.Ref lh, Silk.NET.Core.Ptr rh) -> bool +static Silk.NET.Core.Ptr.operator ==(void* lh, Silk.NET.Core.Ptr rh) -> bool +static Silk.NET.Core.Ptr2D.explicit operator Silk.NET.Core.Ptr2D(Silk.NET.Core.Ref2D ptr) -> Silk.NET.Core.Ptr2D +static Silk.NET.Core.Ptr2D.implicit operator Silk.NET.Core.Ptr2D(Silk.NET.Core.NullPtr ptr) -> Silk.NET.Core.Ptr2D +static Silk.NET.Core.Ptr2D.implicit operator Silk.NET.Core.Ptr2D(Silk.NET.Core.Ptr* ptr) -> Silk.NET.Core.Ptr2D +static Silk.NET.Core.Ptr2D.implicit operator Silk.NET.Core.Ptr2D(void* ptr) -> Silk.NET.Core.Ptr2D +static Silk.NET.Core.Ptr2D.implicit operator Silk.NET.Core.Ptr2D(void** ptr) -> Silk.NET.Core.Ptr2D +static Silk.NET.Core.Ptr2D.implicit operator Silk.NET.Core.Ref2D(Silk.NET.Core.Ptr2D ptr) -> Silk.NET.Core.Ref2D +static Silk.NET.Core.Ptr2D.implicit operator void*(Silk.NET.Core.Ptr2D ptr) -> void* +static Silk.NET.Core.Ptr2D.implicit operator void**(Silk.NET.Core.Ptr2D ptr) -> void** +static Silk.NET.Core.Ptr2D.operator !=(Silk.NET.Core.NullPtr lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator !=(Silk.NET.Core.Ptr2D lh, Silk.NET.Core.NullPtr rh) -> bool +static Silk.NET.Core.Ptr2D.operator !=(Silk.NET.Core.Ptr2D lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator !=(Silk.NET.Core.Ptr2D lh, Silk.NET.Core.Ref2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator !=(Silk.NET.Core.Ptr2D lh, void* rh) -> bool +static Silk.NET.Core.Ptr2D.operator !=(Silk.NET.Core.Ptr2D lh, void** rh) -> bool +static Silk.NET.Core.Ptr2D.operator !=(Silk.NET.Core.Ref2D lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator !=(void* lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator !=(void** lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator ==(Silk.NET.Core.NullPtr lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator ==(Silk.NET.Core.Ptr2D lh, Silk.NET.Core.NullPtr rh) -> bool +static Silk.NET.Core.Ptr2D.operator ==(Silk.NET.Core.Ptr2D lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator ==(Silk.NET.Core.Ptr2D lh, Silk.NET.Core.Ref2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator ==(Silk.NET.Core.Ptr2D lh, void* rh) -> bool +static Silk.NET.Core.Ptr2D.operator ==(Silk.NET.Core.Ptr2D lh, void** rh) -> bool +static Silk.NET.Core.Ptr2D.operator ==(Silk.NET.Core.Ref2D lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator ==(void* lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator ==(void** lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr2D.implicit operator Silk.NET.Core.Ptr2D(Silk.NET.Core.Ptr2D ptr) -> Silk.NET.Core.Ptr2D +static Silk.NET.Core.Ptr2D.implicit operator Silk.NET.Core.Ptr2D(Silk.NET.Core.NullPtr ptr) -> Silk.NET.Core.Ptr2D +static Silk.NET.Core.Ptr2D.implicit operator Silk.NET.Core.Ptr2D(Silk.NET.Core.Ptr2D ptr) -> Silk.NET.Core.Ptr2D +static Silk.NET.Core.Ptr2D.implicit operator Silk.NET.Core.Ptr2D(Silk.NET.Core.Ptr* ptr) -> Silk.NET.Core.Ptr2D +static Silk.NET.Core.Ptr2D.implicit operator Silk.NET.Core.Ptr2D(Silk.NET.Core.Ref2D ptr) -> Silk.NET.Core.Ptr2D +static Silk.NET.Core.Ptr2D.implicit operator Silk.NET.Core.Ptr2D(Silk.NET.Core.Ref2D ptr) -> Silk.NET.Core.Ptr2D +static Silk.NET.Core.Ptr2D.implicit operator Silk.NET.Core.Ptr2D(T** ptr) -> Silk.NET.Core.Ptr2D +static Silk.NET.Core.Ptr2D.implicit operator Silk.NET.Core.Ptr2D(void* ptr) -> Silk.NET.Core.Ptr2D +static Silk.NET.Core.Ptr2D.implicit operator Silk.NET.Core.Ptr2D(void** ptr) -> Silk.NET.Core.Ptr2D +static Silk.NET.Core.Ptr2D.implicit operator Silk.NET.Core.Ref2D(Silk.NET.Core.Ptr2D ptr) -> Silk.NET.Core.Ref2D +static Silk.NET.Core.Ptr2D.implicit operator Silk.NET.Core.Ref2D(Silk.NET.Core.Ptr2D ptr) -> Silk.NET.Core.Ref2D +static Silk.NET.Core.Ptr2D.implicit operator T*(Silk.NET.Core.Ptr2D ptr) -> T* +static Silk.NET.Core.Ptr2D.implicit operator T**(Silk.NET.Core.Ptr2D ptr) -> T** +static Silk.NET.Core.Ptr2D.implicit operator void*(Silk.NET.Core.Ptr2D ptr) -> void* +static Silk.NET.Core.Ptr2D.implicit operator void**(Silk.NET.Core.Ptr2D ptr) -> void** +static Silk.NET.Core.Ptr2D.operator !=(Silk.NET.Core.NullPtr lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator !=(Silk.NET.Core.Ptr2D lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator !=(Silk.NET.Core.Ptr2D lh, Silk.NET.Core.NullPtr rh) -> bool +static Silk.NET.Core.Ptr2D.operator !=(Silk.NET.Core.Ptr2D lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator !=(Silk.NET.Core.Ptr2D lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator !=(Silk.NET.Core.Ptr2D lh, Silk.NET.Core.Ref2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator !=(Silk.NET.Core.Ptr2D lh, T* rh) -> bool +static Silk.NET.Core.Ptr2D.operator !=(Silk.NET.Core.Ptr2D lh, T** rh) -> bool +static Silk.NET.Core.Ptr2D.operator !=(Silk.NET.Core.Ptr2D lh, void* rh) -> bool +static Silk.NET.Core.Ptr2D.operator !=(Silk.NET.Core.Ptr2D lh, void** rh) -> bool +static Silk.NET.Core.Ptr2D.operator !=(Silk.NET.Core.Ref2D lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator !=(T* lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator !=(T** lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator !=(void* lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator !=(void** lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator ==(Silk.NET.Core.NullPtr lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator ==(Silk.NET.Core.Ptr2D lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator ==(Silk.NET.Core.Ptr2D lh, Silk.NET.Core.NullPtr rh) -> bool +static Silk.NET.Core.Ptr2D.operator ==(Silk.NET.Core.Ptr2D lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator ==(Silk.NET.Core.Ptr2D lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator ==(Silk.NET.Core.Ptr2D lh, Silk.NET.Core.Ref2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator ==(Silk.NET.Core.Ptr2D lh, T* rh) -> bool +static Silk.NET.Core.Ptr2D.operator ==(Silk.NET.Core.Ptr2D lh, T** rh) -> bool +static Silk.NET.Core.Ptr2D.operator ==(Silk.NET.Core.Ptr2D lh, void* rh) -> bool +static Silk.NET.Core.Ptr2D.operator ==(Silk.NET.Core.Ptr2D lh, void** rh) -> bool +static Silk.NET.Core.Ptr2D.operator ==(Silk.NET.Core.Ref2D lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator ==(T* lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator ==(T** lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator ==(void* lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr2D.operator ==(void** lh, Silk.NET.Core.Ptr2D rh) -> bool +static Silk.NET.Core.Ptr3D.explicit operator Silk.NET.Core.Ptr3D(Silk.NET.Core.Ref2D ptr) -> Silk.NET.Core.Ptr3D +static Silk.NET.Core.Ptr3D.implicit operator Silk.NET.Core.Ptr3D(Silk.NET.Core.NullPtr ptr) -> Silk.NET.Core.Ptr3D +static Silk.NET.Core.Ptr3D.implicit operator Silk.NET.Core.Ptr3D(Silk.NET.Core.Ptr2D* ptr) -> Silk.NET.Core.Ptr3D +static Silk.NET.Core.Ptr3D.implicit operator Silk.NET.Core.Ptr3D(void* ptr) -> Silk.NET.Core.Ptr3D +static Silk.NET.Core.Ptr3D.implicit operator Silk.NET.Core.Ptr3D(void** ptr) -> Silk.NET.Core.Ptr3D +static Silk.NET.Core.Ptr3D.implicit operator Silk.NET.Core.Ptr3D(void*** ptr) -> Silk.NET.Core.Ptr3D +static Silk.NET.Core.Ptr3D.implicit operator Silk.NET.Core.Ref2D(Silk.NET.Core.Ptr3D ptr) -> Silk.NET.Core.Ref2D +static Silk.NET.Core.Ptr3D.implicit operator void*(Silk.NET.Core.Ptr3D ptr) -> void* +static Silk.NET.Core.Ptr3D.implicit operator void**(Silk.NET.Core.Ptr3D ptr) -> void** +static Silk.NET.Core.Ptr3D.implicit operator void***(Silk.NET.Core.Ptr3D ptr) -> void*** +static Silk.NET.Core.Ptr3D.operator !=(Silk.NET.Core.NullPtr lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr3D.operator !=(Silk.NET.Core.Ptr3D lh, Silk.NET.Core.NullPtr rh) -> bool +static Silk.NET.Core.Ptr3D.operator !=(Silk.NET.Core.Ptr3D lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr3D.operator !=(Silk.NET.Core.Ptr3D lh, Silk.NET.Core.Ref2D rh) -> bool +static Silk.NET.Core.Ptr3D.operator !=(Silk.NET.Core.Ptr3D lh, void* rh) -> bool +static Silk.NET.Core.Ptr3D.operator !=(Silk.NET.Core.Ptr3D lh, void** rh) -> bool +static Silk.NET.Core.Ptr3D.operator !=(Silk.NET.Core.Ref2D lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr3D.operator !=(void* lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr3D.operator !=(void** lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr3D.operator ==(Silk.NET.Core.NullPtr lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr3D.operator ==(Silk.NET.Core.Ptr3D lh, Silk.NET.Core.NullPtr rh) -> bool +static Silk.NET.Core.Ptr3D.operator ==(Silk.NET.Core.Ptr3D lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr3D.operator ==(Silk.NET.Core.Ptr3D lh, Silk.NET.Core.Ref2D rh) -> bool +static Silk.NET.Core.Ptr3D.operator ==(Silk.NET.Core.Ptr3D lh, void* rh) -> bool +static Silk.NET.Core.Ptr3D.operator ==(Silk.NET.Core.Ptr3D lh, void** rh) -> bool +static Silk.NET.Core.Ptr3D.operator ==(Silk.NET.Core.Ref2D lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr3D.operator ==(void* lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr3D.operator ==(void** lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr3D.implicit operator Silk.NET.Core.Ptr3D(Silk.NET.Core.Ptr3D ptr) -> Silk.NET.Core.Ptr3D +static Silk.NET.Core.Ptr3D.implicit operator Silk.NET.Core.Ptr3D(Silk.NET.Core.NullPtr ptr) -> Silk.NET.Core.Ptr3D +static Silk.NET.Core.Ptr3D.implicit operator Silk.NET.Core.Ptr3D(Silk.NET.Core.Ptr2D* ptr) -> Silk.NET.Core.Ptr3D +static Silk.NET.Core.Ptr3D.implicit operator Silk.NET.Core.Ptr3D(Silk.NET.Core.Ptr3D ptr) -> Silk.NET.Core.Ptr3D +static Silk.NET.Core.Ptr3D.implicit operator Silk.NET.Core.Ptr3D(Silk.NET.Core.Ref3D ptr) -> Silk.NET.Core.Ptr3D +static Silk.NET.Core.Ptr3D.implicit operator Silk.NET.Core.Ptr3D(Silk.NET.Core.Ref3D ptr) -> Silk.NET.Core.Ptr3D +static Silk.NET.Core.Ptr3D.implicit operator Silk.NET.Core.Ptr3D(T*** ptr) -> Silk.NET.Core.Ptr3D +static Silk.NET.Core.Ptr3D.implicit operator Silk.NET.Core.Ptr3D(void* ptr) -> Silk.NET.Core.Ptr3D +static Silk.NET.Core.Ptr3D.implicit operator Silk.NET.Core.Ptr3D(void** ptr) -> Silk.NET.Core.Ptr3D +static Silk.NET.Core.Ptr3D.implicit operator Silk.NET.Core.Ptr3D(void*** ptr) -> Silk.NET.Core.Ptr3D +static Silk.NET.Core.Ptr3D.implicit operator Silk.NET.Core.Ref3D(Silk.NET.Core.Ptr3D ptr) -> Silk.NET.Core.Ref3D +static Silk.NET.Core.Ptr3D.implicit operator Silk.NET.Core.Ref3D(Silk.NET.Core.Ptr3D ptr) -> Silk.NET.Core.Ref3D +static Silk.NET.Core.Ptr3D.implicit operator T*(Silk.NET.Core.Ptr3D ptr) -> T* +static Silk.NET.Core.Ptr3D.implicit operator T**(Silk.NET.Core.Ptr3D ptr) -> T** +static Silk.NET.Core.Ptr3D.implicit operator T***(Silk.NET.Core.Ptr3D ptr) -> T*** +static Silk.NET.Core.Ptr3D.implicit operator void*(Silk.NET.Core.Ptr3D ptr) -> void* +static Silk.NET.Core.Ptr3D.implicit operator void**(Silk.NET.Core.Ptr3D ptr) -> void** +static Silk.NET.Core.Ptr3D.implicit operator void***(Silk.NET.Core.Ptr3D ptr) -> void*** +static Silk.NET.Core.Ptr3D.operator !=(Silk.NET.Core.NullPtr lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr3D.operator !=(Silk.NET.Core.Ptr3D lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr3D.operator !=(Silk.NET.Core.Ptr3D lh, Silk.NET.Core.NullPtr rh) -> bool +static Silk.NET.Core.Ptr3D.operator !=(Silk.NET.Core.Ptr3D lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr3D.operator !=(Silk.NET.Core.Ptr3D lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr3D.operator !=(Silk.NET.Core.Ptr3D lh, Silk.NET.Core.Ref2D rh) -> bool +static Silk.NET.Core.Ptr3D.operator !=(Silk.NET.Core.Ptr3D lh, T* rh) -> bool +static Silk.NET.Core.Ptr3D.operator !=(Silk.NET.Core.Ptr3D lh, T** rh) -> bool +static Silk.NET.Core.Ptr3D.operator !=(Silk.NET.Core.Ptr3D lh, void* rh) -> bool +static Silk.NET.Core.Ptr3D.operator !=(Silk.NET.Core.Ptr3D lh, void** rh) -> bool +static Silk.NET.Core.Ptr3D.operator !=(Silk.NET.Core.Ref2D lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr3D.operator !=(T* lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr3D.operator !=(T** lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr3D.operator !=(void* lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr3D.operator !=(void** lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr3D.operator ==(Silk.NET.Core.NullPtr lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr3D.operator ==(Silk.NET.Core.Ptr3D lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr3D.operator ==(Silk.NET.Core.Ptr3D lh, Silk.NET.Core.NullPtr rh) -> bool +static Silk.NET.Core.Ptr3D.operator ==(Silk.NET.Core.Ptr3D lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr3D.operator ==(Silk.NET.Core.Ptr3D lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr3D.operator ==(Silk.NET.Core.Ptr3D lh, Silk.NET.Core.Ref2D rh) -> bool +static Silk.NET.Core.Ptr3D.operator ==(Silk.NET.Core.Ptr3D lh, T* rh) -> bool +static Silk.NET.Core.Ptr3D.operator ==(Silk.NET.Core.Ptr3D lh, T** rh) -> bool +static Silk.NET.Core.Ptr3D.operator ==(Silk.NET.Core.Ptr3D lh, void* rh) -> bool +static Silk.NET.Core.Ptr3D.operator ==(Silk.NET.Core.Ptr3D lh, void** rh) -> bool +static Silk.NET.Core.Ptr3D.operator ==(Silk.NET.Core.Ref2D lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr3D.operator ==(T* lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr3D.operator ==(T** lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr3D.operator ==(void* lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr3D.operator ==(void** lh, Silk.NET.Core.Ptr3D rh) -> bool +static Silk.NET.Core.Ptr.explicit operator Silk.NET.Core.Ptr(Silk.NET.Core.Ref ptr) -> Silk.NET.Core.Ptr +static Silk.NET.Core.Ptr.explicit operator string!(Silk.NET.Core.Ptr ptr) -> string! +static Silk.NET.Core.Ptr.implicit operator Silk.NET.Core.Ptr(Silk.NET.Core.Ptr ptr) -> Silk.NET.Core.Ptr +static Silk.NET.Core.Ptr.implicit operator Silk.NET.Core.Ptr(Silk.NET.Core.NullPtr ptr) -> Silk.NET.Core.Ptr +static Silk.NET.Core.Ptr.implicit operator Silk.NET.Core.Ptr(Silk.NET.Core.Ptr ptr) -> Silk.NET.Core.Ptr +static Silk.NET.Core.Ptr.implicit operator Silk.NET.Core.Ptr(T* ptr) -> Silk.NET.Core.Ptr +static Silk.NET.Core.Ptr.implicit operator Silk.NET.Core.Ptr(void* ptr) -> Silk.NET.Core.Ptr +static Silk.NET.Core.Ptr.implicit operator Silk.NET.Core.Ref(Silk.NET.Core.Ptr ptr) -> Silk.NET.Core.Ref +static Silk.NET.Core.Ptr.implicit operator T*(Silk.NET.Core.Ptr ptr) -> T* +static Silk.NET.Core.Ptr.implicit operator void*(Silk.NET.Core.Ptr ptr) -> void* +static Silk.NET.Core.Ptr.operator !=(Silk.NET.Core.NullPtr lh, Silk.NET.Core.Ptr rh) -> bool +static Silk.NET.Core.Ptr.operator !=(Silk.NET.Core.Ptr lh, Silk.NET.Core.Ptr rh) -> bool +static Silk.NET.Core.Ptr.operator !=(Silk.NET.Core.Ptr lh, Silk.NET.Core.NullPtr rh) -> bool +static Silk.NET.Core.Ptr.operator !=(Silk.NET.Core.Ptr lh, Silk.NET.Core.Ptr rh) -> bool +static Silk.NET.Core.Ptr.operator !=(Silk.NET.Core.Ptr lh, Silk.NET.Core.Ptr rh) -> bool +static Silk.NET.Core.Ptr.operator !=(Silk.NET.Core.Ptr lh, Silk.NET.Core.Ref rh) -> bool +static Silk.NET.Core.Ptr.operator !=(Silk.NET.Core.Ptr lh, T* rh) -> bool +static Silk.NET.Core.Ptr.operator !=(Silk.NET.Core.Ptr lh, void* rh) -> bool +static Silk.NET.Core.Ptr.operator !=(Silk.NET.Core.Ref lh, Silk.NET.Core.Ptr rh) -> bool +static Silk.NET.Core.Ptr.operator !=(T* lh, Silk.NET.Core.Ptr rh) -> bool +static Silk.NET.Core.Ptr.operator !=(void* lh, Silk.NET.Core.Ptr rh) -> bool +static Silk.NET.Core.Ptr.operator ==(Silk.NET.Core.NullPtr lh, Silk.NET.Core.Ptr rh) -> bool +static Silk.NET.Core.Ptr.operator ==(Silk.NET.Core.Ptr lh, Silk.NET.Core.Ptr rh) -> bool +static Silk.NET.Core.Ptr.operator ==(Silk.NET.Core.Ptr lh, Silk.NET.Core.NullPtr rh) -> bool +static Silk.NET.Core.Ptr.operator ==(Silk.NET.Core.Ptr lh, Silk.NET.Core.Ptr rh) -> bool +static Silk.NET.Core.Ptr.operator ==(Silk.NET.Core.Ptr lh, Silk.NET.Core.Ptr rh) -> bool +static Silk.NET.Core.Ptr.operator ==(Silk.NET.Core.Ptr lh, Silk.NET.Core.Ref rh) -> bool +static Silk.NET.Core.Ptr.operator ==(Silk.NET.Core.Ptr lh, T* rh) -> bool +static Silk.NET.Core.Ptr.operator ==(Silk.NET.Core.Ptr lh, void* rh) -> bool +static Silk.NET.Core.Ptr.operator ==(Silk.NET.Core.Ref lh, Silk.NET.Core.Ptr rh) -> bool +static Silk.NET.Core.Ptr.operator ==(T* lh, Silk.NET.Core.Ptr rh) -> bool +static Silk.NET.Core.Ptr.operator ==(void* lh, Silk.NET.Core.Ptr rh) -> bool +static Silk.NET.Core.Ref.explicit operator byte*(Silk.NET.Core.Ref ptr) -> byte* +static Silk.NET.Core.Ref.explicit operator string!(Silk.NET.Core.Ref ptr) -> string! +static Silk.NET.Core.Ref.explicit operator void*(Silk.NET.Core.Ref ptr) -> void* +static Silk.NET.Core.Ref.implicit operator Silk.NET.Core.Ref(byte* ptr) -> Silk.NET.Core.Ref +static Silk.NET.Core.Ref.implicit operator Silk.NET.Core.Ref(byte[,,]! array) -> Silk.NET.Core.Ref +static Silk.NET.Core.Ref.implicit operator Silk.NET.Core.Ref(byte[,]! array) -> Silk.NET.Core.Ref +static Silk.NET.Core.Ref.implicit operator Silk.NET.Core.Ref(byte[]! array) -> Silk.NET.Core.Ref +static Silk.NET.Core.Ref.implicit operator Silk.NET.Core.Ref(Silk.NET.Core.NullPtr ptr) -> Silk.NET.Core.Ref +static Silk.NET.Core.Ref.implicit operator Silk.NET.Core.Ref(string! str) -> Silk.NET.Core.Ref +static Silk.NET.Core.Ref.implicit operator Silk.NET.Core.Ref(System.Span span) -> Silk.NET.Core.Ref +static Silk.NET.Core.Ref.implicit operator Silk.NET.Core.Ref(void* ptr) -> Silk.NET.Core.Ref +static Silk.NET.Core.Ref.operator !=(Silk.NET.Core.NullPtr lh, Silk.NET.Core.Ref rh) -> bool +static Silk.NET.Core.Ref.operator !=(Silk.NET.Core.Ref lh, Silk.NET.Core.NullPtr rh) -> bool +static Silk.NET.Core.Ref.operator !=(Silk.NET.Core.Ref lh, Silk.NET.Core.Ref rh) -> bool +static Silk.NET.Core.Ref.operator ==(Silk.NET.Core.NullPtr lh, Silk.NET.Core.Ref rh) -> bool +static Silk.NET.Core.Ref.operator ==(Silk.NET.Core.Ref lh, Silk.NET.Core.NullPtr rh) -> bool +static Silk.NET.Core.Ref.operator ==(Silk.NET.Core.Ref lh, Silk.NET.Core.Ref rh) -> bool +static Silk.NET.Core.Ref2D.explicit operator byte**(Silk.NET.Core.Ref2D ptr) -> byte** +static Silk.NET.Core.Ref2D.explicit operator void*(Silk.NET.Core.Ref2D ptr) -> void* +static Silk.NET.Core.Ref2D.implicit operator Silk.NET.Core.Ref2D(byte** ptr) -> Silk.NET.Core.Ref2D +static Silk.NET.Core.Ref2D.implicit operator Silk.NET.Core.Ref2D(byte*[]! array) -> Silk.NET.Core.Ref2D +static Silk.NET.Core.Ref2D.implicit operator Silk.NET.Core.Ref2D(byte[]![]! array) -> Silk.NET.Core.Ref2D +static Silk.NET.Core.Ref2D.implicit operator Silk.NET.Core.Ref2D(Silk.NET.Core.NullPtr ptr) -> Silk.NET.Core.Ref2D +static Silk.NET.Core.Ref2D.implicit operator Silk.NET.Core.Ref2D(string![]! array) -> Silk.NET.Core.Ref2D +static Silk.NET.Core.Ref2D.implicit operator Silk.NET.Core.Ref2D(void* ptr) -> Silk.NET.Core.Ref2D +static Silk.NET.Core.Ref2D.operator !=(Silk.NET.Core.NullPtr lh, Silk.NET.Core.Ref2D rh) -> bool +static Silk.NET.Core.Ref2D.operator !=(Silk.NET.Core.Ref2D lh, Silk.NET.Core.NullPtr rh) -> bool +static Silk.NET.Core.Ref2D.operator !=(Silk.NET.Core.Ref2D lh, Silk.NET.Core.Ref2D rh) -> bool +static Silk.NET.Core.Ref2D.operator ==(Silk.NET.Core.NullPtr lh, Silk.NET.Core.Ref2D rh) -> bool +static Silk.NET.Core.Ref2D.operator ==(Silk.NET.Core.Ref2D lh, Silk.NET.Core.NullPtr rh) -> bool +static Silk.NET.Core.Ref2D.operator ==(Silk.NET.Core.Ref2D lh, Silk.NET.Core.Ref2D rh) -> bool +static Silk.NET.Core.Ref2D.explicit operator T**(Silk.NET.Core.Ref2D ptr) -> T** +static Silk.NET.Core.Ref2D.explicit operator void*(Silk.NET.Core.Ref2D ptr) -> void* +static Silk.NET.Core.Ref2D.implicit operator Silk.NET.Core.Ref2D(Silk.NET.Core.Ref2D ptr) -> Silk.NET.Core.Ref2D +static Silk.NET.Core.Ref2D.implicit operator Silk.NET.Core.Ref2D(Silk.NET.Core.NullPtr ptr) -> Silk.NET.Core.Ref2D +static Silk.NET.Core.Ref2D.implicit operator Silk.NET.Core.Ref2D(string![]! array) -> Silk.NET.Core.Ref2D +static Silk.NET.Core.Ref2D.implicit operator Silk.NET.Core.Ref2D(T** ptr) -> Silk.NET.Core.Ref2D +static Silk.NET.Core.Ref2D.implicit operator Silk.NET.Core.Ref2D(T*[]! array) -> Silk.NET.Core.Ref2D +static Silk.NET.Core.Ref2D.implicit operator Silk.NET.Core.Ref2D(T[]![]! array) -> Silk.NET.Core.Ref2D +static Silk.NET.Core.Ref2D.implicit operator Silk.NET.Core.Ref2D(void* ptr) -> Silk.NET.Core.Ref2D +static Silk.NET.Core.Ref2D.operator !=(Silk.NET.Core.NullPtr lh, Silk.NET.Core.Ref2D rh) -> bool +static Silk.NET.Core.Ref2D.operator !=(Silk.NET.Core.Ref2D lh, Silk.NET.Core.NullPtr rh) -> bool +static Silk.NET.Core.Ref2D.operator !=(Silk.NET.Core.Ref2D lh, Silk.NET.Core.Ref2D rh) -> bool +static Silk.NET.Core.Ref2D.operator ==(Silk.NET.Core.NullPtr lh, Silk.NET.Core.Ref2D rh) -> bool +static Silk.NET.Core.Ref2D.operator ==(Silk.NET.Core.Ref2D lh, Silk.NET.Core.NullPtr rh) -> bool +static Silk.NET.Core.Ref2D.operator ==(Silk.NET.Core.Ref2D lh, Silk.NET.Core.Ref2D rh) -> bool +static Silk.NET.Core.Ref3D.explicit operator byte***(Silk.NET.Core.Ref3D ptr) -> byte*** +static Silk.NET.Core.Ref3D.explicit operator void*(Silk.NET.Core.Ref3D ptr) -> void* +static Silk.NET.Core.Ref3D.implicit operator Silk.NET.Core.Ref3D(byte*** ptr) -> Silk.NET.Core.Ref3D +static Silk.NET.Core.Ref3D.implicit operator Silk.NET.Core.Ref3D(byte**[]! array) -> Silk.NET.Core.Ref3D +static Silk.NET.Core.Ref3D.implicit operator Silk.NET.Core.Ref3D(byte[]![]![]! array) -> Silk.NET.Core.Ref3D +static Silk.NET.Core.Ref3D.implicit operator Silk.NET.Core.Ref3D(Silk.NET.Core.NullPtr ptr) -> Silk.NET.Core.Ref3D +static Silk.NET.Core.Ref3D.implicit operator Silk.NET.Core.Ref3D(string![]![]! array) -> Silk.NET.Core.Ref3D +static Silk.NET.Core.Ref3D.implicit operator Silk.NET.Core.Ref3D(void* ptr) -> Silk.NET.Core.Ref3D +static Silk.NET.Core.Ref3D.operator !=(Silk.NET.Core.NullPtr lh, Silk.NET.Core.Ref3D rh) -> bool +static Silk.NET.Core.Ref3D.operator !=(Silk.NET.Core.Ref3D lh, Silk.NET.Core.NullPtr rh) -> bool +static Silk.NET.Core.Ref3D.operator !=(Silk.NET.Core.Ref3D lh, Silk.NET.Core.Ref3D rh) -> bool +static Silk.NET.Core.Ref3D.operator ==(Silk.NET.Core.NullPtr lh, Silk.NET.Core.Ref3D rh) -> bool +static Silk.NET.Core.Ref3D.operator ==(Silk.NET.Core.Ref3D lh, Silk.NET.Core.NullPtr rh) -> bool +static Silk.NET.Core.Ref3D.operator ==(Silk.NET.Core.Ref3D lh, Silk.NET.Core.Ref3D rh) -> bool +static Silk.NET.Core.Ref3D.explicit operator T***(Silk.NET.Core.Ref3D ptr) -> T*** +static Silk.NET.Core.Ref3D.explicit operator void*(Silk.NET.Core.Ref3D ptr) -> void* +static Silk.NET.Core.Ref3D.implicit operator Silk.NET.Core.Ref3D(Silk.NET.Core.Ref3D ptr) -> Silk.NET.Core.Ref3D +static Silk.NET.Core.Ref3D.implicit operator Silk.NET.Core.Ref3D(Silk.NET.Core.NullPtr ptr) -> Silk.NET.Core.Ref3D +static Silk.NET.Core.Ref3D.implicit operator Silk.NET.Core.Ref3D(string![]![]! array) -> Silk.NET.Core.Ref3D +static Silk.NET.Core.Ref3D.implicit operator Silk.NET.Core.Ref3D(T*** ptr) -> Silk.NET.Core.Ref3D +static Silk.NET.Core.Ref3D.implicit operator Silk.NET.Core.Ref3D(T**[]! array) -> Silk.NET.Core.Ref3D +static Silk.NET.Core.Ref3D.implicit operator Silk.NET.Core.Ref3D(T[]![]![]! array) -> Silk.NET.Core.Ref3D +static Silk.NET.Core.Ref3D.implicit operator Silk.NET.Core.Ref3D(void* ptr) -> Silk.NET.Core.Ref3D +static Silk.NET.Core.Ref3D.operator !=(Silk.NET.Core.NullPtr lh, Silk.NET.Core.Ref3D rh) -> bool +static Silk.NET.Core.Ref3D.operator !=(Silk.NET.Core.Ref3D lh, Silk.NET.Core.NullPtr rh) -> bool +static Silk.NET.Core.Ref3D.operator !=(Silk.NET.Core.Ref3D lh, Silk.NET.Core.Ref3D rh) -> bool +static Silk.NET.Core.Ref3D.operator ==(Silk.NET.Core.NullPtr lh, Silk.NET.Core.Ref3D rh) -> bool +static Silk.NET.Core.Ref3D.operator ==(Silk.NET.Core.Ref3D lh, Silk.NET.Core.NullPtr rh) -> bool +static Silk.NET.Core.Ref3D.operator ==(Silk.NET.Core.Ref3D lh, Silk.NET.Core.Ref3D rh) -> bool +static Silk.NET.Core.Ref.explicit operator string!(Silk.NET.Core.Ref ptr) -> string! +static Silk.NET.Core.Ref.explicit operator T*(Silk.NET.Core.Ref ptr) -> T* +static Silk.NET.Core.Ref.explicit operator void*(Silk.NET.Core.Ref ptr) -> void* +static Silk.NET.Core.Ref.implicit operator Silk.NET.Core.Ref(Silk.NET.Core.Ref ptr) -> Silk.NET.Core.Ref +static Silk.NET.Core.Ref.implicit operator Silk.NET.Core.Ref(Silk.NET.Core.NullPtr ptr) -> Silk.NET.Core.Ref +static Silk.NET.Core.Ref.implicit operator Silk.NET.Core.Ref(string! str) -> Silk.NET.Core.Ref +static Silk.NET.Core.Ref.implicit operator Silk.NET.Core.Ref(System.ReadOnlySpan span) -> Silk.NET.Core.Ref +static Silk.NET.Core.Ref.implicit operator Silk.NET.Core.Ref(System.Span span) -> Silk.NET.Core.Ref +static Silk.NET.Core.Ref.implicit operator Silk.NET.Core.Ref(T* ptr) -> Silk.NET.Core.Ref +static Silk.NET.Core.Ref.implicit operator Silk.NET.Core.Ref(T[,,]! array) -> Silk.NET.Core.Ref +static Silk.NET.Core.Ref.implicit operator Silk.NET.Core.Ref(T[,]! array) -> Silk.NET.Core.Ref +static Silk.NET.Core.Ref.implicit operator Silk.NET.Core.Ref(T[]! array) -> Silk.NET.Core.Ref +static Silk.NET.Core.Ref.implicit operator Silk.NET.Core.Ref(void* ptr) -> Silk.NET.Core.Ref +static Silk.NET.Core.Ref.operator !=(Silk.NET.Core.NullPtr lh, Silk.NET.Core.Ref rh) -> bool +static Silk.NET.Core.Ref.operator !=(Silk.NET.Core.Ref lh, Silk.NET.Core.NullPtr rh) -> bool +static Silk.NET.Core.Ref.operator !=(Silk.NET.Core.Ref lh, Silk.NET.Core.Ref rh) -> bool +static Silk.NET.Core.Ref.operator ==(Silk.NET.Core.NullPtr lh, Silk.NET.Core.Ref rh) -> bool +static Silk.NET.Core.Ref.operator ==(Silk.NET.Core.Ref lh, Silk.NET.Core.NullPtr rh) -> bool +static Silk.NET.Core.Ref.operator ==(Silk.NET.Core.Ref lh, Silk.NET.Core.Ref rh) -> bool +static Silk.NET.Core.SilkMarshal.AsRef2D(this ref Silk.NET.Core.Ref ref) -> Silk.NET.Core.Ref2D +static Silk.NET.Core.SilkMarshal.AsRef2D(this ref System.ReadOnlySpan ref) -> Silk.NET.Core.Ref2D +static Silk.NET.Core.SilkMarshal.AsRef2D(this ref System.Span ref) -> Silk.NET.Core.Ref2D +static Silk.NET.Core.SilkMarshal.AsRef(this ref T ref) -> Silk.NET.Core.Ref +static Silk.NET.Core.SilkMarshal.AsRef(this System.ReadOnlySpan ref) -> Silk.NET.Core.Ref +static Silk.NET.Core.SilkMarshal.AsRef(this System.Span ref) -> Silk.NET.Core.Ref +static Silk.NET.Core.SilkMarshal.ConstCast(TFrom value) -> TTo +static Silk.NET.Core.SilkMarshal.DelegateToPtr(T! delegate) -> Silk.NET.Core.Ptr +static Silk.NET.Core.SilkMarshal.Free(Silk.NET.Core.Ptr ptr) -> void +static Silk.NET.Core.SilkMarshal.JaggedArrayToPointerArray(System.ReadOnlySpan array) -> T*[]! +static Silk.NET.Core.SilkMarshal.JaggedArrayToPointerArray(System.ReadOnlySpan array) -> T**[]! +static Silk.NET.Core.SilkMarshal.JaggedArrayToPointerArray(System.ReadOnlySpan array) -> T***[]! +static Silk.NET.Core.SilkMarshal.NativeToArray(System.Span span, int[]! lengths) -> T[]![]! +static Silk.NET.Core.SilkMarshal.NativeToArray(System.Span span, int[]! lengths0, int[]![]! lengths1) -> T[]![]![]! +static Silk.NET.Core.SilkMarshal.NativeToString(ref byte native, nint charSize = 1) -> string? +static Silk.NET.Core.SilkMarshal.NativeToStringArray(System.ReadOnlySpan native, int[]! lengths, nint charSize = 1) -> string?[]?[]? +static Silk.NET.Core.SilkMarshal.NativeToStringArray(System.ReadOnlySpan native, int[]! lengths0, int[]! lengths1, nint charSize = 1) -> string?[]?[]?[]? +static Silk.NET.Core.SilkMarshal.NativeToStringArray(System.ReadOnlySpan native, nint charSize = 1) -> string?[]? +static Silk.NET.Core.SilkMarshal.StringArrayToArray(System.ReadOnlySpan strs, nint charSize = 1) -> byte[]? +static Silk.NET.Core.SilkMarshal.StringArrayToNative(System.ReadOnlySpan strs, nint charSize = 1) -> byte +static Silk.NET.Core.SilkMarshal.StringArrayToNative(System.ReadOnlySpan strs, nint charSize = 1) -> byte +static Silk.NET.Core.SilkMarshal.StringArrayToNative(System.ReadOnlySpan strs, nint charSize = 1) -> byte +static Silk.NET.Core.SilkMarshal.StringToArray(System.ReadOnlySpan str, nint charSize = 1) -> byte[]? +static Silk.NET.Core.SilkMarshal.StringToNative(System.ReadOnlySpan str, nint charSize = 1) -> byte +static Silk.NET.Core.Utf8String.implicit operator Silk.NET.Core.Ref(Silk.NET.Core.Utf8String str) -> Silk.NET.Core.Ref +static Silk.NET.Core.Utf8String.implicit operator Silk.NET.Core.Ref(Silk.NET.Core.Utf8String str) -> Silk.NET.Core.Ref +static Silk.NET.Core.Utf8String.implicit operator Silk.NET.Core.Ref(Silk.NET.Core.Utf8String str) -> Silk.NET.Core.Ref +static Silk.NET.Core.Utf8String.implicit operator Silk.NET.Core.Utf8String(System.ReadOnlySpan bytes) -> Silk.NET.Core.Utf8String +static Silk.NET.Core.Utf8String.implicit operator Silk.NET.Core.Utf8String(System.ReadOnlySpan bytes) -> Silk.NET.Core.Utf8String +static Silk.NET.Core.Utf8String.implicit operator string!(Silk.NET.Core.Utf8String str) -> string! +static Silk.NET.Core.Utf8String.implicit operator System.ReadOnlySpan(Silk.NET.Core.Utf8String str) -> System.ReadOnlySpan +static Silk.NET.Core.Utf8String.implicit operator System.ReadOnlySpan(Silk.NET.Core.Utf8String str) -> System.ReadOnlySpan +static Silk.NET.Core.VariantBool.IsTrue(T value) -> bool +static Silk.NET.Core.VariantBool.True() -> T diff --git a/sources/Core/Core/Silk.NET.Core.csproj b/sources/Core/Core/Silk.NET.Core.csproj index 665bf2e5c4..5ae2cd8acf 100644 --- a/sources/Core/Core/Silk.NET.Core.csproj +++ b/sources/Core/Core/Silk.NET.Core.csproj @@ -14,8 +14,17 @@ - - + + + + + + + true + + + + diff --git a/sources/Core/Core/SilkMarshal.cs b/sources/Core/Core/SilkMarshal.cs index b2680eb01a..0c73d7d7c3 100644 --- a/sources/Core/Core/SilkMarshal.cs +++ b/sources/Core/Core/SilkMarshal.cs @@ -159,6 +159,7 @@ public static ref readonly byte StringToNative(ReadOnlySpan str, nint char } } +#pragma warning disable RS0026 // 'Do not add multiple overloads with optional parameters' - Parameters differ only by span generic type, this is intended. /// /// Creates an array containing the native representation of the given string array. /// @@ -442,6 +443,7 @@ ref Unsafe.As(ref Unsafe.AsRef((byte*)native[i])), return strings; } +#pragma warning restore RS0026 /// /// Converts a byte reference to a string. @@ -540,6 +542,7 @@ public static Ref2D AsRef2D(ref this Ref @ref) public static Ref2D AsRef2D(ref this Span @ref) where T : unmanaged { +#pragma warning disable IL3050 // Problematic code removed at build time by Fody. IL.Emit.Ldarg_0(); IL.Emit.Newobj( MethodRef.Constructor( @@ -549,6 +552,7 @@ public static Ref2D AsRef2D(ref this Span @ref) ); IL.Emit.Ret(); throw IL.Unreachable(); +#pragma warning restore IL3050 } /// @@ -560,6 +564,7 @@ public static Ref2D AsRef2D(ref this Span @ref) public static Ref2D AsRef2D(ref this ReadOnlySpan @ref) where T : unmanaged { +#pragma warning disable IL3050 // Problematic code removed at build time by Fody. IL.Emit.Ldarg_0(); IL.Emit.Newobj( MethodRef.Constructor( @@ -569,6 +574,7 @@ public static Ref2D AsRef2D(ref this ReadOnlySpan @ref) ); IL.Emit.Ret(); throw IL.Unreachable(); +#pragma warning restore IL3050 } /// diff --git a/sources/Core/Silk.NET/Silk.NET.csproj b/sources/Core/Silk.NET/Silk.NET.csproj new file mode 100644 index 0000000000..043345809c --- /dev/null +++ b/sources/Core/Silk.NET/Silk.NET.csproj @@ -0,0 +1,25 @@ + + + + net8.0 + enable + enable + A package that will pull in all non-extension Silk.NET packages for every API. + You probably don't want all that, and it is strongly recommended to pull in only the packages you need instead. This package exists just to simplify project bring-up. + false + true + NU5128 + + + + + + + + + + + + + + diff --git a/sources/Maths/Maths/Silk.NET.Maths.csproj b/sources/Maths/Maths/Silk.NET.Maths.csproj index 1ee478f89d..dbfdad1475 100644 --- a/sources/Maths/Maths/Silk.NET.Maths.csproj +++ b/sources/Maths/Maths/Silk.NET.Maths.csproj @@ -11,7 +11,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/sources/SilkTouch/SilkTouch/Mods/Metadata/MetadataUtils.cs b/sources/SilkTouch/SilkTouch/Mods/Metadata/MetadataUtils.cs index ea2987084a..6c6fc06733 100644 --- a/sources/SilkTouch/SilkTouch/Mods/Metadata/MetadataUtils.cs +++ b/sources/SilkTouch/SilkTouch/Mods/Metadata/MetadataUtils.cs @@ -50,19 +50,33 @@ out int outerCount { if (cType[idx] == '[') { - outerCount = 1; do { var num = cType[(idx + 1)..]; - if (cType[(idx + 1)..].IndexOf(']') is not -1 and var j) + if (num.IndexOf(']') is not -1 and var j) { - idx++; num = num[..j]; + idx += num.Length + 2; // + 1 for [, + 1 again for ] + } + else + { + idx += num.Length; + } + + if (num.Length == 0) + { + break; + } + + // MD array bounds will be complete, so once we've encountered one array bound with a number we'll + // have a number for all of them. + if (outerCount == 0) + { + outerCount = 1; } - idx += num.Length; - outerCount *= num.Length == 0 ? 0 : int.Parse(num); - } while (cType[idx] == '['); + outerCount *= int.Parse(num); + } while (idx < cType.Length && cType[idx] == '['); idx = cType.LastIndexOf(']'); } diff --git a/sources/SilkTouch/SilkTouch/Silk.NET.SilkTouch.csproj b/sources/SilkTouch/SilkTouch/Silk.NET.SilkTouch.csproj index 2ca0306e01..5a2fb9bf78 100644 --- a/sources/SilkTouch/SilkTouch/Silk.NET.SilkTouch.csproj +++ b/sources/SilkTouch/SilkTouch/Silk.NET.SilkTouch.csproj @@ -5,28 +5,29 @@ net8.0 Exe $(NETCoreSdkRuntimeIdentifier) + true - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + diff --git a/sources/Win32/Win32/Silk.NET.Win32.csproj b/sources/Win32/Win32/Silk.NET.Win32.csproj index a68c2ee1ec..ae96d056eb 100644 --- a/sources/Win32/Win32/Silk.NET.Win32.csproj +++ b/sources/Win32/Win32/Silk.NET.Win32.csproj @@ -1,13699 +1,12 @@ - + - net7.0 + net8.0 enable enable + 1591 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - \ No newline at end of file + + diff --git a/tests/Core/Core/Silk.NET.Core.UnitTests.csproj b/tests/Core/Core/Silk.NET.Core.UnitTests.csproj index 84647158cc..8124d2a5a9 100644 --- a/tests/Core/Core/Silk.NET.Core.UnitTests.csproj +++ b/tests/Core/Core/Silk.NET.Core.UnitTests.csproj @@ -4,22 +4,8 @@ net8.0 enable enable - - false - true - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props index a40e038407..40b74d7678 100644 --- a/tests/Directory.Build.props +++ b/tests/Directory.Build.props @@ -18,10 +18,15 @@ - - - - + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/tests/Maths/Maths/Silk.NET.Maths.Tests.csproj b/tests/Maths/Maths/Silk.NET.Maths.Tests.csproj index 3120d818df..d3bdd339b1 100644 --- a/tests/Maths/Maths/Silk.NET.Maths.Tests.csproj +++ b/tests/Maths/Maths/Silk.NET.Maths.Tests.csproj @@ -2,8 +2,10 @@ net8.0 - false + true true + false + true @@ -11,13 +13,12 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - diff --git a/tests/SDL/SDL/Silk.NET.SDL.UnitTests.csproj b/tests/SDL/SDL/Silk.NET.SDL.UnitTests.csproj index b909b225eb..5d7d37aff5 100644 --- a/tests/SDL/SDL/Silk.NET.SDL.UnitTests.csproj +++ b/tests/SDL/SDL/Silk.NET.SDL.UnitTests.csproj @@ -4,22 +4,8 @@ net8.0 enable enable - - false - true - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - diff --git a/tests/SilkTouch/SilkTouch/MetadataUtilsTests.cs b/tests/SilkTouch/SilkTouch/MetadataUtilsTests.cs index 627f2cd726..35306f2018 100644 --- a/tests/SilkTouch/SilkTouch/MetadataUtilsTests.cs +++ b/tests/SilkTouch/SilkTouch/MetadataUtilsTests.cs @@ -52,8 +52,8 @@ public void GetIndirectionLevels(string type, int expectedIndirection) => TestCase("int**", 2, new[] { true, true, true }, 0), TestCase("int** const*", 3, new[] { true, false, true, true }, 0), TestCase("int** const*[16]", 4, new[] { true, true, false, true, true }, 16), - TestCase("int** const* a[16]", 4, new[] { true, true, false, true, true }, 0), - TestCase("int** const* a[2][8]", 4, new[] { true, true, false, true, true }, 0), + TestCase("int** const* a[16]", 4, new[] { true, true, false, true, true }, 16), + TestCase("int** const* a[2][8]", 4, new[] { true, true, false, true, true }, 16), TestCase("int a", 0, new[] { true }, 0) ] public void GetMutability( @@ -65,7 +65,10 @@ int expectedOuterCount { var mutability = new bool[indirection + 1]; MetadataUtils.GetTypeDetails(type, mutability, out var outerCount); - Assert.That(outerCount, Is.EqualTo(outerCount)); - Assert.That(mutability, Is.EquivalentTo(expectedMutability)); + Assert.Multiple(() => + { + Assert.That(outerCount, Is.EqualTo(expectedOuterCount)); + Assert.That(mutability, Is.EquivalentTo(expectedMutability)); + }); } } diff --git a/tests/SilkTouch/SilkTouch/Silk.NET.SilkTouch.UnitTests.csproj b/tests/SilkTouch/SilkTouch/Silk.NET.SilkTouch.UnitTests.csproj index 47a1620581..a0d8b0a586 100644 --- a/tests/SilkTouch/SilkTouch/Silk.NET.SilkTouch.UnitTests.csproj +++ b/tests/SilkTouch/SilkTouch/Silk.NET.SilkTouch.UnitTests.csproj @@ -11,11 +11,10 @@ - - - - - + + + +