From 61f17b5e7cef7d0e130d063a2beb7f5ac8fa1cc2 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Sat, 10 Nov 2007 10:27:19 +0000 Subject: [PATCH] Added a new Settings.Legacy option: do not turn bools into ints. Changed the default Tao options to not turn bools into ints and use nested enums. Added documentation to these options. --- Source/Bind/Settings.cs | 48 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/Source/Bind/Settings.cs b/Source/Bind/Settings.cs index a39c836c..2e3eb5cd 100644 --- a/Source/Bind/Settings.cs +++ b/Source/Bind/Settings.cs @@ -83,17 +83,63 @@ namespace Bind [Flags] public enum Legacy { + /// + /// Default value. + /// None = 0x00, + /// + /// Leave enums as plain const ints. + /// ConstIntEnums = 0x01, + /// + /// Leave enums in the default STRANGE_capitalization.ALL_CAPS form. + /// NoAdvancedEnumProcessing = 0x02, + /// + /// Don't allow unsafe wrappers in the interface. + /// NoPublicUnsafeFunctions = 0x04, + /// + /// Don't trim the [fdisub]v? endings from functions. + /// NoTrimFunctionEnding = NoPublicUnsafeFunctions, + /// + /// Don't trim the [gl|wgl|glx|glu] prefixes from functions. + /// NoTrimFunctionPrefix = 0x08, + /// + /// Don't spearate functions in different namespaces, according to their extension category + /// (e.g. GL.Arb, GL.Ext etc). + /// NoSeparateFunctionNamespaces = 0x10, + /// + /// No public void* parameters (should always be enabled. Disable at your own risk. Disabling + /// means that BitmapData.Scan0 and other .Net properties/functions must be cast to (void*) + /// explicitly, to avoid the 'object' overload from being called.) + /// TurnVoidPointersToIntPtr = 0x20, + /// + /// Generate all possible permutations for ref/array/pointer parameters. + /// GenerateAllPermutations = 0x40, + /// + /// Nest enums inside the GL class. + /// NestedEnums = 0x80, - Tao = ConstIntEnums | NoAdvancedEnumProcessing | NoPublicUnsafeFunctions | NoTrimFunctionEnding | NoTrimFunctionPrefix | NoSeparateFunctionNamespaces | TurnVoidPointersToIntPtr | GenerateAllPermutations, + /// + /// Turn GLboolean to int (Boolean enum), not bool. + /// + NoBoolParameters = 0100, + Tao = ConstIntEnums | + NoAdvancedEnumProcessing | + NoPublicUnsafeFunctions | + NoTrimFunctionEnding | + NoTrimFunctionPrefix | + NoSeparateFunctionNamespaces | + TurnVoidPointersToIntPtr | + NestedEnums | + NoBoolParameters, + /*GenerateAllPermutations,*/ } public static string WindowsGDI = "OpenTK.Platform.Windows.API";