Added ability to specify swap chain for screenshot.

This commit is contained in:
Branimir Karadžić
2017-03-02 18:02:14 -08:00
parent 7e76736082
commit 86fc54ccfc
15 changed files with 84 additions and 38 deletions

View File

@@ -1559,8 +1559,10 @@ namespace bgfx { namespace d3d12
m_uniformReg.remove(_handle);
}
void saveScreenShot(const char* _filePath) BX_OVERRIDE
void saveScreenShot(FrameBufferHandle _handle, const char* _filePath) BX_OVERRIDE
{
BX_UNUSED(_handle);
uint32_t idx = (m_backBufferColorIdx-1) % m_scd.BufferCount;
m_cmd.finish(m_backBufferColorFence[idx]);
ID3D12Resource* backBuffer = m_backBufferColor[idx];