Create capture surface only on request.

This commit is contained in:
bkaradzic 2013-01-21 21:40:54 -08:00
parent d5f7f243d5
commit 58a1d91ea3

View file

@ -771,6 +771,8 @@ namespace bgfx
}
void capturePostReset()
{
if (m_flags&BGFX_RESET_CAPTURE)
{
ID3D11Texture2D* backBuffer;
DX_CHECK(m_swapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), (void**)&backBuffer) );
@ -801,6 +803,7 @@ namespace bgfx
DX_RELEASE(backBuffer, 0);
}
}
void capturePreReset()
{
@ -814,6 +817,8 @@ namespace bgfx
}
void capture()
{
if (NULL != m_captureTexture)
{
ID3D11Texture2D* backBuffer;
DX_CHECK(m_swapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), (void**)&backBuffer) );
@ -839,6 +844,7 @@ namespace bgfx
DX_RELEASE(backBuffer, 0);
}
}
void saveScreenShot(Memory* _mem)
{