From 99a3803e8af773b7a2c533a68957232e8f83bc84 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Wed, 3 Feb 2010 19:55:09 +0000 Subject: [PATCH] Backported fix for issue [#1538] from 1.0 branch. --- Source/Bind/Specifications/GL2/enumext.spec | 14 ++++++++++++++ Source/Bind/Specifications/GL2/gloverrides.xml | 8 ++++++++ Source/OpenTK/Graphics/OpenGL/GL.cs | 8 ++++---- Source/OpenTK/Graphics/OpenGL/GLCore.cs | 4 ++-- Source/OpenTK/Graphics/OpenGL/GLDelegates.cs | 4 ++-- Source/OpenTK/Graphics/OpenGL/GLEnums.cs | 12 ++++++++++++ Source/OpenTK/Graphics/OpenGL/GLHelper.cs | 18 ++++++++++++++++++ 7 files changed, 60 insertions(+), 8 deletions(-) diff --git a/Source/Bind/Specifications/GL2/enumext.spec b/Source/Bind/Specifications/GL2/enumext.spec index 35c55018..a01d03c2 100644 --- a/Source/Bind/Specifications/GL2/enumext.spec +++ b/Source/Bind/Specifications/GL2/enumext.spec @@ -6114,6 +6114,20 @@ APPLE_row_bytes enum: # #------------------------------------------------------------------------------ + +# Version 1.1 + +ArrayCap enum: + use GetPName VERTEX_ARRAY + use GetPName NORMAL_ARRAY + use GetPName COLOR_ARRAY + SECONDARY_COLOR_ARRAY = 0x845E # 1 I + use GetPName INDEX_ARRAY + use GetPName EDGE_FLAG_ARRAY + use GetPName TEXTURE_COORD_ARRAY + FOG_COORD_ARRAY = 0x8457 + + # Version 1.2 diff --git a/Source/Bind/Specifications/GL2/gloverrides.xml b/Source/Bind/Specifications/GL2/gloverrides.xml index cd42adf6..f8346ebb 100644 --- a/Source/Bind/Specifications/GL2/gloverrides.xml +++ b/Source/Bind/Specifications/GL2/gloverrides.xml @@ -2,6 +2,14 @@ + + + ArrayCap + + + + ArrayCap + PixelInternalFormat diff --git a/Source/OpenTK/Graphics/OpenGL/GL.cs b/Source/OpenTK/Graphics/OpenGL/GL.cs index 1559d707..c3514d1b 100644 --- a/Source/OpenTK/Graphics/OpenGL/GL.cs +++ b/Source/OpenTK/Graphics/OpenGL/GL.cs @@ -36732,13 +36732,13 @@ namespace OpenTK.Graphics.OpenGL [AutoGenerated(Category = "Version11Deprecated", Version = "1.1", EntryPoint = "glDisableClientState")] public static - void DisableClientState(OpenTK.Graphics.OpenGL.EnableCap array) + void DisableClientState(OpenTK.Graphics.OpenGL.ArrayCap array) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) { #endif - Delegates.glDisableClientState((OpenTK.Graphics.OpenGL.EnableCap)array); + Delegates.glDisableClientState((OpenTK.Graphics.OpenGL.ArrayCap)array); #if DEBUG } #endif @@ -38780,13 +38780,13 @@ namespace OpenTK.Graphics.OpenGL /// [AutoGenerated(Category = "Version11Deprecated", Version = "1.1", EntryPoint = "glEnableClientState")] public static - void EnableClientState(OpenTK.Graphics.OpenGL.EnableCap array) + void EnableClientState(OpenTK.Graphics.OpenGL.ArrayCap array) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) { #endif - Delegates.glEnableClientState((OpenTK.Graphics.OpenGL.EnableCap)array); + Delegates.glEnableClientState((OpenTK.Graphics.OpenGL.ArrayCap)array); #if DEBUG } #endif diff --git a/Source/OpenTK/Graphics/OpenGL/GLCore.cs b/Source/OpenTK/Graphics/OpenGL/GLCore.cs index a8f0e67d..52229d20 100644 --- a/Source/OpenTK/Graphics/OpenGL/GLCore.cs +++ b/Source/OpenTK/Graphics/OpenGL/GLCore.cs @@ -983,7 +983,7 @@ namespace OpenTK.Graphics.OpenGL internal extern static void Disable(OpenTK.Graphics.OpenGL.EnableCap cap); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDisableClientState", ExactSpelling = true)] - internal extern static void DisableClientState(OpenTK.Graphics.OpenGL.EnableCap array); + internal extern static void DisableClientState(OpenTK.Graphics.OpenGL.ArrayCap array); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDisableClientStateIndexedEXT", ExactSpelling = true)] internal extern static void DisableClientStateIndexedEXT(OpenTK.Graphics.OpenGL.EnableCap array, UInt32 index); @@ -1106,7 +1106,7 @@ namespace OpenTK.Graphics.OpenGL internal extern static void Enable(OpenTK.Graphics.OpenGL.EnableCap cap); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glEnableClientState", ExactSpelling = true)] - internal extern static void EnableClientState(OpenTK.Graphics.OpenGL.EnableCap array); + internal extern static void EnableClientState(OpenTK.Graphics.OpenGL.ArrayCap array); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glEnableClientStateIndexedEXT", ExactSpelling = true)] internal extern static void EnableClientStateIndexedEXT(OpenTK.Graphics.OpenGL.EnableCap array, UInt32 index); diff --git a/Source/OpenTK/Graphics/OpenGL/GLDelegates.cs b/Source/OpenTK/Graphics/OpenGL/GLDelegates.cs index 2306cd3c..9926139a 100644 --- a/Source/OpenTK/Graphics/OpenGL/GLDelegates.cs +++ b/Source/OpenTK/Graphics/OpenGL/GLDelegates.cs @@ -981,7 +981,7 @@ namespace OpenTK.Graphics.OpenGL internal delegate void Disable(OpenTK.Graphics.OpenGL.EnableCap cap); internal static Disable glDisable; [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate void DisableClientState(OpenTK.Graphics.OpenGL.EnableCap array); + internal delegate void DisableClientState(OpenTK.Graphics.OpenGL.ArrayCap array); internal static DisableClientState glDisableClientState; [System.Security.SuppressUnmanagedCodeSecurity()] internal delegate void DisableClientStateIndexedEXT(OpenTK.Graphics.OpenGL.EnableCap array, UInt32 index); @@ -1104,7 +1104,7 @@ namespace OpenTK.Graphics.OpenGL internal delegate void Enable(OpenTK.Graphics.OpenGL.EnableCap cap); internal static Enable glEnable; [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate void EnableClientState(OpenTK.Graphics.OpenGL.EnableCap array); + internal delegate void EnableClientState(OpenTK.Graphics.OpenGL.ArrayCap array); internal static EnableClientState glEnableClientState; [System.Security.SuppressUnmanagedCodeSecurity()] internal delegate void EnableClientStateIndexedEXT(OpenTK.Graphics.OpenGL.EnableCap array, UInt32 index); diff --git a/Source/OpenTK/Graphics/OpenGL/GLEnums.cs b/Source/OpenTK/Graphics/OpenGL/GLEnums.cs index 66658e4a..64e23c80 100644 --- a/Source/OpenTK/Graphics/OpenGL/GLEnums.cs +++ b/Source/OpenTK/Graphics/OpenGL/GLEnums.cs @@ -4821,6 +4821,18 @@ namespace OpenTK.Graphics.OpenGL { } + public enum ArrayCap : int + { + VertexArray = ((int)0x8074), + NormalArray = ((int)0x8075), + ColorArray = ((int)0x8076), + IndexArray = ((int)0x8077), + TextureCoordArray = ((int)0x8078), + EdgeFlagArray = ((int)0x8079), + FogCoordArray = ((int)0x8457), + SecondaryColorArray = ((int)0x845E), + } + public enum AssemblyProgramFormatArb : int { ProgramFormatAsciiArb = ((int)0x8875), diff --git a/Source/OpenTK/Graphics/OpenGL/GLHelper.cs b/Source/OpenTK/Graphics/OpenGL/GLHelper.cs index 02e73a0c..65274be7 100644 --- a/Source/OpenTK/Graphics/OpenGL/GLHelper.cs +++ b/Source/OpenTK/Graphics/OpenGL/GLHelper.cs @@ -874,6 +874,24 @@ namespace OpenTK.Graphics.OpenGL #endregion + #region Obsolete + + [AutoGenerated(Category = "Version11Deprecated", Version = "1.1", EntryPoint = "glDisableClientState")] + [Obsolete("Use DisableClientState(ArrayCap) instead.")] + public static void DisableClientState(OpenTK.Graphics.OpenGL.EnableCap array) + { + DisableClientState((ArrayCap)array); + } + + [AutoGenerated(Category = "Version11Deprecated", Version = "1.1", EntryPoint = "glEnableClientState")] + [Obsolete("Use EnableClientState(ArrayCap) instead.")] + public static void EnableClientState(OpenTK.Graphics.OpenGL.EnableCap array) + { + EnableClientState((ArrayCap)array); + } + + #endregion + #pragma warning restore 3019 #pragma warning restore 1591 #pragma warning restore 1572