Implemented manual marshaling of string parameters
authorStefanos A <stapostol@gmail.com>
Wed, 4 Dec 2013 21:32:56 +0000 (22:32 +0100)
committerStefanos A <stapostol@gmail.com>
Wed, 4 Dec 2013 21:32:56 +0000 (22:32 +0100)
Source/Bind/FuncProcessor.cs
Source/OpenTK.Rewrite/Program.cs
Source/OpenTK/Graphics/ES20/ES20.cs
Source/OpenTK/Graphics/ES30/ES30.cs
Source/OpenTK/Graphics/OpenGL/GL.cs
Source/OpenTK/Graphics/OpenGL4/GL4.cs

index 191fd20..541e3c8 100644 (file)
@@ -606,21 +606,13 @@ namespace Bind
             // Find out the necessary wrapper types.
             if (p.CurrentType.ToLower() == "string" && p.Pointer == 0)
             {
-                // char* -> [In] String or [Out] StringBuilder
-                if (p.Flow == FlowDirection.Out)
-                {
-                    // Due to a bug in the Mono runtime, we need
-                    // to marshal out string parameters ourselves.
-                    // StringBuilder crashes at runtime.
-                    p.QualifiedType = "IntPtr";
-                }
-                else
-                {
-                    // in string parameters work fine on both
-                    // Mono and .Net.
-                    p.QualifiedType = "String";
-                }
-
+                // char* -> IntPtr
+                // Due to a bug in the Mono runtime, we need
+                // to marshal [out] string parameters ourselves.
+                // StringBuilder crashes at runtime.
+                // For symmetry, and to avoid potential runtime bugs,
+                // we will also marshal [in] string types manually.
+                p.QualifiedType = "IntPtr";
                 p.WrapperType |= WrapperTypes.StringParameter;
             }
 
index 1bccaff..b6d5189 100644 (file)
@@ -258,11 +258,14 @@ namespace OpenTK.Rewrite
             {
                 EmitStringBuilderEpilogue(wrapper, native, body, il);
             }
-            if (wrapper.Parameters.Any(p => p.ParameterType.Name == "StringBuilder" && p.ParameterType.IsArray))
+            if (wrapper.Parameters.Any(p => p.ParameterType.Name == "String" && p.ParameterType.IsArray))
             {
-                EmitStringArrayEpilogue(wrapper, native, body, il);
+                EmitStringArrayEpilogue(wrapper, body, il);
+            }
+            if (wrapper.Parameters.Any(p => p.ParameterType.Name == "String" && !p.ParameterType.IsArray))
+            {
+                EmitStringEpilogue(wrapper, body, il);
             }
-            
 
             // return
             il.Emit(OpCodes.Ret);
@@ -365,16 +368,51 @@ namespace OpenTK.Rewrite
             }
         }
 
+        static void EmitStringParameter(MethodDefinition wrapper, TypeReference p, MethodBody body, ILProcessor il)
+        {
+            // string marshaling:
+            // IntPtr ptr = Marshal.StringToHGlobalAnsi(str);
+            // try { calli }
+            // finally { Marshal.FreeHGlobal(ptr); }
+            var marshal_str_to_ptr = wrapper.Module.Import(TypeMarshal.Methods.First(m => m.Name == "StringToHGlobalAnsi"));
+
+            // IntPtr ptr;
+            var variable_name = p.Name + "_string_ptr";
+            body.Variables.Add(new VariableDefinition(variable_name, TypeIntPtr));
+            int index = body.Variables.Count - 1;
+
+            // ptr = Marshal.StringToHGlobalAnsi(str);
+            il.Emit(OpCodes.Call, marshal_str_to_ptr);
+            il.Emit(OpCodes.Stloc, index);
+            il.Emit(OpCodes.Ldloc, index);
+
+            // The finally block will be emitted in the function epilogue
+        }
+
+        static void EmitStringEpilogue(MethodDefinition wrapper, MethodBody body, ILProcessor il)
+        {
+            for (int i = 0; i < wrapper.Parameters.Count; i++)
+            {
+                var p = wrapper.Parameters[i].ParameterType;
+                if (p.Name == "String" && !p.IsArray)
+                {
+                    var free = wrapper.Module.Import(TypeMarshal.Methods.First(m => m.Name == "FreeHGlobal"));
+
+                    // Marshal.FreeHGlobal(ptr)
+                    var variable_name = p.Name + "_string_ptr";
+                    var v = body.Variables.First(m => m.Name == variable_name);
+                    il.Emit(OpCodes.Ldloc, v.Index);
+                    il.Emit(OpCodes.Call, free);
+                }
+            }
+        }
+
         static void EmitStringArrayParameter(MethodDefinition wrapper, TypeReference p, MethodBody body, ILProcessor il)
         {
             // string[] masrhaling:
             // IntPtr ptr = MarshalStringArrayToPtr(strings);
-            // try {
-            //  calli
-            // }
-            // finally {
-            //  UnmarshalStringArray(ptr);
-            // }
+            // try { calli }
+            // finally { UnmarshalStringArray(ptr); }
             var marshal_str_array_to_ptr = wrapper.Module.Import(TypeBindingsBase.Methods.First(m => m.Name == "MarshalStringArrayToPtr"));
 
             // IntPtr ptr;
@@ -390,7 +428,7 @@ namespace OpenTK.Rewrite
             // The finally block will be emitted in the function epilogue
         }
 
-        static void EmitStringArrayEpilogue(MethodDefinition wrapper, MethodDefinition native, MethodBody body, ILProcessor il)
+        static void EmitStringArrayEpilogue(MethodDefinition wrapper, MethodBody body, ILProcessor il)
         {
             for (int i = 0; i < wrapper.Parameters.Count; i++)
             {
@@ -511,6 +549,10 @@ namespace OpenTK.Rewrite
                     // We'll emit the try-finally block in the epilogue implementation,
                     // because we haven't yet emitted all necessary instructions here.
                 }
+                else if (p.Name == "String" && !p.IsArray)
+                {
+                    EmitStringParameter(method, p, body, il);
+                }
                 else if (p.IsByReference)
                 {
                     body.Variables.Add(new VariableDefinition(new PinnedType(p)));
index 2594cbc..987ec11 100644 (file)
@@ -38507,7 +38507,7 @@ namespace OpenTK.Graphics.ES20
         static extern void glAttachShader(UInt32 program, UInt32 shader);
         [Slot(7)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glBindAttribLocation(UInt32 program, UInt32 index, String name);
+        static extern void glBindAttribLocation(UInt32 program, UInt32 index, IntPtr name);
         [Slot(8)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glBindBuffer(System.Int32 target, UInt32 buffer);
@@ -38591,7 +38591,7 @@ namespace OpenTK.Graphics.ES20
         static extern unsafe void glDebugMessageControl(System.Int32 source, System.Int32 type, System.Int32 severity, Int32 count, UInt32* ids, bool enabled);
         [Slot(54)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glDebugMessageInsert(System.Int32 source, System.Int32 type, UInt32 id, System.Int32 severity, Int32 length, String buf);
+        static extern void glDebugMessageInsert(System.Int32 source, System.Int32 type, UInt32 id, System.Int32 severity, Int32 length, IntPtr buf);
         [Slot(56)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glDeleteBuffers(Int32 n, UInt32* buffers);
@@ -38681,7 +38681,7 @@ namespace OpenTK.Graphics.ES20
         static extern unsafe void glGetAttachedShaders(UInt32 program, Int32 maxCount, [OutAttribute] Int32* count, [OutAttribute] UInt32* shaders);
         [Slot(131)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetAttribLocation(UInt32 program, String name);
+        static extern Int32 glGetAttribLocation(UInt32 program, IntPtr name);
         [Slot(132)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glGetBooleanv(System.Int32 pname, [OutAttribute] bool* data);
@@ -38750,7 +38750,7 @@ namespace OpenTK.Graphics.ES20
         static extern unsafe void glGetUniformiv(UInt32 program, Int32 location, [OutAttribute] Int32* @params);
         [Slot(184)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetUniformLocation(UInt32 program, String name);
+        static extern Int32 glGetUniformLocation(UInt32 program, IntPtr name);
         [Slot(185)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glGetVertexAttribfv(UInt32 index, System.Int32 pname, [OutAttribute] Single* @params);
@@ -38792,10 +38792,10 @@ namespace OpenTK.Graphics.ES20
         static extern void glLinkProgram(UInt32 program);
         [Slot(209)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glObjectLabel(System.Int32 identifier, UInt32 name, Int32 length, String label);
+        static extern void glObjectLabel(System.Int32 identifier, UInt32 name, Int32 length, IntPtr label);
         [Slot(211)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glObjectPtrLabel(IntPtr ptr, Int32 length, String label);
+        static extern void glObjectPtrLabel(IntPtr ptr, Int32 length, IntPtr label);
         [Slot(213)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glPixelStorei(System.Int32 pname, Int32 param);
@@ -38807,7 +38807,7 @@ namespace OpenTK.Graphics.ES20
         static extern void glPopDebugGroup();
         [Slot(253)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glPushDebugGroup(System.Int32 source, UInt32 id, Int32 length, String message);
+        static extern void glPushDebugGroup(System.Int32 source, UInt32 id, Int32 length, IntPtr message);
         [Slot(260)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glReadPixels(Int32 x, Int32 y, Int32 width, Int32 height, System.Int32 format, System.Int32 type, [OutAttribute] IntPtr pixels);
@@ -38975,7 +38975,7 @@ namespace OpenTK.Graphics.ES20
         static extern void glBlendEquationEXT(System.Int32 mode);
         [Slot(47)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glCreateShaderProgramEXT(System.Int32 type, String @string);
+        static extern Int32 glCreateShaderProgramEXT(System.Int32 type, IntPtr @string);
         [Slot(48)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern Int32 glCreateShaderProgramvEXT(System.Int32 type, Int32 count, IntPtr strings);
@@ -39053,7 +39053,7 @@ namespace OpenTK.Graphics.ES20
         static extern unsafe void glGetQueryObjectuivEXT(UInt32 id, System.Int32 pname, [OutAttribute] UInt32* @params);
         [Slot(189)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glInsertEventMarkerEXT(Int32 length, String marker);
+        static extern void glInsertEventMarkerEXT(Int32 length, IntPtr marker);
         [Slot(195)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern bool glIsProgramPipelineEXT(UInt32 pipeline);
@@ -39062,7 +39062,7 @@ namespace OpenTK.Graphics.ES20
         static extern bool glIsQueryEXT(UInt32 id);
         [Slot(202)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glLabelObjectEXT(System.Int32 type, UInt32 @object, Int32 length, String label);
+        static extern void glLabelObjectEXT(System.Int32 type, UInt32 @object, Int32 length, IntPtr label);
         [Slot(206)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern IntPtr glMapBufferRangeEXT(System.Int32 target, IntPtr offset, IntPtr length, UInt32 access);
@@ -39179,7 +39179,7 @@ namespace OpenTK.Graphics.ES20
         static extern unsafe void glProgramUniformMatrix4x3fvEXT(UInt32 program, Int32 location, Int32 count, bool transpose, Single* value);
         [Slot(255)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glPushGroupMarkerEXT(Int32 length, String marker);
+        static extern void glPushGroupMarkerEXT(Int32 length, IntPtr marker);
         [Slot(256)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glQueryCounterEXT(UInt32 id, System.Int32 target);
@@ -39236,7 +39236,7 @@ namespace OpenTK.Graphics.ES20
         static extern unsafe void glDebugMessageControlKHR(System.Int32 source, System.Int32 type, System.Int32 severity, Int32 count, UInt32* ids, bool enabled);
         [Slot(55)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glDebugMessageInsertKHR(System.Int32 source, System.Int32 type, UInt32 id, System.Int32 severity, Int32 length, String buf);
+        static extern void glDebugMessageInsertKHR(System.Int32 source, System.Int32 type, UInt32 id, System.Int32 severity, Int32 length, IntPtr buf);
         [Slot(136)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe Int32 glGetDebugMessageLogKHR(UInt32 count, Int32 bufSize, [OutAttribute] System.Int32* sources, [OutAttribute] System.Int32* types, [OutAttribute] UInt32* ids, [OutAttribute] System.Int32* severities, [OutAttribute] Int32* lengths, [OutAttribute] IntPtr messageLog);
@@ -39251,16 +39251,16 @@ namespace OpenTK.Graphics.ES20
         static extern void glGetPointervKHR(System.Int32 pname, [OutAttribute] IntPtr @params);
         [Slot(210)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glObjectLabelKHR(System.Int32 identifier, UInt32 name, Int32 length, String label);
+        static extern void glObjectLabelKHR(System.Int32 identifier, UInt32 name, Int32 length, IntPtr label);
         [Slot(212)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glObjectPtrLabelKHR(IntPtr ptr, Int32 length, String label);
+        static extern void glObjectPtrLabelKHR(IntPtr ptr, Int32 length, IntPtr label);
         [Slot(216)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glPopDebugGroupKHR();
         [Slot(254)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glPushDebugGroupKHR(System.Int32 source, UInt32 id, Int32 length, String message);
+        static extern void glPushDebugGroupKHR(System.Int32 source, UInt32 id, Int32 length, IntPtr message);
         [Slot(14)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glBlendBarrierNV();
index ad4272b..d76e89e 100644 (file)
@@ -49066,7 +49066,7 @@ namespace OpenTK.Graphics.ES30
         static extern void glBeginTransformFeedback(System.Int32 primitiveMode);
         [Slot(9)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glBindAttribLocation(UInt32 program, UInt32 index, String name);
+        static extern void glBindAttribLocation(UInt32 program, UInt32 index, IntPtr name);
         [Slot(10)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glBindBuffer(System.Int32 target, UInt32 buffer);
@@ -49195,7 +49195,7 @@ namespace OpenTK.Graphics.ES30
         static extern unsafe void glDebugMessageControl(System.Int32 source, System.Int32 type, System.Int32 severity, Int32 count, UInt32* ids, bool enabled);
         [Slot(71)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glDebugMessageInsert(System.Int32 source, System.Int32 type, UInt32 id, System.Int32 severity, Int32 length, String buf);
+        static extern void glDebugMessageInsert(System.Int32 source, System.Int32 type, UInt32 id, System.Int32 severity, Int32 length, IntPtr buf);
         [Slot(73)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glDeleteBuffers(Int32 n, UInt32* buffers);
@@ -49348,7 +49348,7 @@ namespace OpenTK.Graphics.ES30
         static extern unsafe void glGetAttachedShaders(UInt32 program, Int32 maxCount, [OutAttribute] Int32* count, [OutAttribute] UInt32* shaders);
         [Slot(169)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetAttribLocation(UInt32 program, String name);
+        static extern Int32 glGetAttribLocation(UInt32 program, IntPtr name);
         [Slot(170)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glGetBooleanv(System.Int32 pname, [OutAttribute] bool* data);
@@ -49372,7 +49372,7 @@ namespace OpenTK.Graphics.ES30
         static extern unsafe void glGetFloatv(System.Int32 pname, [OutAttribute] Single* data);
         [Slot(182)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetFragDataLocation(UInt32 program, String name);
+        static extern Int32 glGetFragDataLocation(UInt32 program, IntPtr name);
         [Slot(183)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glGetFramebufferAttachmentParameteriv(System.Int32 target, System.Int32 attachment, System.Int32 pname, [OutAttribute] Int32* @params);
@@ -49456,7 +49456,7 @@ namespace OpenTK.Graphics.ES30
         static extern unsafe void glGetTransformFeedbackVarying(UInt32 program, UInt32 index, Int32 bufSize, [OutAttribute] Int32* length, [OutAttribute] Int32* size, [OutAttribute] System.Int32* type, [OutAttribute] IntPtr name);
         [Slot(235)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetUniformBlockIndex(UInt32 program, String uniformBlockName);
+        static extern Int32 glGetUniformBlockIndex(UInt32 program, IntPtr uniformBlockName);
         [Slot(236)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glGetUniformfv(UInt32 program, Int32 location, [OutAttribute] Single* @params);
@@ -49468,7 +49468,7 @@ namespace OpenTK.Graphics.ES30
         static extern unsafe void glGetUniformiv(UInt32 program, Int32 location, [OutAttribute] Int32* @params);
         [Slot(239)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetUniformLocation(UInt32 program, String name);
+        static extern Int32 glGetUniformLocation(UInt32 program, IntPtr name);
         [Slot(240)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glGetUniformuiv(UInt32 program, Int32 location, [OutAttribute] UInt32* @params);
@@ -49543,10 +49543,10 @@ namespace OpenTK.Graphics.ES30
         static extern IntPtr glMapBufferRange(System.Int32 target, IntPtr offset, IntPtr length, System.Int32 access);
         [Slot(275)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glObjectLabel(System.Int32 identifier, UInt32 name, Int32 length, String label);
+        static extern void glObjectLabel(System.Int32 identifier, UInt32 name, Int32 length, IntPtr label);
         [Slot(277)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glObjectPtrLabel(IntPtr ptr, Int32 length, String label);
+        static extern void glObjectPtrLabel(IntPtr ptr, Int32 length, IntPtr label);
         [Slot(279)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glPauseTransformFeedback();
@@ -49567,7 +49567,7 @@ namespace OpenTK.Graphics.ES30
         static extern void glProgramParameteri(UInt32 program, System.Int32 pname, Int32 value);
         [Slot(322)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glPushDebugGroup(System.Int32 source, UInt32 id, Int32 length, String message);
+        static extern void glPushDebugGroup(System.Int32 source, UInt32 id, Int32 length, IntPtr message);
         [Slot(326)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glReadBuffer(System.Int32 mode);
@@ -49840,7 +49840,7 @@ namespace OpenTK.Graphics.ES30
         static extern void glBlendEquationEXT(System.Int32 mode);
         [Slot(64)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glCreateShaderProgramEXT(System.Int32 type, String @string);
+        static extern Int32 glCreateShaderProgramEXT(System.Int32 type, IntPtr @string);
         [Slot(65)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern Int32 glCreateShaderProgramvEXT(System.Int32 type, Int32 count, IntPtr strings);
@@ -49918,7 +49918,7 @@ namespace OpenTK.Graphics.ES30
         static extern unsafe void glGetQueryObjectuivEXT(UInt32 id, System.Int32 pname, [OutAttribute] UInt32* @params);
         [Slot(247)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glInsertEventMarkerEXT(Int32 length, String marker);
+        static extern void glInsertEventMarkerEXT(Int32 length, IntPtr marker);
         [Slot(255)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern bool glIsProgramPipelineEXT(UInt32 pipeline);
@@ -49927,7 +49927,7 @@ namespace OpenTK.Graphics.ES30
         static extern bool glIsQueryEXT(UInt32 id);
         [Slot(267)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glLabelObjectEXT(System.Int32 type, UInt32 @object, Int32 length, String label);
+        static extern void glLabelObjectEXT(System.Int32 type, UInt32 @object, Int32 length, IntPtr label);
         [Slot(272)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern IntPtr glMapBufferRangeEXT(System.Int32 target, IntPtr offset, IntPtr length, UInt32 access);
@@ -50044,7 +50044,7 @@ namespace OpenTK.Graphics.ES30
         static extern unsafe void glProgramUniformMatrix4x3fvEXT(UInt32 program, Int32 location, Int32 count, bool transpose, Single* value);
         [Slot(324)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glPushGroupMarkerEXT(Int32 length, String marker);
+        static extern void glPushGroupMarkerEXT(Int32 length, IntPtr marker);
         [Slot(325)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glQueryCounterEXT(UInt32 id, System.Int32 target);
@@ -50101,7 +50101,7 @@ namespace OpenTK.Graphics.ES30
         static extern unsafe void glDebugMessageControlKHR(System.Int32 source, System.Int32 type, System.Int32 severity, Int32 count, UInt32* ids, bool enabled);
         [Slot(72)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glDebugMessageInsertKHR(System.Int32 source, System.Int32 type, UInt32 id, System.Int32 severity, Int32 length, String buf);
+        static extern void glDebugMessageInsertKHR(System.Int32 source, System.Int32 type, UInt32 id, System.Int32 severity, Int32 length, IntPtr buf);
         [Slot(176)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe Int32 glGetDebugMessageLogKHR(UInt32 count, Int32 bufSize, [OutAttribute] System.Int32* sources, [OutAttribute] System.Int32* types, [OutAttribute] UInt32* ids, [OutAttribute] System.Int32* severities, [OutAttribute] Int32* lengths, [OutAttribute] IntPtr messageLog);
@@ -50116,16 +50116,16 @@ namespace OpenTK.Graphics.ES30
         static extern void glGetPointervKHR(System.Int32 pname, [OutAttribute] IntPtr @params);
         [Slot(276)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glObjectLabelKHR(System.Int32 identifier, UInt32 name, Int32 length, String label);
+        static extern void glObjectLabelKHR(System.Int32 identifier, UInt32 name, Int32 length, IntPtr label);
         [Slot(278)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glObjectPtrLabelKHR(IntPtr ptr, Int32 length, String label);
+        static extern void glObjectPtrLabelKHR(IntPtr ptr, Int32 length, IntPtr label);
         [Slot(283)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glPopDebugGroupKHR();
         [Slot(323)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glPushDebugGroupKHR(System.Int32 source, UInt32 id, Int32 length, String message);
+        static extern void glPushDebugGroupKHR(System.Int32 source, UInt32 id, Int32 length, IntPtr message);
         [Slot(21)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glBlendBarrierNV();
index 0122c35..1a4b5e4 100644 (file)
@@ -129473,7 +129473,7 @@ namespace OpenTK.Graphics.OpenGL
         static extern unsafe void glDebugMessageEnableAMD(System.Int32 category, System.Int32 severity, Int32 count, UInt32* ids, bool enabled);
         [Slot(353)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glDebugMessageInsertAMD(System.Int32 category, System.Int32 severity, UInt32 id, Int32 length, String buf);
+        static extern void glDebugMessageInsertAMD(System.Int32 category, System.Int32 severity, UInt32 id, Int32 length, IntPtr buf);
         [Slot(369)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glDeleteNamesAMD(System.Int32 identifier, UInt32 num, UInt32* names);
@@ -129656,7 +129656,7 @@ namespace OpenTK.Graphics.OpenGL
         static extern void glBeginQueryARB(System.Int32 target, UInt32 id);
         [Slot(40)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glBindAttribLocationARB(UInt32 programObj, UInt32 index, String name);
+        static extern void glBindAttribLocationARB(UInt32 programObj, UInt32 index, IntPtr name);
         [Slot(42)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glBindBufferARB(System.Int32 target, UInt32 buffer);
@@ -129731,13 +129731,13 @@ namespace OpenTK.Graphics.OpenGL
         static extern unsafe void glDebugMessageControlARB(System.Int32 source, System.Int32 type, System.Int32 severity, Int32 count, UInt32* ids, bool enabled);
         [Slot(354)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glDebugMessageInsertARB(System.Int32 source, System.Int32 type, UInt32 id, System.Int32 severity, Int32 length, String buf);
+        static extern void glDebugMessageInsertARB(System.Int32 source, System.Int32 type, UInt32 id, System.Int32 severity, Int32 length, IntPtr buf);
         [Slot(361)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glDeleteBuffersARB(Int32 n, UInt32* buffers);
         [Slot(368)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glDeleteNamedStringARB(Int32 namelen, String name);
+        static extern void glDeleteNamedStringARB(Int32 namelen, IntPtr name);
         [Slot(370)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glDeleteObjectARB(UInt32 obj);
@@ -129800,7 +129800,7 @@ namespace OpenTK.Graphics.OpenGL
         static extern unsafe void glGetAttachedObjectsARB(UInt32 containerObj, Int32 maxCount, [OutAttribute] Int32* count, [OutAttribute] UInt32* obj);
         [Slot(644)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetAttribLocationARB(UInt32 programObj, String name);
+        static extern Int32 glGetAttribLocationARB(UInt32 programObj, IntPtr name);
         [Slot(650)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glGetBufferParameterivARB(System.Int32 target, System.Int32 pname, [OutAttribute] Int32* @params);
@@ -129830,10 +129830,10 @@ namespace OpenTK.Graphics.OpenGL
         static extern unsafe void glGetInfoLogARB(UInt32 obj, Int32 maxLength, [OutAttribute] Int32* length, [OutAttribute] IntPtr infoLog);
         [Slot(796)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern unsafe void glGetNamedStringARB(Int32 namelen, String name, Int32 bufSize, [OutAttribute] Int32* stringlen, [OutAttribute] IntPtr @string);
+        static extern unsafe void glGetNamedStringARB(Int32 namelen, IntPtr name, Int32 bufSize, [OutAttribute] Int32* stringlen, [OutAttribute] IntPtr @string);
         [Slot(797)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern unsafe void glGetNamedStringivARB(Int32 namelen, String name, System.Int32 pname, [OutAttribute] Int32* @params);
+        static extern unsafe void glGetNamedStringivARB(Int32 namelen, IntPtr name, System.Int32 pname, [OutAttribute] Int32* @params);
         [Slot(798)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glGetnColorTableARB(System.Int32 target, System.Int32 format, System.Int32 type, Int32 bufSize, [OutAttribute] IntPtr table);
@@ -129938,7 +129938,7 @@ namespace OpenTK.Graphics.OpenGL
         static extern unsafe void glGetUniformivARB(UInt32 programObj, Int32 location, [OutAttribute] Int32* @params);
         [Slot(969)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetUniformLocationARB(UInt32 programObj, String name);
+        static extern Int32 glGetUniformLocationARB(UInt32 programObj, IntPtr name);
         [Slot(989)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glGetVertexAttribdvARB(UInt32 index, System.Int32 pname, [OutAttribute] Double* @params);
@@ -129962,7 +129962,7 @@ namespace OpenTK.Graphics.OpenGL
         static extern bool glIsImageHandleResidentARB(UInt64 handle);
         [Slot(1082)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern bool glIsNamedStringARB(Int32 namelen, String name);
+        static extern bool glIsNamedStringARB(Int32 namelen, IntPtr name);
         [Slot(1089)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern bool glIsProgramARB(UInt32 program);
@@ -130121,7 +130121,7 @@ namespace OpenTK.Graphics.OpenGL
         static extern unsafe void glMultTransposeMatrixfARB(Single* m);
         [Slot(1395)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glNamedStringARB(System.Int32 type, Int32 namelen, String name, Int32 stringlen, String @string);
+        static extern void glNamedStringARB(System.Int32 type, Int32 namelen, IntPtr name, Int32 stringlen, IntPtr @string);
         [Slot(1491)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glPointParameterfARB(System.Int32 pname, Single param);
@@ -130751,7 +130751,7 @@ namespace OpenTK.Graphics.OpenGL
         static extern void glBeginTransformFeedback(System.Int32 primitiveMode);
         [Slot(39)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glBindAttribLocation(UInt32 program, UInt32 index, String name);
+        static extern void glBindAttribLocation(UInt32 program, UInt32 index, IntPtr name);
         [Slot(41)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glBindBuffer(System.Int32 target, UInt32 buffer);
@@ -130769,10 +130769,10 @@ namespace OpenTK.Graphics.OpenGL
         static extern unsafe void glBindBuffersRange(System.Int32 target, UInt32 first, Int32 count, UInt32* buffers, IntPtr* offsets, IntPtr* sizes);
         [Slot(53)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glBindFragDataLocation(UInt32 program, UInt32 color, String name);
+        static extern void glBindFragDataLocation(UInt32 program, UInt32 color, IntPtr name);
         [Slot(55)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glBindFragDataLocationIndexed(UInt32 program, UInt32 colorNumber, UInt32 index, String name);
+        static extern void glBindFragDataLocationIndexed(UInt32 program, UInt32 colorNumber, UInt32 index, IntPtr name);
         [Slot(57)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glBindFramebuffer(System.Int32 target, UInt32 framebuffer);
@@ -131147,7 +131147,7 @@ namespace OpenTK.Graphics.OpenGL
         static extern unsafe void glDebugMessageControl(System.Int32 source, System.Int32 type, System.Int32 severity, Int32 count, UInt32* ids, bool enabled);
         [Slot(352)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glDebugMessageInsert(System.Int32 source, System.Int32 type, UInt32 id, System.Int32 severity, Int32 length, String buf);
+        static extern void glDebugMessageInsert(System.Int32 source, System.Int32 type, UInt32 id, System.Int32 severity, Int32 length, IntPtr buf);
         [Slot(360)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glDeleteBuffers(Int32 n, UInt32* buffers);
@@ -131498,7 +131498,7 @@ namespace OpenTK.Graphics.OpenGL
         static extern unsafe void glGetAttachedShaders(UInt32 program, Int32 maxCount, [OutAttribute] Int32* count, [OutAttribute] UInt32* shaders);
         [Slot(643)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetAttribLocation(UInt32 program, String name);
+        static extern Int32 glGetAttribLocation(UInt32 program, IntPtr name);
         [Slot(645)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glGetBooleani_v(System.Int32 target, UInt32 index, [OutAttribute] bool* data);
@@ -131561,10 +131561,10 @@ namespace OpenTK.Graphics.OpenGL
         static extern unsafe void glGetFloatv(System.Int32 pname, [OutAttribute] Single* data);
         [Slot(703)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetFragDataIndex(UInt32 program, String name);
+        static extern Int32 glGetFragDataIndex(UInt32 program, IntPtr name);
         [Slot(704)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetFragDataLocation(UInt32 program, String name);
+        static extern Int32 glGetFragDataLocation(UInt32 program, IntPtr name);
         [Slot(710)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glGetFramebufferAttachmentParameteriv(System.Int32 target, System.Int32 attachment, System.Int32 pname, [OutAttribute] Int32* @params);
@@ -131675,16 +131675,16 @@ namespace OpenTK.Graphics.OpenGL
         static extern unsafe void glGetProgramPipelineiv(UInt32 pipeline, System.Int32 pname, [OutAttribute] Int32* @params);
         [Slot(883)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetProgramResourceIndex(UInt32 program, System.Int32 programInterface, String name);
+        static extern Int32 glGetProgramResourceIndex(UInt32 program, System.Int32 programInterface, IntPtr name);
         [Slot(884)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glGetProgramResourceiv(UInt32 program, System.Int32 programInterface, UInt32 index, Int32 propCount, System.Int32* props, Int32 bufSize, [OutAttribute] Int32* length, [OutAttribute] Int32* @params);
         [Slot(885)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetProgramResourceLocation(UInt32 program, System.Int32 programInterface, String name);
+        static extern Int32 glGetProgramResourceLocation(UInt32 program, System.Int32 programInterface, IntPtr name);
         [Slot(886)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetProgramResourceLocationIndex(UInt32 program, System.Int32 programInterface, String name);
+        static extern Int32 glGetProgramResourceLocationIndex(UInt32 program, System.Int32 programInterface, IntPtr name);
         [Slot(887)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glGetProgramResourceName(UInt32 program, System.Int32 programInterface, UInt32 index, Int32 bufSize, [OutAttribute] Int32* length, [OutAttribute] IntPtr name);
@@ -131747,10 +131747,10 @@ namespace OpenTK.Graphics.OpenGL
         static extern IntPtr glGetStringi(System.Int32 name, UInt32 index);
         [Slot(919)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetSubroutineIndex(UInt32 program, System.Int32 shadertype, String name);
+        static extern Int32 glGetSubroutineIndex(UInt32 program, System.Int32 shadertype, IntPtr name);
         [Slot(920)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetSubroutineUniformLocation(UInt32 program, System.Int32 shadertype, String name);
+        static extern Int32 glGetSubroutineUniformLocation(UInt32 program, System.Int32 shadertype, IntPtr name);
         [Slot(921)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glGetSynciv(IntPtr sync, System.Int32 pname, Int32 bufSize, [OutAttribute] Int32* length, [OutAttribute] Int32* values);
@@ -131795,7 +131795,7 @@ namespace OpenTK.Graphics.OpenGL
         static extern unsafe void glGetTransformFeedbackVarying(UInt32 program, UInt32 index, Int32 bufSize, [OutAttribute] Int32* length, [OutAttribute] Int32* size, [OutAttribute] System.Int32* type, [OutAttribute] IntPtr name);
         [Slot(959)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetUniformBlockIndex(UInt32 program, String uniformBlockName);
+        static extern Int32 glGetUniformBlockIndex(UInt32 program, IntPtr uniformBlockName);
         [Slot(961)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glGetUniformdv(UInt32 program, Int32 location, [OutAttribute] Double* @params);
@@ -131810,7 +131810,7 @@ namespace OpenTK.Graphics.OpenGL
         static extern unsafe void glGetUniformiv(UInt32 program, Int32 location, [OutAttribute] Int32* @params);
         [Slot(968)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetUniformLocation(UInt32 program, String name);
+        static extern Int32 glGetUniformLocation(UInt32 program, IntPtr name);
         [Slot(971)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glGetUniformSubroutineuiv(System.Int32 shadertype, Int32 location, [OutAttribute] UInt32* @params);
@@ -132251,10 +132251,10 @@ namespace OpenTK.Graphics.OpenGL
         static extern void glNormalPointer(System.Int32 type, Int32 stride, IntPtr pointer);
         [Slot(1431)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glObjectLabel(System.Int32 identifier, UInt32 name, Int32 length, String label);
+        static extern void glObjectLabel(System.Int32 identifier, UInt32 name, Int32 length, IntPtr label);
         [Slot(1433)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glObjectPtrLabel(IntPtr ptr, Int32 length, String label);
+        static extern void glObjectPtrLabel(IntPtr ptr, Int32 length, IntPtr label);
         [Slot(1437)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glOrtho(Double left, Double right, Double bottom, Double top, Double zNear, Double zFar);
@@ -132512,7 +132512,7 @@ namespace OpenTK.Graphics.OpenGL
         static extern void glPushClientAttrib(System.Int32 mask);
         [Slot(1697)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glPushDebugGroup(System.Int32 source, UInt32 id, Int32 length, String message);
+        static extern void glPushDebugGroup(System.Int32 source, UInt32 id, Int32 length, IntPtr message);
         [Slot(1700)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glPushMatrix();
@@ -133619,7 +133619,7 @@ namespace OpenTK.Graphics.OpenGL
         static extern void glBindBufferRangeEXT(System.Int32 target, UInt32 index, UInt32 buffer, IntPtr offset, IntPtr size);
         [Slot(54)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glBindFragDataLocationEXT(UInt32 program, UInt32 color, String name);
+        static extern void glBindFragDataLocationEXT(UInt32 program, UInt32 color, IntPtr name);
         [Slot(58)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glBindFramebufferEXT(System.Int32 target, UInt32 framebuffer);
@@ -133847,7 +133847,7 @@ namespace OpenTK.Graphics.OpenGL
         static extern void glCopyTextureSubImage3DEXT(UInt32 texture, System.Int32 target, Int32 level, Int32 xoffset, Int32 yoffset, Int32 zoffset, Int32 x, Int32 y, Int32 width, Int32 height);
         [Slot(336)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glCreateShaderProgramEXT(System.Int32 type, String @string);
+        static extern Int32 glCreateShaderProgramEXT(System.Int32 type, IntPtr @string);
         [Slot(338)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern Int32 glCreateShaderProgramvEXT(System.Int32 type, Int32 count, IntPtr strings);
@@ -134051,7 +134051,7 @@ namespace OpenTK.Graphics.OpenGL
         static extern unsafe void glGetFloatIndexedvEXT(System.Int32 target, UInt32 index, [OutAttribute] Single* data);
         [Slot(705)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetFragDataLocationEXT(UInt32 program, String name);
+        static extern Int32 glGetFragDataLocationEXT(UInt32 program, IntPtr name);
         [Slot(711)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glGetFramebufferAttachmentParameterivEXT(System.Int32 target, System.Int32 attachment, System.Int32 pname, [OutAttribute] Int32* @params);
@@ -134297,7 +134297,7 @@ namespace OpenTK.Graphics.OpenGL
         static extern void glInsertComponentEXT(UInt32 res, UInt32 src, UInt32 num);
         [Slot(1056)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glInsertEventMarkerEXT(Int32 length, String marker);
+        static extern void glInsertEventMarkerEXT(Int32 length, IntPtr marker);
         [Slot(1072)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern bool glIsEnabledIndexedEXT(System.Int32 target, UInt32 index);
@@ -134318,7 +134318,7 @@ namespace OpenTK.Graphics.OpenGL
         static extern bool glIsVariantEnabledEXT(UInt32 id, System.Int32 cap);
         [Slot(1110)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glLabelObjectEXT(System.Int32 type, UInt32 @object, Int32 length, String label);
+        static extern void glLabelObjectEXT(System.Int32 type, UInt32 @object, Int32 length, IntPtr label);
         [Slot(1146)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glLockArraysEXT(Int32 first, Int32 count);
@@ -134750,7 +134750,7 @@ namespace OpenTK.Graphics.OpenGL
         static extern void glPushClientAttribDefaultEXT(System.Int32 mask);
         [Slot(1699)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glPushGroupMarkerEXT(Int32 length, String marker);
+        static extern void glPushGroupMarkerEXT(Int32 length, IntPtr marker);
         [Slot(1751)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glRenderbufferStorageEXT(System.Int32 target, System.Int32 internalformat, Int32 width, Int32 height);
@@ -135296,7 +135296,7 @@ namespace OpenTK.Graphics.OpenGL
         static extern unsafe void glDebugMessageControlKHR(System.Int32 source, System.Int32 type, System.Int32 severity, Int32 count, UInt32* ids, bool enabled);
         [Slot(355)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glDebugMessageInsertKHR(System.Int32 source, System.Int32 type, UInt32 id, System.Int32 severity, Int32 length, String buf);
+        static extern void glDebugMessageInsertKHR(System.Int32 source, System.Int32 type, UInt32 id, System.Int32 severity, Int32 length, IntPtr buf);
         [Slot(687)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe Int32 glGetDebugMessageLogKHR(UInt32 count, Int32 bufSize, [OutAttribute] System.Int32* sources, [OutAttribute] System.Int32* types, [OutAttribute] UInt32* ids, [OutAttribute] System.Int32* severities, [OutAttribute] Int32* lengths, [OutAttribute] IntPtr messageLog);
@@ -135311,16 +135311,16 @@ namespace OpenTK.Graphics.OpenGL
         static extern void glGetPointervKHR(System.Int32 pname, [OutAttribute] IntPtr @params);
         [Slot(1432)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glObjectLabelKHR(System.Int32 identifier, UInt32 name, Int32 length, String label);
+        static extern void glObjectLabelKHR(System.Int32 identifier, UInt32 name, Int32 length, IntPtr label);
         [Slot(1434)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glObjectPtrLabelKHR(IntPtr ptr, Int32 length, String label);
+        static extern void glObjectPtrLabelKHR(IntPtr ptr, Int32 length, IntPtr label);
         [Slot(1516)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glPopDebugGroupKHR();
         [Slot(1698)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glPushDebugGroupKHR(System.Int32 source, UInt32 id, Int32 length, String message);
+        static extern void glPushDebugGroupKHR(System.Int32 source, UInt32 id, Int32 length, IntPtr message);
         [Slot(1784)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glResizeBuffersMESA();
@@ -135398,7 +135398,7 @@ namespace OpenTK.Graphics.OpenGL
         static extern unsafe void glWindowPos4svMESA(Int16* v);
         [Slot(8)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glActiveVaryingNV(UInt32 program, String name);
+        static extern void glActiveVaryingNV(UInt32 program, IntPtr name);
         [Slot(15)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe bool glAreProgramsResidentNV(Int32 n, UInt32* programs, [OutAttribute] bool* residences);
@@ -135743,7 +135743,7 @@ namespace OpenTK.Graphics.OpenGL
         static extern unsafe void glGetUniformui64vNV(UInt32 program, Int32 location, [OutAttribute] UInt64* @params);
         [Slot(981)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetVaryingLocationNV(UInt32 program, String name);
+        static extern Int32 glGetVaryingLocationNV(UInt32 program, IntPtr name);
         [Slot(990)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glGetVertexAttribdvNV(UInt32 index, System.Int32 pname, [OutAttribute] Double* @params);
index 8697e14..2a63117 100644 (file)
@@ -49648,10 +49648,10 @@ namespace OpenTK.Graphics.OpenGL4
         static extern unsafe void glDebugMessageControlARB(System.Int32 source, System.Int32 type, System.Int32 severity, Int32 count, UInt32* ids, bool enabled);
         [Slot(108)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glDebugMessageInsertARB(System.Int32 source, System.Int32 type, UInt32 id, System.Int32 severity, Int32 length, String buf);
+        static extern void glDebugMessageInsertARB(System.Int32 source, System.Int32 type, UInt32 id, System.Int32 severity, Int32 length, IntPtr buf);
         [Slot(112)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glDeleteNamedStringARB(Int32 namelen, String name);
+        static extern void glDeleteNamedStringARB(Int32 namelen, IntPtr name);
         [Slot(134)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glDispatchComputeGroupSizeARB(UInt32 num_groups_x, UInt32 num_groups_y, UInt32 num_groups_z, UInt32 group_size_x, UInt32 group_size_y, UInt32 group_size_z);
@@ -49666,10 +49666,10 @@ namespace OpenTK.Graphics.OpenGL4
         static extern Int64 glGetImageHandleARB(UInt32 texture, Int32 level, bool layered, Int32 layer, System.Int32 format);
         [Slot(236)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern unsafe void glGetNamedStringARB(Int32 namelen, String name, Int32 bufSize, [OutAttribute] Int32* stringlen, [OutAttribute] IntPtr @string);
+        static extern unsafe void glGetNamedStringARB(Int32 namelen, IntPtr name, Int32 bufSize, [OutAttribute] Int32* stringlen, [OutAttribute] IntPtr @string);
         [Slot(237)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern unsafe void glGetNamedStringivARB(Int32 namelen, String name, System.Int32 pname, [OutAttribute] Int32* @params);
+        static extern unsafe void glGetNamedStringivARB(Int32 namelen, IntPtr name, System.Int32 pname, [OutAttribute] Int32* @params);
         [Slot(238)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glGetnColorTableARB(System.Int32 target, System.Int32 format, System.Int32 type, Int32 bufSize, [OutAttribute] IntPtr table);
@@ -49738,7 +49738,7 @@ namespace OpenTK.Graphics.OpenGL4
         static extern bool glIsImageHandleResidentARB(UInt64 handle);
         [Slot(334)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern bool glIsNamedStringARB(Int32 namelen, String name);
+        static extern bool glIsNamedStringARB(Int32 namelen, IntPtr name);
         [Slot(343)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern bool glIsTextureHandleResidentARB(UInt64 handle);
@@ -49765,7 +49765,7 @@ namespace OpenTK.Graphics.OpenGL4
         static extern void glMultiDrawElementsIndirectCountARB(System.Int32 mode, System.Int32 type, IntPtr indirect, IntPtr drawcount, Int32 maxdrawcount, Int32 stride);
         [Slot(374)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glNamedStringARB(System.Int32 type, Int32 namelen, String name, Int32 stringlen, String @string);
+        static extern void glNamedStringARB(System.Int32 type, Int32 namelen, IntPtr name, Int32 stringlen, IntPtr @string);
         [Slot(430)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glProgramUniformHandleui64ARB(UInt32 program, Int32 location, UInt64 value);
@@ -49813,7 +49813,7 @@ namespace OpenTK.Graphics.OpenGL4
         static extern void glBeginTransformFeedback(System.Int32 primitiveMode);
         [Slot(7)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glBindAttribLocation(UInt32 program, UInt32 index, String name);
+        static extern void glBindAttribLocation(UInt32 program, UInt32 index, IntPtr name);
         [Slot(8)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glBindBuffer(System.Int32 target, UInt32 buffer);
@@ -49831,10 +49831,10 @@ namespace OpenTK.Graphics.OpenGL4
         static extern unsafe void glBindBuffersRange(System.Int32 target, UInt32 first, Int32 count, UInt32* buffers, IntPtr* offsets, IntPtr* sizes);
         [Slot(13)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glBindFragDataLocation(UInt32 program, UInt32 color, String name);
+        static extern void glBindFragDataLocation(UInt32 program, UInt32 color, IntPtr name);
         [Slot(14)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glBindFragDataLocationIndexed(UInt32 program, UInt32 colorNumber, UInt32 index, String name);
+        static extern void glBindFragDataLocationIndexed(UInt32 program, UInt32 colorNumber, UInt32 index, IntPtr name);
         [Slot(15)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glBindFramebuffer(System.Int32 target, UInt32 framebuffer);
@@ -50083,7 +50083,7 @@ namespace OpenTK.Graphics.OpenGL4
         static extern unsafe void glDebugMessageControl(System.Int32 source, System.Int32 type, System.Int32 severity, Int32 count, UInt32* ids, bool enabled);
         [Slot(107)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glDebugMessageInsert(System.Int32 source, System.Int32 type, UInt32 id, System.Int32 severity, Int32 length, String buf);
+        static extern void glDebugMessageInsert(System.Int32 source, System.Int32 type, UInt32 id, System.Int32 severity, Int32 length, IntPtr buf);
         [Slot(110)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glDeleteBuffers(Int32 n, UInt32* buffers);
@@ -50335,7 +50335,7 @@ namespace OpenTK.Graphics.OpenGL4
         static extern unsafe void glGetAttachedShaders(UInt32 program, Int32 maxCount, [OutAttribute] Int32* count, [OutAttribute] UInt32* shaders);
         [Slot(195)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetAttribLocation(UInt32 program, String name);
+        static extern Int32 glGetAttribLocation(UInt32 program, IntPtr name);
         [Slot(196)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glGetBooleani_v(System.Int32 target, UInt32 index, [OutAttribute] bool* data);
@@ -50395,10 +50395,10 @@ namespace OpenTK.Graphics.OpenGL4
         static extern unsafe void glGetFloatv(System.Int32 pname, [OutAttribute] Single* data);
         [Slot(217)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetFragDataIndex(UInt32 program, String name);
+        static extern Int32 glGetFragDataIndex(UInt32 program, IntPtr name);
         [Slot(218)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetFragDataLocation(UInt32 program, String name);
+        static extern Int32 glGetFragDataLocation(UInt32 program, IntPtr name);
         [Slot(219)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glGetFramebufferAttachmentParameteriv(System.Int32 target, System.Int32 attachment, System.Int32 pname, [OutAttribute] Int32* @params);
@@ -50473,16 +50473,16 @@ namespace OpenTK.Graphics.OpenGL4
         static extern unsafe void glGetProgramPipelineiv(UInt32 pipeline, System.Int32 pname, [OutAttribute] Int32* @params);
         [Slot(268)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetProgramResourceIndex(UInt32 program, System.Int32 programInterface, String name);
+        static extern Int32 glGetProgramResourceIndex(UInt32 program, System.Int32 programInterface, IntPtr name);
         [Slot(269)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glGetProgramResourceiv(UInt32 program, System.Int32 programInterface, UInt32 index, Int32 propCount, System.Int32* props, Int32 bufSize, [OutAttribute] Int32* length, [OutAttribute] Int32* @params);
         [Slot(270)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetProgramResourceLocation(UInt32 program, System.Int32 programInterface, String name);
+        static extern Int32 glGetProgramResourceLocation(UInt32 program, System.Int32 programInterface, IntPtr name);
         [Slot(271)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetProgramResourceLocationIndex(UInt32 program, System.Int32 programInterface, String name);
+        static extern Int32 glGetProgramResourceLocationIndex(UInt32 program, System.Int32 programInterface, IntPtr name);
         [Slot(272)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glGetProgramResourceName(UInt32 program, System.Int32 programInterface, UInt32 index, Int32 bufSize, [OutAttribute] Int32* length, [OutAttribute] IntPtr name);
@@ -50545,10 +50545,10 @@ namespace OpenTK.Graphics.OpenGL4
         static extern IntPtr glGetStringi(System.Int32 name, UInt32 index);
         [Slot(292)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetSubroutineIndex(UInt32 program, System.Int32 shadertype, String name);
+        static extern Int32 glGetSubroutineIndex(UInt32 program, System.Int32 shadertype, IntPtr name);
         [Slot(293)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetSubroutineUniformLocation(UInt32 program, System.Int32 shadertype, String name);
+        static extern Int32 glGetSubroutineUniformLocation(UInt32 program, System.Int32 shadertype, IntPtr name);
         [Slot(294)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glGetSynciv(IntPtr sync, System.Int32 pname, Int32 bufSize, [OutAttribute] Int32* length, [OutAttribute] Int32* values);
@@ -50578,7 +50578,7 @@ namespace OpenTK.Graphics.OpenGL4
         static extern unsafe void glGetTransformFeedbackVarying(UInt32 program, UInt32 index, Int32 bufSize, [OutAttribute] Int32* length, [OutAttribute] Int32* size, [OutAttribute] System.Int32* type, [OutAttribute] IntPtr name);
         [Slot(305)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetUniformBlockIndex(UInt32 program, String uniformBlockName);
+        static extern Int32 glGetUniformBlockIndex(UInt32 program, IntPtr uniformBlockName);
         [Slot(306)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glGetUniformdv(UInt32 program, Int32 location, [OutAttribute] Double* @params);
@@ -50593,7 +50593,7 @@ namespace OpenTK.Graphics.OpenGL4
         static extern unsafe void glGetUniformiv(UInt32 program, Int32 location, [OutAttribute] Int32* @params);
         [Slot(310)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern Int32 glGetUniformLocation(UInt32 program, String name);
+        static extern Int32 glGetUniformLocation(UInt32 program, IntPtr name);
         [Slot(311)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glGetUniformSubroutineuiv(System.Int32 shadertype, Int32 location, [OutAttribute] UInt32* @params);
@@ -50758,10 +50758,10 @@ namespace OpenTK.Graphics.OpenGL4
         static extern unsafe void glNormalP3uiv(System.Int32 type, UInt32* coords);
         [Slot(377)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glObjectLabel(System.Int32 identifier, UInt32 name, Int32 length, String label);
+        static extern void glObjectLabel(System.Int32 identifier, UInt32 name, Int32 length, IntPtr label);
         [Slot(379)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glObjectPtrLabel(IntPtr ptr, Int32 length, String label);
+        static extern void glObjectPtrLabel(IntPtr ptr, Int32 length, IntPtr label);
         [Slot(381)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe void glPatchParameterfv(System.Int32 pname, Single* values);
@@ -50965,7 +50965,7 @@ namespace OpenTK.Graphics.OpenGL4
         static extern void glProvokingVertex(System.Int32 mode);
         [Slot(451)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glPushDebugGroup(System.Int32 source, UInt32 id, Int32 length, String message);
+        static extern void glPushDebugGroup(System.Int32 source, UInt32 id, Int32 length, IntPtr message);
         [Slot(453)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glQueryCounter(UInt32 id, System.Int32 target);
@@ -51613,7 +51613,7 @@ namespace OpenTK.Graphics.OpenGL4
         static extern unsafe void glDebugMessageControlKHR(System.Int32 source, System.Int32 type, System.Int32 severity, Int32 count, UInt32* ids, bool enabled);
         [Slot(109)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glDebugMessageInsertKHR(System.Int32 source, System.Int32 type, UInt32 id, System.Int32 severity, Int32 length, String buf);
+        static extern void glDebugMessageInsertKHR(System.Int32 source, System.Int32 type, UInt32 id, System.Int32 severity, Int32 length, IntPtr buf);
         [Slot(211)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern unsafe Int32 glGetDebugMessageLogKHR(UInt32 count, Int32 bufSize, [OutAttribute] System.Int32* sources, [OutAttribute] System.Int32* types, [OutAttribute] UInt32* ids, [OutAttribute] System.Int32* severities, [OutAttribute] Int32* lengths, [OutAttribute] IntPtr messageLog);
@@ -51628,15 +51628,15 @@ namespace OpenTK.Graphics.OpenGL4
         static extern void glGetPointervKHR(System.Int32 pname, [OutAttribute] IntPtr @params);
         [Slot(378)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glObjectLabelKHR(System.Int32 identifier, UInt32 name, Int32 length, String label);
+        static extern void glObjectLabelKHR(System.Int32 identifier, UInt32 name, Int32 length, IntPtr label);
         [Slot(380)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glObjectPtrLabelKHR(IntPtr ptr, Int32 length, String label);
+        static extern void glObjectPtrLabelKHR(IntPtr ptr, Int32 length, IntPtr label);
         [Slot(394)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
         static extern void glPopDebugGroupKHR();
         [Slot(452)]
         [DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
-        static extern void glPushDebugGroupKHR(System.Int32 source, UInt32 id, Int32 length, String message);
+        static extern void glPushDebugGroupKHR(System.Int32 source, UInt32 id, Int32 length, IntPtr message);
     }
 }