ES 3.0 strong enums for DrawArrays*() and Draw*Elements*()

The strongly-typed enums include core and extension varieties.
This commit is contained in:
Stefanos A 2013-11-07 10:17:33 +01:00
parent 0002b2e23e
commit 2d1df46d98
5 changed files with 46 additions and 26 deletions

View file

@ -5105,6 +5105,26 @@
<param name="type"><type>VertexAttribIntegerType</type></param>
</function>
<!-- Drawing [2.8.3] -->
<function name="DrawArrays">
<param name="mode"><type>PrimitiveType</type></param>
</function>
<function name="DrawArraysInstanced">
<param name="mode"><type>PrimitiveType</type></param>
</function>
<function name="DrawElements">
<param name="mode"><type>PrimitiveType</type></param>
<param name="type"><type>DrawElementsType</type></param>
</function>
<function name="DrawElementsInstanced">
<param name="mode"><type>PrimitiveType</type></param>
<param name="type"><type>DrawElementsType</type></param>
</function>
<function name="DrawRangeElements">
<param name="mode"><type>PrimitiveType</type></param>
<param name="type"><type>DrawElementsType</type></param>
</function>
<!-- Program Objects [2.11.3-4] -->
<function name="ProgramParameter">
<param name="pname"><type>ProgramParameterName</type></param>

View file

@ -1348,13 +1348,13 @@ namespace OpenTK.Graphics.ES30
/// </param>
[AutoGenerated(Category = "ANGLE_instanced_arrays", Version = "", EntryPoint = "glDrawElementsInstancedANGLE")]
public static
void DrawElementsInstanced(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.All type, IntPtr indices, Int32 primcount)
void DrawElementsInstanced(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, IntPtr indices, Int32 primcount)
{
#if DEBUG
using (new ErrorHelper(GraphicsContext.CurrentContext))
{
#endif
Delegates.glDrawElementsInstancedANGLE((OpenTK.Graphics.ES30.PrimitiveType)mode, (Int32)count, (OpenTK.Graphics.ES30.All)type, (IntPtr)indices, (Int32)primcount);
Delegates.glDrawElementsInstancedANGLE((OpenTK.Graphics.ES30.PrimitiveType)mode, (Int32)count, (OpenTK.Graphics.ES30.DrawElementsType)type, (IntPtr)indices, (Int32)primcount);
#if DEBUG
}
#endif
@ -1391,7 +1391,7 @@ namespace OpenTK.Graphics.ES30
/// </param>
[AutoGenerated(Category = "ANGLE_instanced_arrays", Version = "", EntryPoint = "glDrawElementsInstancedANGLE")]
public static
void DrawElementsInstanced<T3>(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.All type, [InAttribute, OutAttribute] T3[] indices, Int32 primcount)
void DrawElementsInstanced<T3>(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, [InAttribute, OutAttribute] T3[] indices, Int32 primcount)
where T3 : struct
{
#if DEBUG
@ -1401,7 +1401,7 @@ namespace OpenTK.Graphics.ES30
GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned);
try
{
Delegates.glDrawElementsInstancedANGLE((OpenTK.Graphics.ES30.PrimitiveType)mode, (Int32)count, (OpenTK.Graphics.ES30.All)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount);
Delegates.glDrawElementsInstancedANGLE((OpenTK.Graphics.ES30.PrimitiveType)mode, (Int32)count, (OpenTK.Graphics.ES30.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount);
}
finally
{
@ -1443,7 +1443,7 @@ namespace OpenTK.Graphics.ES30
/// </param>
[AutoGenerated(Category = "ANGLE_instanced_arrays", Version = "", EntryPoint = "glDrawElementsInstancedANGLE")]
public static
void DrawElementsInstanced<T3>(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.All type, [InAttribute, OutAttribute] T3[,] indices, Int32 primcount)
void DrawElementsInstanced<T3>(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, [InAttribute, OutAttribute] T3[,] indices, Int32 primcount)
where T3 : struct
{
#if DEBUG
@ -1453,7 +1453,7 @@ namespace OpenTK.Graphics.ES30
GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned);
try
{
Delegates.glDrawElementsInstancedANGLE((OpenTK.Graphics.ES30.PrimitiveType)mode, (Int32)count, (OpenTK.Graphics.ES30.All)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount);
Delegates.glDrawElementsInstancedANGLE((OpenTK.Graphics.ES30.PrimitiveType)mode, (Int32)count, (OpenTK.Graphics.ES30.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount);
}
finally
{
@ -1495,7 +1495,7 @@ namespace OpenTK.Graphics.ES30
/// </param>
[AutoGenerated(Category = "ANGLE_instanced_arrays", Version = "", EntryPoint = "glDrawElementsInstancedANGLE")]
public static
void DrawElementsInstanced<T3>(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.All type, [InAttribute, OutAttribute] T3[,,] indices, Int32 primcount)
void DrawElementsInstanced<T3>(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, [InAttribute, OutAttribute] T3[,,] indices, Int32 primcount)
where T3 : struct
{
#if DEBUG
@ -1505,7 +1505,7 @@ namespace OpenTK.Graphics.ES30
GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned);
try
{
Delegates.glDrawElementsInstancedANGLE((OpenTK.Graphics.ES30.PrimitiveType)mode, (Int32)count, (OpenTK.Graphics.ES30.All)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount);
Delegates.glDrawElementsInstancedANGLE((OpenTK.Graphics.ES30.PrimitiveType)mode, (Int32)count, (OpenTK.Graphics.ES30.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount);
}
finally
{
@ -1547,7 +1547,7 @@ namespace OpenTK.Graphics.ES30
/// </param>
[AutoGenerated(Category = "ANGLE_instanced_arrays", Version = "", EntryPoint = "glDrawElementsInstancedANGLE")]
public static
void DrawElementsInstanced<T3>(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.All type, [InAttribute, OutAttribute] ref T3 indices, Int32 primcount)
void DrawElementsInstanced<T3>(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, [InAttribute, OutAttribute] ref T3 indices, Int32 primcount)
where T3 : struct
{
#if DEBUG
@ -1557,7 +1557,7 @@ namespace OpenTK.Graphics.ES30
GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned);
try
{
Delegates.glDrawElementsInstancedANGLE((OpenTK.Graphics.ES30.PrimitiveType)mode, (Int32)count, (OpenTK.Graphics.ES30.All)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount);
Delegates.glDrawElementsInstancedANGLE((OpenTK.Graphics.ES30.PrimitiveType)mode, (Int32)count, (OpenTK.Graphics.ES30.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount);
indices = (T3)indices_ptr.Target;
}
finally
@ -48378,13 +48378,13 @@ namespace OpenTK.Graphics.ES30
/// </param>
[AutoGenerated(Category = "NV_draw_instanced", Version = "", EntryPoint = "glDrawElementsInstancedNV")]
public static
void DrawElementsInstanced(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.All type, IntPtr indices, Int32 primcount)
void DrawElementsInstanced(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, IntPtr indices, Int32 primcount)
{
#if DEBUG
using (new ErrorHelper(GraphicsContext.CurrentContext))
{
#endif
Delegates.glDrawElementsInstancedNV((OpenTK.Graphics.ES30.PrimitiveType)mode, (Int32)count, (OpenTK.Graphics.ES30.All)type, (IntPtr)indices, (Int32)primcount);
Delegates.glDrawElementsInstancedNV((OpenTK.Graphics.ES30.PrimitiveType)mode, (Int32)count, (OpenTK.Graphics.ES30.DrawElementsType)type, (IntPtr)indices, (Int32)primcount);
#if DEBUG
}
#endif
@ -48421,7 +48421,7 @@ namespace OpenTK.Graphics.ES30
/// </param>
[AutoGenerated(Category = "NV_draw_instanced", Version = "", EntryPoint = "glDrawElementsInstancedNV")]
public static
void DrawElementsInstanced<T3>(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.All type, [InAttribute, OutAttribute] T3[] indices, Int32 primcount)
void DrawElementsInstanced<T3>(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, [InAttribute, OutAttribute] T3[] indices, Int32 primcount)
where T3 : struct
{
#if DEBUG
@ -48431,7 +48431,7 @@ namespace OpenTK.Graphics.ES30
GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned);
try
{
Delegates.glDrawElementsInstancedNV((OpenTK.Graphics.ES30.PrimitiveType)mode, (Int32)count, (OpenTK.Graphics.ES30.All)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount);
Delegates.glDrawElementsInstancedNV((OpenTK.Graphics.ES30.PrimitiveType)mode, (Int32)count, (OpenTK.Graphics.ES30.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount);
}
finally
{
@ -48473,7 +48473,7 @@ namespace OpenTK.Graphics.ES30
/// </param>
[AutoGenerated(Category = "NV_draw_instanced", Version = "", EntryPoint = "glDrawElementsInstancedNV")]
public static
void DrawElementsInstanced<T3>(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.All type, [InAttribute, OutAttribute] T3[,] indices, Int32 primcount)
void DrawElementsInstanced<T3>(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, [InAttribute, OutAttribute] T3[,] indices, Int32 primcount)
where T3 : struct
{
#if DEBUG
@ -48483,7 +48483,7 @@ namespace OpenTK.Graphics.ES30
GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned);
try
{
Delegates.glDrawElementsInstancedNV((OpenTK.Graphics.ES30.PrimitiveType)mode, (Int32)count, (OpenTK.Graphics.ES30.All)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount);
Delegates.glDrawElementsInstancedNV((OpenTK.Graphics.ES30.PrimitiveType)mode, (Int32)count, (OpenTK.Graphics.ES30.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount);
}
finally
{
@ -48525,7 +48525,7 @@ namespace OpenTK.Graphics.ES30
/// </param>
[AutoGenerated(Category = "NV_draw_instanced", Version = "", EntryPoint = "glDrawElementsInstancedNV")]
public static
void DrawElementsInstanced<T3>(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.All type, [InAttribute, OutAttribute] T3[,,] indices, Int32 primcount)
void DrawElementsInstanced<T3>(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, [InAttribute, OutAttribute] T3[,,] indices, Int32 primcount)
where T3 : struct
{
#if DEBUG
@ -48535,7 +48535,7 @@ namespace OpenTK.Graphics.ES30
GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned);
try
{
Delegates.glDrawElementsInstancedNV((OpenTK.Graphics.ES30.PrimitiveType)mode, (Int32)count, (OpenTK.Graphics.ES30.All)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount);
Delegates.glDrawElementsInstancedNV((OpenTK.Graphics.ES30.PrimitiveType)mode, (Int32)count, (OpenTK.Graphics.ES30.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount);
}
finally
{
@ -48577,7 +48577,7 @@ namespace OpenTK.Graphics.ES30
/// </param>
[AutoGenerated(Category = "NV_draw_instanced", Version = "", EntryPoint = "glDrawElementsInstancedNV")]
public static
void DrawElementsInstanced<T3>(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.All type, [InAttribute, OutAttribute] ref T3 indices, Int32 primcount)
void DrawElementsInstanced<T3>(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, [InAttribute, OutAttribute] ref T3 indices, Int32 primcount)
where T3 : struct
{
#if DEBUG
@ -48587,7 +48587,7 @@ namespace OpenTK.Graphics.ES30
GCHandle indices_ptr = GCHandle.Alloc(indices, GCHandleType.Pinned);
try
{
Delegates.glDrawElementsInstancedNV((OpenTK.Graphics.ES30.PrimitiveType)mode, (Int32)count, (OpenTK.Graphics.ES30.All)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount);
Delegates.glDrawElementsInstancedNV((OpenTK.Graphics.ES30.PrimitiveType)mode, (Int32)count, (OpenTK.Graphics.ES30.DrawElementsType)type, (IntPtr)indices_ptr.AddrOfPinnedObject(), (Int32)primcount);
indices = (T3)indices_ptr.Target;
}
finally

View file

@ -368,13 +368,13 @@ namespace OpenTK.Graphics.ES30
internal extern static void DrawElementsInstanced(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, IntPtr indices, Int32 instancecount);
[System.Security.SuppressUnmanagedCodeSecurity()]
[System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDrawElementsInstancedANGLE", ExactSpelling = true)]
internal extern static void DrawElementsInstancedANGLE(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.All type, IntPtr indices, Int32 primcount);
internal extern static void DrawElementsInstancedANGLE(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, IntPtr indices, Int32 primcount);
[System.Security.SuppressUnmanagedCodeSecurity()]
[System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDrawElementsInstancedEXT", ExactSpelling = true)]
internal extern static void DrawElementsInstancedEXT(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, IntPtr indices, Int32 primcount);
[System.Security.SuppressUnmanagedCodeSecurity()]
[System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDrawElementsInstancedNV", ExactSpelling = true)]
internal extern static void DrawElementsInstancedNV(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.All type, IntPtr indices, Int32 primcount);
internal extern static void DrawElementsInstancedNV(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, IntPtr indices, Int32 primcount);
[System.Security.SuppressUnmanagedCodeSecurity()]
[System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glDrawRangeElements", ExactSpelling = true)]
internal extern static void DrawRangeElements(OpenTK.Graphics.ES30.PrimitiveType mode, UInt32 start, UInt32 end, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, IntPtr indices);

View file

@ -366,13 +366,13 @@ namespace OpenTK.Graphics.ES30
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()]
internal delegate void DrawElementsInstancedANGLE(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.All type, IntPtr indices, Int32 primcount);
internal delegate void DrawElementsInstancedANGLE(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, IntPtr indices, Int32 primcount);
internal static DrawElementsInstancedANGLE glDrawElementsInstancedANGLE;
[System.Security.SuppressUnmanagedCodeSecurity()]
internal delegate void DrawElementsInstancedEXT(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, IntPtr indices, Int32 primcount);
internal static DrawElementsInstancedEXT glDrawElementsInstancedEXT;
[System.Security.SuppressUnmanagedCodeSecurity()]
internal delegate void DrawElementsInstancedNV(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.All type, IntPtr indices, Int32 primcount);
internal delegate void DrawElementsInstancedNV(OpenTK.Graphics.ES30.PrimitiveType mode, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, IntPtr indices, Int32 primcount);
internal static DrawElementsInstancedNV glDrawElementsInstancedNV;
[System.Security.SuppressUnmanagedCodeSecurity()]
internal delegate void DrawRangeElements(OpenTK.Graphics.ES30.PrimitiveType mode, UInt32 start, UInt32 end, Int32 count, OpenTK.Graphics.ES30.DrawElementsType type, IntPtr indices);

View file

@ -385,7 +385,7 @@ namespace OpenTK.Graphics.ES30
}
/// <summary>
/// Used in GL.Amd.GetPerfMonitorCounterData, GL.Amd.GetPerfMonitorCounterInfo and 49 other functions
/// Used in GL.Amd.GetPerfMonitorCounterData, GL.Amd.GetPerfMonitorCounterInfo and 47 other functions
/// </summary>
public enum All : int
{
@ -10586,7 +10586,7 @@ namespace OpenTK.Graphics.ES30
}
/// <summary>
/// Used in GL.DrawElements, GL.DrawElementsInstanced and 3 other functions
/// Used in GL.Angle.DrawElementsInstanced, GL.DrawElements and 5 other functions
/// </summary>
public enum DrawElementsType : int
{