Added strongly-typed tokens for GetActiveUniformBlock, which was introduced in OpenGL 3.1. Fixes issue [#1216]: "[GL] GetActiveUniformBlock* methods take ArbUniformBufferObject parameters".

This commit is contained in:
the_fiddler 2009-11-16 16:23:36 +00:00
parent 4e04838148
commit 3aa67b84a3
6 changed files with 38 additions and 14 deletions

View file

@ -7573,6 +7573,15 @@ ActiveUniformType enum:
INT_SAMPLER_BUFFER = 0x8DD0 # EXT_gpu_shader4 + ARB_texture_buffer_object
UNSIGNED_INT_SAMPLER_2D_RECT = 0x8DD5 # EXT_gpu_shader4 + ARB_texture_rectangle
UNSIGNED_INT_SAMPLER_BUFFER = 0x8DD8 # EXT_gpu_shader4 + ARB_texture_buffer_object
ActiveUniformBlockParameter enum:
use ARB_uniform_buffer_object UNIFORM_BLOCK_BINDING
use ARB_uniform_buffer_object UNIFORM_BLOCK_DATA_SIZE
use ARB_uniform_buffer_object UNIFORM_BLOCK_NAME_LENGTH
use ARB_uniform_buffer_object UNIFORM_BLOCK_ACTIVE_UNIFORMS
use ARB_uniform_buffer_object UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES
use ARB_uniform_buffer_object UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER
use ARB_uniform_buffer_object UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER
# Non-core

View file

@ -269,6 +269,10 @@
<param name="internalformat"><type>SizedInternalFormat</type></param>
</function>
<function name="GetActiveUniformBlock" extension="Core">
<param name="pname"><type>ActiveUniformBlockParameter</type></param>
</function>
<!-- Version 3.2 -->
<function name="TexImage2DMultisample" extension="Core">

View file

@ -41812,13 +41812,13 @@ namespace OpenTK.Graphics.OpenGL
[System.CLSCompliant(false)]
[AutoGenerated(Category = "ArbUniformBufferObject", Version = "2.0", EntryPoint = "glGetActiveUniformBlockiv")]
public static
unsafe void GetActiveUniformBlock(Int32 program, Int32 uniformBlockIndex, OpenTK.Graphics.OpenGL.ArbUniformBufferObject pname, [OutAttribute] Int32* @params)
unsafe void GetActiveUniformBlock(Int32 program, Int32 uniformBlockIndex, OpenTK.Graphics.OpenGL.ActiveUniformBlockParameter pname, [OutAttribute] Int32* @params)
{
#if DEBUG
using (new ErrorHelper(GraphicsContext.CurrentContext))
{
#endif
Delegates.glGetActiveUniformBlockiv((UInt32)program, (UInt32)uniformBlockIndex, (OpenTK.Graphics.OpenGL.ArbUniformBufferObject)pname, (Int32*)@params);
Delegates.glGetActiveUniformBlockiv((UInt32)program, (UInt32)uniformBlockIndex, (OpenTK.Graphics.OpenGL.ActiveUniformBlockParameter)pname, (Int32*)@params);
#if DEBUG
}
#endif
@ -41826,7 +41826,7 @@ namespace OpenTK.Graphics.OpenGL
[AutoGenerated(Category = "ArbUniformBufferObject", Version = "2.0", EntryPoint = "glGetActiveUniformBlockiv")]
public static
void GetActiveUniformBlock(Int32 program, Int32 uniformBlockIndex, OpenTK.Graphics.OpenGL.ArbUniformBufferObject pname, [OutAttribute] Int32[] @params)
void GetActiveUniformBlock(Int32 program, Int32 uniformBlockIndex, OpenTK.Graphics.OpenGL.ActiveUniformBlockParameter pname, [OutAttribute] Int32[] @params)
{
#if DEBUG
using (new ErrorHelper(GraphicsContext.CurrentContext))
@ -41836,7 +41836,7 @@ namespace OpenTK.Graphics.OpenGL
{
fixed (Int32* @params_ptr = @params)
{
Delegates.glGetActiveUniformBlockiv((UInt32)program, (UInt32)uniformBlockIndex, (OpenTK.Graphics.OpenGL.ArbUniformBufferObject)pname, (Int32*)@params_ptr);
Delegates.glGetActiveUniformBlockiv((UInt32)program, (UInt32)uniformBlockIndex, (OpenTK.Graphics.OpenGL.ActiveUniformBlockParameter)pname, (Int32*)@params_ptr);
}
}
#if DEBUG
@ -41846,7 +41846,7 @@ namespace OpenTK.Graphics.OpenGL
[AutoGenerated(Category = "ArbUniformBufferObject", Version = "2.0", EntryPoint = "glGetActiveUniformBlockiv")]
public static
void GetActiveUniformBlock(Int32 program, Int32 uniformBlockIndex, OpenTK.Graphics.OpenGL.ArbUniformBufferObject pname, [OutAttribute] out Int32 @params)
void GetActiveUniformBlock(Int32 program, Int32 uniformBlockIndex, OpenTK.Graphics.OpenGL.ActiveUniformBlockParameter pname, [OutAttribute] out Int32 @params)
{
#if DEBUG
using (new ErrorHelper(GraphicsContext.CurrentContext))
@ -41856,7 +41856,7 @@ namespace OpenTK.Graphics.OpenGL
{
fixed (Int32* @params_ptr = &@params)
{
Delegates.glGetActiveUniformBlockiv((UInt32)program, (UInt32)uniformBlockIndex, (OpenTK.Graphics.OpenGL.ArbUniformBufferObject)pname, (Int32*)@params_ptr);
Delegates.glGetActiveUniformBlockiv((UInt32)program, (UInt32)uniformBlockIndex, (OpenTK.Graphics.OpenGL.ActiveUniformBlockParameter)pname, (Int32*)@params_ptr);
@params = *@params_ptr;
}
}
@ -41868,13 +41868,13 @@ namespace OpenTK.Graphics.OpenGL
[System.CLSCompliant(false)]
[AutoGenerated(Category = "ArbUniformBufferObject", Version = "2.0", EntryPoint = "glGetActiveUniformBlockiv")]
public static
unsafe void GetActiveUniformBlock(UInt32 program, UInt32 uniformBlockIndex, OpenTK.Graphics.OpenGL.ArbUniformBufferObject pname, [OutAttribute] Int32* @params)
unsafe void GetActiveUniformBlock(UInt32 program, UInt32 uniformBlockIndex, OpenTK.Graphics.OpenGL.ActiveUniformBlockParameter pname, [OutAttribute] Int32* @params)
{
#if DEBUG
using (new ErrorHelper(GraphicsContext.CurrentContext))
{
#endif
Delegates.glGetActiveUniformBlockiv((UInt32)program, (UInt32)uniformBlockIndex, (OpenTK.Graphics.OpenGL.ArbUniformBufferObject)pname, (Int32*)@params);
Delegates.glGetActiveUniformBlockiv((UInt32)program, (UInt32)uniformBlockIndex, (OpenTK.Graphics.OpenGL.ActiveUniformBlockParameter)pname, (Int32*)@params);
#if DEBUG
}
#endif
@ -41883,7 +41883,7 @@ namespace OpenTK.Graphics.OpenGL
[System.CLSCompliant(false)]
[AutoGenerated(Category = "ArbUniformBufferObject", Version = "2.0", EntryPoint = "glGetActiveUniformBlockiv")]
public static
void GetActiveUniformBlock(UInt32 program, UInt32 uniformBlockIndex, OpenTK.Graphics.OpenGL.ArbUniformBufferObject pname, [OutAttribute] Int32[] @params)
void GetActiveUniformBlock(UInt32 program, UInt32 uniformBlockIndex, OpenTK.Graphics.OpenGL.ActiveUniformBlockParameter pname, [OutAttribute] Int32[] @params)
{
#if DEBUG
using (new ErrorHelper(GraphicsContext.CurrentContext))
@ -41893,7 +41893,7 @@ namespace OpenTK.Graphics.OpenGL
{
fixed (Int32* @params_ptr = @params)
{
Delegates.glGetActiveUniformBlockiv((UInt32)program, (UInt32)uniformBlockIndex, (OpenTK.Graphics.OpenGL.ArbUniformBufferObject)pname, (Int32*)@params_ptr);
Delegates.glGetActiveUniformBlockiv((UInt32)program, (UInt32)uniformBlockIndex, (OpenTK.Graphics.OpenGL.ActiveUniformBlockParameter)pname, (Int32*)@params_ptr);
}
}
#if DEBUG
@ -41904,7 +41904,7 @@ namespace OpenTK.Graphics.OpenGL
[System.CLSCompliant(false)]
[AutoGenerated(Category = "ArbUniformBufferObject", Version = "2.0", EntryPoint = "glGetActiveUniformBlockiv")]
public static
void GetActiveUniformBlock(UInt32 program, UInt32 uniformBlockIndex, OpenTK.Graphics.OpenGL.ArbUniformBufferObject pname, [OutAttribute] out Int32 @params)
void GetActiveUniformBlock(UInt32 program, UInt32 uniformBlockIndex, OpenTK.Graphics.OpenGL.ActiveUniformBlockParameter pname, [OutAttribute] out Int32 @params)
{
#if DEBUG
using (new ErrorHelper(GraphicsContext.CurrentContext))
@ -41914,7 +41914,7 @@ namespace OpenTK.Graphics.OpenGL
{
fixed (Int32* @params_ptr = &@params)
{
Delegates.glGetActiveUniformBlockiv((UInt32)program, (UInt32)uniformBlockIndex, (OpenTK.Graphics.OpenGL.ArbUniformBufferObject)pname, (Int32*)@params_ptr);
Delegates.glGetActiveUniformBlockiv((UInt32)program, (UInt32)uniformBlockIndex, (OpenTK.Graphics.OpenGL.ActiveUniformBlockParameter)pname, (Int32*)@params_ptr);
@params = *@params_ptr;
}
}

View file

@ -1526,7 +1526,7 @@ namespace OpenTK.Graphics.OpenGL
internal extern static unsafe void GetActiveUniformARB(UInt32 programObj, UInt32 index, Int32 maxLength, [OutAttribute] Int32* length, [OutAttribute] Int32* size, [OutAttribute] OpenTK.Graphics.OpenGL.ArbShaderObjects* type, [OutAttribute] StringBuilder name);
[System.Security.SuppressUnmanagedCodeSecurity()]
[System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glGetActiveUniformBlockiv", ExactSpelling = true)]
internal extern static unsafe void GetActiveUniformBlockiv(UInt32 program, UInt32 uniformBlockIndex, OpenTK.Graphics.OpenGL.ArbUniformBufferObject pname, [OutAttribute] Int32* @params);
internal extern static unsafe void GetActiveUniformBlockiv(UInt32 program, UInt32 uniformBlockIndex, OpenTK.Graphics.OpenGL.ActiveUniformBlockParameter pname, [OutAttribute] Int32* @params);
[System.Security.SuppressUnmanagedCodeSecurity()]
[System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glGetActiveUniformBlockName", ExactSpelling = true)]
internal extern static unsafe void GetActiveUniformBlockName(UInt32 program, UInt32 uniformBlockIndex, Int32 bufSize, [OutAttribute] Int32* length, [OutAttribute] StringBuilder uniformBlockName);

View file

@ -1524,7 +1524,7 @@ namespace OpenTK.Graphics.OpenGL
internal unsafe delegate void GetActiveUniformARB(UInt32 programObj, UInt32 index, Int32 maxLength, [OutAttribute] Int32* length, [OutAttribute] Int32* size, [OutAttribute] OpenTK.Graphics.OpenGL.ArbShaderObjects* type, [OutAttribute] StringBuilder name);
internal unsafe static GetActiveUniformARB glGetActiveUniformARB;
[System.Security.SuppressUnmanagedCodeSecurity()]
internal unsafe delegate void GetActiveUniformBlockiv(UInt32 program, UInt32 uniformBlockIndex, OpenTK.Graphics.OpenGL.ArbUniformBufferObject pname, [OutAttribute] Int32* @params);
internal unsafe delegate void GetActiveUniformBlockiv(UInt32 program, UInt32 uniformBlockIndex, OpenTK.Graphics.OpenGL.ActiveUniformBlockParameter pname, [OutAttribute] Int32* @params);
internal unsafe static GetActiveUniformBlockiv glGetActiveUniformBlockiv;
[System.Security.SuppressUnmanagedCodeSecurity()]
internal unsafe delegate void GetActiveUniformBlockName(UInt32 program, UInt32 uniformBlockIndex, Int32 bufSize, [OutAttribute] Int32* length, [OutAttribute] StringBuilder uniformBlockName);

View file

@ -51,6 +51,17 @@ namespace OpenTK.Graphics.OpenGL
FloatMat4 = ((int)0x8B5C),
}
public enum ActiveUniformBlockParameter : int
{
UniformBlockBinding = ((int)0x8A3F),
UniformBlockDataSize = ((int)0x8A40),
UniformBlockNameLength = ((int)0x8A41),
UniformBlockActiveUniforms = ((int)0x8A42),
UniformBlockActiveUniformIndices = ((int)0x8A43),
UniformBlockReferencedByVertexShader = ((int)0x8A44),
UniformBlockReferencedByFragmentShader = ((int)0x8A46),
}
public enum ActiveUniformType : int
{
Int = ((int)0x1404),