Fixed MinGW compile errors.
This commit is contained in:
parent
50a6e41549
commit
8bac68fe7f
@ -8,7 +8,7 @@ project "bgfx"
|
||||
}
|
||||
|
||||
buildoptions {
|
||||
"-Wall",
|
||||
-- "-Wall",
|
||||
}
|
||||
|
||||
defines {
|
||||
|
@ -174,6 +174,13 @@ namespace bgfx
|
||||
return _offset+align-(_offset%align);
|
||||
}
|
||||
|
||||
BX_FORCE_INLINE uint32_t castfi(float _value)
|
||||
{
|
||||
union { float fl; uint32_t ui; } un;
|
||||
un.fl = _value;
|
||||
return un.ui;
|
||||
}
|
||||
|
||||
void dump(const VertexDecl& _decl);
|
||||
|
||||
struct TextVideoMem
|
||||
|
@ -108,13 +108,13 @@ namespace bgfx
|
||||
struct RendererContext
|
||||
{
|
||||
RendererContext()
|
||||
: m_initialized(false)
|
||||
: m_flags(BGFX_RESET_NONE)
|
||||
, m_initialized(false)
|
||||
, m_fmtNULL(false)
|
||||
, m_fmtDF16(false)
|
||||
, m_fmtDF24(false)
|
||||
, m_fmtINTZ(false)
|
||||
, m_fmtRAWZ(false)
|
||||
, m_flags(BGFX_RESET_NONE)
|
||||
, m_rtMsaa(false)
|
||||
{
|
||||
m_rt.idx = invalidHandle;
|
||||
@ -1693,8 +1693,7 @@ namespace bgfx
|
||||
|
||||
if ( (BGFX_STATE_PT_POINTS|BGFX_STATE_POINT_SIZE_MASK) & changedFlags)
|
||||
{
|
||||
float pointSize = (float)( (newFlags&BGFX_STATE_POINT_SIZE_MASK)>>BGFX_STATE_POINT_SIZE_SHIFT);
|
||||
DX_CHECK(s_renderCtx.m_device->SetRenderState(D3DRS_POINTSIZE, *( (DWORD*)&pointSize) ) );
|
||||
DX_CHECK(s_renderCtx.m_device->SetRenderState(D3DRS_POINTSIZE, castfi( (float)( (newFlags&BGFX_STATE_POINT_SIZE_MASK)>>BGFX_STATE_POINT_SIZE_SHIFT) ) ) );
|
||||
}
|
||||
|
||||
#if BX_PLATFORM_WINDOWS
|
||||
|
@ -90,15 +90,26 @@ namespace bgfx
|
||||
# define PIX_ENDEVENT()
|
||||
#endif // BGFX_CONFIG_DEBUG_PIX
|
||||
|
||||
#define DX_RELEASE(_ptr, _expected) \
|
||||
do { \
|
||||
if (NULL != _ptr) \
|
||||
{ \
|
||||
ULONG count = _ptr->Release(); \
|
||||
BX_CHECK(_expected == count, "RefCount is %d (expected %d).", count, _expected); \
|
||||
_ptr = NULL; \
|
||||
} \
|
||||
} while (0)
|
||||
#if BGFX_CONFIG_DEBUG
|
||||
# define DX_RELEASE(_ptr, _expected) \
|
||||
do { \
|
||||
if (NULL != _ptr) \
|
||||
{ \
|
||||
ULONG count = _ptr->Release(); \
|
||||
BX_CHECK(_expected == count, "RefCount is %d (expected %d).", count, _expected); \
|
||||
_ptr = NULL; \
|
||||
} \
|
||||
} while (0)
|
||||
#else
|
||||
# define DX_RELEASE(_ptr, _expected) \
|
||||
do { \
|
||||
if (NULL != _ptr) \
|
||||
{ \
|
||||
_ptr->Release(); \
|
||||
_ptr = NULL; \
|
||||
} \
|
||||
} while (0)
|
||||
#endif // BGFX_CONFIG_DEBUG
|
||||
|
||||
struct Msaa
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user