From 2511cb1086efe5e013cb98b1a7b94ac3cc0b546b Mon Sep 17 00:00:00 2001 From: Stefanos A <stapostol@gmail.com> Date: Tue, 5 Nov 2013 08:55:52 +0100 Subject: [PATCH] Implemented support for <overload> element The <overload> element simplifies the addition of overloads for backwards compatibility. It is defined similar to the <replace> element, but instead of replacing the parameters of a function in-place, it adds a new overload and modifies the overload instead. --- Source/Bind/FuncProcessor.cs | 181 +- Source/Bind/Specifications/GL2/overrides.xml | 147 +- Source/OpenTK/Graphics/ES20/ES20.cs | 115 + Source/OpenTK/Graphics/ES20/ES20Core.cs | 4 +- Source/OpenTK/Graphics/ES20/ES20Delegates.cs | 4 +- Source/OpenTK/Graphics/ES20/ES20Enums.cs | 2 +- Source/OpenTK/Graphics/ES30/ES30.cs | 260 -- Source/OpenTK/Graphics/ES30/ES30Delegates.cs | 12 - Source/OpenTK/Graphics/ES30/ES30Enums.cs | 2 +- Source/OpenTK/Graphics/ES30/ES3Core.cs | 12 - Source/OpenTK/Graphics/OpenGL/GL.cs | 2592 ++++++++++++++++++ Source/OpenTK/Graphics/OpenGL/GLCore.cs | 18 +- Source/OpenTK/Graphics/OpenGL/GLDelegates.cs | 18 +- Source/OpenTK/Graphics/OpenGL/GLEnums.cs | 2 +- 14 files changed, 2894 insertions(+), 475 deletions(-) diff --git a/Source/Bind/FuncProcessor.cs b/Source/Bind/FuncProcessor.cs index 7f4b1cb5..34dc7ac1 100644 --- a/Source/Bind/FuncProcessor.cs +++ b/Source/Bind/FuncProcessor.cs @@ -72,9 +72,12 @@ namespace Bind var nav = new XPathDocument(Overrides).CreateNavigator(); foreach (var version in apiversion.Split('|')) { - foreach (var overloads in delegates.Values) + // Translate each delegate: + // 1st using the <replace> elements in overrides.xml + // 2nd using the hardcoded rules in FuncProcessor (e.g. char* -> string) + foreach (var signatures in delegates.Values) { - foreach (var d in overloads) + foreach (var d in signatures) { TranslateExtension(d); TranslateReturnType(enum_processor, nav, d, enums, apiname, version); @@ -82,6 +85,25 @@ namespace Bind TranslateAttributes(nav, d, enums, apiname, version); } } + + // Create overloads for backwards compatibility, + // by resolving <overload> elements + var overload_list = new List<Delegate>(); + foreach (var d in delegates.Values.Select(v => v.First())) + { + var overload_element = GetFuncOverload(nav, d, apiname, apiversion); + if (overload_element != null) + { + var overload = new Delegate(d); + ApplyParameterReplacement(overload, overload_element); + ApplyReturnTypeReplacement(overload, overload_element); + overload_list.Add(overload); + } + } + foreach (var overload in overload_list) + { + Utilities.Merge(delegates, overload); + } } Console.WriteLine("Generating wrappers."); @@ -96,13 +118,13 @@ namespace Bind return wrappers; } - public static string GetOverridesPath(string apiname, string apiversion, string function, string extension) - { - if (function == null) - throw new ArgumentNullException("function"); + #region Private Members + static string GetPath(string apipath, string apiname, string apiversion, string function, string extension) + { var path = new StringBuilder(); - path.Append("/signatures/replace"); + path.Append("/signatures/"); + path.Append(apipath); if (!String.IsNullOrEmpty(apiname) && !String.IsNullOrEmpty(apiversion)) { path.Append(String.Format( @@ -120,28 +142,39 @@ namespace Bind path.Append(String.Format("[contains(concat('|', @version, '|'), '|{0}|')]", apiversion)); } - if (extension != null) + if (function != null) { - // match an override that has this specific extension - // *or* one that has no extension at all (equivalent - // to "match all possible extensions") - path.Append(String.Format( - "/function[contains(concat('|', @name, '|'), '|{0}|') and " + - "(contains(concat('|', @extension, '|'), '|{1}|') or not(boolean(@extension)))]", - function, - extension)); - } - else - { - path.Append(String.Format( - "/function[contains(concat('|', @name, '|'), '|{0}|')]", - function)); + if (extension != null) + { + // match an override that has this specific extension + // *or* one that has no extension at all (equivalent + // to "match all possible extensions") + path.Append(String.Format( + "/function[contains(concat('|', @name, '|'), '|{0}|') and " + + "(contains(concat('|', @extension, '|'), '|{1}|') or not(boolean(@extension)))]", + function, + extension)); + } + else + { + path.Append(String.Format( + "/function[contains(concat('|', @name, '|'), '|{0}|')]", + function)); + } } return path.ToString(); } - #region Private Members + static string GetOverloadsPath(string apiname, string apiversion, string function, string extension) + { + return GetPath("overload", apiname, apiversion, function, extension); + } + + static string GetOverridesPath(string apiname, string apiversion, string function, string extension) + { + return GetPath("replace", apiname, apiversion, function, extension); + } void TranslateType(Bind.Structures.Type type, EnumProcessor enum_processor, XPathNavigator overrides, EnumCollection enums, string category, string apiname) @@ -246,7 +279,7 @@ namespace Bind type)); } } - + void TranslateExtension(Delegate d) { var extension = d.Extension.ToUpper(); @@ -308,6 +341,19 @@ namespace Bind return trimmed_name; } + static XPathNavigator GetFuncOverload(XPathNavigator nav, Delegate d, string apiname, string apiversion) + { + string ext = d.Extension; + string trimmed_name = GetTrimmedName(d); + string extensionless_name = GetTrimmedExtension(d.Name, ext); + + var function_overload = + nav.SelectSingleNode(GetOverloadsPath(apiname, apiversion, d.Name, ext)) ?? + nav.SelectSingleNode(GetOverloadsPath(apiname, apiversion, extensionless_name, ext)) ?? + nav.SelectSingleNode(GetOverloadsPath(apiname, apiversion, trimmed_name, ext)); + return function_overload; + } + static XPathNavigator GetFuncOverride(XPathNavigator nav, Delegate d, string apiname, string apiversion) { string ext = d.Extension; @@ -326,6 +372,52 @@ namespace Bind f.TrimmedName = GetTrimmedName(f); } + static void ApplyParameterReplacement(Delegate d, XPathNavigator function_override) + { + if (function_override != null) + { + for (int i = 0; i < d.Parameters.Count; i++) + { + XPathNavigator param_override = function_override.SelectSingleNode(String.Format("param[@name='{0}']", d.Parameters[i].RawName)); + if (param_override != null) + { + foreach (XPathNavigator node in param_override.SelectChildren(XPathNodeType.Element)) + { + switch (node.Name) + { + case "type": + d.Parameters[i].CurrentType = (string)node.TypedValue; + break; + case "name": + d.Parameters[i].Name = (string)node.TypedValue; + break; + case "flow": + d.Parameters[i].Flow = Parameter.GetFlowDirection((string)node.TypedValue); + break; + case "count": + int count; + if (Int32.TryParse(node.Value, out count)) + d.Parameters[i].ElementCount = count; + break; + } + } + } + } + } + } + + static void ApplyReturnTypeReplacement(Delegate d, XPathNavigator function_override) + { + if (function_override != null) + { + XPathNavigator return_override = function_override.SelectSingleNode("returns"); + if (return_override != null) + { + d.ReturnType.CurrentType = return_override.Value; + } + } + } + // Translates the opengl return type to the equivalent C# type. // // First, we use the official typemap (gl.tm) to get the correct type. @@ -339,15 +431,7 @@ namespace Bind EnumCollection enums, string apiname, string apiversion) { var function_override = GetFuncOverride(nav, d, apiname, apiversion); - - if (function_override != null) - { - XPathNavigator return_override = function_override.SelectSingleNode("returns"); - if (return_override != null) - { - d.ReturnType.CurrentType = return_override.Value; - } - } + ApplyReturnTypeReplacement(d, function_override); TranslateType(d.ReturnType, enum_processor, nav, enums, d.Category, apiname); @@ -396,44 +480,15 @@ namespace Bind return f; } - void TranslateParameters(EnumProcessor enum_processor, XPathNavigator nav, Delegate d, EnumCollection enums, string apiname, string apiversion) { var function_override = GetFuncOverride(nav, d, apiname, apiversion); + ApplyParameterReplacement(d, function_override); for (int i = 0; i < d.Parameters.Count; i++) { - if (function_override != null) - { - XPathNavigator param_override = function_override.SelectSingleNode( - String.Format("param[@name='{0}']", d.Parameters[i].RawName)); - if (param_override != null) - { - foreach (XPathNavigator node in param_override.SelectChildren(XPathNodeType.Element)) - { - switch (node.Name) - { - case "type": - d.Parameters[i].CurrentType = (string)node.TypedValue; - break; - case "name": - d.Parameters[i].Name = (string)node.TypedValue; - break; - case "flow": - d.Parameters[i].Flow = Parameter.GetFlowDirection((string)node.TypedValue); - break; - case "count": - int count; - if (Int32.TryParse(node.Value, out count)) - d.Parameters[i].ElementCount = count; - break; - } - } - } - } - TranslateParameter(d.Parameters[i], enum_processor, nav, enums, d.Category, apiname); if (d.Parameters[i].CurrentType == "UInt16" && d.Name.Contains("LineStipple")) d.Parameters[i].WrapperType = WrapperTypes.UncheckedParameter; diff --git a/Source/Bind/Specifications/GL2/overrides.xml b/Source/Bind/Specifications/GL2/overrides.xml index ad1c60e4..be08c9d5 100644 --- a/Source/Bind/Specifications/GL2/overrides.xml +++ b/Source/Bind/Specifications/GL2/overrides.xml @@ -1626,99 +1626,38 @@ </replace> - <add name="gl"> + <overload name="gl"> <!-- Khronos renamed a few enum types between GL 4.3 and GL4.4 --> <!-- PrimitiveType <=> BeginMode overloads for backwards compatibility --> - <function name="Begin" category="VERSION_1_0" extension="Core" version="1.0" deprecated="3.2"> - <param name="mode" type="BeginMode" flow="in" /> - <returns type="void" /> + <function name="Begin"> + <param name="mode"><type>BeginMode</type></param> </function> - <function name="DrawArrays" category="VERSION_1_1" extension="Core" version="1.1"> - <param name="mode" type="BeginMode" flow="in" /> - <param name="first" type="GLint" flow="in" /> - <param name="count" type="GLsizei" flow="in" /> - <returns type="void" /> + <function name="DrawArrays"> + <param name="mode"><type>BeginMode</type></param> </function> - <function name="DrawArraysEXT" category="EXT_vertex_array" extension="EXT"> - <param name="mode" type="BeginMode" flow="in" /> - <param name="first" type="GLint" flow="in" /> - <param name="count" type="GLsizei" flow="in" /> - <returns type="void" /> + <function name="DrawElements"> + <param name="mode"><type>BeginMode</type></param> </function> - <function name="DrawElements" category="VERSION_1_1" extension="Core" version="1.1"> - <param name="mode" type="BeginMode" flow="in" /> - <param name="count" type="GLsizei" flow="in" /> - <param name="type" type="DrawElementsType" flow="in" /> - <param name="indices" type="void *" flow="in" count="COMPSIZE(count,type)" /> - <returns type="void" /> + <function name="DrawElementsBaseVertex"> + <param name="mode"><type>BeginMode</type></param> </function> - <function name="DrawElementsBaseVertex" category="VERSION_3_2|ARB_draw_elements_base_vertex" extension="Core" version="3.2"> - <param name="mode" type="BeginMode" flow="in" /> - <param name="count" type="GLsizei" flow="in" /> - <param name="type" type="DrawElementsType" flow="in" /> - <param name="indices" type="void *" flow="in" count="COMPSIZE(count,type)" /> - <param name="basevertex" type="GLint" flow="in" /> - <returns type="void" /> + <function name="DrawElementsInstanced"> + <param name="mode"><type>BeginMode</type></param> </function> - <function name="DrawElementsInstanced" category="VERSION_3_1" extension="Core" version="3.1"> - <param name="mode" type="BeginMode" flow="in" /> - <param name="count" type="GLsizei" flow="in" /> - <param name="type" type="DrawElementsType" flow="in" /> - <param name="indices" type="void *" flow="in" count="COMPSIZE(count,type)" /> - <param name="instancecount" type="GLsizei" flow="in" /> - <returns type="void" /> + <function name="DrawElementsInstancedBaseVertex"> + <param name="mode"><type>BeginMode</type></param> </function> - <function name="DrawElementsInstancedBaseVertex" category="VERSION_3_2|ARB_draw_elements_base_vertex" extension="Core" version="3.2"> - <param name="mode" type="BeginMode" flow="in" /> - <param name="count" type="GLsizei" flow="in" /> - <param name="type" type="DrawElementsType" flow="in" /> - <param name="indices" type="void *" flow="in" count="COMPSIZE(count,type)" /> - <param name="instancecount" type="GLsizei" flow="in" /> - <param name="basevertex" type="GLint" flow="in" /> - <returns type="void" /> + <function name="DrawRangeElements"> + <param name="mode"><type>BeginMode</type></param> </function> - <function name="DrawRangeElements" category="VERSION_1_2" extension="Core" version="1.2"> - <param name="mode" type="BeginMode" flow="in" /> - <param name="start" type="GLuint" flow="in" /> - <param name="end" type="GLuint" flow="in" /> - <param name="count" type="GLsizei" flow="in" /> - <param name="type" type="DrawElementsType" flow="in" /> - <param name="indices" type="void *" flow="in" count="COMPSIZE(count,type)" /> - <returns type="void" /> + <function name="DrawRangeElementsBaseVertex"> + <param name="mode"><type>BeginMode</type></param> </function> - <function name="DrawRangeElementsBaseVertex" category="VERSION_3_2|ARB_draw_elements_base_vertex" extension="Core" version="3.2"> - <param name="mode" type="BeginMode" flow="in" /> - <param name="start" type="GLuint" flow="in" /> - <param name="end" type="GLuint" flow="in" /> - <param name="count" type="GLsizei" flow="in" /> - <param name="type" type="DrawElementsType" flow="in" /> - <param name="indices" type="void *" flow="in" count="COMPSIZE(count,type)" /> - <param name="basevertex" type="GLint" flow="in" /> - <returns type="void" /> + <function name="MultiDrawArrays"> + <param name="mode"><type>BeginMode</type></param> </function> - <function name="DrawRangeElementsEXT" category="EXT_draw_range_elements" extension="EXT"> - <param name="mode" type="BeginMode" flow="in" /> - <param name="start" type="GLuint" flow="in" /> - <param name="end" type="GLuint" flow="in" /> - <param name="count" type="GLsizei" flow="in" /> - <param name="type" type="DrawElementsType" flow="in" /> - <param name="indices" type="void *" flow="in" count="COMPSIZE(count,type)" /> - <returns type="void" /> - </function> - <function name="MultiDrawArrays" category="VERSION_1_4" extension="Core" version="1.4"> - <param name="mode" type="BeginMode" flow="in" /> - <param name="first" type="GLint *" flow="in" count="COMPSIZE(count)" /> - <param name="count" type="GLsizei *" flow="in" count="COMPSIZE(drawcount)" /> - <param name="drawcount" type="GLsizei" flow="in" /> - <returns type="void" /> - </function> - <function name="MultiDrawElements" category="VERSION_1_4" extension="Core" version="1.4"> - <param name="mode" type="BeginMode" flow="in" /> - <param name="count" type="GLsizei *" flow="in" count="COMPSIZE(drawcount)" /> - <param name="type" type="DrawElementsType" flow="in" /> - <param name="indices" type="void **" flow="in" count="COMPSIZE(drawcount)" /> - <param name="drawcount" type="GLsizei" flow="in" /> - <returns type="void" /> + <function name="MultiDrawElements"> + <param name="mode"><type>BeginMode</type></param> </function> <!-- <function name="TexImage1D" category="VERSION_1_0" extension="Core" version="1.0"> @@ -1759,7 +1698,7 @@ </function> --> - </add> + </overload> <add name="gl|glcore"> <enum name="ActiveAttribType"> @@ -4124,22 +4063,15 @@ </add> <!--- gles1 --> - <add name="gles1"> + <overload name="gles1"> <!-- PrimtiveType <=> BeginMode overloads for backwards compatibility --> <function name="DrawArrays" category="VERSION_ES_CM_1_0" extension="Core" version="1.0"> - <param name="mode" type="BeginMode" flow="in" /> - <param name="first" type="GLint" flow="in" /> - <param name="count" type="GLsizei" flow="in" /> - <returns type="void" /> + <param name="mode"><type>BeginMode</type></param> </function> <function name="DrawElements" category="VERSION_ES_CM_1_0" extension="Core" version="1.0"> - <param name="mode" type="BeginMode" flow="in" /> - <param name="count" type="GLsizei" flow="in" /> - <param name="type" type="DrawElementsType" flow="in" /> - <param name="indices" type="void *" flow="in" count="COMPSIZE(count,type)" /> - <returns type="void" /> + <param name="mode"><type>BeginMode</type></param> </function> - </add> + </overload> <add name="gles1"> <enum name="BeginMode"> @@ -4443,38 +4375,23 @@ </replace> - <add name="gles2" version="2.0"> + <overload name="gles2" version="2.0"> <!-- PrimtiveType <=> BeginMode overloads for backwards compatibility --> <function name="DrawArrays" category="ES_VERSION_2_0" extension="Core" version="2.0"> - <param name="mode" type="BeginMode" flow="in" /> - <param name="first" type="GLint" flow="in" /> - <param name="count" type="GLsizei" flow="in" /> - <returns type="void" /> + <param name="mode"><type>BeginMode</type></param> </function> <function name="DrawElements" category="ES_VERSION_2_0" extension="Core" version="2.0"> - <param name="mode" type="BeginMode" flow="in" /> - <param name="count" type="GLsizei" flow="in" /> - <param name="type" type="DrawElementsType" flow="in" /> - <param name="indices" type="void *" flow="in" count="COMPSIZE(count,type)" /> - <returns type="void" /> + <param name="mode"><type>BeginMode</type></param> </function> <!-- StencilFace <=> CullFaceMode --> <function name="StencilFuncSeparate" category="ES_VERSION_2_0" extension="Core" version="2.0"> - <param name="face" type="CullFaceMode" flow="in" /> - <param name="func" type="StencilFunction" flow="in" /> - <param name="ref" type="StencilValue" flow="in" /> - <param name="mask" type="MaskedStencilValue" flow="in" /> - <returns type="void" /> + <param name="face"><type>CullFaceMode</type></param> </function> <function name="StencilOpSeparate" category="ES_VERSION_2_0" extension="Core" version="2.0"> - <param name="face" type="CullFaceMode" flow="in" /> - <param name="sfail" type="StencilOp" flow="in" /> - <param name="dpfail" type="StencilOp" flow="in" /> - <param name="dppass" type="StencilOp" flow="in" /> - <returns type="void" /> + <param name="face"><type>CullFaceMode</type></param> </function> - </add> + </overload> <add name="gles2" version="2.0"> diff --git a/Source/OpenTK/Graphics/ES20/ES20.cs b/Source/OpenTK/Graphics/ES20/ES20.cs index 1e86dd11..533c7b4f 100644 --- a/Source/OpenTK/Graphics/ES20/ES20.cs +++ b/Source/OpenTK/Graphics/ES20/ES20.cs @@ -16478,6 +16478,83 @@ namespace OpenTK.Graphics.ES20 } + /// <summary>[requires: v2.0 and ES_VERSION_2_0] + /// Set front and/or back function and reference value for stencil testing + /// </summary> + /// <param name="face"> + /// <para> + /// Specifies whether front and/or back stencil state is updated. Three symbolic constants are valid: GL_FRONT, GL_BACK, and GL_FRONT_AND_BACK. + /// </para> + /// </param> + /// <param name="func"> + /// <para> + /// Specifies the test function. Eight symbolic constants are valid: GL_NEVER, GL_LESS, GL_LEQUAL, GL_GREATER, GL_GEQUAL, GL_EQUAL, GL_NOTEQUAL, and GL_ALWAYS. The initial value is GL_ALWAYS. + /// </para> + /// </param> + /// <param name="ref"> + /// <para> + /// Specifies the reference value for the stencil test. ref is clamped to the range [0, 2 sup n - 1], where is the number of bitplanes in the stencil buffer. The initial value is 0. + /// </para> + /// </param> + /// <param name="mask"> + /// <para> + /// Specifies a mask that is ANDed with both the reference value and the stored stencil value when the test is done. The initial value is all 1's. + /// </para> + /// </param> + [AutoGenerated(Category = "ES_VERSION_2_0", Version = "2.0", EntryPoint = "glStencilFuncSeparate")] + public static + void StencilFuncSeparate(OpenTK.Graphics.ES20.CullFaceMode face, OpenTK.Graphics.ES20.StencilFunction func, Int32 @ref, Int32 mask) + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + Delegates.glStencilFuncSeparate1((OpenTK.Graphics.ES20.CullFaceMode)face, (OpenTK.Graphics.ES20.StencilFunction)func, (Int32)@ref, (UInt32)mask); + #if DEBUG + } + #endif + } + + + /// <summary>[requires: v2.0 and ES_VERSION_2_0] + /// Set front and/or back function and reference value for stencil testing + /// </summary> + /// <param name="face"> + /// <para> + /// Specifies whether front and/or back stencil state is updated. Three symbolic constants are valid: GL_FRONT, GL_BACK, and GL_FRONT_AND_BACK. + /// </para> + /// </param> + /// <param name="func"> + /// <para> + /// Specifies the test function. Eight symbolic constants are valid: GL_NEVER, GL_LESS, GL_LEQUAL, GL_GREATER, GL_GEQUAL, GL_EQUAL, GL_NOTEQUAL, and GL_ALWAYS. The initial value is GL_ALWAYS. + /// </para> + /// </param> + /// <param name="ref"> + /// <para> + /// Specifies the reference value for the stencil test. ref is clamped to the range [0, 2 sup n - 1], where is the number of bitplanes in the stencil buffer. The initial value is 0. + /// </para> + /// </param> + /// <param name="mask"> + /// <para> + /// Specifies a mask that is ANDed with both the reference value and the stored stencil value when the test is done. The initial value is all 1's. + /// </para> + /// </param> + [System.CLSCompliant(false)] + [AutoGenerated(Category = "ES_VERSION_2_0", Version = "2.0", EntryPoint = "glStencilFuncSeparate")] + public static + void StencilFuncSeparate(OpenTK.Graphics.ES20.CullFaceMode face, OpenTK.Graphics.ES20.StencilFunction func, Int32 @ref, UInt32 mask) + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + Delegates.glStencilFuncSeparate1((OpenTK.Graphics.ES20.CullFaceMode)face, (OpenTK.Graphics.ES20.StencilFunction)func, (Int32)@ref, (UInt32)mask); + #if DEBUG + } + #endif + } + + /// <summary>[requires: v2.0 and ES_VERSION_2_0] /// Set front and/or back function and reference value for stencil testing /// </summary> @@ -16692,6 +16769,44 @@ namespace OpenTK.Graphics.ES20 } + /// <summary>[requires: v2.0 and ES_VERSION_2_0] + /// Set front and/or back stencil test actions + /// </summary> + /// <param name="face"> + /// <para> + /// Specifies whether front and/or back stencil state is updated. Three symbolic constants are valid: GL_FRONT, GL_BACK, and GL_FRONT_AND_BACK. + /// </para> + /// </param> + /// <param name="sfail"> + /// <para> + /// Specifies the action to take when the stencil test fails. Eight symbolic constants are accepted: GL_KEEP, GL_ZERO, GL_REPLACE, GL_INCR, GL_INCR_WRAP, GL_DECR, GL_DECR_WRAP, and GL_INVERT. The initial value is GL_KEEP. + /// </para> + /// </param> + /// <param name="dpfail"> + /// <para> + /// Specifies the stencil action when the stencil test passes, but the depth test fails. dpfail accepts the same symbolic constants as sfail. The initial value is GL_KEEP. + /// </para> + /// </param> + /// <param name="dppass"> + /// <para> + /// Specifies the stencil action when both the stencil test and the depth test pass, or when the stencil test passes and either there is no depth buffer or depth testing is not enabled. dppass accepts the same symbolic constants as sfail. The initial value is GL_KEEP. + /// </para> + /// </param> + [AutoGenerated(Category = "ES_VERSION_2_0", Version = "2.0", EntryPoint = "glStencilOpSeparate")] + public static + void StencilOpSeparate(OpenTK.Graphics.ES20.CullFaceMode face, OpenTK.Graphics.ES20.StencilOp sfail, OpenTK.Graphics.ES20.StencilOp dpfail, OpenTK.Graphics.ES20.StencilOp dppass) + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + Delegates.glStencilOpSeparate1((OpenTK.Graphics.ES20.CullFaceMode)face, (OpenTK.Graphics.ES20.StencilOp)sfail, (OpenTK.Graphics.ES20.StencilOp)dpfail, (OpenTK.Graphics.ES20.StencilOp)dppass); + #if DEBUG + } + #endif + } + + /// <summary>[requires: v2.0 and ES_VERSION_2_0] /// Set front and/or back stencil test actions /// </summary> diff --git a/Source/OpenTK/Graphics/ES20/ES20Core.cs b/Source/OpenTK/Graphics/ES20/ES20Core.cs index ff01cb8a..d6969e18 100644 --- a/Source/OpenTK/Graphics/ES20/ES20Core.cs +++ b/Source/OpenTK/Graphics/ES20/ES20Core.cs @@ -881,7 +881,7 @@ namespace OpenTK.Graphics.ES20 internal extern static void StencilFuncSeparate(OpenTK.Graphics.ES20.StencilFace face, OpenTK.Graphics.ES20.StencilFunction func, Int32 @ref, UInt32 mask); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glStencilFuncSeparate", ExactSpelling = true)] - internal extern static void StencilFuncSeparate1(OpenTK.Graphics.ES20.StencilFace face, OpenTK.Graphics.ES20.StencilFunction func, Int32 @ref, UInt32 mask); + internal extern static void StencilFuncSeparate1(OpenTK.Graphics.ES20.CullFaceMode face, OpenTK.Graphics.ES20.StencilFunction func, Int32 @ref, UInt32 mask); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glStencilMask", ExactSpelling = true)] internal extern static void StencilMask(UInt32 mask); @@ -896,7 +896,7 @@ namespace OpenTK.Graphics.ES20 internal extern static void StencilOpSeparate(OpenTK.Graphics.ES20.StencilFace face, OpenTK.Graphics.ES20.StencilOp sfail, OpenTK.Graphics.ES20.StencilOp dpfail, OpenTK.Graphics.ES20.StencilOp dppass); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glStencilOpSeparate", ExactSpelling = true)] - internal extern static void StencilOpSeparate1(OpenTK.Graphics.ES20.StencilFace face, OpenTK.Graphics.ES20.StencilOp sfail, OpenTK.Graphics.ES20.StencilOp dpfail, OpenTK.Graphics.ES20.StencilOp dppass); + internal extern static void StencilOpSeparate1(OpenTK.Graphics.ES20.CullFaceMode face, OpenTK.Graphics.ES20.StencilOp sfail, OpenTK.Graphics.ES20.StencilOp dpfail, OpenTK.Graphics.ES20.StencilOp dppass); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glTestFenceNV", ExactSpelling = true)] internal extern static bool TestFenceNV(UInt32 fence); diff --git a/Source/OpenTK/Graphics/ES20/ES20Delegates.cs b/Source/OpenTK/Graphics/ES20/ES20Delegates.cs index d46ca7a7..0e53bfb4 100644 --- a/Source/OpenTK/Graphics/ES20/ES20Delegates.cs +++ b/Source/OpenTK/Graphics/ES20/ES20Delegates.cs @@ -879,7 +879,7 @@ namespace OpenTK.Graphics.ES20 internal delegate void StencilFuncSeparate(OpenTK.Graphics.ES20.StencilFace face, OpenTK.Graphics.ES20.StencilFunction func, Int32 @ref, UInt32 mask); internal static StencilFuncSeparate glStencilFuncSeparate; [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate void StencilFuncSeparate1(OpenTK.Graphics.ES20.StencilFace face, OpenTK.Graphics.ES20.StencilFunction func, Int32 @ref, UInt32 mask); + internal delegate void StencilFuncSeparate1(OpenTK.Graphics.ES20.CullFaceMode face, OpenTK.Graphics.ES20.StencilFunction func, Int32 @ref, UInt32 mask); internal static StencilFuncSeparate1 glStencilFuncSeparate1; [System.Security.SuppressUnmanagedCodeSecurity()] internal delegate void StencilMask(UInt32 mask); @@ -894,7 +894,7 @@ namespace OpenTK.Graphics.ES20 internal delegate void StencilOpSeparate(OpenTK.Graphics.ES20.StencilFace face, OpenTK.Graphics.ES20.StencilOp sfail, OpenTK.Graphics.ES20.StencilOp dpfail, OpenTK.Graphics.ES20.StencilOp dppass); internal static StencilOpSeparate glStencilOpSeparate; [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate void StencilOpSeparate1(OpenTK.Graphics.ES20.StencilFace face, OpenTK.Graphics.ES20.StencilOp sfail, OpenTK.Graphics.ES20.StencilOp dpfail, OpenTK.Graphics.ES20.StencilOp dppass); + internal delegate void StencilOpSeparate1(OpenTK.Graphics.ES20.CullFaceMode face, OpenTK.Graphics.ES20.StencilOp sfail, OpenTK.Graphics.ES20.StencilOp dpfail, OpenTK.Graphics.ES20.StencilOp dppass); internal static StencilOpSeparate1 glStencilOpSeparate1; [System.Security.SuppressUnmanagedCodeSecurity()] internal delegate bool TestFenceNV(UInt32 fence); diff --git a/Source/OpenTK/Graphics/ES20/ES20Enums.cs b/Source/OpenTK/Graphics/ES20/ES20Enums.cs index 427c6b00..6af2795f 100644 --- a/Source/OpenTK/Graphics/ES20/ES20Enums.cs +++ b/Source/OpenTK/Graphics/ES20/ES20Enums.cs @@ -8618,7 +8618,7 @@ namespace OpenTK.Graphics.ES20 } /// <summary> - /// Used in GL.CullFace + /// Used in GL.CullFace, GL.StencilFuncSeparate and 1 other function /// </summary> public enum CullFaceMode : int { diff --git a/Source/OpenTK/Graphics/ES30/ES30.cs b/Source/OpenTK/Graphics/ES30/ES30.cs index 4b549469..2e0af335 100644 --- a/Source/OpenTK/Graphics/ES30/ES30.cs +++ b/Source/OpenTK/Graphics/ES30/ES30.cs @@ -8608,39 +8608,6 @@ namespace OpenTK.Graphics.ES30 } - /// <summary>[requires: v2.0 and ES_VERSION_2_0] - /// Render primitives from array data - /// </summary> - /// <param name="mode"> - /// <para> - /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. - /// </para> - /// </param> - /// <param name="first"> - /// <para> - /// Specifies the starting index in the enabled arrays. - /// </para> - /// </param> - /// <param name="count"> - /// <para> - /// Specifies the number of indices to be rendered. - /// </para> - /// </param> - [AutoGenerated(Category = "ES_VERSION_2_0", Version = "2.0", EntryPoint = "glDrawArrays")] - public static - void DrawArrays(OpenTK.Graphics.ES30.BeginMode mode, Int32 first, Int32 count) - { - #if DEBUG - using (new ErrorHelper(GraphicsContext.CurrentContext)) - { - #endif - Delegates.glDrawArrays1((OpenTK.Graphics.ES30.BeginMode)mode, (Int32)first, (Int32)count); - #if DEBUG - } - #endif - } - - /// <summary>[requires: v2.0 and ES_VERSION_2_0] /// Render primitives from array data /// </summary> @@ -8809,233 +8776,6 @@ namespace OpenTK.Graphics.ES30 } - /// <summary>[requires: v2.0 and ES_VERSION_2_0] - /// Render primitives from array data - /// </summary> - /// <param name="mode"> - /// <para> - /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. - /// </para> - /// </param> - /// <param name="count"> - /// <para> - /// Specifies the number of elements to be rendered. - /// </para> - /// </param> - /// <param name="type"> - /// <para> - /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. - /// </para> - /// </param> - /// <param name="indices"> - /// <para> - /// Specifies a pointer to the location where the indices are stored. - /// </para> - /// </param> - [AutoGenerated(Category = "ES_VERSION_2_0", Version = "2.0", EntryPoint = "glDrawElements")] - public static - void DrawElements(OpenTK.Graphics.ES30.BeginMode mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, IntPtr indices) - { - #if DEBUG - using (new ErrorHelper(GraphicsContext.CurrentContext)) - { - #endif - Delegates.glDrawElements1((OpenTK.Graphics.ES30.BeginMode)mode, (Int32)count, (OpenTK.Graphics.ES30.DrawElementsType)type, (IntPtr)indices); - #if DEBUG - } - #endif - } - - - /// <summary>[requires: v2.0 and ES_VERSION_2_0] - /// Render primitives from array data - /// </summary> - /// <param name="mode"> - /// <para> - /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. - /// </para> - /// </param> - /// <param name="count"> - /// <para> - /// Specifies the number of elements to be rendered. - /// </para> - /// </param> - /// <param name="type"> - /// <para> - /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. - /// </para> - /// </param> - /// <param name="indices"> - /// <para> - /// Specifies a pointer to the location where the indices are stored. - /// </para> - /// </param> - [AutoGenerated(Category = "ES_VERSION_2_0", Version = "2.0", EntryPoint = "glDrawElements")] - public static - void DrawElements<T3>(OpenTK.Graphics.ES30.BeginMode mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, [InAttribute, OutAttribute] T3[] indices) - where T3 : struct - { - #if DEBUG - using (new ErrorHelper(GraphicsContext.CurrentContext)) - { - #endif - GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); - try - { - Delegates.glDrawElements1((OpenTK.Graphics.ES30.BeginMode)mode, (Int32)count, (OpenTK.Graphics.ES30.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject()); - } - finally - { - indices_ptr.Free(); - } - #if DEBUG - } - #endif - } - - - /// <summary>[requires: v2.0 and ES_VERSION_2_0] - /// Render primitives from array data - /// </summary> - /// <param name="mode"> - /// <para> - /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. - /// </para> - /// </param> - /// <param name="count"> - /// <para> - /// Specifies the number of elements to be rendered. - /// </para> - /// </param> - /// <param name="type"> - /// <para> - /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. - /// </para> - /// </param> - /// <param name="indices"> - /// <para> - /// Specifies a pointer to the location where the indices are stored. - /// </para> - /// </param> - [AutoGenerated(Category = "ES_VERSION_2_0", Version = "2.0", EntryPoint = "glDrawElements")] - public static - void DrawElements<T3>(OpenTK.Graphics.ES30.BeginMode mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, [InAttribute, OutAttribute] T3[,] indices) - where T3 : struct - { - #if DEBUG - using (new ErrorHelper(GraphicsContext.CurrentContext)) - { - #endif - GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); - try - { - Delegates.glDrawElements1((OpenTK.Graphics.ES30.BeginMode)mode, (Int32)count, (OpenTK.Graphics.ES30.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject()); - } - finally - { - indices_ptr.Free(); - } - #if DEBUG - } - #endif - } - - - /// <summary>[requires: v2.0 and ES_VERSION_2_0] - /// Render primitives from array data - /// </summary> - /// <param name="mode"> - /// <para> - /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. - /// </para> - /// </param> - /// <param name="count"> - /// <para> - /// Specifies the number of elements to be rendered. - /// </para> - /// </param> - /// <param name="type"> - /// <para> - /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. - /// </para> - /// </param> - /// <param name="indices"> - /// <para> - /// Specifies a pointer to the location where the indices are stored. - /// </para> - /// </param> - [AutoGenerated(Category = "ES_VERSION_2_0", Version = "2.0", EntryPoint = "glDrawElements")] - public static - void DrawElements<T3>(OpenTK.Graphics.ES30.BeginMode mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, [InAttribute, OutAttribute] T3[,,] indices) - where T3 : struct - { - #if DEBUG - using (new ErrorHelper(GraphicsContext.CurrentContext)) - { - #endif - GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); - try - { - Delegates.glDrawElements1((OpenTK.Graphics.ES30.BeginMode)mode, (Int32)count, (OpenTK.Graphics.ES30.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject()); - } - finally - { - indices_ptr.Free(); - } - #if DEBUG - } - #endif - } - - - /// <summary>[requires: v2.0 and ES_VERSION_2_0] - /// Render primitives from array data - /// </summary> - /// <param name="mode"> - /// <para> - /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. - /// </para> - /// </param> - /// <param name="count"> - /// <para> - /// Specifies the number of elements to be rendered. - /// </para> - /// </param> - /// <param name="type"> - /// <para> - /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. - /// </para> - /// </param> - /// <param name="indices"> - /// <para> - /// Specifies a pointer to the location where the indices are stored. - /// </para> - /// </param> - [AutoGenerated(Category = "ES_VERSION_2_0", Version = "2.0", EntryPoint = "glDrawElements")] - public static - void DrawElements<T3>(OpenTK.Graphics.ES30.BeginMode mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, [InAttribute, OutAttribute] ref T3 indices) - where T3 : struct - { - #if DEBUG - using (new ErrorHelper(GraphicsContext.CurrentContext)) - { - #endif - GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); - try - { - Delegates.glDrawElements1((OpenTK.Graphics.ES30.BeginMode)mode, (Int32)count, (OpenTK.Graphics.ES30.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject()); - indices = (T3)indices_ptr.Target; - } - finally - { - indices_ptr.Free(); - } - #if DEBUG - } - #endif - } - - /// <summary>[requires: v2.0 and ES_VERSION_2_0] /// Render primitives from array data /// </summary> diff --git a/Source/OpenTK/Graphics/ES30/ES30Delegates.cs b/Source/OpenTK/Graphics/ES30/ES30Delegates.cs index f0301026..3eba03da 100644 --- a/Source/OpenTK/Graphics/ES30/ES30Delegates.cs +++ b/Source/OpenTK/Graphics/ES30/ES30Delegates.cs @@ -336,9 +336,6 @@ namespace OpenTK.Graphics.ES30 internal delegate void DrawArrays(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 first, Int32 count); internal static DrawArrays glDrawArrays; [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate void DrawArrays1(OpenTK.Graphics.ES30.BeginMode mode, Int32 first, Int32 count); - internal static DrawArrays1 glDrawArrays1; - [System.Security.SuppressUnmanagedCodeSecurity()] internal delegate void DrawArraysInstanced(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 first, Int32 count, Int32 instancecount); internal static DrawArraysInstanced glDrawArraysInstanced; [System.Security.SuppressUnmanagedCodeSecurity()] @@ -366,9 +363,6 @@ namespace OpenTK.Graphics.ES30 internal delegate void DrawElements(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, IntPtr indices); internal static DrawElements glDrawElements; [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate void DrawElements1(OpenTK.Graphics.ES30.BeginMode mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, IntPtr indices); - internal static DrawElements1 glDrawElements1; - [System.Security.SuppressUnmanagedCodeSecurity()] internal delegate void DrawElementsInstanced(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, IntPtr indices, Int32 instancecount); internal static DrawElementsInstanced glDrawElementsInstanced; [System.Security.SuppressUnmanagedCodeSecurity()] @@ -1107,9 +1101,6 @@ namespace OpenTK.Graphics.ES30 internal delegate void StencilFuncSeparate(OpenTK.Graphics.ES30.StencilFace face, OpenTK.Graphics.ES30.StencilFunction func, Int32 @ref, UInt32 mask); internal static StencilFuncSeparate glStencilFuncSeparate; [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate void StencilFuncSeparate1(OpenTK.Graphics.ES30.StencilFace face, OpenTK.Graphics.ES30.StencilFunction func, Int32 @ref, UInt32 mask); - internal static StencilFuncSeparate1 glStencilFuncSeparate1; - [System.Security.SuppressUnmanagedCodeSecurity()] internal delegate void StencilMask(UInt32 mask); internal static StencilMask glStencilMask; [System.Security.SuppressUnmanagedCodeSecurity()] @@ -1122,9 +1113,6 @@ namespace OpenTK.Graphics.ES30 internal delegate void StencilOpSeparate(OpenTK.Graphics.ES30.StencilFace face, OpenTK.Graphics.ES30.StencilOp sfail, OpenTK.Graphics.ES30.StencilOp dpfail, OpenTK.Graphics.ES30.StencilOp dppass); internal static StencilOpSeparate glStencilOpSeparate; [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate void StencilOpSeparate1(OpenTK.Graphics.ES30.StencilFace face, OpenTK.Graphics.ES30.StencilOp sfail, OpenTK.Graphics.ES30.StencilOp dpfail, OpenTK.Graphics.ES30.StencilOp dppass); - internal static StencilOpSeparate1 glStencilOpSeparate1; - [System.Security.SuppressUnmanagedCodeSecurity()] internal delegate bool TestFenceNV(UInt32 fence); internal static TestFenceNV glTestFenceNV; [System.Security.SuppressUnmanagedCodeSecurity()] diff --git a/Source/OpenTK/Graphics/ES30/ES30Enums.cs b/Source/OpenTK/Graphics/ES30/ES30Enums.cs index e16e0b17..0ccae4ac 100644 --- a/Source/OpenTK/Graphics/ES30/ES30Enums.cs +++ b/Source/OpenTK/Graphics/ES30/ES30Enums.cs @@ -9184,7 +9184,7 @@ namespace OpenTK.Graphics.ES30 } /// <summary> - /// Used in GL.DrawArrays, GL.DrawElements + /// Not used directly. /// </summary> public enum BeginMode : int { diff --git a/Source/OpenTK/Graphics/ES30/ES3Core.cs b/Source/OpenTK/Graphics/ES30/ES3Core.cs index 5b9381d5..3e28bd83 100644 --- a/Source/OpenTK/Graphics/ES30/ES3Core.cs +++ b/Source/OpenTK/Graphics/ES30/ES3Core.cs @@ -337,9 +337,6 @@ namespace OpenTK.Graphics.ES30 [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDrawArrays", ExactSpelling = true)] internal extern static void DrawArrays(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 first, Int32 count); [System.Security.SuppressUnmanagedCodeSecurity()] - [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDrawArrays", ExactSpelling = true)] - internal extern static void DrawArrays1(OpenTK.Graphics.ES30.BeginMode mode, Int32 first, Int32 count); - [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDrawArraysInstanced", ExactSpelling = true)] internal extern static void DrawArraysInstanced(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 first, Int32 count, Int32 instancecount); [System.Security.SuppressUnmanagedCodeSecurity()] @@ -367,9 +364,6 @@ namespace OpenTK.Graphics.ES30 [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDrawElements", ExactSpelling = true)] internal extern static void DrawElements(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, IntPtr indices); [System.Security.SuppressUnmanagedCodeSecurity()] - [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDrawElements", ExactSpelling = true)] - internal extern static void DrawElements1(OpenTK.Graphics.ES30.BeginMode mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, IntPtr indices); - [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDrawElementsInstanced", ExactSpelling = true)] internal extern static void DrawElementsInstanced(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, IntPtr indices, Int32 instancecount); [System.Security.SuppressUnmanagedCodeSecurity()] @@ -1108,9 +1102,6 @@ namespace OpenTK.Graphics.ES30 [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glStencilFuncSeparate", ExactSpelling = true)] internal extern static void StencilFuncSeparate(OpenTK.Graphics.ES30.StencilFace face, OpenTK.Graphics.ES30.StencilFunction func, Int32 @ref, UInt32 mask); [System.Security.SuppressUnmanagedCodeSecurity()] - [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glStencilFuncSeparate", ExactSpelling = true)] - internal extern static void StencilFuncSeparate1(OpenTK.Graphics.ES30.StencilFace face, OpenTK.Graphics.ES30.StencilFunction func, Int32 @ref, UInt32 mask); - [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glStencilMask", ExactSpelling = true)] internal extern static void StencilMask(UInt32 mask); [System.Security.SuppressUnmanagedCodeSecurity()] @@ -1123,9 +1114,6 @@ namespace OpenTK.Graphics.ES30 [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glStencilOpSeparate", ExactSpelling = true)] internal extern static void StencilOpSeparate(OpenTK.Graphics.ES30.StencilFace face, OpenTK.Graphics.ES30.StencilOp sfail, OpenTK.Graphics.ES30.StencilOp dpfail, OpenTK.Graphics.ES30.StencilOp dppass); [System.Security.SuppressUnmanagedCodeSecurity()] - [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glStencilOpSeparate", ExactSpelling = true)] - internal extern static void StencilOpSeparate1(OpenTK.Graphics.ES30.StencilFace face, OpenTK.Graphics.ES30.StencilOp sfail, OpenTK.Graphics.ES30.StencilOp dpfail, OpenTK.Graphics.ES30.StencilOp dppass); - [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glTestFenceNV", ExactSpelling = true)] internal extern static bool TestFenceNV(UInt32 fence); [System.Security.SuppressUnmanagedCodeSecurity()] diff --git a/Source/OpenTK/Graphics/OpenGL/GL.cs b/Source/OpenTK/Graphics/OpenGL/GL.cs index 9eaf1f64..2a04df52 100644 --- a/Source/OpenTK/Graphics/OpenGL/GL.cs +++ b/Source/OpenTK/Graphics/OpenGL/GL.cs @@ -10530,6 +10530,258 @@ namespace OpenTK.Graphics.OpenGL } + /// <summary>[requires: ARB_draw_instanced] + /// Draw multiple instances of a set of elements + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="primcount"> + /// <para> + /// Specifies the number of instances of the specified range of indices to be rendered. + /// </para> + /// </param> + [AutoGenerated(Category = "ARB_draw_instanced", Version = "", EntryPoint = "glDrawElementsInstancedARB")] + public static + void DrawElementsInstanced(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 primcount) + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + Delegates.glDrawElementsInstancedARB1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices, (Int32)primcount); + #if DEBUG + } + #endif + } + + + /// <summary>[requires: ARB_draw_instanced] + /// Draw multiple instances of a set of elements + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="primcount"> + /// <para> + /// Specifies the number of instances of the specified range of indices to be rendered. + /// </para> + /// </param> + [AutoGenerated(Category = "ARB_draw_instanced", Version = "", EntryPoint = "glDrawElementsInstancedARB")] + public static + void DrawElementsInstanced<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] T3[] indices, Int32 primcount) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glDrawElementsInstancedARB1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount); + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: ARB_draw_instanced] + /// Draw multiple instances of a set of elements + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="primcount"> + /// <para> + /// Specifies the number of instances of the specified range of indices to be rendered. + /// </para> + /// </param> + [AutoGenerated(Category = "ARB_draw_instanced", Version = "", EntryPoint = "glDrawElementsInstancedARB")] + public static + void DrawElementsInstanced<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] T3[,] indices, Int32 primcount) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glDrawElementsInstancedARB1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount); + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: ARB_draw_instanced] + /// Draw multiple instances of a set of elements + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="primcount"> + /// <para> + /// Specifies the number of instances of the specified range of indices to be rendered. + /// </para> + /// </param> + [AutoGenerated(Category = "ARB_draw_instanced", Version = "", EntryPoint = "glDrawElementsInstancedARB")] + public static + void DrawElementsInstanced<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] T3[,,] indices, Int32 primcount) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glDrawElementsInstancedARB1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount); + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: ARB_draw_instanced] + /// Draw multiple instances of a set of elements + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="primcount"> + /// <para> + /// Specifies the number of instances of the specified range of indices to be rendered. + /// </para> + /// </param> + [AutoGenerated(Category = "ARB_draw_instanced", Version = "", EntryPoint = "glDrawElementsInstancedARB")] + public static + void DrawElementsInstanced<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] ref T3 indices, Int32 primcount) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glDrawElementsInstancedARB1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount); + indices = (T3)indices_ptr.Target; + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + /// <summary>[requires: ARB_draw_instanced] /// Draw multiple instances of a set of elements /// </summary> @@ -55340,6 +55592,258 @@ namespace OpenTK.Graphics.OpenGL } + /// <summary>[requires: v3.2 and ARB_draw_elements_base_vertex|VERSION_3_2] + /// Render primitives from array data with a per-element offset + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_LINES_ADJACENCY, GL_LINE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY, GL_TRIANGLE_STRIP_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="basevertex"> + /// <para> + /// Specifies a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays. + /// </para> + /// </param> + [AutoGenerated(Category = "ARB_draw_elements_base_vertex|VERSION_3_2", Version = "3.2", EntryPoint = "glDrawElementsBaseVertex")] + public static + void DrawElementsBaseVertex(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 basevertex) + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + Delegates.glDrawElementsBaseVertex1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices, (Int32)basevertex); + #if DEBUG + } + #endif + } + + + /// <summary>[requires: v3.2 and ARB_draw_elements_base_vertex|VERSION_3_2] + /// Render primitives from array data with a per-element offset + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_LINES_ADJACENCY, GL_LINE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY, GL_TRIANGLE_STRIP_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="basevertex"> + /// <para> + /// Specifies a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays. + /// </para> + /// </param> + [AutoGenerated(Category = "ARB_draw_elements_base_vertex|VERSION_3_2", Version = "3.2", EntryPoint = "glDrawElementsBaseVertex")] + public static + void DrawElementsBaseVertex<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] T3[] indices, Int32 basevertex) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glDrawElementsBaseVertex1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)basevertex); + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: v3.2 and ARB_draw_elements_base_vertex|VERSION_3_2] + /// Render primitives from array data with a per-element offset + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_LINES_ADJACENCY, GL_LINE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY, GL_TRIANGLE_STRIP_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="basevertex"> + /// <para> + /// Specifies a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays. + /// </para> + /// </param> + [AutoGenerated(Category = "ARB_draw_elements_base_vertex|VERSION_3_2", Version = "3.2", EntryPoint = "glDrawElementsBaseVertex")] + public static + void DrawElementsBaseVertex<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] T3[,] indices, Int32 basevertex) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glDrawElementsBaseVertex1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)basevertex); + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: v3.2 and ARB_draw_elements_base_vertex|VERSION_3_2] + /// Render primitives from array data with a per-element offset + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_LINES_ADJACENCY, GL_LINE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY, GL_TRIANGLE_STRIP_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="basevertex"> + /// <para> + /// Specifies a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays. + /// </para> + /// </param> + [AutoGenerated(Category = "ARB_draw_elements_base_vertex|VERSION_3_2", Version = "3.2", EntryPoint = "glDrawElementsBaseVertex")] + public static + void DrawElementsBaseVertex<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] T3[,,] indices, Int32 basevertex) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glDrawElementsBaseVertex1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)basevertex); + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: v3.2 and ARB_draw_elements_base_vertex|VERSION_3_2] + /// Render primitives from array data with a per-element offset + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_LINES_ADJACENCY, GL_LINE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY, GL_TRIANGLE_STRIP_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="basevertex"> + /// <para> + /// Specifies a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays. + /// </para> + /// </param> + [AutoGenerated(Category = "ARB_draw_elements_base_vertex|VERSION_3_2", Version = "3.2", EntryPoint = "glDrawElementsBaseVertex")] + public static + void DrawElementsBaseVertex<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] ref T3 indices, Int32 basevertex) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glDrawElementsBaseVertex1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)basevertex); + indices = (T3)indices_ptr.Target; + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + /// <summary>[requires: v3.2 and ARB_draw_elements_base_vertex|VERSION_3_2] /// Render primitives from array data with a per-element offset /// </summary> @@ -56857,6 +57361,283 @@ namespace OpenTK.Graphics.OpenGL } + /// <summary>[requires: v3.2 and ARB_draw_elements_base_vertex|VERSION_3_2] + /// Render multiple instances of a set of primitives from array data with a per-element offset + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_LINES_ADJACENCY, GL_LINE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY, GL_TRIANGLE_STRIP_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="primcount"> + /// <para> + /// Specifies the number of instances of the indexed geometry that should be drawn. + /// </para> + /// </param> + /// <param name="basevertex"> + /// <para> + /// Specifies a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays. + /// </para> + /// </param> + [AutoGenerated(Category = "ARB_draw_elements_base_vertex|VERSION_3_2", Version = "3.2", EntryPoint = "glDrawElementsInstancedBaseVertex")] + public static + void DrawElementsInstancedBaseVertex(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 instancecount, Int32 basevertex) + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + Delegates.glDrawElementsInstancedBaseVertex1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices, (Int32)instancecount, (Int32)basevertex); + #if DEBUG + } + #endif + } + + + /// <summary>[requires: v3.2 and ARB_draw_elements_base_vertex|VERSION_3_2] + /// Render multiple instances of a set of primitives from array data with a per-element offset + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_LINES_ADJACENCY, GL_LINE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY, GL_TRIANGLE_STRIP_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="primcount"> + /// <para> + /// Specifies the number of instances of the indexed geometry that should be drawn. + /// </para> + /// </param> + /// <param name="basevertex"> + /// <para> + /// Specifies a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays. + /// </para> + /// </param> + [AutoGenerated(Category = "ARB_draw_elements_base_vertex|VERSION_3_2", Version = "3.2", EntryPoint = "glDrawElementsInstancedBaseVertex")] + public static + void DrawElementsInstancedBaseVertex<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] T3[] indices, Int32 instancecount, Int32 basevertex) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glDrawElementsInstancedBaseVertex1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)instancecount, (Int32)basevertex); + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: v3.2 and ARB_draw_elements_base_vertex|VERSION_3_2] + /// Render multiple instances of a set of primitives from array data with a per-element offset + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_LINES_ADJACENCY, GL_LINE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY, GL_TRIANGLE_STRIP_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="primcount"> + /// <para> + /// Specifies the number of instances of the indexed geometry that should be drawn. + /// </para> + /// </param> + /// <param name="basevertex"> + /// <para> + /// Specifies a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays. + /// </para> + /// </param> + [AutoGenerated(Category = "ARB_draw_elements_base_vertex|VERSION_3_2", Version = "3.2", EntryPoint = "glDrawElementsInstancedBaseVertex")] + public static + void DrawElementsInstancedBaseVertex<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] T3[,] indices, Int32 instancecount, Int32 basevertex) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glDrawElementsInstancedBaseVertex1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)instancecount, (Int32)basevertex); + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: v3.2 and ARB_draw_elements_base_vertex|VERSION_3_2] + /// Render multiple instances of a set of primitives from array data with a per-element offset + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_LINES_ADJACENCY, GL_LINE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY, GL_TRIANGLE_STRIP_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="primcount"> + /// <para> + /// Specifies the number of instances of the indexed geometry that should be drawn. + /// </para> + /// </param> + /// <param name="basevertex"> + /// <para> + /// Specifies a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays. + /// </para> + /// </param> + [AutoGenerated(Category = "ARB_draw_elements_base_vertex|VERSION_3_2", Version = "3.2", EntryPoint = "glDrawElementsInstancedBaseVertex")] + public static + void DrawElementsInstancedBaseVertex<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] T3[,,] indices, Int32 instancecount, Int32 basevertex) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glDrawElementsInstancedBaseVertex1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)instancecount, (Int32)basevertex); + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: v3.2 and ARB_draw_elements_base_vertex|VERSION_3_2] + /// Render multiple instances of a set of primitives from array data with a per-element offset + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_LINES_ADJACENCY, GL_LINE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY, GL_TRIANGLE_STRIP_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="primcount"> + /// <para> + /// Specifies the number of instances of the indexed geometry that should be drawn. + /// </para> + /// </param> + /// <param name="basevertex"> + /// <para> + /// Specifies a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays. + /// </para> + /// </param> + [AutoGenerated(Category = "ARB_draw_elements_base_vertex|VERSION_3_2", Version = "3.2", EntryPoint = "glDrawElementsInstancedBaseVertex")] + public static + void DrawElementsInstancedBaseVertex<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] ref T3 indices, Int32 instancecount, Int32 basevertex) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glDrawElementsInstancedBaseVertex1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)instancecount, (Int32)basevertex); + indices = (T3)indices_ptr.Target; + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + /// <summary>[requires: v3.2 and ARB_draw_elements_base_vertex|VERSION_3_2] /// Render multiple instances of a set of primitives from array data with a per-element offset /// </summary> @@ -59088,6 +59869,615 @@ namespace OpenTK.Graphics.OpenGL } + /// <summary>[requires: v3.2 and ARB_draw_elements_base_vertex|VERSION_3_2] + /// Render primitives from array data with a per-element offset + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_LINES_ADJACENCY, GL_LINE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY, GL_TRIANGLE_STRIP_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="start"> + /// <para> + /// Specifies the minimum array index contained in indices. + /// </para> + /// </param> + /// <param name="end"> + /// <para> + /// Specifies the maximum array index contained in indices. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="basevertex"> + /// <para> + /// Specifies a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays. + /// </para> + /// </param> + [AutoGenerated(Category = "ARB_draw_elements_base_vertex|VERSION_3_2", Version = "3.2", EntryPoint = "glDrawRangeElementsBaseVertex")] + public static + void DrawRangeElementsBaseVertex(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 start, Int32 end, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 basevertex) + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + Delegates.glDrawRangeElementsBaseVertex1((OpenTK.Graphics.OpenGL.BeginMode)mode, (UInt32)start, (UInt32)end, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices, (Int32)basevertex); + #if DEBUG + } + #endif + } + + + /// <summary>[requires: v3.2 and ARB_draw_elements_base_vertex|VERSION_3_2] + /// Render primitives from array data with a per-element offset + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_LINES_ADJACENCY, GL_LINE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY, GL_TRIANGLE_STRIP_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="start"> + /// <para> + /// Specifies the minimum array index contained in indices. + /// </para> + /// </param> + /// <param name="end"> + /// <para> + /// Specifies the maximum array index contained in indices. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="basevertex"> + /// <para> + /// Specifies a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays. + /// </para> + /// </param> + [AutoGenerated(Category = "ARB_draw_elements_base_vertex|VERSION_3_2", Version = "3.2", EntryPoint = "glDrawRangeElementsBaseVertex")] + public static + void DrawRangeElementsBaseVertex<T5>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 start, Int32 end, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] T5[] indices, Int32 basevertex) + where T5 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glDrawRangeElementsBaseVertex1((OpenTK.Graphics.OpenGL.BeginMode)mode, (UInt32)start, (UInt32)end, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)basevertex); + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: v3.2 and ARB_draw_elements_base_vertex|VERSION_3_2] + /// Render primitives from array data with a per-element offset + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_LINES_ADJACENCY, GL_LINE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY, GL_TRIANGLE_STRIP_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="start"> + /// <para> + /// Specifies the minimum array index contained in indices. + /// </para> + /// </param> + /// <param name="end"> + /// <para> + /// Specifies the maximum array index contained in indices. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="basevertex"> + /// <para> + /// Specifies a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays. + /// </para> + /// </param> + [AutoGenerated(Category = "ARB_draw_elements_base_vertex|VERSION_3_2", Version = "3.2", EntryPoint = "glDrawRangeElementsBaseVertex")] + public static + void DrawRangeElementsBaseVertex<T5>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 start, Int32 end, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] T5[,] indices, Int32 basevertex) + where T5 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glDrawRangeElementsBaseVertex1((OpenTK.Graphics.OpenGL.BeginMode)mode, (UInt32)start, (UInt32)end, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)basevertex); + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: v3.2 and ARB_draw_elements_base_vertex|VERSION_3_2] + /// Render primitives from array data with a per-element offset + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_LINES_ADJACENCY, GL_LINE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY, GL_TRIANGLE_STRIP_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="start"> + /// <para> + /// Specifies the minimum array index contained in indices. + /// </para> + /// </param> + /// <param name="end"> + /// <para> + /// Specifies the maximum array index contained in indices. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="basevertex"> + /// <para> + /// Specifies a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays. + /// </para> + /// </param> + [AutoGenerated(Category = "ARB_draw_elements_base_vertex|VERSION_3_2", Version = "3.2", EntryPoint = "glDrawRangeElementsBaseVertex")] + public static + void DrawRangeElementsBaseVertex<T5>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 start, Int32 end, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] T5[,,] indices, Int32 basevertex) + where T5 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glDrawRangeElementsBaseVertex1((OpenTK.Graphics.OpenGL.BeginMode)mode, (UInt32)start, (UInt32)end, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)basevertex); + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: v3.2 and ARB_draw_elements_base_vertex|VERSION_3_2] + /// Render primitives from array data with a per-element offset + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_LINES_ADJACENCY, GL_LINE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY, GL_TRIANGLE_STRIP_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="start"> + /// <para> + /// Specifies the minimum array index contained in indices. + /// </para> + /// </param> + /// <param name="end"> + /// <para> + /// Specifies the maximum array index contained in indices. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="basevertex"> + /// <para> + /// Specifies a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays. + /// </para> + /// </param> + [AutoGenerated(Category = "ARB_draw_elements_base_vertex|VERSION_3_2", Version = "3.2", EntryPoint = "glDrawRangeElementsBaseVertex")] + public static + void DrawRangeElementsBaseVertex<T5>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 start, Int32 end, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] ref T5 indices, Int32 basevertex) + where T5 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glDrawRangeElementsBaseVertex1((OpenTK.Graphics.OpenGL.BeginMode)mode, (UInt32)start, (UInt32)end, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)basevertex); + indices = (T5)indices_ptr.Target; + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: v3.2 and ARB_draw_elements_base_vertex|VERSION_3_2] + /// Render primitives from array data with a per-element offset + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_LINES_ADJACENCY, GL_LINE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY, GL_TRIANGLE_STRIP_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="start"> + /// <para> + /// Specifies the minimum array index contained in indices. + /// </para> + /// </param> + /// <param name="end"> + /// <para> + /// Specifies the maximum array index contained in indices. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="basevertex"> + /// <para> + /// Specifies a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays. + /// </para> + /// </param> + [System.CLSCompliant(false)] + [AutoGenerated(Category = "ARB_draw_elements_base_vertex|VERSION_3_2", Version = "3.2", EntryPoint = "glDrawRangeElementsBaseVertex")] + public static + void DrawRangeElementsBaseVertex(OpenTK.Graphics.OpenGL.BeginMode mode, UInt32 start, UInt32 end, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 basevertex) + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + Delegates.glDrawRangeElementsBaseVertex1((OpenTK.Graphics.OpenGL.BeginMode)mode, (UInt32)start, (UInt32)end, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices, (Int32)basevertex); + #if DEBUG + } + #endif + } + + + /// <summary>[requires: v3.2 and ARB_draw_elements_base_vertex|VERSION_3_2] + /// Render primitives from array data with a per-element offset + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_LINES_ADJACENCY, GL_LINE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY, GL_TRIANGLE_STRIP_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="start"> + /// <para> + /// Specifies the minimum array index contained in indices. + /// </para> + /// </param> + /// <param name="end"> + /// <para> + /// Specifies the maximum array index contained in indices. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="basevertex"> + /// <para> + /// Specifies a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays. + /// </para> + /// </param> + [System.CLSCompliant(false)] + [AutoGenerated(Category = "ARB_draw_elements_base_vertex|VERSION_3_2", Version = "3.2", EntryPoint = "glDrawRangeElementsBaseVertex")] + public static + void DrawRangeElementsBaseVertex<T5>(OpenTK.Graphics.OpenGL.BeginMode mode, UInt32 start, UInt32 end, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] T5[] indices, Int32 basevertex) + where T5 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glDrawRangeElementsBaseVertex1((OpenTK.Graphics.OpenGL.BeginMode)mode, (UInt32)start, (UInt32)end, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)basevertex); + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: v3.2 and ARB_draw_elements_base_vertex|VERSION_3_2] + /// Render primitives from array data with a per-element offset + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_LINES_ADJACENCY, GL_LINE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY, GL_TRIANGLE_STRIP_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="start"> + /// <para> + /// Specifies the minimum array index contained in indices. + /// </para> + /// </param> + /// <param name="end"> + /// <para> + /// Specifies the maximum array index contained in indices. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="basevertex"> + /// <para> + /// Specifies a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays. + /// </para> + /// </param> + [System.CLSCompliant(false)] + [AutoGenerated(Category = "ARB_draw_elements_base_vertex|VERSION_3_2", Version = "3.2", EntryPoint = "glDrawRangeElementsBaseVertex")] + public static + void DrawRangeElementsBaseVertex<T5>(OpenTK.Graphics.OpenGL.BeginMode mode, UInt32 start, UInt32 end, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] T5[,] indices, Int32 basevertex) + where T5 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glDrawRangeElementsBaseVertex1((OpenTK.Graphics.OpenGL.BeginMode)mode, (UInt32)start, (UInt32)end, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)basevertex); + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: v3.2 and ARB_draw_elements_base_vertex|VERSION_3_2] + /// Render primitives from array data with a per-element offset + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_LINES_ADJACENCY, GL_LINE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY, GL_TRIANGLE_STRIP_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="start"> + /// <para> + /// Specifies the minimum array index contained in indices. + /// </para> + /// </param> + /// <param name="end"> + /// <para> + /// Specifies the maximum array index contained in indices. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="basevertex"> + /// <para> + /// Specifies a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays. + /// </para> + /// </param> + [System.CLSCompliant(false)] + [AutoGenerated(Category = "ARB_draw_elements_base_vertex|VERSION_3_2", Version = "3.2", EntryPoint = "glDrawRangeElementsBaseVertex")] + public static + void DrawRangeElementsBaseVertex<T5>(OpenTK.Graphics.OpenGL.BeginMode mode, UInt32 start, UInt32 end, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] T5[,,] indices, Int32 basevertex) + where T5 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glDrawRangeElementsBaseVertex1((OpenTK.Graphics.OpenGL.BeginMode)mode, (UInt32)start, (UInt32)end, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)basevertex); + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: v3.2 and ARB_draw_elements_base_vertex|VERSION_3_2] + /// Render primitives from array data with a per-element offset + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_LINES_ADJACENCY, GL_LINE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY, GL_TRIANGLE_STRIP_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="start"> + /// <para> + /// Specifies the minimum array index contained in indices. + /// </para> + /// </param> + /// <param name="end"> + /// <para> + /// Specifies the maximum array index contained in indices. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="basevertex"> + /// <para> + /// Specifies a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays. + /// </para> + /// </param> + [System.CLSCompliant(false)] + [AutoGenerated(Category = "ARB_draw_elements_base_vertex|VERSION_3_2", Version = "3.2", EntryPoint = "glDrawRangeElementsBaseVertex")] + public static + void DrawRangeElementsBaseVertex<T5>(OpenTK.Graphics.OpenGL.BeginMode mode, UInt32 start, UInt32 end, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] ref T5 indices, Int32 basevertex) + where T5 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glDrawRangeElementsBaseVertex1((OpenTK.Graphics.OpenGL.BeginMode)mode, (UInt32)start, (UInt32)end, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)basevertex); + indices = (T5)indices_ptr.Target; + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + /// <summary>[requires: v3.2 and ARB_draw_elements_base_vertex|VERSION_3_2] /// Render primitives from array data with a per-element offset /// </summary> @@ -144419,6 +145809,258 @@ namespace OpenTK.Graphics.OpenGL } + /// <summary>[requires: EXT_draw_instanced] + /// Draw multiple instances of a set of elements + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="primcount"> + /// <para> + /// Specifies the number of instances of the specified range of indices to be rendered. + /// </para> + /// </param> + [AutoGenerated(Category = "EXT_draw_instanced", Version = "", EntryPoint = "glDrawElementsInstancedEXT")] + public static + void DrawElementsInstanced(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 primcount) + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + Delegates.glDrawElementsInstancedEXT1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices, (Int32)primcount); + #if DEBUG + } + #endif + } + + + /// <summary>[requires: EXT_draw_instanced] + /// Draw multiple instances of a set of elements + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="primcount"> + /// <para> + /// Specifies the number of instances of the specified range of indices to be rendered. + /// </para> + /// </param> + [AutoGenerated(Category = "EXT_draw_instanced", Version = "", EntryPoint = "glDrawElementsInstancedEXT")] + public static + void DrawElementsInstanced<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] T3[] indices, Int32 primcount) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glDrawElementsInstancedEXT1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount); + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: EXT_draw_instanced] + /// Draw multiple instances of a set of elements + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="primcount"> + /// <para> + /// Specifies the number of instances of the specified range of indices to be rendered. + /// </para> + /// </param> + [AutoGenerated(Category = "EXT_draw_instanced", Version = "", EntryPoint = "glDrawElementsInstancedEXT")] + public static + void DrawElementsInstanced<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] T3[,] indices, Int32 primcount) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glDrawElementsInstancedEXT1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount); + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: EXT_draw_instanced] + /// Draw multiple instances of a set of elements + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="primcount"> + /// <para> + /// Specifies the number of instances of the specified range of indices to be rendered. + /// </para> + /// </param> + [AutoGenerated(Category = "EXT_draw_instanced", Version = "", EntryPoint = "glDrawElementsInstancedEXT")] + public static + void DrawElementsInstanced<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] T3[,,] indices, Int32 primcount) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glDrawElementsInstancedEXT1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount); + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: EXT_draw_instanced] + /// Draw multiple instances of a set of elements + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Specifies the number of elements to be rendered. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="primcount"> + /// <para> + /// Specifies the number of instances of the specified range of indices to be rendered. + /// </para> + /// </param> + [AutoGenerated(Category = "EXT_draw_instanced", Version = "", EntryPoint = "glDrawElementsInstancedEXT")] + public static + void DrawElementsInstanced<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] ref T3 indices, Int32 primcount) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glDrawElementsInstancedEXT1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount); + indices = (T3)indices_ptr.Target; + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + /// <summary>[requires: EXT_draw_instanced] /// Draw multiple instances of a set of elements /// </summary> @@ -161189,6 +162831,135 @@ namespace OpenTK.Graphics.OpenGL } + /// <summary>[requires: EXT_multi_draw_arrays] + /// Render multiple sets of primitives from array data + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="first"> + /// <para> + /// Points to an array of starting indices in the enabled arrays. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Points to an array of the number of indices to be rendered. + /// </para> + /// </param> + /// <param name="drawcount"> + /// <para> + /// Specifies the size of the first and count + /// </para> + /// </param> + [AutoGenerated(Category = "EXT_multi_draw_arrays", Version = "", EntryPoint = "glMultiDrawArraysEXT")] + public static + void MultiDrawArrays(OpenTK.Graphics.OpenGL.BeginMode mode, Int32[] first, Int32[] count, Int32 primcount) + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + unsafe + { + fixed (Int32* first_ptr = first) + fixed (Int32* count_ptr = count) + { + Delegates.glMultiDrawArraysEXT1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32*)first_ptr, (Int32*)count_ptr, (Int32)primcount); + } + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: EXT_multi_draw_arrays] + /// Render multiple sets of primitives from array data + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="first"> + /// <para> + /// Points to an array of starting indices in the enabled arrays. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Points to an array of the number of indices to be rendered. + /// </para> + /// </param> + /// <param name="drawcount"> + /// <para> + /// Specifies the size of the first and count + /// </para> + /// </param> + [AutoGenerated(Category = "EXT_multi_draw_arrays", Version = "", EntryPoint = "glMultiDrawArraysEXT")] + public static + void MultiDrawArrays(OpenTK.Graphics.OpenGL.BeginMode mode, ref Int32 first, ref Int32 count, Int32 primcount) + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + unsafe + { + fixed (Int32* first_ptr = &first) + fixed (Int32* count_ptr = &count) + { + Delegates.glMultiDrawArraysEXT1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32*)first_ptr, (Int32*)count_ptr, (Int32)primcount); + } + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: EXT_multi_draw_arrays] + /// Render multiple sets of primitives from array data + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="first"> + /// <para> + /// Points to an array of starting indices in the enabled arrays. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Points to an array of the number of indices to be rendered. + /// </para> + /// </param> + /// <param name="drawcount"> + /// <para> + /// Specifies the size of the first and count + /// </para> + /// </param> + [System.CLSCompliant(false)] + [AutoGenerated(Category = "EXT_multi_draw_arrays", Version = "", EntryPoint = "glMultiDrawArraysEXT")] + public static + unsafe void MultiDrawArrays(OpenTK.Graphics.OpenGL.BeginMode mode, Int32* first, Int32* count, Int32 primcount) + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + Delegates.glMultiDrawArraysEXT1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32*)first, (Int32*)count, (Int32)primcount); + #if DEBUG + } + #endif + } + + /// <summary>[requires: EXT_multi_draw_arrays] /// Render multiple sets of primitives from array data /// </summary> @@ -161318,6 +163089,827 @@ namespace OpenTK.Graphics.OpenGL } + /// <summary>[requires: EXT_multi_draw_arrays] + /// Render multiple sets of primitives by specifying indices of array data elements + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Points to an array of the elements counts. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="drawcount"> + /// <para> + /// Specifies the size of the count and indices arrays. + /// </para> + /// </param> + [AutoGenerated(Category = "EXT_multi_draw_arrays", Version = "", EntryPoint = "glMultiDrawElementsEXT")] + public static + void MultiDrawElements(OpenTK.Graphics.OpenGL.BeginMode mode, Int32[] count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 primcount) + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + unsafe + { + fixed (Int32* count_ptr = count) + { + Delegates.glMultiDrawElementsEXT1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32*)count_ptr, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices, (Int32)primcount); + } + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: EXT_multi_draw_arrays] + /// Render multiple sets of primitives by specifying indices of array data elements + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Points to an array of the elements counts. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="drawcount"> + /// <para> + /// Specifies the size of the count and indices arrays. + /// </para> + /// </param> + [AutoGenerated(Category = "EXT_multi_draw_arrays", Version = "", EntryPoint = "glMultiDrawElementsEXT")] + public static + void MultiDrawElements<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32[] count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] T3[] indices, Int32 primcount) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + unsafe + { + fixed (Int32* count_ptr = count) + { + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glMultiDrawElementsEXT1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32*)count_ptr, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount); + } + finally + { + indices_ptr.Free(); + } + } + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: EXT_multi_draw_arrays] + /// Render multiple sets of primitives by specifying indices of array data elements + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Points to an array of the elements counts. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="drawcount"> + /// <para> + /// Specifies the size of the count and indices arrays. + /// </para> + /// </param> + [AutoGenerated(Category = "EXT_multi_draw_arrays", Version = "", EntryPoint = "glMultiDrawElementsEXT")] + public static + void MultiDrawElements<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32[] count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] T3[,] indices, Int32 primcount) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + unsafe + { + fixed (Int32* count_ptr = count) + { + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glMultiDrawElementsEXT1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32*)count_ptr, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount); + } + finally + { + indices_ptr.Free(); + } + } + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: EXT_multi_draw_arrays] + /// Render multiple sets of primitives by specifying indices of array data elements + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Points to an array of the elements counts. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="drawcount"> + /// <para> + /// Specifies the size of the count and indices arrays. + /// </para> + /// </param> + [AutoGenerated(Category = "EXT_multi_draw_arrays", Version = "", EntryPoint = "glMultiDrawElementsEXT")] + public static + void MultiDrawElements<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32[] count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] T3[,,] indices, Int32 primcount) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + unsafe + { + fixed (Int32* count_ptr = count) + { + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glMultiDrawElementsEXT1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32*)count_ptr, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount); + } + finally + { + indices_ptr.Free(); + } + } + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: EXT_multi_draw_arrays] + /// Render multiple sets of primitives by specifying indices of array data elements + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Points to an array of the elements counts. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="drawcount"> + /// <para> + /// Specifies the size of the count and indices arrays. + /// </para> + /// </param> + [AutoGenerated(Category = "EXT_multi_draw_arrays", Version = "", EntryPoint = "glMultiDrawElementsEXT")] + public static + void MultiDrawElements<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32[] count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] ref T3 indices, Int32 primcount) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + unsafe + { + fixed (Int32* count_ptr = count) + { + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glMultiDrawElementsEXT1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32*)count_ptr, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount); + indices = (T3)indices_ptr.Target; + } + finally + { + indices_ptr.Free(); + } + } + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: EXT_multi_draw_arrays] + /// Render multiple sets of primitives by specifying indices of array data elements + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Points to an array of the elements counts. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="drawcount"> + /// <para> + /// Specifies the size of the count and indices arrays. + /// </para> + /// </param> + [AutoGenerated(Category = "EXT_multi_draw_arrays", Version = "", EntryPoint = "glMultiDrawElementsEXT")] + public static + void MultiDrawElements(OpenTK.Graphics.OpenGL.BeginMode mode, ref Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 primcount) + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + unsafe + { + fixed (Int32* count_ptr = &count) + { + Delegates.glMultiDrawElementsEXT1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32*)count_ptr, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices, (Int32)primcount); + } + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: EXT_multi_draw_arrays] + /// Render multiple sets of primitives by specifying indices of array data elements + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Points to an array of the elements counts. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="drawcount"> + /// <para> + /// Specifies the size of the count and indices arrays. + /// </para> + /// </param> + [AutoGenerated(Category = "EXT_multi_draw_arrays", Version = "", EntryPoint = "glMultiDrawElementsEXT")] + public static + void MultiDrawElements<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, ref Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] T3[] indices, Int32 primcount) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + unsafe + { + fixed (Int32* count_ptr = &count) + { + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glMultiDrawElementsEXT1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32*)count_ptr, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount); + } + finally + { + indices_ptr.Free(); + } + } + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: EXT_multi_draw_arrays] + /// Render multiple sets of primitives by specifying indices of array data elements + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Points to an array of the elements counts. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="drawcount"> + /// <para> + /// Specifies the size of the count and indices arrays. + /// </para> + /// </param> + [AutoGenerated(Category = "EXT_multi_draw_arrays", Version = "", EntryPoint = "glMultiDrawElementsEXT")] + public static + void MultiDrawElements<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, ref Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] T3[,] indices, Int32 primcount) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + unsafe + { + fixed (Int32* count_ptr = &count) + { + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glMultiDrawElementsEXT1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32*)count_ptr, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount); + } + finally + { + indices_ptr.Free(); + } + } + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: EXT_multi_draw_arrays] + /// Render multiple sets of primitives by specifying indices of array data elements + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Points to an array of the elements counts. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="drawcount"> + /// <para> + /// Specifies the size of the count and indices arrays. + /// </para> + /// </param> + [AutoGenerated(Category = "EXT_multi_draw_arrays", Version = "", EntryPoint = "glMultiDrawElementsEXT")] + public static + void MultiDrawElements<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, ref Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] T3[,,] indices, Int32 primcount) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + unsafe + { + fixed (Int32* count_ptr = &count) + { + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glMultiDrawElementsEXT1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32*)count_ptr, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount); + } + finally + { + indices_ptr.Free(); + } + } + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: EXT_multi_draw_arrays] + /// Render multiple sets of primitives by specifying indices of array data elements + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Points to an array of the elements counts. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="drawcount"> + /// <para> + /// Specifies the size of the count and indices arrays. + /// </para> + /// </param> + [AutoGenerated(Category = "EXT_multi_draw_arrays", Version = "", EntryPoint = "glMultiDrawElementsEXT")] + public static + void MultiDrawElements<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, ref Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] ref T3 indices, Int32 primcount) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + unsafe + { + fixed (Int32* count_ptr = &count) + { + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glMultiDrawElementsEXT1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32*)count_ptr, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount); + indices = (T3)indices_ptr.Target; + } + finally + { + indices_ptr.Free(); + } + } + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: EXT_multi_draw_arrays] + /// Render multiple sets of primitives by specifying indices of array data elements + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Points to an array of the elements counts. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="drawcount"> + /// <para> + /// Specifies the size of the count and indices arrays. + /// </para> + /// </param> + [System.CLSCompliant(false)] + [AutoGenerated(Category = "EXT_multi_draw_arrays", Version = "", EntryPoint = "glMultiDrawElementsEXT")] + public static + unsafe void MultiDrawElements(OpenTK.Graphics.OpenGL.BeginMode mode, Int32* count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 primcount) + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + Delegates.glMultiDrawElementsEXT1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32*)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices, (Int32)primcount); + #if DEBUG + } + #endif + } + + + /// <summary>[requires: EXT_multi_draw_arrays] + /// Render multiple sets of primitives by specifying indices of array data elements + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Points to an array of the elements counts. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="drawcount"> + /// <para> + /// Specifies the size of the count and indices arrays. + /// </para> + /// </param> + [System.CLSCompliant(false)] + [AutoGenerated(Category = "EXT_multi_draw_arrays", Version = "", EntryPoint = "glMultiDrawElementsEXT")] + public static + unsafe void MultiDrawElements<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32* count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] T3[] indices, Int32 primcount) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glMultiDrawElementsEXT1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32*)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount); + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: EXT_multi_draw_arrays] + /// Render multiple sets of primitives by specifying indices of array data elements + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Points to an array of the elements counts. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="drawcount"> + /// <para> + /// Specifies the size of the count and indices arrays. + /// </para> + /// </param> + [System.CLSCompliant(false)] + [AutoGenerated(Category = "EXT_multi_draw_arrays", Version = "", EntryPoint = "glMultiDrawElementsEXT")] + public static + unsafe void MultiDrawElements<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32* count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] T3[,] indices, Int32 primcount) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glMultiDrawElementsEXT1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32*)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount); + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: EXT_multi_draw_arrays] + /// Render multiple sets of primitives by specifying indices of array data elements + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Points to an array of the elements counts. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="drawcount"> + /// <para> + /// Specifies the size of the count and indices arrays. + /// </para> + /// </param> + [System.CLSCompliant(false)] + [AutoGenerated(Category = "EXT_multi_draw_arrays", Version = "", EntryPoint = "glMultiDrawElementsEXT")] + public static + unsafe void MultiDrawElements<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32* count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] T3[,,] indices, Int32 primcount) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glMultiDrawElementsEXT1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32*)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount); + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + + /// <summary>[requires: EXT_multi_draw_arrays] + /// Render multiple sets of primitives by specifying indices of array data elements + /// </summary> + /// <param name="mode"> + /// <para> + /// Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. + /// </para> + /// </param> + /// <param name="count"> + /// <para> + /// Points to an array of the elements counts. + /// </para> + /// </param> + /// <param name="type"> + /// <para> + /// Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. + /// </para> + /// </param> + /// <param name="indices"> + /// <para> + /// Specifies a pointer to the location where the indices are stored. + /// </para> + /// </param> + /// <param name="drawcount"> + /// <para> + /// Specifies the size of the count and indices arrays. + /// </para> + /// </param> + [System.CLSCompliant(false)] + [AutoGenerated(Category = "EXT_multi_draw_arrays", Version = "", EntryPoint = "glMultiDrawElementsEXT")] + public static + unsafe void MultiDrawElements<T3>(OpenTK.Graphics.OpenGL.BeginMode mode, Int32* count, OpenTK.Graphics.OpenGL.DrawElementsType type, [InAttribute, OutAttribute] ref T3 indices, Int32 primcount) + where T3 : struct + { + #if DEBUG + using (new ErrorHelper(GraphicsContext.CurrentContext)) + { + #endif + GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned); + try + { + Delegates.glMultiDrawElementsEXT1((OpenTK.Graphics.OpenGL.BeginMode)mode, (Int32*)count, (OpenTK.Graphics.OpenGL.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount); + indices = (T3)indices_ptr.Target; + } + finally + { + indices_ptr.Free(); + } + #if DEBUG + } + #endif + } + + /// <summary>[requires: EXT_multi_draw_arrays] /// Render multiple sets of primitives by specifying indices of array data elements /// </summary> diff --git a/Source/OpenTK/Graphics/OpenGL/GLCore.cs b/Source/OpenTK/Graphics/OpenGL/GLCore.cs index ffb4a5fd..c0c00c09 100644 --- a/Source/OpenTK/Graphics/OpenGL/GLCore.cs +++ b/Source/OpenTK/Graphics/OpenGL/GLCore.cs @@ -1364,7 +1364,7 @@ namespace OpenTK.Graphics.OpenGL internal extern static void DrawElementsBaseVertex(OpenTK.Graphics.OpenGL.PrimitiveType mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 basevertex); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDrawElementsBaseVertex", ExactSpelling = true)] - internal extern static void DrawElementsBaseVertex1(OpenTK.Graphics.OpenGL.PrimitiveType mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 basevertex); + internal extern static void DrawElementsBaseVertex1(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 basevertex); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDrawElementsIndirect", ExactSpelling = true)] internal extern static void DrawElementsIndirect(OpenTK.Graphics.OpenGL.PrimitiveType mode, OpenTK.Graphics.OpenGL.All type, IntPtr indirect); @@ -1378,6 +1378,9 @@ namespace OpenTK.Graphics.OpenGL [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDrawElementsInstancedARB", ExactSpelling = true)] internal extern static void DrawElementsInstancedARB(OpenTK.Graphics.OpenGL.PrimitiveType mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 primcount); [System.Security.SuppressUnmanagedCodeSecurity()] + [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDrawElementsInstancedARB", ExactSpelling = true)] + internal extern static void DrawElementsInstancedARB1(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 primcount); + [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDrawElementsInstancedBaseInstance", ExactSpelling = true)] internal extern static void DrawElementsInstancedBaseInstance(OpenTK.Graphics.OpenGL.PrimitiveType mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 instancecount, UInt32 baseinstance); [System.Security.SuppressUnmanagedCodeSecurity()] @@ -1385,7 +1388,7 @@ namespace OpenTK.Graphics.OpenGL internal extern static void DrawElementsInstancedBaseVertex(OpenTK.Graphics.OpenGL.PrimitiveType mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 instancecount, Int32 basevertex); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDrawElementsInstancedBaseVertex", ExactSpelling = true)] - internal extern static void DrawElementsInstancedBaseVertex1(OpenTK.Graphics.OpenGL.PrimitiveType mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 instancecount, Int32 basevertex); + internal extern static void DrawElementsInstancedBaseVertex1(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 instancecount, Int32 basevertex); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDrawElementsInstancedBaseVertexBaseInstance", ExactSpelling = true)] internal extern static void DrawElementsInstancedBaseVertexBaseInstance(OpenTK.Graphics.OpenGL.PrimitiveType mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 instancecount, Int32 basevertex, UInt32 baseinstance); @@ -1393,6 +1396,9 @@ namespace OpenTK.Graphics.OpenGL [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDrawElementsInstancedEXT", ExactSpelling = true)] internal extern static void DrawElementsInstancedEXT(OpenTK.Graphics.OpenGL.PrimitiveType mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 primcount); [System.Security.SuppressUnmanagedCodeSecurity()] + [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDrawElementsInstancedEXT", ExactSpelling = true)] + internal extern static void DrawElementsInstancedEXT1(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 primcount); + [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDrawMeshArraysSUN", ExactSpelling = true)] internal extern static void DrawMeshArraysSUN(OpenTK.Graphics.OpenGL.PrimitiveType mode, Int32 first, Int32 count, Int32 width); [System.Security.SuppressUnmanagedCodeSecurity()] @@ -1415,7 +1421,7 @@ namespace OpenTK.Graphics.OpenGL internal extern static void DrawRangeElementsBaseVertex(OpenTK.Graphics.OpenGL.PrimitiveType mode, UInt32 start, UInt32 end, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 basevertex); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDrawRangeElementsBaseVertex", ExactSpelling = true)] - internal extern static void DrawRangeElementsBaseVertex1(OpenTK.Graphics.OpenGL.PrimitiveType mode, UInt32 start, UInt32 end, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 basevertex); + internal extern static void DrawRangeElementsBaseVertex1(OpenTK.Graphics.OpenGL.BeginMode mode, UInt32 start, UInt32 end, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 basevertex); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDrawRangeElementsEXT", ExactSpelling = true)] internal extern static void DrawRangeElementsEXT(OpenTK.Graphics.OpenGL.PrimitiveType mode, UInt32 start, UInt32 end, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices); @@ -3745,6 +3751,9 @@ namespace OpenTK.Graphics.OpenGL [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glMultiDrawArraysEXT", ExactSpelling = true)] internal extern static unsafe void MultiDrawArraysEXT(OpenTK.Graphics.OpenGL.PrimitiveType mode, Int32* first, Int32* count, Int32 primcount); [System.Security.SuppressUnmanagedCodeSecurity()] + [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glMultiDrawArraysEXT", ExactSpelling = true)] + internal extern static unsafe void MultiDrawArraysEXT1(OpenTK.Graphics.OpenGL.BeginMode mode, Int32* first, Int32* count, Int32 primcount); + [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glMultiDrawArraysIndirect", ExactSpelling = true)] internal extern static void MultiDrawArraysIndirect(OpenTK.Graphics.OpenGL.PrimitiveType mode, IntPtr indirect, Int32 drawcount, Int32 stride); [System.Security.SuppressUnmanagedCodeSecurity()] @@ -3772,6 +3781,9 @@ namespace OpenTK.Graphics.OpenGL [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glMultiDrawElementsEXT", ExactSpelling = true)] internal extern static unsafe void MultiDrawElementsEXT(OpenTK.Graphics.OpenGL.PrimitiveType mode, Int32* count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 primcount); [System.Security.SuppressUnmanagedCodeSecurity()] + [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glMultiDrawElementsEXT", ExactSpelling = true)] + internal extern static unsafe void MultiDrawElementsEXT1(OpenTK.Graphics.OpenGL.BeginMode mode, Int32* count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 primcount); + [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glMultiDrawElementsIndirect", ExactSpelling = true)] internal extern static void MultiDrawElementsIndirect(OpenTK.Graphics.OpenGL.All mode, OpenTK.Graphics.OpenGL.All type, IntPtr indirect, Int32 drawcount, Int32 stride); [System.Security.SuppressUnmanagedCodeSecurity()] diff --git a/Source/OpenTK/Graphics/OpenGL/GLDelegates.cs b/Source/OpenTK/Graphics/OpenGL/GLDelegates.cs index e836262e..57dea1ff 100644 --- a/Source/OpenTK/Graphics/OpenGL/GLDelegates.cs +++ b/Source/OpenTK/Graphics/OpenGL/GLDelegates.cs @@ -1362,7 +1362,7 @@ namespace OpenTK.Graphics.OpenGL internal delegate void DrawElementsBaseVertex(OpenTK.Graphics.OpenGL.PrimitiveType mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 basevertex); internal static DrawElementsBaseVertex glDrawElementsBaseVertex; [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate void DrawElementsBaseVertex1(OpenTK.Graphics.OpenGL.PrimitiveType mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 basevertex); + internal delegate void DrawElementsBaseVertex1(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 basevertex); internal static DrawElementsBaseVertex1 glDrawElementsBaseVertex1; [System.Security.SuppressUnmanagedCodeSecurity()] internal delegate void DrawElementsIndirect(OpenTK.Graphics.OpenGL.PrimitiveType mode, OpenTK.Graphics.OpenGL.All type, IntPtr indirect); @@ -1377,13 +1377,16 @@ namespace OpenTK.Graphics.OpenGL internal delegate void DrawElementsInstancedARB(OpenTK.Graphics.OpenGL.PrimitiveType mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 primcount); internal static DrawElementsInstancedARB glDrawElementsInstancedARB; [System.Security.SuppressUnmanagedCodeSecurity()] + internal delegate void DrawElementsInstancedARB1(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 primcount); + internal static DrawElementsInstancedARB1 glDrawElementsInstancedARB1; + [System.Security.SuppressUnmanagedCodeSecurity()] internal delegate void DrawElementsInstancedBaseInstance(OpenTK.Graphics.OpenGL.PrimitiveType mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 instancecount, UInt32 baseinstance); internal static DrawElementsInstancedBaseInstance glDrawElementsInstancedBaseInstance; [System.Security.SuppressUnmanagedCodeSecurity()] internal delegate void DrawElementsInstancedBaseVertex(OpenTK.Graphics.OpenGL.PrimitiveType mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 instancecount, Int32 basevertex); internal static DrawElementsInstancedBaseVertex glDrawElementsInstancedBaseVertex; [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate void DrawElementsInstancedBaseVertex1(OpenTK.Graphics.OpenGL.PrimitiveType mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 instancecount, Int32 basevertex); + internal delegate void DrawElementsInstancedBaseVertex1(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 instancecount, Int32 basevertex); internal static DrawElementsInstancedBaseVertex1 glDrawElementsInstancedBaseVertex1; [System.Security.SuppressUnmanagedCodeSecurity()] internal delegate void DrawElementsInstancedBaseVertexBaseInstance(OpenTK.Graphics.OpenGL.PrimitiveType mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 instancecount, Int32 basevertex, UInt32 baseinstance); @@ -1392,6 +1395,9 @@ namespace OpenTK.Graphics.OpenGL internal delegate void DrawElementsInstancedEXT(OpenTK.Graphics.OpenGL.PrimitiveType mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 primcount); internal static DrawElementsInstancedEXT glDrawElementsInstancedEXT; [System.Security.SuppressUnmanagedCodeSecurity()] + internal delegate void DrawElementsInstancedEXT1(OpenTK.Graphics.OpenGL.BeginMode mode, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 primcount); + internal static DrawElementsInstancedEXT1 glDrawElementsInstancedEXT1; + [System.Security.SuppressUnmanagedCodeSecurity()] internal delegate void DrawMeshArraysSUN(OpenTK.Graphics.OpenGL.PrimitiveType mode, Int32 first, Int32 count, Int32 width); internal static DrawMeshArraysSUN glDrawMeshArraysSUN; [System.Security.SuppressUnmanagedCodeSecurity()] @@ -1413,7 +1419,7 @@ namespace OpenTK.Graphics.OpenGL internal delegate void DrawRangeElementsBaseVertex(OpenTK.Graphics.OpenGL.PrimitiveType mode, UInt32 start, UInt32 end, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 basevertex); internal static DrawRangeElementsBaseVertex glDrawRangeElementsBaseVertex; [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate void DrawRangeElementsBaseVertex1(OpenTK.Graphics.OpenGL.PrimitiveType mode, UInt32 start, UInt32 end, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 basevertex); + internal delegate void DrawRangeElementsBaseVertex1(OpenTK.Graphics.OpenGL.BeginMode mode, UInt32 start, UInt32 end, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 basevertex); internal static DrawRangeElementsBaseVertex1 glDrawRangeElementsBaseVertex1; [System.Security.SuppressUnmanagedCodeSecurity()] internal delegate void DrawRangeElementsEXT(OpenTK.Graphics.OpenGL.PrimitiveType mode, UInt32 start, UInt32 end, Int32 count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices); @@ -3744,6 +3750,9 @@ namespace OpenTK.Graphics.OpenGL internal unsafe delegate void MultiDrawArraysEXT(OpenTK.Graphics.OpenGL.PrimitiveType mode, Int32* first, Int32* count, Int32 primcount); internal unsafe static MultiDrawArraysEXT glMultiDrawArraysEXT; [System.Security.SuppressUnmanagedCodeSecurity()] + internal unsafe delegate void MultiDrawArraysEXT1(OpenTK.Graphics.OpenGL.BeginMode mode, Int32* first, Int32* count, Int32 primcount); + internal unsafe static MultiDrawArraysEXT1 glMultiDrawArraysEXT1; + [System.Security.SuppressUnmanagedCodeSecurity()] internal delegate void MultiDrawArraysIndirect(OpenTK.Graphics.OpenGL.PrimitiveType mode, IntPtr indirect, Int32 drawcount, Int32 stride); internal static MultiDrawArraysIndirect glMultiDrawArraysIndirect; [System.Security.SuppressUnmanagedCodeSecurity()] @@ -3771,6 +3780,9 @@ namespace OpenTK.Graphics.OpenGL internal unsafe delegate void MultiDrawElementsEXT(OpenTK.Graphics.OpenGL.PrimitiveType mode, Int32* count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 primcount); internal unsafe static MultiDrawElementsEXT glMultiDrawElementsEXT; [System.Security.SuppressUnmanagedCodeSecurity()] + internal unsafe delegate void MultiDrawElementsEXT1(OpenTK.Graphics.OpenGL.BeginMode mode, Int32* count, OpenTK.Graphics.OpenGL.DrawElementsType type, IntPtr indices, Int32 primcount); + internal unsafe static MultiDrawElementsEXT1 glMultiDrawElementsEXT1; + [System.Security.SuppressUnmanagedCodeSecurity()] internal delegate void MultiDrawElementsIndirect(OpenTK.Graphics.OpenGL.All mode, OpenTK.Graphics.OpenGL.All type, IntPtr indirect, Int32 drawcount, Int32 stride); internal static MultiDrawElementsIndirect glMultiDrawElementsIndirect; [System.Security.SuppressUnmanagedCodeSecurity()] diff --git a/Source/OpenTK/Graphics/OpenGL/GLEnums.cs b/Source/OpenTK/Graphics/OpenGL/GLEnums.cs index 2f3d5ae5..684d6fc8 100644 --- a/Source/OpenTK/Graphics/OpenGL/GLEnums.cs +++ b/Source/OpenTK/Graphics/OpenGL/GLEnums.cs @@ -27958,7 +27958,7 @@ namespace OpenTK.Graphics.OpenGL } /// <summary> - /// Used in GL.Begin, GL.DrawArrays and 7 other functions + /// Used in GL.Arb.DrawElementsInstanced, GL.Begin and 14 other functions /// </summary> public enum BeginMode : int {