mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 00:58:30 -05:00
Fixed MinGW build.
This commit is contained in:
parent
4ab0874d53
commit
dc8d2c38f3
2 changed files with 8 additions and 1 deletions
|
@ -1603,7 +1603,7 @@ namespace bgfx
|
||||||
if (ptr == NonLocalAllocator::invalidBlock)
|
if (ptr == NonLocalAllocator::invalidBlock)
|
||||||
{
|
{
|
||||||
IndexBufferHandle indexBufferHandle = { m_indexBufferHandle.alloc() };
|
IndexBufferHandle indexBufferHandle = { m_indexBufferHandle.alloc() };
|
||||||
BX_WARN(invalidHandle != handle.idx, "Failed to allocate dynamic index buffer handle.");
|
BX_WARN(invalidHandle != indexBufferHandle.idx, "Failed to allocate index buffer handle.");
|
||||||
if (indexBufferHandle.idx == invalidHandle)
|
if (indexBufferHandle.idx == invalidHandle)
|
||||||
{
|
{
|
||||||
return handle;
|
return handle;
|
||||||
|
@ -1618,6 +1618,12 @@ namespace bgfx
|
||||||
}
|
}
|
||||||
|
|
||||||
handle.idx = m_dynamicIndexBufferHandle.alloc();
|
handle.idx = m_dynamicIndexBufferHandle.alloc();
|
||||||
|
BX_WARN(invalidHandle != handle.idx, "Failed to allocate dynamic index buffer handle.");
|
||||||
|
if (handle.idx == invalidHandle)
|
||||||
|
{
|
||||||
|
return handle;
|
||||||
|
}
|
||||||
|
|
||||||
DynamicIndexBuffer& dib = m_dynamicIndexBuffers[handle.idx];
|
DynamicIndexBuffer& dib = m_dynamicIndexBuffers[handle.idx];
|
||||||
dib.m_handle.idx = uint16_t(ptr>>32);
|
dib.m_handle.idx = uint16_t(ptr>>32);
|
||||||
dib.m_offset = uint32_t(ptr);
|
dib.m_offset = uint32_t(ptr);
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#define __RENDERER_D3D_H__
|
#define __RENDERER_D3D_H__
|
||||||
|
|
||||||
#if BGFX_CONFIG_RENDERER_DIRECT3D9
|
#if BGFX_CONFIG_RENDERER_DIRECT3D9
|
||||||
|
# include <sal.h>
|
||||||
# include <dxerr.h>
|
# include <dxerr.h>
|
||||||
# pragma comment(lib, "dxerr.lib")
|
# pragma comment(lib, "dxerr.lib")
|
||||||
# define DX_CHECK_EXTRA_F " (%s): %s"
|
# define DX_CHECK_EXTRA_F " (%s): %s"
|
||||||
|
|
Loading…
Reference in a new issue