Removed 16-bit API limit from vertex buffer.

This commit is contained in:
Branimir Karadžić 2015-02-16 19:01:32 -08:00
parent a57634cd09
commit 895f697f50
3 changed files with 5 additions and 5 deletions

View file

@ -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.
///

View file

@ -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) )
{

View file

@ -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);