Exemple #1
0
 public static extern bool bgfx_alloc_transient_buffers(out TransientVertexBuffer tvb, ref VertexLayout.Data decl, ushort numVertices, out TransientIndexBuffer tib, ushort numIndices);
Exemple #2
0
 public static extern void bgfx_encoder_set_transient_vertex_buffer(IntPtr encoder, byte stream, ref TransientVertexBuffer tvb, int startVertex, int numVertices);
Exemple #3
0
 /// <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);
 }
Exemple #4
0
 public static extern void bgfx_alloc_transient_vertex_buffer(out TransientVertexBuffer tvb, int num, ref VertexLayout.Data decl);
Exemple #5
0
 /// <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);
 }
Exemple #6
0
 /// <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));
 }
Exemple #7
0
 public static extern void bgfx_set_transient_vertex_buffer(ref TransientVertexBuffer tvb, int startVertex, int numVertices);
Exemple #8
0
 /// <summary>
 /// Sets the vertex buffer to use for drawing primitives.
 /// </summary>
 /// <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 static void SetVertexBuffer(TransientVertexBuffer vertexBuffer, int firstVertex, int count)
 {
     NativeMethods.bgfx_set_transient_vertex_buffer(ref vertexBuffer, firstVertex, count);
 }
Exemple #9
0
 /// <summary>
 /// Sets the vertex buffer to use for drawing primitives.
 /// </summary>
 /// <param name="vertexBuffer">The vertex buffer to set.</param>
 public static void SetVertexBuffer(TransientVertexBuffer vertexBuffer)
 {
     NativeMethods.bgfx_set_transient_vertex_buffer(ref vertexBuffer, 0, -1);
 }