Path: blob/main_old/third_party/renderdoc/src/renderdoc_app.h
2580 views
/******************************************************************************1* The MIT License (MIT)2*3* Copyright (c) 2015-2018 Baldur Karlsson4*5* Permission is hereby granted, free of charge, to any person obtaining a copy6* of this software and associated documentation files (the "Software"), to deal7* in the Software without restriction, including without limitation the rights8* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell9* copies of the Software, and to permit persons to whom the Software is10* furnished to do so, subject to the following conditions:11*12* The above copyright notice and this permission notice shall be included in13* all copies or substantial portions of the Software.14*15* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR16* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,17* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE18* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER19* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,20* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN21* THE SOFTWARE.22******************************************************************************/2324#pragma once2526//////////////////////////////////////////////////////////////////////////////////////////////////27//28// Documentation for the API is available at https://renderdoc.org/docs/in_application_api.html29//3031#if !defined(RENDERDOC_NO_STDINT)32# include <stdint.h>33#endif3435#if defined(WIN32)36# define RENDERDOC_CC __cdecl37#elif defined(__linux__)38# define RENDERDOC_CC39#elif defined(__APPLE__)40# define RENDERDOC_CC41#else42# error "Unknown platform"43#endif4445#ifdef __cplusplus46extern "C" {47#endif4849//////////////////////////////////////////////////////////////////////////////////////////////////50// Constants not used directly in below API5152// This is a GUID/magic value used for when applications pass a path where shader debug53// information can be found to match up with a stripped shader.54// the define can be used like so: const GUID RENDERDOC_ShaderDebugMagicValue =55// RENDERDOC_ShaderDebugMagicValue_value56#define RENDERDOC_ShaderDebugMagicValue_struct \57{ \580xeab25520, 0x6670, 0x4865, 0x84, 0x29, 0x6c, 0x8, 0x51, 0x54, 0x00, 0xff \59}6061// as an alternative when you want a byte array (assuming x86 endianness):62#define RENDERDOC_ShaderDebugMagicValue_bytearray \63{ \640x20, 0x55, 0xb2, 0xea, 0x70, 0x66, 0x65, 0x48, 0x84, 0x29, 0x6c, 0x8, 0x51, 0x54, 0x00, \650xff \66}6768// truncated version when only a uint64_t is available (e.g. Vulkan tags):69#define RENDERDOC_ShaderDebugMagicValue_truncated 0x48656670eab25520ULL7071//////////////////////////////////////////////////////////////////////////////////////////////////72// RenderDoc capture options73//7475typedef enum76{77// Allow the application to enable vsync78//79// Default - enabled80//81// 1 - The application can enable or disable vsync at will82// 0 - vsync is force disabled83eRENDERDOC_Option_AllowVSync = 0,8485// Allow the application to enable fullscreen86//87// Default - enabled88//89// 1 - The application can enable or disable fullscreen at will90// 0 - fullscreen is force disabled91eRENDERDOC_Option_AllowFullscreen = 1,9293// Record API debugging events and messages94//95// Default - disabled96//97// 1 - Enable built-in API debugging features and records the results into98// the capture, which is matched up with events on replay99// 0 - no API debugging is forcibly enabled100eRENDERDOC_Option_APIValidation = 2,101eRENDERDOC_Option_DebugDeviceMode = 2, // deprecated name of this enum102103// Capture CPU callstacks for API events104//105// Default - disabled106//107// 1 - Enables capturing of callstacks108// 0 - no callstacks are captured109eRENDERDOC_Option_CaptureCallstacks = 3,110111// When capturing CPU callstacks, only capture them from drawcalls.112// This option does nothing without the above option being enabled113//114// Default - disabled115//116// 1 - Only captures callstacks for drawcall type API events.117// Ignored if CaptureCallstacks is disabled118// 0 - Callstacks, if enabled, are captured for every event.119eRENDERDOC_Option_CaptureCallstacksOnlyDraws = 4,120121// Specify a delay in seconds to wait for a debugger to attach, after122// creating or injecting into a process, before continuing to allow it to run.123//124// 0 indicates no delay, and the process will run immediately after injection125//126// Default - 0 seconds127//128eRENDERDOC_Option_DelayForDebugger = 5,129130// Verify any writes to mapped buffers, by checking the memory after the131// bounds of the returned pointer to detect any modification.132//133// Default - disabled134//135// 1 - Verify any writes to mapped buffers136// 0 - No verification is performed, and overwriting bounds may cause137// crashes or corruption in RenderDoc138eRENDERDOC_Option_VerifyMapWrites = 6,139140// Hooks any system API calls that create child processes, and injects141// RenderDoc into them recursively with the same options.142//143// Default - disabled144//145// 1 - Hooks into spawned child processes146// 0 - Child processes are not hooked by RenderDoc147eRENDERDOC_Option_HookIntoChildren = 7,148149// By default RenderDoc only includes resources in the final capture necessary150// for that frame, this allows you to override that behaviour.151//152// Default - disabled153//154// 1 - all live resources at the time of capture are included in the capture155// and available for inspection156// 0 - only the resources referenced by the captured frame are included157eRENDERDOC_Option_RefAllResources = 8,158159// **NOTE**: As of RenderDoc v1.1 this option has been deprecated. Setting or160// getting it will be ignored, to allow compatibility with older versions.161// In v1.1 the option acts as if it's always enabled.162//163// By default RenderDoc skips saving initial states for resources where the164// previous contents don't appear to be used, assuming that writes before165// reads indicate previous contents aren't used.166//167// Default - disabled168//169// 1 - initial contents at the start of each captured frame are saved, even if170// they are later overwritten or cleared before being used.171// 0 - unless a read is detected, initial contents will not be saved and will172// appear as black or empty data.173eRENDERDOC_Option_SaveAllInitials = 9,174175// In APIs that allow for the recording of command lists to be replayed later,176// RenderDoc may choose to not capture command lists before a frame capture is177// triggered, to reduce overheads. This means any command lists recorded once178// and replayed many times will not be available and may cause a failure to179// capture.180//181// Note this is only true for APIs where multithreading is difficult or182// discouraged. Newer APIs like Vulkan and D3D12 will ignore this option183// and always capture all command lists since the API is heavily oriented184// around it and the overheads have been reduced by API design.185//186// 1 - All command lists are captured from the start of the application187// 0 - Command lists are only captured if their recording begins during188// the period when a frame capture is in progress.189eRENDERDOC_Option_CaptureAllCmdLists = 10,190191// Mute API debugging output when the API validation mode option is enabled192//193// Default - enabled194//195// 1 - Mute any API debug messages from being displayed or passed through196// 0 - API debugging is displayed as normal197eRENDERDOC_Option_DebugOutputMute = 11,198199} RENDERDOC_CaptureOption;200201// Sets an option that controls how RenderDoc behaves on capture.202//203// Returns 1 if the option and value are valid204// Returns 0 if either is invalid and the option is unchanged205typedef int(RENDERDOC_CC *pRENDERDOC_SetCaptureOptionU32)(RENDERDOC_CaptureOption opt,206uint32_t val);207typedef int(RENDERDOC_CC *pRENDERDOC_SetCaptureOptionF32)(RENDERDOC_CaptureOption opt, float val);208209// Gets the current value of an option as a uint32_t210//211// If the option is invalid, 0xffffffff is returned212typedef uint32_t(RENDERDOC_CC *pRENDERDOC_GetCaptureOptionU32)(RENDERDOC_CaptureOption opt);213214// Gets the current value of an option as a float215//216// If the option is invalid, -FLT_MAX is returned217typedef float(RENDERDOC_CC *pRENDERDOC_GetCaptureOptionF32)(RENDERDOC_CaptureOption opt);218219typedef enum220{221// '0' - '9' matches ASCII values222eRENDERDOC_Key_0 = 0x30,223eRENDERDOC_Key_1 = 0x31,224eRENDERDOC_Key_2 = 0x32,225eRENDERDOC_Key_3 = 0x33,226eRENDERDOC_Key_4 = 0x34,227eRENDERDOC_Key_5 = 0x35,228eRENDERDOC_Key_6 = 0x36,229eRENDERDOC_Key_7 = 0x37,230eRENDERDOC_Key_8 = 0x38,231eRENDERDOC_Key_9 = 0x39,232233// 'A' - 'Z' matches ASCII values234eRENDERDOC_Key_A = 0x41,235eRENDERDOC_Key_B = 0x42,236eRENDERDOC_Key_C = 0x43,237eRENDERDOC_Key_D = 0x44,238eRENDERDOC_Key_E = 0x45,239eRENDERDOC_Key_F = 0x46,240eRENDERDOC_Key_G = 0x47,241eRENDERDOC_Key_H = 0x48,242eRENDERDOC_Key_I = 0x49,243eRENDERDOC_Key_J = 0x4A,244eRENDERDOC_Key_K = 0x4B,245eRENDERDOC_Key_L = 0x4C,246eRENDERDOC_Key_M = 0x4D,247eRENDERDOC_Key_N = 0x4E,248eRENDERDOC_Key_O = 0x4F,249eRENDERDOC_Key_P = 0x50,250eRENDERDOC_Key_Q = 0x51,251eRENDERDOC_Key_R = 0x52,252eRENDERDOC_Key_S = 0x53,253eRENDERDOC_Key_T = 0x54,254eRENDERDOC_Key_U = 0x55,255eRENDERDOC_Key_V = 0x56,256eRENDERDOC_Key_W = 0x57,257eRENDERDOC_Key_X = 0x58,258eRENDERDOC_Key_Y = 0x59,259eRENDERDOC_Key_Z = 0x5A,260261// leave the rest of the ASCII range free262// in case we want to use it later263eRENDERDOC_Key_NonPrintable = 0x100,264265eRENDERDOC_Key_Divide,266eRENDERDOC_Key_Multiply,267eRENDERDOC_Key_Subtract,268eRENDERDOC_Key_Plus,269270eRENDERDOC_Key_F1,271eRENDERDOC_Key_F2,272eRENDERDOC_Key_F3,273eRENDERDOC_Key_F4,274eRENDERDOC_Key_F5,275eRENDERDOC_Key_F6,276eRENDERDOC_Key_F7,277eRENDERDOC_Key_F8,278eRENDERDOC_Key_F9,279eRENDERDOC_Key_F10,280eRENDERDOC_Key_F11,281eRENDERDOC_Key_F12,282283eRENDERDOC_Key_Home,284eRENDERDOC_Key_End,285eRENDERDOC_Key_Insert,286eRENDERDOC_Key_Delete,287eRENDERDOC_Key_PageUp,288eRENDERDOC_Key_PageDn,289290eRENDERDOC_Key_Backspace,291eRENDERDOC_Key_Tab,292eRENDERDOC_Key_PrtScrn,293eRENDERDOC_Key_Pause,294295eRENDERDOC_Key_Max,296} RENDERDOC_InputButton;297298// Sets which key or keys can be used to toggle focus between multiple windows299//300// If keys is NULL or num is 0, toggle keys will be disabled301typedef void(RENDERDOC_CC *pRENDERDOC_SetFocusToggleKeys)(RENDERDOC_InputButton *keys, int num);302303// Sets which key or keys can be used to capture the next frame304//305// If keys is NULL or num is 0, captures keys will be disabled306typedef void(RENDERDOC_CC *pRENDERDOC_SetCaptureKeys)(RENDERDOC_InputButton *keys, int num);307308typedef enum309{310// This single bit controls whether the overlay is enabled or disabled globally311eRENDERDOC_Overlay_Enabled = 0x1,312313// Show the average framerate over several seconds as well as min/max314eRENDERDOC_Overlay_FrameRate = 0x2,315316// Show the current frame number317eRENDERDOC_Overlay_FrameNumber = 0x4,318319// Show a list of recent captures, and how many captures have been made320eRENDERDOC_Overlay_CaptureList = 0x8,321322// Default values for the overlay mask323eRENDERDOC_Overlay_Default = (eRENDERDOC_Overlay_Enabled | eRENDERDOC_Overlay_FrameRate |324eRENDERDOC_Overlay_FrameNumber | eRENDERDOC_Overlay_CaptureList),325326// Enable all bits327eRENDERDOC_Overlay_All = ~0U,328329// Disable all bits330eRENDERDOC_Overlay_None = 0,331} RENDERDOC_OverlayBits;332333// returns the overlay bits that have been set334typedef uint32_t(RENDERDOC_CC *pRENDERDOC_GetOverlayBits)();335// sets the overlay bits with an and & or mask336typedef void(RENDERDOC_CC *pRENDERDOC_MaskOverlayBits)(uint32_t And, uint32_t Or);337338// this function will attempt to shut down RenderDoc.339//340// Note: that this will only work correctly if done immediately after341// the dll is loaded, before any API work happens. RenderDoc will remove its342// injected hooks and shut down. Behaviour is undefined if this is called343// after any API functions have been called.344typedef void(RENDERDOC_CC *pRENDERDOC_Shutdown)();345346// This function will unload RenderDoc's crash handler.347//348// If you use your own crash handler and don't want RenderDoc's handler to349// intercede, you can call this function to unload it and any unhandled350// exceptions will pass to the next handler.351typedef void(RENDERDOC_CC *pRENDERDOC_UnloadCrashHandler)();352353// Sets the capture file path template354//355// pathtemplate is a UTF-8 string that gives a template for how captures will be named356// and where they will be saved.357//358// Any extension is stripped off the path, and captures are saved in the directory359// specified, and named with the filename and the frame number appended. If the360// directory does not exist it will be created, including any parent directories.361//362// If pathtemplate is NULL, the template will remain unchanged363//364// Example:365//366// SetCaptureFilePathTemplate("my_captures/example");367//368// Capture #1 -> my_captures/example_frame123.rdc369// Capture #2 -> my_captures/example_frame456.rdc370typedef void(RENDERDOC_CC *pRENDERDOC_SetCaptureFilePathTemplate)(const char *pathtemplate);371372// returns the current capture path template, see SetCaptureFileTemplate above, as a UTF-8 string373typedef const char *(RENDERDOC_CC *pRENDERDOC_GetCaptureFilePathTemplate)();374375// DEPRECATED: compatibility for code compiled against pre-1.1.2 headers.376typedef void(RENDERDOC_CC *pRENDERDOC_SetLogFilePathTemplate)(const char *pathtemplate);377typedef const char *(RENDERDOC_CC *pRENDERDOC_GetLogFilePathTemplate)();378379// returns the number of captures that have been made380typedef uint32_t(RENDERDOC_CC *pRENDERDOC_GetNumCaptures)();381382// This function returns the details of a capture, by index. New captures are added383// to the end of the list.384//385// filename will be filled with the absolute path to the capture file, as a UTF-8 string386// pathlength will be written with the length in bytes of the filename string387// timestamp will be written with the time of the capture, in seconds since the Unix epoch388//389// Any of the parameters can be NULL and they'll be skipped.390//391// The function will return 1 if the capture index is valid, or 0 if the index is invalid392// If the index is invalid, the values will be unchanged393//394// Note: when captures are deleted in the UI they will remain in this list, so the395// capture path may not exist anymore.396typedef uint32_t(RENDERDOC_CC *pRENDERDOC_GetCapture)(uint32_t idx,397char *filename,398uint32_t *pathlength,399uint64_t *timestamp);400401// returns 1 if the RenderDoc UI is connected to this application, 0 otherwise402typedef uint32_t(RENDERDOC_CC *pRENDERDOC_IsTargetControlConnected)();403404// DEPRECATED: compatibility for code compiled against pre-1.1.1 headers.405// This was renamed to IsTargetControlConnected in API 1.1.1, the old typedef is kept here for406// backwards compatibility with old code, it is castable either way since it's ABI compatible407// as the same function pointer type.408typedef uint32_t(RENDERDOC_CC *pRENDERDOC_IsRemoteAccessConnected)();409410// This function will launch the Replay UI associated with the RenderDoc library injected411// into the running application.412//413// if connectTargetControl is 1, the Replay UI will be launched with a command line parameter414// to connect to this application415// cmdline is the rest of the command line, as a UTF-8 string. E.g. a captures to open416// if cmdline is NULL, the command line will be empty.417//418// returns the PID of the replay UI if successful, 0 if not successful.419typedef uint32_t(RENDERDOC_CC *pRENDERDOC_LaunchReplayUI)(uint32_t connectTargetControl,420const char *cmdline);421422// RenderDoc can return a higher version than requested if it's backwards compatible,423// this function returns the actual version returned. If a parameter is NULL, it will be424// ignored and the others will be filled out.425typedef void(RENDERDOC_CC *pRENDERDOC_GetAPIVersion)(int *major, int *minor, int *patch);426427//////////////////////////////////////////////////////////////////////////428// Capturing functions429//430431// A device pointer is a pointer to the API's root handle.432//433// This would be an ID3D11Device, HGLRC/GLXContext, ID3D12Device, etc434typedef void *RENDERDOC_DevicePointer;435436// A window handle is the OS's native window handle437//438// This would be an HWND, GLXDrawable, etc439typedef void *RENDERDOC_WindowHandle;440441// A helper macro for Vulkan, where the device handle cannot be used directly.442//443// Passing the VkInstance to this macro will return the RENDERDOC_DevicePointer to use.444//445// Specifically, the value needed is the dispatch table pointer, which sits as the first446// pointer-sized object in the memory pointed to by the VkInstance. Thus we cast to a void** and447// indirect once.448#define RENDERDOC_DEVICEPOINTER_FROM_VKINSTANCE(inst) (*((void **)(inst)))449450// This sets the RenderDoc in-app overlay in the API/window pair as 'active' and it will451// respond to keypresses. Neither parameter can be NULL452typedef void(RENDERDOC_CC *pRENDERDOC_SetActiveWindow)(RENDERDOC_DevicePointer device,453RENDERDOC_WindowHandle wndHandle);454455// capture the next frame on whichever window and API is currently considered active456typedef void(RENDERDOC_CC *pRENDERDOC_TriggerCapture)();457458// capture the next N frames on whichever window and API is currently considered active459typedef void(RENDERDOC_CC *pRENDERDOC_TriggerMultiFrameCapture)(uint32_t numFrames);460461// When choosing either a device pointer or a window handle to capture, you can pass NULL.462// Passing NULL specifies a 'wildcard' match against anything. This allows you to specify463// any API rendering to a specific window, or a specific API instance rendering to any window,464// or in the simplest case of one window and one API, you can just pass NULL for both.465//466// In either case, if there are two or more possible matching (device,window) pairs it467// is undefined which one will be captured.468//469// Note: for headless rendering you can pass NULL for the window handle and either specify470// a device pointer or leave it NULL as above.471472// Immediately starts capturing API calls on the specified device pointer and window handle.473//474// If there is no matching thing to capture (e.g. no supported API has been initialised),475// this will do nothing.476//477// The results are undefined (including crashes) if two captures are started overlapping,478// even on separate devices and/oror windows.479typedef void(RENDERDOC_CC *pRENDERDOC_StartFrameCapture)(RENDERDOC_DevicePointer device,480RENDERDOC_WindowHandle wndHandle);481482// Returns whether or not a frame capture is currently ongoing anywhere.483//484// This will return 1 if a capture is ongoing, and 0 if there is no capture running485typedef uint32_t(RENDERDOC_CC *pRENDERDOC_IsFrameCapturing)();486487// Ends capturing immediately.488//489// This will return 1 if the capture succeeded, and 0 if there was an error capturing.490typedef uint32_t(RENDERDOC_CC *pRENDERDOC_EndFrameCapture)(RENDERDOC_DevicePointer device,491RENDERDOC_WindowHandle wndHandle);492493//////////////////////////////////////////////////////////////////////////////////////////////////494// RenderDoc API versions495//496497// RenderDoc uses semantic versioning (http://semver.org/).498//499// MAJOR version is incremented when incompatible API changes happen.500// MINOR version is incremented when functionality is added in a backwards-compatible manner.501// PATCH version is incremented when backwards-compatible bug fixes happen.502//503// Note that this means the API returned can be higher than the one you might have requested.504// e.g. if you are running against a newer RenderDoc that supports 1.0.1, it will be returned505// instead of 1.0.0. You can check this with the GetAPIVersion entry point506typedef enum507{508eRENDERDOC_API_Version_1_0_0 = 10000, // RENDERDOC_API_1_0_0 = 1 00 00509eRENDERDOC_API_Version_1_0_1 = 10001, // RENDERDOC_API_1_0_1 = 1 00 01510eRENDERDOC_API_Version_1_0_2 = 10002, // RENDERDOC_API_1_0_2 = 1 00 02511eRENDERDOC_API_Version_1_1_0 = 10100, // RENDERDOC_API_1_1_0 = 1 01 00512eRENDERDOC_API_Version_1_1_1 = 10101, // RENDERDOC_API_1_1_1 = 1 01 01513eRENDERDOC_API_Version_1_1_2 = 10102, // RENDERDOC_API_1_1_2 = 1 01 02514} RENDERDOC_Version;515516// API version changelog:517//518// 1.0.0 - initial release519// 1.0.1 - Bugfix: IsFrameCapturing() was returning false for captures that were triggered520// by keypress or TriggerCapture, instead of Start/EndFrameCapture.521// 1.0.2 - Refactor: Renamed eRENDERDOC_Option_DebugDeviceMode to eRENDERDOC_Option_APIValidation522// 1.1.0 - Add feature: TriggerMultiFrameCapture(). Backwards compatible with 1.0.x since the new523// function pointer is added to the end of the struct, the original layout is identical524// 1.1.1 - Refactor: Renamed remote access to target control (to better disambiguate from remote525// replay/remote server concept in replay UI)526// 1.1.2 - Refactor: Renamed "log file" in function names to just capture, to clarify that these527// are captures and not debug logging files. This is the first API version in the v1.0528// branch.529530// eRENDERDOC_API_Version_1_1_0531typedef struct532{533pRENDERDOC_GetAPIVersion GetAPIVersion;534535pRENDERDOC_SetCaptureOptionU32 SetCaptureOptionU32;536pRENDERDOC_SetCaptureOptionF32 SetCaptureOptionF32;537538pRENDERDOC_GetCaptureOptionU32 GetCaptureOptionU32;539pRENDERDOC_GetCaptureOptionF32 GetCaptureOptionF32;540541pRENDERDOC_SetFocusToggleKeys SetFocusToggleKeys;542pRENDERDOC_SetCaptureKeys SetCaptureKeys;543544pRENDERDOC_GetOverlayBits GetOverlayBits;545pRENDERDOC_MaskOverlayBits MaskOverlayBits;546547pRENDERDOC_Shutdown Shutdown;548pRENDERDOC_UnloadCrashHandler UnloadCrashHandler;549550pRENDERDOC_SetLogFilePathTemplate SetLogFilePathTemplate;551pRENDERDOC_GetLogFilePathTemplate GetLogFilePathTemplate;552553pRENDERDOC_GetNumCaptures GetNumCaptures;554pRENDERDOC_GetCapture GetCapture;555556pRENDERDOC_TriggerCapture TriggerCapture;557558pRENDERDOC_IsRemoteAccessConnected IsRemoteAccessConnected;559pRENDERDOC_LaunchReplayUI LaunchReplayUI;560561pRENDERDOC_SetActiveWindow SetActiveWindow;562563pRENDERDOC_StartFrameCapture StartFrameCapture;564pRENDERDOC_IsFrameCapturing IsFrameCapturing;565pRENDERDOC_EndFrameCapture EndFrameCapture;566567pRENDERDOC_TriggerMultiFrameCapture TriggerMultiFrameCapture;568} RENDERDOC_API_1_1_0;569570typedef RENDERDOC_API_1_1_0 RENDERDOC_API_1_0_0;571typedef RENDERDOC_API_1_1_0 RENDERDOC_API_1_0_1;572typedef RENDERDOC_API_1_1_0 RENDERDOC_API_1_0_2;573574// although this structure is identical to RENDERDOC_API_1_1_0, the member575// IsRemoteAccessConnected was renamed to IsTargetControlConnected. So that576// old code can still compile with a new header, we must declare a new struct577// type. It can be casted back and forth though, so we will still return a578// pointer to this type for all previous API versions - the above struct is579// purely legacy for compilation compatibility580581// eRENDERDOC_API_Version_1_1_1582typedef struct583{584pRENDERDOC_GetAPIVersion GetAPIVersion;585586pRENDERDOC_SetCaptureOptionU32 SetCaptureOptionU32;587pRENDERDOC_SetCaptureOptionF32 SetCaptureOptionF32;588589pRENDERDOC_GetCaptureOptionU32 GetCaptureOptionU32;590pRENDERDOC_GetCaptureOptionF32 GetCaptureOptionF32;591592pRENDERDOC_SetFocusToggleKeys SetFocusToggleKeys;593pRENDERDOC_SetCaptureKeys SetCaptureKeys;594595pRENDERDOC_GetOverlayBits GetOverlayBits;596pRENDERDOC_MaskOverlayBits MaskOverlayBits;597598pRENDERDOC_Shutdown Shutdown;599pRENDERDOC_UnloadCrashHandler UnloadCrashHandler;600601pRENDERDOC_SetLogFilePathTemplate SetLogFilePathTemplate;602pRENDERDOC_GetLogFilePathTemplate GetLogFilePathTemplate;603604pRENDERDOC_GetNumCaptures GetNumCaptures;605pRENDERDOC_GetCapture GetCapture;606607pRENDERDOC_TriggerCapture TriggerCapture;608609pRENDERDOC_IsTargetControlConnected IsTargetControlConnected;610pRENDERDOC_LaunchReplayUI LaunchReplayUI;611612pRENDERDOC_SetActiveWindow SetActiveWindow;613614pRENDERDOC_StartFrameCapture StartFrameCapture;615pRENDERDOC_IsFrameCapturing IsFrameCapturing;616pRENDERDOC_EndFrameCapture EndFrameCapture;617618pRENDERDOC_TriggerMultiFrameCapture TriggerMultiFrameCapture;619} RENDERDOC_API_1_1_1;620621// similarly to above, we renamed Get/SetLogFilePathTemplate to Get/SetCaptureFilePathTemplate.622// We thus declare a new struct so that code that was referencing the RENDERDOC_API_1_1_1 struct623// can still compile without changes, but new code will use the new struct members624625// eRENDERDOC_API_Version_1_1_2626typedef struct627{628pRENDERDOC_GetAPIVersion GetAPIVersion;629630pRENDERDOC_SetCaptureOptionU32 SetCaptureOptionU32;631pRENDERDOC_SetCaptureOptionF32 SetCaptureOptionF32;632633pRENDERDOC_GetCaptureOptionU32 GetCaptureOptionU32;634pRENDERDOC_GetCaptureOptionF32 GetCaptureOptionF32;635636pRENDERDOC_SetFocusToggleKeys SetFocusToggleKeys;637pRENDERDOC_SetCaptureKeys SetCaptureKeys;638639pRENDERDOC_GetOverlayBits GetOverlayBits;640pRENDERDOC_MaskOverlayBits MaskOverlayBits;641642pRENDERDOC_Shutdown Shutdown;643pRENDERDOC_UnloadCrashHandler UnloadCrashHandler;644645pRENDERDOC_SetCaptureFilePathTemplate SetCaptureFilePathTemplate;646pRENDERDOC_GetCaptureFilePathTemplate GetCaptureFilePathTemplate;647648pRENDERDOC_GetNumCaptures GetNumCaptures;649pRENDERDOC_GetCapture GetCapture;650651pRENDERDOC_TriggerCapture TriggerCapture;652653pRENDERDOC_IsTargetControlConnected IsTargetControlConnected;654pRENDERDOC_LaunchReplayUI LaunchReplayUI;655656pRENDERDOC_SetActiveWindow SetActiveWindow;657658pRENDERDOC_StartFrameCapture StartFrameCapture;659pRENDERDOC_IsFrameCapturing IsFrameCapturing;660pRENDERDOC_EndFrameCapture EndFrameCapture;661662pRENDERDOC_TriggerMultiFrameCapture TriggerMultiFrameCapture;663} RENDERDOC_API_1_1_2;664665//////////////////////////////////////////////////////////////////////////////////////////////////666// RenderDoc API entry point667//668// This entry point can be obtained via GetProcAddress/dlsym if RenderDoc is available.669//670// The name is the same as the typedef - "RENDERDOC_GetAPI"671//672// This function is not thread safe, and should not be called on multiple threads at once.673// Ideally, call this once as early as possible in your application's startup, before doing674// any API work, since some configuration functionality etc has to be done also before675// initialising any APIs.676//677// Parameters:678// version is a single value from the RENDERDOC_Version above.679//680// outAPIPointers will be filled out with a pointer to the corresponding struct of function681// pointers.682//683// Returns:684// 1 - if the outAPIPointers has been filled with a pointer to the API struct requested685// 0 - if the requested version is not supported or the arguments are invalid.686//687typedef int(RENDERDOC_CC *pRENDERDOC_GetAPI)(RENDERDOC_Version version, void **outAPIPointers);688689#ifdef __cplusplus690} // extern "C"691#endif692693694