[Bind] Do not generate DllImports
authorthefiddler <stapostol@gmail.com>
Sat, 26 Apr 2014 12:22:37 +0000 (14:22 +0200)
committerthefiddler <stapostol@gmail.com>
Sat, 26 Apr 2014 12:22:37 +0000 (14:22 +0200)
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
Source/Bind/ES/ES3Generator.cs
Source/Bind/ES/ESGenerator.cs
Source/Bind/GL2/GL2Generator.cs
Source/Bind/GL2/GL4Generator.cs

index a44ddae..ccfafe4 100644 (file)
@@ -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;
         }
     }
 }
index 2b3c664..ba0e513 100644 (file)
@@ -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;
         }
     }
 }
index 0a0a0f1..f912475 100644 (file)
@@ -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;
         }
     }
 }
index 9b7ac0c..9d1b463 100644 (file)
@@ -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;
         }
     }
 }
index f14e5a3..5266e89 100644 (file)
@@ -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;
         }
     }
 }