public IndexBuffer(ushort[] indices) { handle = new SharpBgfx.IndexBuffer(MemoryBlock.FromArray(indices)); }
/// <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); }
/// <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); }
/// <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); }