Added weldVertices 32-bit indices support.

This commit is contained in:
Бранимир Караџић
2020-05-30 21:38:41 -07:00
parent dfaf816822
commit 977188e9de
12 changed files with 69 additions and 40 deletions

View File

@@ -2352,10 +2352,11 @@ public static partial class bgfx
/// <param name="_layout">Vertex stream layout.</param>
/// <param name="_data">Vertex stream.</param>
/// <param name="_num">Number of vertices in vertex stream.</param>
/// <param name="_index32">Set to `true` if input indices are 32-bit.</param>
/// <param name="_epsilon">Error tolerance for vertex position comparison.</param>
///
[DllImport(DllName, EntryPoint="bgfx_weld_vertices", CallingConvention = CallingConvention.Cdecl)]
public static extern unsafe ushort weld_vertices(ushort* _output, VertexLayout* _layout, void* _data, ushort _num, float _epsilon);
public static extern unsafe uint weld_vertices(void* _output, VertexLayout* _layout, void* _data, uint _num, bool _index32, float _epsilon);
/// <summary>
/// Convert index buffer for use with different primitive topologies.

View File

@@ -115,9 +115,10 @@ version(BindBgfx_Static)
* _layout = Vertex stream layout.
* _data = Vertex stream.
* _num = Number of vertices in vertex stream.
* _index32 = Set to `true` if input indices are 32-bit.
* _epsilon = Error tolerance for vertex position comparison.
*/
ushort bgfx_weld_vertices(ushort* _output, const(bgfx_vertex_layout_t)* _layout, const(void)* _data, ushort _num, float _epsilon);
uint bgfx_weld_vertices(void* _output, const(bgfx_vertex_layout_t)* _layout, const(void)* _data, uint _num, bool _index32, float _epsilon);
/**
* Convert index buffer for use with different primitive topologies.
@@ -2198,9 +2199,10 @@ else
* _layout = Vertex stream layout.
* _data = Vertex stream.
* _num = Number of vertices in vertex stream.
* _index32 = Set to `true` if input indices are 32-bit.
* _epsilon = Error tolerance for vertex position comparison.
*/
alias da_bgfx_weld_vertices = ushort function(ushort* _output, const(bgfx_vertex_layout_t)* _layout, const(void)* _data, ushort _num, float _epsilon);
alias da_bgfx_weld_vertices = uint function(void* _output, const(bgfx_vertex_layout_t)* _layout, const(void)* _data, uint _num, bool _index32, float _epsilon);
da_bgfx_weld_vertices bgfx_weld_vertices;
/**

View File

@@ -10,7 +10,7 @@ public import core.stdc.stdarg : va_list;
extern(C) @nogc nothrow:
enum uint BGFX_API_VERSION = 106;
enum uint BGFX_API_VERSION = 107;
alias bgfx_view_id_t = ushort;