/// <summary> /// Sets the vertex buffer to use for drawing primitives. /// </summary> /// <param name="stream">The index of the vertex stream to set.</param> /// <param name="vertexBuffer">The vertex buffer to set.</param> /// <param name="firstVertex">The index of the first vertex to use.</param> /// <param name="count">The number of vertices to pull from the buffer.</param> public void SetVertexBuffer(int stream, TransientVertexBuffer vertexBuffer, int firstVertex, int count) { NativeMethods.bgfx_encoder_set_transient_vertex_buffer(ptr, (byte)stream, ref vertexBuffer, firstVertex, count); }
/// <summary> /// Sets the vertex buffer to use for drawing primitives. /// </summary> /// <param name="stream">The index of the vertex stream to set.</param> /// <param name="vertexBuffer">The vertex buffer to set.</param> public void SetVertexBuffer(int stream, TransientVertexBuffer vertexBuffer) { NativeMethods.bgfx_encoder_set_transient_vertex_buffer(ptr, (byte)stream, ref vertexBuffer, 0, -1); }
public static extern bool bgfx_alloc_transient_buffers(out TransientVertexBuffer tvb, ref VertexLayout.Data decl, ushort numVertices, out TransientIndexBuffer tib, ushort numIndices);
public static extern void bgfx_encoder_set_transient_vertex_buffer(IntPtr encoder, byte stream, ref TransientVertexBuffer tvb, int startVertex, int numVertices);
public static extern void bgfx_alloc_transient_vertex_buffer(out TransientVertexBuffer tvb, int num, ref VertexLayout.Data decl);