diff --git a/README.md b/README.md index da67882c..7751c4f3 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,14 @@ cd opentk # Enter the source directory News ==== +### 2017-05-08 + +A pre-release package is available. + +https://www.nuget.org/packages/OpenTK/3.0.0-pre + +https://www.nuget.org/packages/OpenTK.GLControl/3.0.0-pre + ### 2016-09-23 OpenTK 2.0.0 is now available for download from [Nuget](https://www.nuget.org/packages/OpenTK/2.0.0). diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 5b9f46fb..bee0c9ab 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,4 +1,21 @@ -### 2.0.0 - alpha +### 3.0.0-pre + * Replaced JoystickButton enum with simple long. (breaking API change) + * Increase available joystick buttons to 64. + * Add support for OpenGL ES3 through Angle + DIrect3D. + * Fix 2 crashes on android + * Move to built-in System.Diagnostics.Debug for Android + iOS + * Fix for certain joysticks returning invalid HID pages. + * Fix for certain joysticks with negative axis range being inverted. + * Fix Xbox controller D-pad on windows + * Fix joystick hat position sticking on Linux + * Enhance xbox button detection to include GUIDE button. + * Fix iOS GL bindings issue introduced by 2ea8334 + * Fix crash on setting time to <= 0 for iOS + Android. + * Several minor XML documentation fixes and enhancements + * Fix for angle backbuffer size issue on window resize + * Possible fix for broken GLControl package. + +### 2.0.0 * Moved to new FAKE/Paket based build system * Removed superfluous release configurations * Numerous other fixes and enhancements diff --git a/paket.dependencies b/paket.dependencies index 1df3fa40..04eab810 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -8,5 +8,5 @@ nuget FsCheck.Xunit nuget xunit.runner.console nuget xunit.assert nuget FAKE -nuget Mono.Cecil -nuget GtkSharp \ No newline at end of file +nuget Mono.Cecil >= 0.10.0-beta1 +nuget GtkSharp diff --git a/paket.lock b/paket.lock index 8fcfa088..cf9d232f 100644 --- a/paket.lock +++ b/paket.lock @@ -1,27 +1,64 @@ NUGET remote: https://www.nuget.org/api/v2 - FAKE (4.28) - FsCheck (2.8) - FSharp.Core (>= 3.1.2.5) - FsCheck.Xunit (2.8) - FsCheck (>= 2.8) - xunit.extensibility.execution (>= 2.2 < 3.0) + FAKE (4.61.2) + FsCheck (2.9) + FSharp.Core (>= 4.1) - framework: >= net10, netstandard10, netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 + FSharp.Core (>= 4.1.17) - framework: >= netstandard16 + NETStandard.Library (>= 1.6.1) - framework: >= netstandard16 + FsCheck.Xunit (2.9) + FsCheck (>= 2.9) + FSharp.Core (>= 4.1.17) - framework: >= netstandard16 + NETStandard.Library (>= 1.6.1) - framework: >= netstandard16 + xunit.abstractions (>= 2.0.1) - framework: >= netstandard16 + xunit.core (>= 2.2) - framework: >= netstandard16 + xunit.extensibility.execution (>= 2.2 < 3.0) - framework: >= net10, netstandard10, netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 FSharp.Compiler.Service (2.0.0.6) - FSharp.Core (4.0.0.1) + FSharp.Core (4.1.17) - framework: >= net10, >= netstandard10 + System.Collections (>= 4.0.11) - framework: >= netstandard16 + System.Console (>= 4.0) - framework: >= netstandard16 + System.Diagnostics.Debug (>= 4.0.11) - framework: >= netstandard16 + System.Diagnostics.Tools (>= 4.0.1) - framework: >= netstandard16 + System.Globalization (>= 4.0.11) - framework: >= netstandard16 + System.IO (>= 4.1) - framework: >= netstandard16 + System.Linq (>= 4.1) - framework: >= netstandard16 + System.Linq.Expressions (>= 4.1) - framework: >= netstandard16 + System.Linq.Queryable (>= 4.0.1) - framework: >= netstandard16 + System.Net.Requests (>= 4.0.11) - framework: >= netstandard16 + System.Reflection (>= 4.1) - framework: >= netstandard16 + System.Reflection.Extensions (>= 4.0.1) - framework: >= netstandard16 + System.Resources.ResourceManager (>= 4.0.1) - framework: >= netstandard16 + System.Runtime (>= 4.1) - framework: >= netstandard16 + System.Runtime.Extensions (>= 4.1) - framework: >= netstandard16 + System.Runtime.Numerics (>= 4.0.1) - framework: >= netstandard16 + System.Text.RegularExpressions (>= 4.1) - framework: >= netstandard16 + System.Threading (>= 4.0.11) - framework: >= netstandard16 + System.Threading.Tasks (>= 4.0.11) - framework: >= netstandard16 + System.Threading.Tasks.Parallel (>= 4.0.1) - framework: >= netstandard16 + System.Threading.Thread (>= 4.0) - framework: >= netstandard16 + System.Threading.ThreadPool (>= 4.0.10) - framework: >= netstandard16 + System.Threading.Timer (>= 4.0.1) - framework: >= netstandard16 FSharp.Formatting (2.14.4) FSharp.Compiler.Service (2.0.0.6) FSharpVSPowerTools.Core (>= 2.3 < 2.4) FSharpVSPowerTools.Core (2.3) FSharp.Compiler.Service (>= 2.0.0.3) GtkSharp (3.1.3) - Microsoft.NETCore.Platforms (1.1) - framework: >= net452, dnxcore50, >= netstandard11, netstandard12, netstandard13, netstandard14 - Microsoft.NETCore.Targets (1.1) - framework: >= net452, dnxcore50, >= netstandard11, netstandard12, netstandard13, netstandard14 - Microsoft.Win32.Primitives (4.3) - framework: >= net452, >= netstandard13 + Microsoft.NETCore.Platforms (1.1) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 + Microsoft.NETCore.Targets (1.1) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 + Microsoft.Win32.Primitives (4.3) - framework: >= net10, >= netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: >= netstandard13 Microsoft.NETCore.Targets (>= 1.1) - framework: >= netstandard13 System.Runtime (>= 4.3) - framework: >= netstandard13 - Mono.Cecil (0.9.6.1) - NETStandard.Library (1.6.1) - framework: >= net452, >= netstandard11 + Mono.Cecil (0.10.0-beta6) + System.Collections (>= 4.0.11) - framework: >= netstandard13 + System.IO.FileSystem (>= 4.0.1) - framework: >= netstandard13 + System.IO.FileSystem.Primitives (>= 4.0.1) - framework: >= netstandard13 + System.Reflection (>= 4.1) - framework: >= netstandard13 + System.Runtime.Extensions (>= 4.1) - framework: >= netstandard13 + System.Security.Cryptography.Algorithms (>= 4.2) - framework: >= netstandard13 + System.Security.Cryptography.Csp (>= 4.0) - framework: >= netstandard13 + System.Threading (>= 4.0.11) - framework: >= netstandard13 + NETStandard.Library (1.6.1) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: >= netstandard10 Microsoft.Win32.Primitives (>= 4.3) - framework: >= net46, >= netstandard13 System.AppContext (>= 4.3) - framework: >= net46, >= netstandard13 @@ -66,52 +103,52 @@ NUGET System.Threading.Timer (>= 4.3) - framework: >= net451, >= netstandard12 System.Xml.ReaderWriter (>= 4.3) - framework: >= netstandard10 System.Xml.XDocument (>= 4.3) - framework: >= netstandard10 - runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3) - framework: >= net452, >= netstandard13, netstandard14 - runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3) - framework: >= net452, >= netstandard13, netstandard14 - runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3) - framework: >= net452, >= netstandard13, netstandard14 - runtime.native.System (4.3) - framework: >= net452, >= netstandard11 + runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.1) - framework: >= net10, >= netstandard13, netstandard14, netstandard15 + runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.1) - framework: >= net10, >= netstandard13, netstandard14, netstandard15 + runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.1) - framework: >= net10, >= netstandard13, netstandard14, netstandard15 + runtime.native.System (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) - runtime.native.System.IO.Compression (4.3) - framework: >= net452, >= netstandard13 + runtime.native.System.IO.Compression (4.3) - framework: >= net10, >= netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) - runtime.native.System.Net.Http (4.3) - framework: >= net452, >= netstandard16 + runtime.native.System.Net.Http (4.3) - framework: >= net10, >= netstandard16 Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) - runtime.native.System.Security.Cryptography.Apple (4.3) - framework: >= net452, >= netstandard16 + runtime.native.System.Security.Cryptography.Apple (4.3) - framework: >= net10, >= netstandard16 runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple (>= 4.3) - runtime.native.System.Security.Cryptography.OpenSsl (4.3) - framework: >= net452, >= netstandard13, netstandard14 - runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) - runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) - runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) - runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) - runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) - runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) - runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) - runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) - runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) - runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) - runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3) - framework: >= net452, >= netstandard13, netstandard14 - runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3) - framework: >= net452, >= netstandard13, netstandard14 - runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple (4.3) - framework: >= net452, >= netstandard16 - runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3) - framework: >= net452, >= netstandard13, netstandard14 - runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3) - framework: >= net452, >= netstandard13, netstandard14 - runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3) - framework: >= net452, >= netstandard13, netstandard14 - runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3) - framework: >= net452, >= netstandard13, netstandard14 - runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3) - framework: >= net452, >= netstandard13, netstandard14 - System.AppContext (4.3) - framework: >= net46, >= netstandard13 + runtime.native.System.Security.Cryptography.OpenSsl (4.3.1) - framework: >= net10, >= netstandard13, netstandard14, netstandard15 + runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.1) + runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.1) + runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.1) + runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.1) + runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.1) + runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.1) + runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.1) + runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.1) + runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.1) + runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.1) + runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.1) - framework: >= net10, >= netstandard13, netstandard14, netstandard15 + runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.1) - framework: >= net10, >= netstandard13, netstandard14, netstandard15 + runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple (4.3) - framework: >= net10, >= netstandard16 + runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.1) - framework: >= net10, >= netstandard13, netstandard14, netstandard15 + runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.1) - framework: >= net10, >= netstandard13, netstandard14, netstandard15 + runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.1) - framework: >= net10, >= netstandard13, netstandard14, netstandard15 + runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.1) - framework: >= net10, >= netstandard13, netstandard14, netstandard15 + runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.1) - framework: >= net10, >= netstandard13, netstandard14, netstandard15 + System.AppContext (4.3) - framework: >= net46, >= netstandard13, netstandard14, netstandard15 System.Runtime (>= 4.3) - framework: dnxcore50, netstandard13, >= netstandard16 - System.Buffers (4.3) - framework: >= net452, >= netstandard13 + System.Buffers (4.3) - framework: >= net10, >= netstandard13, netstandard14, netstandard15 System.Diagnostics.Debug (>= 4.3) - framework: >= netstandard11 System.Diagnostics.Tracing (>= 4.3) - framework: >= netstandard11 System.Resources.ResourceManager (>= 4.3) - framework: >= netstandard11 System.Runtime (>= 4.3) - framework: >= netstandard11 System.Threading (>= 4.3) - framework: >= netstandard11 - System.Collections (4.3) - framework: >= net452, dnxcore50, >= netstandard11, netstandard13, netstandard14 + System.Collections (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: dnxcore50, netstandard10, >= netstandard13 Microsoft.NETCore.Targets (>= 1.1) - framework: dnxcore50, netstandard10, >= netstandard13 System.Runtime (>= 4.3) - framework: dnxcore50, netstandard10, >= netstandard13 - System.Collections.Concurrent (4.3) - framework: >= net452, >= netstandard11, netstandard14 + System.Collections.Concurrent (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 System.Collections (>= 4.3) - framework: dnxcore50, >= netstandard13 System.Diagnostics.Debug (>= 4.3) - framework: dnxcore50, >= netstandard13 System.Diagnostics.Tracing (>= 4.3) - framework: dnxcore50, >= netstandard13 @@ -122,55 +159,53 @@ NUGET System.Runtime.Extensions (>= 4.3) - framework: dnxcore50, >= netstandard13 System.Threading (>= 4.3) - framework: dnxcore50, >= netstandard13 System.Threading.Tasks (>= 4.3) - framework: dnxcore50, netstandard11, >= netstandard13 - System.Console (4.3) - framework: >= net46, >= netstandard13 + System.Console (4.3) - framework: >= net10, >= netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: >= netstandard13 Microsoft.NETCore.Targets (>= 1.1) - framework: >= netstandard13 System.IO (>= 4.3) - framework: >= netstandard13 System.Runtime (>= 4.3) - framework: >= netstandard13 System.Text.Encoding (>= 4.3) - framework: >= netstandard13 - System.Diagnostics.Contracts (4.3) - framework: dnxcore50 - System.Runtime (>= 4.3) - framework: dnxcore50, >= netstandard10 - System.Diagnostics.Debug (4.3) - framework: >= net452, dnxcore50, >= netstandard11, netstandard13, netstandard14 + System.Diagnostics.Debug (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: dnxcore50, netstandard10, >= netstandard13 Microsoft.NETCore.Targets (>= 1.1) - framework: dnxcore50, netstandard10, >= netstandard13 System.Runtime (>= 4.3) - framework: dnxcore50, netstandard10, >= netstandard13 - System.Diagnostics.DiagnosticSource (4.3) - framework: >= net452, netstandard13, >= netstandard16 + System.Diagnostics.DiagnosticSource (4.3.1) - framework: >= net10, netstandard13, >= netstandard16 System.Collections (>= 4.3) - framework: netstandard11, >= netstandard13 System.Diagnostics.Tracing (>= 4.3) - framework: netstandard11, >= netstandard13 System.Reflection (>= 4.3) - framework: netstandard11, >= netstandard13 System.Runtime (>= 4.3) - framework: netstandard11, >= netstandard13 System.Threading (>= 4.3) - framework: netstandard11, >= netstandard13 - System.Diagnostics.Tools (4.3) - framework: >= net452, >= netstandard11 + System.Diagnostics.Tools (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: dnxcore50, >= netstandard10 Microsoft.NETCore.Targets (>= 1.1) - framework: dnxcore50, >= netstandard10 System.Runtime (>= 4.3) - framework: dnxcore50, >= netstandard10 - System.Diagnostics.Tracing (4.3) - framework: >= net452, >= netstandard11, netstandard13, netstandard14 + System.Diagnostics.Tracing (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: dnxcore50, netstandard11, netstandard12, netstandard13, >= netstandard15 Microsoft.NETCore.Targets (>= 1.1) - framework: dnxcore50, netstandard11, netstandard12, netstandard13, >= netstandard15 System.Runtime (>= 4.3) - framework: dnxcore50, netstandard11, netstandard12, netstandard13, >= netstandard15 - System.Globalization (4.3) - framework: >= net452, dnxcore50, >= netstandard11, netstandard13, netstandard14 + System.Globalization (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: dnxcore50, netstandard10, >= netstandard13 Microsoft.NETCore.Targets (>= 1.1) - framework: dnxcore50, netstandard10, >= netstandard13 System.Runtime (>= 4.3) - framework: dnxcore50, netstandard10, >= netstandard13 - System.Globalization.Calendars (4.3) - framework: >= net46, >= netstandard13 + System.Globalization.Calendars (4.3) - framework: >= net46, >= netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: >= netstandard13 Microsoft.NETCore.Targets (>= 1.1) - framework: >= netstandard13 System.Globalization (>= 4.3) - framework: >= netstandard13 System.Runtime (>= 4.3) - framework: >= netstandard13 - System.Globalization.Extensions (4.3) - framework: >= net452, >= netstandard16 + System.Globalization.Extensions (4.3) - framework: >= net10, >= netstandard16 Microsoft.NETCore.Platforms (>= 1.1) - framework: >= netstandard13 System.Globalization (>= 4.3) - framework: >= netstandard13 System.Resources.ResourceManager (>= 4.3) - framework: >= netstandard13 System.Runtime (>= 4.3) - framework: >= netstandard13 System.Runtime.Extensions (>= 4.3) - framework: >= netstandard13 System.Runtime.InteropServices (>= 4.3) - framework: >= netstandard13 - System.IO (4.3) - framework: >= net452, dnxcore50, >= netstandard11, netstandard13, netstandard14 + System.IO (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard15 Microsoft.NETCore.Targets (>= 1.1) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard15 System.Runtime (>= 4.3) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard15 System.Text.Encoding (>= 4.3) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard15 System.Threading.Tasks (>= 4.3) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard15 - System.IO.Compression (4.3) - framework: >= net452, >= netstandard11, netstandard13 + System.IO.Compression (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: >= netstandard13 runtime.native.System (>= 4.3) - framework: >= netstandard13 runtime.native.System.IO.Compression (>= 4.3) - framework: dnxcore50, >= netstandard13 @@ -186,7 +221,7 @@ NUGET System.Text.Encoding (>= 4.3) - framework: dnxcore50, netstandard11, >= netstandard13 System.Threading (>= 4.3) - framework: dnxcore50, >= netstandard13 System.Threading.Tasks (>= 4.3) - framework: dnxcore50, >= netstandard13 - System.IO.Compression.ZipFile (4.3) - framework: >= net46, >= netstandard13 + System.IO.Compression.ZipFile (4.3) - framework: >= net46, >= netstandard13, netstandard14, netstandard15 System.Buffers (>= 4.3) - framework: >= netstandard13 System.IO (>= 4.3) - framework: >= netstandard13 System.IO.Compression (>= 4.3) - framework: >= netstandard13 @@ -196,7 +231,7 @@ NUGET System.Runtime (>= 4.3) - framework: >= netstandard13 System.Runtime.Extensions (>= 4.3) - framework: >= netstandard13 System.Text.Encoding (>= 4.3) - framework: >= netstandard13 - System.IO.FileSystem (4.3) - framework: >= net452, >= netstandard13 + System.IO.FileSystem (4.3) - framework: >= net10, >= netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: >= netstandard13 Microsoft.NETCore.Targets (>= 1.1) - framework: >= netstandard13 System.IO (>= 4.3) - framework: >= netstandard13 @@ -205,15 +240,15 @@ NUGET System.Runtime.Handles (>= 4.3) - framework: >= netstandard13 System.Text.Encoding (>= 4.3) - framework: >= netstandard13 System.Threading.Tasks (>= 4.3) - framework: >= netstandard13 - System.IO.FileSystem.Primitives (4.3) - framework: >= net452, >= netstandard13 + System.IO.FileSystem.Primitives (4.3) - framework: >= net10, >= netstandard13, netstandard14, netstandard15 System.Runtime (>= 4.3) - framework: >= netstandard13 - System.Linq (4.3) - framework: >= net452, dnxcore50, >= netstandard11, netstandard14 + System.Linq (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 System.Collections (>= 4.3) - framework: dnxcore50, netstandard10, >= netstandard16 System.Diagnostics.Debug (>= 4.3) - framework: dnxcore50, >= netstandard16 System.Resources.ResourceManager (>= 4.3) - framework: dnxcore50, >= netstandard16 System.Runtime (>= 4.3) - framework: dnxcore50, netstandard10, >= netstandard16 System.Runtime.Extensions (>= 4.3) - framework: dnxcore50, >= netstandard16 - System.Linq.Expressions (4.3) - framework: >= net452, >= netstandard11 + System.Linq.Expressions (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 System.Collections (>= 4.3) - framework: dnxcore50, >= netstandard16 System.Diagnostics.Debug (>= 4.3) - framework: dnxcore50, >= netstandard16 System.Globalization (>= 4.3) - framework: dnxcore50, >= netstandard16 @@ -231,7 +266,16 @@ NUGET System.Runtime (>= 4.3) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard16 System.Runtime.Extensions (>= 4.3) - framework: dnxcore50, >= netstandard16 System.Threading (>= 4.3) - framework: dnxcore50, >= netstandard16 - System.Net.Http (4.3.1) - framework: >= net452, >= netstandard11 + System.Linq.Queryable (4.3) - framework: >= net10, >= netstandard16 + System.Collections (>= 4.3) - framework: dnxcore50, >= netstandard13 + System.Diagnostics.Debug (>= 4.3) - framework: dnxcore50, >= netstandard13 + System.Linq (>= 4.3) - framework: dnxcore50, netstandard10, >= netstandard13 + System.Linq.Expressions (>= 4.3) - framework: dnxcore50, netstandard10, >= netstandard13 + System.Reflection (>= 4.3) - framework: dnxcore50, >= netstandard13 + System.Reflection.Extensions (>= 4.3) - framework: dnxcore50, >= netstandard13 + System.Resources.ResourceManager (>= 4.3) - framework: dnxcore50, >= netstandard13 + System.Runtime (>= 4.3) - framework: dnxcore50, netstandard10, >= netstandard13 + System.Net.Http (4.3.2) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: dnxcore50, netstandard13, >= netstandard16 Microsoft.Win32.Primitives (>= 4.3) - framework: netstandard13 runtime.native.System (>= 4.3) - framework: >= netstandard16 @@ -253,95 +297,108 @@ NUGET System.Runtime.Handles (>= 4.3) - framework: netstandard13, >= netstandard16 System.Runtime.InteropServices (>= 4.3) - framework: dnxcore50, netstandard13, >= netstandard16 System.Security.Cryptography.Algorithms (>= 4.3) - framework: >= netstandard16 - System.Security.Cryptography.Encoding (>= 4.3) - framework: >= netstandard16 + System.Security.Cryptography.Encoding (>= 4.3) - framework: netstandard13, >= netstandard16 System.Security.Cryptography.OpenSsl (>= 4.3) - framework: >= netstandard16 System.Security.Cryptography.Primitives (>= 4.3) - framework: >= netstandard16 System.Security.Cryptography.X509Certificates (>= 4.3) - framework: >= net46, dnxcore50, netstandard13, >= netstandard16 System.Text.Encoding (>= 4.3) - framework: dnxcore50, netstandard11, netstandard13, >= netstandard16 System.Threading (>= 4.3) - framework: dnxcore50, netstandard13, >= netstandard16 System.Threading.Tasks (>= 4.3) - framework: dnxcore50, netstandard11, netstandard13, >= netstandard16 - System.Net.Primitives (4.3) - framework: >= net452, >= netstandard11, netstandard13 + System.Net.Primitives (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: dnxcore50, netstandard10, netstandard11, >= netstandard13 Microsoft.NETCore.Targets (>= 1.1) - framework: dnxcore50, netstandard10, netstandard11, >= netstandard13 System.Runtime (>= 4.3) - framework: dnxcore50, netstandard10, netstandard11, >= netstandard13 System.Runtime.Handles (>= 4.3) - framework: dnxcore50, >= netstandard13 - System.Net.Sockets (4.3) - framework: >= net46, >= netstandard13 + System.Net.Requests (4.3) - framework: >= net10, >= netstandard16 + Microsoft.NETCore.Platforms (>= 1.1) - framework: >= netstandard13 + System.Collections (>= 4.3) - framework: dnxcore50, >= netstandard13 + System.Diagnostics.Debug (>= 4.3) - framework: dnxcore50, >= netstandard13 + System.Diagnostics.Tracing (>= 4.3) - framework: dnxcore50, >= netstandard13 + System.Globalization (>= 4.3) - framework: dnxcore50, >= netstandard13 + System.IO (>= 4.3) - framework: dnxcore50, netstandard10, netstandard11, >= netstandard13 + System.Net.Http (>= 4.3) - framework: dnxcore50, >= netstandard13 + System.Net.Primitives (>= 4.3) - framework: dnxcore50, netstandard10, netstandard11, >= netstandard13 + System.Net.WebHeaderCollection (>= 4.3) - framework: dnxcore50, >= netstandard13 + System.Resources.ResourceManager (>= 4.3) - framework: dnxcore50, >= netstandard13 + System.Runtime (>= 4.3) - framework: dnxcore50, netstandard10, netstandard11, >= netstandard13 + System.Threading (>= 4.3) - framework: dnxcore50, >= netstandard13 + System.Threading.Tasks (>= 4.3) - framework: dnxcore50, netstandard11, >= netstandard13 + System.Net.Sockets (4.3) - framework: >= net46, >= netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: >= netstandard13 Microsoft.NETCore.Targets (>= 1.1) - framework: >= netstandard13 System.IO (>= 4.3) - framework: >= netstandard13 System.Net.Primitives (>= 4.3) - framework: >= netstandard13 System.Runtime (>= 4.3) - framework: >= netstandard13 System.Threading.Tasks (>= 4.3) - framework: >= netstandard13 - System.ObjectModel (4.3) - framework: >= net452, dnxcore50, >= netstandard11 + System.Net.WebHeaderCollection (4.3) - framework: >= net10, >= netstandard16 + System.Collections (>= 4.3) - framework: >= netstandard13 + System.Resources.ResourceManager (>= 4.3) - framework: >= netstandard13 + System.Runtime (>= 4.3) - framework: >= netstandard13 + System.Runtime.Extensions (>= 4.3) - framework: >= netstandard13 + System.ObjectModel (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 System.Collections (>= 4.3) - framework: dnxcore50, >= netstandard13 System.Diagnostics.Debug (>= 4.3) - framework: dnxcore50, >= netstandard13 System.Resources.ResourceManager (>= 4.3) - framework: dnxcore50, >= netstandard13 System.Runtime (>= 4.3) - framework: dnxcore50, netstandard10, >= netstandard13 System.Threading (>= 4.3) - framework: dnxcore50, >= netstandard13 - System.Reflection (4.3) - framework: >= net452, dnxcore50, >= netstandard11, netstandard12, netstandard13, netstandard14 + System.Reflection (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard15 Microsoft.NETCore.Targets (>= 1.1) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard15 System.IO (>= 4.3) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard15 System.Reflection.Primitives (>= 4.3) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard15 System.Runtime (>= 4.3) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard15 - System.Reflection.Emit (4.3) - framework: >= net452, >= netstandard16 + System.Reflection.Emit (4.3) - framework: >= net10, >= netstandard16 System.IO (>= 4.3) - framework: >= netstandard11 System.Reflection (>= 4.3) - framework: >= netstandard11 System.Reflection.Emit.ILGeneration (>= 4.3) - framework: >= netstandard11 System.Reflection.Primitives (>= 4.3) - framework: >= netstandard11 System.Runtime (>= 4.3) - framework: >= netstandard11 - System.Reflection.Emit.ILGeneration (4.3) - framework: >= net452, >= netstandard16 + System.Reflection.Emit.ILGeneration (4.3) - framework: >= net10, >= netstandard16 System.Reflection (>= 4.3) - framework: >= netstandard10 System.Reflection.Primitives (>= 4.3) - framework: >= netstandard10 System.Runtime (>= 4.3) - framework: >= netstandard10 - System.Reflection.Emit.Lightweight (4.3) - framework: >= net452, >= netstandard16 + System.Reflection.Emit.Lightweight (4.3) - framework: >= net10, >= netstandard16 System.Reflection (>= 4.3) - framework: >= netstandard10 System.Reflection.Emit.ILGeneration (>= 4.3) - framework: >= netstandard10 System.Reflection.Primitives (>= 4.3) - framework: >= netstandard10 System.Runtime (>= 4.3) - framework: >= netstandard10 - System.Reflection.Extensions (4.3) - framework: >= net452, dnxcore50, >= netstandard11 + System.Reflection.Extensions (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: dnxcore50, >= netstandard10 Microsoft.NETCore.Targets (>= 1.1) - framework: dnxcore50, >= netstandard10 System.Reflection (>= 4.3) - framework: dnxcore50, >= netstandard10 System.Runtime (>= 4.3) - framework: dnxcore50, >= netstandard10 - System.Reflection.Primitives (4.3) - framework: >= net452, dnxcore50, >= netstandard11, netstandard12, netstandard13 + System.Reflection.Primitives (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: dnxcore50, >= netstandard10 Microsoft.NETCore.Targets (>= 1.1) - framework: dnxcore50, >= netstandard10 System.Runtime (>= 4.3) - framework: dnxcore50, >= netstandard10 - System.Reflection.TypeExtensions (4.3) - framework: >= net452, dnxcore50, >= netstandard16 - System.Diagnostics.Contracts (>= 4.3) - framework: dnxcore50 - System.Diagnostics.Debug (>= 4.3) - framework: dnxcore50 - System.Linq (>= 4.3) - framework: dnxcore50 + System.Reflection.TypeExtensions (4.3) - framework: >= net10, >= netstandard16 System.Reflection (>= 4.3) - framework: >= net462, dnxcore50, netstandard13, >= netstandard15 - System.Reflection.Primitives (>= 4.3) - framework: dnxcore50 - System.Resources.ResourceManager (>= 4.3) - framework: dnxcore50 System.Runtime (>= 4.3) - framework: dnxcore50, netstandard13, >= netstandard15 - System.Runtime.Extensions (>= 4.3) - framework: dnxcore50 - System.Resources.ResourceManager (4.3) - framework: >= net452, dnxcore50, >= netstandard11, netstandard13, netstandard14 + System.Resources.ResourceManager (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: dnxcore50, >= netstandard10 Microsoft.NETCore.Targets (>= 1.1) - framework: dnxcore50, >= netstandard10 System.Globalization (>= 4.3) - framework: dnxcore50, >= netstandard10 System.Reflection (>= 4.3) - framework: dnxcore50, >= netstandard10 System.Runtime (>= 4.3) - framework: dnxcore50, >= netstandard10 - System.Runtime (4.3) - framework: >= net452, dnxcore50, >= netstandard11, netstandard12, netstandard13, netstandard14 + System.Runtime (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: dnxcore50, netstandard10, netstandard12, netstandard13, >= netstandard15 Microsoft.NETCore.Targets (>= 1.1) - framework: dnxcore50, netstandard10, netstandard12, netstandard13, >= netstandard15 - System.Runtime.Extensions (4.3) - framework: >= net452, dnxcore50, >= netstandard11, netstandard13, netstandard14 + System.Runtime.Extensions (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard15 Microsoft.NETCore.Targets (>= 1.1) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard15 System.Runtime (>= 4.3) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard15 - System.Runtime.Handles (4.3) - framework: >= net452, >= netstandard13, netstandard14 + System.Runtime.Handles (4.3) - framework: >= net10, >= netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: >= netstandard13 Microsoft.NETCore.Targets (>= 1.1) - framework: >= netstandard13 System.Runtime (>= 4.3) - framework: >= netstandard13 - System.Runtime.InteropServices (4.3) - framework: >= net452, >= netstandard11, netstandard13, netstandard14 - Microsoft.NETCore.Platforms (>= 1.1) - framework: dnxcore50, netstandard11, netstandard12, netstandard13, >= netstandard15 - Microsoft.NETCore.Targets (>= 1.1) - framework: dnxcore50, netstandard11, netstandard12, netstandard13, >= netstandard15 - System.Reflection (>= 4.3) - framework: dnxcore50, netstandard11, netstandard12, netstandard13, >= netstandard15 - System.Reflection.Primitives (>= 4.3) - framework: dnxcore50, netstandard11, netstandard12, netstandard13, >= netstandard15 - System.Runtime (>= 4.3) - framework: net462, >= net463, dnxcore50, netstandard11, netstandard12, netstandard13, >= netstandard15 - System.Runtime.Handles (>= 4.3) - framework: dnxcore50, netstandard13, >= netstandard15 - System.Runtime.InteropServices.RuntimeInformation (4.3) - framework: >= net452, >= netstandard11 + System.Runtime.InteropServices (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 + Microsoft.NETCore.Platforms (>= 1.1) - framework: dnxcore50, netstandard11, netstandard12, netstandard13, >= netstandard15, netcore11 + Microsoft.NETCore.Targets (>= 1.1) - framework: dnxcore50, netstandard11, netstandard12, netstandard13, >= netstandard15, netcore11 + System.Reflection (>= 4.3) - framework: dnxcore50, netstandard11, netstandard12, netstandard13, >= netstandard15, netcore11 + System.Reflection.Primitives (>= 4.3) - framework: dnxcore50, netstandard11, netstandard12, netstandard13, >= netstandard15, netcore11 + System.Runtime (>= 4.3) - framework: net462, >= net463, dnxcore50, netstandard11, netstandard12, netstandard13, >= netstandard15, netcore11 + System.Runtime.Handles (>= 4.3) - framework: dnxcore50, netstandard13, >= netstandard15, netcore11 + System.Runtime.InteropServices.RuntimeInformation (4.3) - framework: >= net45, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 runtime.native.System (>= 4.3) - framework: >= netstandard11 System.Reflection (>= 4.3) - framework: dnxcore50, >= netstandard11 System.Reflection.Extensions (>= 4.3) - framework: dnxcore50, >= netstandard11 @@ -349,12 +406,12 @@ NUGET System.Runtime (>= 4.3) - framework: dnxcore50, >= netstandard11 System.Runtime.InteropServices (>= 4.3) - framework: >= netstandard11 System.Threading (>= 4.3) - framework: dnxcore50, >= netstandard11 - System.Runtime.Numerics (4.3) - framework: >= net452, >= netstandard11 + System.Runtime.Numerics (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 System.Globalization (>= 4.3) - framework: dnxcore50, >= netstandard13 System.Resources.ResourceManager (>= 4.3) - framework: dnxcore50, >= netstandard13 System.Runtime (>= 4.3) - framework: dnxcore50, netstandard11, >= netstandard13 System.Runtime.Extensions (>= 4.3) - framework: dnxcore50, >= netstandard13 - System.Security.Cryptography.Algorithms (4.3) - framework: >= net452, >= netstandard13, netstandard14 + System.Security.Cryptography.Algorithms (4.3) - framework: >= net10, >= netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: dnxcore50, >= netstandard16 runtime.native.System.Security.Cryptography.Apple (>= 4.3) - framework: >= netstandard16 runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) - framework: >= netstandard16 @@ -381,7 +438,7 @@ NUGET System.Security.Cryptography.Encoding (>= 4.3) - framework: netstandard14, >= netstandard16 System.Security.Cryptography.Primitives (>= 4.3) - framework: net46, net461, >= net463, netstandard13, netstandard14, >= netstandard16 System.Text.Encoding (>= 4.3) - framework: netstandard14, >= netstandard16 - System.Security.Cryptography.Csp (4.3) - framework: >= net46, >= netstandard16 + System.Security.Cryptography.Csp (4.3) - framework: >= net46, >= netstandard13 Microsoft.NETCore.Platforms (>= 1.1) - framework: >= netstandard13 System.IO (>= 4.3) - framework: >= netstandard13 System.Reflection (>= 4.3) - framework: >= netstandard13 @@ -395,7 +452,7 @@ NUGET System.Security.Cryptography.Primitives (>= 4.3) - framework: >= net46, >= netstandard13 System.Text.Encoding (>= 4.3) - framework: >= netstandard13 System.Threading (>= 4.3) - framework: >= netstandard13 - System.Security.Cryptography.Encoding (4.3) - framework: >= net452, >= netstandard13, netstandard14 + System.Security.Cryptography.Encoding (4.3) - framework: >= net10, >= netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: >= netstandard13 runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) - framework: >= netstandard13 System.Collections (>= 4.3) - framework: >= netstandard13 @@ -408,8 +465,8 @@ NUGET System.Runtime.InteropServices (>= 4.3) - framework: >= netstandard13 System.Security.Cryptography.Primitives (>= 4.3) - framework: >= netstandard13 System.Text.Encoding (>= 4.3) - framework: >= netstandard13 - System.Security.Cryptography.OpenSsl (4.3) - framework: >= net452, >= netstandard16 - runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) + System.Security.Cryptography.OpenSsl (4.3) - framework: >= net10, >= netstandard16 + runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) - framework: >= net463, >= netstandard16, monoandroid, monotouch, xamarinios, xamarinmac System.Collections (>= 4.3) - framework: >= netstandard16 System.IO (>= 4.3) - framework: >= net463, >= netstandard16 System.Resources.ResourceManager (>= 4.3) - framework: >= netstandard16 @@ -422,7 +479,7 @@ NUGET System.Security.Cryptography.Encoding (>= 4.3) - framework: >= net463, >= netstandard16 System.Security.Cryptography.Primitives (>= 4.3) - framework: >= net463, >= netstandard16 System.Text.Encoding (>= 4.3) - framework: >= netstandard16 - System.Security.Cryptography.Primitives (4.3) - framework: >= net452, >= netstandard13, netstandard14 + System.Security.Cryptography.Primitives (4.3) - framework: >= net10, >= netstandard13, netstandard14, netstandard15 System.Diagnostics.Debug (>= 4.3) - framework: >= netstandard13 System.Globalization (>= 4.3) - framework: >= netstandard13 System.IO (>= 4.3) - framework: >= netstandard13 @@ -430,7 +487,7 @@ NUGET System.Runtime (>= 4.3) - framework: >= netstandard13 System.Threading (>= 4.3) - framework: >= netstandard13 System.Threading.Tasks (>= 4.3) - framework: >= netstandard13 - System.Security.Cryptography.X509Certificates (4.3) - framework: >= net46, >= netstandard13 + System.Security.Cryptography.X509Certificates (4.3) - framework: >= net46, >= netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: dnxcore50, >= netstandard16 runtime.native.System (>= 4.3) - framework: >= netstandard16 runtime.native.System.Net.Http (>= 4.3) - framework: >= netstandard16 @@ -456,38 +513,52 @@ NUGET System.Security.Cryptography.Primitives (>= 4.3) - framework: dnxcore50, >= netstandard16 System.Text.Encoding (>= 4.3) - framework: dnxcore50, >= netstandard16 System.Threading (>= 4.3) - framework: dnxcore50, >= netstandard16 - System.Text.Encoding (4.3) - framework: >= net452, dnxcore50, >= netstandard11, netstandard13, netstandard14 + System.Text.Encoding (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: dnxcore50, netstandard10, >= netstandard13 Microsoft.NETCore.Targets (>= 1.1) - framework: dnxcore50, netstandard10, >= netstandard13 System.Runtime (>= 4.3) - framework: dnxcore50, netstandard10, >= netstandard13 - System.Text.Encoding.Extensions (4.3) - framework: >= net452, >= netstandard11 + System.Text.Encoding.Extensions (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: dnxcore50, netstandard10, >= netstandard13 Microsoft.NETCore.Targets (>= 1.1) - framework: dnxcore50, netstandard10, >= netstandard13 System.Runtime (>= 4.3) - framework: dnxcore50, netstandard10, >= netstandard13 System.Text.Encoding (>= 4.3) - framework: dnxcore50, netstandard10, >= netstandard13 - System.Text.RegularExpressions (4.3) - framework: >= net452, dnxcore50, >= netstandard11 + System.Text.RegularExpressions (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 System.Collections (>= 4.3) - framework: dnxcore50, >= netstandard16 System.Globalization (>= 4.3) - framework: dnxcore50, >= netstandard16 System.Resources.ResourceManager (>= 4.3) - framework: dnxcore50, >= netstandard16 - System.Runtime (>= 4.3) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard16 + System.Runtime (>= 4.3) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard16, netcore11 System.Runtime.Extensions (>= 4.3) - framework: dnxcore50, >= netstandard16 System.Threading (>= 4.3) - framework: dnxcore50, >= netstandard16 - System.Threading (4.3) - framework: >= net452, dnxcore50, >= netstandard11, netstandard13, netstandard14 + System.Threading (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 System.Runtime (>= 4.3) - framework: dnxcore50, netstandard10, >= netstandard13 System.Threading.Tasks (>= 4.3) - framework: dnxcore50, netstandard10, >= netstandard13 - System.Threading.Tasks (4.3) - framework: >= net452, dnxcore50, >= netstandard11, netstandard13, netstandard14 + System.Threading.Tasks (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: dnxcore50, netstandard10, >= netstandard13 Microsoft.NETCore.Targets (>= 1.1) - framework: dnxcore50, netstandard10, >= netstandard13 System.Runtime (>= 4.3) - framework: dnxcore50, netstandard10, >= netstandard13 - System.Threading.Tasks.Extensions (4.3) - framework: >= net452, >= netstandard13 + System.Threading.Tasks.Extensions (4.3) - framework: >= net10, >= netstandard13, netstandard14, netstandard15 System.Collections (>= 4.3) - framework: >= netstandard10 System.Runtime (>= 4.3) - framework: >= netstandard10 System.Threading.Tasks (>= 4.3) - framework: >= netstandard10 - System.Threading.Timer (4.3) - framework: >= net452, >= netstandard12 + System.Threading.Tasks.Parallel (4.3) - framework: >= net10, >= netstandard16 + System.Collections.Concurrent (>= 4.3) - framework: dnxcore50, netstandard11, >= netstandard13 + System.Diagnostics.Debug (>= 4.3) - framework: dnxcore50, >= netstandard13 + System.Diagnostics.Tracing (>= 4.3) - framework: dnxcore50, >= netstandard13 + System.Resources.ResourceManager (>= 4.3) - framework: dnxcore50, >= netstandard13 + System.Runtime (>= 4.3) - framework: dnxcore50, netstandard11, >= netstandard13 + System.Runtime.Extensions (>= 4.3) - framework: dnxcore50, >= netstandard13 + System.Threading (>= 4.3) - framework: dnxcore50, >= netstandard13 + System.Threading.Tasks (>= 4.3) - framework: dnxcore50, netstandard11, >= netstandard13 + System.Threading.Thread (4.3) - framework: >= net10, >= netstandard16 + System.Runtime (>= 4.3) - framework: >= netstandard13 + System.Threading.ThreadPool (4.3) - framework: >= net10, >= netstandard16 + System.Runtime (>= 4.3) - framework: >= netstandard13 + System.Runtime.Handles (>= 4.3) - framework: >= netstandard13 + System.Threading.Timer (4.3) - framework: >= net10, >= netstandard12, netstandard13, netstandard14, netstandard15 Microsoft.NETCore.Platforms (>= 1.1) - framework: dnxcore50, >= netstandard12 Microsoft.NETCore.Targets (>= 1.1) - framework: dnxcore50, >= netstandard12 System.Runtime (>= 4.3) - framework: dnxcore50, >= netstandard12 - System.Xml.ReaderWriter (4.3) - framework: >= net452, >= netstandard11 + System.Xml.ReaderWriter (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 System.Collections (>= 4.3) - framework: dnxcore50, >= netstandard13 System.Diagnostics.Debug (>= 4.3) - framework: dnxcore50, >= netstandard13 System.Globalization (>= 4.3) - framework: dnxcore50, >= netstandard13 @@ -503,7 +574,7 @@ NUGET System.Text.RegularExpressions (>= 4.3) - framework: dnxcore50, >= netstandard13 System.Threading.Tasks (>= 4.3) - framework: dnxcore50, netstandard10, >= netstandard13 System.Threading.Tasks.Extensions (>= 4.3) - framework: dnxcore50, >= netstandard13 - System.Xml.XDocument (4.3) - framework: >= net452, >= netstandard11 + System.Xml.XDocument (4.3) - framework: >= net10, >= netstandard11, netstandard12, netstandard13, netstandard14, netstandard15 System.Collections (>= 4.3) - framework: dnxcore50, >= netstandard13 System.Diagnostics.Debug (>= 4.3) - framework: dnxcore50, >= netstandard13 System.Diagnostics.Tools (>= 4.3) - framework: dnxcore50, >= netstandard13 @@ -518,22 +589,15 @@ NUGET System.Xml.ReaderWriter (>= 4.3) - framework: dnxcore50, netstandard10, >= netstandard13 xunit.abstractions (2.0.1) - framework: >= net452, >= netstandard11 NETStandard.Library (>= 1.6) - framework: >= netstandard10 - xunit.assert (2.1) - System.Collections (>= 4.0) - framework: dnxcore50 - System.Diagnostics.Debug (>= 4.0) - framework: dnxcore50 - System.Globalization (>= 4.0) - framework: dnxcore50 - System.Linq (>= 4.0) - framework: dnxcore50 - System.ObjectModel (>= 4.0) - framework: dnxcore50 - System.Reflection (>= 4.0) - framework: dnxcore50 - System.Reflection.Extensions (>= 4.0) - framework: dnxcore50 - System.Runtime (>= 4.0) - framework: dnxcore50 - System.Runtime.Extensions (>= 4.0) - framework: dnxcore50 - System.Text.RegularExpressions (>= 4.0) - framework: dnxcore50 - System.Threading.Tasks (>= 4.0) - framework: dnxcore50 + xunit.assert (2.2) + NETStandard.Library (>= 1.6) - framework: >= netstandard11 + xunit.core (2.2) - framework: >= netstandard16 + xunit.extensibility.core (2.2) + xunit.extensibility.execution (2.2) xunit.extensibility.core (2.2) - framework: >= net452, >= netstandard11 NETStandard.Library (>= 1.6) - framework: >= netstandard11 xunit.abstractions (>= 2.0.1) - framework: >= net452, >= netstandard11 - xunit.extensibility.execution (2.2) + xunit.extensibility.execution (2.2) - framework: >= net10, >= netstandard10 NETStandard.Library (>= 1.6) - framework: >= netstandard11 xunit.extensibility.core (2.2) - framework: >= net452, >= netstandard11 - xunit.runner.console (2.1) + xunit.runner.console (2.2) diff --git a/src/Generator.Bind/Properties/AssemblyInfo.cs b/src/Generator.Bind/Properties/AssemblyInfo.cs index ee12cfb3..9767ed4e 100644 --- a/src/Generator.Bind/Properties/AssemblyInfo.cs +++ b/src/Generator.Bind/Properties/AssemblyInfo.cs @@ -5,13 +5,13 @@ using System.Reflection; [assembly: AssemblyTitleAttribute("Generator.Bind")] [assembly: AssemblyProductAttribute("OpenTK")] [assembly: AssemblyDescriptionAttribute("A set of fast, low-level C# bindings for OpenGL, OpenGL ES and OpenAL.")] -[assembly: AssemblyVersionAttribute("2.0.0")] -[assembly: AssemblyFileVersionAttribute("2.0.0")] +[assembly: AssemblyVersionAttribute("3.0.0")] +[assembly: AssemblyFileVersionAttribute("3.0.0")] [assembly: CLSCompliantAttribute(true)] [assembly: AssemblyCopyrightAttribute("Copyright (c) 2006 - 2016 Stefanos Apostolopoulos for the Open Toolkit library.")] namespace System { internal static class AssemblyVersionInformation { - internal const string Version = "2.0.0"; - internal const string InformationalVersion = "2.0.0"; + internal const string Version = "3.0.0"; + internal const string InformationalVersion = "3.0.0"; } } diff --git a/src/Generator.Bind/Settings.cs b/src/Generator.Bind/Settings.cs index f5993aaf..49a42ecc 100644 --- a/src/Generator.Bind/Settings.cs +++ b/src/Generator.Bind/Settings.cs @@ -20,11 +20,11 @@ namespace Bind OverridesFiles = new List(); } - public string DefaultInputPath = "../../../Source/Bind/Specifications"; + public string DefaultInputPath = "../../../Generator.Bind/Specifications"; public string DefaultOutputPath = "../../../Source/OpenTK/Graphics/OpenGL"; public string DefaultOutputNamespace = "OpenTK.Graphics.OpenGL"; - public string DefaultDocPath = "../../../Source/Bind/Specifications/Docs"; - public string DefaultFallbackDocPath = "../../../Source/Bind/Specifications/Docs/GL"; + public string DefaultDocPath = "../../../Generator.Bind/Specifications/Docs"; + public string DefaultFallbackDocPath = "../../../Generator.Bind/Specifications/Docs/GL"; public string DefaultLicenseFile = "License.txt"; public string DefaultLanguageTypeMapFile = "csharp.tm"; public string DefaultKeywordEscapeCharacter = "@"; diff --git a/src/Generator.Converter/Properties/AssemblyInfo.cs b/src/Generator.Converter/Properties/AssemblyInfo.cs index 9890a4ed..1adfda08 100644 --- a/src/Generator.Converter/Properties/AssemblyInfo.cs +++ b/src/Generator.Converter/Properties/AssemblyInfo.cs @@ -5,13 +5,13 @@ using System.Reflection; [assembly: AssemblyTitleAttribute("Generator.Convert")] [assembly: AssemblyProductAttribute("OpenTK")] [assembly: AssemblyDescriptionAttribute("A set of fast, low-level C# bindings for OpenGL, OpenGL ES and OpenAL.")] -[assembly: AssemblyVersionAttribute("2.0.0")] -[assembly: AssemblyFileVersionAttribute("2.0.0")] +[assembly: AssemblyVersionAttribute("3.0.0")] +[assembly: AssemblyFileVersionAttribute("3.0.0")] [assembly: CLSCompliantAttribute(true)] [assembly: AssemblyCopyrightAttribute("Copyright (c) 2006 - 2016 Stefanos Apostolopoulos for the Open Toolkit library.")] namespace System { internal static class AssemblyVersionInformation { - internal const string Version = "2.0.0"; - internal const string InformationalVersion = "2.0.0"; + internal const string Version = "3.0.0"; + internal const string InformationalVersion = "3.0.0"; } } diff --git a/src/Generator.Rewrite/GeneratedVariableIdentifier.cs b/src/Generator.Rewrite/GeneratedVariableIdentifier.cs new file mode 100644 index 00000000..ec3389e5 --- /dev/null +++ b/src/Generator.Rewrite/GeneratedVariableIdentifier.cs @@ -0,0 +1,56 @@ +using System; +using Mono.Cecil.Cil; + +namespace OpenTK.Rewrite +{ + /// + /// Acts as a unique identifier for a generated named variable that can be passed between methods. Replaces uses of + /// variable names from Mono.Cecil. + /// + internal sealed class GeneratedVariableIdentifier + { + /// + /// The which the variable is in. + /// + public MethodBody Body { get; } + + /// + /// The which the variable idetifier maps to. + /// + public VariableDefinition Definition { get; } + + /// + /// The name of the generated variable. + /// + public string Name { get; } + + /// + /// Initializes a new instance of the class. + /// + /// The method body which the variable is in. + /// The name of the generated variable. + /// The index of the generated variable in its method. + /// + public GeneratedVariableIdentifier(MethodBody body, VariableDefinition definition, string name) + { + if (body == null) + { + throw new ArgumentException("The body argument cannot be null.", nameof(body)); + } + + if (definition == null) + { + throw new ArgumentException("The definition argument cannot be null.", nameof(body)); + } + + if (string.IsNullOrEmpty(name)) + { + throw new ArgumentException("The name argument cannot be null or empty", nameof(name)); + } + + this.Body = body; + this.Definition = definition; + this.Name = name; + } + } +} \ No newline at end of file diff --git a/src/Generator.Rewrite/Generator.Rewrite.csproj b/src/Generator.Rewrite/Generator.Rewrite.csproj index a6472b87..aa12b84a 100644 --- a/src/Generator.Rewrite/Generator.Rewrite.csproj +++ b/src/Generator.Rewrite/Generator.Rewrite.csproj @@ -52,6 +52,7 @@ + @@ -84,27 +85,13 @@ - - - - ..\..\packages\Mono.Cecil\lib\net20\Mono.Cecil.Mdb.dll - True - True - - - ..\..\packages\Mono.Cecil\lib\net20\Mono.Cecil.Pdb.dll - True - True - - - ..\..\packages\Mono.Cecil\lib\net20\Mono.Cecil.dll - True - True - - - + + ..\..\packages\Mono.Cecil\lib\net35\Mono.Cecil.dll + True + True + ..\..\packages\Mono.Cecil\lib\net35\Mono.Cecil.Mdb.dll True @@ -120,15 +107,15 @@ True True + + + + - ..\..\packages\Mono.Cecil\lib\net35\Mono.Cecil.dll + ..\..\packages\Mono.Cecil\lib\net40\Mono.Cecil.dll True True - - - - ..\..\packages\Mono.Cecil\lib\net40\Mono.Cecil.Mdb.dll True @@ -144,50 +131,653 @@ True True + + + + - ..\..\packages\Mono.Cecil\lib\net40\Mono.Cecil.dll + ..\..\packages\Mono.Cecil\lib\netstandard1.3\Mono.Cecil.dll True True - - - - - ..\..\packages\Mono.Cecil\lib\net45\Mono.Cecil.Mdb.dll + ..\..\packages\Mono.Cecil\lib\netstandard1.3\Mono.Cecil.Mdb.dll True True - ..\..\packages\Mono.Cecil\lib\net45\Mono.Cecil.Pdb.dll + ..\..\packages\Mono.Cecil\lib\netstandard1.3\Mono.Cecil.Pdb.dll True True - ..\..\packages\Mono.Cecil\lib\net45\Mono.Cecil.Rocks.dll - True - True - - - ..\..\packages\Mono.Cecil\lib\net45\Mono.Cecil.dll - True - True - - - - - - - ..\..\packages\Mono.Cecil\lib\sl5\Mono.Cecil.Rocks.dll - True - True - - - ..\..\packages\Mono.Cecil\lib\sl5\Mono.Cecil.dll + ..\..\packages\Mono.Cecil\lib\netstandard1.3\Mono.Cecil.Rocks.dll True True + + + + + ..\..\packages\System.Collections\ref\netstandard1.0\System.Collections.dll + False + True + + + + + + + ..\..\packages\System.Collections\ref\netstandard1.3\System.Collections.dll + False + True + + + + + + + + + ..\..\packages\System.Collections.Concurrent\lib\netstandard1.3\System.Collections.Concurrent.dll + True + True + + + + + + + + + ..\..\packages\System.Diagnostics.Debug\ref\netstandard1.0\System.Diagnostics.Debug.dll + False + True + + + + + + + ..\..\packages\System.Diagnostics.Debug\ref\netstandard1.3\System.Diagnostics.Debug.dll + False + True + + + + + + + + + True + + + ..\..\packages\System.Diagnostics.Tracing\lib\net462\System.Diagnostics.Tracing.dll + True + True + + + + + + + ..\..\packages\System.Diagnostics.Tracing\ref\netstandard1.1\System.Diagnostics.Tracing.dll + False + True + + + + + + + ..\..\packages\System.Diagnostics.Tracing\ref\netstandard1.2\System.Diagnostics.Tracing.dll + False + True + + + + + + + ..\..\packages\System.Diagnostics.Tracing\ref\netstandard1.3\System.Diagnostics.Tracing.dll + False + True + + + + + + + ..\..\packages\System.Diagnostics.Tracing\ref\netstandard1.5\System.Diagnostics.Tracing.dll + False + True + + + + + + + + + ..\..\packages\System.Globalization\ref\netstandard1.0\System.Globalization.dll + False + True + + + + + + + ..\..\packages\System.Globalization\ref\netstandard1.3\System.Globalization.dll + False + True + + + + + + + + + ..\..\packages\System.IO\lib\net462\System.IO.dll + True + True + + + + + + + ..\..\packages\System.IO\ref\netstandard1.0\System.IO.dll + False + True + + + + + + + ..\..\packages\System.IO\ref\netstandard1.3\System.IO.dll + False + True + + + + + + + ..\..\packages\System.IO\ref\netstandard1.5\System.IO.dll + False + True + + + + + + + + + True + + + + + + + + + ..\..\packages\System.IO.FileSystem\lib\net46\System.IO.FileSystem.dll + True + True + + + + + + + ..\..\packages\System.IO.FileSystem\ref\netstandard1.3\System.IO.FileSystem.dll + False + True + + + + + + + + + ..\..\packages\System.IO.FileSystem.Primitives\lib\net46\System.IO.FileSystem.Primitives.dll + True + True + + + + + + + ..\..\packages\System.IO.FileSystem.Primitives\lib\netstandard1.3\System.IO.FileSystem.Primitives.dll + True + True + + + + + + + + + ..\..\packages\System.Linq\lib\net463\System.Linq.dll + True + True + + + + + + + ..\..\packages\System.Linq\lib\netstandard1.6\System.Linq.dll + True + True + + + + + + + + + ..\..\packages\System.Reflection\lib\net462\System.Reflection.dll + True + True + + + + + + + ..\..\packages\System.Reflection\ref\netstandard1.0\System.Reflection.dll + False + True + + + + + + + ..\..\packages\System.Reflection\ref\netstandard1.3\System.Reflection.dll + False + True + + + + + + + ..\..\packages\System.Reflection\ref\netstandard1.5\System.Reflection.dll + False + True + + + + + + + + + True + + + + + + + True + + + ..\..\packages\System.Runtime\lib\net462\System.Runtime.dll + True + True + + + + + + + ..\..\packages\System.Runtime\ref\netstandard1.0\System.Runtime.dll + False + True + + + + + + + ..\..\packages\System.Runtime\ref\netstandard1.2\System.Runtime.dll + False + True + + + + + + + ..\..\packages\System.Runtime\ref\netstandard1.3\System.Runtime.dll + False + True + + + + + + + ..\..\packages\System.Runtime\ref\netstandard1.5\System.Runtime.dll + False + True + + + + + + + + + ..\..\packages\System.Runtime.Extensions\lib\net462\System.Runtime.Extensions.dll + True + True + + + + + + + ..\..\packages\System.Runtime.Extensions\ref\netstandard1.0\System.Runtime.Extensions.dll + False + True + + + + + + + ..\..\packages\System.Runtime.Extensions\ref\netstandard1.3\System.Runtime.Extensions.dll + False + True + + + + + + + ..\..\packages\System.Runtime.Extensions\ref\netstandard1.5\System.Runtime.Extensions.dll + False + True + + + + + + + + + ..\..\packages\System.Runtime.Handles\ref\netstandard1.3\System.Runtime.Handles.dll + False + True + + + + + + + + + ..\..\packages\System.Runtime.InteropServices\lib\net462\System.Runtime.InteropServices.dll + True + True + + + + + + + ..\..\packages\System.Runtime.InteropServices\lib\net463\System.Runtime.InteropServices.dll + True + True + + + + + + + ..\..\packages\System.Runtime.InteropServices\ref\netstandard1.1\System.Runtime.InteropServices.dll + False + True + + + + + + + ..\..\packages\System.Runtime.InteropServices\ref\netstandard1.2\System.Runtime.InteropServices.dll + False + True + + + + + + + ..\..\packages\System.Runtime.InteropServices\ref\netstandard1.3\System.Runtime.InteropServices.dll + False + True + + + + + + + ..\..\packages\System.Runtime.InteropServices\ref\netstandard1.5\System.Runtime.InteropServices.dll + False + True + + + + + + + + + True + + + + + + + ..\..\packages\System.Runtime.Numerics\ref\netstandard1.1\System.Runtime.Numerics.dll + False + True + + + + + + + ..\..\packages\System.Runtime.Numerics\lib\netstandard1.3\System.Runtime.Numerics.dll + True + True + + + + + + + + + ..\..\packages\System.Security.Cryptography.Algorithms\lib\net46\System.Security.Cryptography.Algorithms.dll + True + True + + + + + + + ..\..\packages\System.Security.Cryptography.Algorithms\lib\net461\System.Security.Cryptography.Algorithms.dll + True + True + + + + + + + ..\..\packages\System.Security.Cryptography.Algorithms\lib\net463\System.Security.Cryptography.Algorithms.dll + True + True + + + + + + + ..\..\packages\System.Security.Cryptography.Algorithms\ref\netstandard1.3\System.Security.Cryptography.Algorithms.dll + False + True + + + + + + + ..\..\packages\System.Security.Cryptography.Algorithms\ref\netstandard1.4\System.Security.Cryptography.Algorithms.dll + False + True + + + + + + + ..\..\packages\System.Security.Cryptography.Algorithms\ref\netstandard1.6\System.Security.Cryptography.Algorithms.dll + False + True + + + + + + + + + ..\..\packages\System.Security.Cryptography.Csp\lib\net46\System.Security.Cryptography.Csp.dll + True + True + + + + + + + ..\..\packages\System.Security.Cryptography.Csp\ref\netstandard1.3\System.Security.Cryptography.Csp.dll + False + True + + + + + + + + + ..\..\packages\System.Security.Cryptography.Encoding\lib\net46\System.Security.Cryptography.Encoding.dll + True + True + + + + + + + ..\..\packages\System.Security.Cryptography.Encoding\ref\netstandard1.3\System.Security.Cryptography.Encoding.dll + False + True + + + + + + + + + ..\..\packages\System.Security.Cryptography.Primitives\lib\net46\System.Security.Cryptography.Primitives.dll + True + True + + + + + + + ..\..\packages\System.Security.Cryptography.Primitives\lib\netstandard1.3\System.Security.Cryptography.Primitives.dll + True + True + + + + + + + + + ..\..\packages\System.Text.Encoding\ref\netstandard1.0\System.Text.Encoding.dll + False + True + + + + + + + ..\..\packages\System.Text.Encoding\ref\netstandard1.3\System.Text.Encoding.dll + False + True + + + + + + + + + ..\..\packages\System.Threading\lib\netstandard1.3\System.Threading.dll + True + True + + + + + + + + + ..\..\packages\System.Threading.Tasks\ref\netstandard1.0\System.Threading.Tasks.dll + False + True + + + + + + + ..\..\packages\System.Threading.Tasks\ref\netstandard1.3\System.Threading.Tasks.dll + False + True + + + + \ No newline at end of file diff --git a/src/Generator.Rewrite/Program.cs b/src/Generator.Rewrite/Program.cs index a1a7e7b4..4b6f2b8a 100644 --- a/src/Generator.Rewrite/Program.cs +++ b/src/Generator.Rewrite/Program.cs @@ -18,7 +18,6 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; -using System.Text; using Mono.Cecil; using Mono.Cecil.Cil; @@ -63,34 +62,27 @@ namespace OpenTK.Rewrite void Rewrite(string file, string keyfile, IEnumerable options) { - dllimport = options.Contains("-dllimport"); + IEnumerable optionsEnumerated = options as IList ?? options.ToList(); + dllimport = optionsEnumerated.Contains("-dllimport"); // Specify assembly read and write parameters // We want to keep a valid symbols file (pdb or mdb) var read_params = new ReaderParameters(); var write_params = new WriterParameters(); - var pdb = Path.ChangeExtension(file, "pdb"); - var mdb = file + ".mdb"; - ISymbolReaderProvider provider = null; - if (File.Exists(pdb)) - { - provider = new Mono.Cecil.Pdb.PdbReaderProvider(); - } - else if (File.Exists(mdb)) - { - provider = new Mono.Cecil.Mdb.MdbReaderProvider(); - } - read_params.SymbolReaderProvider = provider; + read_params.ReadSymbols = true; + read_params.ReadWrite = true; write_params.WriteSymbols = true; if (!String.IsNullOrEmpty(keyfile) && File.Exists(keyfile)) { keyfile = Path.GetFullPath(keyfile); - var fs = new FileStream(keyfile, FileMode.Open, FileAccess.Read); - var keypair = new System.Reflection.StrongNameKeyPair(fs); - fs.Close(); - write_params.StrongNameKeyPair = keypair; + + using (var fs = new FileStream(keyfile, FileMode.Open, FileAccess.Read)) + { + var keypair = new System.Reflection.StrongNameKeyPair(fs); + write_params.StrongNameKeyPair = keypair; + } } else { @@ -98,57 +90,66 @@ namespace OpenTK.Rewrite } // Load assembly and process all modules - var assembly = AssemblyDefinition.ReadAssembly(file, read_params); - var rewritten = assembly.CustomAttributes.FirstOrDefault(a => a.AttributeType.Name == "RewrittenAttribute"); - if (rewritten == null) + try { - foreach (var module in assembly.Modules) + using (AssemblyDefinition assembly = AssemblyDefinition.ReadAssembly(file, read_params)) { - foreach (var reference in module.AssemblyReferences) + var rewritten = assembly.CustomAttributes.FirstOrDefault(a => a.AttributeType.Name == "RewrittenAttribute"); + if (rewritten == null) { - try + foreach (var module in assembly.Modules) { - var resolved = module.AssemblyResolver.Resolve(reference); - if (reference.Name == "mscorlib") + foreach (var reference in module.AssemblyReferences) { - mscorlib = resolved; + try + { + var resolved = module.AssemblyResolver.Resolve(reference); + if (reference.Name == "mscorlib") + { + mscorlib = resolved; + } + } + catch (Exception e) + { + Console.Error.WriteLine(e.ToString()); + } } } - catch (Exception e) + + if (mscorlib == null) { - Console.Error.WriteLine(e.ToString()); + Console.Error.WriteLine("Failed to locate mscorlib"); + return; + } + TypeMarshal = mscorlib.MainModule.GetType("System.Runtime.InteropServices.Marshal"); + TypeStringBuilder = mscorlib.MainModule.GetType("System.Text.StringBuilder"); + TypeVoid = mscorlib.MainModule.GetType("System.Void"); + TypeIntPtr = mscorlib.MainModule.GetType("System.IntPtr"); + TypeInt32 = mscorlib.MainModule.GetType("System.Int32"); + + TypeBindingsBase = assembly.Modules.Select(m => m.GetType("OpenTK.BindingsBase")).First(); + + foreach (var module in assembly.Modules) + { + foreach (var type in module.Types) + { + Rewrite(type, optionsEnumerated); + } } } - } - - if (mscorlib == null) - { - Console.Error.WriteLine("Failed to locate mscorlib"); - return; - } - TypeMarshal = mscorlib.MainModule.GetType("System.Runtime.InteropServices.Marshal"); - TypeStringBuilder = mscorlib.MainModule.GetType("System.Text.StringBuilder"); - TypeVoid = mscorlib.MainModule.GetType("System.Void"); - TypeIntPtr = mscorlib.MainModule.GetType("System.IntPtr"); - TypeInt32 = mscorlib.MainModule.GetType("System.Int32"); - - TypeBindingsBase = assembly.Modules.Select(m => m.GetType("OpenTK.BindingsBase")).First(); - - foreach (var module in assembly.Modules) - { - foreach (var type in module.Types) + else { - Rewrite(type, options); + Console.Error.WriteLine("Error: assembly has already been rewritten"); } + + // Save rewritten assembly + assembly.Write(write_params); } } - else + catch (InvalidOperationException inex) { - Console.Error.WriteLine("Error: assembly has already been rewritten"); + Console.WriteLine("Failed to load the assembly. It may already have been rewritten, and the debug symbols no longer match."); } - - // Save rewritten assembly - assembly.Write(file, write_params); } void Rewrite(TypeDefinition type, IEnumerable options) @@ -171,12 +172,12 @@ namespace OpenTK.Rewrite var rewritten_constructor = type.GetConstructors().First(); var rewritten = new CustomAttribute(rewritten_constructor); rewritten.ConstructorArguments.Add(new CustomAttributeArgument( - type.Module.Import(mscorlib.MainModule.GetType("System.Boolean")), true)); + type.Module.ImportReference(mscorlib.MainModule.GetType("System.Boolean")), true)); type.Module.Assembly.CustomAttributes.Add(rewritten); } } - int GetSlot(MethodDefinition signature) + static int GetSlot(MethodDefinition signature) { // Pretend there is no slots if we want to force everything to work through DllImport (Android & iOS) if (dllimport) @@ -200,18 +201,19 @@ namespace OpenTK.Rewrite wrapper_signatures.AddRange(type.Methods .Where(m => m.IsPublic && m.CustomAttributes.Any(a => a.AttributeType.Name == "AutoGeneratedAttribute"))); + IEnumerable optionsEnumerated = options as IList ?? options.ToList(); foreach (var wrapper in wrapper_signatures) { var autogenerated = wrapper.CustomAttributes - .Where(a => a.AttributeType.Name == "AutoGeneratedAttribute"); - if (autogenerated.Count() > 0) + .Where(a => a.AttributeType.Name == "AutoGeneratedAttribute").ToList(); + if (autogenerated.Any()) { var signature_name = (string)autogenerated.First() .Fields.First(f => f.Name == "EntryPoint").Argument.Value; var signature = entry_signatures.FirstOrDefault(s => s.Name == signature_name); int slot = GetSlot(signature); - ProcessMethod(wrapper, signature, slot, entry_points, options); + ProcessMethod(wrapper, signature, slot, entry_points, optionsEnumerated); } } @@ -221,12 +223,12 @@ namespace OpenTK.Rewrite { foreach (var nested_type in type.NestedTypes) { - Rewrite(nested_type, entry_points, entry_signatures, options); + Rewrite(nested_type, entry_points, entry_signatures, optionsEnumerated); } } } - void RemoveNativeSignatures(TypeDefinition type, List methods) + static void RemoveNativeSignatures(TypeDefinition type, IEnumerable methods) { // Remove all DllImports for functions called through calli, since // their signatures are embedded directly into the calli callsite. @@ -237,7 +239,7 @@ namespace OpenTK.Rewrite } } - void RemoveSupportingAttributes(TypeDefinition type) + static void RemoveSupportingAttributes(TypeDefinition type) { foreach (var method in type.Methods) { @@ -266,20 +268,22 @@ namespace OpenTK.Rewrite // and push each parameter on the stack DebugVariables vars = null; - if (options.Contains("-debug")) + IEnumerable optionsEnumerated = options as IList ?? options.ToList(); + if (optionsEnumerated.Contains("-debug")) { vars = EmitDebugPrologue(wrapper, il); } // Patch convenience wrappers + List generatedVariables = new List(); if (wrapper.Parameters.Count == native.Parameters.Count) { - EmitParameters(wrapper, native, body, il); + generatedVariables = EmitParameters(wrapper, native, body, il); } else { int difference = native.Parameters.Count - wrapper.Parameters.Count; - EmitConvenienceWrapper(wrapper, native, difference, body, il); + generatedVariables = EmitConvenienceWrapper(wrapper, native, difference, body, il); } if (slot != -1) @@ -301,9 +305,9 @@ namespace OpenTK.Rewrite EmitReturnTypeWrapper(wrapper, native, body, il); } - EmitParameterEpilogues(wrapper, native, body, il); + EmitParameterEpilogues(wrapper, native, body, il, generatedVariables); - if (options.Contains("-debug")) + if (optionsEnumerated.Contains("-debug")) { EmitDebugEpilogue(wrapper, il, vars); } @@ -339,7 +343,7 @@ namespace OpenTK.Rewrite // something like "type namespace.class::method(type arg)" var module = il.Body.Method.FullName; module = module.Substring(module.IndexOf(' ') + 1); - module = module.Substring(0, module.IndexOf("::")); + module = module.Substring(0, module.IndexOf("::", StringComparison.Ordinal)); module = module.Substring(0, module.LastIndexOf('.')); // Only works for Graphics modules due to hardcoded use of @@ -479,7 +483,7 @@ namespace OpenTK.Rewrite // String return-type wrapper // return new string((sbyte*)((void*)GetString())); - var intptr_to_voidpointer = wrapper.Module.Import(mscorlib.MainModule.GetType("System.IntPtr").GetMethods() + var intptr_to_voidpointer = wrapper.Module.ImportReference(mscorlib.MainModule.GetType("System.IntPtr").GetMethods() .First(m => { return @@ -487,7 +491,7 @@ namespace OpenTK.Rewrite m.ReturnType.Name == "Void*"; })); - var string_constructor = wrapper.Module.Import(mscorlib.MainModule.GetType("System.String").GetConstructors() + var string_constructor = wrapper.Module.ImportReference(mscorlib.MainModule.GetType("System.String").GetConstructors() .First(m => { var p = m.Parameters; @@ -521,28 +525,42 @@ namespace OpenTK.Rewrite } } - static void EmitParameterEpilogues(MethodDefinition wrapper, MethodDefinition native, MethodBody body, ILProcessor il) + static void EmitParameterEpilogues(MethodDefinition wrapper, MethodDefinition native, MethodBody body, ILProcessor il, + List generatedVariables) { - foreach (var p in wrapper.Parameters) + foreach (var p in wrapper.Parameters) { if (p.ParameterType.Name == "StringBuilder") { - EmitStringBuilderEpilogue(wrapper, native, p, body, il); + EmitStringBuilderEpilogue(wrapper, native, p, body, il, GetGeneratedVariable(generatedVariables, p.Name + "_sb_ptr", body)); } if (!p.ParameterType.IsArray && p.ParameterType.Name == "String") { - EmitStringEpilogue(wrapper, p, body, il); + EmitStringEpilogue(wrapper, p, body, il,GetGeneratedVariable(generatedVariables, p.Name + "_string_ptr", body)); } if (p.ParameterType.IsArray && p.ParameterType.GetElementType().Name == "String") { - EmitStringArrayEpilogue(wrapper, p, body, il); + EmitStringArrayEpilogue(wrapper, p, body, il, GetGeneratedVariable(generatedVariables, p.Name + "_string_array_ptr", body)); } } } - static void EmitStringBuilderParameter(MethodDefinition method, ParameterDefinition parameter, MethodBody body, ILProcessor il) + /// + /// Retrieves a generated variable by searching the given list by the variable's name and associated method body. + /// + /// + /// + /// + /// + static GeneratedVariableIdentifier GetGeneratedVariable(IEnumerable variableIdentifiers, string name, MethodBody body) + { + return variableIdentifiers.FirstOrDefault(v => v.Name == name && v.Body == body && + body.Variables.Contains(v.Definition)); + } + + static GeneratedVariableIdentifier EmitStringBuilderParameter(MethodDefinition method, ParameterDefinition parameter, MethodBody body, ILProcessor il) { var p = parameter.ParameterType; @@ -557,26 +575,36 @@ namespace OpenTK.Rewrite // Marshal.FreeHGlobal(sb_ptr); // } // Make sure we have imported StringBuilder::Capacity and Marshal::AllocHGlobal - var sb_get_capacity = method.Module.Import(TypeStringBuilder.Methods.First(m => m.Name == "get_Capacity")); - var alloc_hglobal = method.Module.Import(TypeMarshal.Methods.First(m => m.Name == "AllocHGlobal")); + var sb_get_capacity = method.Module.ImportReference(TypeStringBuilder.Methods.First(m => m.Name == "get_Capacity")); + var alloc_hglobal = method.Module.ImportReference(TypeMarshal.Methods.First(m => m.Name == "AllocHGlobal")); // IntPtr ptr; - var variable_name = parameter.Name + " _sb_ptr"; - body.Variables.Add(new VariableDefinition(variable_name, TypeIntPtr)); - int index = body.Variables.Count - 1; + var variableDefinition = new VariableDefinition(TypeIntPtr); + body.Variables.Add(variableDefinition); + int stringBuilderPtrIndex = body.Variables.Count - 1; + + GeneratedVariableIdentifier stringBuilderPtrVar = new GeneratedVariableIdentifier(body, variableDefinition, parameter.Name + "_sb_ptr"); // ptr = Marshal.AllocHGlobal(sb.Capacity + 1); il.Emit(OpCodes.Callvirt, sb_get_capacity); il.Emit(OpCodes.Call, alloc_hglobal); - il.Emit(OpCodes.Stloc, index); - il.Emit(OpCodes.Ldloc, index); + il.Emit(OpCodes.Stloc, stringBuilderPtrIndex); + il.Emit(OpCodes.Ldloc, stringBuilderPtrIndex); // We'll emit the try-finally block in the epilogue implementation, // because we haven't yet emitted all necessary instructions here. + + return stringBuilderPtrVar; } - static void EmitStringBuilderEpilogue(MethodDefinition wrapper, MethodDefinition native, ParameterDefinition parameter, MethodBody body, ILProcessor il) + static void EmitStringBuilderEpilogue(MethodDefinition wrapper, MethodDefinition native, + ParameterDefinition parameter, MethodBody body, ILProcessor il, GeneratedVariableIdentifier generatedPtrVar) { + if (generatedPtrVar == null) + { + throw new ArgumentNullException(nameof(generatedPtrVar)); + } + var p = parameter.ParameterType; if (p.Name == "StringBuilder") { @@ -591,29 +619,28 @@ namespace OpenTK.Rewrite // } // Make sure we have imported BindingsBase::MasrhalPtrToStringBuilder and Marshal::FreeHGlobal - var ptr_to_sb = wrapper.Module.Import(TypeBindingsBase.Methods.First(m => m.Name == "MarshalPtrToStringBuilder")); - var free_hglobal = wrapper.Module.Import(TypeMarshal.Methods.First(m => m.Name == "FreeHGlobal")); + var ptr_to_sb = wrapper.Module.ImportReference(TypeBindingsBase.Methods.First(m => m.Name == "MarshalPtrToStringBuilder")); + var free_hglobal = wrapper.Module.ImportReference(TypeMarshal.Methods.First(m => m.Name == "FreeHGlobal")); var block = new ExceptionHandler(ExceptionHandlerType.Finally); block.TryStart = body.Instructions[0]; - var variable_name = parameter.Name + " _sb_ptr"; - var v = body.Variables.First(m => m.Name == variable_name); - il.Emit(OpCodes.Ldloc, v.Index); + il.Emit(OpCodes.Ldloc, generatedPtrVar.Definition.Index); il.Emit(OpCodes.Ldarg, parameter.Index); il.Emit(OpCodes.Call, ptr_to_sb); block.TryEnd = body.Instructions.Last(); block.HandlerStart = body.Instructions.Last(); - il.Emit(OpCodes.Ldloc, v.Index); + il.Emit(OpCodes.Ldloc, generatedPtrVar.Definition.Index); il.Emit(OpCodes.Call, free_hglobal); block.HandlerEnd = body.Instructions.Last(); } } - static void EmitStringParameter(MethodDefinition wrapper, ParameterDefinition parameter, MethodBody body, ILProcessor il) + static GeneratedVariableIdentifier EmitStringParameter(MethodDefinition wrapper, ParameterDefinition parameter, MethodBody body, + ILProcessor il) { var p = parameter.ParameterType; @@ -621,34 +648,37 @@ namespace OpenTK.Rewrite // IntPtr ptr = MarshalStringToPtr(str); // try { calli } // finally { Marshal.FreeHGlobal(ptr); } - var marshal_str_to_ptr = wrapper.Module.Import(TypeBindingsBase.Methods.First(m => m.Name == "MarshalStringToPtr")); + var marshal_str_to_ptr = wrapper.Module.ImportReference(TypeBindingsBase.Methods.First(m => m.Name == "MarshalStringToPtr")); // IntPtr ptr; - var variable_name = parameter.Name + "_string_ptr"; - body.Variables.Add(new VariableDefinition(variable_name, TypeIntPtr)); - int index = body.Variables.Count - 1; + var variableDefinition = new VariableDefinition(TypeIntPtr); + body.Variables.Add(variableDefinition); + int generatedPointerVarIndex = body.Variables.Count - 1; + + GeneratedVariableIdentifier stringPtrVar = new GeneratedVariableIdentifier(body, variableDefinition, parameter.Name + "_string_ptr"); // ptr = Marshal.StringToHGlobalAnsi(str); il.Emit(OpCodes.Call, marshal_str_to_ptr); - il.Emit(OpCodes.Stloc, index); - il.Emit(OpCodes.Ldloc, index); + il.Emit(OpCodes.Stloc, generatedPointerVarIndex); + il.Emit(OpCodes.Ldloc, generatedPointerVarIndex); // The finally block will be emitted in the function epilogue + return stringPtrVar; } - static void EmitStringEpilogue(MethodDefinition wrapper, ParameterDefinition parameter, MethodBody body, ILProcessor il) + static void EmitStringEpilogue(MethodDefinition wrapper, ParameterDefinition parameter, MethodBody body, + ILProcessor il, GeneratedVariableIdentifier generatedPtrVar) { var p = parameter.ParameterType; - var free = wrapper.Module.Import(TypeBindingsBase.Methods.First(m => m.Name == "FreeStringPtr")); + var free = wrapper.Module.ImportReference(TypeBindingsBase.Methods.First(m => m.Name == "FreeStringPtr")); // FreeStringPtr(ptr) - var variable_name = parameter.Name + "_string_ptr"; - var v = body.Variables.First(m => m.Name == variable_name); - il.Emit(OpCodes.Ldloc, v.Index); + il.Emit(OpCodes.Ldloc, generatedPtrVar.Definition.Index); il.Emit(OpCodes.Call, free); } - static void EmitStringArrayParameter(MethodDefinition wrapper, ParameterDefinition parameter, MethodBody body, ILProcessor il) + static GeneratedVariableIdentifier EmitStringArrayParameter(MethodDefinition wrapper, ParameterDefinition parameter, MethodBody body, + ILProcessor il) { var p = parameter.ParameterType; @@ -656,34 +686,42 @@ namespace OpenTK.Rewrite // IntPtr ptr = MarshalStringArrayToPtr(strings); // try { calli } // finally { FreeStringArrayPtr(ptr); } - var marshal_str_array_to_ptr = wrapper.Module.Import(TypeBindingsBase.Methods.First(m => m.Name == "MarshalStringArrayToPtr")); + var marshal_str_array_to_ptr = wrapper.Module.ImportReference(TypeBindingsBase.Methods.First(m => m.Name == "MarshalStringArrayToPtr")); // IntPtr ptr; - var variable_name = parameter.Name + "_string_array_ptr"; - body.Variables.Add(new VariableDefinition(variable_name, TypeIntPtr)); - int index = body.Variables.Count - 1; + var variableDefinition = new VariableDefinition(TypeIntPtr); + body.Variables.Add(variableDefinition); + int generatedPointerVarIndex = body.Variables.Count - 1; + + GeneratedVariableIdentifier stringArrayPtrVar = new GeneratedVariableIdentifier(body, variableDefinition, parameter.Name + "_string_array_ptr"); // ptr = MarshalStringArrayToPtr(strings); il.Emit(OpCodes.Call, marshal_str_array_to_ptr); - il.Emit(OpCodes.Stloc, index); - il.Emit(OpCodes.Ldloc, index); + il.Emit(OpCodes.Stloc, generatedPointerVarIndex); + il.Emit(OpCodes.Ldloc, generatedPointerVarIndex); // The finally block will be emitted in the function epilogue + + return stringArrayPtrVar; } - static void EmitStringArrayEpilogue(MethodDefinition wrapper, ParameterDefinition parameter, MethodBody body, ILProcessor il) + static void EmitStringArrayEpilogue(MethodDefinition wrapper, ParameterDefinition parameter, MethodBody body, + ILProcessor il, GeneratedVariableIdentifier generatedPtrVar) { + if (generatedPtrVar == null) + { + throw new ArgumentNullException(nameof(generatedPtrVar)); + } + // Note: only works for string vectors (1d arrays). // We do not (and will probably never) support 2d or higher string arrays var p = parameter.ParameterType; - var free = wrapper.Module.Import(TypeBindingsBase.Methods.First(m => m.Name == "FreeStringArrayPtr")); + var free = wrapper.Module.ImportReference(TypeBindingsBase.Methods.First(m => m.Name == "FreeStringArrayPtr")); // FreeStringArrayPtr(string_array_ptr, string_array.Length) - var variable_name = parameter.Name + "_string_array_ptr"; - var v = body.Variables.First(m => m.Name == variable_name); // load string_array_ptr - il.Emit(OpCodes.Ldloc, v.Index); + il.Emit(OpCodes.Ldloc, generatedPtrVar.Definition.Index); // load string_array.Length il.Emit(OpCodes.Ldarg, parameter.Index); @@ -694,7 +732,7 @@ namespace OpenTK.Rewrite il.Emit(OpCodes.Call, free); } - static void EmitConvenienceWrapper(MethodDefinition wrapper, + static List EmitConvenienceWrapper(MethodDefinition wrapper, MethodDefinition native, int difference, MethodBody body, ILProcessor il) { if (wrapper.Parameters.Count > 2) @@ -703,6 +741,8 @@ namespace OpenTK.Rewrite throw new NotImplementedException(); } + + List generatedVariables = new List(); if (wrapper.ReturnType.Name != "Void") { if (difference == 2) @@ -729,7 +769,8 @@ namespace OpenTK.Rewrite // return result; // } body.Variables.Add(new VariableDefinition(wrapper.ReturnType)); - EmitParameters(wrapper, native, body, il); + + generatedVariables = EmitParameters(wrapper, native, body, il); il.Emit(OpCodes.Ldloca, body.Variables.Count - 1); } else @@ -755,15 +796,17 @@ namespace OpenTK.Rewrite Console.Error.WriteLine("Unknown wrapper type for ({0})", native.Name); } } + + return generatedVariables; } - static int EmitParameters(MethodDefinition method, MethodDefinition native, MethodBody body, ILProcessor il) + static List EmitParameters(MethodDefinition method, MethodDefinition native, MethodBody body, ILProcessor il) { - int i; - for (i = 0; i < method.Parameters.Count; i++) + List generatedVariables = new List(); + for (int i = 0; i < method.Parameters.Count; i++) { var parameter = method.Parameters[i]; - var p = method.Module.Import(method.Parameters[i].ParameterType); + var p = method.Module.ImportReference(method.Parameters[i].ParameterType); il.Emit(OpCodes.Ldarg, i); if (p.Name.Contains("Int32") && native.Parameters[i].ParameterType.Name.Contains("IntPtr")) @@ -774,11 +817,11 @@ namespace OpenTK.Rewrite } else if (p.Name == "StringBuilder") { - EmitStringBuilderParameter(method, parameter, body, il); + generatedVariables.Add(EmitStringBuilderParameter(method, parameter, body, il)); } else if (p.Name == "String" && !p.IsArray) { - EmitStringParameter(method, parameter, body, il); + generatedVariables.Add(EmitStringParameter(method, parameter, body, il)); } else if (p.IsByReference) { @@ -790,7 +833,7 @@ namespace OpenTK.Rewrite } else if (p.IsArray) { - if (p.Name != method.Module.Import(typeof(string[])).Name) + if (p.Name != method.Module.ImportReference(typeof(string[])).Name) { // .Net treats 1d arrays differently than higher rank arrays. // 1d arrays are directly supported by instructions such as ldlen and ldelema. @@ -834,7 +877,7 @@ namespace OpenTK.Rewrite } else { - var get_length = method.Module.Import( + var get_length = method.Module.ImportReference( mscorlib.MainModule.GetType("System.Array").Methods.First(m => m.Name == "get_Length")); il.Emit(OpCodes.Callvirt, get_length); } @@ -880,11 +923,12 @@ namespace OpenTK.Rewrite } else { - EmitStringArrayParameter(method, parameter, body, il); + generatedVariables.Add(EmitStringArrayParameter(method, parameter, body, il)); } } } - return i; + + return generatedVariables; } static void EmitEntryPoint(FieldDefinition entry_points, ILProcessor il, int slot) diff --git a/src/Generator.Rewrite/Properties/AssemblyInfo.cs b/src/Generator.Rewrite/Properties/AssemblyInfo.cs index 296b0cb2..63a68040 100644 --- a/src/Generator.Rewrite/Properties/AssemblyInfo.cs +++ b/src/Generator.Rewrite/Properties/AssemblyInfo.cs @@ -5,13 +5,13 @@ using System.Reflection; [assembly: AssemblyTitleAttribute("Generator.Rewrite")] [assembly: AssemblyProductAttribute("OpenTK")] [assembly: AssemblyDescriptionAttribute("A set of fast, low-level C# bindings for OpenGL, OpenGL ES and OpenAL.")] -[assembly: AssemblyVersionAttribute("2.0.0")] -[assembly: AssemblyFileVersionAttribute("2.0.0")] +[assembly: AssemblyVersionAttribute("3.0.0")] +[assembly: AssemblyFileVersionAttribute("3.0.0")] [assembly: CLSCompliantAttribute(true)] [assembly: AssemblyCopyrightAttribute("Copyright (c) 2006 - 2016 Stefanos Apostolopoulos for the Open Toolkit library.")] namespace System { internal static class AssemblyVersionInformation { - internal const string Version = "2.0.0"; - internal const string InformationalVersion = "2.0.0"; + internal const string Version = "3.0.0"; + internal const string InformationalVersion = "3.0.0"; } } diff --git a/src/OpenTK.GLControl/Properties/AssemblyInfo.cs b/src/OpenTK.GLControl/Properties/AssemblyInfo.cs index 88b92999..eeeb1acb 100644 --- a/src/OpenTK.GLControl/Properties/AssemblyInfo.cs +++ b/src/OpenTK.GLControl/Properties/AssemblyInfo.cs @@ -5,13 +5,13 @@ using System.Reflection; [assembly: AssemblyTitleAttribute("OpenTK.GLControl")] [assembly: AssemblyProductAttribute("OpenTK")] [assembly: AssemblyDescriptionAttribute("A set of fast, low-level C# bindings for OpenGL, OpenGL ES and OpenAL.")] -[assembly: AssemblyVersionAttribute("2.0.0")] -[assembly: AssemblyFileVersionAttribute("2.0.0")] +[assembly: AssemblyVersionAttribute("3.0.0")] +[assembly: AssemblyFileVersionAttribute("3.0.0")] [assembly: CLSCompliantAttribute(true)] [assembly: AssemblyCopyrightAttribute("Copyright (c) 2006 - 2016 Stefanos Apostolopoulos for the Open Toolkit library.")] namespace System { internal static class AssemblyVersionInformation { - internal const string Version = "2.0.0"; - internal const string InformationalVersion = "2.0.0"; + internal const string Version = "3.0.0"; + internal const string InformationalVersion = "3.0.0"; } } diff --git a/src/OpenTK.GLWidget/Properties/AssemblyInfo.cs b/src/OpenTK.GLWidget/Properties/AssemblyInfo.cs index a167a861..15d61fa4 100644 --- a/src/OpenTK.GLWidget/Properties/AssemblyInfo.cs +++ b/src/OpenTK.GLWidget/Properties/AssemblyInfo.cs @@ -5,13 +5,13 @@ using System.Reflection; [assembly: AssemblyTitleAttribute("OpenTK.GLWidget")] [assembly: AssemblyProductAttribute("OpenTK")] [assembly: AssemblyDescriptionAttribute("A set of fast, low-level C# bindings for OpenGL, OpenGL ES and OpenAL.")] -[assembly: AssemblyVersionAttribute("2.0.0")] -[assembly: AssemblyFileVersionAttribute("2.0.0")] +[assembly: AssemblyVersionAttribute("3.0.0")] +[assembly: AssemblyFileVersionAttribute("3.0.0")] [assembly: CLSCompliantAttribute(true)] [assembly: AssemblyCopyrightAttribute("Copyright (c) 2006 - 2016 Stefanos Apostolopoulos for the Open Toolkit library.")] namespace System { internal static class AssemblyVersionInformation { - internal const string Version = "2.0.0"; - internal const string InformationalVersion = "2.0.0"; + internal const string Version = "3.0.0"; + internal const string InformationalVersion = "3.0.0"; } } diff --git a/src/OpenTK/Graphics/GraphicsContext.cs b/src/OpenTK/Graphics/GraphicsContext.cs index d12e360f..a2104e36 100644 --- a/src/OpenTK/Graphics/GraphicsContext.cs +++ b/src/OpenTK/Graphics/GraphicsContext.cs @@ -97,6 +97,23 @@ namespace OpenTK.Graphics /// Different hardware supports different flags, major and minor versions. Invalid parameters will be silently ignored. /// public GraphicsContext(GraphicsMode mode, IWindowInfo window, int major, int minor, GraphicsContextFlags flags) + : this(mode, window, FindSharedContext(), major, minor, flags) + { + } + + /// + /// Constructs a new GraphicsContext with the specified GraphicsMode, version and flags, and attaches it to the specified window. + /// + /// The OpenTK.Graphics.GraphicsMode of the GraphicsContext. + /// The OpenTK.Platform.IWindowInfo to attach the GraphicsContext to. + /// The GraphicsContext to share resources with, or null for explicit non-sharing. + /// The major version of the new GraphicsContext. + /// The minor version of the new GraphicsContext. + /// The GraphicsContextFlags for the GraphicsContext. + /// + /// Different hardware supports different flags, major and minor versions. Invalid parameters will be silently ignored. + /// + public GraphicsContext(GraphicsMode mode, IWindowInfo window, IGraphicsContext shareContext, int major, int minor, GraphicsContextFlags flags) { lock (SyncRoot) { @@ -112,6 +129,18 @@ namespace OpenTK.Graphics if (minor < 0) minor = 0; + // Angle needs an embedded context + const GraphicsContextFlags useAngleFlag = GraphicsContextFlags.Angle + | GraphicsContextFlags.AngleD3D9 + | GraphicsContextFlags.AngleD3D11 + | GraphicsContextFlags.AngleOpenGL; + var useAngle = false; + if ((flags & useAngleFlag) != 0) + { + flags |= GraphicsContextFlags.Embedded; + useAngle = true; + } + Debug.Print("Creating GraphicsContext."); try { @@ -121,8 +150,6 @@ namespace OpenTK.Graphics Debug.Print("GraphicsContextFlags: {0}", flags); Debug.Print("Requested version: {0}.{1}", major, minor); - IGraphicsContext shareContext = FindSharedContext(); - // Todo: Add a DummyFactory implementing IPlatformFactory. if (designMode) { @@ -133,8 +160,12 @@ namespace OpenTK.Graphics IPlatformFactory factory = null; switch ((flags & GraphicsContextFlags.Embedded) == GraphicsContextFlags.Embedded) { - case false: factory = Factory.Default; break; - case true: factory = Factory.Embedded; break; + case false: + factory = Factory.Default; + break; + case true: + factory = useAngle ? Factory.Angle : Factory.Embedded; + break; } // Note: this approach does not allow us to mix native and EGL contexts in the same process. diff --git a/src/OpenTK/Graphics/GraphicsContextFlags.cs b/src/OpenTK/Graphics/GraphicsContextFlags.cs index a7ee2f59..a7df6e16 100644 --- a/src/OpenTK/Graphics/GraphicsContextFlags.cs +++ b/src/OpenTK/Graphics/GraphicsContextFlags.cs @@ -56,6 +56,30 @@ namespace OpenTK.Graphics /// /// Indicates that this GraphicsContext is targeting OpenGL|ES. /// - Embedded = 0x0004 + Embedded = 0x0004, + /// + /// Indicates that this GraphicsContext is intended for offscreen rendering. + /// + Offscreen = 0x0008, + /// + /// Indicates that this GraphicsContext is targeting OpenGL|ES via Angle + /// and that angle-specific extensions are available. + /// + Angle = 0x0010, + /// + /// Indicates that this GraphicsContext is targeting OpenGL|ES via Angle + /// and uses Direct3D9 as rendering backend. + /// + AngleD3D9 = 0x0020, + /// + /// Indicates that this GraphicsContext is targeting OpenGL|ES via Angle + /// and uses Direct3D11 as rendering backend. + /// + AngleD3D11 = 0x0040, + /// + /// Indicates that this GraphicsContext is targeting OpenGL|ES via Angle + /// and uses OpenGL as rendering backend. + /// + AngleOpenGL = 0x0080, } } diff --git a/src/OpenTK/INativeWindow.cs b/src/OpenTK/INativeWindow.cs index 2e915da4..881bcc6c 100644 --- a/src/OpenTK/INativeWindow.cs +++ b/src/OpenTK/INativeWindow.cs @@ -238,7 +238,7 @@ namespace OpenTK event EventHandler WindowStateChanged; /// - /// Occurs whenever a keybord key is pressed. + /// Occurs whenever a keyboard key is pressed. /// event EventHandler KeyDown; diff --git a/src/OpenTK/NativeWindow.cs b/src/OpenTK/NativeWindow.cs index 46445503..78590633 100644 --- a/src/OpenTK/NativeWindow.cs +++ b/src/OpenTK/NativeWindow.cs @@ -635,7 +635,7 @@ namespace OpenTK public event EventHandler IconChanged = delegate { }; /// - /// Occurs whenever a keybord key is pressed. + /// Occurs whenever a keyboard key is pressed. /// public event EventHandler KeyDown = delegate { }; @@ -859,7 +859,7 @@ namespace OpenTK #region OnKeyDown /// - /// Occurs whenever a keybord key is pressed. + /// Occurs whenever a keyboard key is pressed. /// protected virtual void OnKeyDown(KeyboardKeyEventArgs e) { @@ -884,7 +884,7 @@ namespace OpenTK #region OnKeyUp /// - /// Called when a keybord key is released. + /// Called when a keyboard key is released. /// /// The for this event. protected virtual void OnKeyUp(KeyboardKeyEventArgs e) diff --git a/src/OpenTK/OpenTK.csproj b/src/OpenTK/OpenTK.csproj index 7c2828c0..63c4345a 100644 --- a/src/OpenTK/OpenTK.csproj +++ b/src/OpenTK/OpenTK.csproj @@ -132,9 +132,11 @@ + + diff --git a/src/OpenTK/Platform/Android/AndroidGameView.cs b/src/OpenTK/Platform/Android/AndroidGameView.cs index 6d6d01e0..c167c7ef 100644 --- a/src/OpenTK/Platform/Android/AndroidGameView.cs +++ b/src/OpenTK/Platform/Android/AndroidGameView.cs @@ -27,6 +27,7 @@ using Android.Views; using Android.Runtime; using Android.Graphics; using OpenTK.Platform.Egl; +using SurfaceType = Android.Views.SurfaceType; namespace OpenTK.Platform.Android { @@ -493,8 +494,8 @@ namespace OpenTK.Platform.Android DateTime prevRenderTime; DateTime curUpdateTime; DateTime curRenderTime; - FrameEventArgs updateEventArgs; - FrameEventArgs renderEventArgs; + FrameEventArgs updateEventArgs = new FrameEventArgs(); + FrameEventArgs renderEventArgs = new FrameEventArgs(); // this method is called on the main thread if RenderOnUIThread is true void RunIteration (CancellationToken token) @@ -505,21 +506,19 @@ namespace OpenTK.Platform.Android if (!ReadyToRender) return; - updateEventArgs = new FrameEventArgs (); curUpdateTime = DateTime.Now; if (prevUpdateTime.Ticks != 0) { var t = (curUpdateTime - prevUpdateTime).TotalSeconds; - updateEventArgs.Time = t < 0 ? 0 : t; + updateEventArgs.Time = t; } UpdateFrameInternal (updateEventArgs); prevUpdateTime = curUpdateTime; - renderEventArgs = new FrameEventArgs (); curRenderTime = DateTime.Now; if (prevRenderTime.Ticks == 0) { var t = (curRenderTime - prevRenderTime).TotalSeconds; - renderEventArgs.Time = t < 0 ? 0 : t; + renderEventArgs.Time = t; } RenderFrameInternal (renderEventArgs); diff --git a/src/OpenTK/Platform/Egl/AngleWindowInfo.cs b/src/OpenTK/Platform/Egl/AngleWindowInfo.cs new file mode 100644 index 00000000..f062a2d4 --- /dev/null +++ b/src/OpenTK/Platform/Egl/AngleWindowInfo.cs @@ -0,0 +1,183 @@ +using System; +using OpenTK.Graphics; +using OpenTK.Platform.Windows; + +namespace OpenTK.Platform.Egl +{ + using EGLSurface = IntPtr; + /// + /// A window info for angle. + /// + public interface IAngleWindowInfo : IWindowInfo + { + /// + /// Query the underlying platform pointer / handle for this window's + /// default surface or IntPtr.Zero + /// + IntPtr QuerySurfacePointer(); + /// + /// Create an additional rendering surface that shares the display + /// of this window. + /// + /// width in pixels + /// height in pixels + /// A reference to the new surface + EGLSurface CreateSurface(int width, int height); + /// + /// Destroy a surface created with CreateSurface and clears the passed reference. + /// + /// Reference to the surface. + void DestroySurface(ref EGLSurface surface); + /// + /// MakeCurrent the custom surface created with CreateSurface. + /// + /// Reference to the surface. + void MakeCurrent(EGLSurface surface); + /// + /// Query the underlying platform pointer / handle for an EGLSurface + /// created with CreateSurface. + /// + /// + IntPtr QuerySurfacePointer(EGLSurface surface); + } + + internal interface IAngleWindowInfoInternal : IAngleWindowInfo + { + IWindowInfo PlatformWindow { get; } + IntPtr Display { get; } + IntPtr Surface { get; } + EglContext EglContext { get; set; } + EglWindowInfo EglWindowInfo { get; set; } + IntPtr DeviceContext { get; } + } + + internal class AngleWindowInfo : IAngleWindowInfoInternal + { + private readonly IWindowInfo _platform_window; + private bool _disposed; + + public AngleWindowInfo(IWindowInfo platform_window) + { + _platform_window = platform_window; + } + + public IWindowInfo PlatformWindow + { + get { return _platform_window; } + } + + public IWindowInfo WindowInfo + { + get { return EglWindowInfo; } + } + + public IntPtr DeviceContext + { + get + { + var win_win = _platform_window as WinWindowInfo; + if (win_win != null) + { + return win_win.DeviceContext; + } + return IntPtr.Zero; + } + } + + public EglContext EglContext { get; set; } + public EglWindowInfo EglWindowInfo { get; set; } + + public IntPtr Display + { + get { return EglWindowInfo.Display; } + } + + public IntPtr Surface + { + get { return EglWindowInfo.Surface; } + } + + public void Dispose() + { + Dispose(false); + } + + public IntPtr Handle + { + get { return _platform_window.Handle; } + } + + ~AngleWindowInfo() + { + Dispose(true); + } + + private void Dispose(bool called_from_finalizer) + { + if (_disposed) + { + return; + } + if (!called_from_finalizer) + { + _platform_window.Dispose(); + } + // dispose unmanaged + + _disposed = true; + GC.SuppressFinalize(this); + } + + public IntPtr QuerySurfacePointer() + { + return QuerySurfacePointer(Surface); + } + + public EGLSurface CreateSurface(int width, int height) + { + IntPtr surface; + EglWindowInfo.CreatePbufferSurface( + EglContext.GraphicsMode.Index.Value, + width, height, + out surface); + return surface; + } + + public void DestroySurface(ref EGLSurface surface) + { + EglWindowInfo.DestroySurface(ref surface); + } + + public void MakeCurrent(EGLSurface surface) + { + Egl.MakeCurrent(Display, surface, surface, EglContext.HandleAsEGLContext); + } + + public IntPtr QuerySurfacePointer(IntPtr surface) + { + if (UsesDirect3DBackend()) + { + return QuerySurfacePointer(surface, + Egl.EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE); + } + return IntPtr.Zero; + } + + private IntPtr QuerySurfacePointer(IntPtr surface, int attrib) + { + IntPtr surface_pointer; + if (Egl.QuerySurfacePointerANGLE( + Display, surface, attrib, out surface_pointer)) + { + return surface_pointer; + } + return IntPtr.Zero; + } + + private bool UsesDirect3DBackend() + { + var d3d_flags = GraphicsContextFlags.AngleD3D9 | GraphicsContextFlags.AngleD3D11; + return ((EglContext.GraphicsContextFlags & d3d_flags) != 0); + } + } +} \ No newline at end of file diff --git a/src/OpenTK/Platform/Egl/Egl.cs b/src/OpenTK/Platform/Egl/Egl.cs index 118054d1..8a23a006 100644 --- a/src/OpenTK/Platform/Egl/Egl.cs +++ b/src/OpenTK/Platform/Egl/Egl.cs @@ -78,6 +78,17 @@ namespace OpenTK.Platform.Egl CONTEXT_LOST = 12302, } + enum SurfaceType + { + PBUFFER_BIT = 0x0001, + PIXMAP_BIT = 0x0002, + WINDOW_BIT = 0x0004, + VG_COLORSPACE_LINEAR_BIT = 0x0020, + VG_ALPHA_FORMAT_PRE_BIT = 0x0040, + MULTISAMPLE_RESOLVE_BOX_BIT = 0x0200, + SWAP_BEHAVIOR_PRESERVED_BIT = 0x0400, + } + static partial class Egl { public const int VERSION_1_0 = 1; @@ -199,6 +210,10 @@ namespace OpenTK.Platform.Egl // EGL_ANGLE_query_surface_pointer [DllImport("libEGL.dll", EntryPoint = "eglQuerySurfacePointerANGLE")] public static extern bool QuerySurfacePointerANGLE(EGLDisplay display, EGLSurface surface, int attribute, out IntPtr value); + + [DllImport("libEGL.dll", EntryPoint = "eglGetPlatformDisplayEXT")] + public static extern EGLDisplay GetPlatformDisplay(int platform, EGLNativeDisplayType displayId, int[] attribList); + // EGL_ANGLE_software_display public static readonly EGLNativeDisplayType SOFTWARE_DISPLAY_ANGLE = new EGLNativeDisplayType(-1); // EGL_ANGLE_direct3d_display @@ -224,6 +239,8 @@ namespace OpenTK.Platform.Egl // EGL_ANGLE_platform_angle_opengl public const int PLATFORM_ANGLE_TYPE_OPENGL_ANGLE = 0x320D; public const int PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE = 0x320E; + // See EGL_ANGLE_surface_d3d_texture_2d_share_handle + public const int EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE = 0x3200; [DllImportAttribute("libEGL.dll", EntryPoint = "eglGetError")] public static extern ErrorCode GetError(); diff --git a/src/OpenTK/Platform/Egl/EglAnglePlatformFactory.cs b/src/OpenTK/Platform/Egl/EglAnglePlatformFactory.cs new file mode 100644 index 00000000..914e09c0 --- /dev/null +++ b/src/OpenTK/Platform/Egl/EglAnglePlatformFactory.cs @@ -0,0 +1,172 @@ +#region License + +// +// The Open Toolkit Library License +// +// Copyright (c) 2006 - 2015 the Open Toolkit library. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +// the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// + +#endregion + +using System; +using OpenTK.Graphics; +using OpenTK.Input; + +namespace OpenTK.Platform.Egl +{ + internal class EglAnglePlatformFactory : PlatformFactoryBase + { + private readonly IPlatformFactory _platform_factory; + #region Public Members + + public EglAnglePlatformFactory(IPlatformFactory platform_factory) + { + _platform_factory = platform_factory; + } + + public override INativeWindow CreateNativeWindow(int x, int y, int width, int height, string title, GraphicsMode mode, + GameWindowFlags options, DisplayDevice device) + { + return _platform_factory.CreateNativeWindow(x, y, width, height, title, + mode, options, device); + } + + public override IDisplayDeviceDriver CreateDisplayDeviceDriver() + { + return _platform_factory.CreateDisplayDeviceDriver(); + } + + public override IGraphicsContext CreateGLContext(GraphicsMode mode, IWindowInfo window, + IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags) + { + var angle_window = (IAngleWindowInfoInternal) window; + var egl_window = CreateWindowInfo(angle_window, major, flags); + var egl_context = new EglWinContext(mode, egl_window, shareContext, major, minor, flags); + angle_window.EglContext = egl_context; + return egl_context; + } + + public override IGraphicsContext CreateGLContext(ContextHandle handle, IWindowInfo window, + IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags) + { + var angle_window = (IAngleWindowInfoInternal) window; + var egl_window = CreateWindowInfo(angle_window, major, flags); + var egl_context = new EglWinContext(handle, egl_window, shareContext, major, minor, flags); + angle_window.EglContext = egl_context; + return egl_context; + } + + public override GraphicsContext.GetCurrentContextDelegate CreateGetCurrentGraphicsContext() + { + return (GraphicsContext.GetCurrentContextDelegate)delegate + { + return new ContextHandle(Platform.Egl.Egl.GetCurrentContext()); + }; + } + + public override IKeyboardDriver2 CreateKeyboardDriver() + { + return _platform_factory.CreateKeyboardDriver(); + } + + public override IMouseDriver2 CreateMouseDriver() + { + return _platform_factory.CreateMouseDriver(); + } + + public override IJoystickDriver2 CreateJoystickDriver() + { + return _platform_factory.CreateJoystickDriver(); + } + + #endregion + + #region Private Members + + private static bool FlagEnabled(GraphicsContextFlags flags, GraphicsContextFlags flag) + { + return (flags & flag) != 0; + } + + private EglWindowInfo CreateWindowInfo(IAngleWindowInfoInternal window_info, + int major, GraphicsContextFlags flags) + { + var egl_display = GetAngleDisplay(window_info.DeviceContext, flags, major); + var egl_window = new EglWindowInfo(window_info.Handle, egl_display); + window_info.EglWindowInfo = egl_window; + return egl_window; + } + + private IntPtr GetAngleDisplay(IntPtr dc, GraphicsContextFlags flags, int major) + { + // default to D3D9 for ES2, but use D3D11 for ES3 as required by Angle. + var platform_type = major == 2 + ? Platform.Egl.Egl.PLATFORM_ANGLE_TYPE_D3D9_ANGLE + : Platform.Egl.Egl.PLATFORM_ANGLE_TYPE_D3D11_ANGLE; + if (FlagEnabled(flags, GraphicsContextFlags.AngleD3D11)) + { + platform_type = Platform.Egl.Egl.PLATFORM_ANGLE_TYPE_D3D11_ANGLE; + } + else if (FlagEnabled(flags, GraphicsContextFlags.AngleD3D9)) + { + platform_type = Platform.Egl.Egl.PLATFORM_ANGLE_TYPE_D3D9_ANGLE; + } + else if (FlagEnabled(flags, GraphicsContextFlags.AngleOpenGL)) + { + platform_type = Platform.Egl.Egl.PLATFORM_ANGLE_TYPE_OPENGL_ANGLE; + } + else + { + // make sure the correct flag is set. + switch (platform_type) + { + case Platform.Egl.Egl.PLATFORM_ANGLE_TYPE_D3D9_ANGLE: + flags |= GraphicsContextFlags.AngleD3D9; + break; + case Platform.Egl.Egl.PLATFORM_ANGLE_TYPE_D3D11_ANGLE: + flags |= GraphicsContextFlags.AngleD3D11; + break; + case Platform.Egl.Egl.PLATFORM_ANGLE_TYPE_OPENGL_ANGLE: + flags |= GraphicsContextFlags.AngleOpenGL; + break; + } + } + + var attribs = new[] + { + Platform.Egl.Egl.PLATFORM_ANGLE_TYPE_ANGLE, platform_type, + Platform.Egl.Egl.PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE, Platform.Egl.Egl.DONT_CARE, + Platform.Egl.Egl.PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE, Platform.Egl.Egl.DONT_CARE, + Platform.Egl.Egl.PLATFORM_ANGLE_DEVICE_TYPE_ANGLE, Platform.Egl.Egl.PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE, + Platform.Egl.Egl.NONE + }; + + return Platform.Egl.Egl.GetPlatformDisplay( + Platform.Egl.Egl.PLATFORM_ANGLE_ANGLE, + dc, + attribs + ); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/OpenTK/Platform/Egl/EglContext.cs b/src/OpenTK/Platform/Egl/EglContext.cs index b6cca8f9..51335731 100644 --- a/src/OpenTK/Platform/Egl/EglContext.cs +++ b/src/OpenTK/Platform/Egl/EglContext.cs @@ -28,6 +28,7 @@ using System; using System.Diagnostics; using OpenTK.Graphics; +using OpenTK.Graphics.ES20; namespace OpenTK.Platform.Egl { @@ -36,9 +37,11 @@ namespace OpenTK.Platform.Egl #region Fields protected readonly RenderableFlags Renderable; - protected EglWindowInfo WindowInfo; + internal EglWindowInfo WindowInfo; - IntPtr HandleAsEGLContext { get { return Handle.Handle; } set { Handle = new ContextHandle(value); } } + internal GraphicsContextFlags GraphicsContextFlags { get; set; } + + internal IntPtr HandleAsEGLContext { get { return Handle.Handle; } set { Handle = new ContextHandle(value); } } int swap_interval = 1; // Default interval is defined as 1 in EGL. #endregion @@ -53,6 +56,8 @@ namespace OpenTK.Platform.Egl if (window == null) throw new ArgumentNullException("window"); + EglContext shared = GetSharedEglContext(sharedContext); + WindowInfo = window; // Select an EGLConfig that matches the desired mode. We cannot use the 'mode' @@ -83,19 +88,38 @@ namespace OpenTK.Platform.Egl Debug.Print("[EGL] Failed to bind rendering API. Error: {0}", Egl.GetError()); } - Mode = new EglGraphicsMode().SelectGraphicsMode(window, - mode.ColorFormat, mode.Depth, mode.Stencil, mode.Samples, - mode.AccumulatorFormat, mode.Buffers, mode.Stereo, - Renderable); + bool offscreen = (flags & GraphicsContextFlags.Offscreen) != 0; + + SurfaceType surfaceType = offscreen + ? SurfaceType.PBUFFER_BIT + : SurfaceType.WINDOW_BIT; + + Mode = new EglGraphicsMode().SelectGraphicsMode(surfaceType, + window.Display, mode.ColorFormat, mode.Depth, mode.Stencil, + mode.Samples, mode.AccumulatorFormat, mode.Buffers, mode.Stereo, + Renderable); + if (!Mode.Index.HasValue) throw new GraphicsModeException("Invalid or unsupported GraphicsMode."); IntPtr config = Mode.Index.Value; if (window.Surface == IntPtr.Zero) - window.CreateWindowSurface(config); + { + if (!offscreen) + { + window.CreateWindowSurface(config); + } + else + { + window.CreatePbufferSurface(config); + } + } - int[] attrib_list = new int[] { Egl.CONTEXT_CLIENT_VERSION, major, Egl.NONE }; - HandleAsEGLContext = Egl.CreateContext(window.Display, config, sharedContext != null ? (sharedContext as IGraphicsContextInternal).Context.Handle : IntPtr.Zero, attrib_list); + int[] attribList = { Egl.CONTEXT_CLIENT_VERSION, major, Egl.NONE }; + var shareContext = shared?.HandleAsEGLContext ?? IntPtr.Zero; + HandleAsEGLContext = Egl.CreateContext(window.Display, config, shareContext, attribList); + + GraphicsContextFlags = flags; } public EglContext(ContextHandle handle, EglWindowInfo window, IGraphicsContext sharedContext, @@ -131,6 +155,11 @@ namespace OpenTK.Platform.Egl { if (window is EglWindowInfo) WindowInfo = (EglWindowInfo) window; + #if !ANDROID + else if (window is IAngleWindowInfoInternal) + WindowInfo = ((IAngleWindowInfoInternal) window).EglWindowInfo; + #endif + if (!Egl.MakeCurrent(WindowInfo.Display, WindowInfo.Surface, WindowInfo.Surface, HandleAsEGLContext)) { throw new GraphicsContextException(string.Format("Failed to make context {0} current. Error: {1}", Handle, Egl.GetError())); @@ -171,6 +200,19 @@ namespace OpenTK.Platform.Egl } } + public override void Update(IWindowInfo window) + { + MakeCurrent(window); + // ANGLE updates the width and height of the back buffer surfaces in the WaitClient function. + // So without this calling this function, the surface won't match the size of the window after it + // was resized. + // https://bugs.chromium.org/p/angleproject/issues/detail?id=1438 + if (!Egl.WaitClient()) + { + Debug.Print("[Warning] Egl.WaitClient() failed. Error: {0}", Egl.GetError()); + } + } + #endregion #region IGraphicsContextInternal Members @@ -216,6 +258,21 @@ namespace OpenTK.Platform.Egl } } + private EglContext GetSharedEglContext(IGraphicsContext sharedContext) + { + if (sharedContext == null) + { + return null; + } + + var internalContext = sharedContext as IGraphicsContextInternal; + if (internalContext != null) + { + return (EglContext) internalContext.Implementation; + } + return (EglContext) sharedContext; + } + #endregion } } diff --git a/src/OpenTK/Platform/Egl/EglGraphicsMode.cs b/src/OpenTK/Platform/Egl/EglGraphicsMode.cs index 779e8ff2..8a5b7ea9 100644 --- a/src/OpenTK/Platform/Egl/EglGraphicsMode.cs +++ b/src/OpenTK/Platform/Egl/EglGraphicsMode.cs @@ -26,8 +26,6 @@ #endregion using System; -using System.Collections.Generic; -using System.Text; using OpenTK.Graphics; namespace OpenTK.Platform.Egl @@ -46,13 +44,24 @@ namespace OpenTK.Platform.Egl public GraphicsMode SelectGraphicsMode(EglWindowInfo window, ColorFormat color, int depth, int stencil, int samples, ColorFormat accum, int buffers, bool stereo, - RenderableFlags renderable_flags) + RenderableFlags renderableFlags) + { + return SelectGraphicsMode( + SurfaceType.WINDOW_BIT, + window.Display, + color, depth, stencil, samples, accum, buffers, stereo, renderableFlags); + } + + public GraphicsMode SelectGraphicsMode(SurfaceType surfaceType, + IntPtr display, ColorFormat color, int depth, int stencil, + int samples, ColorFormat accum, int buffers, bool stereo, + RenderableFlags renderableFlags) { IntPtr[] configs = new IntPtr[1]; int[] attribList = new int[] { - Egl.SURFACE_TYPE, Egl.WINDOW_BIT, - Egl.RENDERABLE_TYPE, (int)renderable_flags, + Egl.SURFACE_TYPE, (int) surfaceType, + Egl.RENDERABLE_TYPE, (int)renderableFlags, Egl.RED_SIZE, color.Red, Egl.GREEN_SIZE, color.Green, @@ -68,29 +77,27 @@ namespace OpenTK.Platform.Egl Egl.NONE, }; - IntPtr display = window.Display; - - int num_configs; - if (!Egl.ChooseConfig(display, attribList, configs, configs.Length, out num_configs) || num_configs == 0) + int numConfigs; + if (!Egl.ChooseConfig(display, attribList, configs, configs.Length, out numConfigs) || numConfigs == 0) { throw new GraphicsModeException(String.Format("Failed to retrieve GraphicsMode, error {0}", Egl.GetError())); } // See what we really got - IntPtr active_config = configs[0]; + IntPtr activeConfig = configs[0]; int r, g, b, a; - Egl.GetConfigAttrib(display, active_config, Egl.RED_SIZE, out r); - Egl.GetConfigAttrib(display, active_config, Egl.GREEN_SIZE, out g); - Egl.GetConfigAttrib(display, active_config, Egl.BLUE_SIZE, out b); - Egl.GetConfigAttrib(display, active_config, Egl.ALPHA_SIZE, out a); + Egl.GetConfigAttrib(display, activeConfig, Egl.RED_SIZE, out r); + Egl.GetConfigAttrib(display, activeConfig, Egl.GREEN_SIZE, out g); + Egl.GetConfigAttrib(display, activeConfig, Egl.BLUE_SIZE, out b); + Egl.GetConfigAttrib(display, activeConfig, Egl.ALPHA_SIZE, out a); int d, s; - Egl.GetConfigAttrib(display, active_config, Egl.DEPTH_SIZE, out d); - Egl.GetConfigAttrib(display, active_config, Egl.STENCIL_SIZE, out s); - int sample_buffers; - Egl.GetConfigAttrib(display, active_config, Egl.SAMPLES, out sample_buffers); - Egl.GetConfigAttrib(display, active_config, Egl.SAMPLES, out samples); + Egl.GetConfigAttrib(display, activeConfig, Egl.DEPTH_SIZE, out d); + Egl.GetConfigAttrib(display, activeConfig, Egl.STENCIL_SIZE, out s); + int sampleBuffers; + Egl.GetConfigAttrib(display, activeConfig, Egl.SAMPLES, out sampleBuffers); + Egl.GetConfigAttrib(display, activeConfig, Egl.SAMPLES, out samples); - return new GraphicsMode(active_config, new ColorFormat(r, g, b, a), d, s, sample_buffers > 0 ? samples : 0, 0, 2, false); + return new GraphicsMode(activeConfig, new ColorFormat(r, g, b, a), d, s, sampleBuffers > 0 ? samples : 0, 0, 2, false); } } } diff --git a/src/OpenTK/Platform/Egl/EglWindowInfo.cs b/src/OpenTK/Platform/Egl/EglWindowInfo.cs index 10f495be..0f14dc74 100644 --- a/src/OpenTK/Platform/Egl/EglWindowInfo.cs +++ b/src/OpenTK/Platform/Egl/EglWindowInfo.cs @@ -64,8 +64,8 @@ namespace OpenTK.Platform.Egl Display = display; - int dummy_major, dummy_minor; - if (!Egl.Initialize(Display, out dummy_major, out dummy_minor)) + int dummyMajor, dummyMinor; + if (!Egl.Initialize(Display, out dummyMajor, out dummyMinor)) { throw new GraphicsContextException(String.Format("Failed to initialize EGL, error {0}.", Egl.GetError())); } @@ -98,20 +98,66 @@ namespace OpenTK.Platform.Egl public void CreatePbufferSurface(IntPtr config) { - Surface = Egl.CreatePbufferSurface(Display, config, null); + int[] attribs = new int[]{Egl.NONE}; + Surface = Egl.CreatePbufferSurface(Display, config, attribs); + if (Surface == IntPtr.Zero) + { + throw new GraphicsContextException(String.Format( + "[EGL] Failed to create pbuffer surface, error {0}.", Egl.GetError())); + } + } + + public void CreatePbufferSurface(IntPtr config, int width, int height) + { + if (surface != IntPtr.Zero) + { + DestroySurface(); + } + CreatePbufferSurface(config, width, height, out surface); + } + + public void CreatePbufferSurface(IntPtr config, int width, int height, out IntPtr bufferSurface) + { + int[] attribs = new int[] + { + Egl.WIDTH, width, + Egl.HEIGHT, height, + Egl.TEXTURE_TARGET, Egl.TEXTURE_2D, + Egl.TEXTURE_FORMAT, Egl.TEXTURE_RGBA, + Egl.NONE + }; + bufferSurface = Egl.CreatePbufferSurface(Display, config, attribs); + if (bufferSurface == IntPtr.Zero) + { + throw new GraphicsContextException(String.Format( + "[EGL] Failed to create pbuffer surface, error {0}.", Egl.GetError())); + } } public void DestroySurface() { - if (Surface != IntPtr.Zero) - { - if (Egl.GetCurrentSurface(Egl.DRAW) == Surface) - Egl.MakeCurrent(Display, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero); + DestroySurface(ref surface); + } - if (!Egl.DestroySurface(Display, Surface)) - Debug.Print("[Warning] Failed to destroy {0}:{1}.", Surface.GetType().Name, Surface); - Surface = IntPtr.Zero; + public void DestroySurface(ref IntPtr bufferSurface) + { + if (bufferSurface == IntPtr.Zero) + { + return; } + + if (Egl.GetCurrentSurface(Egl.DRAW) == Surface) + { + Egl.MakeCurrent(Display, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero); + } + if (Egl.DestroySurface(Display, bufferSurface)) + { + bufferSurface = IntPtr.Zero; + return; + } + + Debug.Print("[Warning] Failed to destroy {0}:{1}.", Surface.GetType().Name, Surface); + Surface = IntPtr.Zero; } public void TerminateDisplay() diff --git a/src/OpenTK/Platform/Factory.cs b/src/OpenTK/Platform/Factory.cs index 9e5eb668..c56d22bd 100644 --- a/src/OpenTK/Platform/Factory.cs +++ b/src/OpenTK/Platform/Factory.cs @@ -26,9 +26,7 @@ #endregion using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Text; namespace OpenTK.Platform { @@ -39,8 +37,10 @@ namespace OpenTK.Platform { #region Fields - bool disposed; - static IPlatformFactory default_implementation, embedded_implementation; + private bool disposed; + private static IPlatformFactory defaultImplementation; + private static IPlatformFactory embeddedImplementation; + private static IPlatformFactory angleImplementation; #endregion @@ -102,11 +102,18 @@ namespace OpenTK.Platform else if (Configuration.RunningOnAndroid) Embedded = new Android.AndroidFactory(); #endif else Embedded = new UnsupportedPlatform(); + + #if ANDROID + Angle = new UnsupportedPlatform(); + #else + Angle = new Egl.EglAnglePlatformFactory(Embedded); + #endif } #endif else { Embedded = new UnsupportedPlatform(); + Angle = Embedded; } if (Default is UnsupportedPlatform && !(Embedded is UnsupportedPlatform)) @@ -119,14 +126,20 @@ namespace OpenTK.Platform public static IPlatformFactory Default { - get { return default_implementation; } - private set { default_implementation = value; } + get { return defaultImplementation; } + private set { defaultImplementation = value; } } public static IPlatformFactory Embedded { - get { return embedded_implementation; } - private set { embedded_implementation = value; } + get { return embeddedImplementation; } + private set { embeddedImplementation = value; } + } + + public static IPlatformFactory Angle + { + get { return angleImplementation; } + private set { angleImplementation = value; } } #endregion @@ -136,60 +149,60 @@ namespace OpenTK.Platform public INativeWindow CreateNativeWindow(int x, int y, int width, int height, string title, GraphicsMode mode, GameWindowFlags options, DisplayDevice device) { - return default_implementation.CreateNativeWindow(x, y, width, height, title, mode, options, device); + return defaultImplementation.CreateNativeWindow(x, y, width, height, title, mode, options, device); } public IDisplayDeviceDriver CreateDisplayDeviceDriver() { - return default_implementation.CreateDisplayDeviceDriver(); + return defaultImplementation.CreateDisplayDeviceDriver(); } public IGraphicsContext CreateGLContext(GraphicsMode mode, IWindowInfo window, IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags) { - return default_implementation.CreateGLContext(mode, window, shareContext, directRendering, major, minor, flags); + return defaultImplementation.CreateGLContext(mode, window, shareContext, directRendering, major, minor, flags); } public IGraphicsContext CreateGLContext(ContextHandle handle, IWindowInfo window, IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags) { - return default_implementation.CreateGLContext(handle, window, shareContext, directRendering, major, minor, flags); + return defaultImplementation.CreateGLContext(handle, window, shareContext, directRendering, major, minor, flags); } public GraphicsContext.GetCurrentContextDelegate CreateGetCurrentGraphicsContext() { - return default_implementation.CreateGetCurrentGraphicsContext(); + return defaultImplementation.CreateGetCurrentGraphicsContext(); } public IKeyboardDriver2 CreateKeyboardDriver() { - return default_implementation.CreateKeyboardDriver(); + return defaultImplementation.CreateKeyboardDriver(); } public IMouseDriver2 CreateMouseDriver() { - return default_implementation.CreateMouseDriver(); + return defaultImplementation.CreateMouseDriver(); } public IGamePadDriver CreateGamePadDriver() { - return default_implementation.CreateGamePadDriver(); + return defaultImplementation.CreateGamePadDriver(); } public IJoystickDriver2 CreateJoystickDriver() { - return default_implementation.CreateJoystickDriver(); + return defaultImplementation.CreateJoystickDriver(); } [Obsolete] public IJoystickDriver CreateLegacyJoystickDriver() { #pragma warning disable 612,618 - return default_implementation.CreateLegacyJoystickDriver(); + return defaultImplementation.CreateLegacyJoystickDriver(); #pragma warning restore 612,618 } public void RegisterResource(IDisposable resource) { - default_implementation.RegisterResource(resource); + defaultImplementation.RegisterResource(resource); } class UnsupportedPlatform : PlatformFactoryBase diff --git a/src/OpenTK/Platform/Utilities.cs b/src/OpenTK/Platform/Utilities.cs index 2a531f62..6720066c 100644 --- a/src/OpenTK/Platform/Utilities.cs +++ b/src/OpenTK/Platform/Utilities.cs @@ -393,6 +393,24 @@ namespace OpenTK.Platform #endregion + #region + + #if !__MOBILE__ + /// + /// Creates an IWindowInfo instance for Angle rendering, based on + /// supplied platform window (e.g. a window created with + /// CreateWindowsWindowInfo, or CreateDummyWindowInfo). + /// + /// + /// + public static Egl.IAngleWindowInfo CreateAngleWindowInfo(IWindowInfo platformWindow) + { + return new Egl.AngleWindowInfo(platformWindow); + } + #endif + + #endregion + #endregion #region RelaxGraphicsMode diff --git a/src/OpenTK/Platform/Windows/XInputJoystick.cs b/src/OpenTK/Platform/Windows/XInputJoystick.cs index 6b718def..357bfd28 100644 --- a/src/OpenTK/Platform/Windows/XInputJoystick.cs +++ b/src/OpenTK/Platform/Windows/XInputJoystick.cs @@ -371,8 +371,8 @@ namespace OpenTK.Platform.Windows // Load the entry points we are interested in from that dll GetCapabilities = (XInputGetCapabilities)Load("XInputGetCapabilities", typeof(XInputGetCapabilities)); GetState = - // undocumented XInputGetStateEx with support for the "Guide" button (requires XINPUT_1_3+) - (XInputGetState)Load("XInputGetStateEx", typeof(XInputGetState)) ?? + // undocumented XInputGetStateEx (Ordinal 100) with support for the "Guide" button (requires XINPUT_1_3+) + (XInputGetState)Load(100, typeof(XInputGetState)) ?? // documented XInputGetState (no support for the "Guide" button) (XInputGetState)Load("XInputGetState", typeof(XInputGetState)); SetState = (XInputSetState)Load("XInputSetState", typeof(XInputSetState)); @@ -380,6 +380,14 @@ namespace OpenTK.Platform.Windows #region Private Members + Delegate Load(ushort ordinal, Type type) + { + IntPtr pfunc = Functions.GetProcAddress(dll, (IntPtr)ordinal); + if (pfunc != IntPtr.Zero) + return Marshal.GetDelegateForFunctionPointer(pfunc, type); + return null; + } + Delegate Load(string name, Type type) { IntPtr pfunc = Functions.GetProcAddress(dll, name); diff --git a/src/OpenTK/Platform/iPhoneOS/iPhoneOSGameView.cs b/src/OpenTK/Platform/iPhoneOS/iPhoneOSGameView.cs index 201f2aac..35cecbdb 100644 --- a/src/OpenTK/Platform/iPhoneOS/iPhoneOSGameView.cs +++ b/src/OpenTK/Platform/iPhoneOS/iPhoneOSGameView.cs @@ -553,31 +553,11 @@ namespace OpenTK.Platform.iPhoneOS GraphicsContext.MakeCurrent(WindowInfo); gl = GLCalls.GetGLCalls(ContextRenderingApi); - int oldFramebuffer = 0, oldRenderbuffer = 1; + int oldFramebuffer = 0; gl.GetInteger(All.FramebufferBindingOes, out oldFramebuffer); - gl.GetInteger(All.RenderbufferBindingOes, out oldRenderbuffer); + gl.GenFramebuffers(1, out framebuffer); - gl.GenRenderbuffers(1, out renderbuffer); - gl.BindRenderbuffer(All.RenderbufferOes, renderbuffer); - - if (!EAGLContext.RenderBufferStorage((uint) All.RenderbufferOes, eaglLayer)) { - gl.DeleteRenderbuffers(1, ref renderbuffer); - renderbuffer = 0; - gl.BindRenderbuffer(All.RenderbufferBindingOes, oldRenderbuffer); - throw new InvalidOperationException("Error with EAGLContext.RenderBufferStorage!"); - } - - gl.GenFramebuffers (1, out framebuffer); - gl.BindFramebuffer (All.FramebufferOes, framebuffer); - gl.FramebufferRenderbuffer (All.FramebufferOes, All.ColorAttachment0Oes, All.RenderbufferOes, renderbuffer); - - Size newSize = new Size( - (int) Math.Round(eaglLayer.Bounds.Size.Width), - (int) Math.Round(eaglLayer.Bounds.Size.Height)); - Size = newSize; - - gl.Viewport(0, 0, newSize.Width, newSize.Height); - gl.Scissor(0, 0, newSize.Width, newSize.Height); + CreateFrameBuffer(eaglLayer); frameBufferWindow = new WeakReference(Window); frameBufferLayer = new WeakReference(Layer); @@ -609,6 +589,53 @@ namespace OpenTK.Platform.iPhoneOS gl = null; } + /// + /// Resizes the frame buffer. + /// On IOS, when the device is rotated from portrait to landscape, if the framebuffer is not recreated + /// then the EAGLContext will stretch the render buffer to fit the screen. + /// If you care at all about aspect ratio, then this behavior is not desired, and in that case this method + /// should be called when rotating the device. + /// See here: http://stackoverflow.com/questions/20326947/opengl-what-need-to-reconfig-when-rotate-screen + /// And also here: https://gamedev.stackexchange.com/questions/75965/how-do-i-reconfigure-my-gles-frame-buffer-after-a-rotation + /// + public void ResizeFrameBuffer() + { + MakeCurrent(); + + gl.DeleteRenderbuffers(1, ref renderbuffer); + + CAEAGLLayer eaglLayer = (CAEAGLLayer)Layer; + CreateFrameBuffer(eaglLayer); + } + + void CreateFrameBuffer(CAEAGLLayer eaglLayer) + { + int oldRenderbuffer = 1; + gl.GetInteger(All.RenderbufferBindingOes, out oldRenderbuffer); + + gl.GenRenderbuffers(1, out renderbuffer); + gl.BindRenderbuffer(All.RenderbufferOes, renderbuffer); + + if (!EAGLContext.RenderBufferStorage((uint)All.RenderbufferOes, eaglLayer)) + { + gl.DeleteRenderbuffers(1, ref renderbuffer); + renderbuffer = 0; + gl.BindRenderbuffer(All.RenderbufferBindingOes, oldRenderbuffer); + throw new InvalidOperationException("Error with EAGLContext.RenderBufferStorage!"); + } + + gl.BindFramebuffer(All.FramebufferOes, framebuffer); + gl.FramebufferRenderbuffer(All.FramebufferOes, All.ColorAttachment0Oes, All.RenderbufferOes, renderbuffer); + + Size newSize = new Size( + (int)Math.Round(eaglLayer.Bounds.Size.Width), + (int)Math.Round(eaglLayer.Bounds.Size.Height)); + Size = newSize; + + gl.Viewport(0, 0, newSize.Width, newSize.Height); + gl.Scissor(0, 0, newSize.Width, newSize.Height); + } + public virtual void Close() { AssertValid(); @@ -861,20 +888,20 @@ namespace OpenTK.Platform.iPhoneOS internal void RunIteration (NSTimer timer) { var curUpdateTime = stopwatch.Elapsed; - if (prevUpdateTime == TimeSpan.Zero) - prevUpdateTime = curUpdateTime; - var t = (curUpdateTime - prevUpdateTime).TotalSeconds; - updateEventArgs.Time = t; + if (prevUpdateTime.Ticks != 0) { + var t = (curUpdateTime - prevUpdateTime).TotalSeconds; + updateEventArgs.Time = t; + } OnUpdateFrame(updateEventArgs); prevUpdateTime = curUpdateTime; gl.BindFramebuffer(All.FramebufferOes, framebuffer); var curRenderTime = stopwatch.Elapsed; - if (prevRenderTime == TimeSpan.Zero) - prevRenderTime = curRenderTime; - t = (curRenderTime - prevRenderTime).TotalSeconds; - renderEventArgs.Time = t; + if (prevRenderTime.Ticks == 0) { + var t = (curRenderTime - prevRenderTime).TotalSeconds; + renderEventArgs.Time = t; + } OnRenderFrame(renderEventArgs); prevRenderTime = curRenderTime; } diff --git a/src/OpenTK/Properties/AssemblyInfo.cs b/src/OpenTK/Properties/AssemblyInfo.cs index 4b085898..e6e2009c 100644 --- a/src/OpenTK/Properties/AssemblyInfo.cs +++ b/src/OpenTK/Properties/AssemblyInfo.cs @@ -5,13 +5,13 @@ using System.Reflection; [assembly: AssemblyTitleAttribute("OpenTK")] [assembly: AssemblyProductAttribute("OpenTK")] [assembly: AssemblyDescriptionAttribute("A set of fast, low-level C# bindings for OpenGL, OpenGL ES and OpenAL.")] -[assembly: AssemblyVersionAttribute("2.0.0")] -[assembly: AssemblyFileVersionAttribute("2.0.0")] +[assembly: AssemblyVersionAttribute("3.0.0")] +[assembly: AssemblyFileVersionAttribute("3.0.0")] [assembly: CLSCompliantAttribute(true)] [assembly: AssemblyCopyrightAttribute("Copyright (c) 2006 - 2016 Stefanos Apostolopoulos for the Open Toolkit library.")] namespace System { internal static class AssemblyVersionInformation { - internal const string Version = "2.0.0"; - internal const string InformationalVersion = "2.0.0"; + internal const string Version = "3.0.0"; + internal const string InformationalVersion = "3.0.0"; } }