From af2c2fc64be61415d402e8b99d851797b33e3048 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Wed, 7 Dec 2011 00:22:10 +0000 Subject: [PATCH] Further improvements to suffix trimming regexes. Now matches GetInteger(ui)64 and does not match functions ending in "Coord", "Attrib", "Access" and more. --- Source/Bind/FuncProcessor.cs | 4 +- Source/OpenTK/Graphics/OpenGL/GL.cs | 42 ++++++++++---------- Source/OpenTK/Graphics/OpenGL/GLCore.cs | 2 +- Source/OpenTK/Graphics/OpenGL/GLDelegates.cs | 2 +- Source/OpenTK/Graphics/OpenGL/GLEnums.cs | 8 ++-- 5 files changed, 29 insertions(+), 29 deletions(-) diff --git a/Source/Bind/FuncProcessor.cs b/Source/Bind/FuncProcessor.cs index 7da19ec8..fb529845 100644 --- a/Source/Bind/FuncProcessor.cs +++ b/Source/Bind/FuncProcessor.cs @@ -41,9 +41,9 @@ namespace Bind { const string Path = "/signatures/replace/function[@name='{0}' and @extension='{1}']"; static readonly Regex Endings = - new Regex(@"((((d|f|fi)|(L?u?[isb]))_?(64)?v?)|(64)|v)", RegexOptions.Compiled | RegexOptions.RightToLeft); + new Regex(@"((((d|f|fi)|(L?(u?i?64)?u?[isb]))_?(64)?v?)|v)", RegexOptions.Compiled | RegexOptions.RightToLeft); static readonly Regex EndingsNotToTrim = - new Regex("(ib|[tdrey]s|[eE]n[vd]|bled|Flag|Tess|Status|Pixels|Instanced|Indexed|Varyings|Boolean|IDs)", RegexOptions.Compiled | RegexOptions.RightToLeft); + new Regex("(ib|[tdrey]s|[eE]n[vd]|bled|Attrib|Access|Coord|Flag|Tess|Status|Pixels|Instanced|Indexed|Varyings|Boolean|IDs|Uniforms)", RegexOptions.Compiled | RegexOptions.RightToLeft); static readonly Regex EndingsAddV = new Regex("^0", RegexOptions.Compiled); string Overrides { get; set; } diff --git a/Source/OpenTK/Graphics/OpenGL/GL.cs b/Source/OpenTK/Graphics/OpenGL/GL.cs index dfe1e1c6..ba764839 100644 --- a/Source/OpenTK/Graphics/OpenGL/GL.cs +++ b/Source/OpenTK/Graphics/OpenGL/GL.cs @@ -29974,7 +29974,7 @@ namespace OpenTK.Graphics.OpenGL /// [requires: ATI_fragment_shader] [AutoGenerated(Category = "ATI_fragment_shader", Version = "1.2", EntryPoint = "glPassTexCoordATI")] public static - void PassTexCoor(Int32 dst, Int32 coord, OpenTK.Graphics.OpenGL.AtiFragmentShader swizzle) + void PassTexCoord(Int32 dst, Int32 coord, OpenTK.Graphics.OpenGL.AtiFragmentShader swizzle) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -29990,7 +29990,7 @@ namespace OpenTK.Graphics.OpenGL [System.CLSCompliant(false)] [AutoGenerated(Category = "ATI_fragment_shader", Version = "1.2", EntryPoint = "glPassTexCoordATI")] public static - void PassTexCoor(UInt32 dst, UInt32 coord, OpenTK.Graphics.OpenGL.AtiFragmentShader swizzle) + void PassTexCoord(UInt32 dst, UInt32 coord, OpenTK.Graphics.OpenGL.AtiFragmentShader swizzle) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -56903,7 +56903,7 @@ namespace OpenTK.Graphics.OpenGL /// [requires: v3.2] [AutoGenerated(Category = "VERSION_3_2", Version = "3.2", EntryPoint = "glGetInteger64i_v")] public static - void GetInteger64(OpenTK.Graphics.OpenGL.Version32 target, Int32 index, [OutAttribute] Int64[] data) + void GetInteger(OpenTK.Graphics.OpenGL.GetIndexedPName target, Int32 index, [OutAttribute] Int64[] data) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -56913,7 +56913,7 @@ namespace OpenTK.Graphics.OpenGL { fixed (Int64* data_ptr = data) { - Delegates.glGetInteger64i_v((OpenTK.Graphics.OpenGL.Version32)target, (UInt32)index, (Int64*)data_ptr); + Delegates.glGetInteger64i_v((OpenTK.Graphics.OpenGL.GetIndexedPName)target, (UInt32)index, (Int64*)data_ptr); } } #if DEBUG @@ -56924,7 +56924,7 @@ namespace OpenTK.Graphics.OpenGL /// [requires: v3.2] [AutoGenerated(Category = "VERSION_3_2", Version = "3.2", EntryPoint = "glGetInteger64i_v")] public static - void GetInteger64(OpenTK.Graphics.OpenGL.Version32 target, Int32 index, [OutAttribute] out Int64 data) + void GetInteger(OpenTK.Graphics.OpenGL.GetIndexedPName target, Int32 index, [OutAttribute] out Int64 data) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -56934,7 +56934,7 @@ namespace OpenTK.Graphics.OpenGL { fixed (Int64* data_ptr = &data) { - Delegates.glGetInteger64i_v((OpenTK.Graphics.OpenGL.Version32)target, (UInt32)index, (Int64*)data_ptr); + Delegates.glGetInteger64i_v((OpenTK.Graphics.OpenGL.GetIndexedPName)target, (UInt32)index, (Int64*)data_ptr); data = *data_ptr; } } @@ -56947,13 +56947,13 @@ namespace OpenTK.Graphics.OpenGL [System.CLSCompliant(false)] [AutoGenerated(Category = "VERSION_3_2", Version = "3.2", EntryPoint = "glGetInteger64i_v")] public static - unsafe void GetInteger64(OpenTK.Graphics.OpenGL.Version32 target, Int32 index, [OutAttribute] Int64* data) + unsafe void GetInteger(OpenTK.Graphics.OpenGL.GetIndexedPName target, Int32 index, [OutAttribute] Int64* data) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) { #endif - Delegates.glGetInteger64i_v((OpenTK.Graphics.OpenGL.Version32)target, (UInt32)index, (Int64*)data); + Delegates.glGetInteger64i_v((OpenTK.Graphics.OpenGL.GetIndexedPName)target, (UInt32)index, (Int64*)data); #if DEBUG } #endif @@ -56963,7 +56963,7 @@ namespace OpenTK.Graphics.OpenGL [System.CLSCompliant(false)] [AutoGenerated(Category = "VERSION_3_2", Version = "3.2", EntryPoint = "glGetInteger64i_v")] public static - void GetInteger64(OpenTK.Graphics.OpenGL.Version32 target, UInt32 index, [OutAttribute] Int64[] data) + void GetInteger(OpenTK.Graphics.OpenGL.GetIndexedPName target, UInt32 index, [OutAttribute] Int64[] data) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -56973,7 +56973,7 @@ namespace OpenTK.Graphics.OpenGL { fixed (Int64* data_ptr = data) { - Delegates.glGetInteger64i_v((OpenTK.Graphics.OpenGL.Version32)target, (UInt32)index, (Int64*)data_ptr); + Delegates.glGetInteger64i_v((OpenTK.Graphics.OpenGL.GetIndexedPName)target, (UInt32)index, (Int64*)data_ptr); } } #if DEBUG @@ -56985,7 +56985,7 @@ namespace OpenTK.Graphics.OpenGL [System.CLSCompliant(false)] [AutoGenerated(Category = "VERSION_3_2", Version = "3.2", EntryPoint = "glGetInteger64i_v")] public static - void GetInteger64(OpenTK.Graphics.OpenGL.Version32 target, UInt32 index, [OutAttribute] out Int64 data) + void GetInteger(OpenTK.Graphics.OpenGL.GetIndexedPName target, UInt32 index, [OutAttribute] out Int64 data) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -56995,7 +56995,7 @@ namespace OpenTK.Graphics.OpenGL { fixed (Int64* data_ptr = &data) { - Delegates.glGetInteger64i_v((OpenTK.Graphics.OpenGL.Version32)target, (UInt32)index, (Int64*)data_ptr); + Delegates.glGetInteger64i_v((OpenTK.Graphics.OpenGL.GetIndexedPName)target, (UInt32)index, (Int64*)data_ptr); data = *data_ptr; } } @@ -57008,13 +57008,13 @@ namespace OpenTK.Graphics.OpenGL [System.CLSCompliant(false)] [AutoGenerated(Category = "VERSION_3_2", Version = "3.2", EntryPoint = "glGetInteger64i_v")] public static - unsafe void GetInteger64(OpenTK.Graphics.OpenGL.Version32 target, UInt32 index, [OutAttribute] Int64* data) + unsafe void GetInteger(OpenTK.Graphics.OpenGL.GetIndexedPName target, UInt32 index, [OutAttribute] Int64* data) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) { #endif - Delegates.glGetInteger64i_v((OpenTK.Graphics.OpenGL.Version32)target, (UInt32)index, (Int64*)data); + Delegates.glGetInteger64i_v((OpenTK.Graphics.OpenGL.GetIndexedPName)target, (UInt32)index, (Int64*)data); #if DEBUG } #endif @@ -163805,7 +163805,7 @@ namespace OpenTK.Graphics.OpenGL /// [requires: NV_vertex_buffer_unified_memory] [AutoGenerated(Category = "NV_vertex_buffer_unified_memory", Version = "1.2", EntryPoint = "glGetIntegerui64i_vNV")] public static - void GetIntegerui64(OpenTK.Graphics.OpenGL.NvVertexBufferUnifiedMemory value, Int32 index, [OutAttribute] Int64[] result) + void GetInteger(OpenTK.Graphics.OpenGL.NvVertexBufferUnifiedMemory value, Int32 index, [OutAttribute] Int64[] result) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -163826,7 +163826,7 @@ namespace OpenTK.Graphics.OpenGL /// [requires: NV_vertex_buffer_unified_memory] [AutoGenerated(Category = "NV_vertex_buffer_unified_memory", Version = "1.2", EntryPoint = "glGetIntegerui64i_vNV")] public static - void GetIntegerui64(OpenTK.Graphics.OpenGL.NvVertexBufferUnifiedMemory value, Int32 index, [OutAttribute] out Int64 result) + void GetInteger(OpenTK.Graphics.OpenGL.NvVertexBufferUnifiedMemory value, Int32 index, [OutAttribute] out Int64 result) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -163849,7 +163849,7 @@ namespace OpenTK.Graphics.OpenGL [System.CLSCompliant(false)] [AutoGenerated(Category = "NV_vertex_buffer_unified_memory", Version = "1.2", EntryPoint = "glGetIntegerui64i_vNV")] public static - unsafe void GetIntegerui64(OpenTK.Graphics.OpenGL.NvVertexBufferUnifiedMemory value, Int32 index, [OutAttribute] Int64* result) + unsafe void GetInteger(OpenTK.Graphics.OpenGL.NvVertexBufferUnifiedMemory value, Int32 index, [OutAttribute] Int64* result) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -163865,7 +163865,7 @@ namespace OpenTK.Graphics.OpenGL [System.CLSCompliant(false)] [AutoGenerated(Category = "NV_vertex_buffer_unified_memory", Version = "1.2", EntryPoint = "glGetIntegerui64i_vNV")] public static - void GetIntegerui64(OpenTK.Graphics.OpenGL.NvVertexBufferUnifiedMemory value, UInt32 index, [OutAttribute] UInt64[] result) + void GetInteger(OpenTK.Graphics.OpenGL.NvVertexBufferUnifiedMemory value, UInt32 index, [OutAttribute] UInt64[] result) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -163887,7 +163887,7 @@ namespace OpenTK.Graphics.OpenGL [System.CLSCompliant(false)] [AutoGenerated(Category = "NV_vertex_buffer_unified_memory", Version = "1.2", EntryPoint = "glGetIntegerui64i_vNV")] public static - void GetIntegerui64(OpenTK.Graphics.OpenGL.NvVertexBufferUnifiedMemory value, UInt32 index, [OutAttribute] out UInt64 result) + void GetInteger(OpenTK.Graphics.OpenGL.NvVertexBufferUnifiedMemory value, UInt32 index, [OutAttribute] out UInt64 result) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -163910,7 +163910,7 @@ namespace OpenTK.Graphics.OpenGL [System.CLSCompliant(false)] [AutoGenerated(Category = "NV_vertex_buffer_unified_memory", Version = "1.2", EntryPoint = "glGetIntegerui64i_vNV")] public static - unsafe void GetIntegerui64(OpenTK.Graphics.OpenGL.NvVertexBufferUnifiedMemory value, UInt32 index, [OutAttribute] UInt64* result) + unsafe void GetInteger(OpenTK.Graphics.OpenGL.NvVertexBufferUnifiedMemory value, UInt32 index, [OutAttribute] UInt64* result) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -179489,7 +179489,7 @@ namespace OpenTK.Graphics.OpenGL /// [requires: NV_vdpau_interop] [AutoGenerated(Category = "NV_vdpau_interop", Version = "4.1", EntryPoint = "glVDPAUSurfaceAccessNV")] public static - void VDPAUSurfaceAcces(IntPtr surface, OpenTK.Graphics.OpenGL.NvVdpauInterop access) + void VDPAUSurfaceAccess(IntPtr surface, OpenTK.Graphics.OpenGL.NvVdpauInterop access) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) diff --git a/Source/OpenTK/Graphics/OpenGL/GLCore.cs b/Source/OpenTK/Graphics/OpenGL/GLCore.cs index 6cca373f..33e98c67 100644 --- a/Source/OpenTK/Graphics/OpenGL/GLCore.cs +++ b/Source/OpenTK/Graphics/OpenGL/GLCore.cs @@ -1943,7 +1943,7 @@ namespace OpenTK.Graphics.OpenGL internal extern static Int32 GetInstrumentsSGIX(); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glGetInteger64i_v", ExactSpelling = true)] - internal extern static unsafe void GetInteger64i_v(OpenTK.Graphics.OpenGL.Version32 target, UInt32 index, [OutAttribute] Int64* data); + internal extern static unsafe void GetInteger64i_v(OpenTK.Graphics.OpenGL.GetIndexedPName target, UInt32 index, [OutAttribute] Int64* data); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glGetInteger64v", ExactSpelling = true)] internal extern static unsafe void GetInteger64v(OpenTK.Graphics.OpenGL.ArbSync pname, [OutAttribute] Int64* @params); diff --git a/Source/OpenTK/Graphics/OpenGL/GLDelegates.cs b/Source/OpenTK/Graphics/OpenGL/GLDelegates.cs index 9714c53e..ffe7db47 100644 --- a/Source/OpenTK/Graphics/OpenGL/GLDelegates.cs +++ b/Source/OpenTK/Graphics/OpenGL/GLDelegates.cs @@ -1941,7 +1941,7 @@ namespace OpenTK.Graphics.OpenGL internal delegate Int32 GetInstrumentsSGIX(); internal static GetInstrumentsSGIX glGetInstrumentsSGIX; [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate void GetInteger64i_v(OpenTK.Graphics.OpenGL.Version32 target, UInt32 index, [OutAttribute] Int64* data); + internal unsafe delegate void GetInteger64i_v(OpenTK.Graphics.OpenGL.GetIndexedPName target, UInt32 index, [OutAttribute] Int64* data); internal unsafe static GetInteger64i_v glGetInteger64i_v; [System.Security.SuppressUnmanagedCodeSecurity()] internal unsafe delegate void GetInteger64v(OpenTK.Graphics.OpenGL.ArbSync pname, [OutAttribute] Int64* @params); diff --git a/Source/OpenTK/Graphics/OpenGL/GLEnums.cs b/Source/OpenTK/Graphics/OpenGL/GLEnums.cs index 4f3d99b3..46f326de 100644 --- a/Source/OpenTK/Graphics/OpenGL/GLEnums.cs +++ b/Source/OpenTK/Graphics/OpenGL/GLEnums.cs @@ -23046,7 +23046,7 @@ namespace OpenTK.Graphics.OpenGL } /// - /// Used in GL.Ati.AlphaFragmentOp1, GL.Ati.AlphaFragmentOp2, GL.Ati.AlphaFragmentOp3, GL.Ati.ColorFragmentOp1, GL.Ati.ColorFragmentOp2, GL.Ati.ColorFragmentOp3, GL.Ati.PassTexCoor, GL.Ati.SampleMap + /// Used in GL.Ati.AlphaFragmentOp1, GL.Ati.AlphaFragmentOp2, GL.Ati.AlphaFragmentOp3, GL.Ati.ColorFragmentOp1, GL.Ati.ColorFragmentOp2, GL.Ati.ColorFragmentOp3, GL.Ati.PassTexCoord, GL.Ati.SampleMap /// public enum AtiFragmentShader : int { @@ -37767,7 +37767,7 @@ namespace OpenTK.Graphics.OpenGL } /// - /// Used in GL.NV.VDPAUGetSurface, GL.NV.VDPAURegisterOutputSurface, GL.NV.VDPAURegisterVideoSurface, GL.NV.VDPAUSurfaceAcces + /// Used in GL.NV.VDPAUGetSurface, GL.NV.VDPAURegisterOutputSurface, GL.NV.VDPAURegisterVideoSurface, GL.NV.VDPAUSurfaceAccess /// public enum NvVdpauInterop : int { @@ -37843,7 +37843,7 @@ namespace OpenTK.Graphics.OpenGL } /// - /// Used in GL.NV.BufferAddressRange, GL.NV.ColorFormat, GL.NV.FogCoordFormat, GL.NV.GetIntegerui64, GL.NV.IndexFormat, GL.NV.NormalFormat, GL.NV.SecondaryColorFormat, GL.NV.TexCoordFormat, GL.NV.VertexAttribFormat, GL.NV.VertexAttribIFormat, GL.NV.VertexFormat + /// Used in GL.NV.BufferAddressRange, GL.NV.ColorFormat, GL.NV.FogCoordFormat, GL.NV.GetInteger, GL.NV.IndexFormat, GL.NV.NormalFormat, GL.NV.SecondaryColorFormat, GL.NV.TexCoordFormat, GL.NV.VertexAttribFormat, GL.NV.VertexAttribIFormat, GL.NV.VertexFormat /// public enum NvVertexBufferUnifiedMemory : int { @@ -51169,7 +51169,7 @@ namespace OpenTK.Graphics.OpenGL } /// - /// Used in GL.GetInteger64 + /// Not used directly. /// public enum Version32 : int {