diff --git a/Source/Bind/Specifications/GL2/enumext.spec b/Source/Bind/Specifications/GL2/enumext.spec index 9b75267b..26e1e6d4 100644 --- a/Source/Bind/Specifications/GL2/enumext.spec +++ b/Source/Bind/Specifications/GL2/enumext.spec @@ -7996,5 +7996,16 @@ VertexAttribI_PointerType enum: TextureParameterName enum: TEXTURE_LOD_BIAS = 0x8501 +# See OpenGL 3.2 reference card +ActiveUniformParameter enum: + use ARB_uniform_buffer_object UNIFORM_TYPE + use ARB_uniform_buffer_object UNIFORM_SIZE + use ARB_uniform_buffer_object UNIFORM_NAME_LENGTH + use ARB_uniform_buffer_object UNIFORM_BLOCK_INDEX + use ARB_uniform_buffer_object UNIFORM_OFFSET + use ARB_uniform_buffer_object UNIFORM_ARRAY_STRIDE + use ARB_uniform_buffer_object UNIFORM_MATRIX_STRIDE + use ARB_uniform_buffer_object UNIFORM_IS_ROW_MAJOR + # End (don't remove, or the last token may be removed!) diff --git a/Source/Bind/Specifications/GL2/gloverrides.xml b/Source/Bind/Specifications/GL2/gloverrides.xml index f8346ebb..35e1dc27 100644 --- a/Source/Bind/Specifications/GL2/gloverrides.xml +++ b/Source/Bind/Specifications/GL2/gloverrides.xml @@ -321,6 +321,10 @@ FramebufferTarget FramebufferAttachment + + + ActiveUniformParameter + diff --git a/Source/OpenTK/Graphics/OpenGL/GL.cs b/Source/OpenTK/Graphics/OpenGL/GL.cs index c3514d1b..88511937 100644 --- a/Source/OpenTK/Graphics/OpenGL/GL.cs +++ b/Source/OpenTK/Graphics/OpenGL/GL.cs @@ -42071,7 +42071,7 @@ namespace OpenTK.Graphics.OpenGL [AutoGenerated(Category = "ArbUniformBufferObject", Version = "2.0", EntryPoint = "glGetActiveUniformsiv")] public static - void GetActiveUniforms(Int32 program, Int32 uniformCount, Int32[] uniformIndices, OpenTK.Graphics.OpenGL.ArbUniformBufferObject pname, [OutAttribute] Int32[] @params) + void GetActiveUniforms(Int32 program, Int32 uniformCount, Int32[] uniformIndices, OpenTK.Graphics.OpenGL.ActiveUniformParameter pname, [OutAttribute] Int32[] @params) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -42082,7 +42082,7 @@ namespace OpenTK.Graphics.OpenGL fixed (Int32* uniformIndices_ptr = uniformIndices) fixed (Int32* @params_ptr = @params) { - Delegates.glGetActiveUniformsiv((UInt32)program, (Int32)uniformCount, (UInt32*)uniformIndices_ptr, (OpenTK.Graphics.OpenGL.ArbUniformBufferObject)pname, (Int32*)@params_ptr); + Delegates.glGetActiveUniformsiv((UInt32)program, (Int32)uniformCount, (UInt32*)uniformIndices_ptr, (OpenTK.Graphics.OpenGL.ActiveUniformParameter)pname, (Int32*)@params_ptr); } } #if DEBUG @@ -42092,7 +42092,7 @@ namespace OpenTK.Graphics.OpenGL [AutoGenerated(Category = "ArbUniformBufferObject", Version = "2.0", EntryPoint = "glGetActiveUniformsiv")] public static - void GetActiveUniforms(Int32 program, Int32 uniformCount, ref Int32 uniformIndices, OpenTK.Graphics.OpenGL.ArbUniformBufferObject pname, [OutAttribute] out Int32 @params) + void GetActiveUniforms(Int32 program, Int32 uniformCount, ref Int32 uniformIndices, OpenTK.Graphics.OpenGL.ActiveUniformParameter pname, [OutAttribute] out Int32 @params) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -42103,7 +42103,7 @@ namespace OpenTK.Graphics.OpenGL fixed (Int32* uniformIndices_ptr = &uniformIndices) fixed (Int32* @params_ptr = &@params) { - Delegates.glGetActiveUniformsiv((UInt32)program, (Int32)uniformCount, (UInt32*)uniformIndices_ptr, (OpenTK.Graphics.OpenGL.ArbUniformBufferObject)pname, (Int32*)@params_ptr); + Delegates.glGetActiveUniformsiv((UInt32)program, (Int32)uniformCount, (UInt32*)uniformIndices_ptr, (OpenTK.Graphics.OpenGL.ActiveUniformParameter)pname, (Int32*)@params_ptr); @params = *@params_ptr; } } @@ -42115,13 +42115,13 @@ namespace OpenTK.Graphics.OpenGL [System.CLSCompliant(false)] [AutoGenerated(Category = "ArbUniformBufferObject", Version = "2.0", EntryPoint = "glGetActiveUniformsiv")] public static - unsafe void GetActiveUniforms(Int32 program, Int32 uniformCount, Int32* uniformIndices, OpenTK.Graphics.OpenGL.ArbUniformBufferObject pname, [OutAttribute] Int32* @params) + unsafe void GetActiveUniforms(Int32 program, Int32 uniformCount, Int32* uniformIndices, OpenTK.Graphics.OpenGL.ActiveUniformParameter pname, [OutAttribute] Int32* @params) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) { #endif - Delegates.glGetActiveUniformsiv((UInt32)program, (Int32)uniformCount, (UInt32*)uniformIndices, (OpenTK.Graphics.OpenGL.ArbUniformBufferObject)pname, (Int32*)@params); + Delegates.glGetActiveUniformsiv((UInt32)program, (Int32)uniformCount, (UInt32*)uniformIndices, (OpenTK.Graphics.OpenGL.ActiveUniformParameter)pname, (Int32*)@params); #if DEBUG } #endif @@ -42130,7 +42130,7 @@ namespace OpenTK.Graphics.OpenGL [System.CLSCompliant(false)] [AutoGenerated(Category = "ArbUniformBufferObject", Version = "2.0", EntryPoint = "glGetActiveUniformsiv")] public static - void GetActiveUniforms(UInt32 program, Int32 uniformCount, UInt32[] uniformIndices, OpenTK.Graphics.OpenGL.ArbUniformBufferObject pname, [OutAttribute] Int32[] @params) + void GetActiveUniforms(UInt32 program, Int32 uniformCount, UInt32[] uniformIndices, OpenTK.Graphics.OpenGL.ActiveUniformParameter pname, [OutAttribute] Int32[] @params) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -42141,7 +42141,7 @@ namespace OpenTK.Graphics.OpenGL fixed (UInt32* uniformIndices_ptr = uniformIndices) fixed (Int32* @params_ptr = @params) { - Delegates.glGetActiveUniformsiv((UInt32)program, (Int32)uniformCount, (UInt32*)uniformIndices_ptr, (OpenTK.Graphics.OpenGL.ArbUniformBufferObject)pname, (Int32*)@params_ptr); + Delegates.glGetActiveUniformsiv((UInt32)program, (Int32)uniformCount, (UInt32*)uniformIndices_ptr, (OpenTK.Graphics.OpenGL.ActiveUniformParameter)pname, (Int32*)@params_ptr); } } #if DEBUG @@ -42152,7 +42152,7 @@ namespace OpenTK.Graphics.OpenGL [System.CLSCompliant(false)] [AutoGenerated(Category = "ArbUniformBufferObject", Version = "2.0", EntryPoint = "glGetActiveUniformsiv")] public static - void GetActiveUniforms(UInt32 program, Int32 uniformCount, ref UInt32 uniformIndices, OpenTK.Graphics.OpenGL.ArbUniformBufferObject pname, [OutAttribute] out Int32 @params) + void GetActiveUniforms(UInt32 program, Int32 uniformCount, ref UInt32 uniformIndices, OpenTK.Graphics.OpenGL.ActiveUniformParameter pname, [OutAttribute] out Int32 @params) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -42163,7 +42163,7 @@ namespace OpenTK.Graphics.OpenGL fixed (UInt32* uniformIndices_ptr = &uniformIndices) fixed (Int32* @params_ptr = &@params) { - Delegates.glGetActiveUniformsiv((UInt32)program, (Int32)uniformCount, (UInt32*)uniformIndices_ptr, (OpenTK.Graphics.OpenGL.ArbUniformBufferObject)pname, (Int32*)@params_ptr); + Delegates.glGetActiveUniformsiv((UInt32)program, (Int32)uniformCount, (UInt32*)uniformIndices_ptr, (OpenTK.Graphics.OpenGL.ActiveUniformParameter)pname, (Int32*)@params_ptr); @params = *@params_ptr; } } @@ -42175,13 +42175,13 @@ namespace OpenTK.Graphics.OpenGL [System.CLSCompliant(false)] [AutoGenerated(Category = "ArbUniformBufferObject", Version = "2.0", EntryPoint = "glGetActiveUniformsiv")] public static - unsafe void GetActiveUniforms(UInt32 program, Int32 uniformCount, UInt32* uniformIndices, OpenTK.Graphics.OpenGL.ArbUniformBufferObject pname, [OutAttribute] Int32* @params) + unsafe void GetActiveUniforms(UInt32 program, Int32 uniformCount, UInt32* uniformIndices, OpenTK.Graphics.OpenGL.ActiveUniformParameter pname, [OutAttribute] Int32* @params) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) { #endif - Delegates.glGetActiveUniformsiv((UInt32)program, (Int32)uniformCount, (UInt32*)uniformIndices, (OpenTK.Graphics.OpenGL.ArbUniformBufferObject)pname, (Int32*)@params); + Delegates.glGetActiveUniformsiv((UInt32)program, (Int32)uniformCount, (UInt32*)uniformIndices, (OpenTK.Graphics.OpenGL.ActiveUniformParameter)pname, (Int32*)@params); #if DEBUG } #endif diff --git a/Source/OpenTK/Graphics/OpenGL/GLCore.cs b/Source/OpenTK/Graphics/OpenGL/GLCore.cs index 52229d20..083aa3fb 100644 --- a/Source/OpenTK/Graphics/OpenGL/GLCore.cs +++ b/Source/OpenTK/Graphics/OpenGL/GLCore.cs @@ -1535,7 +1535,7 @@ namespace OpenTK.Graphics.OpenGL internal extern static unsafe void GetActiveUniformName(UInt32 program, UInt32 uniformIndex, Int32 bufSize, [OutAttribute] Int32* length, [OutAttribute] StringBuilder uniformName); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glGetActiveUniformsiv", ExactSpelling = true)] - internal extern static unsafe void GetActiveUniformsiv(UInt32 program, Int32 uniformCount, UInt32* uniformIndices, OpenTK.Graphics.OpenGL.ArbUniformBufferObject pname, [OutAttribute] Int32* @params); + internal extern static unsafe void GetActiveUniformsiv(UInt32 program, Int32 uniformCount, UInt32* uniformIndices, OpenTK.Graphics.OpenGL.ActiveUniformParameter pname, [OutAttribute] Int32* @params); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glGetActiveVaryingNV", ExactSpelling = true)] internal extern static unsafe void GetActiveVaryingNV(UInt32 program, UInt32 index, Int32 bufSize, [OutAttribute] Int32* length, [OutAttribute] Int32* size, [OutAttribute] OpenTK.Graphics.OpenGL.NvTransformFeedback* type, [OutAttribute] StringBuilder name); diff --git a/Source/OpenTK/Graphics/OpenGL/GLDelegates.cs b/Source/OpenTK/Graphics/OpenGL/GLDelegates.cs index 9926139a..4a000a16 100644 --- a/Source/OpenTK/Graphics/OpenGL/GLDelegates.cs +++ b/Source/OpenTK/Graphics/OpenGL/GLDelegates.cs @@ -1533,7 +1533,7 @@ namespace OpenTK.Graphics.OpenGL internal unsafe delegate void GetActiveUniformName(UInt32 program, UInt32 uniformIndex, Int32 bufSize, [OutAttribute] Int32* length, [OutAttribute] StringBuilder uniformName); internal unsafe static GetActiveUniformName glGetActiveUniformName; [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate void GetActiveUniformsiv(UInt32 program, Int32 uniformCount, UInt32* uniformIndices, OpenTK.Graphics.OpenGL.ArbUniformBufferObject pname, [OutAttribute] Int32* @params); + internal unsafe delegate void GetActiveUniformsiv(UInt32 program, Int32 uniformCount, UInt32* uniformIndices, OpenTK.Graphics.OpenGL.ActiveUniformParameter pname, [OutAttribute] Int32* @params); internal unsafe static GetActiveUniformsiv glGetActiveUniformsiv; [System.Security.SuppressUnmanagedCodeSecurity()] internal unsafe delegate void GetActiveVaryingNV(UInt32 program, UInt32 index, Int32 bufSize, [OutAttribute] Int32* length, [OutAttribute] Int32* size, [OutAttribute] OpenTK.Graphics.OpenGL.NvTransformFeedback* type, [OutAttribute] StringBuilder name); diff --git a/Source/OpenTK/Graphics/OpenGL/GLEnums.cs b/Source/OpenTK/Graphics/OpenGL/GLEnums.cs index 962062e9..16440a8b 100644 --- a/Source/OpenTK/Graphics/OpenGL/GLEnums.cs +++ b/Source/OpenTK/Graphics/OpenGL/GLEnums.cs @@ -62,6 +62,18 @@ namespace OpenTK.Graphics.OpenGL UniformBlockReferencedByFragmentShader = ((int)0x8A46), } + public enum ActiveUniformParameter : int + { + UniformType = ((int)0x8A37), + UniformSize = ((int)0x8A38), + UniformNameLength = ((int)0x8A39), + UniformBlockIndex = ((int)0x8A3A), + UniformOffset = ((int)0x8A3B), + UniformArrayStride = ((int)0x8A3C), + UniformMatrixStride = ((int)0x8A3D), + UniformIsRowMajor = ((int)0x8A3E), + } + public enum ActiveUniformType : int { Int = ((int)0x1404), diff --git a/Source/OpenTK/Graphics/OpenGL/GLHelper.cs b/Source/OpenTK/Graphics/OpenGL/GLHelper.cs index 65274be7..aa8c450c 100644 --- a/Source/OpenTK/Graphics/OpenGL/GLHelper.cs +++ b/Source/OpenTK/Graphics/OpenGL/GLHelper.cs @@ -890,6 +890,52 @@ namespace OpenTK.Graphics.OpenGL EnableClientState((ArrayCap)array); } + [AutoGenerated(Category = "ArbUniformBufferObject", Version = "2.0", EntryPoint = "glGetActiveUniformsiv")] + [Obsolete("Use GetActiveUniforms(..., ActiveUniformParameter, ...) instead.")] + public static void GetActiveUniforms(Int32 program, Int32 uniformCount, Int32[] uniformIndices, ArbUniformBufferObject pname, [OutAttribute] Int32[] @params) + { + GetActiveUniforms(program, uniformCount, uniformIndices, (ActiveUniformParameter)pname, @params); + } + + [AutoGenerated(Category = "ArbUniformBufferObject", Version = "2.0", EntryPoint = "glGetActiveUniformsiv")] + [Obsolete("Use GetActiveUniforms(..., ActiveUniformParameter, ...) instead.")] + public static void GetActiveUniforms(Int32 program, Int32 uniformCount, ref Int32 uniformIndices, ArbUniformBufferObject pname, [OutAttribute] out Int32 @params) + { + GetActiveUniforms(program, uniformCount, ref uniformIndices, (ActiveUniformParameter)pname, out @params); + } + + [System.CLSCompliant(false)] + [AutoGenerated(Category = "ArbUniformBufferObject", Version = "2.0", EntryPoint = "glGetActiveUniformsiv")] + [Obsolete("Use GetActiveUniforms(..., ActiveUniformParameter, ...) instead.")] + public static unsafe void GetActiveUniforms(Int32 program, Int32 uniformCount, Int32* uniformIndices, ArbUniformBufferObject pname, [OutAttribute] Int32* @params) + { + GetActiveUniforms(program, uniformCount, uniformIndices, (ActiveUniformParameter)pname, @params); + } + + [System.CLSCompliant(false)] + [AutoGenerated(Category = "ArbUniformBufferObject", Version = "2.0", EntryPoint = "glGetActiveUniformsiv")] + [Obsolete("Use GetActiveUniforms(..., ActiveUniformParameter, ...) instead.")] + public static void GetActiveUniforms(UInt32 program, Int32 uniformCount, UInt32[] uniformIndices, ArbUniformBufferObject pname, [OutAttribute] Int32[] @params) + { + GetActiveUniforms(program, uniformCount, uniformIndices, (ActiveUniformParameter)pname, @params); + } + + [System.CLSCompliant(false)] + [AutoGenerated(Category = "ArbUniformBufferObject", Version = "2.0", EntryPoint = "glGetActiveUniformsiv")] + [Obsolete("Use GetActiveUniforms(..., ActiveUniformParameter, ...) instead.")] + public static void GetActiveUniforms(UInt32 program, Int32 uniformCount, ref UInt32 uniformIndices, ArbUniformBufferObject pname, [OutAttribute] out Int32 @params) + { + GetActiveUniforms(program, uniformCount, ref uniformIndices, (ActiveUniformParameter)pname, out @params); + } + + [System.CLSCompliant(false)] + [AutoGenerated(Category = "ArbUniformBufferObject", Version = "2.0", EntryPoint = "glGetActiveUniformsiv")] + [Obsolete("Use GetActiveUniforms(..., ActiveUniformParameter, ...) instead.")] + public static unsafe void GetActiveUniforms(UInt32 program, Int32 uniformCount, UInt32* uniformIndices, ArbUniformBufferObject pname, [OutAttribute] Int32* @params) + { + GetActiveUniforms(program, uniformCount, uniformIndices, (ActiveUniformParameter)pname, @params); + } + #endregion #pragma warning restore 3019