mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
D3D11: Fixed swap chain resize.
This commit is contained in:
parent
4018a4b690
commit
c5adaec06c
2 changed files with 14 additions and 10 deletions
|
@ -1340,7 +1340,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
updateMsaa();
|
||||
postReset();
|
||||
|
@ -3948,11 +3948,11 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
|||
|
||||
uint16_t FrameBufferD3D11::destroy()
|
||||
{
|
||||
preReset();
|
||||
preReset(true);
|
||||
|
||||
DX_RELEASE(m_swapChain, 0);
|
||||
|
||||
m_num = 0;
|
||||
m_num = 0;
|
||||
m_numTh = 0;
|
||||
|
||||
uint16_t denseIdx = m_denseIdx;
|
||||
|
@ -3961,15 +3961,19 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
|||
return denseIdx;
|
||||
}
|
||||
|
||||
void FrameBufferD3D11::preReset()
|
||||
void FrameBufferD3D11::preReset(bool _force)
|
||||
{
|
||||
for (uint32_t ii = 0, num = m_num; ii < num; ++ii)
|
||||
if (0 < m_numTh
|
||||
|| _force)
|
||||
{
|
||||
DX_RELEASE(m_srv[ii], 0);
|
||||
DX_RELEASE(m_rtv[ii], 0);
|
||||
}
|
||||
for (uint32_t ii = 0, num = m_num; ii < num; ++ii)
|
||||
{
|
||||
DX_RELEASE(m_srv[ii], 0);
|
||||
DX_RELEASE(m_rtv[ii], 0);
|
||||
}
|
||||
|
||||
DX_RELEASE(m_dsv, 0);
|
||||
DX_RELEASE(m_dsv, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void FrameBufferD3D11::postReset()
|
||||
|
|
|
@ -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]);
|
||||
|
|
Loading…
Reference in a new issue