mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-01 11:56:58 -05:00
Fixed dynamic index buffer offset.
This commit is contained in:
parent
e419171d10
commit
938c1a0e92
1 changed files with 5 additions and 1 deletions
|
@ -2990,7 +2990,11 @@ namespace bgfx
|
||||||
|
|
||||||
BGFX_API_FUNC(void setIndexBuffer(DynamicIndexBufferHandle _handle, uint32_t _firstIndex, uint32_t _numIndices) )
|
BGFX_API_FUNC(void setIndexBuffer(DynamicIndexBufferHandle _handle, uint32_t _firstIndex, uint32_t _numIndices) )
|
||||||
{
|
{
|
||||||
m_submit->setIndexBuffer(m_dynamicIndexBuffers[_handle.idx].m_handle, _firstIndex, _numIndices);
|
const DynamicIndexBuffer& dib = m_dynamicIndexBuffers[_handle.idx];
|
||||||
|
m_submit->setIndexBuffer(dib.m_handle
|
||||||
|
, dib.m_offset / 2 + _firstIndex * 2
|
||||||
|
, _numIndices
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
BGFX_API_FUNC(void setIndexBuffer(const TransientIndexBuffer* _tib, uint32_t _firstIndex, uint32_t _numIndices) )
|
BGFX_API_FUNC(void setIndexBuffer(const TransientIndexBuffer* _tib, uint32_t _firstIndex, uint32_t _numIndices) )
|
||||||
|
|
Loading…
Reference in a new issue