mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
Cleanup.
This commit is contained in:
parent
1183d9e337
commit
0ed78a0753
2 changed files with 70 additions and 82 deletions
|
@ -450,13 +450,7 @@ namespace bgfx
|
||||||
const uint32_t width = (bx::uint32_min(m_width, _width +_x)-_x)*2;
|
const uint32_t width = (bx::uint32_min(m_width, _width +_x)-_x)*2;
|
||||||
const uint32_t height = bx::uint32_min(m_height, _height+_y)-_y;
|
const uint32_t height = bx::uint32_min(m_height, _height+_y)-_y;
|
||||||
const uint32_t dstPitch = m_width*2;
|
const uint32_t dstPitch = m_width*2;
|
||||||
|
bx::memcpy(dst, src, width, height, _pitch, dstPitch);
|
||||||
for (uint32_t yy = 0; yy < height; ++yy)
|
|
||||||
{
|
|
||||||
memcpy(dst, src, width);
|
|
||||||
dst += dstPitch;
|
|
||||||
src += _pitch;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -603,6 +603,7 @@ namespace bgfx { namespace d3d9
|
||||||
s_textureFormat[TextureFormat::BC5].m_fmt = s_extendedFormats[ExtendedFormat::Ati2].m_supported ? D3DFMT_ATI2 : D3DFMT_UNKNOWN;
|
s_textureFormat[TextureFormat::BC5].m_fmt = s_extendedFormats[ExtendedFormat::Ati2].m_supported ? D3DFMT_ATI2 : D3DFMT_UNKNOWN;
|
||||||
|
|
||||||
g_caps.supported |= m_instancingSupport ? BGFX_CAPS_INSTANCING : 0;
|
g_caps.supported |= m_instancingSupport ? BGFX_CAPS_INSTANCING : 0;
|
||||||
|
}
|
||||||
|
|
||||||
for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii)
|
for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii)
|
||||||
{
|
{
|
||||||
|
@ -682,7 +683,6 @@ namespace bgfx { namespace d3d9
|
||||||
|
|
||||||
g_caps.formats[ii] = support;
|
g_caps.formats[ii] = support;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
m_fmtDepth = D3DFMT_D24S8;
|
m_fmtDepth = D3DFMT_D24S8;
|
||||||
|
|
||||||
|
@ -2913,13 +2913,7 @@ namespace bgfx { namespace d3d9
|
||||||
, mip.m_format
|
, mip.m_format
|
||||||
);
|
);
|
||||||
|
|
||||||
uint32_t dstpitch = pitch;
|
bx::memcpy(bits, temp, pitch, height, srcpitch, pitch);
|
||||||
for (uint32_t yy = 0; yy < height; ++yy)
|
|
||||||
{
|
|
||||||
uint8_t* src = &temp[yy*srcpitch];
|
|
||||||
uint8_t* dst = &bits[yy*dstpitch];
|
|
||||||
memcpy(dst, src, dstpitch);
|
|
||||||
}
|
|
||||||
|
|
||||||
BX_FREE(g_allocator, temp);
|
BX_FREE(g_allocator, temp);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue