Add new API calls for embedding renderdoc in apps

* This will easily let an application tell if an instance of the replay
  UI is currently connected, and if not launch it and connect. Good for
  integrating renderdoc somewhere where you can trigger a capture, and
  then have the replay UI pop up to either connect live, or open the
  most recently log.
This commit is contained in:
baldurk committed 2015-06-19 22:37:29 +02:00
1 parent de61af5921
commit b8226fc97c
9 files changed
+407 -206

No files matched your search

+22 -1
View File
@@ -236,7 +236,7 @@ extern "C" RENDERDOC_API
uint32_t RENDERDOC_CC RENDERDOC_ExecuteAndInject(const char *app, const char *workingDir, const char *cmdLine,
const char *logfile, const CaptureOptions *opts, bool32 waitForExit)
{
return Process::CreateAndInjectIntoProcess(app, workingDir, cmdLine, logfile, opts, waitForExit != 0);
return Process::LaunchAndInjectIntoProcess(app, workingDir, cmdLine, logfile, opts, waitForExit != 0);
}
extern "C" RENDERDOC_API
@@ -369,6 +369,27 @@ void RENDERDOC_CC RENDERDOC_InitRemoteAccess(uint32_t *ident)
if(ident) *ident = RenderDoc::Inst().GetRemoteAccessIdent();
}
extern "C" RENDERDOC_API
uint32_t RENDERDOC_CC RENDERDOC_IsRemoteAccessConnected()
{
return RenderDoc::Inst().IsRemoteAccessConnected();
}
extern "C" RENDERDOC_API
uint32_t RENDERDOC_CC RENDERDOC_LaunchReplayUI(uint32_t connectRemoteAccess, const char *cmdline)
{
string replayapp = FileIO::GetReplayAppFilename();
if(replayapp.empty())
return 0;
string cmd = cmdline ? cmdline : "";
if(connectRemoteAccess)
cmd += StringFormat::Fmt(" --remoteaccess localhost:%u", RenderDoc::Inst().GetRemoteAccessIdent());
return Process::LaunchProcess(replayapp.c_str(), "", cmd.c_str());
}
extern "C" RENDERDOC_API
uint32_t RENDERDOC_CC RENDERDOC_EnumerateRemoteConnections(const char *host, uint32_t *idents)
{