예제 #1
0
 /// <summary>
 /// Renders multiple instances from array via indices with a per-element offset and an offset to all instanced vertex attributes.
 /// </summary>
 /// <param name="mode">A <see cref="glDrawMode"/> specifying the type of primitive to be rendered.</param>
 /// <param name="count">Number of indices.</param>
 /// <param name="type">A <see cref="glDrawElementsType"/> specifying the data type of the indices.</param>
 /// <param name="offset">The offset into the array bound to <see cref="glBufferTarget.ELEMENT_ARRAY_BUFFER"/>.</param>
 /// <param name="instancecount">Number of instances to be rendered.</param>
 /// <param name="basevertex">The per-element offset.</param>
 /// <param name="baseinstance">Offset to all instanced vertex attributes.</param>
 public static void DrawElementsInstancedBaseVertexBaseInstance(glDrawMode mode, int count, glDrawElementsType type, long offset, int instancecount, int basevertex, uint baseinstance)
 {
     if (IntPtr.Size == 4 && ((long)offset >> 32) != 0)
     {
         throw new ArgumentOutOfRangeException("offset", PlatformErrorString);
     }
     _DrawElementsInstancedBaseVertexBaseInstance(mode, count, type, (IntPtr)offset, instancecount, basevertex, baseinstance);
 }
예제 #2
0
 /// <summary>
 /// Render primitives from array via a range of indices.
 /// </summary>
 /// <param name="mode">A <see cref="glDrawMode"/> specifying the type of primitive to render.</param>
 /// <param name="start">Start of the range.</param>
 /// <param name="end">End of the range.</param>
 /// <param name="count">Number of indices.</param>
 /// <param name="type">A <see cref="glDrawElementsType"/> specifying the data type of the indices.</param>
 /// <param name="offset">The offset into the array bound to <see cref="glBufferTarget.ELEMENT_ARRAY_BUFFER"/>.</param>
 public static void DrawRangeElements(glDrawMode mode, uint start, uint end, int count, glDrawElementsType type, long offset)
 {
     if (IntPtr.Size == 4 && ((long)offset >> 32) != 0)
     {
         throw new ArgumentOutOfRangeException("offset", PlatformErrorString);
     }
     _DrawRangeElements(mode, start, end, count, type, (IntPtr)offset);
 }
예제 #3
0
 /// <summary>
 /// Renders primitives from array via indices with a per-element offset.
 /// </summary>
 /// <param name="mode">A <see cref="glDrawMode"/> specifying the type of primitive to render.</param>
 /// <param name="count">Numbers of indices.</param>
 /// <param name="type">A <see cref="glDrawElementsType"/> specifying the data type of the indices.</param>
 /// <param name="offsets">The offsets into the array bound to <see cref="glBufferTarget.ELEMENT_ARRAY_BUFFER"/>.</param>
 /// <param name="drawcount">Number of draws (Length of <paramref name="count"/> and <paramref name="offsets"/>.</param>
 /// <param name="basevertex">The per-element offset.</param>
 public static void MultiDrawElementsBaseVertex(glDrawMode mode, int[] count, glDrawElementsType type, int[] offsets, int drawcount, int[] basevertex)
 {
     IntPtr[] iOffsets = new IntPtr[drawcount];
     for (int i = 0; i < drawcount; i++)
     {
         iOffsets[i] = (IntPtr)offsets[i];
     }
     _MultiDrawElementsBaseVertex(mode, count, type, iOffsets, drawcount, basevertex);
 }
예제 #4
0
 /// <summary>
 /// Renders primitives from array via indices with a per-element offset.
 /// </summary>
 /// <param name="mode">A <see cref="glDrawMode"/> specifying the type of primitive to render.</param>
 /// <param name="count">Numbers of indices.</param>
 /// <param name="type">A <see cref="glDrawElementsType"/> specifying the data type of the indices.</param>
 /// <param name="offsets">The offsets into the array bound to <see cref="glBufferTarget.ELEMENT_ARRAY_BUFFER"/>.</param>
 /// <param name="drawcount">Number of draws (Length of <paramref name="count"/> and <paramref name="offsets"/>.</param>
 /// <param name="basevertex">The per-element offset.</param>
 public static void MultiDrawElementsBaseVertex(glDrawMode mode, int[] count, glDrawElementsType type, long[] offsets, int drawcount, int[] basevertex)
 {
     IntPtr[] iOffsets = new IntPtr[drawcount];
     for (int i = 0; i < drawcount; i++)
     {
         if (IntPtr.Size == 4 && ((long)offsets[i] >> 32) != 0)
         {
             throw new ArgumentOutOfRangeException("offsets", PlatformArrayErrorString);
         }
         iOffsets[i] = (IntPtr)offsets[i];
     }
     _MultiDrawElementsBaseVertex(mode, count, type, iOffsets, drawcount, basevertex);
 }
예제 #5
0
 /// <summary>
 /// Render primitives from array via a range of indices.
 /// </summary>
 /// <param name="mode">A <see cref="glDrawMode"/> specifying the type of primitive to render.</param>
 /// <param name="start">Start of the range.</param>
 /// <param name="end">End of the range.</param>
 /// <param name="count">Number of indices.</param>
 /// <param name="type">A <see cref="glDrawElementsType"/> specifying the data type of the indices.</param>
 /// <param name="offset">The offset into the array bound to <see cref="glBufferTarget.ELEMENT_ARRAY_BUFFER"/>.</param>
 public static void DrawRangeElements(glDrawMode mode, uint start, uint end, int count, glDrawElementsType type, int offset)
 {
     _DrawRangeElements(mode, start, end, count, type, (IntPtr)offset);
 }
예제 #6
0
 /// <summary>
 /// Renders multiple instances from array via indices with a per-element offset and an offset to all instanced vertex attributes.
 /// </summary>
 /// <param name="mode">A <see cref="glDrawMode"/> specifying the type of primitive to be rendered.</param>
 /// <param name="count">Number of indices.</param>
 /// <param name="type">A <see cref="glDrawElementsType"/> specifying the data type of the indices.</param>
 /// <param name="offset">The offset into the array bound to <see cref="glBufferTarget.ELEMENT_ARRAY_BUFFER"/>.</param>
 /// <param name="instancecount">Number of instances to be rendered.</param>
 /// <param name="basevertex">The per-element offset.</param>
 /// <param name="baseinstance">Offset to all instanced vertex attributes.</param>
 public static void DrawElementsInstancedBaseVertexBaseInstance(glDrawMode mode, int count, glDrawElementsType type, int offset, int instancecount, int basevertex, uint baseinstance)
 {
     _DrawElementsInstancedBaseVertexBaseInstance(mode, count, type, (IntPtr)offset, instancecount, basevertex, baseinstance);
 }
예제 #7
0
 /// <summary>
 /// Renders multiple instances from array via indices.
 /// </summary>
 /// <param name="mode">A <see cref="glDrawMode"/> specifying the type of primitive to be rendered.</param>
 /// <param name="count">Number of indices.</param>
 /// <param name="type">A <see cref="glDrawElementsType"/> specifying the data type of the indices.</param>
 /// <param name="offset">The offset into the array bound to <see cref="glBufferTarget.ELEMENT_ARRAY_BUFFER"/>.</param>
 /// <param name="instancecount">Number of instances to be rendered.</param>
 public static void DrawElementsInstanced(glDrawMode mode, int count, glDrawElementsType type, int offset, int instancecount)
 {
     _DrawElementsInstanced(mode, count, type, (IntPtr)offset, instancecount);
 }
예제 #8
0
 /// <summary>
 /// Renders primitives from array via indices.
 /// </summary>
 /// <param name="mode">A <see cref="glDrawMode"/> specifying the type of primitive to render.</param>
 /// <param name="count">Number of indices.</param>
 /// <param name="type">A <see cref="glDrawElementsType"/> specifying the data type of the indices.</param>
 /// <param name="offset">The offset into the array bound to <see cref="glBufferTarget.ELEMENT_ARRAY_BUFFER"/>.</param>
 public static void DrawElements(glDrawMode mode, int count, glDrawElementsType type, int offset)
 {
     DrawElements(mode, count, type, (IntPtr)offset);
 }
예제 #9
0
 static extern void DrawElements(glDrawMode mode, int count, glDrawElementsType type, IntPtr indices);
예제 #10
0
 public static extern void DrawArrays(glDrawMode mode, int first, int count);
예제 #11
0
 /// <summary>
 /// Render primitives from array via a range of indices with a per-element offset.
 /// </summary>
 /// <param name="mode">A <see cref="glDrawMode"/> specifying the type of primitive to render.</param>
 /// <param name="start">Start of the range.</param>
 /// <param name="end">End of the range.</param>
 /// <param name="count">Number of indices.</param>
 /// <param name="type">A <see cref="glDrawElementsType"/> specifying the data type of the indices.</param>
 /// <param name="offset">The offset into the array bound to <see cref="glBufferTarget.ELEMENT_ARRAY_BUFFER"/>.</param>
 /// <param name="basevertex">The per-element offset.</param>
 public static void DrawRangeElementsBaseVertex(glDrawMode mode, uint start, uint end, int count, glDrawElementsType type, int offset, int basevertex)
 {
     _DrawRangeElementsBaseVertex(mode, start, end, count, type, (IntPtr)offset, basevertex);
 }