mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 00:58:30 -05:00
Create capture surface only on request.
This commit is contained in:
parent
d5f7f243d5
commit
58a1d91ea3
1 changed files with 50 additions and 44 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue