mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-13 05:20:45 +00:00
Update RenderDoc application-facing API to a stable/mature version.
* This API is now intended to be forward and backward compatible as much as possible. Meaning applications should be able to run without changing on many RenderDoc versions after the one they are built against without breaking. * All function pointers are fetched at once in one versioned GetAPI() function, to save on constant GetProcAddress/dlsym'ing. * Otherwise, it's largely similar to the previous API.
This commit is contained in:
@@ -78,25 +78,6 @@ namespace renderdoc
|
||||
public bool RefAllResources;
|
||||
public bool SaveAllInitials;
|
||||
public bool CaptureAllCmdLists;
|
||||
|
||||
public static CaptureOptions Defaults
|
||||
{
|
||||
get
|
||||
{
|
||||
CaptureOptions defs = new CaptureOptions();
|
||||
defs.AllowVSync = true;
|
||||
defs.AllowFullscreen = true;
|
||||
defs.DebugDeviceMode = false;
|
||||
defs.CaptureCallstacks = false;
|
||||
defs.CaptureCallstacksOnlyDraws = false;
|
||||
defs.DelayForDebugger = 0;
|
||||
defs.VerifyMapWrites = false;
|
||||
defs.HookIntoChildren = false;
|
||||
defs.RefAllResources = false;
|
||||
defs.SaveAllInitials = false;
|
||||
defs.CaptureAllCmdLists = false;
|
||||
return defs;
|
||||
}
|
||||
}
|
||||
public bool DebugOutputMute;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -55,6 +55,9 @@ namespace renderdoc
|
||||
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
|
||||
private static extern ReplayCreateStatus RENDERDOC_CreateRemoteReplayConnection(IntPtr host, ref IntPtr outrend);
|
||||
|
||||
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
|
||||
private static extern void RENDERDOC_GetDefaultCaptureOptions(IntPtr outopts);
|
||||
|
||||
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
|
||||
private static extern void RENDERDOC_SpawnReplayHost(ref bool killReplay);
|
||||
|
||||
@@ -255,5 +258,18 @@ namespace renderdoc
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static CaptureOptions GetDefaultCaptureOptions()
|
||||
{
|
||||
IntPtr mem = CustomMarshal.Alloc(typeof(CaptureOptions));
|
||||
|
||||
RENDERDOC_GetDefaultCaptureOptions(mem);
|
||||
|
||||
CaptureOptions ret = (CaptureOptions)CustomMarshal.PtrToStructure(mem, typeof(CaptureOptions), true);
|
||||
|
||||
CustomMarshal.Free(mem);
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace renderdocui.Windows.Dialogs
|
||||
{
|
||||
public class CaptureSettings
|
||||
{
|
||||
public CaptureOptions Options = CaptureOptions.Defaults;
|
||||
public CaptureOptions Options = StaticExports.GetDefaultCaptureOptions();
|
||||
public bool Inject = false;
|
||||
public bool AutoStart = false;
|
||||
public string Executable = "";
|
||||
|
||||
Reference in New Issue
Block a user