From bd339523ab227739fc076bff2ee499b64e1b8482 Mon Sep 17 00:00:00 2001 From: thefiddler Date: Sat, 26 Apr 2014 14:22:37 +0200 Subject: [PATCH] [Bind] Do not generate DllImports These break dynamic loading of OpenGL ES and bloat OpenTK.dll with duplicated strings. The new extension loading mechanism is now fast enough to make DllImports unnecessary. --- Source/Bind/ES/ES2Generator.cs | 2 +- Source/Bind/ES/ES3Generator.cs | 2 +- Source/Bind/ES/ESGenerator.cs | 2 +- Source/Bind/GL2/GL2Generator.cs | 6 +++--- Source/Bind/GL2/GL4Generator.cs | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Source/Bind/ES/ES2Generator.cs b/Source/Bind/ES/ES2Generator.cs index a44ddae0..ccfafe4e 100644 --- a/Source/Bind/ES/ES2Generator.cs +++ b/Source/Bind/ES/ES2Generator.cs @@ -32,7 +32,7 @@ namespace Bind.ES // overloads using the "All" enum in addition to strongly-typed enums. // This can be disabled by passing "-o:-keep_untyped_enums" as a cmdline parameter. Settings.DefaultCompatibility |= Settings.Legacy.KeepUntypedEnums; - Settings.DefaultCompatibility |= Settings.Legacy.UseDllImports; + //Settings.DefaultCompatibility |= Settings.Legacy.UseDllImports; } } } diff --git a/Source/Bind/ES/ES3Generator.cs b/Source/Bind/ES/ES3Generator.cs index 2b3c664e..ba0e5135 100644 --- a/Source/Bind/ES/ES3Generator.cs +++ b/Source/Bind/ES/ES3Generator.cs @@ -32,7 +32,7 @@ namespace Bind.ES // overloads using the "All" enum in addition to strongly-typed enums. // This can be disabled by passing "-o:-keep_untyped_enums" as a cmdline parameter. Settings.DefaultCompatibility |= Settings.Legacy.KeepUntypedEnums; - Settings.DefaultCompatibility |= Settings.Legacy.UseDllImports; + //Settings.DefaultCompatibility |= Settings.Legacy.UseDllImports; } } } diff --git a/Source/Bind/ES/ESGenerator.cs b/Source/Bind/ES/ESGenerator.cs index 0a0a0f15..f9124754 100644 --- a/Source/Bind/ES/ESGenerator.cs +++ b/Source/Bind/ES/ESGenerator.cs @@ -35,7 +35,7 @@ namespace Bind.ES // overloads using the "All" enum in addition to strongly-typed enums. // This can be disabled by passing "-o:-keep_untyped_enums" as a cmdline parameter. Settings.DefaultCompatibility |= Settings.Legacy.KeepUntypedEnums; - Settings.DefaultCompatibility |= Settings.Legacy.UseDllImports; + //Settings.DefaultCompatibility |= Settings.Legacy.UseDllImports; } } } diff --git a/Source/Bind/GL2/GL2Generator.cs b/Source/Bind/GL2/GL2Generator.cs index 9b7ac0cd..9d1b4631 100644 --- a/Source/Bind/GL2/GL2Generator.cs +++ b/Source/Bind/GL2/GL2Generator.cs @@ -1,4 +1,4 @@ -#region License +#region License // // GL2Generator.cs // @@ -56,8 +56,8 @@ namespace Bind.GL2 Settings.DefaultDocPath = Path.Combine( Settings.DefaultDocPath, "GL"); - Settings.DefaultCompatibility |= - Settings.Legacy.UseDllImports | Settings.Legacy.UseWindowsCompatibleGL; + //Settings.DefaultCompatibility |= + // Settings.Legacy.UseDllImports | Settings.Legacy.UseWindowsCompatibleGL; } } } diff --git a/Source/Bind/GL2/GL4Generator.cs b/Source/Bind/GL2/GL4Generator.cs index f14e5a36..5266e895 100644 --- a/Source/Bind/GL2/GL4Generator.cs +++ b/Source/Bind/GL2/GL4Generator.cs @@ -1,4 +1,4 @@ -#region License +#region License // // The Open Toolkit Library License // @@ -50,8 +50,8 @@ namespace Bind.GL2 Profile = "glcore"; - Settings.DefaultCompatibility |= - Settings.Legacy.UseDllImports | Settings.Legacy.UseWindowsCompatibleGL; + //Settings.DefaultCompatibility |= + // Settings.Legacy.UseDllImports | Settings.Legacy.UseWindowsCompatibleGL; } } }