From 8de24c97fb2176b778c8d240f2f1f63509c0e41c Mon Sep 17 00:00:00 2001 From: Stefanos A Date: Thu, 7 Nov 2013 10:33:02 +0100 Subject: [PATCH] ES 3.0 strong enums for DrawBuffersEXT and NV Relax the extension constraint in DrawBuffers, in order to add strong enums to the extension varieties of this function. --- Source/Bind/Specifications/GL2/overrides.xml | 6 ++-- Source/OpenTK/Graphics/ES30/ES30.cs | 32 ++++++++++---------- Source/OpenTK/Graphics/ES30/ES30Core.cs | 4 +-- Source/OpenTK/Graphics/ES30/ES30Delegates.cs | 4 +-- Source/OpenTK/Graphics/ES30/ES30Enums.cs | 4 +-- 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Source/Bind/Specifications/GL2/overrides.xml b/Source/Bind/Specifications/GL2/overrides.xml index 3bfccfba..541107af 100644 --- a/Source/Bind/Specifications/GL2/overrides.xml +++ b/Source/Bind/Specifications/GL2/overrides.xml @@ -5310,7 +5310,7 @@ - + DrawBufferMode @@ -5323,10 +5323,10 @@ ClearBufferMask - + ClearBuffer - + ClearBufferCombined diff --git a/Source/OpenTK/Graphics/ES30/ES30.cs b/Source/OpenTK/Graphics/ES30/ES30.cs index fe68fb5c..3d335f03 100644 --- a/Source/OpenTK/Graphics/ES30/ES30.cs +++ b/Source/OpenTK/Graphics/ES30/ES30.cs @@ -35348,7 +35348,7 @@ namespace OpenTK.Graphics.ES30 /// [AutoGenerated(Category = "EXT_draw_buffers", Version = "", EntryPoint = "glDrawBuffersEXT")] public static - void DrawBuffers(Int32 n, OpenTK.Graphics.ES30.All[] bufs) + void DrawBuffers(Int32 n, OpenTK.Graphics.ES30.DrawBufferMode[] bufs) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -35356,9 +35356,9 @@ namespace OpenTK.Graphics.ES30 #endif unsafe { - fixed (OpenTK.Graphics.ES30.All* bufs_ptr = bufs) + fixed (OpenTK.Graphics.ES30.DrawBufferMode* bufs_ptr = bufs) { - Delegates.glDrawBuffersEXT((Int32)n, (OpenTK.Graphics.ES30.All*)bufs_ptr); + Delegates.glDrawBuffersEXT((Int32)n, (OpenTK.Graphics.ES30.DrawBufferMode*)bufs_ptr); } } #if DEBUG @@ -35382,7 +35382,7 @@ namespace OpenTK.Graphics.ES30 /// [AutoGenerated(Category = "EXT_draw_buffers", Version = "", EntryPoint = "glDrawBuffersEXT")] public static - void DrawBuffers(Int32 n, ref OpenTK.Graphics.ES30.All bufs) + void DrawBuffers(Int32 n, ref OpenTK.Graphics.ES30.DrawBufferMode bufs) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -35390,9 +35390,9 @@ namespace OpenTK.Graphics.ES30 #endif unsafe { - fixed (OpenTK.Graphics.ES30.All* bufs_ptr = &bufs) + fixed (OpenTK.Graphics.ES30.DrawBufferMode* bufs_ptr = &bufs) { - Delegates.glDrawBuffersEXT((Int32)n, (OpenTK.Graphics.ES30.All*)bufs_ptr); + Delegates.glDrawBuffersEXT((Int32)n, (OpenTK.Graphics.ES30.DrawBufferMode*)bufs_ptr); } } #if DEBUG @@ -35417,13 +35417,13 @@ namespace OpenTK.Graphics.ES30 [System.CLSCompliant(false)] [AutoGenerated(Category = "EXT_draw_buffers", Version = "", EntryPoint = "glDrawBuffersEXT")] public static - unsafe void DrawBuffers(Int32 n, OpenTK.Graphics.ES30.All* bufs) + unsafe void DrawBuffers(Int32 n, OpenTK.Graphics.ES30.DrawBufferMode* bufs) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) { #endif - Delegates.glDrawBuffersEXT((Int32)n, (OpenTK.Graphics.ES30.All*)bufs); + Delegates.glDrawBuffersEXT((Int32)n, (OpenTK.Graphics.ES30.DrawBufferMode*)bufs); #if DEBUG } #endif @@ -48266,7 +48266,7 @@ namespace OpenTK.Graphics.ES30 /// [AutoGenerated(Category = "NV_draw_buffers", Version = "", EntryPoint = "glDrawBuffersNV")] public static - void DrawBuffers(Int32 n, OpenTK.Graphics.ES30.All[] bufs) + void DrawBuffers(Int32 n, OpenTK.Graphics.ES30.DrawBufferMode[] bufs) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -48274,9 +48274,9 @@ namespace OpenTK.Graphics.ES30 #endif unsafe { - fixed (OpenTK.Graphics.ES30.All* bufs_ptr = bufs) + fixed (OpenTK.Graphics.ES30.DrawBufferMode* bufs_ptr = bufs) { - Delegates.glDrawBuffersNV((Int32)n, (OpenTK.Graphics.ES30.All*)bufs_ptr); + Delegates.glDrawBuffersNV((Int32)n, (OpenTK.Graphics.ES30.DrawBufferMode*)bufs_ptr); } } #if DEBUG @@ -48300,7 +48300,7 @@ namespace OpenTK.Graphics.ES30 /// [AutoGenerated(Category = "NV_draw_buffers", Version = "", EntryPoint = "glDrawBuffersNV")] public static - void DrawBuffers(Int32 n, ref OpenTK.Graphics.ES30.All bufs) + void DrawBuffers(Int32 n, ref OpenTK.Graphics.ES30.DrawBufferMode bufs) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -48308,9 +48308,9 @@ namespace OpenTK.Graphics.ES30 #endif unsafe { - fixed (OpenTK.Graphics.ES30.All* bufs_ptr = &bufs) + fixed (OpenTK.Graphics.ES30.DrawBufferMode* bufs_ptr = &bufs) { - Delegates.glDrawBuffersNV((Int32)n, (OpenTK.Graphics.ES30.All*)bufs_ptr); + Delegates.glDrawBuffersNV((Int32)n, (OpenTK.Graphics.ES30.DrawBufferMode*)bufs_ptr); } } #if DEBUG @@ -48335,13 +48335,13 @@ namespace OpenTK.Graphics.ES30 [System.CLSCompliant(false)] [AutoGenerated(Category = "NV_draw_buffers", Version = "", EntryPoint = "glDrawBuffersNV")] public static - unsafe void DrawBuffers(Int32 n, OpenTK.Graphics.ES30.All* bufs) + unsafe void DrawBuffers(Int32 n, OpenTK.Graphics.ES30.DrawBufferMode* bufs) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) { #endif - Delegates.glDrawBuffersNV((Int32)n, (OpenTK.Graphics.ES30.All*)bufs); + Delegates.glDrawBuffersNV((Int32)n, (OpenTK.Graphics.ES30.DrawBufferMode*)bufs); #if DEBUG } #endif diff --git a/Source/OpenTK/Graphics/ES30/ES30Core.cs b/Source/OpenTK/Graphics/ES30/ES30Core.cs index 6df31327..ab332889 100644 --- a/Source/OpenTK/Graphics/ES30/ES30Core.cs +++ b/Source/OpenTK/Graphics/ES30/ES30Core.cs @@ -353,13 +353,13 @@ namespace OpenTK.Graphics.ES30 internal extern static unsafe void DrawBuffers(Int32 n, OpenTK.Graphics.ES30.DrawBufferMode* bufs); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDrawBuffersEXT", ExactSpelling = true)] - internal extern static unsafe void DrawBuffersEXT(Int32 n, OpenTK.Graphics.ES30.All* bufs); + internal extern static unsafe void DrawBuffersEXT(Int32 n, OpenTK.Graphics.ES30.DrawBufferMode* bufs); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDrawBuffersIndexedEXT", ExactSpelling = true)] internal extern static unsafe void DrawBuffersIndexedEXT(Int32 n, OpenTK.Graphics.ES30.All* location, Int32* indices); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDrawBuffersNV", ExactSpelling = true)] - internal extern static unsafe void DrawBuffersNV(Int32 n, OpenTK.Graphics.ES30.All* bufs); + internal extern static unsafe void DrawBuffersNV(Int32 n, OpenTK.Graphics.ES30.DrawBufferMode* bufs); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDrawElements", ExactSpelling = true)] internal extern static void DrawElements(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, IntPtr indices); diff --git a/Source/OpenTK/Graphics/ES30/ES30Delegates.cs b/Source/OpenTK/Graphics/ES30/ES30Delegates.cs index a9f622f7..8ddf1d41 100644 --- a/Source/OpenTK/Graphics/ES30/ES30Delegates.cs +++ b/Source/OpenTK/Graphics/ES30/ES30Delegates.cs @@ -351,13 +351,13 @@ namespace OpenTK.Graphics.ES30 internal unsafe delegate void DrawBuffers(Int32 n, OpenTK.Graphics.ES30.DrawBufferMode* bufs); internal unsafe static DrawBuffers glDrawBuffers; [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate void DrawBuffersEXT(Int32 n, OpenTK.Graphics.ES30.All* bufs); + internal unsafe delegate void DrawBuffersEXT(Int32 n, OpenTK.Graphics.ES30.DrawBufferMode* bufs); internal unsafe static DrawBuffersEXT glDrawBuffersEXT; [System.Security.SuppressUnmanagedCodeSecurity()] internal unsafe delegate void DrawBuffersIndexedEXT(Int32 n, OpenTK.Graphics.ES30.All* location, Int32* indices); internal unsafe static DrawBuffersIndexedEXT glDrawBuffersIndexedEXT; [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate void DrawBuffersNV(Int32 n, OpenTK.Graphics.ES30.All* bufs); + internal unsafe delegate void DrawBuffersNV(Int32 n, OpenTK.Graphics.ES30.DrawBufferMode* bufs); internal unsafe static DrawBuffersNV glDrawBuffersNV; [System.Security.SuppressUnmanagedCodeSecurity()] internal delegate void DrawElements(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, IntPtr indices); diff --git a/Source/OpenTK/Graphics/ES30/ES30Enums.cs b/Source/OpenTK/Graphics/ES30/ES30Enums.cs index e18cd57f..71650064 100644 --- a/Source/OpenTK/Graphics/ES30/ES30Enums.cs +++ b/Source/OpenTK/Graphics/ES30/ES30Enums.cs @@ -385,7 +385,7 @@ namespace OpenTK.Graphics.ES30 } /// - /// Used in GL.Amd.GetPerfMonitorCounterData, GL.Amd.GetPerfMonitorCounterInfo and 47 other functions + /// Used in GL.Amd.GetPerfMonitorCounterData, GL.Amd.GetPerfMonitorCounterInfo and 45 other functions /// public enum All : int { @@ -10455,7 +10455,7 @@ namespace OpenTK.Graphics.ES30 } /// - /// Used in GL.DrawBuffers + /// Used in GL.DrawBuffers, GL.Ext.DrawBuffers and 1 other function /// public enum DrawBufferMode : int {