From 895f697f504afb410b1bd345886eb3024a13f978 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Mon, 16 Feb 2015 19:01:32 -0800 Subject: [PATCH] Removed 16-bit API limit from vertex buffer. --- include/bgfx.h | 4 ++-- src/bgfx.cpp | 4 ++-- src/bgfx_p.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/bgfx.h b/include/bgfx.h index 4c870c53..3ac04888 100644 --- a/include/bgfx.h +++ b/include/bgfx.h @@ -687,7 +687,7 @@ namespace bgfx /// When buffer is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated /// from CPU. /// - DynamicVertexBufferHandle createDynamicVertexBuffer(uint16_t _num, const VertexDecl& _decl, uint8_t _flags = BGFX_BUFFER_NONE); + DynamicVertexBufferHandle createDynamicVertexBuffer(uint32_t _num, const VertexDecl& _decl, uint8_t _flags = BGFX_BUFFER_NONE); /// Create dynamic vertex buffer and initialize it. /// @@ -766,7 +766,7 @@ namespace bgfx /// @remarks /// Only 16-bit index buffer is supported. /// - bool allocTransientBuffers(TransientVertexBuffer* _tvb, const VertexDecl& _decl, uint16_t _numVertices, TransientIndexBuffer* _tib, uint16_t _numIndices); + bool allocTransientBuffers(TransientVertexBuffer* _tvb, const VertexDecl& _decl, uint32_t _numVertices, TransientIndexBuffer* _tib, uint32_t _numIndices); /// Allocate instance data buffer. /// diff --git a/src/bgfx.cpp b/src/bgfx.cpp index 73ddd5fe..127cbb49 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -2163,7 +2163,7 @@ again: s_ctx->destroyDynamicIndexBuffer(_handle); } - DynamicVertexBufferHandle createDynamicVertexBuffer(uint16_t _num, const VertexDecl& _decl, uint8_t _flags) + DynamicVertexBufferHandle createDynamicVertexBuffer(uint32_t _num, const VertexDecl& _decl, uint8_t _flags) { BGFX_CHECK_MAIN_THREAD(); BX_CHECK(0 != _decl.m_stride, "Invalid VertexDecl."); @@ -2239,7 +2239,7 @@ again: return s_ctx->allocTransientVertexBuffer(_tvb, _num, _decl); } - bool allocTransientBuffers(bgfx::TransientVertexBuffer* _tvb, const bgfx::VertexDecl& _decl, uint16_t _numVertices, bgfx::TransientIndexBuffer* _tib, uint16_t _numIndices) + bool allocTransientBuffers(bgfx::TransientVertexBuffer* _tvb, const bgfx::VertexDecl& _decl, uint32_t _numVertices, bgfx::TransientIndexBuffer* _tib, uint32_t _numIndices) { if (checkAvailTransientBuffers(_numVertices, _decl, _numIndices) ) { diff --git a/src/bgfx_p.h b/src/bgfx_p.h index e158b602..c0b2ad71 100644 --- a/src/bgfx_p.h +++ b/src/bgfx_p.h @@ -2178,7 +2178,7 @@ namespace bgfx return ptr; } - BGFX_API_FUNC(DynamicVertexBufferHandle createDynamicVertexBuffer(uint16_t _num, const VertexDecl& _decl, uint8_t _flags) ) + BGFX_API_FUNC(DynamicVertexBufferHandle createDynamicVertexBuffer(uint32_t _num, const VertexDecl& _decl, uint8_t _flags) ) { DynamicVertexBufferHandle handle = BGFX_INVALID_HANDLE; uint32_t size = strideAlign16( (_num+1)*_decl.m_stride, _decl.m_stride);