From a2f0f70377dbc1daa57025d17f1b0128bf30246c Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Mon, 29 Jun 2009 18:32:51 +0000 Subject: [PATCH] Fixed handling of pointer-to-string parameters. These are now wrapped as string[] arrays. --- Documentation/Changelog.txt | 10 ++++ Documentation/Release.txt | 17 ++++-- Source/Bind/GL2/Generator.cs | 13 +++-- Source/Bind/Properties/AssemblyInfo.cs | 4 +- Source/Bind/Structures/Delegate.cs | 4 +- Source/Bind/Structures/Parameter.cs | 15 ++++- Source/Bind/Structures/Type.cs | 4 -- Source/OpenTK/Graphics/GL/GL.cs | 72 ++++++++++++------------ Source/OpenTK/Graphics/GL/GLCore.cs | 6 +- Source/OpenTK/Graphics/GL/GLDelegates.cs | 10 ++-- Source/OpenTK/Properties/AssemblyInfo.cs | 4 +- 11 files changed, 94 insertions(+), 65 deletions(-) diff --git a/Documentation/Changelog.txt b/Documentation/Changelog.txt index 65a8500c..4d5b80f0 100644 --- a/Documentation/Changelog.txt +++ b/Documentation/Changelog.txt @@ -1,5 +1,15 @@ [Legend: complete('+') | WIP('*') | missing('-')] +--------------------------- + OpenTK 0.9.8-1 -> 0.9.8-2 +--------------------------- ++ Bind + + Fixed handling of string arrays. + ++ OpenTK + + Graphics + + Fixed wrappers for functions taking string arrays: TranformFeedbackVaryings, GetUniformIndices, GetShaderSource. + ------------------------- OpenTK 0.9.8 -> 0.9.8-1 ------------------------- diff --git a/Documentation/Release.txt b/Documentation/Release.txt index 002ab3ff..d17d99b0 100644 --- a/Documentation/Release.txt +++ b/Documentation/Release.txt @@ -1,13 +1,11 @@ -The Open Toolkit 0.9.8-1 Beta +The Open Toolkit 0.9.8-2 Beta Sunday, 31 May 2009 [Overview] -This release fixes issues identified in OpenTK 0.9.8: -* GL.GetBoolea is renamed to GL.GetBoolean -* TextPrinter.Clear() no longer results in text corruption. -* Matrix4.Mult() performance is increased. +This release fixes issues identified in OpenTK 0.9.8-1: +* Bind now handles string arrays correctly. Affects functions GetShaderSource, GetUniformIndices, TransformFeedbackVaryings. Please visit http://www.opentk.com to report issues or request features. @@ -25,6 +23,15 @@ Example documentation may not show up correctly when running on Mono. This is a Please note that binary compatibility is not preserved between beta releases. +[0.9.8-1] + +1. Parameters of OpenTK.Graphics.GL.GetShaderSource have been changed: you should now pass a single StringBuilder instead of a StringBuilder[] array. + +2. Parameters of OpenTK.Graphics.GL.GetUniformIndices have been changed: you should now pass a string[] array instead of a single string. + +2. Parameters of OpenTK.Graphics.GL.TransformFeedbackVaryings have been changed: you should now pass a string[] array instead of a single string. + + [0.9.8-1] This release renames GL.GetBoolea to the correct GL.GetBoolean. diff --git a/Source/Bind/GL2/Generator.cs b/Source/Bind/GL2/Generator.cs index 9f034fb6..50ce2472 100644 --- a/Source/Bind/GL2/Generator.cs +++ b/Source/Bind/GL2/Generator.cs @@ -145,8 +145,9 @@ namespace Bind.GL2 p.Name = Utilities.Keywords.Contains(words[1]) ? "@" + words[1] : words[1]; p.CurrentType = words[2]; - p.Pointer = words[4].Contains("array") ? true : words[4].Contains("reference") ? true : false; - if (p.Pointer && words[5].Contains("[1]")) + p.Pointer |= words[4].Contains("array"); + p.Pointer |= words[4].Contains("reference"); + if (p.Pointer && words.Count > 5 && words[5].Contains("[1]")) p.ElementCount = 1; p.Flow = words[3] == "in" ? Parameter.FlowDirection.In : Parameter.FlowDirection.Out; @@ -356,11 +357,15 @@ namespace Bind.GL2 // "(Const)VoidPointer" -> "void*" GLTypes.Add(words[0], "void*"); } - /*else if (words[0] == "CharPointer" || words[0] == "charPointerARB") + else if (words[0] == "CharPointer" || words[0] == "charPointerARB") { + // The typematching logic cannot handle pointers to pointers, e.g. CharPointer* -> char** -> string* -> string[]. + // Hence we give it a push. + // Note: When both CurrentType == "String" and Pointer == true, the typematching is hardcoded to use + // System.String[] or System.StringBuilder[]. GLTypes.Add(words[0], "System.String"); } - else if (words[0].Contains("Pointer")) + /*else if (words[0].Contains("Pointer")) { GLTypes.Add(words[0], words[1].Replace("Pointer", "*")); }*/ diff --git a/Source/Bind/Properties/AssemblyInfo.cs b/Source/Bind/Properties/AssemblyInfo.cs index 23acfd85..a8e9b759 100644 --- a/Source/Bind/Properties/AssemblyInfo.cs +++ b/Source/Bind/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.9.9.9")] -[assembly: AssemblyFileVersion("0.9.9.9")] +[assembly: AssemblyVersion("0.9.9.10")] +[assembly: AssemblyFileVersion("0.9.9.10")] diff --git a/Source/Bind/Structures/Delegate.cs b/Source/Bind/Structures/Delegate.cs index beea8c21..637e4e3e 100644 --- a/Source/Bind/Structures/Delegate.cs +++ b/Source/Bind/Structures/Delegate.cs @@ -601,8 +601,8 @@ namespace Bind.Structures // Special case: these functions take a string[] that should stay as is. // Todo: move to gloverrides.xml - if (Name.Contains("ShaderSource") && Parameters[i].CurrentType.ToLower().Contains("string")) - Parameters[i].Array = 1; + //if (Name.Contains("ShaderSource") && Parameters[i].CurrentType.ToLower().Contains("string")) + // Parameters[i].Array = 1; } } diff --git a/Source/Bind/Structures/Parameter.cs b/Source/Bind/Structures/Parameter.cs index f6667213..dffc33ca 100644 --- a/Source/Bind/Structures/Parameter.cs +++ b/Source/Bind/Structures/Parameter.cs @@ -295,9 +295,9 @@ namespace Bind.Structures // Find out the necessary wrapper types. if (Pointer)/* || CurrentType == "IntPtr")*/ { - if (CurrentType.ToLower().Contains("char") || CurrentType.ToLower().Contains("string")) + if (CurrentType.ToLower().Contains("char")) { - // char* or string -> [In] String or [Out] StringBuilder + // char* -> [In] String or [Out] StringBuilder CurrentType = Flow == Parameter.FlowDirection.Out ? "System.Text.StringBuilder" : @@ -306,6 +306,17 @@ namespace Bind.Structures Pointer = false; WrapperType = WrapperTypes.None; } + else if (CurrentType.ToLower().Contains("string")) + { + // string* -> [In] String[] or [Out] StringBuilder[] + CurrentType = + Flow == Parameter.FlowDirection.Out ? + "System.Text.StringBuilder[]" : + "String[]"; + + Pointer = false; + WrapperType = WrapperTypes.None; + } else if (CurrentType.ToLower().Contains("void") || (!String.IsNullOrEmpty(PreviousType) && PreviousType.ToLower().Contains("void"))) /*|| CurrentType.Contains("IntPtr"))*/ { diff --git a/Source/Bind/Structures/Type.cs b/Source/Bind/Structures/Type.cs index 095af8b7..012bb2aa 100644 --- a/Source/Bind/Structures/Type.cs +++ b/Source/Bind/Structures/Type.cs @@ -270,10 +270,6 @@ namespace Bind.Structures Enum @enum; string s; - if (this.CurrentType == "SGIS_texture_filter4") - { - } - // Try to find out if it is an enum. If the type exists in the normal GLEnums list, use this. // Otherwise, try to find it in the aux enums list. If it exists in neither, it is not an enum. // Special case for Boolean - it is an enum, but it is dumb to use that instead of the 'bool' type. diff --git a/Source/OpenTK/Graphics/GL/GL.cs b/Source/OpenTK/Graphics/GL/GL.cs index 1d254bf7..6f35bff0 100644 --- a/Source/OpenTK/Graphics/GL/GL.cs +++ b/Source/OpenTK/Graphics/GL/GL.cs @@ -8297,13 +8297,13 @@ namespace OpenTK.Graphics [System.CLSCompliant(false)] [AutoGenerated(Category = "ArbShaderObjects", Version = "1.2", EntryPoint = "glGetShaderSourceARB")] public static - unsafe void GetShaderSource(Int32 obj, Int32 maxLength, [Out] Int32* length, [Out] System.Text.StringBuilder[] source) + unsafe void GetShaderSource(Int32 obj, Int32 maxLength, [Out] Int32* length, [Out] System.Text.StringBuilder source) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) { #endif - Delegates.glGetShaderSourceARB((UInt32)obj, (Int32)maxLength, (Int32*)length, (System.Text.StringBuilder[])source); + Delegates.glGetShaderSourceARB((UInt32)obj, (Int32)maxLength, (Int32*)length, (System.Text.StringBuilder)source); #if DEBUG } #endif @@ -8336,13 +8336,13 @@ namespace OpenTK.Graphics [System.CLSCompliant(false)] [AutoGenerated(Category = "ArbShaderObjects", Version = "1.2", EntryPoint = "glGetShaderSourceARB")] public static - unsafe void GetShaderSource(UInt32 obj, Int32 maxLength, [Out] Int32* length, [Out] System.Text.StringBuilder[] source) + unsafe void GetShaderSource(UInt32 obj, Int32 maxLength, [Out] Int32* length, [Out] System.Text.StringBuilder source) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) { #endif - Delegates.glGetShaderSourceARB((UInt32)obj, (Int32)maxLength, (Int32*)length, (System.Text.StringBuilder[])source); + Delegates.glGetShaderSourceARB((UInt32)obj, (Int32)maxLength, (Int32*)length, (System.Text.StringBuilder)source); #if DEBUG } #endif @@ -8374,7 +8374,7 @@ namespace OpenTK.Graphics /// [AutoGenerated(Category = "ArbShaderObjects", Version = "1.2", EntryPoint = "glGetShaderSourceARB")] public static - void GetShaderSource(Int32 obj, Int32 maxLength, [Out] out Int32 length, [Out] System.Text.StringBuilder[] source) + void GetShaderSource(Int32 obj, Int32 maxLength, [Out] out Int32 length, [Out] System.Text.StringBuilder source) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -8384,7 +8384,7 @@ namespace OpenTK.Graphics { fixed (Int32* length_ptr = &length) { - Delegates.glGetShaderSourceARB((UInt32)obj, (Int32)maxLength, (Int32*)length_ptr, (System.Text.StringBuilder[])source); + Delegates.glGetShaderSourceARB((UInt32)obj, (Int32)maxLength, (Int32*)length_ptr, (System.Text.StringBuilder)source); length = *length_ptr; } } @@ -8420,7 +8420,7 @@ namespace OpenTK.Graphics [System.CLSCompliant(false)] [AutoGenerated(Category = "ArbShaderObjects", Version = "1.2", EntryPoint = "glGetShaderSourceARB")] public static - void GetShaderSource(UInt32 obj, Int32 maxLength, [Out] out Int32 length, [Out] System.Text.StringBuilder[] source) + void GetShaderSource(UInt32 obj, Int32 maxLength, [Out] out Int32 length, [Out] System.Text.StringBuilder source) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -8430,7 +8430,7 @@ namespace OpenTK.Graphics { fixed (Int32* length_ptr = &length) { - Delegates.glGetShaderSourceARB((UInt32)obj, (Int32)maxLength, (Int32*)length_ptr, (System.Text.StringBuilder[])source); + Delegates.glGetShaderSourceARB((UInt32)obj, (Int32)maxLength, (Int32*)length_ptr, (System.Text.StringBuilder)source); length = *length_ptr; } } @@ -47355,13 +47355,13 @@ namespace OpenTK.Graphics [System.CLSCompliant(false)] [AutoGenerated(Category = "Version20", Version = "2.0", EntryPoint = "glGetShaderSource")] public static - unsafe void GetShaderSource(Int32 shader, Int32 bufSize, [Out] Int32* length, [Out] System.Text.StringBuilder[] source) + unsafe void GetShaderSource(Int32 shader, Int32 bufSize, [Out] Int32* length, [Out] System.Text.StringBuilder source) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) { #endif - Delegates.glGetShaderSource((UInt32)shader, (Int32)bufSize, (Int32*)length, (System.Text.StringBuilder[])source); + Delegates.glGetShaderSource((UInt32)shader, (Int32)bufSize, (Int32*)length, (System.Text.StringBuilder)source); #if DEBUG } #endif @@ -47394,7 +47394,7 @@ namespace OpenTK.Graphics [System.CLSCompliant(false)] [AutoGenerated(Category = "Version20", Version = "2.0", EntryPoint = "glGetShaderSource")] public static - void GetShaderSource(UInt32 shader, Int32 bufSize, [Out] out Int32 length, [Out] System.Text.StringBuilder[] source) + void GetShaderSource(UInt32 shader, Int32 bufSize, [Out] out Int32 length, [Out] System.Text.StringBuilder source) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -47404,7 +47404,7 @@ namespace OpenTK.Graphics { fixed (Int32* length_ptr = &length) { - Delegates.glGetShaderSource((UInt32)shader, (Int32)bufSize, (Int32*)length_ptr, (System.Text.StringBuilder[])source); + Delegates.glGetShaderSource((UInt32)shader, (Int32)bufSize, (Int32*)length_ptr, (System.Text.StringBuilder)source); length = *length_ptr; } } @@ -47440,13 +47440,13 @@ namespace OpenTK.Graphics [System.CLSCompliant(false)] [AutoGenerated(Category = "Version20", Version = "2.0", EntryPoint = "glGetShaderSource")] public static - unsafe void GetShaderSource(UInt32 shader, Int32 bufSize, [Out] Int32* length, [Out] System.Text.StringBuilder[] source) + unsafe void GetShaderSource(UInt32 shader, Int32 bufSize, [Out] Int32* length, [Out] System.Text.StringBuilder source) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) { #endif - Delegates.glGetShaderSource((UInt32)shader, (Int32)bufSize, (Int32*)length, (System.Text.StringBuilder[])source); + Delegates.glGetShaderSource((UInt32)shader, (Int32)bufSize, (Int32*)length, (System.Text.StringBuilder)source); #if DEBUG } #endif @@ -47478,7 +47478,7 @@ namespace OpenTK.Graphics /// [AutoGenerated(Category = "Version20", Version = "2.0", EntryPoint = "glGetShaderSource")] public static - void GetShaderSource(Int32 shader, Int32 bufSize, [Out] out Int32 length, [Out] System.Text.StringBuilder[] source) + void GetShaderSource(Int32 shader, Int32 bufSize, [Out] out Int32 length, [Out] System.Text.StringBuilder source) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -47488,7 +47488,7 @@ namespace OpenTK.Graphics { fixed (Int32* length_ptr = &length) { - Delegates.glGetShaderSource((UInt32)shader, (Int32)bufSize, (Int32*)length_ptr, (System.Text.StringBuilder[])source); + Delegates.glGetShaderSource((UInt32)shader, (Int32)bufSize, (Int32*)length_ptr, (System.Text.StringBuilder)source); length = *length_ptr; } } @@ -49320,7 +49320,7 @@ namespace OpenTK.Graphics [System.CLSCompliant(false)] [AutoGenerated(Category = "ArbUniformBufferObject", Version = "2.0", EntryPoint = "glGetUniformIndices")] public static - void GetUniformIndices(UInt32 program, Int32 uniformCount, String uniformNames, [Out] out UInt32 uniformIndices) + void GetUniformIndices(UInt32 program, Int32 uniformCount, String[] uniformNames, [Out] out UInt32 uniformIndices) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -49330,7 +49330,7 @@ namespace OpenTK.Graphics { fixed (UInt32* uniformIndices_ptr = &uniformIndices) { - Delegates.glGetUniformIndices((UInt32)program, (Int32)uniformCount, (String)uniformNames, (UInt32*)uniformIndices_ptr); + Delegates.glGetUniformIndices((UInt32)program, (Int32)uniformCount, (String[])uniformNames, (UInt32*)uniformIndices_ptr); uniformIndices = *uniformIndices_ptr; } } @@ -49341,7 +49341,7 @@ namespace OpenTK.Graphics [AutoGenerated(Category = "ArbUniformBufferObject", Version = "2.0", EntryPoint = "glGetUniformIndices")] public static - void GetUniformIndices(Int32 program, Int32 uniformCount, String uniformNames, [Out] out Int32 uniformIndices) + void GetUniformIndices(Int32 program, Int32 uniformCount, String[] uniformNames, [Out] out Int32 uniformIndices) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -49351,7 +49351,7 @@ namespace OpenTK.Graphics { fixed (Int32* uniformIndices_ptr = &uniformIndices) { - Delegates.glGetUniformIndices((UInt32)program, (Int32)uniformCount, (String)uniformNames, (UInt32*)uniformIndices_ptr); + Delegates.glGetUniformIndices((UInt32)program, (Int32)uniformCount, (String[])uniformNames, (UInt32*)uniformIndices_ptr); uniformIndices = *uniformIndices_ptr; } } @@ -49363,13 +49363,13 @@ namespace OpenTK.Graphics [System.CLSCompliant(false)] [AutoGenerated(Category = "ArbUniformBufferObject", Version = "2.0", EntryPoint = "glGetUniformIndices")] public static - unsafe void GetUniformIndices(UInt32 program, Int32 uniformCount, String uniformNames, [Out] UInt32* uniformIndices) + unsafe void GetUniformIndices(UInt32 program, Int32 uniformCount, String[] uniformNames, [Out] UInt32* uniformIndices) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) { #endif - Delegates.glGetUniformIndices((UInt32)program, (Int32)uniformCount, (String)uniformNames, (UInt32*)uniformIndices); + Delegates.glGetUniformIndices((UInt32)program, (Int32)uniformCount, (String[])uniformNames, (UInt32*)uniformIndices); #if DEBUG } #endif @@ -49378,13 +49378,13 @@ namespace OpenTK.Graphics [System.CLSCompliant(false)] [AutoGenerated(Category = "ArbUniformBufferObject", Version = "2.0", EntryPoint = "glGetUniformIndices")] public static - unsafe void GetUniformIndices(Int32 program, Int32 uniformCount, String uniformNames, [Out] Int32* uniformIndices) + unsafe void GetUniformIndices(Int32 program, Int32 uniformCount, String[] uniformNames, [Out] Int32* uniformIndices) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) { #endif - Delegates.glGetUniformIndices((UInt32)program, (Int32)uniformCount, (String)uniformNames, (UInt32*)uniformIndices); + Delegates.glGetUniformIndices((UInt32)program, (Int32)uniformCount, (String[])uniformNames, (UInt32*)uniformIndices); #if DEBUG } #endif @@ -49393,7 +49393,7 @@ namespace OpenTK.Graphics [System.CLSCompliant(false)] [AutoGenerated(Category = "ArbUniformBufferObject", Version = "2.0", EntryPoint = "glGetUniformIndices")] public static - void GetUniformIndices(UInt32 program, Int32 uniformCount, String uniformNames, [Out] UInt32[] uniformIndices) + void GetUniformIndices(UInt32 program, Int32 uniformCount, String[] uniformNames, [Out] UInt32[] uniformIndices) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -49403,7 +49403,7 @@ namespace OpenTK.Graphics { fixed (UInt32* uniformIndices_ptr = uniformIndices) { - Delegates.glGetUniformIndices((UInt32)program, (Int32)uniformCount, (String)uniformNames, (UInt32*)uniformIndices_ptr); + Delegates.glGetUniformIndices((UInt32)program, (Int32)uniformCount, (String[])uniformNames, (UInt32*)uniformIndices_ptr); } } #if DEBUG @@ -49413,7 +49413,7 @@ namespace OpenTK.Graphics [AutoGenerated(Category = "ArbUniformBufferObject", Version = "2.0", EntryPoint = "glGetUniformIndices")] public static - void GetUniformIndices(Int32 program, Int32 uniformCount, String uniformNames, [Out] Int32[] uniformIndices) + void GetUniformIndices(Int32 program, Int32 uniformCount, String[] uniformNames, [Out] Int32[] uniformIndices) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) @@ -49423,7 +49423,7 @@ namespace OpenTK.Graphics { fixed (Int32* uniformIndices_ptr = uniformIndices) { - Delegates.glGetUniformIndices((UInt32)program, (Int32)uniformCount, (String)uniformNames, (UInt32*)uniformIndices_ptr); + Delegates.glGetUniformIndices((UInt32)program, (Int32)uniformCount, (String[])uniformNames, (UInt32*)uniformIndices_ptr); } } #if DEBUG @@ -69346,13 +69346,13 @@ namespace OpenTK.Graphics [AutoGenerated(Category = "Version30", Version = "3.0", EntryPoint = "glTransformFeedbackVaryings")] public static - void TransformFeedbackVaryings(Int32 program, Int32 count, String varyings, OpenTK.Graphics.TransformFeedbackMode bufferMode) + void TransformFeedbackVaryings(Int32 program, Int32 count, String[] varyings, OpenTK.Graphics.TransformFeedbackMode bufferMode) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) { #endif - Delegates.glTransformFeedbackVaryings((UInt32)program, (Int32)count, (String)varyings, (OpenTK.Graphics.TransformFeedbackMode)bufferMode); + Delegates.glTransformFeedbackVaryings((UInt32)program, (Int32)count, (String[])varyings, (OpenTK.Graphics.TransformFeedbackMode)bufferMode); #if DEBUG } #endif @@ -69361,13 +69361,13 @@ namespace OpenTK.Graphics [System.CLSCompliant(false)] [AutoGenerated(Category = "Version30", Version = "3.0", EntryPoint = "glTransformFeedbackVaryings")] public static - void TransformFeedbackVaryings(UInt32 program, Int32 count, String varyings, OpenTK.Graphics.TransformFeedbackMode bufferMode) + void TransformFeedbackVaryings(UInt32 program, Int32 count, String[] varyings, OpenTK.Graphics.TransformFeedbackMode bufferMode) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) { #endif - Delegates.glTransformFeedbackVaryings((UInt32)program, (Int32)count, (String)varyings, (OpenTK.Graphics.TransformFeedbackMode)bufferMode); + Delegates.glTransformFeedbackVaryings((UInt32)program, (Int32)count, (String[])varyings, (OpenTK.Graphics.TransformFeedbackMode)bufferMode); #if DEBUG } #endif @@ -111819,13 +111819,13 @@ namespace OpenTK.Graphics [AutoGenerated(Category = "ExtTransformFeedback", Version = "2.0", EntryPoint = "glTransformFeedbackVaryingsEXT")] public static - void TransformFeedbackVaryings(Int32 program, Int32 count, String varyings, OpenTK.Graphics.ExtTransformFeedback bufferMode) + void TransformFeedbackVaryings(Int32 program, Int32 count, String[] varyings, OpenTK.Graphics.ExtTransformFeedback bufferMode) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) { #endif - Delegates.glTransformFeedbackVaryingsEXT((UInt32)program, (Int32)count, (String)varyings, (OpenTK.Graphics.ExtTransformFeedback)bufferMode); + Delegates.glTransformFeedbackVaryingsEXT((UInt32)program, (Int32)count, (String[])varyings, (OpenTK.Graphics.ExtTransformFeedback)bufferMode); #if DEBUG } #endif @@ -111834,13 +111834,13 @@ namespace OpenTK.Graphics [System.CLSCompliant(false)] [AutoGenerated(Category = "ExtTransformFeedback", Version = "2.0", EntryPoint = "glTransformFeedbackVaryingsEXT")] public static - void TransformFeedbackVaryings(UInt32 program, Int32 count, String varyings, OpenTK.Graphics.ExtTransformFeedback bufferMode) + void TransformFeedbackVaryings(UInt32 program, Int32 count, String[] varyings, OpenTK.Graphics.ExtTransformFeedback bufferMode) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) { #endif - Delegates.glTransformFeedbackVaryingsEXT((UInt32)program, (Int32)count, (String)varyings, (OpenTK.Graphics.ExtTransformFeedback)bufferMode); + Delegates.glTransformFeedbackVaryingsEXT((UInt32)program, (Int32)count, (String[])varyings, (OpenTK.Graphics.ExtTransformFeedback)bufferMode); #if DEBUG } #endif diff --git a/Source/OpenTK/Graphics/GL/GLCore.cs b/Source/OpenTK/Graphics/GL/GLCore.cs index ec7ee350..a572ea21 100644 --- a/Source/OpenTK/Graphics/GL/GLCore.cs +++ b/Source/OpenTK/Graphics/GL/GLCore.cs @@ -799,7 +799,7 @@ namespace OpenTK.Graphics internal extern static unsafe void GetShaderiv(UInt32 shader, OpenTK.Graphics.ShaderParameter pname, [Out] Int32* @params); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glGetShaderSource", ExactSpelling = true)] - internal extern static unsafe void GetShaderSource(UInt32 shader, Int32 bufSize, [Out] Int32* length, [Out] System.Text.StringBuilder[] source); + internal extern static unsafe void GetShaderSource(UInt32 shader, Int32 bufSize, [Out] Int32* length, [Out] System.Text.StringBuilder source); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glGetString", ExactSpelling = true)] internal extern static IntPtr GetString(OpenTK.Graphics.StringName name); @@ -853,7 +853,7 @@ namespace OpenTK.Graphics internal extern static unsafe void GetUniformfv(UInt32 program, Int32 location, [Out] Single* @params); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glGetUniformIndices", ExactSpelling = true)] - internal extern static unsafe void GetUniformIndices(UInt32 program, Int32 uniformCount, String uniformNames, [Out] UInt32* uniformIndices); + internal extern static unsafe void GetUniformIndices(UInt32 program, Int32 uniformCount, String[] uniformNames, [Out] UInt32* uniformIndices); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glGetUniformiv", ExactSpelling = true)] internal extern static unsafe void GetUniformiv(UInt32 program, Int32 location, [Out] Int32* @params); @@ -1696,7 +1696,7 @@ namespace OpenTK.Graphics internal extern static void TexSubImage3D(OpenTK.Graphics.TextureTarget target, Int32 level, Int32 xoffset, Int32 yoffset, Int32 zoffset, Int32 width, Int32 height, Int32 depth, OpenTK.Graphics.PixelFormat format, OpenTK.Graphics.PixelType type, IntPtr pixels); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glTransformFeedbackVaryings", ExactSpelling = true)] - internal extern static void TransformFeedbackVaryings(UInt32 program, Int32 count, String varyings, OpenTK.Graphics.TransformFeedbackMode bufferMode); + internal extern static void TransformFeedbackVaryings(UInt32 program, Int32 count, String[] varyings, OpenTK.Graphics.TransformFeedbackMode bufferMode); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glTranslated", ExactSpelling = true)] internal extern static void Translated(Double x, Double y, Double z); diff --git a/Source/OpenTK/Graphics/GL/GLDelegates.cs b/Source/OpenTK/Graphics/GL/GLDelegates.cs index 7376bde2..19f90e79 100644 --- a/Source/OpenTK/Graphics/GL/GLDelegates.cs +++ b/Source/OpenTK/Graphics/GL/GLDelegates.cs @@ -2012,10 +2012,10 @@ namespace OpenTK.Graphics internal unsafe delegate void GetShaderiv(UInt32 shader, OpenTK.Graphics.ShaderParameter pname, [Out] Int32* @params); internal unsafe static GetShaderiv glGetShaderiv; [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate void GetShaderSource(UInt32 shader, Int32 bufSize, [Out] Int32* length, [Out] System.Text.StringBuilder[] source); + internal unsafe delegate void GetShaderSource(UInt32 shader, Int32 bufSize, [Out] Int32* length, [Out] System.Text.StringBuilder source); internal unsafe static GetShaderSource glGetShaderSource; [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate void GetShaderSourceARB(UInt32 obj, Int32 maxLength, [Out] Int32* length, [Out] System.Text.StringBuilder[] source); + internal unsafe delegate void GetShaderSourceARB(UInt32 obj, Int32 maxLength, [Out] Int32* length, [Out] System.Text.StringBuilder source); internal unsafe static GetShaderSourceARB glGetShaderSourceARB; [System.Security.SuppressUnmanagedCodeSecurity()] internal unsafe delegate void GetSharpenTexFuncSGIS(OpenTK.Graphics.TextureTarget target, [Out] Single* points); @@ -2123,7 +2123,7 @@ namespace OpenTK.Graphics internal unsafe delegate void GetUniformfvARB(UInt32 programObj, Int32 location, [Out] Single* @params); internal unsafe static GetUniformfvARB glGetUniformfvARB; [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate void GetUniformIndices(UInt32 program, Int32 uniformCount, String uniformNames, [Out] UInt32* uniformIndices); + internal unsafe delegate void GetUniformIndices(UInt32 program, Int32 uniformCount, String[] uniformNames, [Out] UInt32* uniformIndices); internal unsafe static GetUniformIndices glGetUniformIndices; [System.Security.SuppressUnmanagedCodeSecurity()] internal unsafe delegate void GetUniformiv(UInt32 program, Int32 location, [Out] Int32* @params); @@ -4409,10 +4409,10 @@ namespace OpenTK.Graphics internal unsafe delegate void TransformFeedbackAttribsNV(UInt32 count, Int32* attribs, OpenTK.Graphics.NvTransformFeedback bufferMode); internal unsafe static TransformFeedbackAttribsNV glTransformFeedbackAttribsNV; [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate void TransformFeedbackVaryings(UInt32 program, Int32 count, String varyings, OpenTK.Graphics.TransformFeedbackMode bufferMode); + internal delegate void TransformFeedbackVaryings(UInt32 program, Int32 count, String[] varyings, OpenTK.Graphics.TransformFeedbackMode bufferMode); internal static TransformFeedbackVaryings glTransformFeedbackVaryings; [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate void TransformFeedbackVaryingsEXT(UInt32 program, Int32 count, String varyings, OpenTK.Graphics.ExtTransformFeedback bufferMode); + internal delegate void TransformFeedbackVaryingsEXT(UInt32 program, Int32 count, String[] varyings, OpenTK.Graphics.ExtTransformFeedback bufferMode); internal static TransformFeedbackVaryingsEXT glTransformFeedbackVaryingsEXT; [System.Security.SuppressUnmanagedCodeSecurity()] internal unsafe delegate void TransformFeedbackVaryingsNV(UInt32 program, Int32 count, Int32* locations, OpenTK.Graphics.NvTransformFeedback bufferMode); diff --git a/Source/OpenTK/Properties/AssemblyInfo.cs b/Source/OpenTK/Properties/AssemblyInfo.cs index aefe763e..a39a1dea 100644 --- a/Source/OpenTK/Properties/AssemblyInfo.cs +++ b/Source/OpenTK/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.9.8.1")] -[assembly: AssemblyFileVersion("0.9.8.1")] +[assembly: AssemblyVersion("0.9.8.2")] +[assembly: AssemblyFileVersion("0.9.8.2")]