public static extern void bgfx_set_transient_index_buffer(ref TransientIndexBuffer tib, int startIndex, int numIndices);
public static extern void bgfx_encoder_set_transient_index_buffer(IntPtr encoder, ref TransientIndexBuffer tib, int startIndex, int numIndices);
public static extern void bgfx_alloc_transient_index_buffer(out TransientIndexBuffer tib, int num);
public static extern bool bgfx_alloc_transient_buffers(out TransientVertexBuffer tvb, ref VertexLayout.Data decl, ushort numVertices, out TransientIndexBuffer tib, ushort numIndices);
/// <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 void SetIndexBuffer(TransientIndexBuffer indexBuffer, int firstIndex, int count) { NativeMethods.bgfx_encoder_set_transient_index_buffer(ptr, ref indexBuffer, firstIndex, count); }
/// <summary> /// Sets the index buffer to use for drawing primitives. /// </summary> /// <param name="indexBuffer">The index buffer to set.</param> public void SetIndexBuffer(TransientIndexBuffer indexBuffer) { NativeMethods.bgfx_encoder_set_transient_index_buffer(ptr, ref indexBuffer, 0, -1); }
/// <summary> /// Sets the index buffer to use for drawing primitives. /// </summary> /// <param name="indexBuffer">The index buffer to set.</param> public static void SetIndexBuffer(TransientIndexBuffer indexBuffer) { NativeMethods.bgfx_set_transient_index_buffer(ref indexBuffer, 0, -1); }
/// <summary> /// Attempts to allocate both a transient vertex buffer and index buffer. /// </summary> /// <param name="vertexCount">The number of vertices to allocate.</param> /// <param name="layout">The layout of each vertex.</param> /// <param name="indexCount">The number of indices to allocate.</param> /// <param name="vertexBuffer">Returns the allocated transient vertex buffer.</param> /// <param name="indexBuffer">Returns the allocated transient index buffer.</param> /// <returns><c>true</c> if both space requirements are satisfied and the buffers were allocated.</returns> public static bool AllocateTransientBuffers(int vertexCount, VertexLayout layout, int indexCount, out TransientVertexBuffer vertexBuffer, out TransientIndexBuffer indexBuffer) { return(NativeMethods.bgfx_alloc_transient_buffers(out vertexBuffer, ref layout.data, (ushort)vertexCount, out indexBuffer, (ushort)indexCount)); }
/// <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(TransientIndexBuffer indexBuffer, int firstIndex = 0, int count = -1) { NativeMethods.bgfx_set_transient_index_buffer(ref indexBuffer, firstIndex, count); }