예제 #1
0
 public IndexBuffer(ushort[] indices)
 {
     handle = new SharpBgfx.IndexBuffer(MemoryBlock.FromArray(indices));
 }
예제 #2
0
 /// <summary>
 /// Sets the index buffer to use for drawing primitives.
 /// </summary>
 /// <param name="indexBuffer">The index buffer to set.</param>
 /// <param name="firstIndex">The first index in the buffer to use.</param>
 /// <param name="count">The number of indices to pull from the buffer.</param>
 public static void SetIndexBuffer(IndexBuffer indexBuffer, int firstIndex, int count)
 {
     NativeMethods.bgfx_set_index_buffer(indexBuffer.handle, firstIndex, count);
 }
예제 #3
0
 /// <summary>
 /// Sets an index buffer as a compute resource.
 /// </summary>
 /// <param name="stage">The resource stage to set.</param>
 /// <param name="buffer">The buffer to set.</param>
 /// <param name="access">Access control flags.</param>
 public static void SetComputeBuffer(byte stage, IndexBuffer buffer, ComputeBufferAccess access)
 {
     NativeMethods.bgfx_set_compute_index_buffer(stage, buffer.handle, access);
 }
예제 #4
0
 /// <summary>
 /// Sets the index buffer to use for drawing primitives.
 /// </summary>
 /// <param name="indexBuffer">The index buffer to set.</param>
 public static void SetIndexBuffer(IndexBuffer indexBuffer)
 {
     NativeMethods.bgfx_set_index_buffer(indexBuffer.handle, 0, -1);
 }