mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-07 22:43:49 +00:00
Add functionality for overlay tweaking & manual capturing by apps
* The functionality is exposed via dllexported functions so that apps can
call it to tweak renderdoc's behaviour when injects.
1) Can now turn bits of the overlay off, or hide it entirely.
2) Can also manually start and stop a capture on a given window. This
skips the need for swapping between active swapchains, and allows the
app to define the exact region of D3D11 calls to be captured (could in
fact be many frames).
The window provided determines the swapchain used for thumbnail, and
also implicitly specifies the device to be used for capture.
This commit is contained in:
1 parent
e0a7c0df85
commit
546a1fbb31
7 files changed
+676
-471
No files matched your search
@@ -88,6 +88,8 @@ RenderDoc::RenderDoc()
|
||||
m_ProgressPtr = NULL;
|
||||
|
||||
m_ExHandler = NULL;
|
||||
|
||||
m_Overlay = eOverlay_Default;
|
||||
|
||||
m_RemoteServerThreadShutdown = false;
|
||||
m_RemoteClientThreadShutdown = false;
|
||||
@@ -203,6 +205,42 @@ RenderDoc::~RenderDoc()
|
||||
RDCLOGDELETE();
|
||||
}
|
||||
|
||||
void RenderDoc::StartFrameCapture(void *wnd)
|
||||
{
|
||||
auto it = m_WindowFrameCapturers.find(wnd);
|
||||
if(it == m_WindowFrameCapturers.end())
|
||||
{
|
||||
RDCERR("Couldn't find frame capturer for this window %p", wnd);
|
||||
return;
|
||||
}
|
||||
|
||||
it->second->StartFrameCapture(wnd);
|
||||
}
|
||||
|
||||
void RenderDoc::SetActiveWindow(void *wnd)
|
||||
{
|
||||
auto it = m_WindowFrameCapturers.find(wnd);
|
||||
if(it == m_WindowFrameCapturers.end())
|
||||
{
|
||||
RDCERR("Couldn't find frame capturer for this window %p", wnd);
|
||||
return;
|
||||
}
|
||||
|
||||
it->second->SetActiveWindow(wnd);
|
||||
}
|
||||
|
||||
bool RenderDoc::EndFrameCapture(void *wnd)
|
||||
{
|
||||
auto it = m_WindowFrameCapturers.find(wnd);
|
||||
if(it == m_WindowFrameCapturers.end())
|
||||
{
|
||||
RDCERR("Couldn't find frame capturer for this window %p", wnd);
|
||||
return false;
|
||||
}
|
||||
|
||||
return it->second->EndFrameCapture(wnd);
|
||||
}
|
||||
|
||||
void RenderDoc::Tick()
|
||||
{
|
||||
static bool prev_f11 = false;
|
||||
|
||||
Reference in new issue
Block a user