Skip to content

Commit

Permalink
[Bind] 1.1 compatibility with string[] overloads
Browse files Browse the repository at this point in the history
  • Loading branch information
thefiddler committed Jun 10, 2014
1 parent ba764be commit b80f14b
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Source/Bind/ES/ES2Generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public ES2Generator(Settings settings, string dirName)
// 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.KeepStringArrayOverloads;
}
}
}
2 changes: 2 additions & 0 deletions Source/Bind/ES/ES3Generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public ES3Generator(Settings settings, string dirName)
// 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.KeepStringArrayOverloads;
}
}
}
2 changes: 2 additions & 0 deletions Source/Bind/ES/ESGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ public ESGenerator(Settings settings, string dirName)
// 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.KeepStringArrayOverloads;
}
}
}
4 changes: 2 additions & 2 deletions Source/Bind/GL2/GL2Generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public GL2Generator(Settings settings, string dirname)
Settings.DefaultDocPath = Path.Combine(
Settings.DefaultDocPath, "GL");

//Settings.DefaultCompatibility |=
// Settings.Legacy.UseDllImports | Settings.Legacy.UseWindowsCompatibleGL;
Settings.DefaultCompatibility |=
Settings.Legacy.KeepStringArrayOverloads;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions Source/Bind/GL2/GL4Generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public GL4Generator(Settings settings, string dirname)

Profile = "glcore";

//Settings.DefaultCompatibility |=
// Settings.Legacy.UseDllImports | Settings.Legacy.UseWindowsCompatibleGL;
Settings.DefaultCompatibility |=
Settings.Legacy.KeepStringArrayOverloads;
}
}
}
5 changes: 5 additions & 0 deletions Source/Bind/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ public enum Legacy
/// of the generated bindings.
/// </summary>
NoUnsignedOverloads = 0x40000,
/// <summary>
/// Generates string[] overloads for each ref string / out string parameter.
/// Use this option to maintain compatibility with the 1.0/1.1 GL and ES APIs.
/// </summary>
KeepStringArrayOverloads = 0x80000,
Tao = ConstIntEnums |
NoAdvancedEnumProcessing |
NoPublicUnsafeFunctions |
Expand Down

0 comments on commit b80f14b

Please sign in to comment.