Skip to content

Commit 917e61d

Browse files
committed
Merge branch 'master' of github.com:opentk/opentk into PR-1755-sign-assemblies
2 parents fafe094 + d9d9c0a commit 917e61d

File tree

53 files changed

+27364
-10265
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+27364
-10265
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"paket": {
6-
"version": "7.2.0",
6+
"version": "9.0.2",
77
"commands": [
88
"paket"
99
]

build/build.fs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,11 +333,13 @@ open Fake.Core.TargetOperators
333333
==> "CreateMetaPackage"
334334
==> "ReleaseOnNuGet"
335335
==> "ReleaseOnGithub"
336-
==> "ReleaseOnAll"
336+
==> "ReleaseOnAll"
337+
|> ignore
337338

338339
// We build the nuget package so that appvayor can get the artifacts
339340
"CreateMetaPackage"
340341
==> "RunCITests"
342+
|> ignore
341343

342344
//"Build"
343345

build/build.fsproj

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,29 @@
1010
</ItemGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="Fake.Api.GitHub" Version="6.0.0" />
14-
<PackageReference Include="Fake.Core.Environment" Version="6.0.0" />
15-
<PackageReference Include="Fake.Core.ReleaseNotes" Version="6.0.0" />
16-
<PackageReference Include="Fake.Core.Target" Version="6.0.0" />
17-
<PackageReference Include="Fake.DotNet.AssemblyInfoFile" Version="6.0.0" />
18-
<PackageReference Include="Fake.DotNet.Cli" Version="6.0.0" />
19-
<PackageReference Include="Fake.DotNet.NuGet" Version="6.0.0" />
20-
<PackageReference Include="Fake.DotNet.Paket" Version="6.0.0" />
21-
<PackageReference Include="Fake.IO.FileSystem" Version="6.0.0" />
22-
<PackageReference Include="Fake.Tools.Git" Version="6.0.0" />
13+
<PackageReference Include="Fake.Api.GitHub" Version="6.1.3" />
14+
<PackageReference Include="Fake.Core.Environment" Version="6.1.3" />
15+
<PackageReference Include="Fake.Core.ReleaseNotes" Version="6.1.3" />
16+
<PackageReference Include="Fake.Core.Target" Version="6.1.3" />
17+
<PackageReference Include="Fake.DotNet.AssemblyInfoFile" Version="6.1.3" />
18+
<PackageReference Include="Fake.DotNet.Cli" Version="6.1.3" />
19+
<PackageReference Include="Fake.DotNet.NuGet" Version="6.1.3" />
20+
<PackageReference Include="Fake.DotNet.Paket" Version="6.1.3" />
21+
<PackageReference Include="Fake.IO.FileSystem" Version="6.1.3" />
22+
<PackageReference Include="Fake.Tools.Git" Version="6.1.3" />
2323

2424
<!-- So that Fake.DotNet.Nuget.Nuget command can find nuget.exe, but because the nuget dependencies are -->
2525
<!-- downloaded into a shared cache of nuget packages we actually don't get a nuget.exe in our project -->
2626
<!-- so we must later copy the nuget.exe out from this package into our own. -->
2727
<!-- This was not needed when we ran our build using an .fsx file using paket to download dependencies as -->
2828
<!-- paket downloaded these dependencies into a project local folder. -->
29-
<PackageReference Include="NuGet.CommandLine" Version="6.7.1" GeneratePathProperty="true">
29+
<PackageReference Include="NuGet.CommandLine" Version="6.12.1" GeneratePathProperty="true">
3030
<PrivateAssets>all</PrivateAssets>
3131
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3232
</PackageReference>
3333

3434
<!-- See https://github.com/fsprojects/FAKE/issues/2748 -->
35-
<PackageReference Include="MSBuild.StructuredLogger" Version="2.1.858" />
35+
<PackageReference Include="MSBuild.StructuredLogger" Version="2.2.386" />
3636
<!-- See https://github.com/fsprojects/FAKE/issues/2722 -->
3737
<!-- 17.3.2 is the last .net6.0 version of the package -->
3838
<PackageReference Include="Microsoft.Build" Version="17.3.2" />

src/Generator.Bind/ES/ES2Generator.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ public ES2Generator(Settings settings) : base(settings)
2020
Settings.DefaultDocPath, "ES20");
2121

2222
Settings.OverridesFiles.Add("GL2/overrides.xml");
23+
Settings.OverridesFiles.Add("GL2/compatibility 4.8.2.xml");
2324

2425
Profile = "gles2";
2526
Version = "2.0";
2627

2728
// For compatibility with OpenTK 1.0 and Xamarin, generate
2829
// overloads using the "All" enum in addition to strongly-typed enums.
2930
// This can be disabled by passing "-o:-keep_untyped_enums" as a cmdline parameter.
30-
Settings.DefaultCompatibility |= Settings.Legacy.KeepUntypedEnums;
31+
//Settings.DefaultCompatibility |= Settings.Legacy.KeepUntypedEnums;
3132
//Settings.DefaultCompatibility |= Settings.Legacy.UseDllImports;
3233
}
3334
}

src/Generator.Bind/ES/ES31Generator.cs

Lines changed: 0 additions & 35 deletions
This file was deleted.

src/Generator.Bind/ES/ES3Generator.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ public ES3Generator(Settings settings) : base(settings)
2020
Settings.DefaultDocPath, "ES30");
2121

2222
Settings.OverridesFiles.Add("GL2/overrides.xml");
23+
Settings.OverridesFiles.Add("GL2/compatibility 4.8.2.xml");
2324

2425
Profile = "gles2"; // The 3.0 spec reuses the gles2 apiname
25-
Version = "2.0|3.0";
26+
Version = "2.0|3.0|3.1|3.2";
2627

2728
// For compatibility with OpenTK 1.0 and Xamarin, generate
2829
// overloads using the "All" enum in addition to strongly-typed enums.
2930
// This can be disabled by passing "-o:-keep_untyped_enums" as a cmdline parameter.
30-
Settings.DefaultCompatibility |= Settings.Legacy.KeepUntypedEnums;
31+
//Settings.DefaultCompatibility |= Settings.Legacy.KeepUntypedEnums;
3132
//Settings.DefaultCompatibility |= Settings.Legacy.UseDllImports;
3233
}
3334
}

src/Generator.Bind/ES/ESGenerator.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public ESGenerator(Settings settings) : base(settings)
2121

2222
Settings.OverridesFiles.Add("GL2/overrides.xml");
2323
Settings.OverridesFiles.Add("GL2/ES/1.1/");
24+
Settings.OverridesFiles.Add("GL2/compatibility 4.8.2.xml");
2425

2526
// Khronos releases a combined 1.0+1.1 specification,
2627
// so we cannot distinguish between the two.
@@ -31,7 +32,7 @@ public ESGenerator(Settings settings) : base(settings)
3132
// For compatibility with OpenTK 1.0 and Xamarin, generate
3233
// overloads using the "All" enum in addition to strongly-typed enums.
3334
// This can be disabled by passing "-o:-keep_untyped_enums" as a cmdline parameter.
34-
Settings.DefaultCompatibility |= Settings.Legacy.KeepUntypedEnums;
35+
//Settings.DefaultCompatibility |= Settings.Legacy.KeepUntypedEnums;
3536
//Settings.DefaultCompatibility |= Settings.Legacy.UseDllImports;
3637
}
3738
}

src/Generator.Bind/FuncProcessor.cs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,13 @@ private static void ApplyParameterReplacement(Delegate d, XPathNavigator functio
527527
switch (node.Name)
528528
{
529529
case "type":
530-
d.Parameters[i].CurrentType = (string)node.TypedValue;
530+
string type = (string)node.TypedValue;
531+
// If the replacement type has a pointer we replace the entire type
532+
// if the type doesn't we just replace the underlying type of the pointer.
533+
// - 2024-03-26 Noggin_bops
534+
if (type.Contains("*"))
535+
d.Parameters[i].Pointer = 0;
536+
d.Parameters[i].CurrentType = type;
531537
break;
532538
case "name":
533539
d.Parameters[i].Name = (string)node.TypedValue;
@@ -561,7 +567,19 @@ private static void ApplyReturnTypeReplacement(Delegate d, XPathNavigator functi
561567
XPathNavigator return_override = function_override.SelectSingleNode("returns");
562568
if (return_override != null)
563569
{
570+
// If the replacement type has a pointer we replace the entire type
571+
// if the type doesn't we just replace the underlying type of the pointer.
572+
// - 2024-03-26 Noggin_bops
573+
if (return_override.Value.Contains("*"))
574+
d.ReturnType.Pointer = 0;
564575
d.ReturnType.CurrentType = return_override.Value;
576+
577+
// If we replaced something with String we want to remove the pointer from the return type.
578+
// - 2024-03-24 Noggin_bops
579+
if (return_override.Value == "String")
580+
{
581+
d.ReturnType.Pointer--;
582+
}
565583
}
566584
}
567585
}

src/Generator.Bind/GL2/GL2Generator.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public GL2Generator(Settings settings) : base(settings)
5151

5252
Settings.OverridesFiles.Add("GL2/overrides.xml");
5353
Settings.OverridesFiles.Add("GL2/GL/");
54+
Settings.OverridesFiles.Add("GL2/compatibility 4.8.2.xml");
5455

5556
//Settings.DefaultCompatibility |=
5657
// Settings.Legacy.UseDllImports | Settings.Legacy.UseWindowsCompatibleGL;

src/Generator.Bind/GL2/GL4Generator.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public GL4Generator(Settings settings) : base(settings)
4343

4444
Settings.OverridesFiles.Add("GL2/overrides.xml");
4545
Settings.OverridesFiles.Add("GL2/GL/");
46+
Settings.OverridesFiles.Add("GL2/compatibility 4.8.2.xml");
4647

4748
Profile = "glcore";
4849

0 commit comments

Comments
 (0)