mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-15 02:11:22 +00:00
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:
1 parent
de61af5921
commit
b8226fc97c
9 files changed
+407
-206
No files matched your search
@@ -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)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user