Added ability to programmatically capture frame with RenderDoc.

This commit is contained in:
Branimir Karadžić
2016-06-02 18:46:43 -07:00
parent 52d0563136
commit e46135da8c
11 changed files with 41 additions and 12 deletions

View File

@@ -56,7 +56,7 @@ namespace bgfx
}
pRENDERDOC_GetAPI RENDERDOC_GetAPI;
static RENDERDOC_API_1_0_0* s_renderDoc;
static RENDERDOC_API_1_0_1* s_renderDoc;
void* loadRenderDoc()
{
@@ -105,6 +105,14 @@ namespace bgfx
}
}
void renderDocTriggerCapture()
{
if (NULL != s_renderDoc)
{
s_renderDoc->TriggerCapture();
}
}
} // namespace bgfx
#else
@@ -121,6 +129,10 @@ namespace bgfx
{
}
void renderDocTriggerCapture()
{
}
} // namespace bgfx
#endif // BGFX_CONFIG_DEBUG_PIX && (BX_PLATFORM_WINDOWS || BX_PLATFORM_LINUX)