D3D11: Fixed swap chain resize.

This commit is contained in:
Branimir Karadžić 2015-08-26 12:44:40 -07:00
parent 4018a4b690
commit c5adaec06c
2 changed files with 14 additions and 10 deletions

View file

@ -3948,7 +3948,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
uint16_t FrameBufferD3D11::destroy()
{
preReset();
preReset(true);
DX_RELEASE(m_swapChain, 0);
@ -3961,7 +3961,10 @@ BX_PRAGMA_DIAGNOSTIC_POP();
return denseIdx;
}
void FrameBufferD3D11::preReset()
void FrameBufferD3D11::preReset(bool _force)
{
if (0 < m_numTh
|| _force)
{
for (uint32_t ii = 0, num = m_num; ii < num; ++ii)
{
@ -3971,6 +3974,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
DX_RELEASE(m_dsv, 0);
}
}
void FrameBufferD3D11::postReset()
{

View file

@ -256,7 +256,7 @@ namespace bgfx { namespace d3d11
void create(uint8_t _num, const TextureHandle* _handles);
void create(uint16_t _denseIdx, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _depthFormat);
uint16_t destroy();
void preReset();
void preReset(bool _force = false);
void postReset();
void resolve();
void clear(const Clear& _clear, const float _palette[][4]);