mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-18 04:53:06 +01:00
Add missing VertexLayoutHandle for C APIs (#2249)
This commit is contained in:
@@ -4160,9 +4160,10 @@ public static partial class bgfx
|
||||
/// <param name="_handle">Vertex buffer.</param>
|
||||
/// <param name="_startVertex">First vertex to render.</param>
|
||||
/// <param name="_numVertices">Number of vertices to render.</param>
|
||||
/// <param name="_layoutHandle">Vertex layout for aliasing vertex buffer. If invalid handle is used, vertex layout used for creation of vertex buffer will be used.</param>
|
||||
///
|
||||
[DllImport(DllName, EntryPoint="bgfx_set_vertex_buffer", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern unsafe void set_vertex_buffer(byte _stream, VertexBufferHandle _handle, uint _startVertex, uint _numVertices);
|
||||
public static extern unsafe void set_vertex_buffer(byte _stream, VertexBufferHandle _handle, uint _startVertex, uint _numVertices, VertexLayoutHandle _layoutHandle);
|
||||
|
||||
/// <summary>
|
||||
/// Set vertex buffer for draw primitive.
|
||||
@@ -4172,9 +4173,10 @@ public static partial class bgfx
|
||||
/// <param name="_handle">Dynamic vertex buffer.</param>
|
||||
/// <param name="_startVertex">First vertex to render.</param>
|
||||
/// <param name="_numVertices">Number of vertices to render.</param>
|
||||
/// <param name="_layoutHandle">Vertex layout for aliasing vertex buffer. If invalid handle is used, vertex layout used for creation of vertex buffer will be used.</param>
|
||||
///
|
||||
[DllImport(DllName, EntryPoint="bgfx_set_dynamic_vertex_buffer", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern unsafe void set_dynamic_vertex_buffer(byte _stream, DynamicVertexBufferHandle _handle, uint _startVertex, uint _numVertices);
|
||||
public static extern unsafe void set_dynamic_vertex_buffer(byte _stream, DynamicVertexBufferHandle _handle, uint _startVertex, uint _numVertices, VertexLayoutHandle _layoutHandle);
|
||||
|
||||
/// <summary>
|
||||
/// Set vertex buffer for draw primitive.
|
||||
|
||||
@@ -1840,8 +1840,11 @@ version(BindBgfx_Static)
|
||||
* _handle = Vertex buffer.
|
||||
* _startVertex = First vertex to render.
|
||||
* _numVertices = Number of vertices to render.
|
||||
* _layoutHandle = Vertex layout for aliasing vertex buffer. If invalid
|
||||
* handle is used, vertex layout used for creation
|
||||
* of vertex buffer will be used.
|
||||
*/
|
||||
void bgfx_set_vertex_buffer(byte _stream, bgfx_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices);
|
||||
void bgfx_set_vertex_buffer(byte _stream, bgfx_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices, bgfx_vertex_layout_handle_t _layoutHandle);
|
||||
|
||||
/**
|
||||
* Set vertex buffer for draw primitive.
|
||||
@@ -1850,8 +1853,11 @@ version(BindBgfx_Static)
|
||||
* _handle = Dynamic vertex buffer.
|
||||
* _startVertex = First vertex to render.
|
||||
* _numVertices = Number of vertices to render.
|
||||
* _layoutHandle = Vertex layout for aliasing vertex buffer. If invalid
|
||||
* handle is used, vertex layout used for creation
|
||||
* of vertex buffer will be used.
|
||||
*/
|
||||
void bgfx_set_dynamic_vertex_buffer(byte _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices);
|
||||
void bgfx_set_dynamic_vertex_buffer(byte _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices, bgfx_vertex_layout_handle_t _layoutHandle);
|
||||
|
||||
/**
|
||||
* Set vertex buffer for draw primitive.
|
||||
@@ -4076,8 +4082,11 @@ else
|
||||
* _handle = Vertex buffer.
|
||||
* _startVertex = First vertex to render.
|
||||
* _numVertices = Number of vertices to render.
|
||||
* _layoutHandle = Vertex layout for aliasing vertex buffer. If invalid
|
||||
* handle is used, vertex layout used for creation
|
||||
* of vertex buffer will be used.
|
||||
*/
|
||||
alias da_bgfx_set_vertex_buffer = void function(byte _stream, bgfx_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices);
|
||||
alias da_bgfx_set_vertex_buffer = void function(byte _stream, bgfx_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices, bgfx_vertex_layout_handle_t _layoutHandle);
|
||||
da_bgfx_set_vertex_buffer bgfx_set_vertex_buffer;
|
||||
|
||||
/**
|
||||
@@ -4087,8 +4096,11 @@ else
|
||||
* _handle = Dynamic vertex buffer.
|
||||
* _startVertex = First vertex to render.
|
||||
* _numVertices = Number of vertices to render.
|
||||
* _layoutHandle = Vertex layout for aliasing vertex buffer. If invalid
|
||||
* handle is used, vertex layout used for creation
|
||||
* of vertex buffer will be used.
|
||||
*/
|
||||
alias da_bgfx_set_dynamic_vertex_buffer = void function(byte _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices);
|
||||
alias da_bgfx_set_dynamic_vertex_buffer = void function(byte _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices, bgfx_vertex_layout_handle_t _layoutHandle);
|
||||
da_bgfx_set_dynamic_vertex_buffer bgfx_set_dynamic_vertex_buffer;
|
||||
|
||||
/**
|
||||
|
||||
@@ -3000,9 +3000,12 @@ BGFX_C_API void bgfx_set_transient_index_buffer(const bgfx_transient_index_buffe
|
||||
* @param[in] _handle Vertex buffer.
|
||||
* @param[in] _startVertex First vertex to render.
|
||||
* @param[in] _numVertices Number of vertices to render.
|
||||
* @param[in] _layoutHandle Vertex layout for aliasing vertex buffer. If invalid
|
||||
* handle is used, vertex layout used for creation
|
||||
* of vertex buffer will be used.
|
||||
*
|
||||
*/
|
||||
BGFX_C_API void bgfx_set_vertex_buffer(uint8_t _stream, bgfx_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices);
|
||||
BGFX_C_API void bgfx_set_vertex_buffer(uint8_t _stream, bgfx_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices, bgfx_vertex_layout_handle_t _layoutHandle);
|
||||
|
||||
/**
|
||||
* Set vertex buffer for draw primitive.
|
||||
@@ -3011,9 +3014,12 @@ BGFX_C_API void bgfx_set_vertex_buffer(uint8_t _stream, bgfx_vertex_buffer_handl
|
||||
* @param[in] _handle Dynamic vertex buffer.
|
||||
* @param[in] _startVertex First vertex to render.
|
||||
* @param[in] _numVertices Number of vertices to render.
|
||||
* @param[in] _layoutHandle Vertex layout for aliasing vertex buffer. If invalid
|
||||
* handle is used, vertex layout used for creation
|
||||
* of vertex buffer will be used.
|
||||
*
|
||||
*/
|
||||
BGFX_C_API void bgfx_set_dynamic_vertex_buffer(uint8_t _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices);
|
||||
BGFX_C_API void bgfx_set_dynamic_vertex_buffer(uint8_t _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices, bgfx_vertex_layout_handle_t _layoutHandle);
|
||||
|
||||
/**
|
||||
* Set vertex buffer for draw primitive.
|
||||
@@ -3624,8 +3630,8 @@ struct bgfx_interface_vtbl
|
||||
void (*set_index_buffer)(bgfx_index_buffer_handle_t _handle, uint32_t _firstIndex, uint32_t _numIndices);
|
||||
void (*set_dynamic_index_buffer)(bgfx_dynamic_index_buffer_handle_t _handle, uint32_t _firstIndex, uint32_t _numIndices);
|
||||
void (*set_transient_index_buffer)(const bgfx_transient_index_buffer_t* _tib, uint32_t _firstIndex, uint32_t _numIndices);
|
||||
void (*set_vertex_buffer)(uint8_t _stream, bgfx_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices);
|
||||
void (*set_dynamic_vertex_buffer)(uint8_t _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices);
|
||||
void (*set_vertex_buffer)(uint8_t _stream, bgfx_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices, bgfx_vertex_layout_handle_t _layoutHandle);
|
||||
void (*set_dynamic_vertex_buffer)(uint8_t _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices, bgfx_vertex_layout_handle_t _layoutHandle);
|
||||
void (*set_transient_vertex_buffer)(uint8_t _stream, const bgfx_transient_vertex_buffer_t* _tvb, uint32_t _startVertex, uint32_t _numVertices);
|
||||
void (*set_vertex_count)(uint32_t _numVertices);
|
||||
void (*set_instance_data_buffer)(const bgfx_instance_data_buffer_t* _idb, uint32_t _start, uint32_t _num);
|
||||
|
||||
2
makefile
2
makefile
@@ -59,7 +59,7 @@ projgen: ## Generate project files for all configurations.
|
||||
|
||||
idl: ## Generate code from IDL.
|
||||
@echo Generating code from IDL.
|
||||
$(GENIE) idl
|
||||
cd scripts && ../$(GENIE) idl
|
||||
|
||||
.build/projects/gmake-android-arm:
|
||||
$(GENIE) --gcc=android-arm gmake
|
||||
|
||||
@@ -2772,10 +2772,14 @@ func.setVertexBuffer { cpponly }
|
||||
--- Set vertex buffer for draw primitive.
|
||||
func.setVertexBuffer
|
||||
"void"
|
||||
.stream "uint8_t" --- Vertex stream.
|
||||
.handle "VertexBufferHandle" --- Vertex buffer.
|
||||
.startVertex "uint32_t" --- First vertex to render.
|
||||
.numVertices "uint32_t" --- Number of vertices to render.
|
||||
.stream "uint8_t" --- Vertex stream.
|
||||
.handle "VertexBufferHandle" --- Vertex buffer.
|
||||
.startVertex "uint32_t" --- First vertex to render.
|
||||
.numVertices "uint32_t" --- Number of vertices to render.
|
||||
.layoutHandle "VertexLayoutHandle" --- Vertex layout for aliasing vertex buffer. If invalid
|
||||
--- handle is used, vertex layout used for creation
|
||||
--- of vertex buffer will be used.
|
||||
{ default = "BGFX_INVALID_HANDLE" }
|
||||
|
||||
--- Set vertex buffer for draw primitive.
|
||||
func.setVertexBuffer { cpponly }
|
||||
@@ -2790,6 +2794,11 @@ func.setVertexBuffer { cname = "set_dynamic_vertex_buffer" }
|
||||
.handle "DynamicVertexBufferHandle" --- Dynamic vertex buffer.
|
||||
.startVertex "uint32_t" --- First vertex to render.
|
||||
.numVertices "uint32_t" --- Number of vertices to render.
|
||||
.layoutHandle "VertexLayoutHandle" --- Vertex layout for aliasing vertex buffer. If invalid
|
||||
--- handle is used, vertex layout used for creation
|
||||
--- of vertex buffer will be used.
|
||||
{ default = "BGFX_INVALID_HANDLE" }
|
||||
|
||||
|
||||
--- Set vertex buffer for draw primitive.
|
||||
func.setVertexBuffer { cpponly }
|
||||
|
||||
@@ -1034,16 +1034,18 @@ BGFX_C_API void bgfx_set_transient_index_buffer(const bgfx_transient_index_buffe
|
||||
bgfx::setIndexBuffer((const bgfx::TransientIndexBuffer*)_tib, _firstIndex, _numIndices);
|
||||
}
|
||||
|
||||
BGFX_C_API void bgfx_set_vertex_buffer(uint8_t _stream, bgfx_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices)
|
||||
BGFX_C_API void bgfx_set_vertex_buffer(uint8_t _stream, bgfx_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices, bgfx_vertex_layout_handle_t _layoutHandle)
|
||||
{
|
||||
union { bgfx_vertex_buffer_handle_t c; bgfx::VertexBufferHandle cpp; } handle = { _handle };
|
||||
bgfx::setVertexBuffer(_stream, handle.cpp, _startVertex, _numVertices);
|
||||
union { bgfx_vertex_layout_handle_t c; bgfx::VertexLayoutHandle cpp; } layoutHandle = { _layoutHandle };
|
||||
bgfx::setVertexBuffer(_stream, handle.cpp, _startVertex, _numVertices, layoutHandle.cpp);
|
||||
}
|
||||
|
||||
BGFX_C_API void bgfx_set_dynamic_vertex_buffer(uint8_t _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices)
|
||||
BGFX_C_API void bgfx_set_dynamic_vertex_buffer(uint8_t _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices, bgfx_vertex_layout_handle_t _layoutHandle)
|
||||
{
|
||||
union { bgfx_dynamic_vertex_buffer_handle_t c; bgfx::DynamicVertexBufferHandle cpp; } handle = { _handle };
|
||||
bgfx::setVertexBuffer(_stream, handle.cpp, _startVertex, _numVertices);
|
||||
union { bgfx_vertex_layout_handle_t c; bgfx::VertexLayoutHandle cpp; } layoutHandle = { _layoutHandle };
|
||||
bgfx::setVertexBuffer(_stream, handle.cpp, _startVertex, _numVertices, layoutHandle.cpp);
|
||||
}
|
||||
|
||||
BGFX_C_API void bgfx_set_transient_vertex_buffer(uint8_t _stream, const bgfx_transient_vertex_buffer_t* _tvb, uint32_t _startVertex, uint32_t _numVertices)
|
||||
|
||||
Reference in New Issue
Block a user