Support switching between multiple APIs in the same program. Closes #124

* The core class is now responsible for tracking the active window and
  cycling through, so it can cycle through multiple APIs.
* For GL we only set up associations for capturable windows, and only
  those that present (since helper windows are often created). Since
  GL doesn't really have a 'this window is done rendering' call, we just
  decay old windows that haven't presented in >5 seconds.
* Also on GL, legacy/uncapturable windows aren't associated so they will
  not cycle to at all.
* The embedding API now expects a device pointer and window handle to
  set active window or start/end a capture. You can still pass NULLs if
  there is only one API active.
This commit is contained in:
baldurk committed 2015-04-13 11:31:30 +01:00
1 parent d91f36281b
commit b41b5242d1
11 files changed
+526 -328

No files matched your search

+6 -6
View File
@@ -246,9 +246,9 @@ uint32_t RENDERDOC_CC RENDERDOC_InjectIntoProcess(uint32_t pid, const char *logf
}
extern "C" RENDERDOC_API
void RENDERDOC_CC RENDERDOC_SetActiveWindow(void *wndHandle)
void RENDERDOC_CC RENDERDOC_SetActiveWindow(void *device, void *wndHandle)
{
RenderDoc::Inst().SetActiveWindow(wndHandle);
RenderDoc::Inst().SetActiveWindow(device, wndHandle);
}
extern "C" RENDERDOC_API
@@ -258,15 +258,15 @@ void RENDERDOC_CC RENDERDOC_TriggerCapture()
}
extern "C" RENDERDOC_API
void RENDERDOC_CC RENDERDOC_StartFrameCapture(void *wndHandle)
void RENDERDOC_CC RENDERDOC_StartFrameCapture(void *device, void *wndHandle)
{
RenderDoc::Inst().StartFrameCapture(wndHandle);
RenderDoc::Inst().StartFrameCapture(device, wndHandle);
}
extern "C" RENDERDOC_API
bool32 RENDERDOC_CC RENDERDOC_EndFrameCapture(void *wndHandle)
bool32 RENDERDOC_CC RENDERDOC_EndFrameCapture(void *device, void *wndHandle)
{
return RenderDoc::Inst().EndFrameCapture(wndHandle);
return RenderDoc::Inst().EndFrameCapture(device, wndHandle);
}
extern "C" RENDERDOC_API