From 9613975681e3215787a164819cd2499f9fc8bde2 Mon Sep 17 00:00:00 2001 From: "Stefanos A." Date: Tue, 22 Oct 2013 14:40:49 +0200 Subject: [PATCH] Updated strong-types for Buffer Objects according to the OpenGL 4.4 spec, section 6. --- .../Bind/Specifications/GL2/gloverrides.xml | 101 +++++++++++++++--- Source/OpenTK/Graphics/OpenGL/GL.cs | 56 +++++----- Source/OpenTK/Graphics/OpenGL/GLCore.cs | 8 +- Source/OpenTK/Graphics/OpenGL/GLDelegates.cs | 8 +- Source/OpenTK/Graphics/OpenGL/GLEnums.cs | 68 +++++++++++- 5 files changed, 187 insertions(+), 54 deletions(-) diff --git a/Source/Bind/Specifications/GL2/gloverrides.xml b/Source/Bind/Specifications/GL2/gloverrides.xml index df7d8984..ed02c4bf 100644 --- a/Source/Bind/Specifications/GL2/gloverrides.xml +++ b/Source/Bind/Specifications/GL2/gloverrides.xml @@ -282,13 +282,25 @@ - BufferTarget + BufferRangeTarget - BufferTarget + BufferRangeTarget + + + + + + BufferRangeTarget + + + + + + BufferRangeTarget @@ -835,6 +847,32 @@ BinaryFormat + + + + + + BufferTarget + + + PixelInternalFormat + + + PixelFormat + + + + + + BufferTarget + + + PixelInternalFormat + + + PixelFormat + + @@ -1212,6 +1250,15 @@ SyncParameter + + + + BufferTarget + + + BufferStorageFlags + + @@ -1494,18 +1541,24 @@ - - - - - - + + + + + + + + - - - - + + + + + + + + @@ -1519,6 +1572,14 @@ + + + + + + + + @@ -1530,6 +1591,16 @@ + + + + + + + + + + @@ -2040,7 +2111,7 @@ - + @@ -2076,10 +2147,10 @@ - + - + diff --git a/Source/OpenTK/Graphics/OpenGL/GL.cs b/Source/OpenTK/Graphics/OpenGL/GL.cs index 98fc3999..66e7ffeb 100644 --- a/Source/OpenTK/Graphics/OpenGL/GL.cs +++ b/Source/OpenTK/Graphics/OpenGL/GL.cs @@ -32722,13 +32722,13 @@ namespace OpenTK.Graphics.OpenGL /// [AutoGenerated(Category = "VERSION_3_0", Version = "3.0", EntryPoint = "glBindBufferBase")] public static - void BindBufferBase(OpenTK.Graphics.OpenGL.BufferTarget target, Int32 index, Int32 buffer) + void BindBufferBase(OpenTK.Graphics.OpenGL.BufferRangeTarget target, Int32 index, Int32 buffer) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) { #endif - Delegates.glBindBufferBase((OpenTK.Graphics.OpenGL.BufferTarget)target, (UInt32)index, (UInt32)buffer); + Delegates.glBindBufferBase((OpenTK.Graphics.OpenGL.BufferRangeTarget)target, (UInt32)index, (UInt32)buffer); #if DEBUG } #endif @@ -32756,13 +32756,13 @@ namespace OpenTK.Graphics.OpenGL [System.CLSCompliant(false)] [AutoGenerated(Category = "VERSION_3_0", Version = "3.0", EntryPoint = "glBindBufferBase")] public static - void BindBufferBase(OpenTK.Graphics.OpenGL.BufferTarget target, UInt32 index, UInt32 buffer) + void BindBufferBase(OpenTK.Graphics.OpenGL.BufferRangeTarget target, UInt32 index, UInt32 buffer) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) { #endif - Delegates.glBindBufferBase((OpenTK.Graphics.OpenGL.BufferTarget)target, (UInt32)index, (UInt32)buffer); + Delegates.glBindBufferBase((OpenTK.Graphics.OpenGL.BufferRangeTarget)target, (UInt32)index, (UInt32)buffer); #if DEBUG } #endif @@ -32799,13 +32799,13 @@ namespace OpenTK.Graphics.OpenGL /// [AutoGenerated(Category = "VERSION_3_0", Version = "3.0", EntryPoint = "glBindBufferRange")] public static - void BindBufferRange(OpenTK.Graphics.OpenGL.BufferTarget target, Int32 index, Int32 buffer, IntPtr offset, IntPtr size) + void BindBufferRange(OpenTK.Graphics.OpenGL.BufferRangeTarget target, Int32 index, Int32 buffer, IntPtr offset, IntPtr size) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) { #endif - Delegates.glBindBufferRange((OpenTK.Graphics.OpenGL.BufferTarget)target, (UInt32)index, (UInt32)buffer, (IntPtr)offset, (IntPtr)size); + Delegates.glBindBufferRange((OpenTK.Graphics.OpenGL.BufferRangeTarget)target, (UInt32)index, (UInt32)buffer, (IntPtr)offset, (IntPtr)size); #if DEBUG } #endif @@ -32843,13 +32843,13 @@ namespace OpenTK.Graphics.OpenGL [System.CLSCompliant(false)] [AutoGenerated(Category = "VERSION_3_0", Version = "3.0", EntryPoint = "glBindBufferRange")] public static - void BindBufferRange(OpenTK.Graphics.OpenGL.BufferTarget target, UInt32 index, UInt32 buffer, IntPtr offset, IntPtr size) + void BindBufferRange(OpenTK.Graphics.OpenGL.BufferRangeTarget target, UInt32 index, UInt32 buffer, IntPtr offset, IntPtr size) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) { #endif - Delegates.glBindBufferRange((OpenTK.Graphics.OpenGL.BufferTarget)target, (UInt32)index, (UInt32)buffer, (IntPtr)offset, (IntPtr)size); + Delegates.glBindBufferRange((OpenTK.Graphics.OpenGL.BufferRangeTarget)target, (UInt32)index, (UInt32)buffer, (IntPtr)offset, (IntPtr)size); #if DEBUG } #endif @@ -34786,13 +34786,13 @@ namespace OpenTK.Graphics.OpenGL /// [requires: v4.3 and ARB_clear_buffer_object] [AutoGenerated(Category = "ARB_clear_buffer_object", Version = "4.3", EntryPoint = "glClearBufferData")] public static - void ClearBufferData(OpenTK.Graphics.OpenGL.ArbClearBufferObject target, OpenTK.Graphics.OpenGL.ArbClearBufferObject internalformat, OpenTK.Graphics.OpenGL.ArbClearBufferObject format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, IntPtr data) + void ClearBufferData(OpenTK.Graphics.OpenGL.BufferTarget target, OpenTK.Graphics.OpenGL.PixelInternalFormat internalformat, OpenTK.Graphics.OpenGL.PixelFormat format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, IntPtr data) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) { #endif - Delegates.glClearBufferData((OpenTK.Graphics.OpenGL.ArbClearBufferObject)target, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)internalformat, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)format, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)type, (IntPtr)data); + Delegates.glClearBufferData((OpenTK.Graphics.OpenGL.BufferTarget)target, (OpenTK.Graphics.OpenGL.PixelInternalFormat)internalformat, (OpenTK.Graphics.OpenGL.PixelFormat)format, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)type, (IntPtr)data); #if DEBUG } #endif @@ -34801,7 +34801,7 @@ namespace OpenTK.Graphics.OpenGL /// [requires: v4.3 and ARB_clear_buffer_object] [AutoGenerated(Category = "ARB_clear_buffer_object", Version = "4.3", EntryPoint = "glClearBufferData")] public static - void ClearBufferData(OpenTK.Graphics.OpenGL.ArbClearBufferObject target, OpenTK.Graphics.OpenGL.ArbClearBufferObject internalformat, OpenTK.Graphics.OpenGL.ArbClearBufferObject format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, [InAttribute, OutAttribute] T4[] data) + void ClearBufferData(OpenTK.Graphics.OpenGL.BufferTarget target, OpenTK.Graphics.OpenGL.PixelInternalFormat internalformat, OpenTK.Graphics.OpenGL.PixelFormat format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, [InAttribute, OutAttribute] T4[] data) where T4 : struct { #if DEBUG @@ -34811,7 +34811,7 @@ namespace OpenTK.Graphics.OpenGL GCHandle data_ptr = GCHandle.Alloc(data, GCHandleType.Pinned); try { - Delegates.glClearBufferData((OpenTK.Graphics.OpenGL.ArbClearBufferObject)target, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)internalformat, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)format, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)type, (IntPtr)data_ptr.AddrOfPinnedObject()); + Delegates.glClearBufferData((OpenTK.Graphics.OpenGL.BufferTarget)target, (OpenTK.Graphics.OpenGL.PixelInternalFormat)internalformat, (OpenTK.Graphics.OpenGL.PixelFormat)format, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)type, (IntPtr)data_ptr.AddrOfPinnedObject()); } finally { @@ -34825,7 +34825,7 @@ namespace OpenTK.Graphics.OpenGL /// [requires: v4.3 and ARB_clear_buffer_object] [AutoGenerated(Category = "ARB_clear_buffer_object", Version = "4.3", EntryPoint = "glClearBufferData")] public static - void ClearBufferData(OpenTK.Graphics.OpenGL.ArbClearBufferObject target, OpenTK.Graphics.OpenGL.ArbClearBufferObject internalformat, OpenTK.Graphics.OpenGL.ArbClearBufferObject format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, [InAttribute, OutAttribute] T4[,] data) + void ClearBufferData(OpenTK.Graphics.OpenGL.BufferTarget target, OpenTK.Graphics.OpenGL.PixelInternalFormat internalformat, OpenTK.Graphics.OpenGL.PixelFormat format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, [InAttribute, OutAttribute] T4[,] data) where T4 : struct { #if DEBUG @@ -34835,7 +34835,7 @@ namespace OpenTK.Graphics.OpenGL GCHandle data_ptr = GCHandle.Alloc(data, GCHandleType.Pinned); try { - Delegates.glClearBufferData((OpenTK.Graphics.OpenGL.ArbClearBufferObject)target, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)internalformat, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)format, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)type, (IntPtr)data_ptr.AddrOfPinnedObject()); + Delegates.glClearBufferData((OpenTK.Graphics.OpenGL.BufferTarget)target, (OpenTK.Graphics.OpenGL.PixelInternalFormat)internalformat, (OpenTK.Graphics.OpenGL.PixelFormat)format, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)type, (IntPtr)data_ptr.AddrOfPinnedObject()); } finally { @@ -34849,7 +34849,7 @@ namespace OpenTK.Graphics.OpenGL /// [requires: v4.3 and ARB_clear_buffer_object] [AutoGenerated(Category = "ARB_clear_buffer_object", Version = "4.3", EntryPoint = "glClearBufferData")] public static - void ClearBufferData(OpenTK.Graphics.OpenGL.ArbClearBufferObject target, OpenTK.Graphics.OpenGL.ArbClearBufferObject internalformat, OpenTK.Graphics.OpenGL.ArbClearBufferObject format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, [InAttribute, OutAttribute] T4[,,] data) + void ClearBufferData(OpenTK.Graphics.OpenGL.BufferTarget target, OpenTK.Graphics.OpenGL.PixelInternalFormat internalformat, OpenTK.Graphics.OpenGL.PixelFormat format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, [InAttribute, OutAttribute] T4[,,] data) where T4 : struct { #if DEBUG @@ -34859,7 +34859,7 @@ namespace OpenTK.Graphics.OpenGL GCHandle data_ptr = GCHandle.Alloc(data, GCHandleType.Pinned); try { - Delegates.glClearBufferData((OpenTK.Graphics.OpenGL.ArbClearBufferObject)target, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)internalformat, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)format, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)type, (IntPtr)data_ptr.AddrOfPinnedObject()); + Delegates.glClearBufferData((OpenTK.Graphics.OpenGL.BufferTarget)target, (OpenTK.Graphics.OpenGL.PixelInternalFormat)internalformat, (OpenTK.Graphics.OpenGL.PixelFormat)format, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)type, (IntPtr)data_ptr.AddrOfPinnedObject()); } finally { @@ -34873,7 +34873,7 @@ namespace OpenTK.Graphics.OpenGL /// [requires: v4.3 and ARB_clear_buffer_object] [AutoGenerated(Category = "ARB_clear_buffer_object", Version = "4.3", EntryPoint = "glClearBufferData")] public static - void ClearBufferData(OpenTK.Graphics.OpenGL.ArbClearBufferObject target, OpenTK.Graphics.OpenGL.ArbClearBufferObject internalformat, OpenTK.Graphics.OpenGL.ArbClearBufferObject format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, [InAttribute, OutAttribute] ref T4 data) + void ClearBufferData(OpenTK.Graphics.OpenGL.BufferTarget target, OpenTK.Graphics.OpenGL.PixelInternalFormat internalformat, OpenTK.Graphics.OpenGL.PixelFormat format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, [InAttribute, OutAttribute] ref T4 data) where T4 : struct { #if DEBUG @@ -34883,7 +34883,7 @@ namespace OpenTK.Graphics.OpenGL GCHandle data_ptr = GCHandle.Alloc(data, GCHandleType.Pinned); try { - Delegates.glClearBufferData((OpenTK.Graphics.OpenGL.ArbClearBufferObject)target, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)internalformat, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)format, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)type, (IntPtr)data_ptr.AddrOfPinnedObject()); + Delegates.glClearBufferData((OpenTK.Graphics.OpenGL.BufferTarget)target, (OpenTK.Graphics.OpenGL.PixelInternalFormat)internalformat, (OpenTK.Graphics.OpenGL.PixelFormat)format, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)type, (IntPtr)data_ptr.AddrOfPinnedObject()); data = (T4)data_ptr.Target; } finally @@ -35225,13 +35225,13 @@ namespace OpenTK.Graphics.OpenGL /// [requires: v4.3 and ARB_clear_buffer_object] [AutoGenerated(Category = "ARB_clear_buffer_object", Version = "4.3", EntryPoint = "glClearBufferSubData")] public static - void ClearBufferSubData(OpenTK.Graphics.OpenGL.ArbClearBufferObject target, OpenTK.Graphics.OpenGL.ArbClearBufferObject internalformat, IntPtr offset, IntPtr size, OpenTK.Graphics.OpenGL.ArbClearBufferObject format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, IntPtr data) + void ClearBufferSubData(OpenTK.Graphics.OpenGL.BufferTarget target, OpenTK.Graphics.OpenGL.PixelInternalFormat internalformat, IntPtr offset, IntPtr size, OpenTK.Graphics.OpenGL.PixelFormat format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, IntPtr data) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) { #endif - Delegates.glClearBufferSubData((OpenTK.Graphics.OpenGL.ArbClearBufferObject)target, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)internalformat, (IntPtr)offset, (IntPtr)size, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)format, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)type, (IntPtr)data); + Delegates.glClearBufferSubData((OpenTK.Graphics.OpenGL.BufferTarget)target, (OpenTK.Graphics.OpenGL.PixelInternalFormat)internalformat, (IntPtr)offset, (IntPtr)size, (OpenTK.Graphics.OpenGL.PixelFormat)format, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)type, (IntPtr)data); #if DEBUG } #endif @@ -35240,7 +35240,7 @@ namespace OpenTK.Graphics.OpenGL /// [requires: v4.3 and ARB_clear_buffer_object] [AutoGenerated(Category = "ARB_clear_buffer_object", Version = "4.3", EntryPoint = "glClearBufferSubData")] public static - void ClearBufferSubData(OpenTK.Graphics.OpenGL.ArbClearBufferObject target, OpenTK.Graphics.OpenGL.ArbClearBufferObject internalformat, IntPtr offset, IntPtr size, OpenTK.Graphics.OpenGL.ArbClearBufferObject format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, [InAttribute, OutAttribute] T6[] data) + void ClearBufferSubData(OpenTK.Graphics.OpenGL.BufferTarget target, OpenTK.Graphics.OpenGL.PixelInternalFormat internalformat, IntPtr offset, IntPtr size, OpenTK.Graphics.OpenGL.PixelFormat format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, [InAttribute, OutAttribute] T6[] data) where T6 : struct { #if DEBUG @@ -35250,7 +35250,7 @@ namespace OpenTK.Graphics.OpenGL GCHandle data_ptr = GCHandle.Alloc(data, GCHandleType.Pinned); try { - Delegates.glClearBufferSubData((OpenTK.Graphics.OpenGL.ArbClearBufferObject)target, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)internalformat, (IntPtr)offset, (IntPtr)size, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)format, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)type, (IntPtr)data_ptr.AddrOfPinnedObject()); + Delegates.glClearBufferSubData((OpenTK.Graphics.OpenGL.BufferTarget)target, (OpenTK.Graphics.OpenGL.PixelInternalFormat)internalformat, (IntPtr)offset, (IntPtr)size, (OpenTK.Graphics.OpenGL.PixelFormat)format, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)type, (IntPtr)data_ptr.AddrOfPinnedObject()); } finally { @@ -35264,7 +35264,7 @@ namespace OpenTK.Graphics.OpenGL /// [requires: v4.3 and ARB_clear_buffer_object] [AutoGenerated(Category = "ARB_clear_buffer_object", Version = "4.3", EntryPoint = "glClearBufferSubData")] public static - void ClearBufferSubData(OpenTK.Graphics.OpenGL.ArbClearBufferObject target, OpenTK.Graphics.OpenGL.ArbClearBufferObject internalformat, IntPtr offset, IntPtr size, OpenTK.Graphics.OpenGL.ArbClearBufferObject format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, [InAttribute, OutAttribute] T6[,] data) + void ClearBufferSubData(OpenTK.Graphics.OpenGL.BufferTarget target, OpenTK.Graphics.OpenGL.PixelInternalFormat internalformat, IntPtr offset, IntPtr size, OpenTK.Graphics.OpenGL.PixelFormat format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, [InAttribute, OutAttribute] T6[,] data) where T6 : struct { #if DEBUG @@ -35274,7 +35274,7 @@ namespace OpenTK.Graphics.OpenGL GCHandle data_ptr = GCHandle.Alloc(data, GCHandleType.Pinned); try { - Delegates.glClearBufferSubData((OpenTK.Graphics.OpenGL.ArbClearBufferObject)target, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)internalformat, (IntPtr)offset, (IntPtr)size, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)format, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)type, (IntPtr)data_ptr.AddrOfPinnedObject()); + Delegates.glClearBufferSubData((OpenTK.Graphics.OpenGL.BufferTarget)target, (OpenTK.Graphics.OpenGL.PixelInternalFormat)internalformat, (IntPtr)offset, (IntPtr)size, (OpenTK.Graphics.OpenGL.PixelFormat)format, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)type, (IntPtr)data_ptr.AddrOfPinnedObject()); } finally { @@ -35288,7 +35288,7 @@ namespace OpenTK.Graphics.OpenGL /// [requires: v4.3 and ARB_clear_buffer_object] [AutoGenerated(Category = "ARB_clear_buffer_object", Version = "4.3", EntryPoint = "glClearBufferSubData")] public static - void ClearBufferSubData(OpenTK.Graphics.OpenGL.ArbClearBufferObject target, OpenTK.Graphics.OpenGL.ArbClearBufferObject internalformat, IntPtr offset, IntPtr size, OpenTK.Graphics.OpenGL.ArbClearBufferObject format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, [InAttribute, OutAttribute] T6[,,] data) + void ClearBufferSubData(OpenTK.Graphics.OpenGL.BufferTarget target, OpenTK.Graphics.OpenGL.PixelInternalFormat internalformat, IntPtr offset, IntPtr size, OpenTK.Graphics.OpenGL.PixelFormat format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, [InAttribute, OutAttribute] T6[,,] data) where T6 : struct { #if DEBUG @@ -35298,7 +35298,7 @@ namespace OpenTK.Graphics.OpenGL GCHandle data_ptr = GCHandle.Alloc(data, GCHandleType.Pinned); try { - Delegates.glClearBufferSubData((OpenTK.Graphics.OpenGL.ArbClearBufferObject)target, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)internalformat, (IntPtr)offset, (IntPtr)size, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)format, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)type, (IntPtr)data_ptr.AddrOfPinnedObject()); + Delegates.glClearBufferSubData((OpenTK.Graphics.OpenGL.BufferTarget)target, (OpenTK.Graphics.OpenGL.PixelInternalFormat)internalformat, (IntPtr)offset, (IntPtr)size, (OpenTK.Graphics.OpenGL.PixelFormat)format, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)type, (IntPtr)data_ptr.AddrOfPinnedObject()); } finally { @@ -35312,7 +35312,7 @@ namespace OpenTK.Graphics.OpenGL /// [requires: v4.3 and ARB_clear_buffer_object] [AutoGenerated(Category = "ARB_clear_buffer_object", Version = "4.3", EntryPoint = "glClearBufferSubData")] public static - void ClearBufferSubData(OpenTK.Graphics.OpenGL.ArbClearBufferObject target, OpenTK.Graphics.OpenGL.ArbClearBufferObject internalformat, IntPtr offset, IntPtr size, OpenTK.Graphics.OpenGL.ArbClearBufferObject format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, [InAttribute, OutAttribute] ref T6 data) + void ClearBufferSubData(OpenTK.Graphics.OpenGL.BufferTarget target, OpenTK.Graphics.OpenGL.PixelInternalFormat internalformat, IntPtr offset, IntPtr size, OpenTK.Graphics.OpenGL.PixelFormat format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, [InAttribute, OutAttribute] ref T6 data) where T6 : struct { #if DEBUG @@ -35322,7 +35322,7 @@ namespace OpenTK.Graphics.OpenGL GCHandle data_ptr = GCHandle.Alloc(data, GCHandleType.Pinned); try { - Delegates.glClearBufferSubData((OpenTK.Graphics.OpenGL.ArbClearBufferObject)target, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)internalformat, (IntPtr)offset, (IntPtr)size, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)format, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)type, (IntPtr)data_ptr.AddrOfPinnedObject()); + Delegates.glClearBufferSubData((OpenTK.Graphics.OpenGL.BufferTarget)target, (OpenTK.Graphics.OpenGL.PixelInternalFormat)internalformat, (IntPtr)offset, (IntPtr)size, (OpenTK.Graphics.OpenGL.PixelFormat)format, (OpenTK.Graphics.OpenGL.ArbClearBufferObject)type, (IntPtr)data_ptr.AddrOfPinnedObject()); data = (T6)data_ptr.Target; } finally diff --git a/Source/OpenTK/Graphics/OpenGL/GLCore.cs b/Source/OpenTK/Graphics/OpenGL/GLCore.cs index 0040aca5..4f0b05a6 100644 --- a/Source/OpenTK/Graphics/OpenGL/GLCore.cs +++ b/Source/OpenTK/Graphics/OpenGL/GLCore.cs @@ -167,7 +167,7 @@ namespace OpenTK.Graphics.OpenGL internal extern static void BindBufferARB(OpenTK.Graphics.OpenGL.BufferTargetArb target, UInt32 buffer); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glBindBufferBase", ExactSpelling = true)] - internal extern static void BindBufferBase(OpenTK.Graphics.OpenGL.BufferTarget target, UInt32 index, UInt32 buffer); + internal extern static void BindBufferBase(OpenTK.Graphics.OpenGL.BufferRangeTarget target, UInt32 index, UInt32 buffer); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glBindBufferBaseEXT", ExactSpelling = true)] internal extern static void BindBufferBaseEXT(OpenTK.Graphics.OpenGL.ExtTransformFeedback target, UInt32 index, UInt32 buffer); @@ -182,7 +182,7 @@ namespace OpenTK.Graphics.OpenGL internal extern static void BindBufferOffsetNV(OpenTK.Graphics.OpenGL.NvTransformFeedback target, UInt32 index, UInt32 buffer, IntPtr offset); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glBindBufferRange", ExactSpelling = true)] - internal extern static void BindBufferRange(OpenTK.Graphics.OpenGL.BufferTarget target, UInt32 index, UInt32 buffer, IntPtr offset, IntPtr size); + internal extern static void BindBufferRange(OpenTK.Graphics.OpenGL.BufferRangeTarget target, UInt32 index, UInt32 buffer, IntPtr offset, IntPtr size); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glBindBufferRangeEXT", ExactSpelling = true)] internal extern static void BindBufferRangeEXT(OpenTK.Graphics.OpenGL.ExtTransformFeedback target, UInt32 index, UInt32 buffer, IntPtr offset, IntPtr size); @@ -443,7 +443,7 @@ namespace OpenTK.Graphics.OpenGL internal extern static void ClearAccumxOES(int red, int green, int blue, int alpha); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glClearBufferData", ExactSpelling = true)] - internal extern static void ClearBufferData(OpenTK.Graphics.OpenGL.ArbClearBufferObject target, OpenTK.Graphics.OpenGL.ArbClearBufferObject internalformat, OpenTK.Graphics.OpenGL.ArbClearBufferObject format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, IntPtr data); + internal extern static void ClearBufferData(OpenTK.Graphics.OpenGL.BufferTarget target, OpenTK.Graphics.OpenGL.PixelInternalFormat internalformat, OpenTK.Graphics.OpenGL.PixelFormat format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, IntPtr data); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glClearBufferfi", ExactSpelling = true)] internal extern static void ClearBufferfi(OpenTK.Graphics.OpenGL.ClearBuffer buffer, Int32 drawbuffer, Single depth, Int32 stencil); @@ -455,7 +455,7 @@ namespace OpenTK.Graphics.OpenGL internal extern static unsafe void ClearBufferiv(OpenTK.Graphics.OpenGL.ClearBuffer buffer, Int32 drawbuffer, Int32* value); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glClearBufferSubData", ExactSpelling = true)] - internal extern static void ClearBufferSubData(OpenTK.Graphics.OpenGL.ArbClearBufferObject target, OpenTK.Graphics.OpenGL.ArbClearBufferObject internalformat, IntPtr offset, IntPtr size, OpenTK.Graphics.OpenGL.ArbClearBufferObject format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, IntPtr data); + internal extern static void ClearBufferSubData(OpenTK.Graphics.OpenGL.BufferTarget target, OpenTK.Graphics.OpenGL.PixelInternalFormat internalformat, IntPtr offset, IntPtr size, OpenTK.Graphics.OpenGL.PixelFormat format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, IntPtr data); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glClearBufferuiv", ExactSpelling = true)] internal extern static unsafe void ClearBufferuiv(OpenTK.Graphics.OpenGL.ClearBuffer buffer, Int32 drawbuffer, UInt32* value); diff --git a/Source/OpenTK/Graphics/OpenGL/GLDelegates.cs b/Source/OpenTK/Graphics/OpenGL/GLDelegates.cs index 03f90068..e846840c 100644 --- a/Source/OpenTK/Graphics/OpenGL/GLDelegates.cs +++ b/Source/OpenTK/Graphics/OpenGL/GLDelegates.cs @@ -165,7 +165,7 @@ namespace OpenTK.Graphics.OpenGL internal delegate void BindBufferARB(OpenTK.Graphics.OpenGL.BufferTargetArb target, UInt32 buffer); internal static BindBufferARB glBindBufferARB; [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate void BindBufferBase(OpenTK.Graphics.OpenGL.BufferTarget target, UInt32 index, UInt32 buffer); + internal delegate void BindBufferBase(OpenTK.Graphics.OpenGL.BufferRangeTarget target, UInt32 index, UInt32 buffer); internal static BindBufferBase glBindBufferBase; [System.Security.SuppressUnmanagedCodeSecurity()] internal delegate void BindBufferBaseEXT(OpenTK.Graphics.OpenGL.ExtTransformFeedback target, UInt32 index, UInt32 buffer); @@ -180,7 +180,7 @@ namespace OpenTK.Graphics.OpenGL internal delegate void BindBufferOffsetNV(OpenTK.Graphics.OpenGL.NvTransformFeedback target, UInt32 index, UInt32 buffer, IntPtr offset); internal static BindBufferOffsetNV glBindBufferOffsetNV; [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate void BindBufferRange(OpenTK.Graphics.OpenGL.BufferTarget target, UInt32 index, UInt32 buffer, IntPtr offset, IntPtr size); + internal delegate void BindBufferRange(OpenTK.Graphics.OpenGL.BufferRangeTarget target, UInt32 index, UInt32 buffer, IntPtr offset, IntPtr size); internal static BindBufferRange glBindBufferRange; [System.Security.SuppressUnmanagedCodeSecurity()] internal delegate void BindBufferRangeEXT(OpenTK.Graphics.OpenGL.ExtTransformFeedback target, UInt32 index, UInt32 buffer, IntPtr offset, IntPtr size); @@ -441,7 +441,7 @@ namespace OpenTK.Graphics.OpenGL internal delegate void ClearAccumxOES(int red, int green, int blue, int alpha); internal static ClearAccumxOES glClearAccumxOES; [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate void ClearBufferData(OpenTK.Graphics.OpenGL.ArbClearBufferObject target, OpenTK.Graphics.OpenGL.ArbClearBufferObject internalformat, OpenTK.Graphics.OpenGL.ArbClearBufferObject format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, IntPtr data); + internal delegate void ClearBufferData(OpenTK.Graphics.OpenGL.BufferTarget target, OpenTK.Graphics.OpenGL.PixelInternalFormat internalformat, OpenTK.Graphics.OpenGL.PixelFormat format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, IntPtr data); internal static ClearBufferData glClearBufferData; [System.Security.SuppressUnmanagedCodeSecurity()] internal delegate void ClearBufferfi(OpenTK.Graphics.OpenGL.ClearBuffer buffer, Int32 drawbuffer, Single depth, Int32 stencil); @@ -453,7 +453,7 @@ namespace OpenTK.Graphics.OpenGL internal unsafe delegate void ClearBufferiv(OpenTK.Graphics.OpenGL.ClearBuffer buffer, Int32 drawbuffer, Int32* value); internal unsafe static ClearBufferiv glClearBufferiv; [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate void ClearBufferSubData(OpenTK.Graphics.OpenGL.ArbClearBufferObject target, OpenTK.Graphics.OpenGL.ArbClearBufferObject internalformat, IntPtr offset, IntPtr size, OpenTK.Graphics.OpenGL.ArbClearBufferObject format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, IntPtr data); + internal delegate void ClearBufferSubData(OpenTK.Graphics.OpenGL.BufferTarget target, OpenTK.Graphics.OpenGL.PixelInternalFormat internalformat, IntPtr offset, IntPtr size, OpenTK.Graphics.OpenGL.PixelFormat format, OpenTK.Graphics.OpenGL.ArbClearBufferObject type, IntPtr data); internal static ClearBufferSubData glClearBufferSubData; [System.Security.SuppressUnmanagedCodeSecurity()] internal unsafe delegate void ClearBufferuiv(OpenTK.Graphics.OpenGL.ClearBuffer buffer, Int32 drawbuffer, UInt32* value); diff --git a/Source/OpenTK/Graphics/OpenGL/GLEnums.cs b/Source/OpenTK/Graphics/OpenGL/GLEnums.cs index ace589ea..a1625895 100644 --- a/Source/OpenTK/Graphics/OpenGL/GLEnums.cs +++ b/Source/OpenTK/Graphics/OpenGL/GLEnums.cs @@ -28873,6 +28873,18 @@ namespace OpenTK.Graphics.OpenGL /// Original was GL_BUFFER_MAPPED = 0x88BC /// BufferMapped = ((int)0x88BC) , + /// + /// Original was GL_BUFFER_ACCESS_FLAGS = 0x911F + /// + BufferAccessFlags = ((int)0x911F) , + /// + /// Original was GL_BUFFER_MAP_LENGTH = 0x9120 + /// + BufferMapLength = ((int)0x9120) , + /// + /// Original was GL_BUFFER_MAP_OFFSET = 0x9121 + /// + BufferMapOffset = ((int)0x9121) , } /// @@ -28921,7 +28933,45 @@ namespace OpenTK.Graphics.OpenGL } /// - /// Used in GL.Apple.BufferParameter, GL.Apple.FlushMappedBufferRange, GL.BindBuffer, GL.BindBufferBase, GL.BindBufferRange, GL.BufferData, GL.BufferSubData, GL.CopyBufferSubData, GL.FlushMappedBufferRange, GL.GetBufferParameter, GL.GetBufferPointer, GL.GetBufferSubData, GL.MapBuffer, GL.MapBufferRange, GL.UnmapBuffer + /// Used in GL.BindBufferBase, GL.BindBufferRange + /// + public enum BufferRangeTarget : int + { + /// + /// Original was GL_UNIFORM_BUFFER = 0x8A11 + /// + UniformBuffer = ((int)0x8A11) , + /// + /// Original was GL_TRANSFORM_FEEDBACK_BUFFER = 0x8C8E + /// + TransformFeedbackBuffer = ((int)0x8C8E) , + /// + /// Original was GL_SHADER_STORAGE_BUFFER = 0x90D2 + /// + ShaderStorageBuffer = ((int)0x90D2) , + /// + /// Original was GL_ATOMIC_COUNTER_BUFFER = 0x92C0 + /// + AtomicCounterBuffer = ((int)0x92C0) , + } + + /// + /// Not used directly. + /// + public enum BufferStorageFlags : int + { + /// + /// Original was GL_MAP_READ_BIT = 0x0001 + /// + MapReadBit = ((int)0x0001) , + /// + /// Original was GL_MAP_WRITE_BIT = 0x0002 + /// + MapWriteBit = ((int)0x0002) , + } + + /// + /// Used in GL.Apple.BufferParameter, GL.Apple.FlushMappedBufferRange, GL.BindBuffer, GL.BufferData, GL.BufferSubData, GL.ClearBufferData, GL.ClearBufferSubData, GL.CopyBufferSubData, GL.FlushMappedBufferRange, GL.GetBufferParameter, GL.GetBufferPointer, GL.GetBufferSubData, GL.MapBuffer, GL.MapBufferRange, GL.UnmapBuffer /// public enum BufferTarget : int { @@ -28965,6 +29015,18 @@ namespace OpenTK.Graphics.OpenGL /// Original was GL_DRAW_INDIRECT_BUFFER = 0x8F3F /// DrawIndirectBuffer = ((int)0x8F3F) , + /// + /// Original was GL_SHADER_STORAGE_BUFFER = 0x90D2 + /// + ShaderStorageBuffer = ((int)0x90D2) , + /// + /// Original was GL_DISPATCH_INDIRECT_BUFFER = 0x90EE + /// + DispatchIndirectBuffer = ((int)0x90EE) , + /// + /// Original was GL_ATOMIC_COUNTER_BUFFER = 0x92C0 + /// + AtomicCounterBuffer = ((int)0x92C0) , } /// @@ -46268,7 +46330,7 @@ namespace OpenTK.Graphics.OpenGL } /// - /// Used in GL.Arb.CompressedTexSubImage1D, GL.Arb.CompressedTexSubImage2D, GL.Arb.CompressedTexSubImage3D, GL.ColorSubTable, GL.ColorTable, GL.CompressedTexSubImage1D, GL.CompressedTexSubImage2D, GL.CompressedTexSubImage3D, GL.ConvolutionFilter1D, GL.ConvolutionFilter2D, GL.DrawPixels, GL.GetColorTable, GL.GetConvolutionFilter, GL.GetHistogram, GL.GetMinmax, GL.GetSeparableFilter, GL.GetTexImage, GL.ReadPixels, GL.SeparableFilter2D, GL.TexImage1D, GL.TexImage2D, GL.TexImage3D, GL.TexSubImage1D, GL.TexSubImage2D, GL.TexSubImage3D, GL.Ext.ColorSubTable, GL.Ext.ColorTable, GL.Ext.CompressedMultiTexSubImage1D, GL.Ext.CompressedMultiTexSubImage2D, GL.Ext.CompressedMultiTexSubImage3D, GL.Ext.CompressedTextureSubImage1D, GL.Ext.CompressedTextureSubImage2D, GL.Ext.CompressedTextureSubImage3D, GL.Ext.ConvolutionFilter1D, GL.Ext.ConvolutionFilter2D, GL.Ext.GetColorTable, GL.Ext.GetConvolutionFilter, GL.Ext.GetHistogram, GL.Ext.GetMinmax, GL.Ext.GetMultiTexImage, GL.Ext.GetSeparableFilter, GL.Ext.GetTextureImage, GL.Ext.MultiTexImage1D, GL.Ext.MultiTexImage2D, GL.Ext.MultiTexImage3D, GL.Ext.MultiTexSubImage1D, GL.Ext.MultiTexSubImage2D, GL.Ext.MultiTexSubImage3D, GL.Ext.SeparableFilter2D, GL.Ext.TexImage3D, GL.Ext.TexSubImage1D, GL.Ext.TexSubImage2D, GL.Ext.TexSubImage3D, GL.Ext.TextureImage1D, GL.Ext.TextureImage2D, GL.Ext.TextureImage3D, GL.Ext.TextureSubImage1D, GL.Ext.TextureSubImage2D, GL.Ext.TextureSubImage3D, GL.Sgi.ColorTable, GL.Sgi.GetColorTable, GL.Sgis.TexImage4D, GL.Sgis.TexSubImage4D + /// Used in GL.Arb.CompressedTexSubImage1D, GL.Arb.CompressedTexSubImage2D, GL.Arb.CompressedTexSubImage3D, GL.ClearBufferData, GL.ClearBufferSubData, GL.ColorSubTable, GL.ColorTable, GL.CompressedTexSubImage1D, GL.CompressedTexSubImage2D, GL.CompressedTexSubImage3D, GL.ConvolutionFilter1D, GL.ConvolutionFilter2D, GL.DrawPixels, GL.GetColorTable, GL.GetConvolutionFilter, GL.GetHistogram, GL.GetMinmax, GL.GetSeparableFilter, GL.GetTexImage, GL.ReadPixels, GL.SeparableFilter2D, GL.TexImage1D, GL.TexImage2D, GL.TexImage3D, GL.TexSubImage1D, GL.TexSubImage2D, GL.TexSubImage3D, GL.Ext.ColorSubTable, GL.Ext.ColorTable, GL.Ext.CompressedMultiTexSubImage1D, GL.Ext.CompressedMultiTexSubImage2D, GL.Ext.CompressedMultiTexSubImage3D, GL.Ext.CompressedTextureSubImage1D, GL.Ext.CompressedTextureSubImage2D, GL.Ext.CompressedTextureSubImage3D, GL.Ext.ConvolutionFilter1D, GL.Ext.ConvolutionFilter2D, GL.Ext.GetColorTable, GL.Ext.GetConvolutionFilter, GL.Ext.GetHistogram, GL.Ext.GetMinmax, GL.Ext.GetMultiTexImage, GL.Ext.GetSeparableFilter, GL.Ext.GetTextureImage, GL.Ext.MultiTexImage1D, GL.Ext.MultiTexImage2D, GL.Ext.MultiTexImage3D, GL.Ext.MultiTexSubImage1D, GL.Ext.MultiTexSubImage2D, GL.Ext.MultiTexSubImage3D, GL.Ext.SeparableFilter2D, GL.Ext.TexImage3D, GL.Ext.TexSubImage1D, GL.Ext.TexSubImage2D, GL.Ext.TexSubImage3D, GL.Ext.TextureImage1D, GL.Ext.TextureImage2D, GL.Ext.TextureImage3D, GL.Ext.TextureSubImage1D, GL.Ext.TextureSubImage2D, GL.Ext.TextureSubImage3D, GL.Sgi.ColorTable, GL.Sgi.GetColorTable, GL.Sgis.TexImage4D, GL.Sgis.TexSubImage4D /// public enum PixelFormat : int { @@ -46391,7 +46453,7 @@ namespace OpenTK.Graphics.OpenGL } /// - /// Used in GL.Arb.CompressedTexImage1D, GL.Arb.CompressedTexImage2D, GL.Arb.CompressedTexImage3D, GL.ColorTable, GL.CompressedTexImage1D, GL.CompressedTexImage2D, GL.CompressedTexImage3D, GL.ConvolutionFilter1D, GL.ConvolutionFilter2D, GL.CopyColorTable, GL.CopyConvolutionFilter1D, GL.CopyConvolutionFilter2D, GL.CopyTexImage1D, GL.CopyTexImage2D, GL.Histogram, GL.Minmax, GL.SeparableFilter2D, GL.TexImage1D, GL.TexImage2D, GL.TexImage2DMultisample, GL.TexImage3D, GL.TexImage3DMultisample, GL.Ext.ColorTable, GL.Ext.ConvolutionFilter1D, GL.Ext.ConvolutionFilter2D, GL.Ext.CopyConvolutionFilter1D, GL.Ext.CopyConvolutionFilter2D, GL.Ext.CopyTexImage1D, GL.Ext.CopyTexImage2D, GL.Ext.Histogram, GL.Ext.Minmax, GL.Ext.NamedRenderbufferStorage, GL.Ext.NamedRenderbufferStorageMultisampleCoverage, GL.Ext.NamedRenderbufferStorageMultisample, GL.Ext.SeparableFilter2D, GL.Ext.TexImage3D, GL.NV.RenderbufferStorageMultisampleCoverage, GL.Sgi.ColorTable, GL.Sgi.CopyColorTable, GL.Sgis.TexImage4D + /// Used in GL.Arb.CompressedTexImage1D, GL.Arb.CompressedTexImage2D, GL.Arb.CompressedTexImage3D, GL.ClearBufferData, GL.ClearBufferSubData, GL.ColorTable, GL.CompressedTexImage1D, GL.CompressedTexImage2D, GL.CompressedTexImage3D, GL.ConvolutionFilter1D, GL.ConvolutionFilter2D, GL.CopyColorTable, GL.CopyConvolutionFilter1D, GL.CopyConvolutionFilter2D, GL.CopyTexImage1D, GL.CopyTexImage2D, GL.Histogram, GL.Minmax, GL.SeparableFilter2D, GL.TexImage1D, GL.TexImage2D, GL.TexImage2DMultisample, GL.TexImage3D, GL.TexImage3DMultisample, GL.Ext.ColorTable, GL.Ext.ConvolutionFilter1D, GL.Ext.ConvolutionFilter2D, GL.Ext.CopyConvolutionFilter1D, GL.Ext.CopyConvolutionFilter2D, GL.Ext.CopyTexImage1D, GL.Ext.CopyTexImage2D, GL.Ext.Histogram, GL.Ext.Minmax, GL.Ext.NamedRenderbufferStorage, GL.Ext.NamedRenderbufferStorageMultisampleCoverage, GL.Ext.NamedRenderbufferStorageMultisample, GL.Ext.SeparableFilter2D, GL.Ext.TexImage3D, GL.NV.RenderbufferStorageMultisampleCoverage, GL.Sgi.ColorTable, GL.Sgi.CopyColorTable, GL.Sgis.TexImage4D /// public enum PixelInternalFormat : int {